FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 10-03-2012, 09:24 PM
Andreas Beckmann
 
Default symlink vs. directory "conflicts"

Hi,

we recently had a thread here about missing copyright files due to bad
transition from /usr/share/doc/directory to
/usr/share/doc/symlink->other_directory, a lot of bugs were filed and
are getting fixed.
There are also more complicated^Wmessed up cases like sendmail that has
maintainer scripts that try to setup /u/s/doc/sendmail-foo -> sendmail
symlinks while at the same time shipping /u/s/doc/sendmail-foo/README
etc. where several packages are overwriting each other (without dpkg
having a chance to notice this). This is being cleaned up in #681147

So what is the general recommendation about packages that ship files
over symlinked directories? Should this be forbidden because it opens
cans of worms?

foo ships /usr/share/foo/foo.dat

bar ships /usr/share/foobar/bar.dat
/usr/share/foo -> foobar

Whoever gets installed first wins. And if bar decides to change the link
to e.g. /usr/share/foo -> f00bar, things get more funny. And foo loses
its foo.dat.

We should probably analyze the current situation first - how many
possible clashes do we currently have? Therefore we would need
"Contents" files annotated with types (and including directories), so
that we can look for conflicts. And while we do this, we could also look
for directory vs. file conflicts and symlink vs. file conflicts ...


Andreas


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506CAD0E.8020705@abeckmann.de">http://lists.debian.org/506CAD0E.8020705@abeckmann.de
 
Old 10-04-2012, 08:05 AM
Thibaut Paumard
 
Default symlink vs. directory "conflicts"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

Le 03/10/2012 23:24, Andreas Beckmann a écrit :
>
> So what is the general recommendation about packages that ship
> files over symlinked directories? Should this be forbidden because
> it opens cans of worms?

I don't think that this should be forbidden, but it must be clear
which package owns the directory(ies) and the symlink(s). Any change
in the directory layout must be handled with care and considered a
transition.

> foo ships /usr/share/foo/foo.dat
>
> bar ships /usr/share/foobar/bar.dat /usr/share/foo -> foobar

/usr/share/foo should certainly be considered as belonging to package
foo, also foo maintainer may decide to give it to foo-data or
foo-common for instance. There should be a "foo Policy", discussed
between the maintainers of the relevant packages, to decide which
files may or may not be written in /u/s/foo.

In the case you quote, bar is probably RC-buggy. bar maintainer should
perhaps ask foo maintainer whether it's ok to install bar.dat (perhaps
as a symlink) in /u/s/foo.

Regards, Thibaut.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJQbUMzAAoJEJOUU0jg3ChAzu0P/R1EuzHAJHio1W5wifJYS1yl
22xemXVY35lenZQg6xCEyMgnt6v6GGwGWf+5iNA9Ism0ofSs7c PhEj9MTDaT2G7j
KOUnI0uQ71YUUvWbTgAwgLQNQY+26FJnT/0yhrtwh9GUU4LrhcVk5LyukXpj8PDH
2OASNEk16jVIP8TiNTWAwHKfYq7n3PrRXn+5hyrh37mfHIbxOY OsiX00IrrbRGAX
w00V1qsDno+xAIX7yS1cU0SxC0jQx/RoaaRszq96KitK/aBzTeIqNI2FjCKzidD6
BGfW8WqZLSt7bi6U+A4hTyT23NVGpAOQFDSa7NyfyDvncnh0BT aBdJ126pTZ0BJy
h6lkdEEUfDskiJU0IPs9QVlLuOCT8mwWX207LUg4Es8DjHCeNi cUMJDUi6Hf+JWI
rUJ95VHNVBl4Q8Rua/MoDE68HQxEsHnNmdaPrz07TsLwSyGcRDBpjfWWJDotfHIR
EYZp1Foks0cehdelm+kko42KDDgeVfzFtYJD+06IjkzK6vn5UI fzHZnZjXQD83VG
6n5Q1zHwrxAikpFT4GUAA0E2XNkOAHbESBadUk++jOQnfkdacU CJArwKs+hRt6YM
u9TvkwDpAdkWtA/HNh7y/FKB7TDqRDMmgzsIvYvfx7WRNJgP2zWq3rRyyvBOfZ4v
WVPE/H7ZxiwzB8FCI5/a
=jZVA
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506D4333.5050502@debian.org">http://lists.debian.org/506D4333.5050502@debian.org
 
Old 10-04-2012, 08:53 AM
Russ Allbery
 
Default symlink vs. directory "conflicts"

Andreas Beckmann <debian@abeckmann.de> writes:

> There are also more complicated^Wmessed up cases like sendmail that has
> maintainer scripts that try to setup /u/s/doc/sendmail-foo -> sendmail
> symlinks while at the same time shipping /u/s/doc/sendmail-foo/README
> etc. where several packages are overwriting each other (without dpkg
> having a chance to notice this). This is being cleaned up in #681147

> So what is the general recommendation about packages that ship files
> over symlinked directories? Should this be forbidden because it opens
> cans of worms?

Yes. This sort of thing:

> foo ships /usr/share/foo/foo.dat

> bar ships /usr/share/foobar/bar.dat
> /usr/share/foo -> foobar

is clearly broken and can't ever be the situation we actually want to have
in the archive. In addition to the problem you name involving bar moving
the symlink, what happens if bar adds a file /usr/share/foobar/foo.dat?
Does dpkg even correctly realize that the two packages conflict because
they both ship the same file (just via different paths)?

