Upgrading Gentoo/es

Este documento explica cómo las nuevas versiones de Gentoo afectan a instalaciones ya existentes.

Filosofía
Aquí en la tierra de Gentoo, el concepto de actualización es muy distinto comparado al resto del mundo Linux. Probablemente ya sepa que nosotros no nos familiarizamos con el modo "clásico" de actualizar software: esperar una nueva versión, descargarla, grabarla, ponerla en el lector de CDROM y luego seguir las instrucciones de actualización.

Ya sabe (después de todo es un usuario de) que este proceso es extremadamente frustrante para aquellos usuarios avanzados que quieren tener su sistema siempre a la última. Seguramente incluso usuarios avanzados de otras distribuciones tengan la misma sensación, dada la popularidad y expansión de herramientas como apt o apt-rpm que hacen posible disponer de actualizaciones de forma rápida y frecuente. Sin embargo, ninguna distribución es más adecuada que Gentoo para satisfacer a este tipo de usuarios exigentes. Desde el principio Gentoo se diseñó en torno al concepto de actualizaciones rápidas e incrementales.

Lo ideal sería que instale una sola vez y no preocuparse de futuras versiones: simplemente seguir las instrucciones de la A Introducción a Portage en el Manual de Gentoo que explica cómo mantener su sistema al día. Aunque esa es la forma con la que normalmente funcionan las cosas, a veces los cambios se hacen en los paquetes base del sistema los cuales requieren de una actualización manual.

Versiones y perfiles
Una pregunta que se repite sobre el proceso de publicación de versiones de Gentoo es: "¿Por qué liberar nuevas versiones frecuentemente si no están pensadas para ofrecer a sus usuarios la actualización del software?". Hay varias razones:


 * Una nueva versión supone nuevos CDs de Instalación con errores corregidos y nuevas funcionalidades
 * Una nueva versión proporciona un conjunto actualizado de paquetes GRP, por lo que aquellos usuarios que elijan "el modo rápido" de instalación (stage3 + paquetes precompilados) terminarán con un sistema que no está pasado de moda
 * Por último, una nueva versión puede, de cuando en cuando, implementar algunas funcionalidades que no eran compatibles en versiones anteriores

Cuando una versión incluye nuevas funcionalidades anteriormente incompatibles o proporciona una serie de paquetes y configuraciones críticas que modifican intensamente el comportamiento del sistema, decimos que dicha versión ofrece un nuevo "perfil".

Un perfil (profile) es una serie de ficheros de configuración almacenados en un subdirectorio dentro de que definen cosas como los ficheros ebuild que se consideran paquetes system, los ajustes USE por defecto, el mapeo por defecto de los paquetes virtuales y la arquitectura en la que se ejecuta el sistema.

El perfil en uso se determina por el enlace simbólico el cual apunta a un subdirectorio dentro de  donde se almacenan todos los perfiles. Por ejemplo, el perfil por defecto de la versión 13.0 para x86 se puede encontrar en. Los ficheros del directorio precedente también forman parte del perfil (y, por lo tanto, se comparten entre diferentes subperfiles diferentes). Ésta es la razón por la que los llamamos perfiles en cascada.

Los perfiles anticuados se guardan en junto con los actuales pero marcados como obsoletos. Cuando eso sucede, se añade un fichero llamado dentro del directorio del perfil obsoleto. El contenido de este fichero es el nombre del perfil al cual debería "actualizarse". Portage emplea esta información para avisarle automáticamente cuando tenga que actualizar a un nuevo perfil.

Hay varias razones por la que se puede crear un nuevo perfil nuevo: la publicación de nuevas versiones de paquetes principales (como,  , o glibc ) que son incompatibles con versiones previas, un cambio en los ajustes USE por defecto o en la relación entre los paquetes virtuales y los paquetes utilizados, o tal vez un cambio en la configuración que afecta a todo el sistema.

Versiones sin cambios de perfil
Si se anuncia una nueva versión de Gentoo que no incluye un nuevo perfil entonces puede aparentar con seguridad que nunca ha ocurrido. :&#41;

