User Tools

Site Tools


portage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

portage [2014/11/24 01:14] (current)
0.0.0.0 created
Line 1: Line 1:
 +====== 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 <​tt>​emerge --sync</​tt>​ and downloads of common packages.
 +
 +To use the local mirrors, set the following variables in <​tt>​make.conf</​tt>>​
 +{{File|/​etc/​make.conf|<​source lang="​bash">​
 +SYNC="​rsync://​gentoo-mirror.sihnon.net/​gentoo-portage"​
 +GENTOO_MIRRORS="​http://​gentoo-mirror.sihnon.net"​
 +</​source>​}}
 +
 +===== 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|<​source lang="​bash">​
 +#!/bin/sh
 +
 +/​usr/​bin/​emerge --sync >/​dev/​null
 +</​source>​}}
 +
 +{{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 <​tt>/​etc/​crontab</​tt>​ file instead of dropping a script in <​tt>/​etc/​cron.daily</​tt>​}}
 +
 +===== 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|<​source lang="​bash">​
 +#!/bin/sh
 +
 +emerge world --pretend --verbose --color n --columns --nospinner | mail -s "​Update check" security@sihnon.net
 +</​source>​}}
portage.txt · Last modified: 2014/11/24 01:14 by 0.0.0.0