-   Linux From Scratch (
-   -   Using Package Archive style package management (

mugwump84 08-24-2005 03:59 PM

Using Package Archive style package management

In this scheme, the package installation is faked into a separate tree as described in the Symlink style package management. After the installation, a package archive is created using the installed files. This archive is then used to install the package either on the local machine or can even be used to install the package on other machines.
I was wondering how well this package management technique works, how much you have to tweak makefiles because the package doesn't support DESTDIR, and any sucess stories about this style of package management.

Just wondering. I may just end up installing everything I might not need into /opt

kjordan 08-24-2005 05:31 PM

I use this for every package I install. Although for some you'll run into some problems or extra steps are needed.

For example:
I can't figure out how to install TeTex into a fake root, so I use steps similar to this Slackware compile script to install it all to /usr/share/texmf and then create a package. Although I can't say I care for this way since you have to append the bin directory to PATH and some other things which you can find in the profile.d script in there. Not to mention it gets even messier when you add programs that use TeTex such as JadeTex which modifies some files and I found I had to change some things in one of the config files in the JadeTex section.

If you're installing GNOME, you'll have to run some extra commands before starting GNOME.
gconftool-2 --makefile-install-rule /etc/gconf-2.0/*.schemas
scrollkeeper-update -v -p /var/lib/scrollkeeper

If I have no clue, I either look at Slackware source and for many packages (but not any of the GNOME ones that use install schemas or scrollkeeper files, but you can just use --disable-schemas-install to prevent it from registering the schemas, use DESTDIR to fake install it, and then run the above commands (you can also prevent it from running scrollkeeper-update with a sed command to comment that out, but it doesn't really matter)) they have a way to install them into a fake root. Or I look at a Gentoo ebuild and if I can figure out what the hell it says I can figure out how to fake install it that way too.

Other than that, I find that I can cleanly install every other package using DESTDIR (most command), install_root (the one for glibc I believe), ROOT, INSTALL_PREFIX, or some other kind. Usually I just look in the install: section of the makefiles and unless it just installs to like ${bindir} without ${DESTDIR}${bindir} or some other variable prior to the location, you can usually find the variable you need to set during make install pretty easily. Otherwise Gentoo may have a patch for using DESTDIR or Slackware scripts can tell you how to install the package manually.

It may all seem complicated in my post, but most packages use DESTDIR and very few either don't have that capability or use another variable.

mugwump84 08-25-2005 03:49 PM

Is there a way to make TeTex install into /opt?
Thanks, I think I'll try this style of package management.

kjordan 08-25-2005 05:19 PM


Originally posted by mugwump84
Is there a way to make TeTex install into /opt?
Thanks, I think I'll try this style of package management.

Yeah, I suppose there is, but it'll be contained in one directory either way.

All times are GMT -5. The time now is 02:44 AM.