Sunday, October 12, 2008

Keeping up to date

One of my home servers is running Fedora Core 6 (FC6). I've got it nicely setup for my specific home use (printing, file sharing, DHCP, DNS, etc). Basically a well tuned system, something that is a royal pain to upgrade. One of the problems with Fedora is that it needs to be upgraded just about every 18 months. So I decided that my next upgrade would be to CentOS. It needs to be upgraded less often and I'm hoping that the upgrades will less painful. A few of my Fedora upgrades have actually been fresh installs. A very painful way to upgrade! I really like the way Ubuntu's upgrades have gone on my laptop (just let the package manager upgrade, after waiting a few weeks for everyone else to try ;-). Anyway I still haven't solved the real problem. How to upgrade those custom packages such as the Sendmail configs, or my custom use of tinydns (I'm not using the daemontools) and other customizations. This is something I really need to resolve as it's still a problem with whatever OS I use. If anyone has a solution please let me know.

Currently I'm installing MediaTomb on my HA server. Since my Fedora setup is a legacy release it's no longer supported and you can't use the package manager (rpm) to download and upgrade to the latest and greatest packages. So to install MediaTomb I've had to downloaded the SVN release (I want YouTube access among other things) plus some 40+ packages to upgrade, compile and install. What I've done in the past is to simply download the package source, compile and install the code. One small problem. The pkg-config tool doesn't know where the new package is (argh!). Well today I accidentally found out about the .pc files and the PKG_CONFIG_PATH variable. When you do a './configure' in the new package's source directory it may call the command: pkg-config to find out all sorts of useful information about installed packages. If the command doesn't know about the installed package then it doesn't think it's installed. When you set the PKG_CONFIG_PATH to something like /usr/local/lib/pkgconfig/ it tells the command: pkg-config to also look in that directory for the appropriate '.pc' files for information on the packages installed on the system. Most manually installed packages will install in /usr/local but not all will install a '.pc' file. The good news is you can manually create the file and drop it in the $PKG_CONFIG_PATH and the pkg-config command will find it. Great, so we know where to look but what information is it looking for? Well that one got me too until I found the libpostproc.pc file (it was missing on my FFmpeg install). Here's what the libpostproc.pc file looks like on my setup:

 prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libpostproc
Description: FFmpeg post processing library
Version: 51.1.0
Requires:
Conflicts:
Libs: -L${libdir} -lpostproc
Cflags: -I${includedir} -I${includedir}/postproc

As you might be able to discern it has the information about where the library files are contained (/usr/local/lib), where the include directories are kept (/usr/local/include) and the appropriate C compiler flags to compile programs that need libpostproc. I wish I had this information a long time ago it would have made some of the most complex manual installs a lot easier. Hopefully this might be useful information for others who are going about it the hard way. ;-)

1 Comments:

At 10/13/2008 11:53 PM, Anonymous Anonymous said...

FWIW, my answer to easy upgrades is debian's testing distribution, and upgrading more frequently than you want to.

The testing distribution runs a couple of weeks behind unstable, so you've had a couple of weeks for other people to find trouble. Many of the packages do a nice job of either using conf.d directories or local config include files; you get the same notice that a config has changed out from under you that ubuntu gives you (ubuntu being, after all, derived from debian).

I upgrade every few days to weeks. That goes a long, long way to avoiding the massive breakage-provoking upgrades that we all dread

 

Post a Comment

<< Home