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

Re: Some ideas and concerns regarding fakeroot

> Debianizing a package often requires hacking around in Makefile to make
> the package install in debian/tmp or so. The fakeroot package is already
> messing around with the permissions of files and buiding a file index in
> ram I guess. Could we have the following functionality to avoid the
> editing of makefiles:
> 1. There is a environment variable VIRTUAL_ROOT which is set by the
> maintainer to the debian/tmp directory.
> 2. If the installation is trying to write a file to a directory where
> there are no permission to write (package is build under regular userid)
> then redirect the file into VIRTUAL_ROOT/path and create all leading
> directories. 
> 3. If a file is opened for reading with an absolute path then first look
> into VIRTUAL_ROOT/path before trying to access the real path.

I like the idea. There's one thing I'm not sure about, though: stat().

Suppose we've got two packages, foo and bar. One does, in the make install:

  if test -f /etc/foo-info; then
    process /ect/foo-info, do things with info, 
    and install the foo accordingly;
    echo /etc/foo-info missing. Please create this file and re-run make info.

So, surely, for foo we want 
  stat(file that lives in /, but not in VIRTUAL_ROOT/etc)
to give the stat of / anyway.

But now take bar, that does:

  if test -f /etc/bar-info; then
    echo /etc/bar-info doesn't exist yet. Creating it.
    echo "bartender=" `hostname` > /etc/bar-info
    echo /etc/bar-info already exist, good. Not creating it.

So, surely, for bar we want 
  stat(file that lives in /, but not in VIRTUAL_ROOT/etc)
_not_ to give the stat of /.

How is fakeroot going to distinguish between the two?

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: