Click to See Complete Forum and Search --> : Make/Autoconf


Dun'kalis
08-25-2002, 02:46 AM
I'm trying to find an easy way to log where a program installs its files from a tarball, and a way to find dependencies needed by the tarball without having to know them in advance. I'm toying with the emacs source, and I've looked around the files, and I'm not finding a solution. Maybe deciphering the dependencies needed is too difficult to do on the fly.

bwkaz
08-25-2002, 08:46 AM
What I do is follow one of the LFS hints -- I install every package as a different (nonprivileged) user. That way, all the files that get installed have their owner set to that user. It's easy to use find to look at what was installed, then.

The only gotcha that I can think of is that you can't install suid root programs, so watch what "make install" tries to do. You might want to log errors to a file, i.e. "make install 2>errorlog" or something. Then set the owner and u+s bit manually as root.

The other thing you have to do is create a new group, call it install or something, then "chgrp install" and "chmod g+w" a whole bunch of directories -- /usr/local/*, /usr/*, and even (perhaps) /etc. Then make sure all your package users are members of the install group.

Maybe this is all overkill...

Edit: if you want to read the hint, it's at http://hints.linuxfromscratch.org/hints/more_control_and_pkg_man.txt

----

About dependencies, I don't think just watching configure do its thing is that big of a deal. I don't know of any other way to do it, either.

Dun'kalis
08-25-2002, 12:59 PM
I thought up a good solution. Here is a rough sketch of it:

You download the source code
Examine where make install places its files
Make a file, called, for example, emacs-21.2.rules
Place this file in a /var/src-rules directory
In the source directory, run a script called src-install which runs ./configure && make && make install, and then changes the install value of the .rules file
There could be a tool that could take the .rules file, which can have the dependencies for the program included in it, and check the dependencies.

A basic package manager, yes, but it could have some pretty damn cool features...

EDIT: Any good sources on perl scripting? Since I'm parsing lots of text, it would be a good idea for me to learn perl....