Upgrading Gentoo/ko

이 문서에서는 새 젠투 릴리즈가 기존의 설치 내용에 어떻게 영향을 주는지 설명합니다.

철학
젠투 바닥에서는 리눅스 세계의 일부와 비교했을때 업그레이드 과정의 개념이 약간 다릅니다. 프로그램 업그레이드를 함에 있어 "기존"의 방법으로 할 수 없다는 사실을 이미 알고 계실지도 모릅니다: 새 릴리즈를 기다렸다 다운로드 하고, 광학 매체에 구운 후 CD-ROM 에 넣고 다음 업그레이드 절차를 따릅니다.

아시는 바와 같이(젠투 사용자로서) 이 과정은 최선봉에서 살아남으려는 파워 유저에게 굉장한 좌절감을 심어줍니다. 다른 배포판의 파워 유저라도 아마 빠르고 빈번한 업데이트를 돕는 apt또는 apt-rpm같은 다양한 인기있는 도구가 주어져 있는 상황에서 느낌은 마찬가지일겁니다. 그러나 그 어떤 배포판이라 할지라도 젠투만큼 사용자의 요구를 만족하는건 없습니다. 일단 시작할 때부터 젠투 자체가 빠른 성장성 업데이트 개념을 기반으로 설계했기 때문입니다.

이상적으로 시스템을 어떻게 최신으로 유지하는지 설명하는 젠투 핸드북의 포티지 소개편의 절차를 따라 한번 설치를 해봤고 릴리즈에 시달리진 않았습니다. 이게 보통 하던 방식대로긴 하지만 가끔은 직접 핵심 시스템을 업데이트해야 할 때가 있습니다.

릴리즈와 프로파일
젠투 릴리즈 과정에 대해 자꾸 반복되는 질문중 하나가 "사용자로 하여금 프로그램을 업데이트 하도록 하는 것도 아닌데 왜 자꾸 새 릴리즈를 내놓는거죠?" 입니다. 여기에 대해 몇가지 이유가 있습니다:


 * 새 릴리즈라 함은 문제를 수정하고 기능을 더 추가한 설치 CD임을 의미합니다.
 * 새 릴리즈에는 GRP 꾸러미 최신 모음을 제공하여 사용자로 하여금 설치하는데 "가장 빠른 방법" (stage3 + 미리 컴파일한 꾸러미)을 따라가도록 하여 오래되지 않은 시스템으로 마무리 할 수 있도록 합니다.

새로운 비호환 기능을 포함한 릴리즈가 나오거나 시스템 전반적인 동작을 완전히 수정하는 핵심 꾸러미 모음 및 설정을 제공하는 경우 새 프로파일을 제공한다고 합니다.

프로파일이란 설정 파일의 모음이며, 시스템꾸러미를 고려한 이빌드, 기본 USE 플래그, 가상 패키지 기본 대입, 동작중인 시스템의 아키텍처에 대한 내용을 담고 있는의 하위 디렉터리에 저장되어 있습니다.

사용중인 프로파일은 심볼릭 링크가 결정하며, 프로파일 파일과 연결된 의 하위 디렉터리를 가리킵니다. 예를 들어 기본 x86 13.0 프로파일은 에 있습니다. 상위 디렉터리의 파일은 있는 그대로의 프로파일 일부입니다(그렇기 때문에 다른 하위 프로파일과 공유합니다). 이것이 우리가 중첩 프로파일 이라 부르는 이유입니다.

프로파일은 디렉터리에 기본으로 남아있으며, 나중에 새 프로파일로 인해 오래된 내용으로 방치됩니다. 이런 상황이 벌어지면 이름이 붙은 파일이 프로파일 디렉터리에 들어갑니다. 이 파일의 내용은 "업그레이드 해야 할" 프로파일의 이름입니다. 포티지는 새 프로파일로 업데이트 해야 할 때 자동으로 경고하려는 경우 이 정보를 사용합니다.

새 프로파일을 만드는덴 몇가지 이유가 있습니다. 이전 버전과 호환되지 않는 핵심 꾸러미의 새 버전 릴리즈일 경우, 기본 USE 플래그나 가상 대입을 바꾸는 경우, 시스템 전반적인 설정을 바꿔야 하는 경우가 있습니다.

프로파일을 바꾸지 않는 릴리즈
If a new Gentoo release does not include a new profile then you can safely pretend that it never happened. :)

If you update your installed packages as explained in the Gentoo Handbook, then your system will be exactly the same as one that has been installed using the new release.

프로파일을 바꾸는 릴리즈
If a release (such as 13.0 for x86) introduces a new profile, you have the choice to migrate to the new profile.

Naturally, you are not forced to do so, and you can continue to use the old profile and just update your packages as explained in the Gentoo Handbook.

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.

(굉장히) 오래된 시스템 업그레이드
가끔은 쉽게 업그레이드 하기에는 너무 오래되는 경우가 있습니다. 업그레이드 과정중에는 더이상 없는 (포티지 같은) 프로그램의 중간 버전이 필요하며, 단계별로 포티지 트리를 업데이트 해야 할 지도 모릅니다(예를 들어 점진적 트리 업데이트는 3~4개월마다 한 단계씩 이루어집니다).

이런 시스템을 업그레이드 하려면, 시스템을 업데이트할 때 사용할 최근 stage3를 사용하면 됩니다. 절차는오래된 시스템 업그레이드 장에 있습니다.

일반 절차
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:

2008.0, 2007.0, 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!

Acknowledgements
We would like to thank the following authors and editors for their contributions to this guide:


 * Gregorio Guidi
 * Chris Gianelloni
 * Joshua Saddler