Discussion:
minisign support in uscan
(too old to reply)
nick black
2025-01-11 20:20:01 UTC
Permalink
i'm beginning to see use of minisign[0] as an alternative to GPG
for signing releases[2]. i'm completely ambivalent with regards to
the merits of minisign, but would like to be able to verify them
with uscan.

looking at the uscan man page and code[1], i don't see any way
to specify an alternative to gpg, though uscan apparently looks
for gpgv, sopv, rsop and friends, and there's already a
tool-specific case in verify() (sopv and gpgv appear to be
cli-incompatible). so adding code to invoke minisign looks
pretty trivial. the problem would be: how do i tell uscan to use
minisign, in the likely presence of gpgv? minisign probably
cannot verify everything gpg can, so we want to continue using
gpg by default.

i could probably convert the minisig signature to a gpg one (not
certain of that), but we'd need some way to tell uscan to do
that, at which point we probably ought just use minisig.

selecting a different verification backend seems orthogonal to
the pgpmode= options of uscan, so it doesn't belong in that set.

adding support would likely mean adding minisign as at least a
Recommends for devscripts, and possibly a Depends. minisign is
pretty small at 16.7 kB downloaded and 49.2 kB installed, but
it does depend on libsodium23, which is depended on by a fair
number of things (including vim for some reason). libsodium23 adds
165/438 kB for a total of 181.7 kB down and 487.2 installed. it
is furthermore crypto-related and thus sensitive; i thought it
prudent to ask the list.

so, unless i'm missing something (totally possible), i'd like to:

1) add a `sigtype` option to uscan, defaulting to 'pgp', with
alternative 'minisign'. other values are errors with exit.
2) explicit provision of `sigtype` in conjunction with either
explicit or implicit `pgpmode=none` (i.e. due to mode=svn)
will be considered an error and result in exit. change
`pgpsigurimangle` to work this way as well (it is currently
allowed in conjunction with pgpmode=none, which i dislike).
3) augment the binary-finding code in uscan to look exclusively
for `minisign` when `sigtype=minisign` (and not look for it
otherwise). failure to find it is error + exit.
4) augment the verification code in uscan to use `minisign`
iff `pgpmode=minisign` and it was discovered in step 3.
5) add `minisign` as a Depends for `devscripts`.

i don't think this justifies any kind of generalized
verification system in uscan (and am not particularly interested
in writing one), nor do i think it's worthwhile to alias or
rename e.g. `pgpsigurlmangle` or `pgpmode`.

i've checked, and a properly ASCII-armored minisign public key
will satisfy uscan up through the verification attempt.

are there objections? am i missing something? thanks! i think i
could have this done todayish.

--rigorously, nick

[0] https://jedisct1.github.io/minisign/
[1] lib/Devscripts/Uscan/Keyring.pm (devscripts-2.24.10)
[2] https://ziglang.org/download/
--
nick black -=- https://nick-black.com
to make an apple pie from scratch,
you need first invent a universe.
nick black
2025-01-11 20:50:01 UTC
Permalink
Post by nick black
i'm beginning to see use of minisign[0] as an alternative to GPG
for signing releases[2]. i'm completely ambivalent with regards to
the merits of minisign, but would like to be able to verify them
with uscan.
so this is how watch might look for minisign packages[0]:

--------
version=4
# example URIs:
# https://ziglang.org/download/0.13.0/zig-0.13.0.tar.xz
# https://ziglang.org/download/0.13.0/zig-0.13.0.tar.xz.minisig
opts="sigtype=minisign, \
pgpsigurlmangle=s/$/.minisig/, \
dversionmangle=s/\+dfsg(\.?\d+)?$//, \
repacksuffix=+dfsg" \
https://ziglang.org/download/ .*/zig-([0-9\.]*)\.tar\.xz \
debian uupdate
--------

no one needs change their packages except people who have
pgpmode=none despite the presence of pgpsigurlmangle (which will
become an error if i execute my plan as proposed).

[0] https://salsa.debian.org/nickblack/zig/-/blob/main/debian/watch
--
nick black -=- https://nick-black.com
to make an apple pie from scratch,
you need first invent a universe.
Simon Josefsson
2025-01-13 10:30:01 UTC
Permalink
Post by nick black
i'm beginning to see use of minisign[0] as an alternative to GPG
for signing releases[2]. i'm completely ambivalent with regards to
the merits of minisign, but would like to be able to verify them
with uscan.
That would be great -- upstreams are using other mechanisms to sign
their releases today, like Sigsum, Sigstore, gitsign S/MIME etc, and I
don't think there is any reason why 'uscan' shouldn't support all of
them.

