Wednesday, September 28, 2005

» 12 mo^H^H packages yesterday

phew, 12 RPM updates yesterday, mostly new networking-related stuff I currently need at work. I think that 12 packages on one day is my personal record. If you want to see some advanced SUSE Linux integration work in RPMs, check out the plugdaemon, http-replicator and plb (pure loadbalancer) source packages. SUSE Linux offers a nice convention and way of editing sysconfig files (e.g. /etc/sysconfig/network/plugdaemon) to set various options and parameters, mostly for init scripts (e.g. /etc/init.d/plugdaemon). In the 2 first packages mentioned above (plugdaemon and http-replicator), the init scripts have to pass all the configuration options using command-line arguments (those 2 daemons have no configuration file on their own). Fortunately, with SUSE Linux, one can create such a sysconfig file, put various variables in there (with description, default value, type filtering) that one can edit (either via YaST2 or your favourite text editor) and the init scripts read those variables to define what parameters and switches to pass to the daemon binaries at startup. There's some trickery involved in doing that but fortunately (e.g. using fillup), it's well documented by Novell. I also decided to package libevent 1.1a (the package being named "libevent-1.1_0.1") as it features some minor reliability fixes by the author (Niels Provos). The issue here was that SUSE Linux 10.0 RC1 already ships libevent-1.1 and that the author chose to name the shared libraries*. Obviously it's a great idea because this way, you're able to install several versions of the shared libraries side-by-side on your system, but unfortunately that doesn't work on SUSE Linux because the SUSE packagers chose to include the devel stuff in the libevent package instead of splitting it up in libevent and libevent-devel (I do have my gripes about that, but it's getting better), which means that you cannot have several versions of the library installed at the same time on your system because of file conflicts on the other files, e.g. /usr/include/event.h and /usr/lib/ Packaging libevent 1.1a would mean breaking packages and applications that use the* files from the libevent-1.1 package, so I added symbolic links* that point to*. Little trick here: you also have to explicitely mention the symbolically linked shared libraries in the spec file as Provides:, as rpmbuild isn't picking those up automatically. Request to other packagers out there: always (and I really mean always) split up packages into foo and foo-devel, even if it's just for a few bytes.


Post a Comment

<< Home