Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage & Portage Profiles
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Jon Wilder
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 102
Location: Fresno CA

PostPosted: Sat Sep 05, 2015 4:44 pm    Post subject: Portage & Portage Profiles Reply with quote

Some of the things I've learned in Gentoo...

Centralized Local Portage Tree

I have 4 machines on my home network. Having to sync 4 Portage trees then run updates on all 4 can be a hassle, not to mention that Gentoo only wants you to sync your tree no more than once per day. What I did was designate one machine as a home network server. It's just a small 32 bit old machine that only runs command line Gentoo. I set it up as an NFS server and exported /usr/portage on that machine. I then set up a cron job that syncs the Portage tree every night at midnight. On the remaining machines, I set up the NFS client. On boot, those machines mount their /usr/portage directory to /usr/portage on the server. This way I'm only having to sync one Portage tree, which does so automatically every night, and the client machines have access to the server's Portage tree. From there I can run emerge -auND @world anytime I wish on any machine and always be updated to the latest Portage tree without having to sync 4 trees.

Portage Profiles

In an attempt to build the most compact Gentoo system I could, I originally appended -* to my USE flag parameter in make.conf. What a mistake that was. While the system ran well, I wondered what I was missing by disabling Portage profiles in that fashion. So I took that out and set up my desired Portage profile. Upon doing this, it took about 3 days to world update my machines to the profile set USE flags, not to mention the few times the update would stop and I'd either have to refresh the GCC profile or run @preserved-rebuild just to pull in things that were missing and preventing the update from continuing.

Now all of my machines are built to the Portage profile and I update them every 2-3 days. Anything I don't want support for I just put the USE flag in make.conf with the (-) in front of it. Things seem to go much smoother that way.

My recommendations -

Build your system to the Portage profiles (or make your own Portage profile and build to that)
Set up NFS and designate one machine to sync its Portage tree once a day, then mount the Portage trees on your client machines to the server's tree
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Sep 05, 2015 6:34 pm    Post subject: Reply with quote

Quote:
Build your system to the Portage profiles (or make your own Portage profile and build to that)


afaik these are just recommendations and are overwritten with the settings in make.conf and package.use ...

and others also share the portage tree over nfs or some other fashion. others just set up a local mirror.

The drawback is that the other machine has to be online else it does not work...
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Sep 06, 2015 8:13 am    Post subject: Reply with quote

Quote:
Build your system to the Portage profiles (or make your own Portage profile and build to that)

tw04l124 wrote:
afaik these are just recommendations and are overwritten with the settings in make.conf and package.use ...

Just to add: you sometimes need to use /etc/portage/profile (cf: man portage), eg: for use.force.
Quote:
and others also share the portage tree over nfs or some other fashion. others just set up a local mirror.

I rather like sftp and sshfs (i think it's called: been a while;)
Latter works really well for shared distfiles, which the downstream machine might download, saving quite significant amounts of bandwidth, eg in bring up of a new machine since practically everything it needs is already sourced.

#openssh on IRC: chat.freenode.net (or .org) can advise better, if someone is interested in that.
Quote:
The drawback is that the other machine has to be online else it does not work...

Indeed, but that's not such a biggy on the LAN.
Back to top
View user's profile Send private message
Jon Wilder
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2011
Posts: 102
Location: Fresno CA

PostPosted: Sun Sep 06, 2015 3:07 pm    Post subject: Reply with quote

Most that I know who run servers usually designate the server machine as a server only and leave it running 24/7. So this shouldn't be an issue.

My server machine is a very minimal install. Command line Gentoo with only the necessary packages installed with a few goodies such as PCIUtils, Gentool Kit, Vim, Sudo, Apache, PHP, MySQL, Jail (for creating website only users), and Lynx.

I came to find that I prefer building against the pre-written Portage profiles, then using minus USE flags to take out support for what I don't need rather than building against minimal USE flags only to have issues because I didn't build with USE flags I didn't know I needed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum