[sclug] Keeping track of source installations
Roland Turner
raz.fpyht.bet.hx at raz.cx
Thu May 6 09:05:43 UTC 2004
Erik wrote:
> "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?
Stow is pretty much the tool of choice for this purpose; that it is already a Debian package is somewhat helpful.
As others have suggested, check backports.org and apt-get.org first. If what you need isn't there, then building for stow is a likely choice.
(Sometimes transplanting the /debian subdir from an older Debianised version is helpful but (a) you may be installing something that has never been Debianised and (b) the additional effort of bringing it up to date may well outweigh the benefit of Debianising for a single installation. If you're installing on dozens of machines, perhaps belonging to customers, then Debianising is of course desirable.)
When you are building largish numbers of packages for stow (I once built all of Gnome this way, back when 2.0 was _way_ better than the previous version and I didn't want to wait :-)), the attached fragment from my .bashrc may be of use. Here is how I use it:
$ tar -xzf foo-1.2.3.tar.gz
$ cd foo-1.2.3
$ ./configure --prefix=/usr/local/stow/foo
$ make
$ helpinstall foo make install
Hope this helps.
- Raz
--
# Warning: the chown will remove setuid/setgid bits. If you need them,
# turn them back on manually.
helpinstall ()
{
targetdir=/usr/local;
stowdir=/usr/local/stow;
package="$1";
shift;
packagedir="$stowdir"/"$package";
if [ -d "$packagedir" ]; then
sudo stow --dir="$stowdir" --target="$targetdir" -D "$package";
sudo rm -rf "$packagedir";
fi;
sudo mkdir --mode=755 "$packagedir";
sudo chown raz.raz "$packagedir";
fakeroot "$@";
sudo chown -R root.root "$packagedir";
sudo chmod -R 755 "$packagedir";
sudo stow --dir="$stowdir" --target="$targetdir" "$package";
sudo ldconfig
}
More information about the Sclug
mailing list