Rev 3650: Merge in Lukáš's helper scripts. in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/packaging
John Arbash Meinel
john at arbash-meinel.com
Mon Aug 25 22:50:13 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/packaging
------------------------------------------------------------
revno: 3650
revision-id: john at arbash-meinel.com-20080825215011-de9esmzgkue3e522
parent: pqm at pqm.ubuntu.com-20080825182248-dydy5bn4n5akbfjq
parent: lalinsky at gmail.com-20080821102849-f1yp8f358gcddfue
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: packaging
timestamp: Mon 2008-08-25 16:50:11 -0500
message:
Merge in Lukáš's helper scripts.
Update the packaging documents to describe how to do the releases
using bzr-builddeb to package all distro platforms
simultaneously.
added:
tools/packaging/ packaging-20080825202834-3j433iaawnt72wqa-1
tools/packaging/build-packages.sh buildpackages.sh-20080821102059-fzlodktas65qmo1k-1
tools/packaging/update-changelogs.sh updatechangelogs.sh-20080821102059-fzlodktas65qmo1k-2
tools/packaging/update-packaging-branches.sh updatepackagingbranc-20080825210254-6is8ciit1yzyd3a2-1
modified:
doc/developers/ppa.txt ppa.txt-20080722055539-606u7t2z32t3ae4w-1
------------------------------------------------------------
revno: 0.11.3
revision-id: lalinsky at gmail.com-20080821102849-f1yp8f358gcddfue
parent: lalinsky at gmail.com-20080821102749-a8r8g6oe7y883m8y
committer: Lukáš Lalinský <lalinsky at gmail.com>
branch nick: tools
timestamp: Thu 2008-08-21 12:28:49 +0200
message:
Add instructions
added:
ppa.txt ppa.txt-20080821102811-jhoajulm56uo6vgm-1
------------------------------------------------------------
revno: 0.11.2
revision-id: lalinsky at gmail.com-20080821102749-a8r8g6oe7y883m8y
parent: lalinsky at gmail.com-20080821102104-xqus7be42cpqs9cn
committer: Lukáš Lalinský <lalinsky at gmail.com>
branch nick: tools
timestamp: Thu 2008-08-21 12:27:49 +0200
message:
Automatically commit
modified:
update-changelogs.sh updatechangelogs.sh-20080821102059-fzlodktas65qmo1k-2
------------------------------------------------------------
revno: 0.11.1
revision-id: lalinsky at gmail.com-20080821102104-xqus7be42cpqs9cn
committer: Lukáš Lalinský <lalinsky at gmail.com>
branch nick: tools
timestamp: Thu 2008-08-21 12:21:04 +0200
message:
Initial import
added:
build-packages.sh buildpackages.sh-20080821102059-fzlodktas65qmo1k-1
update-changelogs.sh updatechangelogs.sh-20080821102059-fzlodktas65qmo1k-2
-------------- next part --------------
=== modified file 'doc/developers/ppa.txt'
--- a/doc/developers/ppa.txt 2008-08-21 21:29:15 +0000
+++ b/doc/developers/ppa.txt 2008-08-25 21:50:11 +0000
@@ -26,20 +26,19 @@
when the release passes end-of-life because all users should
have upgraded by then. (As of May 2008, Edgy Eft is no longer supported.)
-We build a distinct package for each distrorelease that has
-different packaging requirements. As of bzr 1.5, Dapper uses
-``python-support`` and later distributions use ``python-central``, so we
-build one version for dapper and one version for everything else. If you
-upload a release-specific version, you should add a suffix to the
+We build a distinct package for each distrorelease. As of bzr 1.5, Dapper
+uses ``python-support`` and later distributions use ``python-central``.
+If you upload a release-specific version, you should add a suffix to the
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
-Every package is first uploaded into one distroversion of the beta ppa.
-It can then be copied to other compatible distroversions. For final
-release versions it is also copied to the main PPA.
+Every package is first uploaded into the beta ppa. For final release
+versions it is also copied to the main PPA.
The ``debian/`` directory containing the packaging information is kept in
branches on Launchpad, named like
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
+or
+<lp:~bzr/bzr/packaging-hardy>.
Preconditions
-------------
@@ -77,14 +76,30 @@
sudo apt-get install build-essential devscripts dput quilt patch
+* You will also want to have the ``bzr-builddeb`` plugin installed.
+
+
Packaging Bazaar
----------------
-#. You will need a working directory for each supported release, such as
- ``~/bzr/Packaging/hardy``
-
-#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
- if you don't already have it.
+Short form
+~~~~~~~~~~
+
+For people who have already set up everything they need, building the
+release packages is as simple as::
+
+ cd ~/dev/bzr/releases/packaging
+ export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
+ ~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh
+ ~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
+ ~/dev/bzr/bzr.dev/tools/packaging/build-packages
+ dput bzr-beta-ppa build-area/bzr_1.6~beta3~bazaar1*.changes
+
+Long Form
+~~~~~~~~~
+
+#. You will end up checking out a separate directory for each supported
+ release. Such as ``~/dev/bzr/releases/packaging/hardy``
#. Decide on the final version number. It should be of this form::
@@ -97,26 +112,23 @@
to make them sort before the final release, like this:
``bzr-1.6~beta3-1~bazaar1~hardy1``.
-#. Create a directory per release::
-
- mkdir ~/bzr/Releases/hardy
-
-#. Copy or hardlink the original tarball into your per-disto directory, under an
- appropriate name ending in ``.orig.tar.gz``. Untar it. The extracted
- source directory and ``.orig`` file must match the version number you
- calculated above. For example::
-
- cp -l ~/bzr/Releases/bzr-1.6b3.tar.gz ~/bzr/Releases/hardy/bzr_1.6~beta3.orig.tar.gz
- cd ~/bzr/Releases/hardy
- tar xfvz bzr_1.6~beta3.orig.tar.gz
- mv bzr-1.6b3 bzr-1.6~beta3
-
-#. Change into that directory and check out the packaging branch::
-
- cd bzr-1.6~beta3
- bzr checkout \
- bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
- debian
+ Final releases will use a release string of the form:
+ ``bzr-1.6-1~bazaar1~hardy1``
+
+#. Export the distroreleases that you will be packaging for::
+
+ export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
+
+#. Checkout (or update) the packaging branch for each supported release::
+
+ bzr co lp:~bzr/bzr/packaging-hardy
+
+ There is a script available to help::
+
+ tools/packaging/update-packaging-branches.sh
+
+#. The ``bzr-builddeb`` step will download the original tarball if you do
+ not already have it. Putting it into a ``tarballs`` directory.
#. For Bazaar plugins, change the ``debian/control`` file to express a
dependency on the correct version of ``bzr``.
@@ -132,7 +144,7 @@
dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
dch will default to the distro you're working in and this isn't checked
- against the version number (which is just our conversion), so make sure
+ against the version number (which is just our convention), so make sure
to specify it.
Make sure you have the correct email address for yourself, version
@@ -150,31 +162,48 @@
that the distro name in the version is consistent with the target name
outside the parenthesis.
-#. Commit these changes into the packaging branch::
-
- bzr ci -m '1.6~beta3-1~bazaar1~hardy1: New upstream release.' debian
-
-#. Remove the .bzr directory from the Debian dir, as this adds unnecessary
- cruft to the package::
-
- rm debian/.bzr -R
-
-#. Build a source package::
-
- debuild -S -sa -i -D
-
- This will create a ``.changes`` file in the per-distro directory,
- and should invoke gpg to sign it with your key.
- Check that file is reasonable: it should be uploading to the intended
- distribution, have a .orig file included, and the right version number.
-
+ You will also want to commit these changes into the packaging branch.
+
+ There is a helper script which will update the changelog and commit it
+ for all of your ``$UBUNTU_RELEASES``. It is available as::
+
+ tools/packaging/update-changelogs.sh
+
+ You must supply the release string, such as::
+
+ tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
+
+ It will automatically append the distro numbering on the end.
+
+#. Build the source packages::
+
+ cd packaging-$DISTRO; bzr builddeb -S
+
+ This will create a ``.changes`` file in ``build-area``. You will need
+ to sign it with::
+
+ debsign -m$UID build-area/*.changes
+
+ Where ``$UID`` is the gpg key you want to use to sign the changes.
+ Alternatively, you can configure ``~/.bazaar/builddeb.conf`` with::
+
+ [BUILDDEB]
+ builder = dpkg-buildpackage -rfakeroot
+ source-builder= dpkg-buildpackage -rfakeroot -S -sa
+
+ Which tells ``bzr builddeb`` to automatically sign the package with the
+ key associated with the user who created the changelog entry.
+
#. Upload into the beta PPA for each release::
- dput bzr-beta-ppa ../bzr__1.6~beta3-1\~bazaar1\~hardy1\_source.changes
+ dput bzr-beta-ppa build-area/*.changes
#. For final release versions, also copy it into the ``~bzr`` PPA::
- dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
+ dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
+
+ Alternatively, you can use Launchpad's "copy" feature to copy the
+ packages between repositories.
#. You should soon get an "upload accepted" mail from Launchpad, which
means that your package is waiting to be built. You can then track its
=== added directory 'tools/packaging'
=== added file 'tools/packaging/build-packages.sh'
--- a/tools/packaging/build-packages.sh 1970-01-01 00:00:00 +0000
+++ b/tools/packaging/build-packages.sh 2008-08-25 21:50:11 +0000
@@ -0,0 +1,6 @@
+#!/bin/bash
+# A helper script to build packages for the various distributions
+
+for DISTRO in $UBUNTU_RELEASES; do
+ (cd "packaging-$DISTRO" && bzr builddeb -S)
+done
=== added file 'tools/packaging/update-changelogs.sh'
--- a/tools/packaging/update-changelogs.sh 1970-01-01 00:00:00 +0000
+++ b/tools/packaging/update-changelogs.sh 2008-08-25 21:50:11 +0000
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ "x$1" = "x" ]; then
+ echo "Missing version"
+ echo "You want something like:"
+ echo " update-changelogs.sh 1.6~rc1-1~bazaar1"
+ echo "or"
+ echo " update-changelogs.sh 1.6-1~bazaar1"
+ exit
+fi
+VERSION=$1
+
+for DISTRO in $UBUNTU_RELEASES; do
+ PPAVERSION="$VERSION~${DISTRO}1"
+ (
+ echo "Updating changelog for $DISTRO"
+ cd "packaging-$DISTRO" &&
+ dch -v $PPAVERSION -D $DISTRO -c changelog 'New upstream release.' &&
+ bzr commit -m "New upstream release: $PPAVERSION"
+ )
+done
=== added file 'tools/packaging/update-packaging-branches.sh'
--- a/tools/packaging/update-packaging-branches.sh 1970-01-01 00:00:00 +0000
+++ b/tools/packaging/update-packaging-branches.sh 2008-08-25 21:50:11 +0000
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Helper for updating all of the packaging branches
+
+if [ -z "$UBUNTU_RELEASES" ]; then
+ echo "Configure the distro platforms that you want to"
+ echo "build with a line like:"
+ echo ' export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"'
+ exit 1
+fi
+
+for DISTRO in $UBUNTU_RELEASES; do
+ if [ -d "packaging-$DISTRO" ] ; then
+ echo "Updating packaging-$DISTRO"
+ bzr update packaging-$DISTRO
+ else
+ echo "Checking out lp:~bzr/bzr/packaging-$DISTRO"
+ bzr co lp:~bzr/bzr/packaging-$DISTRO
+ fi
+done
+
More information about the bazaar-commits
mailing list