summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-21 12:23:33 +0000
committerColin Watson <cjwatson@debian.org>2009-12-21 12:23:33 +0000
commit148451ca0209a99eb169f56c4404c5a54d521ba4 (patch)
tree002fcb85fdf11e5eb024a8ec69b3b4de23d4c5b5
parent4aebba208e59bffdb154f40acdc04c42c644a60e (diff)
Add debian/README.source with instructions on bzr handling.
-rw-r--r--debian/README.source129
-rw-r--r--debian/changelog1
2 files changed, 130 insertions, 0 deletions
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 000000000..0ceff5996
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,129 @@
1Debian OpenSSH source package handling
2======================================
3
4The Debian package of OpenSSH is maintained in Bazaar
5(http://bazaar-vcs.org/, or the 'bzr' package in Debian). You will need at
6least version 1.16.1; the version in Debian testing as of the time of
7writing (2009-12-21) is fine, or you can use the version in lenny-backports.
8URLs are as follows:
9
10 Anonymous branch: http://bzr.debian.org/pkg-ssh/openssh/trunk
11 Web browsing: http://bzr.debian.org/loggerhead/pkg-ssh/openssh/trunk
12 Authenticated, for developers with commit access only:
13 bzr+ssh://bzr.debian.org/bzr/pkg-ssh/openssh/trunk
14
15Although it's possible that I may use something like bzr-loom in the future
16to better manage things like the Kerberos/GSSAPI patch, right now there's no
17funny business and all that developers need to do is:
18
19 # To check out:
20 bzr co bzr+ssh://bzr.debian.org/bzr/pkg-ssh/openssh/trunk openssh
21
22 # To update:
23 bzr up
24
25 # To edit:
26 # hack hack hack, and 'bzr add' any new files
27 debcommit # or bzr commit
28 # note that this pushes automatically; you can use 'bzr unbind' to
29 # temporarily prevent this, or 'bzr branch' to create a local branch which
30 # you can merge later
31
32 # To release:
33 dch -r && debcommit -r
34
35If you have lots of branches, you'll probably want to use a shared
36repository to save space. Run 'bzr init-repo .' in an ancestor directory of
37all your OpenSSH working directories. For example, I have a shared
38repository in ~/src/debian/openssh/, upstream checkouts in
39~/src/debian/openssh/upstream/, and my own working trees in
40~/src/debian/openssh/trunk/.
41
42Merging new upstream releases
43-----------------------------
44
45(Most developers will not need to read this section.)
46
47Thanks to the import from Portable OpenSSH CVS provided by Launchpad
48(https://code.launchpad.net/~vcs-imports/openssh/main, accessible by the
49shortcut 'lp:openssh' from the bzr client), the Debian branch is a true DVCS
50branch from upstream. This is a worthwhile property, but preserving it does
51take a little bit of work.
52
53Launchpad only imports CVS HEAD, but upstream sometimes produces releases
54from a branch. We use the same software used by Launchpad to import the
55branch as well, but a few small hacks are necessary to do good branch
56imports. In Bazaar, it's important that the same file in different branches
57should have the same file-id, otherwise merge attempts will try to delete
58and re-add the file which usually doesn't work out very well. Occasionally a
59file is added to CVS HEAD and then also added to a branch, and cscvs isn't
60quite smart enough to spot this and copy over the file-id. We need to help
61it out.
62
63To fetch the necessary code:
64
65 bzr get lp:~cjwatson/launchpad-cscvs/openssh-branch-imports
66 # or 'bzr pull' in the appropriate directory to update this, if you
67 # already have a copy
68
69To import a branch, V_5_3 in this example:
70
71 export PATH="/path/to/cscvs/openssh-branch-imports:$PATH"
72 export PYTHONPATH=/path/to/cscvs/openssh-branch-imports/modules:/path/to/cscvs/openssh-branch-imports
73 # in a CVS checkout of :ext:anoncvs@anoncvs.mindrot.org:/cvs module
74 # openssh:
75 cscvs cache -b
76 # or 'cscvs cache -u' if you've done this before and want to update
77 cvs up -rV_5_3
78
79 # Now we need to get a few bits of information from cscvs' cache.
80 sqlite CVS/Catalog.sqlite
81 sqlite> select csnum,log from changeset where branch = 'V_5_3' order by startdate;
82 # There will be a solid block of "Creation of branch V_5_3" changesets at
83 # the start; look for the first revision *after* this. Substitute this in
84 # the following wherever you see "CSX".
85 sqlite> select revision,filename from revision where branch = 'V_5_3' and csnum >= CSX and revision not like '%.%.%' order by filename;
86 # Anything listed here will need to be added to the openssh_ids dictionary
87 # in modules/CVS/StorageLayer.py in cscvs. Please send Colin Watson a
88 # patch if you do this.
89
90 # Next, look up the branchpoint revision in the main bzr import (bzr get
91 # lp:openssh). It's usually easiest to just look it up by commit message
92 # and double-check the timestamp. Substitute this revision number for
93 # "BPR" in the following. /path/to/openssh/main is wherever you've checked
94 # out lp:openssh.
95 bzr get -rBPR /path/to/openssh/main /path/to/openssh/5.3
96 # If you're using Bazaar signed commits with a GPG agent, make sure that
97 # your agent has seen your passphrase recently. Now you can start the
98 # actual import!
99 cscvs -D4 totla -SC V_5_3.CSX: /path/to/openssh/5.3
100 # If this fails at the end with a "directories differ" message, you may
101 # have forgotten to switch your CVS checkout to the appropriate branch
102 # with 'cvs up -r...' above. Otherwise you'll have to debug this for
103 # yourself. It's also worth double-checking that any files added to the
104 # branch have file-ids matching those on the trunk, using 'bzr ls -R
105 # --show-ids'.
106
107Now we have a Bazaar branch corresponding to what's in CVS. However,
108upstream releases involve a 'make distprep' step as well to construct the
109tarball, and we need to import the results of this as well to get a clean
110package.
111
112Start by unpacking the upstream tarball (remember to check its GPG signature
113first!). Copy the .bzr directory from the upstream branch you prepared
114earlier. Now we have another branch, but with a working tree corresponding
115to the upstream tarball. Modifications and deletions are handled
116automatically, but we need to handle additions explicitly to make sure
117file-ids are correct (see above). Run:
118
119 bzr add --file-ids-from=/path/to/openssh/debian/trunk
120 bzr st --show-ids
121 # compare this with 'bzr ls --show-ids' in the Debian trunk to make sure
122 # the result will be mergeable
123 bzr ci -m 'Import 5.3p1 tarball'
124
125You should now be able to 'bzr merge' from the tarball branch, resolve
126conflicts, and commit. If you see lots of "Contents conflict" messages, you
127may have got the file-ids wrong. Once you've committed the merge, you can
128throw away the tarball branch, as all its history will have been
129incorporated.
diff --git a/debian/changelog b/debian/changelog
index 7d2606e8c..eaab6b72b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ openssh (1:5.1p1-9) UNRELEASED; urgency=low
2 2
3 * Use x11.pc when compiling/linking gnome-ssh-askpass2 (closes: #555951). 3 * Use x11.pc when compiling/linking gnome-ssh-askpass2 (closes: #555951).
4 * Moved to bzr.debian.org; add Vcs-Bzr and Vcs-Browser control fields. 4 * Moved to bzr.debian.org; add Vcs-Bzr and Vcs-Browser control fields.
5 * Add debian/README.source with instructions on bzr handling.
5 6
6 -- Colin Watson <cjwatson@debian.org> Thu, 12 Nov 2009 21:31:44 +0000 7 -- Colin Watson <cjwatson@debian.org> Thu, 12 Nov 2009 21:31:44 +0000
7 8