While browsing around on my home machine today before getting back to work, I noticed I had DokuWiki installed and running on Apache. I thought I should probably start using it, and also should probably double check to ensure it updated to the latest version.
Ok, simple enough
portsnap fetch update -d /usr/base/snap
portupgrade dokuwiki
Rebuild fails halfway through on php5.
Ok, so now I’ve broken my dokuwiki install, since the application was de-installed prior to building.
I dig into what is going on, the build is failing because this portsnap or a previous one picked up 20070519 a significant change as breaking X11 to upgrade to the ports to 7.2. Now initially I’m scratching my head as to why Dokuwiki is ultimately tied to X11, but cursory examination shows cruft in php5. Thus a spiderweb of dependencies are now invoked that need to be resolved to get it installed.
DokuWiki -> php5-gd -> xorg-libraries
Now if I was smart I would’ve updated Dokuwiki w/o updating any of it’s dependencies (considering it’s a non-db wiki written entirely in php). I may also have chosen the path of attempting to restore everything manually from backups created by portupgrade, but once something as drastic as X11 is broken I figured I’d get to the bottom of the issue.
Reading the 20070519 entry in /usr/ports/UPDATING provided a convenient shell script to merge and transfer the X11R6 somewhere and symlink the old directory. Now that I’ve done that I attempt to rebuild PHP. Next comes up a conflict between php5 thinking it’s already installed because mod_php5 is installed. I de-install mod_php5 and tell php5 to build apache modules. This now completes successfully, now back to Dokuwiki.
Attempting to rebuild Dokuwiki spends an hour working on recompiling xorg related intermediates. Fails again. This time on libXrandr, which is missing a header.Xrandr.c:36:36: X11/extensions/Xrender.h: No such file or directory
Now it’s back to trying to determine what steps I haven’t completed from the UPDATING file and reign in the issue w/o having to wait for all of x to rebuild again.
After digging online, I manually installed /usr/ports/x11/libXrender . Then built libXrandr. Now doing make on DokuWiki… Which is currently installing the XScrSaverServer… Highly important for any headless system wanting to run DokuWiki.
Edit:
Yes this is a rant. No the problem is not resolved. I don’t apologize for the the horrible grammar or jarring flow.
If you are having a similar issue, I’d suggest cleaning your ports tree completely. That’s what I’m currently trying at least.
Resolution:
This is what ultimately worked for me.
cd /usr/ports/x11 make deinstall clean
Then I was able start properly restoring things.
- Apache
- PHP5
- Subversion
- Dokuwiki
Now I’m rather worried about fixing up the FreeBSD that runs this website (along with several others).