Bug#683848: bin-NMU support
Package: pbuilder Followup-For: Bug #683848 Hi, the patch lacks the binary-only=yes suffix in the changelog. Also I think adding -m\$BINNMU_MAINTAINER\ to DEBBUILDOPTS is wrong - -e\$BINNMU_MAINTAINER\ should be sufficient: diff -Nru pbuilder-0.215+nmu3+0anbe0/pbuilder-modules pbuilder-0.215+nmu3+0anbe1/pbuilder-modules --- pbuilder-0.215+nmu3+0anbe0/pbuilder-modules 2014-10-15 07:16:02.0 +0200 +++ pbuilder-0.215+nmu3+0anbe1/pbuilder-modules 2014-10-15 12:02:27.0 +0200 @@ -637,8 +637,8 @@ 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 +DEBBUILDOPTS=${DEBBUILDOPTS} -e\$BINNMU_MAINTAINER\ +echo $package ($version+b$BINNMU_VERSION) $DISTRIBUTION; urgency=low, binary-only=yes $cl echo $cl echo * Binary-only non-maintainer upload for $arch; no source changes. $cl echo * $BINNMU_MESSAGE $cl That said, can't you use dch to generate the binary changelog? This would simplify the changelog generation a lot ... $CHROOTEXEC dch --bin-nmu -c $PATHTOCHANGELOG -D $DISTRIBUTION \ $MESSAGE I have no idea how to pass a binnmu number != 1 to dch. Also you cannot pass the maintainer as a command line option - need environment variables instead, so maybe $CHROOTEXEC env DEBEMAIL=$DEBEMAIL DEBFULLNAME=$DEBFULLNAME dch ... which makes the --bin-nmu-maintainer option moot because I have to set it to --bin-nmu-maintainer $DEBFULLNAME $DEBEMAIL anyway, so pbuilder could just use the same variables as dch ... I find the binnmu uploader = last uploader fallback not that useful ... (experiences from preparing my very first binNMU (for a package not uploaded by me before)) Andreas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#683848: bin-NMU support
Ping? I'd really love to see the feature described in bug #683848 in pbuilder soon to extend functionality of Deb-o-Matic. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#683848: bin-NMU support
I just rewrote the patch with multiple options support, also fixing an error I made with my first patch. The new one is attached. binNMU.patch Description: Binary data
Bug#683848: bin-NMU support
Hi, Having two parameters delimited by space is probably not usual, shouldn't that be more like another parameter to set message for bin nmu? Is this the usual expected interface for other tools too ? to be somewhat consistent with, http://release.debian.org/wanna-build.txt, version number should be autoincremented, and message should be specified via something like -m ? At Sat, 04 Aug 2012 20:53:29 +0200, Luca Falavigna wrote: diff -Nru pbuilder-0.211/pbuilder.8 pbuilder-0.212/pbuilder.8 --- pbuilder-0.211/pbuilder.8 2012-03-08 23:54:41.0 +0100 +++ pbuilder-0.212/pbuilder.8 2012-08-04 20:48:02.0 +0200 @@ -353,6 +353,14 @@ .B \-\-debbuildopts -B .TP +.BI \-\-bin\-nmu [ version / message ] The notation should be +.BI \-\-bin\-nmu [ version ] [ message ] + +Specify to build a binary NMU instead of a standard package. +You must pass two parameters, the first one is a numeric value indicating +the progressive binNMU version, the second one is a message that will +appear in the changelog entry. + +.TP .BI \-\-bindmounts bind-mount-points Bind-mount the specified directories to inside the chroot. .I bind-mount-points diff -Nru pbuilder-0.211/pbuilder-checkparams pbuilder-0.212/pbuilder-checkparams --- pbuilder-0.211/pbuilder-checkparams 2012-03-08 23:54:41.0 +0100 +++ pbuilder-0.212/pbuilder-checkparams 2012-08-04 20:34:57.0 +0200 @@ -33,6 +33,7 @@ OVERRIDE_APTLINES=no OVERRIDE_APTLINES_WARN= # set this if --override-config option should be set. BINARY_ARCH=no +BIN_NMU=no PBUILDER_BUILD_LOGFILE= PRESERVE_BUILDPLACE=no unset EXTRA_CONFIGFILE || true @@ -189,6 +190,14 @@ DEBBUILDOPTS=${DEBBUILDOPTS} -B shift; ;; + --bin-nmu) + BIN_NMU=yes + # XXX this might be overwriten by --debbuildopts + DEBBUILDOPTS=${DEBBUILDOPTS} -B + BINNMU_VERSION=$2 + BINNMU_MESSAGE=$3 + shift; shift; shift; + ;; --preserve-buildplace) PRESERVE_BUILDPLACE=yes shift; diff -Nru pbuilder-0.211/pbuilder-modules pbuilder-0.212/pbuilder-modules --- pbuilder-0.211/pbuilder-modules 2012-03-31 06:50:46.0 +0200 +++ pbuilder-0.212/pbuilder-modules 2012-08-04 20:37:28.0 +0200 @@ -70,6 +70,7 @@ --timeout [timeout time] --override-config --binary-arch + --bin-nmu [version number | description] + --bin-nmu [version number] [description] --preserve-buildplace --bindmounts [bind-mount-point] --debug @@ -595,6 +596,44 @@ done } +function binNMU() { +if [ $BIN_NMU == no ]; then + return +fi +if [ -z $BINNMU_VERSION ]; then + echo No version provided for binNMU entry. + exit 1 +fi +if [ -z $BINNMU_MESSAGE ]; then + echo No changelog message provided for binNMU entry. + exit 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 +if [ -z $DEBEMAIL ]; then + echo No maintainer addres provided, use --debemail option. + 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 date=$(date -R) +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 -- $DEBEMAIL $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 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#683848: bin-NMU support
2012/9/11 Junichi Uekawa dan...@netfort.gr.jp: Having two parameters delimited by space is probably not usual, shouldn't that be more like another parameter to set message for bin nmu? It could make more sense. I chose to use only one parameter, but having a second one, required by the first, seems a much better approach. to be somewhat consistent with, http://release.debian.org/wanna-build.txt, version number should be autoincremented, and message should be specified via something like -m ? AFAIK, only sbuild has this option, and looking at its source code, it has two options, --make-binNMU=changelog-entry and --binNMU=NMU-version. It doesn't seem it performs autoincrement though, as I don't think there's an easy way do determine which version to use but looking manually in several places (e.g. projectb or wb databases). -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#683848: bin-NMU support
Package: pbuilder Version: 0.211 Severity: wishlist Tags: patch pbuilder does not allow to build binary-NMUs. Attached patch implements this feature. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores) Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages pbuilder depends on: ii coreutils 8.13-3.2 ii debconf [debconf-2.0] 1.5.45 ii debianutils4.3.3 ii debootstrap1.0.42 ii wget 1.13.4-3 Versions of packages pbuilder recommends: ii devscripts 2.12.1 ii fakeroot1.18.4-2 ii sudo1.8.5p2-1 Versions of packages pbuilder suggests: pn cowdancer none ii gdebi-core0.8.5 pn pbuilder-uml none diff -Nru pbuilder-0.211/pbuilder.8 pbuilder-0.212/pbuilder.8 --- pbuilder-0.211/pbuilder.8 2012-03-08 23:54:41.0 +0100 +++ pbuilder-0.212/pbuilder.8 2012-08-04 20:48:02.0 +0200 @@ -353,6 +353,14 @@ .B \-\-debbuildopts -B .TP +.BI \-\-bin\-nmu [ version / message ] + +Specify to build a binary NMU instead of a standard package. +You must pass two parameters, the first one is a numeric value indicating +the progressive binNMU version, the second one is a message that will +appear in the changelog entry. + +.TP .BI \-\-bindmounts bind-mount-points Bind-mount the specified directories to inside the chroot. .I bind-mount-points diff -Nru pbuilder-0.211/pbuilder-checkparams pbuilder-0.212/pbuilder-checkparams --- pbuilder-0.211/pbuilder-checkparams 2012-03-08 23:54:41.0 +0100 +++ pbuilder-0.212/pbuilder-checkparams 2012-08-04 20:34:57.0 +0200 @@ -33,6 +33,7 @@ OVERRIDE_APTLINES=no OVERRIDE_APTLINES_WARN= # set this if --override-config option should be set. BINARY_ARCH=no +BIN_NMU=no PBUILDER_BUILD_LOGFILE= PRESERVE_BUILDPLACE=no unset EXTRA_CONFIGFILE || true @@ -189,6 +190,14 @@ DEBBUILDOPTS=${DEBBUILDOPTS} -B shift; ;; + --bin-nmu) + BIN_NMU=yes + # XXX this might be overwriten by --debbuildopts + DEBBUILDOPTS=${DEBBUILDOPTS} -B + BINNMU_VERSION=$2 + BINNMU_MESSAGE=$3 + shift; shift; shift; + ;; --preserve-buildplace) PRESERVE_BUILDPLACE=yes shift; diff -Nru pbuilder-0.211/pbuilder-modules pbuilder-0.212/pbuilder-modules --- pbuilder-0.211/pbuilder-modules 2012-03-31 06:50:46.0 +0200 +++ pbuilder-0.212/pbuilder-modules 2012-08-04 20:37:28.0 +0200 @@ -70,6 +70,7 @@ --timeout [timeout time] --override-config --binary-arch + --bin-nmu [version number | description] --preserve-buildplace --bindmounts [bind-mount-point] --debug @@ -595,6 +596,44 @@ done } +function binNMU() { +if [ $BIN_NMU == no ]; then + return +fi +if [ -z $BINNMU_VERSION ]; then + echo No version provided for binNMU entry. + exit 1 +fi +if [ -z $BINNMU_MESSAGE ]; then + echo No changelog message provided for binNMU entry. + exit 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 +if [ -z $DEBEMAIL ]; then + echo No maintainer addres provided, use --debemail option. + 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 date=$(date -R) +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 -- $DEBEMAIL $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