Esben Stien wrote: > > Unionfs only helps with collecting the written files done by any > install script, but it does not solve package management; like > inserting, removing, listing, locating, etc, so I also need a solution > there. >
Pretty much the same methods used in any package manager, only the path to get there is longer by mounting a union, installing package, unmounting a union, mounting it elsewhere. Using DESTDIR is at least two steps less. Installation is easier and likely RPM spec files (or other PM support files) already exist to cover most if not all of this work. Here is a very brief rundown of the typical process...hope I didn't skip a step. Options B and C are not appropriate for a binary distro. Corrections are welcome from those who use typical binary packaging. Option A. 1. configure package, build package, install into alternate prefix (DESTDIR, or union if you prefer). 2. review makefiles to see what was done for post installation steps such as updating indexes, linker cache, info dir index, gconf schemas, .desktop files, etc. though most of that comes by looking at the installed files after you've done it for a while. Put all this into a script to run as a post installation script (take into account all possible times that this package could be installed and account for everything so that not human intervention is required) 3. remove any files that should be updated and not overwritten. 4. separate package into bin, bin-$qual, dev, doc, doc-$sub, lib, lib-$sub, lib-$sub-$qual, and lib-$qual packages and archive as appropriate. 5. separate post-install script created in step 2 for each of the above sections. 6. review ldd output for library dependencies of installed files to make a dependency tree. 7. review post installation steps for dependency information 8. Install all files until they can be removed (when everything else is installed and dev files and no longer needed). 9. Run the full post-install script created in step 2. Option B 1. use somebody else's spec file or PM support file. 2. Modify for your site 3. verify via steps 1-9 in Option A above are accounted for (they usually are) (skip steps 2 and 3 if the file was generated for the package you are installing by an LFS contributor and you trust that contributor). Option C I still choose yet another custom method that makes more sense to me in a build from source environment (only used for restore purposes if I should break something since I'll never install a binary package completely). 1. Log the entire installation including a header with build commands 2. Log the installed files (either by timestamp, DESTDIR, or union) 3. make a list of updated files from previous logs (next time around use this list of updated files to archive the updated files as step 3). 4. Tar up everything that is installed except the typical updates to files that are dynamic (see step 2 in Option A above if unsure). HTH -- DJ Lucas -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
