builddeb: rename --release option to --codename
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 25 Nov 2015 14:59:43 +0800
changeset 28525 7fbab10f812f03dd583207f013eedb882e77f4b1
parent 28524 994d8dced775f5cd5e7b5de2ba6b83b74e9804c2
child 28526 9b86d29867a5fd17c69b3793ca208e574da451bd
push id83
push usergszorc@mozilla.com
push dateSun, 06 Dec 2015 00:30:45 +0000
builddeb: rename --release option to --codename Debian and Ubuntu releases have both codenames and traditional version numbers. An entire "branch" of releases is referred to by its codename, and version numbers (e.g. 8.2, 14.04.3) are used to address individual releases. Since we use codenames for building .deb packages, let's call the option and the variable appropriately.
Makefile
contrib/builddeb
contrib/dockerdeb
--- a/Makefile
+++ b/Makefile
@@ -157,17 +157,17 @@ osx:
 	python -m bdist_mpkg.script_bdist_mpkg setup.py --
 	python contrib/fixpax.py dist/mercurial-*.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
 	mkdir -p packages/osx
 	N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
 	rm -rf dist/mercurial-*.mpkg
 
 deb:
 	mkdir -p packages/debian-unknown
-	contrib/builddeb --release unknown
+	contrib/builddeb --codename unknown
 
 docker-debian-jessie:
 	mkdir -p packages/debian-jessie
 	contrib/dockerdeb jessie
 
 fedora20:
 	mkdir -p packages/fedora20
 	contrib/buildrpm
--- a/contrib/builddeb
+++ b/contrib/builddeb
@@ -3,22 +3,22 @@
 # Build a Mercurial debian package from the current repo
 #
 # Tested on Jessie (stable as of original script authoring.)
 
 . $(dirname $0)/packagelib.sh
 
 BUILD=1
 CLEANUP=1
-DEBVERSION=jessie
+CODENAME=jessie
 while [ "$1" ]; do
     case "$1" in
-    --release )
+    --codename )
         shift
-        DEBVERSION="$1"
+        CODENAME="$1"
         shift
         ;;
     --cleanup )
         shift
         BUILD=
         ;;
     --build )
         shift
@@ -77,15 +77,15 @@ if [ "$BUILD" ]; then
     if [ $? != 0 ]; then
         echo 'debuild failed!'
         exit 1
     fi
 
 fi
 if [ "$CLEANUP" ] ; then
     echo
-    OUTPUTDIR=${OUTPUTDIR:=packages/debian-$DEBVERSION}
+    OUTPUTDIR=${OUTPUTDIR:=packages/debian-$CODENAME}
     find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \
           -type f -newer $control -print0 | \
       xargs -Inarf -0 mv narf "$OUTPUTDIR"
     echo "Built packages for $debver:"
     find "$OUTPUTDIR" -type f -newer $control -name '*.deb'
 fi
--- a/contrib/dockerdeb
+++ b/contrib/dockerdeb
@@ -3,17 +3,17 @@
 . $(dirname $0)/dockerlib.sh
 . $(dirname $0)/packagelib.sh
 
 BUILDDIR=$(dirname $0)
 export ROOTDIR=$(cd $BUILDDIR/..; pwd)
 
 checkdocker
 
-DEBPLATFORM="$1"
+CODENAME="$1"
 PLATFORM="debian-$1"
 shift # extra params are passed to build process
 
 OUTPUTDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM}
 
 initcontainer $PLATFORM
 
 # debuild only appears to be able to save built debs etc to .., so we
@@ -21,14 +21,14 @@ initcontainer $PLATFORM
 # container and hope it's writable. Whee.
 dn=$(basename $PWD)
 
 if [ $(uname) = "Darwin" ] ; then
     $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
             sh -c "cd /mnt/$dn && make clean && make local"
 fi
 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
-  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --release $DEBPLATFORM"
-contrib/builddeb --cleanup --release $DEBPLATFORM
+  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --codename $CODENAME"
+contrib/builddeb --cleanup --codename $CODENAME
 if [ $(uname) = "Darwin" ] ; then
     $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
             sh -c "cd /mnt/$dn && make clean"
 fi