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

Re: Experiences with compiling Debian

> [ Please don't Cc: public replies to me. ]
> joost witteveen:
> > So, there's a first version of fakeroot sitting in
> >    ftp://rulcmc.leidenuniv.nl/debian/upload
> I suggest a simpler solution, which doesn't require intricate
> hacking to work:
> At the moment, "debian/rules binary" is executed as root so
> that the files installed will have the correct ownerships
> and permissions, and because a handful of packages do special
> stuff that requires root priviledges.

Well, every pacakge that does
  install -o root ....

(and there are quite a few of those) will fail.

> For the vast majority
> of packages, if we run "debian/rules binary" as a normal user,
> and modify "dpkg --build" to create the tar file so that files
> have the expected ownerships, there will be no problems. (I've
> tried it with one of my own packages.)

This will of cource only work if all files are owned by root in
the package. Otherwise, the debian/rules file will have to do
something like chown, and that will faile (like all games).

> Setuid executables and other special permissions and ownerships
> would need to be handled in some way, perhaps by listing them in
> a file that "dpkg --build" reads.

This means changing all those packages.

> Some packages would still require root priviledges, because
> they do something else at installation time that requires it. I
> don't know off-hand of any examples, and it might be possible
> to circumvent this by doing it in the postinst.

> (I'm not against fakeroot; I'm just hoping for a simpler
> solution.  KISSing is fun. :)

Well, actaully, fakeroot is rather similar to what you are suggesting:
 - by having the LD_PRELOAD=libfakeroot, I in effect modify the
   build process, and I _am_ listing the correct ownerships in
   something, like you are suggesting (though I don't do it in
   a file, but in a binary tree).
 - by having the LD_PRELOAD=libfakeroot, I in effect modify
   the "dpkg --build", and it now reads that binary tree with
   the ownership information, and puts it in the tarfile (inside
   the .deb file).

So, basically I'm doing excactly what you intended, only without
modifying one single debian/rules file!

joost witteveen, joostje@debian.org
#!/usr/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/

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: