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

Re: More dpkg stuff

On Fri, 27 Sep 1996, Heiko Schlittermann wrote:

> Why?  If we can handle such case (umask != *77), why we don't handle
> this?
> Grep in scripts/ for 'fowner' 
> controllib.pl:@fowner = (getpwnam(getlogin()))[2,3];
> dpkg-distaddfile.pl:chown(@fowner, "$fileslistfile.new") 
> dpkg-gencontrol.pl:chown(@fowner, "$fileslistfile.new") 
> dpkg-shlibdeps.pl:chown(@fowner, "$varlistfile.new") ||
> I think, this behaviour is that, what would be expected.  Please correct
> me, If I'm wrong.

This can break, for example:

I login as user foo.  I su to user bar.  I build a package.  Oops - now
foo owns the files created by debian/rules.

There's a danger in making things idiot-proof.  In general, the
simplest solution is the best one.

Because the rules clean target should rm debian/substvars (if it's
dynamic) and debian/files (prog manual 3.2.[45]), there's nothing wrong
with having them owned by root.

Ian's solution of warning about the umask is simplest.  Add something
like this to the top of debian/rules:

expr $(umask -S): '.*o=r' > /dev/null && \
  echo "Your umask will probably break dpkg-buildpackage" 2>&1


Reply to: