Re: apt does not update directory permissions

2011-12-07 Thread Colin Watson
On Wed, Dec 07, 2011 at 01:07:36PM +0100, Christoph Mathys wrote:
> We are using debian packages to distribute our software inside the
> company. Recently I messed up the permissions inside a package: A
> whole directory-tree suddenly belonged to root:root, when it should
> belong to someone else. The fix for the package was quick, permissions
> now look ok again (checking with dpkg -c and clean install). However,
> when I update the old (broken) package (dpkg -i or apt-get install,
> does not matter), only the file permissions get corrected, all folders
> still have wrong permissions.
> 
> Is this a "feature" of apt to only correct file permissions? Do I
> seriously need to hack something into postinst to fix this correctly?

(apt is not involved in this, as a system for acquiring packages from
repositories, resolving dependencies, and sequencing installation and
removal operations; this is a characteristic of dpkg, the low-level
package manager that actually deals with individual file system
objects.)

In general dpkg is quite limited in what it can safely do with
directories, because they are shared between packages: it is common for
a given directory to be shared among many packages, and expensive to
track this because you'd end up doing things like tracking what every
package thinks the permissions of /usr should be.  Then you get hairy
corner cases: what should you do if 25% of the packages on your system
think that /usr should be mode 0775?  How about 75% holding that opinion
about /usr/lib/x86_64-linux-gnu?  We don't particularly want to make
that kind of thing a conflict.

So, dpkg tracks the presence or absence of directories, and will attempt
to tidy them up if you remove the last package that installed one, but
it doesn't do anything with their permissions.  I strongly suspect that
any attempted cure for this would be much worse than the disease.  If
you want to fix a historical mistake in directory permissions, then yes,
you need to do so in a maintainer script, and take responsibility for
any coordination between packages that may need to happen in order to do
so safely.

Cheers,

-- 
Colin Watson   [cjwat...@ubuntu.com]

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Ubuntu should move all binaries to /usr/bin/

2011-12-07 Thread Chris Coulson
On 07/12/11 23:35, Colin Watson wrote:
> Simplifications here belong at higher levels. For example, the
> suggestion made somewhere in this thread that there's no good reason
> for Firefox to require the full path to an executable to open a
> resource seems like an excellent one.

That's tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=397700

Regards
Chris

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Ubuntu should move all binaries to /usr/bin/

2011-12-07 Thread Colin Watson
On Tue, Dec 06, 2011 at 11:26:01PM -0800, Dane Mutters wrote:
> On Tue, Dec 6, 2011 at 11:23 PM, Dane Mutters  wrote:
> > I've seen a bit of this obscuring mentality creep into modern Linux
> > (including Ubuntu), in the form of auto-generated /etc/ stuff--which isn't
> > necessarily a bad thing, except when you can't easily change what's getting
> > generated (GRUB 2, anyone?

FWIW, grub.cfg is deliberately in /boot, rather than putting an
autogenerated file in /etc.  (/boot/grub/menu.lst had its own problems,
as a partly-autogenerated and partly-manually-maintained file - a scheme
that might almost have been designed to create bugs.)

> > Yes, by dumping everything into /usr/bin, you might make binaries easier
> > to find for basically Linux-illiterate users who probably wouldn't know
> > what to do with the binaries once they found them.  You would, however,
> > make things very difficult for any sysadmin, power-user, or person trying
> > to learn Linux's guts, as well as anybody else (who didn't design the
> > system or spend days/weeks reading about it...) who might actually have a
> > good reason to be mucking around in those areas (i.e. not be on his way to
> > screwing it all up through ignorance or recklessness)--that is, if things
> > are linked or otherwise obscured.

Quite so.

> > So, if the Ubuntu developers really do want to simplify the filesystem
> > structure,

Quite frankly: there has been no discussion among Ubuntu developers
about doing anything of the kind, and I seriously doubt that it would
ever make it onto our to-do list which has more than enough on it
already without making work for ourselves.  The suggestion on this list
of moving binaries to /usr/bin hasn't been made by Ubuntu developers.

If it ever came up as a serious prospective Ubuntu development project,
I would argue strongly against it on the grounds that the gains, if any,
would be negligible compared to the work involved and the bugs that
would be likely to be created.  Simplifications here belong at higher
levels.  For example, the suggestion made somewhere in this thread that
there's no good reason for Firefox to require the full path to an
executable to open a resource seems like an excellent one.  It should
rarely be necessary to care about the full path to an executable at all,
never mind attempting to consolidate them all into one directory.

Cheers,

-- 
Colin Watson   [cjwat...@ubuntu.com]

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: apt does not update directory permissions

2011-12-07 Thread Christoph Mathys
On 12/07/2011 04:22 PM, Phillip Susi wrote:
> Did you use dpkg-statoverride?

Nope.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: apt does not update directory permissions

2011-12-07 Thread Phillip Susi

Did you use dpkg-statoverride?

On 12/7/2011 7:07 AM, Christoph Mathys wrote:

We are using debian packages to distribute our software inside the
company. Recently I messed up the permissions inside a package: A
whole directory-tree suddenly belonged to root:root, when it should
belong to someone else. The fix for the package was quick, permissions
now look ok again (checking with dpkg -c and clean install). However,
when I update the old (broken) package (dpkg -i or apt-get install,
does not matter), only the file permissions get corrected, all folders
still have wrong permissions.

Is this a "feature" of apt to only correct file permissions? Do I
seriously need to hack something into postinst to fix this correctly?

Christoph




--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


apt does not update directory permissions

2011-12-07 Thread Christoph Mathys
We are using debian packages to distribute our software inside the
company. Recently I messed up the permissions inside a package: A
whole directory-tree suddenly belonged to root:root, when it should
belong to someone else. The fix for the package was quick, permissions
now look ok again (checking with dpkg -c and clean install). However,
when I update the old (broken) package (dpkg -i or apt-get install,
does not matter), only the file permissions get corrected, all folders
still have wrong permissions.

Is this a "feature" of apt to only correct file permissions? Do I
seriously need to hack something into postinst to fix this correctly?

Christoph

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss