~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/ppa.txt

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-11 03:39:25 UTC
  • mfrom: (3613.2.2 export)
  • Revision ID: pqm@pqm.ubuntu.com-20080811033925-rwcu69eiq0zg0buv
(robertc) Teach export to export subdirectories as well as entire
        branches. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
when the release passes end-of-life because all users should
27
27
have upgraded by then.  (As of May 2008, Edgy Eft is no longer supported.)
28
28
 
29
 
We build a distinct package for each distrorelease.  As of bzr 1.5, Dapper
30
 
uses ``python-support`` and later distributions use ``python-central``.
31
 
If you upload a release-specific version, you should add a suffix to the
 
29
We build a distinct package for each distrorelease that has
 
30
different packaging requirements.  As of bzr 1.5, Dapper uses
 
31
``python-support`` and later distributions use ``python-central``, so we
 
32
build one version for dapper and one version for everything else.  If you
 
33
upload a release-specific version, you should add a suffix to the
32
34
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
33
35
 
34
 
Every package is first uploaded into the beta ppa.  For final release
35
 
versions it is also copied to the main PPA.
 
36
Every package is first uploaded into one distroversion of the beta ppa.
 
37
It can then be copied to other compatible distroversions.  For final
 
38
release versions it is also copied to the main PPA.
36
39
 
37
40
The ``debian/`` directory containing the packaging information is kept in
38
41
branches on Launchpad, named like 
39
42
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
40
 
or
41
 
<lp:~bzr/bzr/packaging-hardy>.
42
43
 
43
44
Preconditions
44
45
-------------
72
73
    [DEFAULT]
73
74
    default_host_main = notspecified
74
75
  
 
76
    [notspecified]
 
77
    fqdn = SPECIFY.A.PPA.NAME 
 
78
 
75
79
* You need a Ubuntu (or probably Debian) machine, and ::
76
80
 
77
81
    sudo apt-get install build-essential devscripts dput quilt patch
78
82
 
79
 
* You will also want to have the ``bzr-builddeb`` plugin installed.
80
 
 
81
 
 
82
83
Packaging Bazaar
83
84
----------------
84
85
 
85
 
Short form
86
 
~~~~~~~~~~
87
 
 
88
 
For people who have already set up everything they need, building the
89
 
release packages is as simple as::
90
 
 
91
 
  cd ~/dev/bzr/releases/packaging
92
 
  export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
93
 
  ~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh
94
 
  ~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
95
 
  ~/dev/bzr/bzr.dev/tools/packaging/build-packages
96
 
  dput bzr-beta-ppa build-area/bzr_1.6~beta3~bazaar1*.changes
97
 
 
98
 
Long Form
99
 
~~~~~~~~~
100
 
 
101
 
#. You will end up checking out a separate directory for each supported
102
 
   release. Such as ``~/dev/bzr/releases/packaging/hardy``
 
86
#. You will need a working directory for each supported release, such as
 
87
   ``~/bzr/Packaging/hardy``
 
88
 
 
89
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
 
90
   if you don't already have it.
103
91
 
104
92
#. Decide on the final version number.  It should be of this form::
105
93
 
106
 
     bzr-1.6~beta3-1~bazaar1~hardy1
 
94
     bzr-1.6~beta3-1~bazaar1
107
95
 
108
96
   There are three hyphen-separated parts: the *package name*, the *upstream
109
97
   version*, and the *packaging version*.
110
98
 
111
99
   **Caution:** Upstream betas or release candidates must insert a tilde
112
100
   to make them sort before the final release, like this:
113
 
   ``bzr-1.6~beta3-1~bazaar1~hardy1``.
114
 
 
115
 
   Final releases will use a release string of the form:
116
 
   ``bzr-1.6-1~bazaar1~hardy1``
117
 
 
118
 
#. Export the distroreleases that you will be packaging for::
119
 
 
120
 
      export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
121
 
 
122
 
#. Checkout (or update) the packaging branch for each supported release::
123
 
 
124
 
      bzr co lp:~bzr/bzr/packaging-hardy
125
 
 
126
 
   There is a script available to help::
127
 
 
128
 
      tools/packaging/update-packaging-branches.sh
129
 
 
130
 
#. The ``bzr-builddeb`` step will download the original tarball if you do
131
 
   not already have it. Putting it into a ``tarballs`` directory.
 
101
   ``bzr-1.4~rc2-1~bazaar1``.
 
102
 
 
103
#. Copy or hardlink the original tarball into your per-disto directory, under an 
 
104
   appropriate name ending in ``.orig.tar.gz``.  Untar it.  The extracted
 
105
   source directory and ``.orig`` file must match the version number you
 
106
   calculated above.  For example::
 
