====== Portage ====== [[Category:Gentoo]] ===== Local portage mirror ===== Both the portage tree, and the distfiles directory are shared from [[River]] to serve local machines needing to query public servers for emerge --sync and downloads of common packages. To use the local mirrors, set the following variables in make.conf> {{File|/etc/make.conf| SYNC="rsync://gentoo-mirror.sihnon.net/gentoo-portage" GENTOO_MIRRORS="http://gentoo-mirror.sihnon.net" }} ===== Regular sync ===== Syncing the portage tree just before installing something can be annoying, so it might be useful to keep your tree up to date automatically. If you have several local machines, it would be a good idea to set up a local mirror, to save bandwidth and to avoid abusing the public mirrors. Add the following script to your daily crontab directory: {{File|/etc/cron.daily/01-portage-sync| #!/bin/sh /usr/bin/emerge --sync >/dev/null }} {{Note|If you are setting up a local mirror, it might be worth scheduling the master machine's synchronisation earlier in the day, to ensure it is up to date before your client machines attempt to sync. You can do this by adding an entry to the /etc/crontab file instead of dropping a script in /etc/cron.daily}} ===== Regular update check ===== Another scheduled task which might be useful is a weekly check of which packages are outdated on your system. {{File|/etc/cron.weekly/02-update-check| #!/bin/sh emerge world --pretend --verbose --color n --columns --nospinner | mail -s "Update check" security@sihnon.net }}