Difference between pages "News:New OpenGL management in Funtoo" and "Install/pt-br/Profiles"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
(simplify, explain a bit more rationale)
 
 
Line 1: Line 1:
{{News
=== Profiles ===
|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 ===
Proprietary video drivers such as {{Package|x11-drivers/ati-drivers}} and {{Package|x11-drivers/nvidia-drivers}} provide non-standard versions of core OpenGL system libraries, Xorg server modules and OpenGL headers. Those drivers do not work correctly with libraries provided by mesa/Xorg. Funtoo makes it possible to install those drivers by moving the colliding files into dedicated subtrees. Afterwards, user can use {{Package|app-admin/eselect-opengl}} to switch between different library providers, therefore selecting the implementation matching video driver used.


Before, the system focused on exchanging the system libraries and headers by creating symlinks to the dedicated subtrees. This system caused a number of issues, most importantly:
Uma vez que você tenha reiniciado no Funtoo Linux, você pode mais tarde personalizar seu sistema para as suas necessidade ao usar o Funtoo Profiles.
* the packages were built against currently selected OpenGL implementation, resulting in inconsistencies between binary packages created on different Funtoo systems and causing build failures on some packages requiring newer OpenGL headers than ones provided by the selected implementation,
* the switching process was non-atomic and fragile. The user's system may have ended up with partially switched OpenGL implementation or dangling symlinks.


The new system provides a clear distinction between libraries and headers used at build-time, and libraries used at run-time. All packages are built consistently against the reference OpenGL implementation (mesa/Xorg), while user is allowed to override the implementation used at run-time. The overrides are done purely using system configuration.
[[Funtoo 1.0 Profile|Funtoo profiles]] são utilizados para padões para específico Portage para suas necessidades. Há 4 típicos básicos de perfil (profile types): arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:


=== Implementation ===
;arch: tipicamente <code>x86-32bit</code> ou <code>x86-64bit</code>, isso define o tipo de processador e suporte do seu sistema. Isso é definido quando seu stage foi construído e não deve ser alterado.
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.
;build: defines whether your system is a <code>current</code>, <code>stable</code> or <code>experimental</code> build. <code>current</code> systems will have newer packages unmasked than <code>stable</code> systems.
;flavor: defines the general type of system, such as <code>server</code> or <code>desktop</code>, and will set default USE flags appropriate for your needs.
;mix-ins: define various optional settings that you may be interested in enabling.


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.
One arch, build and flavor must be set for each Funtoo Linux system, while mix-ins are optional and you can enable more than one if desired.


{{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.
Remember that profiles can often be inherited. For example, the <code>desktop</code> flavor inherits the <code>workstation</code> flavor settings, which in turn inherits the <code>X</code> and <code>audio</code> mix-ins. You can view this by using eselect:


== Upgrade information ==
<console>
=== Automatic upgrade ===
(chroot) # ##i##eselect profile show
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.
Currently set profiles:
    arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
  build: gentoo:funtoo/1.0/linux-gnu/build/current
  flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde


For most of our users, a regular @world upgrade should be sufficient:
Automatically enabled profiles:
{{console|body=
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print
###i## emerge -vDu @world
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X
}}
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras
</console>


However, please make sure that FEATURES=collision-protect is '''not''' enabled during the world upgrade. It involves 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.
To view installed profiles:
<console>
(chroot) # ##i##eselect profile list
</console>


=== Manual upgrade ===
To change the profile flavor:
If one desires to perform the upgrade stand-alone (without upgrading other packages), he needs to pass all installed packages from the following list to emerge:
<console>
* app-admin/eselect-opengl,
(chroot) # ##i##eselect profile set-flavor 7
* app-emulation/emul-linux-x86-opengl,
</console>
* 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:
To add a mix-in:


<console>
<console>
# ##i##FEATURES=-collision-protect emerge -1nu app-admin/eselect-opengl media-libs/mesa x11-base/xorg-server x11-proto/glproto
(chroot) # ##i##eselect profile add 10
</console>
</console>
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.
{{NewsFooter}}

Revision as of 18:36, March 12, 2015

Profiles

Uma vez que você tenha reiniciado no Funtoo Linux, você pode mais tarde personalizar seu sistema para as suas necessidade ao usar o Funtoo Profiles.

Funtoo profiles são utilizados para padões para específico Portage para suas necessidades. Há 4 típicos básicos de perfil (profile types): arch, build, flavor, and mix-ins:

arch
tipicamente x86-32bit ou x86-64bit, isso define o tipo de processador e suporte do seu sistema. Isso é definido quando seu stage foi construído e não deve ser alterado.
build
defines whether your system is a current, stable or experimental build. current systems will have newer packages unmasked than stable systems.
flavor
defines the general type of system, such as server or desktop, and will set default USE flags appropriate for your needs.
mix-ins
define various optional settings that you may be interested in enabling.

One arch, build and flavor must be set for each Funtoo Linux system, while mix-ins are optional and you can enable more than one if desired.

Remember that profiles can often be inherited. For example, the desktop flavor inherits the workstation flavor settings, which in turn inherits the X and audio mix-ins. You can view this by using eselect:

(chroot) # eselect profile show
Currently set profiles:
    arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
   build: gentoo:funtoo/1.0/linux-gnu/build/current
  flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde

Automatically enabled profiles:
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras

To view installed profiles:

(chroot) # eselect profile list

To change the profile flavor:

(chroot) # eselect profile set-flavor 7

To add a mix-in:

(chroot) # eselect profile add 10