Bug#683848: bin-NMU support

Junichi Uekawa dancer at netfort.gr.jp
Tue Sep 11 09:31:28 UTC 2012


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.000000000 +0100
> +++ pbuilder-0.212/pbuilder.8	2012-08-04 20:48:02.000000000 +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.000000000 +0100
> +++ pbuilder-0.212/pbuilder-checkparams	2012-08-04 20:34:57.000000000 +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.000000000 +0200
> +++ pbuilder-0.212/pbuilder-modules	2012-08-04 20:37:28.000000000 +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



More information about the Pbuilder-maint mailing list