Difference between revisions of "Gentoo Update Guide"

From Livedoc - The Documentation Repository
Jump to: navigation, search
(add other issues subsection)
(update keyword file path)
Line 35: Line 35:
 
</code>
 
</code>
  
This can be resolved by adding an appropriate entry into <code>/etc/portage/package.keywords/</code>. 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 <code>/etc/portage/package.keywords/binwalk</code>
+
This can be resolved by adding an appropriate entry into <code>/etc/portage/package.accept_keywords/</code>. 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 <code>/etc/portage/package.accept_keywords/binwalk</code>
 
<code>
 
<code>
 
   #This will keyword any testing versions of ssdeep and is preferred for most packages, especially if the parent is similarly keyworded
 
   #This will keyword any testing versions of ssdeep and is preferred for most packages, especially if the parent is similarly keyworded

Revision as of 15:42, 27 March 2015

Summary

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.

Preparation

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:

 emerge --sync

Software Updates

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.accept_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 /etc/portage/package.accept_keywords/binwalk

 #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

Error Example: 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

Other 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.

Cleaners

perl-cleaner

python-updater

haskell-updater

Preserved Rebuild

Depclean

revdep-rebuild

webapp-config

eclean