diff options
author | Luca Falavigna <dktrkranz@debian.org> | 2012-11-27 16:58:53 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-15 14:03:29 +0000 |
commit | ef9fd1fa8e4cb6e15a8857b47926236b06d87dd6 (patch) | |
tree | 757af7e3a41d83717f229dc1b37bf6ba93431faf /pbuilder-modules | |
parent | 80fd45b30a52bba481f928bf912bdbe0acc19558 (diff) | |
download | pbuilder-ef9fd1fa8e4cb6e15a8857b47926236b06d87dd6.tar pbuilder-ef9fd1fa8e4cb6e15a8857b47926236b06d87dd6.tar.gz |
add binNMU support
Closes: #683848
Diffstat (limited to 'pbuilder-modules')
-rw-r--r-- | pbuilder-modules | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pbuilder-modules b/pbuilder-modules index 2a5a1fe..51becbb 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -696,6 +696,46 @@ function add_additional_aptkeyrings() { done } +function binNMU() { + if [ "$BIN_NMU" == "no" ]; then + return + fi + if [ -z "$BINNMU_MESSAGE" ]; then + echo "No changelog message provided for binNMU entry." + exit 1 + fi + if [ -z "$BINNMU_VERSION" ]; then + echo "No version provided for binNMU entry, fall back to 1." + BINNMU_VERSION=1 + fi + local cl=$(ls $BUILDPLACE/tmp/buildd/*/debian/changelog) + local tmpcl=$cl.pbuildertmp + if [ ! -f $cl ]; then + echo "Cannot open debian/changelog for binNMU version handling." + exit 1 + fi + mv $cl $tmpcl + local package=$(head -n1 $tmpcl | cut -d" " -f1) + local version=$(head -n1 $tmpcl | sed 's/.*(\(.*\)).*/\1/') + local arch=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH) + local changedby=$(cat $tmpcl | sed -n '0,/ -- /s/ -- \(.* <.*>\).*/\1/p') + local date=$(date -R) + if [ -z "$BINNMU_MAINTAINER" ]; then + echo "No maintainer provided for binNMU entry, fall back to last uploader." + BINNMU_MAINTAINER=$changedby + fi + DEBBUILDOPTS="${DEBBUILDOPTS} -m\"$BINNMU_MAINTAINER\" -e\"$BINNMU_MAINTAINER\"" + echo "$package ($version+b$BINNMU_VERSION) $DISTRIBUTION; urgency=low" > $cl + echo >> $cl + echo " * Binary-only non-maintainer upload for $arch; no source changes." >> $cl + echo " * $BINNMU_MESSAGE" >> $cl + echo >> $cl + echo " -- $BINNMU_MAINTAINER $date" >> $cl + echo >> $cl + cat $tmpcl >> $cl + rm $tmpcl +} + #Setting environmental variables that are really required: #required for some packages to install... export LANG=C |