Difference between pages "Install/fr/Portage" and "News:New OpenGL management in Funtoo"

< Install‎ | fr(Difference between pages)
(Introduction à Portage)
 
(example update command + explanation)
 
Line 1: Line 1:
=== Introduction à Portage ===
+
{{News
 +
|Summary=Funtoo is switching to an improved system for managing multiple OpenGL providers (Mesa/Xorg, AMD and nVidia). The update may involve blockers and file collisions.
 +
|News Format=Extended
 +
|News Category=Packages
 +
|Author=Mgorny
 +
|Publication Status=Draft
 +
|Publication Date=2015/02/28
 +
}}
 +
== New OpenGL management ==
 +
=== System principles ===
 +
The new OpenGL management design assumes that the reference OpenGL implementation (mesa/Xorg) is to be used to build packages. After switching to the new system, all packages will use the mesa/Xorg headers and link to the mesa/Xorg libraries. This improves portability of software built on Funtoo and solves some of the build failures when non-standard OpenGL provider was enabled.
  
{{PageNeedsUpdates}}
+
The third-party OpenGL libraries and modules provided by proprietary driver vendors can be enabled for run-time program use. They will not affect how the program is built. However, they will be loaded by the dynamic loader when starting executables. The Xorg server will also load the modules provided by blob driver vendor if appropriate.
  
Le système Portage assume la gestion des paquets. Sa principale commande se nomme <code>emerge</code>.  Elle remplit plusieurs fonctions dont la construction et l'installation des paquets à partir de sa source. Ce faisant, elle s'assure de l'installation de toutes les dépendances d'un paquet. Pour installer un paquet, vous lancez la commande ainsi:
+
=== Implementation ===
 +
The reference implementation (mesa/Xorg) packages install headers and libraries into standard system locations (/usr/include, /usr/lib*). The compiler and linker finds them using the usual rules and uses them.
  
<console>
+
The third-party OpenGL vendors install libraries and server extension modules into vendor-named subdirectories of /usr/lib*/opengl. Those files are not used directly.
(chroot) # ##i##emerge packagename
+
</console>
+
  
Quand vous installez un paquet en spécifiant son nom sur la ligne de commande, Portage l'enregistre dans le fichier <code>/var/lib/portage/world</code>.  En agissant ainsi, vous vous assurez que le paquet fait partie de votre système et qu'il sera mis à jour subséquemment. Tous les paquets se trouvant dans l'ensemble <code>world</code> seront mis à jour le cas échéant quand vous mettez à jour tout le système:
+
{{Package|app-admin/eselect-opengl}} is used to select OpenGL implementation used at run-time. The choice of implementation is controlled via dynamic linker configuration (ld.so.conf) and Xorg server configuration. If the reference implementation is selected, the eselect module outputs null configuration that causes the linker and server to use the standard paths. If an another implementation is selected, the configuration prepends /usr/lib*/opengl paths to linker and server configuration, causing them to prefer the third-party libraries over reference.
  
<console>
+
== Upgrade information ==
(chroot) # ##i##emerge --sync
+
=== Before upgrade ===
(chroot) # ##i##emerge -auDN @world
+
Please note that the OpenGL subsystem upgrade is a lock-step update involving file collisions and blockers. This means that a few packages need to be upgraded consecutively during a single emerge run, and during that process the OpenGL support may become temporarily broken. If the upgrade is interrupted, your system may require manual attention.
</console>
+
  
Ceci constitue la façon «officielle» de mettre à jour Funtoo Linux. Ci-haut, nous avons mis l'arbre Portage local à jour en le synchronisant avec celui du miroir et nous lançons ensuite la commande <code>emerge</code> afin qu'elle accomplisse la mise à jour des paquets de l'ensemble <code>world</code>. Les options demandent à <code>emerge</code> de:
+
Therefore, before upgrading please make sure that you can upgrade all the following packages, if installed:
 +
* x11-base/xorg-server to 1.16.4-r1 or newer,
 +
* media-libs/mesa to 10.3.4-r1 or newer,
 +
* x11-proto/glproto to 1.4.17-r1 or newer,
 +
