[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Experiences with compiling Debian

>>>>> "joost" == joost witteveen <joost@rulcmc.leidenuniv.nl> writes:

 >> On Mon, 23 Jun 1997, joost witteveen wrote:
 >> > (in fakt so much, that I may be tempted to write it myself. You
 >> > don't need that many changes).
 >> Well, you need to write your own version of make that looks for any attempt
 >> to run chmod, chown etc, and then fakes all the ownership and modes in the 
 >> resulting tar.

 joost> No, what I had in mind is changing chmod, chown and frends,
 joost> and make them log the intended permissions in a file
 joost> (specified somewhere in a environment variable), and then
 joost> changing tar to look for that file (agian in that environment
 joost> variable), and ajust the permissions/ownerships
 joost> in the tar file according to that "permissons file".

 >> I'm not sure whether it's possible in general even then, what if
 >> the package tries to set the ownership of a file from within
 >> another shell script or a perl script; how can you intercept that
 >> so it works properly?

If you really want to do this, LD_PRELOAD=/some/where/debian-perm.so
from dpkg-buildpackage.

 joost> Well, if you do it with perl, OK that wouldn't work, but how many
 joost> packages use perl in their build process to set permissions on files?

majordomo for one. But we can add a perl module to do it properly, or
hack the perl-scripts to work better (or not be used). This is not
that difficult for majordomo anyway.

 joost> I'm sure not very many. Actually I think most (97%) packages
 joost> would build
 joost> OK with what I had in mind.

 >> With a few minor changes in the way packages are made---having
 >> tars all made
 >> as any user, and chowns done after the package is installed,
 >> either in the postinst or by dpkg first (the former would have the
 >> advantage of
 >> running on
 >> existing systems)---we could build as non-root.

 joost> Well that would be a lot of changes: many postinst's would need to
 joost> be changed.

No, the file permissions are set in the tar-file from the list
generated from the special versions of chmod. A tar-file can be made
as any user, you just need a tar which can understand how to put the
right permissions in the tar file.

Tom Lees <tom@lpsg.demon.co.uk> <tom@debian.org>  http://www.lpsg.demon.co.uk/
PGP Key: finger tom@master.debian.org, http://www.lpsg.demon.co.uk/pgpkey.txt.

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: