Gentoo Update Guide
- 1 Summary
- 2 Preparation
- 3 Portage Tree Update
- 4 Software Updates
- 5 Cleaners
- 6 Preserved Rebuild
- 7 Depclean
- 8 revdep-rebuild
- 9 webapp-config
- 10 eclean
This article will cover the basic process for updating a CSL System running Gentoo Linux. This does not cover kernel updates which are generally handled separately.
You will need root access to the system you are planning to update. You should also schedule appropriate downtime when updating production services.
Portage Tree Update
The portage tree contains all of the packages and versions available to the system. It (and any installed overlays) will need to be updated prior to updating the system software. On CSL systems, this can easily be done with the following command:
Updating all installed software on a Gentoo system is done with the following command:
emerge -auND @world
This command will probably think for quite a long time and then spit out a (potentially long) list of updates it wishes to apply. Review the list looking for any potential surprises (in particular, updates for major system software such as Apache or Nginx on a webserver) and if needed look for release notes to ensure that your upgrade will go smoothly. When you are ready to apply the updates, enter 'yes' and hit enter.
Resolving Keywording Issues
Occasionally package updates will require additional packages keyworded as new dependencies. These will generally be indicated by errors such as the following in the output of
emerge -auND @world
!!! The following update has been skipped due to unsatisfied dependencies: app-misc/binwalk:0 !!! All ebuilds that could satisfy "app-crypt/ssdeep" have been masked. !!! One of the following masked packages is required to complete your request: - app-crypt/ssdeep-2.12::gentoo (masked by: ~amd64 keyword) - app-crypt/ssdeep-2.11.1::gentoo (masked by: ~amd64 keyword) - app-crypt/ssdeep-2.10::gentoo (masked by: ~amd64 keyword) (dependency required by "app-misc/binwalk-2.0.1" [ebuild])
This can be resolved by adding an appropriate entry into
/etc/portage/package.keywords/. On most systems this is a directory and keywords are put into a file for the package that they are required by. So for the above example, we would add one of the following lines to
#This will keyword any testing versions of ssdeep and is preferred for most packages, especially if the parent is similarly keyworded app-crypt/ssdeep #This version will only keyword a specific version of ssdeep and is preferred for system packages or anytime a specific version is desired. =app-crypt/ssdeep-2.12
Use Flag Issues
emerge: there are no ebuilds built with USE flags to satisfy "app-crypt/qca:2[openssl]".
!!! One of the following packages is required to complete your request: - app-crypt/qca-2.0.3-r1::gentoo (Change USE: +openssl) (dependency required by "kde-base/kdeplasma-addons-4.14.3" [installed]) (dependency required by "kde-base/kde-meta-4.14.3[-minimal]" [installed]) (dependency required by "@selected" [set]) (dependency required by "@world" [argument])
Package Masking Issues
You may occasionally encounter problems not detailed here. This is frequently the case when a system is significantly out-of-date. Dealing with these errors is frequently a combination of experience and trail/error. Feel free to ask other Sysadmins or Alumni for help with the error. In most cases, you will have to update the system in pieces in order to complete the update.