~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dot/gitconfig.in: Add explicit `pull' setting.
[profile]
/
bin
/
mdw-sbuild
diff --git
a/bin/mdw-sbuild
b/bin/mdw-sbuild
index
be687f6
..
9a9a9d0
100755
(executable)
--- a/
bin/mdw-sbuild
+++ b/
bin/mdw-sbuild
@@
-27,15
+27,15
@@
prog=${0##*/}
fail () { echo >&2 "$prog: $*"; exit 1; }
prog=${0##*/}
fail () { echo >&2 "$prog: $*"; exit 1; }
-usage () { echo "usage: $prog [-ain
] [-k KEYID] [-t TARGET
] HOST"; }
+usage () { echo "usage: $prog [-ain
T] [-k KEYID] [-p DIR] [-t TARGET] [-A DBPARGS
] HOST"; }
fail_usage () { usage >&2; exit 1; }
###--------------------------------------------------------------------------
### Parse options.
bogusp=nil noactp=nil signp=nil
fail_usage () { usage >&2; exit 1; }
###--------------------------------------------------------------------------
### Parse options.
bogusp=nil noactp=nil signp=nil
-unset buildopts
-while getopts "haik:n
t:
" opt; do
+unset buildopts
pkgs dbpargs
+while getopts "haik:n
p:t:A:T
" opt; do
case $opt in
h)
usage
case $opt in
h)
usage
@@
-47,7
+47,10
@@
Options:
-i Build only architecture-neutral packages.
-k KEYID Sign the result using KEYID.
-n Don't actually do the build.
-i Build only architecture-neutral packages.
-k KEYID Sign the result using KEYID.
-n Don't actually do the build.
+ -p DIR Upload additional packages from DIR.
-t TARGET Build in TARGET build environment.
-t TARGET Build in TARGET build environment.
+ -A ARGS Pass ARGS to \`dpkg-buildpackage'.
+ -T Don't run the tests.
EOF
exit 0
;;
EOF
exit 0
;;
@@
-55,7
+58,13
@@
EOF
i) buildopts="${buildopts+$buildopts }-i" ;;
k) signp=t keyid=$OPTARG ;;
n) buildopts="${buildopts+$buildopts }-n" noactp=t ;;
i) buildopts="${buildopts+$buildopts }-i" ;;
k) signp=t keyid=$OPTARG ;;
n) buildopts="${buildopts+$buildopts }-n" noactp=t ;;
+ p) pkgs=$OPTARG ;;
t) buildopts="${buildopts+$buildopts }-t$OPTARG" ;;
t) buildopts="${buildopts+$buildopts }-t$OPTARG" ;;
+ A)
+ buildopts="${buildopts+$buildopts }-A$OPTARG"
+ dbpargs="${dbpargs+$dbpargs }$OPTARG"
+ ;;
+ T) buildopts="${buildopts+$buildopts }-T" ;;
*) bogusp=t ;;
esac
done
*) bogusp=t ;;
esac
done
@@
-66,6
+75,7
@@
case $# in
esac
case $bogusp in t) fail_usage ;; esac
case $noactp in t) signp=nil ;; esac
esac
case $bogusp in t) fail_usage ;; esac
case $noactp in t) signp=nil ;; esac
+case ${pkgs-/hack} in /*) ;; *) pkgs=$(pwd)/$pkgs ;; esac
###--------------------------------------------------------------------------
### Main program.
###--------------------------------------------------------------------------
### Main program.
@@
-85,7
+95,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.
## 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
+dpkg-buildpackage -S -uc -us
-d -i $dbpargs
cd ..
dsc=${pkg}_${ver}.dsc
[ -f "$dsc" ] || fail "where is my \`.dsc' file?"
cd ..
dsc=${pkg}_${ver}.dsc
[ -f "$dsc" ] || fail "where is my \`.dsc' file?"
@@
-94,12
+104,21
@@
dsc=${pkg}_${ver}.dsc
## upload the sources, run the build, and collect the results.
builddir=$(ssh "$host" mdw-sbuild-server dir "$pkg/$ver")
dcmd rsync -a "$dsc" "$host:$builddir/"
## upload the sources, run the build, and collect the results.
builddir=$(ssh "$host" mdw-sbuild-server dir "$pkg/$ver")
dcmd rsync -a "$dsc" "$host:$builddir/"
+case ${pkgs+t} in t) rsync -a "$pkgs/" "$host:$builddir/pkgs/" ;; esac
set +e; ssh "$host" mdw-sbuild-server $buildopts build "$builddir"
rc=$?; set -e
rsync -a "$host:$builddir/" ./
case $rc in 0) ;; *) exit $rc ;; esac
set +e; ssh "$host" mdw-sbuild-server $buildopts build "$builddir"
rc=$?; set -e
rsync -a "$host:$builddir/" ./
case $rc in 0) ;; *) exit $rc ;; esac
-## Maybe sign the result.
+## Merge the change files together, and maybe sign the result.
+chchch=${pkg}_${ver}_source.changes
+for i in "${pkg}_${ver}"_*.changes; do
+ case " $chchch " in *" $i "*) ;; *) chchch="$chchch $i" ;; esac
+done
+mergechanges -f $chchch
+rm $chchch
case $signp in
case $signp in
- t) debsign -k"$keyid" "${pkg}_${ver}_
"*.changes
;;
+ t) debsign -k"$keyid" "${pkg}_${ver}_
multi.changes"
;;
esac
esac
+
+###----- That's all, folks --------------------------------------------------