Debian Codegraph @

debian/README.source

raw
1 OpenArena data for Debian
2 =========================
3
4 The version of the OpenArena data in Debian is split into several source and
5 binary packages, to avoid having to upload hundreds of megabytes for any
6 change. The source packages come from branches of a common git repository,
7 with minimal changes: to simplify this, the majority of the packaging is
8 duplicated between all the source packages.
9
10 The binary packages mostly consist of large zip files ("PK3 files"), which are
11 loaded by the ioquake3 engine. The source packages contain smaller files
12 (textures, sounds, etc.) which are compressed into the PK3 file, and the
13 source files for those smaller files. Most of the source packages correspond
14 to a single PK3 file, since that's the smallest unit that can produce a useful
15 binary package; some source and binary packages combine a number of smaller
16 PK3 files.
17
18 During the build step, we pack up the smaller asset files using zip(1) to get
19 an equivalent of the upstream-supplied PK3 files.
20
21 Checksums and network compatibility
22 -----------------------------------
23
24 In the default "pure server" mode, the Quake III engine enforces compatibility
25 between versions by requiring that the PK3 files used on the server and all
26 clients are basically identical: they must contain files with the same CRC-32,
27 in the same order.
28
29 As a result, modifying the assets (textures, sounds, etc.) is possible, but
30 not particularly useful, since it breaks compatibility with almost every
31 server. The normal way to replace assets in Quake-III-based games is to add
32 them to a new PK3 file that comes later than the upstream-supplied ones in
33 strcmp() order: assets in a later PK3 file will override assets of the same
34 name in an earlier PK3 file.
35
36 To keep the files in the order that will be compatible with upstream and
37 prevent accidental checksum mismatches, each PK3 file has a corresponding
38 file matching debian/*.pk3.contents which lists its contents. If you really
39 want to break compatibility, modify those files. (But don't do that.)
40
41 As a result of the "add instead of replacing" approach, all PK3 files in
42 OpenArena 0.8.8 are actually from OpenArena 0.8.1, except for
43 pak6-patch085.pk3 and pak6-patch088.pk3 which are from 0.8.5 and 0.8.8
44 respectively.
45
46 QVM bytecode not supplied in Debian
47 -----------------------------------
48
49 Some OpenArena PK3 files include bytecode files (*.qvm), compiled from GPL
50 C source code by a non-GPL compiler (q3lcc, which is not included in Debian).
51 In Debian, the bytecode has been removed from openarena-data and its
52 related packages; the source code is in the openarena package, and is compiled
53 to native code with gcc instead.
54
55 The QVM files inside the PK3 files are replaced by a dummy file starting with
56 the magic number 'NTVE', and ending with padding produced by debian/qvmbrute.c,
57 chosen so that its CRC32 matches the one supplied by upstream. Debian's
58 modified ioquake3 engine detects the magic number 'NTVE' and loads a
59 native-code equivalent of the original QVM file.
60
61 Upstream source code/build system (or lack of)
62 ----------------------------------------------
63
64 Upstream do not have an official source code release or build system for the
65 assets. For some files (scripts, most sounds and some textures), the data in
66 the PK3 is already in the preferred form for modification.
67
68 Where source files exist, they are only in the upstream svn repository (which
69 isn't branched or tagged), and are exported manually into the format that gets
70 distributed. This source package contains a best-effort attempt at finding the
71 sources, and does not attempt to automate the manual export process (unlikely
72 to work well, since as discussed above, identical output is needed). I suspect
73 that in practice the preferred form for modification is the combination of
74 the source and exported files.
75
76 It appears that upstream svn revision 901 corresponds to 0.8.1, revision
77 931 corresponds to 0.8.5 (some of the exported files were renamed in r926,
78 but that's not relevant to obtaining sources), and revision 947 corresponds
79 to 0.8.8.
80
81 Debian packaging git repository
82 -------------------------------
83
84 This git repository deliberately does not follow the DEP-14 repository
85 layout recommendation, because it contains multiple Debian source packages.
86 Instead, packaging branches are named for the source package in question:
87
88 openarena-085-data
89 openarena-088-data
90 openarena-data
91 openarena-maps
92 openarena-misc
93 openarena-oacmp1
94 openarena-players
95 openarena-players-mature
96 openarena-textures
97
98 and tags include the package name between "debian/" and the version:
99
100 debian/openarena-data/0.8.5split-11 (etc.)
101
102 Changes that affect all source packages are made on the openarena-data
103 branch and merged to all other branches.
104
105 Assets from the PK3 files, and the source files for them, are not included in
106 the games team git repository due to their size; please obtain them from the
107 orig tarball, or as described below, before building.
108
109 How the orig.tar.* is constructed
110 -----------------------------------
111
112 The .orig.tar.* tarball of this package was derived from the upstream's
113 binary distribution as follows:
114
115 * Unpack the documentation files except for CREDITS (COPYING, etc.) from
116 oa081.zip to the base directory
117
118 * Unpack CREDITS and readme_085.txt from oa085p.zip, and rename CREDITS to
119 CREDITS-0.8.5
120
121 * Unpack CREDITS and readme_088.txt from oa088p.zip, and rename CREDITS to
122 CREDITS-0.8.8
123
124 * Copy at least the upstream PK3 files listed in debian/openarena-data.paks to
125 the base directory (replacing openarena-data with the name of the source
126 package)
127
128 * Unpack CREDITS from mp-pak0.pk3 (which is not identical to the one from
129 either of the tarballs) as CREDITS
130
131 * List the source files corresponding to the assets, or a superset, in
132 debian/pak0.r901, etc.
133
134 * Run 'make -f debian/rules import-orig', which does the following:
135 - list the contents of each PK3 file, with their CRC32s, to
136 debian/pak0.pk3.contents (etc.)
137 - unpack ../pak0.pk3 to pak0/ (etc.), omitting any QVM files
138 - check out upstream svn revisions 901, 931, 947 of /source/assets/ into
139 debian/svn-r*/ (which are excluded from the tarballs)
140 - delete some non-GPL files from debian/svn-r*/source/assets/ which
141 have been excised from releases but are still in svn for some reason
142 - copy the source files corresponding to the relevant PK3 files (only)
143 into ./source/assets/
144
145 * Run 'make -f debian/rules export-orig' to make the "orig" tarball