[sclug] Keeping track of source installations

Damion Yates damiony at rd.bbc.co.uk
Sun May 9 12:21:03 UTC 2004


On Wed, 5 May 2004 erik.chakravarty at accenture.com wrote:

> For you DEBIAN_FANS out there... (I hope somebody gets that joke)
>
> You know when you just can't find the right version of a deb
> package, so you go to download and compile the source. It all
> compiles fine with no dependency problems (for once!) BUT
>
> "make install" throws binaries and libraries all over your
> filesystem with no way of cleaning everything up again in 6 months
> time. Is there a convenient way of keeping track of what
> non-debianized packages you have installed?

There are a few install watchers, most use libinstallwatch.so I
believe (old package that first used it was called make_uninstall),
you LD_PRELOAD this in your environment, make sure you use binaries
that are symbolically linked (some peoples 'ln' isn't) and it logs the
"make install" process, or ./install.sh or whatever.

The one I use is a script using this lib designed to be slackware
compatible.  It's called pkgtool2 and is available:
http://gd.tuwien.ac.at/opsys/linux/doslinux/

Slackware uses standard compressed tar files as it's install format,
you can type:

installpkg blah.tar.gz and it just de-tars from / often running an
/install/postinst.sh script.  It then also leaves a file in
/var/log/packages/ which is plain text, shows the files in the tar and
details of the package, also some basic dependancies based on what
libraries are needed by the binaries (I assume just from ldd).
With pkgtool2 a make install leaves you with a slackware package, an
installed /var/log/packages/applicationname file containing a list of
all files, a backup of anything that needed to get overwritten, and
most importantly the ability to removepkg the application cleanly.  An
ls -ltr /var/adm/packages will show me an ordered list of applications
installed.  As I'd have hit dependancies during the ./configure stage
as it kept telling me of things I needed, you'll find that the ordered
list is roughly a dependancy tree of things for that app.

This is obviously very easy to examine these tarballs and update or make
your own, but lacks the dependancy checking rpm and deb based dists
have.

Using pkgtool2 you would go:

./configure --whatever
make
pkgtool2

Then 'M'onitor and follow options in the text based menu from that
point.  It'll do the make install and create a log of what went where
and it'll backup whatever got overwritten.  You can then use removepkg
in slackware to remove the install, and choose to manually untar the
backup to completely restore your system (most stuff doesn't
overwrite, it's just new files in possibly odd places).

Another great advantage of pkgtool2 is that it'll allow you to create
rpm and deb files as well as slackware packages (complete with post
install scripts for the odd symblink etc).  I've used this in our
department to build rpm files.

Damion

-- 
Damion Yates - Maiden House, Vanwall Business estate, Maidenhead
email: Damion.Yates at bbc.co.uk - phone: +44 (0) 1628 407759 (ex: 0137759)


More information about the Sclug mailing list