Thank you, RPM and Deb packagers!

Migrated. Originally posted: 2008-12-08

Sometimes I forget how much time and work the Deb and RPM packaging systems save me.

Take Subversion, for instance. This afternoon’s task:
– Install Subversion on a system with Apache, Python, and ViewVC.
– Then get the ViewVC working on the depot we created.

We’ll deal with the DAV parameters to actually check out the repository later. Simple with packages, right?

Now take an old BSD system, or maybe just an old Linux where you can’t find packages, and you now you need to recompile Subversion and install it. Just to keep life interesting, the system is set up so with a chroot for all this to run in. Of course, there’s very little software in the chroot, so you have to build on the main system and copy the results into the chroot before you can run the system.

It still looks simple – configure, make, make install, right? Sure it is!

1) ./configure –help

That’s so you can see what needs to be done to make Subversion work with Python. Some notes I found say to add –with-Python PATH, but there’s nothing about that here. What’s up with that?

2) so you run ./configure with some parameters, to tell it it needs to work with Python, and apparently that also means working with “swig”, and both are on the system so it’s all cool.

3) make

4) make install

5) cp -r (Subversion folder) – note: no “-a” available.

And now I’m done, right?

Doesn’t work.

So now we read the README and INSTALL and such. Turns out there are several pages of notes in these files. One of them tells about that elusive –with-python PATH. Turns out this PATH needs to include the /bin/python part. And the notes for the “swig” param says don’t include the bin folder in its PATH. Maybe it’s looking in both the bin and the lib directories? It doesn’t say why, but we do it that way anyway.

5) make clean

6) ./configure (better parameters)

Reading on, we have to run a second, separate run of make for swig. We’re still in Subversion, in case you weren’t sure. Didn’t we tell it about swig in the configure? I was sure I did.

7) make (some-swiggy-parameter)

Next we do the install again.

8) make install

And the notes say to do yet another “make install”, for swig of course.

9) make install (another-swiggy-paramater)

10) Copy again!

No joy – back to the notes.

Yup, there’s more. Python has a folder /usr/lib/python2.x/lib/site-packages/. You need to create a file there called “subversion.pth”, with a single line in it showing the path to the Subversion build. (The three letter “pth” file extension must be for simplicity on Windows?)

11) /usr/lib/python2.x/lib/site-packages/

And you have to edit from the host system, because the chroot doesn’t have vi.

Anyone notice I lost count somewhere up there?

Anyway, this is why I want to thank all those developers out there who work so diligently getting RPM’s and Deb’s working properly! It’s a lot of work and I appreciate it!

And all those problems I had? If you’ve built software from source, you know that’s not unusual. However, to be fair to Subversion, that was Subversion 1.3.2. I’m sure at least some of it is simpler in Subversion 1.5.

And thanks Tim, for all your help.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s