* x11-drivers/ati-drivers to 14.9-r2 or newer,
 +
* app-emulation/emul-linux-x86-opengl to 20140508-r1 or newer.
  
* '''<code>a</code>''' - nous afficher la liste de tout ce qui sera mis à jour tout en nous laissant le choix de procéder ou non ('''ask''');
+
If you need to use an older version of one of those packages long-term, please report a bug so that we can backport the support for the new system to it.
* '''<code>u</code>''' - mettre à jour les paquets s'il y a lieu mais sans les installer à nouveau quand ils le sont déjà;
+
* '''<code>D</code>''' - effectuer une mise à jour en profondeur en considérant l'arbre des dépendances des paquets
+
* '''<code>N</code>''' - mettre à jour les paquets dont les paramètres USE ont changé.
+
  
On peut aussi à l'occasion inclure la mise à jour de toutes les dépendances par l'ajout de l'argument <code>--with-bdeps=y</code> à la ligne de commande. Si on souhaite cette forme de mise à jour à chaque fois que nous mettons à jour <code>world</code>, il suffit d'ajouter l'option au fichier <code>/etc/portage/make.conf</code>:
+
Additionally, please make sure to not enable FEATURES=collision-protect for the upgrade since it will involve replacing some of externally created symlinks with package files. FEATURES=protect-owned (enabled by default) is fine. If you don't want to disable FEATURES=collision-protect world-upgrade-wide, please see below for manual upgrade method.
  
{{file|name=/etc/portage/make.conf|body=
+
=== The upgrade process ===
# Maximum de compilations incluant dependances
+
Normally, the upgrade should be performed as part of a regular @world upgrade.
  
EMERGE_DEFAULT_OPTS="--jobs 5 --load-average 5 --with-bdeps y"}}
+
However, if one desires to perform the upgrade stand-alone, he needs to pass all installed packages from the following list to emerge:
 +
* app-admin/eselect-opengl,
 +
* app-emulation/emul-linux-x86-opengl,
 +
* media-libs/mesa,
 +
* x11-base/xorg-server,
 +
* x11-drivers/ati-drivers,
 +
* x11-proto/glproto.
  
Il arrive parfois des situations où nous ne voulons pas ajouter un paquet à l'ensemble <code>world</code> lors de son installation:
+
For example, the following command may be used to commence a manual update:
 
+
* Nous voulons l'installer temporairement;
+
* Il s'agit simplement d'une dépendance d'un autre paquet;
+
* Nous ne voulons pas que le paquet soit automatiquement mis à jour en même temps que le système.
+
 
+
On installera alors le paquet de cette manière:
+
  
 
<console>
 
<console>
(chroot) # ##i##emerge --oneshot packagename
+
# ##i##FEATURES=-collision-protect emerge -1nu app-admin/eselect-opengl media-libs/mesa x11-base/xorg-server x11-proto/glproto
 
</console>
 
</console>
  
