Parcourir la source

dpkg-buildpackage: Honor new DEB_SIGN_KEYID environment variable

Use the new environment variable if set, as default value to pass to
gnupg.

Closes: #615813, #719418

Suggested-by: Harald Dunkel <harri@afaics.de>
Guillem Jover il y a 13 ans
Parent
commit
f397e9d72b
3 fichiers modifiés avec 11 ajouts et 2 suppressions
  1. 2 0
      debian/changelog
  2. 7 1
      man/dpkg-buildpackage.1
  3. 2 1
      scripts/dpkg-buildpackage.pl

+ 2 - 0
debian/changelog

@@ -63,6 +63,8 @@ dpkg (1.17.2) UNRELEASED; urgency=low
   * Use a simple list to track packages owning a file, instead of using a
   * Use a simple list to track packages owning a file, instead of using a
     list of arrays of pointers which waste 10 pointers per non-shared file,
     list of arrays of pointers which waste 10 pointers per non-shared file,
     instead of 1. This significantly reduces dpkg memory usage.
     instead of 1. This significantly reduces dpkg memory usage.
+  * Honor new DEB_SIGN_KEYID environment variable in dpkg-buildpackage.
+    Suggested by Harald Dunkel <harri@afaics.de>. Closes: #615813, #719418
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * German (Sven Joachim).
   * German (Sven Joachim).

+ 7 - 1
man/dpkg-buildpackage.1

@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
 .
 .
-.TH dpkg\-buildpackage 1 "2013-04-02" "Debian Project" "dpkg utilities"
+.TH dpkg\-buildpackage 1 "2013-08-31" "Debian Project" "dpkg utilities"
 .SH NAME
 .SH NAME
 dpkg\-buildpackage \- build binary or source packages from sources
 dpkg\-buildpackage \- build binary or source packages from sources
 .
 .
@@ -243,6 +243,12 @@ Show the usage message and exit.
 Show the version and exit.
 Show the version and exit.
 .
 .
 .SH ENVIRONMENT
 .SH ENVIRONMENT
+.TP
+.B DEB_SIGN_KEYID
+If set, it will be used to sign the \fB.changes\fP and \fB.dsc\fP files.
+Overridden by the \fB\-k\fP option.
+
+.SS Reliance on exported environment flags
 Even if \fBdpkg\-buildpackage\fP exports some variables, \fBdebian/rules\fP
 Even if \fBdpkg\-buildpackage\fP exports some variables, \fBdebian/rules\fP
 should not rely on their presence and should instead use the
 should not rely on their presence and should instead use the
 respective interface to retrieve the needed values.
 respective interface to retrieve the needed values.

+ 2 - 1
scripts/dpkg-buildpackage.pl

@@ -111,10 +111,11 @@ sub usage {
 my @debian_rules = ('debian/rules');
 my @debian_rules = ('debian/rules');
 my @rootcommand = ();
 my @rootcommand = ();
 my $signcommand;
 my $signcommand;
-my ($admindir, $signkey, $usepause, $noclean,
+my ($admindir, $usepause, $noclean,
     $cleansource, $since, $maint,
     $cleansource, $since, $maint,
     $changedby, $desc, $parallel);
     $changedby, $desc, $parallel);
 my $checkbuilddep = 1;
 my $checkbuilddep = 1;
+my $signkey = defined $ENV{DEB_SIGN_KEYID} ? $ENV{DEB_SIGN_KEYID} : undef;
 my $signforce = 0;
 my $signforce = 0;
 my $signreleased = 1;
 my $signreleased = 1;
 my $signsource = 1;
 my $signsource = 1;