usertags 688319 + debian-packaging
thanks

Hi there!

On Fri, 28 Sep 2012 15:07:47 +0200, Gergely Nagy wrote:
> FWIW, since the example given in the bug report is fairly verbose, and
> that tends to put off some people, I'd like to mention that yodack does
> not need the verboseness, that is merely an option.
>
> The following command does exactly the same thing that the example I
> originally posted:
>
> $ yodack ftp-master dm [email protected] \
>          allow dh-exec ivykis deny eglibc bash

IMHO this relies too much on the debian-keyring package, which is not
always in sync with the real situation:
=====
$ who-uploads bacula
Uploads for bacula:
5.2.6+dfsg-5 to unstable: <unrecognised public key (31455D17)>
5.2.6+dfsg-4 to unstable: <unrecognised public key (31455D17)>
5.2.6+dfsg-3 to unstable: Luca Capello <[email protected]>

$ gpg --no-default-keyring \
      --keyring /usr/share/keyrings/debian-maintainers.gpg \
      --list-key 31455D17
gpg: error reading key: public key not found

$ wget -O - http://ftp-master.debian.org/dm-uploaders.html | grep -A 3 31455D17
--2012-10-04 11:24:31--  http://ftp-master.debian.org/dm-uploaders.html
Resolving ftp-master.debian.org (ftp-master.debian.org)... 128.148.34.3
Connecting to ftp-master.debian.org (ftp-master.debian.org)|128.148.34.3|:80... 
connected.
HTTP request sent, awaiting response... 200 OK
Length: 68299458 (65M) [text/html]
Saving to: ‘STDOUT’

 0% [                                                             ] 0           
--.-K/s                  <td 
align="left">5E2A59462C7B2CD307FB8A5A949C322631455D17</td>
  </tr>
  <tr valign="top">
    <td align="left">[email protected]</td>
 7% [===>                                                         ] 5,179,371   
 814KB/s  eta 97s    ^C

$ git clone git://anonscm.debian.org/users/algernon/yodack.git
Cloning into 'yodack'...
remote: Counting objects: 92, done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 92 (delta 39), reused 0 (delta 0)
Receiving objects: 100% (92/92), 42.93 KiB, done.
Resolving deltas: 100% (39/39), done.

$ cd yodack/
$ USER=gismo ./yodack ftp-master dm 31455D17 allow bacula
A known DM permissions to set, you must.

$ git diff
[attached below]
$ USER=gismo ./yodack ftp-master dm 31455D17 keyring ~/.gnupg/pubring.gpg allow 
bacula
[verification and GnuPG stuff]
Upload to 'ftp-master', how to I know not.
[no exit error code]

$ ln -s ~/src/Debian/yodack/yodack.conf ~/.yodack.conf
$ USER=gismo ./yodack ftp-master dm 31455D17 keyring ~/.gnupg/pubring.gpg allow 
bacula
[verification and GnuPG stuff]
Uploading gismo-1349344867.dak-commands to ftp-master.d.o...

$ 
=====

BTW, is there any reason not to use dput/dcut for upload, but instead a
custom curl command?

Thx, bye,
Gismo / Luca

From d6a686729a1ed59ee57ed6f625c74f46c7f02fae Mon Sep 17 00:00:00 2001
From: Luca Capello <[email protected]>
Date: Thu, 4 Oct 2012 12:04:23 +0200
Subject: [PATCH] yodack: add keyring option

The Debian Maintainer keyring shipped in the debian-keyring package is
not always in sync with the real situation, i.e. the list available at
<http://ftp-master.debian.org/dm-uploaders.html>.
---
 man1/yodack.1 |    7 ++++---
 yodack        |    9 +++++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/man1/yodack.1 b/man1/yodack.1
index 08a4ffa..dfe3cf3 100644
--- a/man1/yodack.1
+++ b/man1/yodack.1
@@ -4,9 +4,9 @@
 .SH "NAME"
 yodack \- Ye Olde Debian Archive Control Kit
 .SH "SYNOPSIS"
-.BI "yodack " ftp\-master " dm " example@org " allow " "this that" " deny " something\-else
+.BI "yodack " ftp\-master " dm " example@org " keyring " keyring.gpg " allow " "this that" " deny " something\-else
 
-.BI "yodack at " ftp\-master " for dm " example@org " allow upload of package " "this, that" ", but deny uploading " something\-else.
+.BI "yodack at " ftp\-master " for dm " example@org " in keyring " keyring.gpg " allow upload of package " "this, that" ", but deny uploading " something\-else.
 
 .SH "DESCRIPTION"
 Ye Olde Debian Archive Control Kit (or \fByodack\fR for short) is a
@@ -36,7 +36,8 @@ end up being sent, however.
 Grant or revoke access to a particular Debian Maintainer (identified
 by the \fIkey\-id\fR) on the listed packages.
 
-The maintainer will be looked up in the Debian Maintainer keyring, and
+The maintainer will be looked up in the Debian Maintainer keyring by default
+if an alternative keyring is specified via the \fBkeyring\fR option, and
 Yodack will ask for verification - or complain, if there is more than
 one match. Yodack does not like to choose, it wants the young
 apprentices to make their own choices.
diff --git a/yodack b/yodack
index 836c41f..8a6d91a 100755
--- a/yodack
+++ b/yodack
@@ -107,7 +107,7 @@ EOF
 
 yodack_add_dm_fingerprint () {
         if fprs=$(gpg --no-options --no-default-keyring \
-                      --keyring /usr/share/keyrings/debian-maintainers.gpg \
+                      --keyring "$2" \
                       --list-options no-show-photo --fingerprint "$1" 2>/dev/null); then
                 :
         else
@@ -224,6 +224,7 @@ yodack_parse_argv_action_dm () {
         stop=0
         allow=0
         deny=0
+        keyring=/usr/share/keyrings/debian-maintainers.gpg
 
         while [ $# -gt 0 ] && [ "$stop" -eq 0 ]; do
                 case "$1" in
@@ -242,6 +243,10 @@ yodack_parse_argv_action_dm () {
                                 deny=1
                                 allow=0
                                 ;;
+                        "keyring")
+                                keyring="$2"
+                                shift
+                                ;;
                         *)
                                 if [ "$allow" -eq 1 ]; then
                                         allow_list="${allow_list} $(yodack_arg_strip $1)"
@@ -256,7 +261,7 @@ yodack_parse_argv_action_dm () {
         done
 
         yodack_add_action "dm"
-        yodack_add_dm_fingerprint "${keyid}"
+        yodack_add_dm_fingerprint "${keyid}" "${keyring}"
         yodack_add_dm_allow "${allow_list}"
         yodack_add_dm_deny "${deny_list}"
         yodack_add_section_end
-- 
1.7.10.4

Attachment: pgpPc0vAGIVbN.pgp
Description: PGP signature

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to