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

Re: fakeroot forcing filemodes

> On Sun, 3 Aug 1997, joost witteveen wrote:
> > As you may be aware, the "fakeroot" package allows execution of commands
> > in an envrionment where getuid(),chown(), chmod(), stat() etc are
> > wrapped to make it appear the user really is root.
> > 
> > This allows the use of "dpkg-buildpackage -rfakeroot", so debian packages
> > do not need to be build as root any more (merely fakeroot).
> > 
> > But this allows for more: Fakeroot_0.0-7a (just released, due to problems
> > with master only available on ftp://rulcmc.leidenuniv.nl/debian/upload),
> > also (by default) refuses to do things like
> >   chmod og-r foo
> > as this is not allowed by the Debian Policy Manual: Section 3.3.8
> > only allows for dirs with mode 04755 or 02775, and files should
> > have at least mode 0644.
> > 
> > This was (I think) suggested by Christian Schwarz, and I now really
> > like this feature: Turns out that about every X package that uses 
> > xmkmf violates the debian policy, as all manual pages, header files,
> > etc are installed mode 0444 (just filed a bug about this, against xlib6-dev).
> (These section have been in the policy manual a long before I took over
> maintainance of it.)

OK, sorry, I remember again, it wasn't you, it was Andreas. Sorry.

> I think we should keep the "should" clause in the policy--most packages
> "should" comply to this, but there may be exceptions. I suggest that you
> change the fakeroot package to issue a warning if a mode less than 644 is
> used, but don't let it fail.

Actually, warnings are very difficult. Eighter chmod returns -1
and sets errno to EPERM, or it returns 0, but making chmod and
friends output anything to stdout/stderr is very tricky (found this
out the hard way when I wanted to generate debugging messages: you
get segfaults etc when you send anythign to stderr too early in the
startup of any programme).

So, as Joey also preferred this, fakeroot-0.0-8 will just default
to "--nodebian", and have the "--debian" option to change that.

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: