How do I determine the options used for ./configure when a .deb package was built?
I want to build a new package from a newer version of the software and make it as close to a drop-in replacement as possible, so getting the ./configure options right is presumably important.
As a broader question, is there a generally good way to do this type of thing? I'm currently planning to get the ./configure right, then make / checkinstall -D and see what I get.
The package in question is dspam (3.6.8 in repos, 3.8 I want).
Mark Rogers wrote:
How do I determine the options used for ./configure when a .deb package was built?
For most packages, a quick read of the Debian Policy and the debian/rules file will reveal what you're after.
If not, a quick and dirty way would be to replace ./configure with:
#!/bin/sh echo "I am a fake ./configure script, and I was called like: $0 $@" exit 1
You could also try turning on make's debugging messages, but if you're analysing a package with complicated debian/rules (or anything using CDBS), this is probably going to be more painful than it's worth.
Regards,
Chris Lamb wrote:
Mark Rogers wrote
How do I determine the options used for ./configure when a .deb package was built?
For most packages, a quick read of the Debian Policy and the debian/rules file will reveal what you're after.
I just took a look at debian/rules (thanks for the pointer) but it hasn't told me anything that I understand.
If not, a quick and dirty way would be to replace ./configure with:
#!/bin/sh echo "I am a fake ./configure script, and I was called like: $0 $@" exit 1
I think I'm starting to realise I'm a bit out of my depth here, so time to start paddling...
If I: sudo apt-get source dspam sudo apt-get build-dep dspam cd dspam-3.6.8 debuild -uc -us
.. then I would get essentially the same package I could have installed as a binary. That's (learning as we go here!) from http://www.debian-administration.org/articles/20
If I change the configure script as you suggest immediately prior to the debuild, that will tell me what configure is being told to do.
Realistically, then, if I now download the source tarball of dspam-3.8.0 and run the same configure, then use make && checkinstall -D to build the package, what are the chances that the new package will be basically the same at the 3.6.8 binary in terms of its configuration?
One thing I'm going to lose is any code patches applied by the Debian and subsequent Ubuntu packagers, but I think I might just pretend not to notice that just yet. Another potential issue is that the official Debian packages split the functionality between packages (dspam depends on libdspam7, and (in our case) libdspam7-drv-mysql). I'm assuming I can probably build everything I need into one package though by adding some extra bits to my ./configure?