Quote:
Originally Posted by okok
Thanks. Yes, I know this, but that won't help reversing changes other than package isntallations (al sorts of configuration changes) or even changes caused by installations of software that isn't available in such packages.
|
Many of the mainstream apps (that you would like to install from source) will have both install and uninstall targets in the Makefile. Of course, you are taking a chance since some do not. Also, you need to keep the original Makefile(s) handy. Moreover, you are leaving the uninstallation details to the author of the program (what if he's a lousy script writer or if his system is set up differently than yours?) which is not always a good idea. (As an aside, this is what happens with most of default uninstallers bundled with windows programs.)
Awhile ago, in LFS hints (LFS is a `from scratch' distro), there was a custom package managing scheme (which I can't seem to find right now). Instead of using a program to manage packages, you would use unix permissions. There was a general group number for installed applications. Each `package' that you would like to install was configured, compiled, and installed as a `package user' (i.e., assign a unique user id and su to it). Each package user belonged to the general group and could also belong to more specific groups (e.g., devel, lib, graphics, games, etc.). Certain directories were owned by the general group and had the `sticky' bit set, so packages could install and move around their own stuff but not mess with anyone elses.
With this scheme, it was very easy to tell where each program installed its files, which files required special suid or guid permissions, and when different packages tried to move each other around. Of course when a `conflict' occured (e.g., a package wants to overwrite anothers configuration file) you would need to manually intervene. Of course this is much better than not knowing what went on, only to notice some breakage a few days later. To uninstall, there were some scripts that would find every file belonging to the package user, delete them, remove the user from the system, etc.
This scheme was (is) very thorough and well-thought-out. It gives you complete control of what goes where and lets you find gaping security holes in the install routine (such as a trivial program that decides to be suid 0). It also requires a lot of work and preplanning to make it work right (which would happen whenever you want to do everything from scratch). Having used it, I would say that the only `hard part' is setting it up in the beginning. Afterward, it is only a few extra steps to take whenever you compile any program (which you want to install globally). Also, you don't have to keep around the build tree as you probably would for `make uninstall'. You also don't blindly trust the programmer to be competent (and don't give his script complete access to the system).
There is also TRIP (the TRIvial Package manager), which is easier and has some interesting advantages. You can find out about it
here.
You can also use your distribution's package management software when you install from source. Instead of doing `./configure && make && make install' you do `./configure && make && [turn it into an rpm or whatever] && [install package through package manager']'. Depending on what package manager you are using, it may keep a database detailing what changes were made to the system by a certain package.