Instruções para Atualização

From Funtoo
< Upgrade Instructions
Revision as of 18:15, September 19, 2018 by Kyetoy (talk | contribs) (Created page with "Agora, você deve ter um sistema ainda em funcionamento, mas com todos os pacotes "extras" removidos. Agora é hora de atualizar os pacotes que permaneceram.")
Jump to navigation Jump to search
Other languages:
English • ‎português do Brasil

Template:Importante

Estas instruções irão guiá-lo através do processo de atualização do seu sistema do Funtoo Linux 1.0 para 1.2. Primeiro, por favor, certifique-se de ter criado uma cópia de segurança (backup) do seu sistema. Se você optar por continuar sem uma cópia de segurança, então você está assumindo o risco de ter seu sistema quebrado e lidar com conserto ou ainda precisar de uma reinstalação completa. Embora estas etapas de atualização sejam bastante robustas, serão removidos pacotes que aparentemente não são mais utilizados em seu sistema, e embora todas as precauções sejam tomadas para evitar a quebra de outros pacotes, em alguns casos especiais isso pode resultar na remoção de pacotes que você realmente precisa. Tipicamente isso não acontecerá, mas, como essa possibilidade existe, é melhor estar preparado para essa possibilidade, particularmente em sistemas críticos.

Agora, edite seu arquivo / var / lib / portage / world. Procure por campos do tipo catpkgs (ou seja, "category / packagename") que você não usa mais ou não precisa no seu sistema e remova-os. Considere também os pacotes que você pode ter instalado com --oneshot que não estão no arquivo world mas deveriam estar, e adicione-os. O sistema Portage usará / var / lib / portage / world como uma lista principal de pacotes que devem estar ativados em seu sistema. Vamos agora olhar para a limpeza de quaisquer pacotes desnecessários que não estejam no conjunto de @world. Iremos remover esses pacotes por alguns motivos. Primeiro, eles não serão atualizados com uma atualização do @world. Segundo, porque eles não estão incluídos no @world, eles podem estar desatualizados e ter dependências antigas e problemáticas que podem dificultar a nossa atualização, uma vez que o portage não vai querer "quebrar" as dependências desses pacotes órfãos. Terceiro, quando fazemos um emerge @ preserved-rebuild, podemos acabar reconstruindo pacotes que não precisamos. Portanto, remover pacotes desnecessários é uma boa ideia por todas essas razões.

   Note
Você pode estar se perguntando - quais são esses pacotes no meu sistema que não fazem parte do conjunto do @world? Eles podem ser várias coisas. Primeiro, eles poderiam ser dependências de construção para certos pacotes. Eles podem ser antigos slots de pacotes que você já usa - por exemplo, uma versão antiga do PHP. Eles também podem ser pacotes que eram dependências de certos pacotes, mas não são mais necessários para esses pacotes - possivelmente devido a alterações nos sinalizadores (flags) utilizadas em  USE. Geralmente, os pacotes virtuais fazem parte desse grupo de pacotes e geralmente é seguro remover os pacotes virtuais. Eles ressurgirão (re-emerged) no futuro se forem referenciados por um ebuild.

Execute o seguinte comando e revise cuidadosamente sua saída. Não diga "y" neste ponto:

root # emerge -p --depclean --ignore-soname-deps=n
   Note
A opção - ignore-soname-deps = n impedirá que pacotes que forneçam bibliotecas necessárias sejam removidos, mesmo que eles pareçam "órfãos". Essa é uma medida de segurança adicional ao limpar dependências em seu sistema.

Agora, revise a lista de pacotes que serão removidos. Veja se alguma coisa que você precise não está nesta lista. Isso indicaria que você precisa adicionar o cat / pkg para / var / lib / portage / world antes de continuar. Quando a lista estiver OK, digite:

root # emerge -a --depclean  --ignore-soname-deps=n

... e digite "y" [enter] para remover pacotes antigos.

Agora, você deve ter um sistema ainda em funcionamento, mas com todos os pacotes "extras" removidos. Agora é hora de atualizar os pacotes que permaneceram.

Now you will want to run ego sync and upgrade to the latest ego-2.4.x series available.

root #  ego sync
root #  emerge -v1 ego

If you have difficulty satisfying deps for it for whatever reason, the following should work:

root #  emerge -v1 --nodeps ego

If you still cannot merge using emerge, the following should work:

root #  cd /var/git/meta-repo/kits/core-kit/app-admin/ego
root #  ebuild ego-2.4.2.ebuild merge

Once the new ego is merged, edit your /etc/ego.conf to look like this:

   /etc/ego.conf
[global]

release = 1.2

Now, run the following steps as root.