This reminds me about the 'apt-get install minisign' package naming
concern that we tried to flesh out a migration policy for earlier. I
think I ultimately got lost trying to work out the migration flow for
how to achieve that...

/Simon
Yadd
2025-01-13 10:50:01 UTC
Permalink
Post by Simon Josefsson
Post by nick black
i'm beginning to see use of minisign[0] as an alternative to GPG
for signing releases[2]. i'm completely ambivalent with regards to
the merits of minisign, but would like to be able to verify them
with uscan.
That would be great -- upstreams are using other mechanisms to sign
their releases today, like Sigsum, Sigstore, gitsign S/MIME etc, and I
don't think there is any reason why 'uscan' shouldn't support all of
them.
gitsign is supported
Post by Simon Josefsson
This reminds me about the 'apt-get install minisign' package naming
concern that we tried to flesh out a migration policy for earlier. I
think I ultimately got lost trying to work out the migration flow for
how to achieve that...
/Simon
Simon Josefsson
2025-01-13 13:10:02 UTC
Permalink
Post by Yadd
Post by Simon Josefsson
Post by nick black
i'm beginning to see use of minisign[0] as an alternative to GPG
for signing releases[2]. i'm completely ambivalent with regards to
the merits of minisign, but would like to be able to verify them
with uscan.
That would be great -- upstreams are using other mechanisms to sign
their releases today, like Sigsum, Sigstore, gitsign S/MIME etc, and I
don't think there is any reason why 'uscan' shouldn't support all of
them.
gitsign is supported
I was unclear, I meant this gitsign:

https://github.com/sigstore/gitsign

I don't think this approach is supported by uscan?

I only see about PGP on
https://manpages.debian.org/testing/devscripts/uscan.1.en.html

/Simon
Post by Yadd
Post by Simon Josefsson
This reminds me about the 'apt-get install minisign' package naming
concern that we tried to flesh out a migration policy for earlier. I
think I ultimately got lost trying to work out the migration flow for
how to achieve that...
/Simon
nick black
2025-01-13 11:00:01 UTC
Permalink
Post by Simon Josefsson
That would be great -- upstreams are using other mechanisms to sign
their releases today, like Sigsum, Sigstore, gitsign S/MIME etc, and I
don't think there is any reason why 'uscan' shouldn't support all of
them.
i've created #1092818 for this, and am working on it in
https://salsa.debian.org/nickblack/devscripts/-/tree/nickblack/uscan-minisign
Post by Simon Josefsson
This reminds me about the 'apt-get install minisign' package naming
concern that we tried to flesh out a migration policy for earlier. I
think I ultimately got lost trying to work out the migration flow for
how to achieve that...
i'm not familiar with this. do you have a reference?
--
nick black -=- https://nick-black.com
to make an apple pie from scratch,
you need first invent a universe.
Simon Josefsson
2025-01-13 13:10:01 UTC
Permalink
Post by nick black
Post by Simon Josefsson
That would be great -- upstreams are using other mechanisms to sign
their releases today, like Sigsum, Sigstore, gitsign S/MIME etc, and I
don't think there is any reason why 'uscan' shouldn't support all of
them.
i've created #1092818 for this, and am working on it in
https://salsa.debian.org/nickblack/devscripts/-/tree/nickblack/uscan-minisign
\o/
Post by nick black
Post by Simon Josefsson
This reminds me about the 'apt-get install minisign' package naming
concern that we tried to flesh out a migration policy for earlier. I
think I ultimately got lost trying to work out the migration flow for
how to achieve that...
i'm not familiar with this. do you have a reference?
Sorry I confused it with signify:

https://tracker.debian.org/pkg/signify-openbsd

See https://lists.debian.org/debian-devel/2024/10/msg00031.html

/Simon
nick black
2025-01-14 01:00:01 UTC
Permalink
minisign is derived from (openbsd's) signify, so easily done!
Post by Simon Josefsson
See https://lists.debian.org/debian-devel/2024/10/msg00031.html
thanks!
--
nick black -=- https://nick-black.com
to make an apple pie from scratch,
you need first invent a universe.
Loading...