Debian Codegraph @

debian/README.source

raw
1 README.source for ppp
2 =====================
3
4 This is a pretty standard 3.0 (quilt) format package, using debhelper 9. There
5 are, however, some gotchas that people considring NMUs or other changes must
6 take into account:
7
8 - The package's version number must follow a particular format. See *Version
9 Number* below.
10
11 - There is a symbols file used for tracking the pppd binary's ABI. See *Symbols
12 File* for more information. The build process is strict about checking the
13 ABI using the symbols file.
14
15 - There are several packages that use ppp-dev to build plugins that may be
16 loaded into pppd. When adding patches you must be very careful about not
17 breaking ABI compatibility unnecessarily.
18
19 - If you must break ABI compatibility without uploading a new upstream release,
20 you must bump the ABI tag. See *Version Number* below.
21
22 - If you are uploading a new upstream release *or* changing the ABI tag in the
23 version number, you will effectively trigger a transition. A number of
24 depending packages will need to be rebuilt and the transition will need to be
25 managed properly.
26
27 Version Number
28 --------------
29
30 Debian Policy ยง5.6.12 states that there are three parts to a version number of
31 a package: epoch, upstream_version and debian_revision. For the ppp package the
32 epoch is currently unused and the upstream_version matches the upstream ppp
33 package version as you would expect. The debian_revision, however, is special.
34
35 Upstream ppp packages cause deliberate ABI breaks with every minor release.
36 This happens both because the default path which plugins are loaded from
37 contains the pppd version number, and because plugins should contain a
38 pppd_version string that matches the pppd version number (which pppd checks at
39 plugin load). Patches added to ppp in Debian may also silently change the ABI
40 that plugins expect (e.g. by changing function signatures or names, or changing
41 structure elements), so we need some additional means to track this.
42
43 In order to handle this in as graceful a way as possible, the debian_revision
44 incorporates an ABI revision field. This field is used to generate Depends or
45 Breaks entries for packages that build plugins for pppd, and must be present
46 or the build will fail.
47
48 There is currently no automatic tracking of the ABI, so manual care and
49 attention is required when making changes.
50
51 The version of the ppp package looks like::
52
53 2.4.7-1+1
54 +-+-+ | |
55 | | +--> Usual debian revision field
56 | +----> ABI version field
57 +--------> Usual upstream version field
58
59 Essentially the debian_revision field is followed immediately by the ABI
60 revision number, then a plus (+), then what would normally be included in the
61 debian_revision in any other package.
62
63 The ABI revision number must be an integer. Its value starts at one (1) and
64 must be incremented if the ABI changes without the upstream_version changing.
65 If the upstream_version field changes, the ABI version should be reset to 1.
66
67 If you are uploading an NMU and are confident you are not changing the ABI,
68 simply add your tag to the end of the version number as usual. The same applies
69 for security/stable updates and backports, too.
70
71 Symbols File
72 ------------
73
74 In order to help keep track of the ABI offered to external plugins, this
75 package uses a symbols file. This is very unconvential for an executable but is
76 normally considered a requirement for shared libraries. The symbols file is not
77 currently used beyond the ppp package itself (e.g. plugins have no way of using
78 the symbols file to generate dependencies at the moment).
79
80 This is consulted during the build process and if there are any changes in the
81 symbols in the binary compared to the symbols file the build will fail. This is
82 deliberate and helps to indicate that the ABI has changed and an ABI bump is
83 probably required.
84
85 Note that just because there are no changes compared to the symbol file this
86 does not mean an ABI change has not happened: a patch may well change things
87 that cannot be tracked using dpkg-gensymbols, for example a C struct may have
88 members changed which would also change the ABI.
89
90 The symbols file is generated using standard unmodified Debian tools. There are
91 two changes required in order for this to work, though:
92
93 1. The pppd binary is built with -Wl,-soname,pppd.so.$(VERSION) to add the
94 SONAME field to the ELF headers. This is done by patching the Makefile in
95 debian/patches/pppd-soname-hack.patch.
96
97 2. dh_makeshlibs is overridden in debian/rules to force dpkg-gensymbols to
98 inspect pppd: it normally only looks at files ending ``.so``. The ``-c2``
99 option is also added to ensure that any added/removed symbols cause the
100 build to fail.
101
102 If the build fails due to changed symbols, you will most likely need to update
103 the symbols file and bump the ABI revision (see *Version Number*), thus leading
104 to a transition and rebuilds of any packages that build ppp plugins.
105
106 # vim: ft=rst