Debian Codegraph @

README

raw
1
2 General documentation for module-assistant's functionality
3
4 Contents:
5 =========
6
7 - How does it work
8 - Interface of control scripts
9 - scripts/include directory structure
10 - mini-HOWTO
11 - Conventions
12 - Glossary
13
14
15 How does the whole thing work?
16 ------------------------------
17
18 Every package that should be controlled with modass provides a control script
19 (see below) that accepts a set of defined commands
20
21 Control scripts interface:
22 --------------------------
23
24 update
25 updates the intenal data when needed, eg. version number.
26 Scripts can do whatever they want, any may use the
27 /var/lib/modass/cache directory as playground for caching the
28 data. Before update is executed, every packakage gets its dpkg
29 info delivered into /var/cache/modass/PACKAGE.dkpgstatus
30
31 cur_version
32 outputs the currently installed version of the package;
33 syntax == dpkg-style
34
35 avail_version
36 prints the latest available version of the package
37
38 lastpkg
39 outputs the filename (full path) of the last built package for the
40 specified (or current) kernel. Empty if the build was not successful.
41
42 download
43 installs the latest source package or fetches the source with
44 apt-get/apt-src/whatever
45
46 unpack
47 unpacks the downloaded package source in $MODULE_LOC
48
49 clean
50 cleanup in the build-directory, eg. wiping it. User can restore
51 the cleaned files with the "unpack" rule.
52
53 purge
54 removes the cached data and localy built binary packages. USE
55 WITH CARE!
56
57 installed
58 output: "installed" or "not installed"
59
60 update
61 updated cached data
62
63 prefix
64 print symbolic name of the package (eg. ftpfs for ftpfs-2.4.20)
65
66 build well, selfexpaining. Usualy started in the build directory.
67
68
69 Ressource directory (planned location: /usr/share/modass)
70 ---------------------------------------------------------
71
72 modass
73 |-- include (files to be sourced by package maintaining scripts and
74 makefile includes)
75 |-- overrides (package maintscripts taking precedence over the default ones)
76 `-- packages (some default scripts, provided by the modass package itself)
77
78 Package maintainence scripts are either shipped with module-assistant or
79 installed by other binary package that have something to do with the
80 modules. For example, cloop-utils installs one into modass/overrides/.
81 Installing it is a matter of taste - if you wish your package to be listed in
82 m-a frontend's list of "known" packages, add a control script.
83 m-a can also work if there is no control script by guessing the package names.
84 However, this requires additional processing on the client side and is
85 error-prone, so having a such script installed in the overrides directory does
86 not hurt.
87
88 You can ship the control script inside of the -source package or some other
89 -utils package that is always installed (to make the source package visible for
90 the users).
91
92 HOW TO PREPARE YOUR PACKAGES:
93 -----------------------------
94
95 See HOWTO-DEVEL file for more detailed explanation.
96
97 There are generic rules to be included in the debian/rules files, this
98 way:
99
100 -----------------------
101 PACKAGE=cloop
102 -include $(MA_DIR)/include/generic.make
103
104 # other stuff, including build-mod install-mod and build-deb rules
105 # specific for the module building
106
107 kdist_targets: clean build-mod install-mod build-deb
108
109 kdist_image: kdist_targets clean
110
111 # create the package and the changes file, maybe sign it
112 kdist: kdist_targets genchanges clean
113 ------------------------
114
115 CONVENTIONS:
116 ------------
117
118 - If $SIGNCHANGES is set, the generated .changes file will be signed
119 with debsign, gpg or pgp.
120
121 generic.make calculates following variables that can be used in your rules:
122
123 - DEB_DESTDIR : destination directory
124 - CHFILE : changes file (full path)
125 - DEB_NAME : maintainer's name (may be unset!)
126 - DEB_MAIL : maintainer's email address (may be unset!)
127 - MAINT : definitive maintainers ID, either from DEB_NAME/DEB_MAIL or
128 from local username and hostname
129 - CC : compiler used for the found kernel headers. If
130 $IGNORE_CC_MISMATCH is set and CC was not found, CC will be set to gcc
131
132 generic.make provides following targets:
133
134 - genchanges : generates the changes files and signs it when
135 $SIGNCHANGES is set
136
137 - echo-vars : prints relevant variables
138 - echo-changes : prints the name of the changes file
139 - echo-debfile : prints the name of binary Debian package
140 - echo-deb : prints the module package name
141 - configure-checks: complain loudly about wrong gcc version and suggest
142 to install the right package if the compiler was not found
143 - prep-deb-files : first, copies the files matching debian/*_KVERS_* to
144 filenames with real $KVERS. Then read files matching
145 debian/*.modules.in, substitue _KVERS_ inside with the real $KVERS
146 and store the file under the similar name without .modules.in.
147
148 GLOSSARY:
149 ---------
150
151 KVERS:
152
153 If you are using a packaged debian kernel with a name like
154 linux-image-2.6.16-2-k7-smp then KVERS is the whole last part of the name:
155 2.6.16-2-k7-smp.
156
157 If you have built a package using make-kpkg then the kernel version is the
158 concatenation of the main upstream version and the --append-to-version
159 argument, but not the --revision argument. If you look at the name of the
160 resulting deb, you can apply the same rule as in the previous paragraph.