[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#40726: dpkg-dev: [PATCH] gpg with RSA keys in dpkg-buildpackage



Package: dpkg-dev
Version: 1.4.1.3
Severity: normal

In order to use gpg with my RSA key instead of my DSA key, I need to give
gpg either my keyid or not give it a --local-user option so it'll use the
default keyid.  dpkg-buildpackage doesn't support this, however adding the
necessary support is trivial:

--- dpkg-buildpackage~	Mon May 31 15:31:29 1999
+++ dpkg-buildpackage	Sun Jul  4 03:39:28 1999
@@ -14,6 +14,7 @@
 Usage: dpkg-buildpackage [options]
 Options: -r<gain-root-command>
          -p<sign-command>
+         -k<keyid>     the key to use for signing
          -sgpg         the sign-command is called like GPG
          -spgp         the sign-command is called like PGP 
          -us           unsigned source
@@ -64,6 +65,7 @@
 	-h)	usageversion; exit 0 ;;
 	-r*)	rootcommand="$value" ;;
 	-p*)	signcommand="$value"; warnpgp='' ;;
+	-k*)	signkey="$value" ;;
 	-sgpg)  signinterface=gpg ;;
 	-spgp)  signinterface=pgp ;;
 	-us)	signsource=: ; warnpgp='' ;;
@@ -121,11 +123,11 @@
 		# --textmode doesn't seem to work; we use perl to filter ^M;
 		# this doesn't affect the actual signature.
 		(cat "../$1" ; echo "") | \
-		$signcommand --local-user "$maintainer" --clearsign --armor \
+		$signcommand --local-user "${signkey:-$maintainer}" --clearsign --armor \
 			--textmode --output - - | \
 			perl -n -p -e 's/\r$//' > "../$1.asc" 
 	else
-		$signcommand -u "$maintainer" +clearsig=on -fast <"../$1" \
+		$signcommand -u "${signkey:-$maintainer}" +clearsig=on -fast <"../$1" \
 			>"../$1.asc"
 	fi
 	echo


-- System Information
Debian Release: potato
Kernel Version: Linux icarus2 2.2.10-ac3 #1 Tue Jun 22 00:51:25 PDT 1999 i586 unknown

Versions of the packages dpkg-dev depends on:
ii  perl            5.004.05-1     Fake package used for a smooth upgrade


Reply to: