FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 09-23-2008, 03:32 PM
Anthony Metcalf
 
Default Copy make.conf or Create New Profile

Hi,

This is a theoretical question, and a very simplified example of
what I'm thinking, but it serves to get the idea across....

Suppose I am planning multiple Gentoo servers, I will want them all
based on the "Hardened" profile (they are servers after all!) but I will
also want them all to have the ipv6 use flag set, since my internal
network is completely ipv6.

Which is better, have a standard make.conf, with USE="ipv6" and copy
that around, or create my own profile?

I assume that I could copy the hardened profile, change a couple of
files, and then re-link make.profile.

1) Would changes be lost on rysnc, since my new folder isn't in the
tree I'm syncing with? Is there a way around that?

The advantage I see over the copy-the-make.conf situation, is that I
can change the use flags once, and they are copied for all servers at
the next sync (all servers would obviously sync to a central box),
whilst still being able to keep other things (CFLAGS? IF servers have
different processors etc) different for different servers....


Discuss....
 
Old 09-23-2008, 03:37 PM
Neil Bothwick
 
Default Copy make.conf or Create New Profile

On Tue, 23 Sep 2008 16:32:51 +0100, Anthony Metcalf wrote:

> I assume that I could copy the hardened profile, change a couple of
> files, and then re-link make.profile.
>
> 1) Would changes be lost on rysnc, since my new folder isn't in the
> tree I'm syncing with? Is there a way around that?

Yes, put it somewhere where it won't be touched by a sync, like your
overlay directory. /etc/make.profile is only a symlink, it doesn't care
where the target file lives.


--
Neil Bothwick

Duct tape is the just like the Force: it has a light side, a dark side,
and binds the universe together.
 
Old 09-23-2008, 04:54 PM
Alan McKinnon
 
Default Copy make.conf or Create New Profile

On Tuesday 23 September 2008 17:32:51 Anthony Metcalf wrote:
> Hi,
>
> This is a theoretical question, and a very simplified example of
> what I'm thinking, but it serves to get the idea across....
>
> Suppose I am planning multiple Gentoo servers, I will want them all
> based on the "Hardened" profile (they are servers after all!) but I will
> also want them all to have the ipv6 use flag set, since my internal
> network is completely ipv6.
>
> Which is better, have a standard make.conf, with USE="ipv6" and copy
> that around, or create my own profile?

it's 6 and half a dozen really, both methods have the same effect. You have to
weigh up the hassle of creating the profile and the ease of using it with the
ease of modifying make.conf and the hassle of copying it everywhere. Plus,
with just a make.conf, you can't extend your system set. It's your call
really there is not a OneTrueRightWay(tm)

> I assume that I could copy the hardened profile, change a couple of
> files, and then re-link make.profile.

You don't copy the profile as such, you inherit from it. Create a new
directory somewhere, and put a file in it called "parent" which points to the
hardened profile that's your base. Put your mods in correctly named files in
that directory and point make.profile to it.

This is all documented *somewhere* but I once spent 10 minutes looking through
the existing profile directories and it was stunningly obvious how it all
worked.

> 1) Would changes be lost on rysnc, since my new folder isn't in the
> tree I'm syncing with? Is there a way around that?

If you put it in the portage directory and don't take special steps, then your
profile will be nuked. But --sync is just an rsync operation, and rsync's man
page is every longer than ls's :-) with options for every imaginable thing.
You should be able to figure out the options to exclude your custome profile
with ease

> The advantage I see over the copy-the-make.conf situation, is that I
> can change the use flags once, and they are copied for all servers at
> the next sync (all servers would obviously sync to a central box),
> whilst still being able to keep other things (CFLAGS? IF servers have
> different processors etc) different for different servers....

You could even set up a mini- trimmed-down sync server. Put your master copies
of stuff there, take steps so that portage doesn't nuke things, and set up a
cron to sync once a day. Tell your machines to get their portage tree from
this server, not gentoo.org somewhere and let rip. Also put a proxy on that
sync server of yours so distfile downloads only happen once. There's many
ways to do this - squid is obvious but I believe portage can do something
similar (which I have not used myself)



--
alan dot mckinnon at gmail dot com
 
Old 09-23-2008, 05:22 PM
Volker Armin Hemmann
 
Default Copy make.conf or Create New Profile

