From: Mark Wooding Date: Sat, 13 Feb 2016 11:06:16 +0000 (+0000) Subject: bin/mdw-sbuild: Don't sign the `.dsc' file early. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/8c67a535e61f23ae8b1616bf82690e1b675691b2 bin/mdw-sbuild: Don't sign the `.dsc' file early. debsign(1) will prompt about whether to re-sign it later, which is just annoying. Conveniently, this cleans up the messy source-package construction logic a lot. --- diff --git a/bin/mdw-sbuild b/bin/mdw-sbuild index 84c24d8..7bbeb3c 100755 --- a/bin/mdw-sbuild +++ b/bin/mdw-sbuild @@ -53,7 +53,7 @@ EOF ;; a) buildopts="${buildopts+$buildopts }-a" ;; i) buildopts="${buildopts+$buildopts }-i" ;; - k) keyid=$OPTARG ;; + k) signp=t keyid=$OPTARG ;; n) buildopts="${buildopts+$buildopts }-n" noactp=t ;; t) buildopts="${buildopts+$buildopts }-t$OPTARG" ;; *) bogusp=t ;; @@ -65,6 +65,7 @@ case $# in *) bogusp=t ;; esac case $bogusp in t) fail_usage ;; esac +case $noactp in t) signp=nil ;; esac ###-------------------------------------------------------------------------- ### Main program. @@ -82,20 +83,10 @@ EOF case ${pkg+t} in t) ;; *) fail "can't figure out the package name" ;; esac case ${ver+t} in t) ;; *) fail "can't figure out the package version" ;; esac -## Build a Debian source package. If we're signing, use `dpkg-buildpackage' -## for this so that we get an uploadable `_source.changes' file out the end -## of it. -case ${keyid+t},$noactp in - t,nil) - dpkg-buildpackage -S -k"$keyid" - cd .. - ;; - *) - dir=$(pwd); base=${dir##*/} - cd .. - dpkg-source -b "$base" - ;; -esac +## Build a Debian source package. Don't sign anything yet. That will happen +## at the end, all in one go. +dpkg-buildpackage -S -uc -us +cd .. dsc=${pkg}_${ver}.dsc [ -f "$dsc" ] || fail "where is my \`.dsc' file?"