root # ego sync

This will activate the new 1.2 kits. Now, time to start upgrading:

root # emerge -u1 gcc

This will upgrade gcc.

This is an ideal time to review the subarch setting of your Funtoo Linux installation. Funtoo Linux 1.2 now has optimizations available for 5th and 6th-generation Intel Core processors, as well as Ryzen processors. View your current subarch, as well as available subarches, by typing the following command:

root # ego profile list subarch

=== subarch: ===

    amd64-bulldozer, amd64-excavator, amd64-jaguar, amd64-k10
    amd64-k8, amd64-k8+sse3, amd64-piledriver, amd64-steamroller
    amd64-zen, atom_64, btver1_64, core-avx-i, core2_64, corei7
    generic_64, intel64-broadwell, intel64-haswell, intel64-ivybridge
    intel64-nehalem, intel64-sandybridge, intel64-silvermont, intel64-skylake
    intel64-westmere*, native_64, nocona, opteron_64, xen-pentium4+sse3_64

root #

If desired and supported by your CPU, you can now update your subarch to a more optimized subarch for your hardware. The new subarch profiles available are:

  • intel64-skylake - Optimized for Intel Core 6th Generation Processors (see intel64-skylake for more info.)
  • intel64-broadwell - Optimized for Intel Core 5th Generation Processors (see intel64-broadwell for more info.)
  • amd64-zen - Optimized for AMD Ryzen Processors.

Use the lscpu command to view information about your CPU and do a web search for its name to determine what generation CPU it is. Then, the system's subarch can be changed as follows:

root # ego profile subarch intel64-skylake
=== Enabled Profiles: ===

        arch: x86-64bit
       build: current
     subarch: intel64-skylake
      flavor: core

>>> Set subarch to intel64-skylake.
root ##b##Updating profiles at /etc/portage/make.profile/parent...

root #

Now that we have ensured that we have an optimal subarch set for your system, it's time to begin the process of rebuilding critical packages with the new compiler. We will start with glibc. Enter the following command:

root # emerge -u1 glibc libnsl libtirpc rpcsvc-proto

Glibc and its dependencies/related packages will now be upgraded.

Since moving to 1.2 also includes moving to python-3.6, perform the following steps:

root # emerge -u1 =dev-lang/python-3.6*
root # emerge -C =dev-lang/python-3.4*

This will ensure that we have python-3.6 ready and installed, and the older python-3.4 removed. Removing python-3.4 is important to ensure that python modules upgrade properly.

Some packages rely on a current ruby being available on the system, and having stale versions on your system can cause problems. To remove these from your system, run:

root # emerge -C \<=dev-lang/ruby-2.3.0

For upgrading to 1.2, you have to rebuild all packages, which will ensure that your system is fully optimized with the new gcc.

   Note

Include the --jobs=3 (or higher number) option as a parameter to the emerge command if you have sufficient RAM and CPU cores to build several packages in parallel.

Here is what you need to run:

root # emerge --emptytree -a @world

This will fully rebuild all packages on your system. It will take a lot of time, but will ensure everything is freshly rebuilt. Once completed successfully, this will result in an up-to-date system, with potentially better-optimized binaries, benefiting from more recent gcc improvements.

   Note

If the preceding command fails, you should run 'emerge -uDN1 --keep-going @world' to ensure that all dependencies are fully resolved and rebuilt, then run the 'emerge --emptytree -a @world' command again to ensure that every package is rebuilt with the new gcc compiler.

Finally, you will want to either run etc-update or dispatch-conf:

root # etc-update

If your kernel has been upgraded, make the necessary changes to /etc/boot.conf to make the new kernel the default, and then re-run boot-update:

root # boot-update

Now is a good time to perform a pre-check of any packages that have been installed that may require configuration file updates. One notable example is php-fpm -- you may need to perform the following steps if your system uses php-fpm:

root # cp /etc/php/fpm-php-7.1/php* /etc/php/fpm-php-7.3/php*

This will ensure that the settings you use for the previously-installed version of php-fpm will be applied to the current version.

   Note

If you find any other packages that need similar manual steps post-upgrade, please document them here for the benefit of others! Thanks.

At this point, the migration to 1.2 should be complete. At a convenient time, reboot your system, and perform a thorough check of all services to ensure they have started correctly:

root # reboot

After reboot:

root # rc-status

Now, perform a final check of any production services to ensure that they are operating properly, by loading web pages, sending test emails, etc.

At this point, you are now upgraded to Funtoo Linux 1.2! Please report any bugs to https://bugs.funtoo.org and let us know of any issues you experience, either as part of the upgrade, related to dependencies, or related to functionality on your upgraded system.