{{Note|'''--oneshot''' peut s'abréger '''-1'''. C'est le chiffre '''un'''. Il y a un wiki sur la commande [[Emerge|emerge]].}}
+
Explanation:
 +
# <tt>FEATURES=-collision-protect</tt> will ensure that Portage can replace the symlinks created by old versions of eselect-opengl with real libraries.
 +
# ''-1'' will ensure that none of intermediate packages end up in @world, causing issues in the future,
 +
# ''-n'' will prevent Portage from unnecessarily rebuilding packages that were upgraded already,
 +
# ''-u'' will cause Portage to upgrade the remaining packages.
  
==== Mise à jour du système ====
+
=== Post upgrade ===
 
+
There should be no manual steps needed after the upgrade. The currently selected OpenGL implementation will be activated automatically.
Profitons de l'occasion pour mettre à jour tout le système. D'autant plus que cela s'avère une très bonne idée que de le faire avant le premier démarrage de Funtoo Linux.
+
 
+
<console>
+
(chroot) # ##i##emerge --sync
+
(chroot) # ##i##emerge --ask --update --deep --newuse @world
+
</console>
+
  
{{Important|Soyez attentif aux messages émis à la fin de la mise à jour. Suivez à la lettre les instructions données. C'est particulièrement vrais si <code>perl</code> ou <code>python</code> est mis à jour.}}
+
{{NewsFooter}}

Revision as of 12:12, March 1, 2015

New OpenGL management in Funtoo

Funtoo is switching to an improved system for managing multiple OpenGL providers (Mesa/Xorg, AMD and nVidia). The update may involve blockers and file collisions.

By Mgorny / February 28, 2015

New OpenGL management

System principles

The new OpenGL management design assumes that the reference OpenGL implementation (mesa/Xorg) is to be used to build packages. After switching to the new system, all packages will use the mesa/Xorg headers and link to the mesa/Xorg libraries. This improves portability of software built on Funtoo and solves some of the build failures when non-standard OpenGL provider was enabled.

The third-party OpenGL libraries and modules provided by proprietary driver vendors can be enabled for run-time program use. They will not affect how the program is built. However, they will be loaded by the dynamic loader when starting executables. The Xorg server will also load the modules provided by blob driver vendor if appropriate.

Implementation

The reference implementation (mesa/Xorg) packages install headers and libraries into standard system locations (/usr/include, /usr/lib*). The compiler and linker finds them using the usual rules and uses them.

The third-party OpenGL vendors install libraries and server extension modules into vendor-named subdirectories of /usr/lib*/opengl. Those files are not used directly.

Eselect (OpenGL) is used to select OpenGL implementation used at run-time. The choice of implementation is controlled via dynamic linker configuration (ld.so.conf) and Xorg server configuration. If the reference implementation is selected, the eselect module outputs null configuration that causes the linker and server to use the standard paths. If an another implementation is selected, the configuration prepends /usr/lib*/opengl paths to linker and server configuration, causing them to prefer the third-party libraries over reference.

Upgrade information

Before upgrade

Please note that the OpenGL subsystem upgrade is a lock-step update involving file collisions and blockers. This means that a few packages need to be upgraded consecutively during a single emerge run, and during that process the OpenGL support may become temporarily broken. If the upgrade is interrupted, your system may require manual attention.

Therefore, before upgrading please make sure that you can upgrade all the following packages, if installed:

  • x11-base/xorg-server to 1.16.4-r1 or newer,
  • media-libs/mesa to 10.3.4-r1 or newer,
  • x11-proto/glproto to 1.4.17-r1 or newer,
  • x11-drivers/ati-drivers to 14.9-r2 or newer,
  • app-emulation/emul-linux-x86-opengl to 20140508-r1 or newer.

If you need to use an older version of one of those packages long-term, please report a bug so that we can backport the support for the new system to it.

Additionally, please make sure to not enable FEATURES=collision-protect for the upgrade since it will involve replacing some of externally created symlinks with package files. FEATURES=protect-owned (enabled by default) is fine. If you don't want to disable FEATURES=collision-protect world-upgrade-wide, please see below for manual upgrade method.

The upgrade process

Normally, the upgrade should be performed as part of a regular @world upgrade.

However, if one desires to perform the upgrade stand-alone, he needs to pass all installed packages from the following list to emerge:

  • app-admin/eselect-opengl,
  • app-emulation/emul-linux-x86-opengl,
  • media-libs/mesa,
  • x11-base/xorg-server,
  • x11-drivers/ati-drivers,
  • x11-proto/glproto.

For example, the following command may be used to commence a manual update:

# FEATURES=-collision-protect emerge -1nu app-admin/eselect-opengl media-libs/mesa x11-base/xorg-server x11-proto/glproto

Explanation:

  1. FEATURES=-collision-protect will ensure that Portage can replace the symlinks created by old versions of eselect-opengl with real libraries.
  2. -1 will ensure that none of intermediate packages end up in @world, causing issues in the future,
  3. -n will prevent Portage from unnecessarily rebuilding packages that were upgraded already,
  4. -u will cause Portage to upgrade the remaining packages.

Post upgrade

There should be no manual steps needed after the upgrade. The currently selected OpenGL implementation will be activated automatically.

blog comments powered by Disqus