The trick, of course, will be finding this sort of problem so that
maintainers can avoid it proactively rather than having to react to bugs
or QA reports. I'm not sure if we'll be able to do that, which would be
unfortunate. But I think it's fairly clear that situation isn't sensible
or stable.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87ehlevcrf.fsf@windlord.stanford.edu">http://lists.debian.org/87ehlevcrf.fsf@windlord.stanford.edu
 
Old 10-04-2012, 09:34 AM
Guillem Jover
 
Default symlink vs. directory "conflicts"

On Thu, 2012-10-04 at 01:53:56 -0700, Russ Allbery wrote:
> Andreas Beckmann <debian@abeckmann.de> writes:
> > So what is the general recommendation about packages that ship files
> > over symlinked directories? Should this be forbidden because it opens
> > cans of worms?
>
> Yes.

Right.

> This sort of thing:
>
> > foo ships /usr/share/foo/foo.dat
>
> > bar ships /usr/share/foobar/bar.dat
> > /usr/share/foo -> foobar
>
> is clearly broken and can't ever be the situation we actually want to have
> in the archive. In addition to the problem you name involving bar moving
> the symlink, what happens if bar adds a file /usr/share/foobar/foo.dat?
> Does dpkg even correctly realize that the two packages conflict because
> they both ship the same file (just via different paths)?

Nope, dpkg does not currently have enough information (missing
metadata) to know if a path was shipped in the package as a directory
or as a symlink, and to be able to distinguish between admin modified
directory←→symlinks. AFAIR there's already a bug report about this kind
of situation on dpkg.

> The trick, of course, will be finding this sort of problem so that
> maintainers can avoid it proactively rather than having to react to bugs
> or QA reports. I'm not sure if we'll be able to do that, which would be
> unfortunate. But I think it's fairly clear that situation isn't sensible
> or stable.

For the dpkg side of things I'm planning on working on the database
metadata tracking for 1.17.x, which is needed for other stuff, and
as a side effect this kind of situation could be handled. For now
something else will be needed to spot this kind of problems though.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121004093413.GA5251@gaara.hadrons.org">http://lists.debian.org/20121004093413.GA5251@gaara.hadrons.org
 
Old 10-05-2012, 10:29 PM
Andreas Beckmann
 
Default symlink vs. directory "conflicts"

On 2012-10-04 11:34, Guillem Jover wrote:
> Nope, dpkg does not currently have enough information (missing
> metadata) to know if a path was shipped in the package as a directory
> or as a symlink, and to be able to distinguish between admin modified
> directory←→symlinks. AFAIR there's already a bug report about this kind
> of situation on dpkg.

Does dpkg know the link target that was shipped in the package? I think
at least debsums cannot report modified symlinks ... That's probably
something that should be included dpkg's metadata, too.
(Hmm, M-A: same packages shipping a shared symlink with a different
target - does this fail properly?)


Andreas


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506F5F42.6030805@abeckmann.de">http://lists.debian.org/506F5F42.6030805@abeckmann.de
 
Old 10-05-2012, 10:48 PM
Andreas Beckmann
 
Default symlink vs. directory "conflicts"

Just a few examples where something is installed over existing symlinks:

/usr/share/php/doc/Net_Ping != /usr/share/doc/php5-common/PEAR/Net_Ping (php-net-ping)
/usr/share/texmf/doc/fonts != /usr/share/doc/texmf/fonts (cm-super-minimal)
/usr/share/texmf/doc/latex != /usr/share/doc/texmf/latex (alqalam)
/usr/share/doc/gtkmm-3.0/tutorial != /usr/share/doc/libgtkmm-3.0-doc/tutorial (gtkmm-documentation)
/usr/include/python3.2/CXX != /usr/include/python3.2mu/CXX (python3-cxx-dev)

syntax is

/path/to/something != /the/real/location/of/something (package)

where $(readlink -f /path/to) returns "/the/real/location/of"
and "package" ships /path/to/something


Andreas


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506F63C9.6090009@abeckmann.de">http://lists.debian.org/506F63C9.6090009@abeckmann.de
 
Old 10-06-2012, 12:30 AM
Guillem Jover
 
Default symlink vs. directory "conflicts"

On Sat, 2012-10-06 at 00:29:22 +0200, Andreas Beckmann wrote:
> On 2012-10-04 11:34, Guillem Jover wrote:
> > Nope, dpkg does not currently have enough information (missing
> > metadata) to know if a path was shipped in the package as a directory
> > or as a symlink, and to be able to distinguish between admin modified
> > directory←→symlinks. AFAIR there's already a bug report about this kind
> > of situation on dpkg.
>
> Does dpkg know the link target that was shipped in the package?

Nope, that's part of the missing metadata.

> I think at least debsums cannot report modified symlinks ...

Right, debsums has as much information as dpkg.

> That's probably something that should be included dpkg's metadata, too.

Well, storing that a path was a symlink w/o storing where it pointed
to would be a bit useless , but yes the idea is that most metadata
in the tar header will be preserved.

> (Hmm, M-A: same packages shipping a shared symlink with a different
> target - does this fail properly?)

Yes, in that case the file system is used as reference to check if
they match, so unfortunately, currently if such symlink gets changed
and a new M-A:same instance gets installed it will fail to unpack.

regards,
guillem


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121006003004.GA30363@gaara.hadrons.org">http://lists.debian.org/20121006003004.GA30363@gaara.hadrons.org
 

Thread Tools




All times are GMT. The time now is 10:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org