Si actualiza los paquetes instalados [http://www.gentoo.org//doc/es/handbook/handbook-x86.xml?part=2&chap=1 como se explica en el manual de Gentoo], su sistema quedará exactamente igual que si hubiera reinstalado utilizando la nueva versión.

Versiones con cambio de perfil
Si una nueva versión (por ejemplo la 13.0 para x86) añade un perfil nuevo, tiene la posibilidad de migrar a ese nuevo perfil.

Naturalmente, no está obligado a hacerlo y puede continuar utilizando el perfil antiguo y actualizar únicamente sus paquetes como se explica en el manual de Gentoo.

However, Gentoo strongly recommends updating your profile if it becomes deprecated. When this happens, it means that Gentoo developers no longer plan on supporting it.

If you decide to migrate to the new profile, then you will have to manually perform the update. The way you update may vary significantly from release to release; it depends on how deep the modifications introduced in the new profile are.

In the simplest case you only have to change the symlink, in the worst case you may have to recompile your system from scratch while doing a neat voodoo dance. Migration is usually covered in the release notes. You can also find instructions further in this guide.

Supported profiles
You can view the list of profiles on your architecture officially supported by Gentoo developers when you  and then run the following command:

Upgrading from older systems
Some systems are too old to just switch the profile. Newer profiles might need more recent Portage versions or other software that cannot be installed anymore because the package definitions (ebuilds) for those older software versions are not available anymore.

If this is the case, the system should first receive older Portage tree snapshots and upgrade at least Portage (but preferably all packages in the system set), gradually increasing the Portage tree snapshot date until it is recent enough to follow the profile switching instructions again:

Older snapshots are often still available on some mirrors on the Internet or on specific locations dedicated for this purpose. It is recommended to verify the integrity of those files to make sure they are not tampered with:

Although the signing keys might be expired, the signature should still be ok.

Upgrading from (too) old systems
Sometimes, systems are too old to easily upgrade. The upgrade path might need intermediate versions of software (such as portage) that does not exist anymore, and you might need to update the portage tree in steps (for instance incremental tree updates with steps of 3 to 4 months).

To upgrade such systems, you can use a recent stage3 to update the system. Instructions for that are given in the Updating old systems section.

General instructions
First, run. The  utility will let you view and select profiles easily, without needing to create or remove symlinks by hand.

If you'd still prefer to change profiles manually, then simply do the following:

Updating to 2008.0, 2007.0, or 2006.1
If you intend to upgrade to these profiles, you should be aware that they expect the system to be set to a Unicode locale by default; specifically that UNICODE="yes" is set in. For this to work, you must have created a Unicode locale for your system to use. Please read the UTF-8 article to learn how to create the proper locale.

Alternatively, if you do not wish to set a locale, you should specify UNICODE="no" in, and re-emerge   (or wait until your next   update) with the   USE flag. You can set  just for  , or you can set it globally for all packages by adding it to your USE variable in.

Finally, follow the general upgrade instructions for updating your profile.

Updating to 2006.0
To switch to the 2006.0 profile, point the symlink to the new location. Make sure your Portage is updated before you change your profile.

alpha - Users that use a 2.4 kernel or don't want to use NPTL should use the default-linux/alpha/no-nptl profile. More information is available in the alpha release notes.

ppc - The merge of the ppc32 and ppc64 profiles went forward. The ppc32 profile has been changed in a way that offers a minimalistic generic profile for all purposes, located in default-linux/ppc/ppc32. The release-dependent profile is optimized for desktop-usage and located in default-linux/ppc/ppc32/2006.0. There are some subprofiles available for G3 and G4 processors, and G3/Pegasos and G4/Pegasos for the Pegasos Open Desktop Workstation. Make sure you choose the correct subprofile for your system when migrating to a 2006.0 profile.

sparc - Upgrading to the2.4 -kernel based 2006.0/2.4 profile requires manual user intervention (unmerging java stuff) and an  because of the gcc upgrade. Upgrading to the2.6 -kernel based 2006.0 profile which is not considered stable also requires an entry in to unmask a 2.6 version of   and a full rebuild.

All other archs - There are no fundamental changes in this profile. No specific action needs to be performed.

Updating to 2005.1
To switch to the 2005.1 profile, point the symlink to the new location. Make sure your Portage is updated before you change your profile.

All archs - There are no fundamental changes in this profile. No specific action needs to be performed.

ppc - With the 2005.1 release, the ppc and ppc64 profiles were merged and a number of subprofiles for specific subarchitectures were created. Make sure you choose the correct subprofile for your system when migrating to a 2005.1 profile.

Updating to 2005.0
With the introduction of 2005.0, several architectures have decided to define additional profiles. Make sure you read the description of said profiles before you decide to migrate to one of them. Most architectures now also default to the 2.6 kernel tree where 2.4 was chosen previously.

Some architectures require a bit more actions to be completed in order to convert from one profile to another. If that is the case, the step-by-step guides are linked from the table.

To switch to the selected profile, point the symlink to the new location. Make sure your Portage is updated before you change your profile!

If you are running a Linux 2.4-based system but want to migrate to a 2.6-based kernel, make sure you read our Gentoo Linux 2.6 Migration Guide.

Updating to 2004.3
With the introduction of the 2004.3 profiles, users are not going to see huge modifications of their systems (see below for details). However, Gentoo developers decided to push out this new profile and to deprecate quite a few of the old ones to speed up the adoption of stacked profiles, that is, the profiles that follow the new layout of the directory, for instance  (supported by Portage 2.0.51 or later).

To switch to the 2004.3 profile, point the symlink to the new location:

All archs - As said above, there are no big changes introduced in this profile. However, it should be noted that  and   are no longer considered system packages. This means that if you run, Portage will try to remove them from your system. If you need any of those packages, add them to after the profile switch, or manually emerge them.

ppc - is now the default instead of   for newly installed machines. This has no effect on already installed machines, though.

Updating Portage to Support Cascading Profiles
Although this section does not seem to integrate well in this upgrading guide, it is quite important. Any profile listed above this section requires a Portage version that supports cascading profiles. However, some obsoleted profiles don't allow the user to upgrade Portage or the user is using a profile that isn't available anymore - any attempt to upgrade Portage will result in a failure.

To work around this problem, users can set a temporary symbolic link to the obsolete profile, allowing them to upgrade their Portage after which they can continue with the upgrade procedure set forth in this guide. Please substitute  with your respective architecture:

Updating to 2004.2
To switch to the 2004.2 profile, point the symlink to the new location:

x86 - This profile changes the default X11 implementation from  to. This change only touches the default value, and is only relevant for those who have not installed an X server yet. If you already have one installed, then it will not affect you at all; you are free to switch from one X server to the other exactly as before.

amd64 - There are no fundamental changes from previous profiles, no specific action needs to be performed.

Updating to 2004.0
To switch to the 2004.0 profile, point the symlink to the new location:

All archs - There are no fundamental changes from previous profiles, no specific action needs to be performed.

Updating from profiles older than 1.4 to 1.4
The instructions for this upgrade are quite complex, you can find them here.

Idea of the upgrade
The idea with this upgrade approach is that we create an intermediate build chroot in which a recent stage3 is extracted. Then, using the tools available in the stage3 chroot we upgrade the packages on the live system.

Preparing the intermediate build chroot
Let's first create the intermediate build chroot location, say, and extract a recent stage3 archive into it.

Next, we create a mount point inside this chroot environment, on which we then bind-mount the live (old) environment.

So now the live (old) system is also reachable within. This will allow us to reach the live (old) system and update the packages even when chrooted inside the intermediate build chroot.

Network, Chroot and update
The new install needs to access the network, so copy over the network related information:

We now chroot into the intermediate build location, and start updating vital packages on the live system, until we can continue updating the live system from within the live system (rather than through the intermediate build chroot).

Now we start building packages onto the live system

Keep this chrooted session open and try to update the live system. When you hit failures, you can use this chrooted session to update packages using the build tools available in the intermediate build chroot (which includes recent glibc, gcc, etc.) Don't forget to prefix all  commands with   within the chroot!

Agradecimientos
Nos gustaría dar las gracias a los siguientes autores y editores por sus contribuciones a esta guía:


 * Gregorio Guidi
 * Chris Gianelloni
 * Joshua Saddler