[pacman-dev] Could makepkg verify .dsc file?

Eli Schwartz eschwartz93 at gmail.com
Fri Dec 16 19:52:20 UTC 2016


On 12/16/2016 08:37 AM, Bruno Pagani wrote:
> You’re right about this, but in this particular case Debian does import
> and check the code in their own tree on each release, so their signature
> has a meaning to me. And also, they used to modify it (the source code),
> but thanks to your below question I have checked that again and it’s no
> longer the case. So in some way it’s like Debian signed some sort of
> code audit, or regarding the second point like they’ve forked the
> project and signed they own releases.

Not really true in the general case. :p There are several somewhat
famous Debian bugs regarding software they shipped that did what was to
them very offensive things, and the maintainer got thoroughly scolded
for having failed to catch it.

Point being, we are all human. Supposedly, Arch/AUR maintainers check
the code they use too. Debian are not some magical group of exalted
beings with higher standards of correctness that can be depended on. I
imagine careless AUR maintainers are no more common than careless Debian
maintainers -- or vice versa! ;)

> Well, at some point bs1770gain build system was downloading needed libs
> from around the internet at build time rather than linking against
> system ones, but that has been fixed upstream. I’m probably going to
> switch to upstream unsigned tarball, since the second point (“forked
> project”) doesn’t apply anymore, though the first one is still valid
> IMHO. If you have any opinion on this, please share it. ;)

Well then, they are doing a better job packaging this than they did in
the openssl fiasco. ;)
Joking aside, that still doesn't make them an upstream, ever. I would
still recommend using official upstream-sanctioned sources

>> What does authenticating Debian's checksums get us, that we couldn't
>> have gotten out of verifying the AUR maintainer's checksums?
> 
> Not sure to understand that one: what’s the point of PGP at all in
> makepkg then? Like I’ve said in my other emails responding to Allan, how
> is this different from a signed source verified by the maintainer while
> having just the checksum pasted in the PKGBUILD?

PGP in makepkg does whatever you tell it to, which unlike checksums is
*capable* of supplying authority in addition to integrity.

> Or if it’s just because of Debian vs real upstream again, see my point
> above and below.

But yes, it is "Debian vs. real upstream",  and I am not yet convinced.

> And I totally agree with that. The ambiguity here is around “code
> author”, since in that case I consider Debian to fulfil this role, but I
> definitively would like to hear your opinion on this now that I (hope
> to) have enlightened some points.

They are only an author for their modifications, and as for the rest
they are a code *auditor*. But so are Arch/AUR maintainers.

And see how that works out, in both projects, at scale. :(

> Agree again, but my point is not about this package in particular, it’s
> in the event of upstream providing sha*sums in a signed file as opposed
> to a detached signature. Not that currently makepkg supports verifying a
> sha*sums with detached signatures (maybe not by design but as
> consequence of source signature verification).

Well, Firefox upstream for one supplies sha512sums in a signed file.[1]
So this could in theory be used.

The problem is that you can copy the checksums into the PKGBUILD and
PGP-verify the checksum file, but unless you seriously reorganize
makepkg's verification logic you cannot download the checksum file,
PGP-verify it and *then* check the other files based on the checksum
file. And I don't think anyone else strongly cares about doing that, but
maybe if you provided a patch it would be accepted?
The other problem is formats for checksum files. ;) Theoretically, the
reusable output of sha*sum is a standard, but in practice some use the
BSD-style type, and as witnessed in the Firefox checksum manifest, there
may be many files listed in one checksum file using complex paths, so
that would have to be filtered.

As for attached signatures, that is hardly a Debian-specific idea, but I
confess I don't usually see file resources with attached signatures
floating around. The thing about them is that you need to have gpg in
order to transform the file into something usable -- that's why the
detached signature exists.

So I think it is, in practice, more or less limited to inline signing of
*messages*, and makepkg doesn't usually need to worry about those. But
in theory we could fix that and teach makepkg how to recognize sources
with builtin signatures. (Actually the case with git, and I had to
special-case it to add signed commit/tag support.)

-- 
Eli Schwartz

[1] https://ftp.mozilla.org/pub/firefox/releases/50.1.0/SHA512SUMS

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20161216/c970c753/attachment.asc>


More information about the pacman-dev mailing list