Topic: xorg 7.x upgrade on FreeBSD
IMPORTANT NOTE
This was written quite awhile back, when xorg-7.x was still in testing. The ports tree has now been upgraded, so all the things about git can be ignored--I believe that git ports tree has been removed, if not, it will be very shortly.
Secondly, with the merging of xorg-7.2 into the ports tree, there are many people having various problems. The repeated advice of those very knowledgeable about it, e.g., Kris and Florent who have spent A LOT of effort to make the upgrade as smooth as possible, is to install the xorg metaport.
The downside of that is that it will install many packages that you don't want or need, including all drivers and the entire xorg-apps collection. /usr/ports/UPDATING now has a complete and updated section on doing the upgrade.
As all my FreeBSD boxes have been running xorg-7.x for some time, I haven't been able to test if the instructions that I have below are still good. I suspect that it would still work, but I honestly don't know, and I repeat--the advice of the two people that have spent the most amount of time in testing it, is to install the xorg metaport.
I would be very grateful for anyone who tries this method now (as of 26 May, 2007) to post their success or failure. If it succeeds, it's definitely less complex than the instructions in /usr/ports/UPDATING.
NEW UPDATE
I tried this method on a fresh install, using the 200705 STABLE Snapshot. I did a fresh install of 6.2, then did portsnap fetch extract and used this method. It worked.
I suppose that since this is FreeBSD specific, it could go into the FreeBSD section, but as we're all friends here, the heck with it.
This has been tested on both fresh installs and upgrades, on both CURRENT and PRERELEASE.
A few links first.
The xorg team has a wiki with their method (which was the starting point for this, but theirs is quite conservative, rightfully so, they don't want you to break your system.)
http://wikitest.freebsd.org/ModularXorg
Dru has a blog with her method at
http://blogs.ittoolbox.com/unix/bsd/arc ebsd-13661
She was also nice enough to post a link to collection of packages for 6.x, which could be used instead of ports.
http://mayday.xbsd.org/tb/packages/6-r-i386-xorg/All/
I suspect that both of these links are also now rather outdated.
I used to have instructions on using git to pull down the xorg 7.x ports tree. However, the xorg-7.2 ports have been merged into the normal ports tree, so one can simply first update their ports tree with portsnap fetch extract.
Let's start with a fresh install. If this is the case, it's worthwhile to add
X11BASE=/usr/localto /etc/make.conf. (Create /etc/make.conf if it doesn't exist).
portinstall xorg-libraries
portinstall xorg-fonts-truetype xorg-fonts-type1 xorg-fonts-cyrillic xorg-fonts-100dpi xorg-fonts-75dpi xorg-fonts-miscbitmapsAll the xorg fonts should be typed on one line, I divided it for ease of reading.
portupgrade font-util libXpmIf either of those aren't installed, then install them rather than upgrade them.
(Note--on a fresh install, libXpm was installed with xorg-libraries. I forgot to make a note on whether font-util was already installed or not., sorry.)
cd /usr/ports/x11/xauth; make install clean
cd ../xinit; make install cleanThese next two are optional--most people use xterm and twm is always handy as a fallback window manager.
cd /usr/ports/x11/xterm; make install clean
cd ../twm; make install cleanNote that all these ports are pulling in various other things. Unlike xorg-6, which was monolithic, xorg-7 is modular--so instead of an xorg-fonts-75dpi, you'll see it installing adobe-75dpi, etc etc. As Dru points out, the old xorg was something like 9 packages whereas the new one is over 300 (but they're smaller.) ![]()
cd /usr/ports/x11-servers/xorg-server; make install cleanThere is a possibility this might fail. If it does then do the following
mkdir -p /var/lib/xkb(It might be worth doing that in advance, actually, it won't hurt anything.)
The xorg-server port is probably going to pull in xkeyboard-config. If xkeyboard-config fails then first do
mv /usr/local/share/X11/xkb /usr/local/share/X11/xkb.oldand reinstall xkeyboard-config
The xkb stuff was written during the testing period. On the latest fresh install, I didn't have a problem.
NOTE: The above assumes that you followed my advice in adding X11BASE=/usr/local to /etc/make.conf. If you didn't that /usr/local/share/X11 directory will be in /usr/X11R6/share
Anyway, back to our install
cd /usr/ports/x11-drivers/xf86-input-mouse; make install clean
cd ../xf86-input-keyboard; make install clean
cd ../xf86-video<your_video_driver>; make install cleanThe <your_video_driver> refers to whatever driver or drivers you use. I've found though, that I didn't have to install the xf86-video-vwmare driver, vmware's video works anyway. You might also install xf86-video-vesa as a backup. In my case though (xf86-video-mga on one machine, via on another, ati on a third and i810 on a fourth, I haven't found it necessary.)
If you're not using nvidia drivers then next
/usr/ports/graphics/libGL; make install clean
cd ../libglut; make install cleanIf either of these are already installed, do portupgrade -f. Probably unnecessary but doesn't take long.
You will also want, if no other port has pulled it in, xkbcomp. If you don't put that in, things will work, but you'll find various things missing--for example, without it, I had to manually set the MS Logo key to Mod4,
the | key (pipe) didn't work properly, etc.
cd /usr/ports/x11/xkbcomp
make install cleanLastly, you need font-alias or you might get that error default font fixed not found
cd /usr/ports/x11-fonts/font-alias; make install cleanThen configure X as you normally would and you're on your way. The only thing to note is that if you have put X11BASE as /usr/local, the default xorg.conf file created by X -configure or xorgconfig might still have font and/or module paths of /usr/X11R6 rather than /usr/local. Also, the wiki mentions that you might have to fix your ModulePath. (I'm not sure what the default would be if this was a fresh install. The wiki gives the path of
/usr/X11R6/lib/xorg/modulesIf you set X11BASE as /usr/local, you'll have to change that to /usr/local/lib/xorg/modules
Upgrading is similar but of course, there are some differences. After downloading the latest ports
for i in $(pkg_info -Ex xorg- | grep -v linux) ; do pkg_create -b $i;
doneI'd put them in /usr/ports/packages/All since that's where pkg_add and portupgrade often look. You might have to create /usr/ports/packages/All
The above backs up your old xorg stuff in case something goes wrong.
pkg_delete xorg-6.9.0
pkg_delete -x xorg-printserver xorg-nestserver xorg-manpages xorg-documents
pkg_deinstall -fP xorg-libraries
portinstall xorg-libraries
pkgdb -FThere's an incorrect dependency that has to be fixed, this is the reason for the pkgdb -F command. I forget which it is, the wiki link above mentions one, but it's not the one that I was getting.
pkg_delete -xf xorg-fonts
portinstall xorg-fonts-truetype xorg-fonts-type1 xorg-fonts-cyrillic xorg-fonts-100dpi xorg-fonts-75dpi xorg-fonts-miscbitmapsAs above, I put the list of fonts on two lines, it should be on one line
pkg_delete -fx xorg-clients
portupgrade -f font-util libXpm
cd /usr/ports/x11/xauth ; make install clean
cd /usr/ports/xinit ; make install cleanAs in the fresh install, you can then install twm and xterm or not, it's up to you. I usually don't because, before starting X I also install fluxbox and mlterm.
portupgrade -R xorg-server(See the section on a fresh install in case you run into an error with either this or xkeyboard-config which is pulled in as a dependency. I'm not sure how the latest versions of xorg-server and xkeyboard-config are doing on upgrades, I have still had the problems I mentioned with the two xkb files on fresh installs.)
cd /usr/ports/x11-driversThen, do as you would with the fresh install, install the input keyboard and mouse drivers as well as a driver for your video card.
Also, once again, install xkbcomp if nothing else has pulled it in.
cd /usr/ports/x11/xkbcomp
make install cleanIf not using nvidia drivers then
portupgrade libGLThen libglut--if it's not installed install it (this has nothing to do with nvidia drivers, that was only for libGL
portupgrade libglutYour old xorg.conf should work save for the ModulePath. If this is an upgrade, in which case you probably haven't used X11BASE=/usr/local, change the ModulePath as mentioned above, to /usr/X11R6/lib/xorg/modules. (If you have set X11BASE to /usr/local, then make it /usr/local/lib/xorg/modules).
You might have to portupgrade -f some Xorg based apps, but I've found that there were very few. I can't even remember which they were, I don't think any of them were too important.
One last note--since xorg-7.x has been merged into the ports tree, there is a now a mergebase.sh shellscript in /usr/ports/Tools/scripts. It can be run with
/usr/ports/Tools/scripts/mergebase.shThe script's purpose and actions are more or less explained in UPDATING but basically, it serves to help merge the old X11BASE of /usr/X11R6 into /usr/local.
Well, there you have it. Comments and corrections (or differences in your experiences) are welcomed.
Last edited by scottro (2007-05-28 19:23:38)