107
 
 
108
     cp -l ~/bzr/Releases/bzr-1.6b3.tar.gz bzr_1.6~beta3.orig.tar.gz
 
109
     tar xfvz bzr_1.6~beta3.orig.tar.gz
 
110
     mv bzr-1.6b3 bzr-1.6~beta3
 
111
 
 
112
#. Change into that directory and check out the packaging branch::
 
113
 
 
114
     cd bzr-1.6~beta3
 
115
     bzr checkout \
 
116
       bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
 
117
       debian
132
118
 
133
119
#. For Bazaar plugins, change the ``debian/control`` file to express a
134
120
   dependency on the correct version of ``bzr``.
135
121
 
136
122
   For bzrtools this is typically::
137
123
 
138
 
      Build-Depends-Indep: bzr (>= 1.6~), rsync
139
 
      Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
 
124
      Build-Depends-Indep: bzr (>= 1.3~), rsync
 
125
      Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch
140
126
 
141
127
#. Make a new ``debian/changelog`` entry for the new release,
142
128
   either by using ``dch`` or just editing the file::
143
129
 
144
 
      dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
 
130
     dch -v '1.3-1~bazaar1' -D hardy
145
131
 
146
132
   dch will default to the distro you're working in and this isn't checked
147
 
   against the version number (which is just our convention), so make sure 
 
133
   against the version number (which is just our conversion), so make sure 
148
134
   to specify it.
149
135
 
150
136
   Make sure you have the correct email address for yourself, version
151
137
   number, and distribution.  It should look something like this::
152
138
 
153
 
       bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low
 
139
       bzr (1.3-1~bazaar1) hardy; urgency=low
154
140
     
155
141
        * New upstream release.
156
142
     
162
148
   that the distro name in the version is consistent with the target name
163
149
   outside the parenthesis.
164
150
 
165
 
   You will also want to commit these changes into the packaging branch.
166
 
 
167
 
   There is a helper script which will update the changelog and commit it
168
 
   for all of your ``$UBUNTU_RELEASES``. It is available as::
169
 
 
170
 
      tools/packaging/update-changelogs.sh
171
 
 
172
 
   You must supply the release string, such as::
173
 
 
174
 
      tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
175
 
 
176
 
   It will automatically append the distro numbering on the end.
177
 
 
178
 
#. Build the source packages::
179
 
 
180
 
      cd packaging-$DISTRO; bzr builddeb -S
181
 
 
182
 
   This will create a ``.changes`` file in ``build-area``. You will need
183
 
   to sign it with::
184
 
 
185
 
      debsign -m$UID build-area/*.changes
186
 
 
187
 
   Where ``$UID`` is the gpg key you want to use to sign the changes.
188
 
   Alternatively, you can configure ``~/.bazaar/builddeb.conf`` with::
189
 
 
190
 
      [BUILDDEB]
191
 
      builder = dpkg-buildpackage -rfakeroot
192
 
      source-builder= dpkg-buildpackage -rfakeroot -S -sa
193
 
 
194
 
   Which tells ``bzr builddeb`` to automatically sign the package with the
195
 
   key associated with the user who created the changelog entry.
196
 
     
197
 
#. Upload into the beta PPA for each release::
198
 
 
199
 
     dput bzr-beta-ppa build-area/*.changes
200
 
 
201
 
#. For final release versions, also copy it into the ``~bzr`` PPA::
202
 
 
203
 
     dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
204
 
 
205
 
   Alternatively, you can use Launchpad's "copy" feature to copy the
206
 
   packages between repositories.
 
151
#. Commit these changes into the packaging branch::
 
152
 
 
153
     bzr ci -m '1.3-1~bazaar1: New upstream release.' debian
 
154
 
 
155
#. Build a source package::
 
156
 
 
157
     debuild -S -sa -i -D
 
158
 
 
159
   This will create a ``.changes`` file in the per-distro directory,
 
160
   and should invoke gpg to sign it with your key.
 
161
   Check that file is reasonable: it should be uploading to the intended
 
162
   distribution, have a .orig file included, and the right version number.
 
163
 
 
164
#. Upload into the beta PPA::
 
165
 
 
166
     dput bzr-beta-ppa ../bzr__1.3-1\~bazaar1\_source.changes
 
167
 
 
168
#. Copy the uploaded package over to other Ubuntu releases, taking advantage 
 
169
   of Launchpad's Copy Package feature 
 
170
   <https://launchpad.net/~bzr-beta-ppa/+archive/+copy-packages>
 
171
 
 
172
#. For final release versions, also copy it into the ``~bzr`` PPA.
207
173
 
208
174
#. You should soon get an "upload accepted" mail from Launchpad, which
209
175
   means that your package is waiting to be built.  You can then track its