On Tuesday 23 September 2008, Alan McKinnon wrote:
> On Tuesday 23 September 2008 17:32:51 Anthony Metcalf wrote:
> > Hi,
> >
> > This is a theoretical question, and a very simplified example of
> > what I'm thinking, but it serves to get the idea across....
> >
> > Suppose I am planning multiple Gentoo servers, I will want them all
> > based on the "Hardened" profile (they are servers after all!) but I will
> > also want them all to have the ipv6 use flag set, since my internal
> > network is completely ipv6.
> >
> > Which is better, have a standard make.conf, with USE="ipv6" and copy
> > that around, or create my own profile?
>
> it's 6 and half a dozen really, both methods have the same effect. You have
> to weigh up the hassle of creating the profile and the ease of using it
> with the ease of modifying make.conf and the hassle of copying it
> everywhere. Plus, with just a make.conf, you can't extend your system set.
> It's your call really there is not a OneTrueRightWay(tm)
>
> > I assume that I could copy the hardened profile, change a couple of
> > files, and then re-link make.profile.
>
> You don't copy the profile as such, you inherit from it. Create a new
> directory somewhere, and put a file in it called "parent" which points to
> the hardened profile that's your base. Put your mods in correctly named
> files in that directory and point make.profile to it.
>
> This is all documented *somewhere* but I once spent 10 minutes looking
> through the existing profile directories and it was stunningly obvious how
> it all worked.
>
> > 1) Would changes be lost on rysnc, since my new folder isn't in the
> > tree I'm syncing with? Is there a way around that?
>
> If you put it in the portage directory and don't take special steps, then
> your profile will be nuked. But --sync is just an rsync operation, and
> rsync's man page is every longer than ls's :-) with options for every
> imaginable thing. You should be able to figure out the options to exclude
> your custome profile with ease
>
> > The advantage I see over the copy-the-make.conf situation, is that I
> > can change the use flags once, and they are copied for all servers at
> > the next sync (all servers would obviously sync to a central box),
> > whilst still being able to keep other things (CFLAGS? IF servers have
> > different processors etc) different for different servers....
>
> You could even set up a mini- trimmed-down sync server. Put your master
> copies of stuff there, take steps so that portage doesn't nuke things, and
> set up a cron to sync once a day. Tell your machines to get their portage
> tree from this server, not gentoo.org somewhere and let rip. Also put a
> proxy on that sync server of yours so distfile downloads only happen once.
> There's many ways to do this - squid is obvious but I believe portage can
> do something similar (which I have not used myself)

you can even put the compiling on one server and let the others download and
install the packets. AFAIR BINHOST is the thing to google for.
 
Old 09-23-2008, 06:28 PM
Anthony Metcalf
 
Default Copy make.conf or Create New Profile

Volker Armin Hemmann wrote:

On Tuesday 23 September 2008, Alan McKinnon wrote:



You could even set up a mini- trimmed-down sync server. Put your master
copies of stuff there, take steps so that portage doesn't nuke things, and
set up a cron to sync once a day. Tell your machines to get their portage
tree from this server, not gentoo.org somewhere and let rip. Also put a
proxy on that sync server of yours so distfile downloads only happen once.
There's many ways to do this - squid is obvious but I believe portage can
do something similar (which I have not used myself)



you can even put the compiling on one server and let the others download and
install the packets. AFAIR BINHOST is the thing to google for.




Oh yeah, the first server would be an rsync mirror, and the distfiles
proxy, I've done both before, and both are easy enough.



I hadn't considered the pkg thing, but it should be easy enough to set
the buildpkg and usepkg features in the new profile, and nfs mount the
packages directory.....



The main thing I'm considering at the moment though is keeping the
configuration consistant accross different servers, which the profile
seems best set to solve...
 
Old 09-23-2008, 07:17 PM
Volker Armin Hemmann
 
Default Copy make.conf or Create New Profile

On Tuesday 23 September 2008, Anthony Metcalf wrote:
> Volker Armin Hemmann wrote:
> > On Tuesday 23 September 2008, Alan McKinnon wrote:
> >> You could even set up a mini- trimmed-down sync server. Put your master
> >> copies of stuff there, take steps so that portage doesn't nuke things,
> >> and set up a cron to sync once a day. Tell your machines to get their
> >> portage tree from this server, not gentoo.org somewhere and let rip.
> >> Also put a proxy on that sync server of yours so distfile downloads only
> >> happen once. There's many ways to do this - squid is obvious but I
> >> believe portage can do something similar (which I have not used myself)
> >
> > you can even put the compiling on one server and let the others download
> > and install the packets. AFAIR BINHOST is the thing to google for.
>
> Oh yeah, the first server would be an rsync mirror, and the distfiles
> proxy, I've done both before, and both are easy enough.
>
> I hadn't considered the pkg thing, but it should be easy enough to set
> the buildpkg and usepkg features in the new profile, and nfs mount the
> packages directory.....
>
> The main thing I'm considering at the moment though is keeping the
> configuration consistant accross different servers, which the profile
> seems best set to solve...

if you are using nfs you could also put a 'central' make.conf there and have
the servers symlink to it. This way you only have to edit it once.
 
Old 09-23-2008, 09:16 PM
Anthony Metcalf
 
Default Copy make.conf or Create New Profile

Volker Armin Hemmann wrote:



if you are using nfs you could also put a 'central' make.conf there and have
the servers symlink to it. This way you only have to edit it once.




The problem with that is that I may not want al the servers to have al
of the servers running the same make.conf



Perhaps servers in a year or two will have never processors that I want
to take advantage of or I may want some use flags active on some
servers, while still haveing the general set that apply to them
all....With a profile I would have the flexibilty to do that, with a
symlinced make file, I don't.
 
Old 09-23-2008, 09:33 PM
Alan McKinnon
 
Default Copy make.conf or Create New Profile

On Tuesday 23 September 2008 23:16:12 Anthony Metcalf wrote:
> Volker Armin Hemmann wrote:
> > if you are using nfs you could also put a 'central' make.conf there and
> > have the servers symlink to it. This way you only have to edit it once.
>
> The problem with that is that I may not want al the servers to have al
> of the servers running the same make.conf
>
> Perhaps servers in a year or two will have never processors that I want
> to take advantage of or I may want some use flags active on some
> servers, while still haveing the general set that apply to them
> all....With a profile I would have the flexibilty to do that, with a
> symlinced make file, I don't.

So your original idea makes sense:

1. put the things that stay the same in a profile
2. Put the things that change in each machine's make.conf or world

--
alan dot mckinnon at gmail dot com
 

Thread Tools




All times are GMT. The time now is 07:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org