chiark / gitweb /
document --gpg=
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 9 Oct 2013 07:02:18 +0000 (08:02 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 9 Oct 2013 07:02:18 +0000 (08:02 +0100)
TODO
debian/changelog
dgit
dgit.1

diff --git a/TODO b/TODO
index 0df45bd3640eb73850a56084a766f1855dd00136..a5999feff78d4f8bfee677b04b35393543975288 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
---gpg= etc. @gpg should be in manual
-should pass @gpg to debsign
 --ssh= etc. @ssh should be in manual
 support SSH and DGIT_SSH
 --dgit= etc. @dgit should be in manual
index 16119b95eeb11cf849df6e76bec7a589c4f2adba..34f6cdb7fbf06df53710bac0abb27cf4976e47c2 100644 (file)
@@ -4,6 +4,7 @@ dgit (0.16~experimental2) experimental; urgency=low
   * Some code motion and cleanups.
   * push actually takes an optional suite, like it says in the synopsis.
   * Command execution reports from --dry-run go to stderr.
+  * Support --gpg=... to provide a replacement command for gpg.
 
  --
 
diff --git a/dgit b/dgit
index 6c1477cc1a2affccefb882dbda8550577096bae9..3c24c2c1b5ae9a70d3f9a42f0bbcb0ade4f0aefe 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -76,6 +76,8 @@ our %opts_opt_map = ('dget' => \@dget,
                      'ch' => \@changesopts,
                      'mergechanges' => \@mergechanges);
 
+our %opts_opt_cmdonly = ('gpg' => 1);
+
 our $keyid;
 
 our $debug = 0;
@@ -1134,6 +1136,7 @@ sub sign_changes ($) {
     if ($sign) {
        my @debsign_cmd = @debsign;
        push @debsign_cmd, "-k$keyid" if defined $keyid;
+       push @debsign_cmd, "-p$pgp[0]" if $pgp[0] ne 'gpg';
        push @debsign_cmd, $changesfile;
        runcmd_ordryrun @debsign_cmd;
     }
@@ -1690,6 +1693,7 @@ sub parseopts () {
                push @ropts, $_;
                $om->[0] = $2;
            } elsif (m/^--(\w+):(.*)/s &&
+                    !$opts_opt_cmdonly{$1} &&
                     ($om = $opts_opt_map{$1})) {
                push @ropts, $_;
                push @$om, $2;
diff --git a/dgit.1 b/dgit.1
index b3f8f95351ab63a47dac787754fee690dbd7526b..2f7ceccd1d5a231dea601e7a2b5cc925d57d8495 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -236,9 +236,12 @@ Specifies alternative programs to use instead of
 .BR dpkg-buildpackage ,
 .BR dpkg-genchanges ,
 .BR sbuild ,
+.BR gpg ,
 or
 .BR mergechanges .
-This applies only when the program is invoked directly by dgit.
+
+For dpkg-buildpackage, dpkg-genchanges, mergechanges and sbuild,
+this applies only when the program is invoked directly by dgit.
 .TP
 .RI \fB--dget:\fR option |\fB--dput:\fR option |...
 Specifies a single additional option to pass to
@@ -252,9 +255,14 @@ Specifies a single additional option to pass to
 or
 .BR mergechanges .
 Can be repeated as necessary.
-This applies only when the program is invoked directly by dgit.
-Usually, for passing options to dpkg-genchanges, use
+
+For dpkg-buildpackage, dpkg-genchanges, mergechanges and sbuild,
+this applies only when the program is invoked directly by dgit.
+Usually, for passing options to dpkg-genchanges, you should use
 .BR --ch: \fIoption\fR.
+
+NB that --gpg:option is not supported (because debsign does not
+have that facility).  But see -k.
 .TP
 .BR -d "\fIdistro\fR | " --distro= \fIdistro\fR
 Specifies that the suite to be operated on is part of distro