Quantcast
Viewing latest article 9
Browse Latest Browse All 10

Best practice to track custom software installations on Linux in /usr?

Image may be NSFW.
Clik here to view.
Question

I’m compiling and installing software myself on Linux (Debian Squeeze in my case). Downloading, unpacking, installing dependent developer libraries/headers, running configure then make.

Up to this point everything remains still in the source directory. Once I run make install, basically I start having non-package files lying around in /usr/local or /usr (depends on --path switch).

I also tried installing it into a different place, e.g. /opt, but this often causes troubles somewhere. I.e. I’ve always to remember to specifically add this to the header/linker path. Or I install a package there and the system wide pkg-config doesn’t know about it (I’d again need to add extra flags). And even if I wold install every custom software in /opt, I wouldn’t know which all of those files in bin/, etc lib/ etc. belong to each other. If I start installing them to /opt/software1/, the maintenance problem just multiplies and I’ve to keep track of even more paths I’d need to add for compiling further packages or need to have them in the LD library path, etc.

But when I install software directly within /usr I just get a bad feeling, no longer being able to properly tell which of my custom installation files belong where. It’s easy to determine if a given file belongs to a package, but if it doesn’t, on large custom installation, it’s a pain to remember or figure out where a file belongs to.

It gets worse when I want to remove files. They’re scattered in bin/, lib/, man/, etc. So if I want to remove a custom installed package completely, I’ve to perform manual work or worst case, I’m no longer able to determine all of them and I’ll leave stale files around.

I know I could also start building a custom package out of it. But that would require me analyzing every software I install upfront? I’ve no real experience with creating .deb files and I also do not plan to distribute them to other installations. All I want is a nice way to keep track of custom local installations.

I probably could come up with something on my own, i.e. making a list of all files (find / ...), installing software and then do this again and save the diff somewhere. Just wonder if there might be a better way.

Asked by mark

Image may be NSFW.
Clik here to view.
Answer

Have you tried checkinstall (it’s in the Debian repos)?

Instead of using make install you can use checkinstall and it will create (and install) a package with the software so that you can track it using your package manager.

Answered by Alvaro

Viewing latest article 9
Browse Latest Browse All 10

Trending Articles