diff options
Diffstat (limited to 'debian/README.source')
-rw-r--r-- | debian/README.source | 129 |
1 files changed, 129 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 @@ | |||
1 | Debian OpenSSH source package handling | ||
2 | ====================================== | ||
3 | |||
4 | The Debian package of OpenSSH is maintained in Bazaar | ||
5 | (http://bazaar-vcs.org/, or the 'bzr' package in Debian). You will need at | ||
6 | least version 1.16.1; the version in Debian testing as of the time of | ||
7 | writing (2009-12-21) is fine, or you can use the version in lenny-backports. | ||
8 | URLs 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 | |||
15 | Although it's possible that I may use something like bzr-loom in the future | ||
16 | to better manage things like the Kerberos/GSSAPI patch, right now there's no | ||
17 | funny 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 | |||
35 | If you have lots of branches, you'll probably want to use a shared | ||
36 | repository to save space. Run 'bzr init-repo .' in an ancestor directory of | ||
37 | all your OpenSSH working directories. For example, I have a shared | ||
38 | repository in ~/src/debian/openssh/, upstream checkouts in | ||
39 | ~/src/debian/openssh/upstream/, and my own working trees in | ||
40 | ~/src/debian/openssh/trunk/. | ||
41 | |||
42 | Merging new upstream releases | ||
43 | ----------------------------- | ||
44 | |||
45 | (Most developers will not need to read this section.) | ||
46 | |||
47 | Thanks to the import from Portable OpenSSH CVS provided by Launchpad | ||
48 | (https://code.launchpad.net/~vcs-imports/openssh/main, accessible by the | ||
49 | shortcut 'lp:openssh' from the bzr client), the Debian branch is a true DVCS | ||
50 | branch from upstream. This is a worthwhile property, but preserving it does | ||
51 | take a little bit of work. | ||
52 | |||
53 | Launchpad only imports CVS HEAD, but upstream sometimes produces releases | ||
54 | from a branch. We use the same software used by Launchpad to import the | ||
55 | branch as well, but a few small hacks are necessary to do good branch | ||
56 | imports. In Bazaar, it's important that the same file in different branches | ||
57 | should have the same file-id, otherwise merge attempts will try to delete | ||
58 | and re-add the file which usually doesn't work out very well. Occasionally a | ||
59 | file is added to CVS HEAD and then also added to a branch, and cscvs isn't | ||
60 | quite smart enough to spot this and copy over the file-id. We need to help | ||
61 | it out. | ||
62 | |||
63 | To 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 | |||
69 | To 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 | |||
107 | Now we have a Bazaar branch corresponding to what's in CVS. However, | ||
108 | upstream releases involve a 'make distprep' step as well to construct the | ||
109 | tarball, and we need to import the results of this as well to get a clean | ||
110 | package. | ||
111 | |||
112 | Start by unpacking the upstream tarball (remember to check its GPG signature | ||
113 | first!). Copy the .bzr directory from the upstream branch you prepared | ||
114 | earlier. Now we have another branch, but with a working tree corresponding | ||
115 | to the upstream tarball. Modifications and deletions are handled | ||
116 | automatically, but we need to handle additions explicitly to make sure | ||
117 | file-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 | |||
125 | You should now be able to 'bzr merge' from the tarball branch, resolve | ||
126 | conflicts, and commit. If you see lots of "Contents conflict" messages, you | ||
127 | may have got the file-ids wrong. Once you've committed the merge, you can | ||
128 | throw away the tarball branch, as all its history will have been | ||
129 | incorporated. | ||