|
|
发表于 2005-12-26 17:50:33
|
显示全部楼层
http://www.gentoo.org/news/en/gwn/20051212-newsletter.xml
http://dev.gentoo.org/~spyderous ... modular_x_howto.txt
New virtual package style increases Portage flexibility
With GLEP 37, virtuals are actual packages (located in the virtual/ category) instead of being mentioned in the 'virtuals' file in profiles/. This gives us more flexibility regarding their syntax. For example we can now specify an order of preference for virtual providers instead of just a single default versus everything else.
The first adopter of GLEP 37 is the X team, with virtual/x11. Although there were some temporary issues with switching to the new virtual type, everything's resolved and seems to work quite well. This lets us only allow xorg-x11-6.8.x to fulfill virtual/x11 and force modular X users to have completely specified dependencies.
Modular X users will want to add a line to /etc/portage/profile/virtuals until contributors port all the packages on their systems to modular X:
Code Listing 2.1: Insert line for modular X
virtual/x11 x11-base/xorg-x11
Note: If you'd like to help with the porting efforts, see the modular X porting HOWTO. But first, you'll need to convert your system to modular X. Please file bugs only to the package maintainers with patches for modular X dependencies, not to x11@gentoo.org.
Migrating to modular X HOWTO
Donnie Berkholz
Joshua Baergen
To keep old packages from getting in the way, we're going to clean out all the
old xorg-x11 cruft before installing modular X. This isn't absolutely crucial,
but it will help ensure a smooth migration.
First step: clean out your old X
--------------------------------
Before you start, make sure you have a package of the old, monolithic xorg-x11
built with USE=dlloader if the dlloader flag was available in that version. It's
not available in >=6.8.99.15.
# emerge gentoolkit
# quickpkg xorg-x11
Get rid of the monolithic installation:
# emerge -Ca xorg-x11
# rm -rf /usr/lib/opengl/xorg-x11
# rm -rf /usr/lib/libGL*
You definitely want a backup copy of the monolithic xorg-x11 so you can mix and
match parts if desired.
The later steps are helpful in getting rid of symlinks created by opengl-update.
If your /usr/X11R6 isn't a symlink to /usr, delete it and start from scratch.
But first, save a list of all the packages installing there.
# if [[ ! -L /usr/X11R6 ]]; \
then equery belongs /usr/X11R6 > usr-x11r6-packages \
&& rm -rf /usr/X11R6; fi
Second step: Installing modular X
---------------------------------
First, add the required packages to /etc/portage/package.unmask. Open
/usr/portage/profiles/package.mask in your text editor of choice, then copy and
paste the full modular X mask over to package.unmask. Do the same with
package.keywords if you're running stable.
For direct rendering, you'll want to activate the "dri" USE flag.
Now, install the metabuild. This will install the server and popular
applications, giving you a working desktop implementation of X:
# emerge xorg-x11
Note that this install tries to be rather minimal, so things like
xcursor-themes are not installed by default.
Next, install some drivers. This will vary depending on your input and video
hardware, so take a look in /usr/portage/x11-drivers/. Here's a sample:
# emerge xf86-input-mouse xf86-input-keyboard xf86-video-ati
NOTE: With modular installed, external drivers such as nvidia-glx and wacom
as well as some vnc apps may not work if they install things to
/usr/lib/modules instead of /usr/lib/xorg/modules. Many of these will have
modular X detection added to the installation process and thus will need
to be re-merged after modular X install.
Third step: Caveats
-------------------
* 'emerge -u world' wants to install xorg-x11
This is because the tree isn't fixed for modular dependencies yet.
You can help the porting effort by reading
http://dev.gentoo.org/~spyderous ... modular_x_howto.txt
and filing bugs with patches to the individual package maintainers. The
maintainers will be listed in metadata.xml in the same directory as the
package, and the 'herdstat' package will speed up querying for them.
* Make sure your xorg.conf doesn't list ModulePath, because this directory
changed from /usr/lib/modules to /usr/lib/xorg/modules.
* Driver problems
I've had reports that:
ati won't start X
But it works fine on my FireGL 8800
Resolved by moving /usr/lib/xorg/modules/multimedia
out of the way
vesa locks up box with an mga card
vga produces a very weird-looking screen, divided into quarters
* The trap module will give errors on starting X, because the
modular xorg-server doesn't build it yet. You may want to copy it over
from your old X installation.
* Getting glxinfo/glxgears
The best way to deal with this is undecided by upstream so far, so
there's an ebuild in my overlay contributed by cardoe. Alternately,
you can build them by hand.
Option 1: http://dev.gentoo.org/~spyderous/overlay/x11-misc/glx-utils/
I'm not going to tell you how to use an overlay, so if you don't know
and are too lazy to read the docs, use option 2.
Option 2: Build by hand
# emerge freeglut
# tar zxvf /usr/portage/distfiles/Mesa-6.3.1.1.tar.gz
# cd Mesa-6.3.1.1/configs
# ln -s linux-dri-x86 current
# cd ../progs/xdemos
# make glxinfo
# make glxgears
# cp glxinfo glxgears /usr/bin/
To get some debugging info from glxinfo to help in getting direct
rendering working:
# LIBGL_DEBUG=verbose glxinfo
* Mouse protocol autodetection
If you have Protocol "auto" set in xorg.conf for your mouse, it may not
work. You may need to specify Protocol "ExplorerPS/2" or "IMPS/2" for
your wheel to work.
* Where are imake/xmkmf?
There are now in the tree. However, gccmakedep is not modularized yet
and thus the imake build system is still broken for some packages.
* Everything in /usr/lib/xorg disappeared!
Remerge >=xorg-server-0.99.1-r4. This was a temporary bug in the ebuild
that resulted in deletion after removal of a package. Instead,
/usr/lib/xorg should have only been deleted when no xorg-server remained on the system.
* gdm/kdm don't work
If you installed modular X on a fresh Gentoo installation, you may not have
a /usr/X11R6 -> /usr symlink. Try creating one; no ebuild does yet.
You can help get things out of /usr/X11R6 by fixing the packages that do it
and filing bugs. |
|