| 1 |
|
| 2 |
This file outlines the general steps the author took in updating |
| 3 |
debram (0.6.4) to (0.6.5), including several specifics where |
| 4 |
appropriate. These steps are not really scriptable (if they were, the |
| 5 |
author would have scripted them) and they probably require some judgment |
| 6 |
and understanding to follow profitably. However, seeing how the author |
| 7 |
went from (0.6.4) to (0.6.5) may at least save you some needless |
| 8 |
confusion, if you find yourself maintaining the package for the first |
| 9 |
time. The steps are good. Follow them generally, and you can release a |
| 10 |
well trimmed debram update. (This file is admittedly not as polished as |
| 11 |
one would like. The author doubts that many people will read it, so it |
| 12 |
does not seem worthwhile for the author to spend an excessive amount of |
| 13 |
time on it.) |
| 14 |
|
| 15 |
The steps refer to versions "0.6.4" (old) and "0.6.5" (new), but these |
| 16 |
numbers are just for illustration. The author has already done the |
| 17 |
actual update from (0.6.4) to (0.6.5). Hence, where "0.6.4" and "0.6.5" |
| 18 |
appear, you should substitute the old and new version numbers which |
| 19 |
apply to your present debram update work. |
| 20 |
|
| 21 |
1. Ensure that you have the correct Packages and Sources files for the |
| 22 |
distribution you are working on. There are more than one way to get or |
| 23 |
construct these files. For example, you can download them from a |
| 24 |
convenient Debian FTP mirror, or concatenate them from an official set |
| 25 |
of Debian CDs. |
| 26 |
|
| 27 |
In going from (0.6.4) to (0.6.5), the author downloaded |
| 28 |
|
| 29 |
dists/Debian3.1r0/main/binary-i386/Packages.gz |
| 30 |
dists/Debian3.1r0/main/source/Sources.gz |
| 31 |
|
| 32 |
unpacking them with gunzip(1). |
| 33 |
|
| 34 |
The Sources file is not strictly necessary, incidentally, but it |
| 35 |
sometimes proves useful in helping to explain the build-dependencies |
| 36 |
among the archive's various packages. |
| 37 |
|
| 38 |
2. Create a `debram/' working directory. |
| 39 |
|
| 40 |
3. Copy `debram_0.6.4.dsc', `debram_0.6.4.tar.gz' and the Packages and |
| 41 |
Sources file into the `debram/' working directory. |
| 42 |
|
| 43 |
4. Give the commands |
| 44 |
|
| 45 |
$ cd debram |
| 46 |
$ for A in Packages Sources ; do mv -v $A{,.orig} ; done |
| 47 |
$ dpkg-source -x debram_0.6.4.dsc |
| 48 |
$ cp -av debram-{0.6.4,0.6.5} |
| 49 |
$ cd debram-0.6.5 |
| 50 |
|
| 51 |
5. Create a working Packages file which includes additional |
| 52 |
Ramification information by |
| 53 |
|
| 54 |
$ helper/new-debram-body -P ../Packages.orig >../Packages |
| 55 |
|
| 56 |
NOTE RE THE FOLLOWING STEPS: The order of steps 6 through 12 does not |
| 57 |
matter. They can be done concurrently in any order. |
| 58 |
|
| 59 |
6. Do not worry about updating version numbers and release dates in the |
| 60 |
various source files: helper scripts are provided which will do this for |
| 61 |
you automatically later. Also do not worry about updating the |
| 62 |
`debian/changelog' yet. |
| 63 |
|
| 64 |
7. Observe that the new working Packages file includes |
| 65 |
a "Ramification: " line for each package ramified in debram.txt. Edit |
| 66 |
these lines as needed or desired. Add new "Ramification: " lines for |
| 67 |
packages which lack them. Note that you need not (and probably should |
| 68 |
not) type out the full ram title on a "Ramification: " line; the ram |
| 69 |
number suffices. For example, if you found that `bsdutils' were |
| 70 |
misramified with |
| 71 |
|
| 72 |
Ramification: 6100 GAME PROGRAMMING |
| 73 |
|
| 74 |
you would correct this to read |
| 75 |
|
| 76 |
Ramification: 5000 |
| 77 |
|
| 78 |
You would not waste time typing out "STANDARD UTILITIES AND FILES". |
| 79 |
|
| 80 |
Do not actually move package lines around in the body of the |
| 81 |
`debram.txt' file. A helper script is provided which will do this for |
| 82 |
you automatically in a later step, based on the changes you make now to |
| 83 |
the working Packages file. |
| 84 |
|
| 85 |
(It is a permissible alternative to edit the `debram.txt' file directly, |
| 86 |
incidentally, dispensing with the working Packages file. For most |
| 87 |
updates such direct editing is harder and more complex. However, for |
| 88 |
some updates---not most, but some---the author himself does edit |
| 89 |
directly; so, despite advice to the contrary, if you want to edit |
| 90 |
directly, then you might read through the lengthy comments at the head |
| 91 |
of `helper/new-debram-body'. That script can help you. Note that for |
| 92 |
historical reasons `debram.txt' is encoded in iso-8859-1---a convention |
| 93 |
you must follow unless you wish to undertake the wholesale conversion of |
| 94 |
the source code to utf-8.) |
| 95 |
|
| 96 |
8. At the head of debram.txt, in the "RAMIFICATION MAP AND TABLE OF |
| 97 |
CONTENTS", add, delete or modify ramifications and ram titles as needed. |
| 98 |
(Do not do this lightly. The typical debram update will not alter the |
| 99 |
ramification map at all. However, sometimes it may be necessary to make |
| 100 |
a small correction or addition. Once in a long while it may be |
| 101 |
necessary to reform the entire ramification.) Make the corresponding |
| 102 |
changes at the foot of the file under "CROSS-REFERENCE (SEE ALSO)" and |
| 103 |
in the main body of the file. In the main body, it is not necessary to |
| 104 |
give an accurate count of packages after each ram title; just put |
| 105 |
a "(0)" there (the helper scripts will fix this for you automatically |
| 106 |
later). |
| 107 |
|
| 108 |
9. At the foot of debram.txt, under "CROSS-REFERENCE (SEE ALSO)", add, |
| 109 |
delete and/or edit cross references as needed or desired. |
| 110 |
|
| 111 |
10. Add new maintainers to `maint.txt' and otherwise edit the file as |
| 112 |
needed or desired. |
| 113 |
|
| 114 |
11. Modify the various other source files as needed or desired. Note |
| 115 |
that users of debram (0.6.4) (released with sarge) have been promised |
| 116 |
that later debram-data (0.6.x) binaries would work with their existing |
| 117 |
debram (0.6.4) binaries. You probably should not break this |
| 118 |
compatibility (if NMUing, you really probably should not break it). If |
| 119 |
you do break it for some reason, you must number your new version at |
| 120 |
least 0.7. |
| 121 |
|
| 122 |
12. (This step is not very important. You can safely skip it.) If a |
| 123 |
new year has turned since the last debram update, manually edit the |
| 124 |
copyleft date "2002-2005" (or whatever it currently is) to reflect the |
| 125 |
new year. Do this in `helper/DescLoc' and in each of the several other |
| 126 |
files referenced therein (probably debram.1, debram.txt and |
| 127 |
debian/copyright)---but not in `cmdsel.txt', unless you are actually |
| 128 |
updating that file. |
| 129 |
|
| 130 |
NOTE RE THE FOLLOWING STEPS: In general, unlike as steps 6 through 12 |
| 131 |
above, the order of the following steps does matter. Nothing prevents |
| 132 |
you from varying the steps and their order as needed, naturally, if you |
| 133 |
understand basically what the steps do. If unsure, however, follow the |
| 134 |
steps in order. |
| 135 |
|
| 136 |
13. Return to the `debram/debram-0.6.5/' directory, if you are not still |
| 137 |
in it. |
| 138 |
|
| 139 |
14. Give the commands |
| 140 |
|
| 141 |
$ helper/update-ver '0.6.5' |
| 142 |
$ helper/update-date '3 Oct 2005 21:00' |
| 143 |
|
| 144 |
(substituting the correct new version number and release date for those |
| 145 |
in the example). These scripts format and update the version number and |
| 146 |
release date (and time) as appropriate in various places about the |
| 147 |
source, including the man page and the changelog. For correct changelog |
| 148 |
handling, you must invoke the scripts in the order indicated, and you |
| 149 |
must invoke `helper/update-ver' exactly once (if you accidentally invoke |
| 150 |
it more than once, it's no disaster, but you'll have manually to remove |
| 151 |
the extra stanzas the script adds to the changelog's head). |
| 152 |
|
| 153 |
On the other hand, after `helper/update-ver', you can safely invoke |
| 154 |
`helper/update-date' as many times as desired. Only the date you give |
| 155 |
the last time you invoke the script matters. (This is useful if you |
| 156 |
aren't sure yet what the issue date should be. You can guess now, then |
| 157 |
give the right date later.) |
| 158 |
|
| 159 |
The `helper/update-date' script assumes that you are entering the time |
| 160 |
in UTC. This is what the author does. If you want to do otherwise, |
| 161 |
you'll have to modify the script or otherwise handle the matter |
| 162 |
yourself. If and only if your update is specifically associated with |
| 163 |
one of the daily 20:00-UTC Debian archive updates, you should use the |
| 164 |
date of the archive update and the time 21:00. Otherwise choose a |
| 165 |
convenient date on or near the day of your upload and (if you have no |
| 166 |
reason to do otherwise) use the time 00:00. |
| 167 |
|
| 168 |
15. Canonicalize `maint.txt' by |
| 169 |
|
| 170 |
$ helper/sort-maint <docdata/maint.txt >/tmp/maint.txt |
| 171 |
$ mv -v {/tmp,docdata}/maint.txt |
| 172 |
$ helper/check-maint-addr docdata/maint.txt ../Packages |
| 173 |
|
| 174 |
If the check script complains, fix the problem then run the check script |
| 175 |
again. |
| 176 |
|
| 177 |
16. Check the consistency of the ramifications, their titles and their |
| 178 |
cross-references by |
| 179 |
|
| 180 |
$ helper/check-ram-titles |
| 181 |
$ helper/check-ram-titles -s |
| 182 |
$ helper/find-cmdsel-dupes |
| 183 |
|
| 184 |
If the check script complains, fix the problem then run the check script |
| 185 |
again. (It surprises the author how often this check script catches an |
| 186 |
error of some kind.) |
| 187 |
|
| 188 |
Note that the script wants a ram's several cross-references in a |
| 189 |
peculiar order: first refs to other rams within the local group of 10; |
| 190 |
then to other rams in the local division of 100, then to other rams in |
| 191 |
the local section of 1000; then, subject to these constraints, in |
| 192 |
ascending numerical order. For example, |
| 193 |
|
| 194 |
8888 Foo ---> 8882 8885 8820 8821 8850 8511 1111 2222 3333 9999 |
| 195 |
|
| 196 |
The debram(1) binary automatically prepends an implicit reference to the |
| 197 |
ram's parent 8880, so the parent should not be listed explicitly. |
| 198 |
|
| 199 |
17. Create a new debram.txt from the existing one and the working |
| 200 |
Packages file by |
| 201 |
|
| 202 |
$ helper/new-debram-body -T ../Packages >/tmp/debram.txt |
| 203 |
|
| 204 |
Skim `/tmp/debram.txt' to ensure that it looks as you would expect and |
| 205 |
seems correctly to reflect the edits you have made in the working |
| 206 |
Packages file. When satisfied, |
| 207 |
|
| 208 |
$ mv -v {/tmp,docdata}/debram.txt |
| 209 |
|
| 210 |
18. Expand unnecessary tabs and remove stray line-ending blanks by |
| 211 |
|
| 212 |
$ helper/buffe-src |
| 213 |
|
| 214 |
Then, for good measure, invoke the scripts |
| 215 |
|
| 216 |
$ helper/check-ram-titles |
| 217 |
$ helper/check-ram-titles -s |
| 218 |
$ helper/find-cmdsel-dupes |
| 219 |
|
| 220 |
again. |
| 221 |
|
| 222 |
19. Run |
| 223 |
|
| 224 |
$ cd .. |
| 225 |
$ diff -ruN debram-{0.6.4,0.6.5} >debram-0.6.5.diff |
| 226 |
|
| 227 |
Review debram-0.6.5.diff carefully to ensure that the new source |
| 228 |
includes the changes you want and no others. Observe that |
| 229 |
`debram-0.6.5/debian/changelog' has an automatically generated dummy |
| 230 |
entry atop it for the new version. Correct this according to what you |
| 231 |
see in the .diff. After completing the changelog, if desired, run the |
| 232 |
diff command again to get a complete .diff which reflects the new |
| 233 |
changelog entry. |
| 234 |
|
| 235 |
20. Test-build the revised package with |
| 236 |
|
| 237 |
$ cd debram-0.6.5 |
| 238 |
$ dpkg-buildpackage -rfakeroot -uc -us |
| 239 |
$ fakeroot debian/rules clean |
| 240 |
$ cd .. |
| 241 |
|
| 242 |
21. Install the revised package on your own system and see if it does |
| 243 |
not seem to work as expected. If it does, if you are otherwise |
| 244 |
satisfied, if you feel ready to upload, then proceed to build the |
| 245 |
package with pbuilder(1) or however else you usually build official |
| 246 |
packages for upload, run lintian/linda, etc., then upload. |
| 247 |
|
| 248 |
------------------------------------------------------------------------ |
| 249 |
|
| 250 |
A CONDENSED RECIPE FOR UPDATING DEBRAM |
| 251 |
|
| 252 |
It is unclear whether the following would interest anyone but the |
| 253 |
author. Nevertheless, here it is---for the author's own reference if |
| 254 |
for no one else's. |
| 255 |
|
| 256 |
Given shell parameters like |
| 257 |
|
| 258 |
V0=0.6.4 # the old version number |
| 259 |
V=0.6.5 # the new version number |
| 260 |
DT='3 Oct 2005 21:00' # the release date and time |
| 261 |
|
| 262 |
here is a general recipe, probably not to be followed literally, which |
| 263 |
concentrates most of the steps above: |
| 264 |
|
| 265 |
cd debram |
| 266 |
for A in Packages Sources ; do mv -v $A{,.orig} ; done |
| 267 |
dpkg-source -x debram_$V0.dsc |
| 268 |
cp -av debram-{$V0,$V} |
| 269 |
cd debram-$V |
| 270 |
helper/new-debram-body -P ../Packages.orig >../Packages |
| 271 |
# (Steps 6 through 12 go here.) |
| 272 |
helper/update-ver $V |
| 273 |
helper/update-date "$DT" |
| 274 |
helper/sort-maint <docdata/maint.txt >/tmp/maint.txt |
| 275 |
mv -v {/tmp,docdata}/maint.txt |
| 276 |
helper/check-maint-addr docdata/maint.txt ../Packages |
| 277 |
helper/check-ram-titles |
| 278 |
helper/check-ram-titles -s |
| 279 |
helper/find-cmdsel-dupes |
| 280 |
helper/new-debram-body -T ../Packages >/tmp/debram.txt |
| 281 |
mv -v {/tmp,docdata}/debram.txt |
| 282 |
helper/buffe-src |
| 283 |
helper/check-ram-titles |
| 284 |
helper/check-ram-titles -s |
| 285 |
helper/find-cmdsel-dupes |
| 286 |
cd .. |
| 287 |
diff -ruN debram-{$V0,$V} >debram-$V.diff |
| 288 |
diff -ruN debram-{$V0,$V} >debram-$V.diff |
| 289 |
cd debram-$V |
| 290 |
dpkg-buildpackage -rfakeroot -uc -us |
| 291 |
fakeroot debian/rules clean |
| 292 |
cd .. |
| 293 |
|
| 294 |
This recipe looks like a script, but it isn't quite. Several of the |
| 295 |
steps require preparation, thought, extension and/or modification, |
| 296 |
depending on the sort of update you are trying to do. Too many |
| 297 |
alternatives and options seem to exist for one to transform the recipe |
| 298 |
with reasonable effort into a sensible script which would help rather |
| 299 |
than hinder development (the scriptable parts have already been |
| 300 |
scripted; that's what all those `helper/' scripts are about). |
| 301 |
Nevertheless, once you have some experience updating debram, you may |
| 302 |
find the condensed recipe useful as a skeleton about which to organize |
| 303 |
your own debram update work. Anyway, this is what the author uses the |
| 304 |
recipe for. |
| 305 |
|