FreeBSD: Xorg Upgrade mittels Portmaster


Wer portupgrade nicht nutzt und lieber auf das sehr leichtgewichtige portmaster setzt bzw. dies auch zum Upgrade von Xorg 6.9 auf 7.2 nutzen mag, muß erst ein Update tätigen um in den Genuß der Anwendung zu kommen. Desweiteren sollte man sich an die Vorgehensweise des Autors halten. 😉

From: Doug Barton
To: freebsd-ports
Subject: Instructions for xorg 7.2 upgrade using portmaster
Date: Sun, 27 May 2007 01:55:37 –0700
User-Agent: Thunderbird (X11/20070525)

Hash: SHA1


Thanks to all who’ve inquired about doing the xorg upgrade using portmaster. I appreciate your patience in waiting for me to provide instructions for it, but it’s been quite an exciting journey. I just committed a new version of portmaster (1.17) that has many new features and enhancements, several of which are required for the upgrade.

Please note that if you can do it, the _best_ way to use portmaster to do the upgrade is still to run ‘pkg_delete –f xorg*’ followed by ‘portmaster x11/xorg’, but if you can’t or don’t want to do that, read on. :) The problem that you’ll inevitably run into is that due to the vast number of files that are moving from one port to another, combined with the way portmaster does depth-first updates, old port A is going to be deleted after new port B has already installed one or more new files with the same name, leading to either a failed build or rebuilding of the dependency. We can minimize that problem, but we can’t avoid it altogether. So, here we go …

0. Update to version 1.17 of portmaster (or newer if available), and take a glance at the man page.

1. Add ‘X11BASE=${LOCALBASE}’ to /etc/make.conf. Strictly speaking this should not be necessary, but I ran into weirdness without it.

2. Export XORG_UPGRADE into your environment (see /usr/ports/UPDATING)

3. Read the 20070519 entry in /usr/ports/UPDATING, and any newer entries that pertain to the upgrade.

4. pkg_delete –f the xorg-manpages, xorg-fonts-misc-bitmaps, and xorg-libraries ports. These ports are guaranteed to delete new files when they are pkg_delete’d, and there is no way around it.

5. Consider doing ‘rm –r /var/db/ports/*’, or adding the new — –force-config option to the beginning of each command line below.

6. Start the script per UPDATING.

7. portmaster –wv /usr/ports/x11/xorg-libraries
If you can be sure (either through using WRKDIRPREFIX or pre-cleaning your /usr/ports/ tree) that you have no stale work directories, consider adding the –C flag. If you want to delete the old distfiles without prompting, add –d.

8. portmaster –v[Cd] /usr/ports/devel/imake

9. portmaster –v[Cd] –w –r libXft
If this build fails at any point (and it probably will at least once) then add –R to the command line when you restart it in order to avoid having to rebuild things already built. This is probably a good time
to add the –C option if the build fails part way through the make phase of a port to avoid having to rebuild that part of the port that’s already done. If your build fails often with trying to install a port that’s already installed (part of the chicken/egg problem described above) consider adding –m»-DFORCE_PKG_REGISTER» to the portmaster command line. It’s not an ideal solution, but it’s a time saver, and it works.

10. portmaster –v[Cd] –w /usr/ports/x11/xorg
The –R option as described above won’t help you here, but the other information from 9. applies.

11. portmaster –v[Cd] –w –a

12. portmaster [-d] –s

13. portmaster [-d] –clean-distfiles

14. Enjoy the brave new world of xorg 7.2 :)

Good luck,


PS, One request, please do not mail me directly asking for help with the upgrade. You’re much better off posting a message here on freebsd-ports@ so that you can get help that much sooner. I will of course be monitoring the list closely. Thanks.

3 Antworten zu “FreeBSD: Xorg Upgrade mittels Portmaster”

  1. Patrick sagt:

    Ich hab ja vor zwei Tagen meinem FreeBSD-Server sein Update auf den 6.2-Build spendiert und mal testweise Portmaster mit «-a» alles aktualisieren lassen, da brüllte mich plötzlich der Build für die xorg-libraries auch mit so einigem an…

    Naja die beiden Variablen gesetzt und dann rekursives Update der Libraries gefahren und gut ist. Da ich ja nich Xorg nutze, sondern nur die Libraries als Dependancy von anderem Kram brauche, war das Update dann nicht soo kompliziert wie gedacht, aber ich war froh, immer noch das «alte» portupgrade gehabt zu haben :)

  2. Oliver sagt:

    Zuvor gings auch schon, manuell eingreifen mußte man immer.

  3. Patrick sagt:

    Ja im Endeffekt hab ichs auch so in etwa gemacht, führen ja viele Wege nach Rom, aber hauptsächlich definiert man halt die beiden ENV-Variablen und sorgt dann dafür, dass die Abhängigkeiten richtig sitzen, da ich nicht das komplette Xorg-Paket brauchte war das dann auch entsprechend einfacher :)

RSS-Feed abonnieren