From 5e9e7146d4fc4c365cf673a6458f9cfc0f9f801b Mon Sep 17 00:00:00 2001 Message-Id: <5e9e7146d4fc4c365cf673a6458f9cfc0f9f801b.1717755124.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 3 May 2020 17:47:32 +0100 Subject: [PATCH] bin/mdw-sbuild{,-server}: Push arguments through to `dpkg-buildpackage'. Organization: Straylight/Edgeware From: Mark Wooding Both now have `-A' options to make this work. --- bin/mdw-sbuild | 13 ++++++++++--- bin/mdw-sbuild-server | 7 +++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bin/mdw-sbuild b/bin/mdw-sbuild index a8864c7..18f9901 100755 --- a/bin/mdw-sbuild +++ b/bin/mdw-sbuild @@ -34,8 +34,8 @@ fail_usage () { usage >&2; exit 1; } ### Parse options. bogusp=nil noactp=nil signp=nil -unset buildopts pkgs -while getopts "haik:np:t:" opt; do +unset buildopts pkgs dbpargs +while getopts "haik:np:t:A:" opt; do case $opt in h) usage @@ -49,6 +49,7 @@ Options: -n Don't actually do the build. -p DIR Upload additional packages from DIR. -t TARGET Build in TARGET build environment. + -A ARGS Pass ARGS to \`dpkg-buildpackage'. EOF exit 0 ;; @@ -58,6 +59,10 @@ EOF n) buildopts="${buildopts+$buildopts }-n" noactp=t ;; p) pkgs=$OPTARG ;; t) buildopts="${buildopts+$buildopts }-t$OPTARG" ;; + A) + buildopts="${buildopts+$buildopts }-A$OPTARG" + dbpargs="${dbpargs+$dbpargs }$OPTARG" + ;; *) bogusp=t ;; esac done @@ -88,7 +93,7 @@ case ${ver+t} in t) ;; *) fail "can't figure out the package version" ;; 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 -d -i +dpkg-buildpackage -S -uc -us -d -i $dbpargs cd .. dsc=${pkg}_${ver}.dsc [ -f "$dsc" ] || fail "where is my \`.dsc' file?" @@ -113,3 +118,5 @@ rm $chchch case $signp in t) debsign -k"$keyid" "${pkg}_${ver}_multi.changes" ;; esac + +###----- That's all, folks -------------------------------------------------- diff --git a/bin/mdw-sbuild-server b/bin/mdw-sbuild-server index 2bba42a..7bb2e46 100755 --- a/bin/mdw-sbuild-server +++ b/bin/mdw-sbuild-server @@ -74,9 +74,9 @@ decor () { ### Parse options. bogusp=nil archp=nil indepp=nil keepon=nil notreally=nil -unset targets +unset targets dbpargs -while getopts "haint:" opt; do +while getopts "haint:A:" opt; do case $opt in h) usage @@ -89,6 +89,7 @@ Options: -k Keep going even if one fails. -n Don't actually do the build. -t TARGET Build in TARGET build environment. + -A ARGS Pass ARGS to \`dpkg-buildpackage'. Commands available: @@ -108,6 +109,7 @@ EOF k) keepon=t ;; n) notreally=t ;; t) targets="${targets+$targets }$OPTARG" ;; + A) dbpargs="${dbpargs+$dbpargs }$OPTARG" ;; *) bogusp=nil ;; esac done @@ -290,6 +292,7 @@ case "$#,$1" in run sbuild --extra-package=$pkgs.$target \ --dist=$suite --build=$host --host=$target \ --chroot=$suite-$host --verbose $buildopt $dsc \ + ${dbpargs+--debbuildopts="$dbpargs"} \ 3>&- 4>&- 5>&- echo $? >&5 } | -- [mdw]