On Sat, Aug 18, 2007 at 11:05:37AM +0200, Kurt Roeckx wrote:
> On Sat, Aug 18, 2007 at 03:13:32AM +0200, Sven Mueller wrote:
> > 
> > He doesn't give any information _why_ this complicates packaging that
> > much, while his decision imposes additional work and complexity on
> > others (be it the exception in lintian and probably linda or the
> > difference between "dpkg -L" and the contents of the md5sums file, which
> > makes integrity checking a bit harder).

But on the other hand lets you know which package owns that file. If you
worry about an attacker removing a line from .md5sums file, the same could
have been done from the .list file. From a security POV, is not more
difficult removing a line from the md5sums file that removing it from the
.list file, ending in both cases with a non-listed file (either in the
.list or in the .md5sums file). As a mater of fact, there are a lot of
non-listed files under /var because they are created/removed from
maintainer scripts.

I think that if dpkg is to create .md5sums or .sha1 files it should do that
for the files listed in the .md5sums file (or for all files in case it
does not exists), or should at least have a mechanism to explicitely skip
files from that if needed.

> > 
> > IMHO, packages (.deb) should only include files which are either listed
> > in conffiles or in md5sums.
> > 
> > The hash files in aspell/ispell/wordlist packages (for example*:
> > aspell-en, idutch) are neither conffiles nor in md5sums. They are said
> > to be arch-dependend and if I understand the aspell-en debian/rules
> > correctly, they are shipped as empty files. I don't see why they
> > couldn't just be created empty by the postinst before building the hash
> > tables. I especially don't see how that complicates packaging.
> 
> The aspell-autobuildhash / ispell-autobuildhash manpage says create an
> empty .compat, or one with 0 in it.  I guess most people just create the
> empty one.  This file is then used to decide if the hash file needs to be
> (re-)created or not.
> 
> Reading the manpage again I see:
>        This
>        empty file will be overwritten when the real hash is created, but will
>        make the hash be removed at package removal without any magic being
>        done in the postrm and will also help to keep track about which package
>        owns that file.
> 
> I guess that's the "more complicated" part.

This only affects the .compat files and the hash (ispell or aspell) files
when using {i,a}spell-autobuildhash, that is why not all ispell dicts are
affected. For some packages (e.g., aspell-en) this means around 13 files.
Of course you can take the list and create those files from postinst and
make sure they are removed from postrm, but we found current system simpler
and robust. And, being for something under /var, not that problematic, very
few things under /var should worry about md5 sums.

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to