English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Contents of /branches/common-nfo/Docs/info.nfo/nfo-draft

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3273 - (show annotations) (download)
Wed Jul 18 14:18:18 2007 UTC (6 years, 7 months ago) by tg
File size: 14715 byte(s)
adjust with DB draft

1 Semantical discussion about info.nfo
2
3 The syntactical specification is finished, and it's good. But.
4
5 Okay, now, bad news, sorry Phil, but illenfotizerdelendum est.
6 Nothing personal, but it doesn't adhere to our specificationto
7 first produce only one database from all the info.nfo files, then
8 spit out the generated files (Config.in, info.mk, *.control, etc.)
9 and to have the dependencies in only one place (you're using a
10 SELECT keyword, which breaks this concept, also SYMBOL etc.).
11
12 Taking your example (tabs alinged so it's better visible):
13
14 === BEGIN package/radvd/info.nfo
15 NAME radvd
16 VERSION 0.7.3
17 RELEASE 2
18 MD5SUM 56ce3f8cbf5966a0d531c21813320423
19 SOURCES http://v6web.litech.org/radvd/dist \
20 http://download.sourcemage.org/mirror
21 SOURCENAME ${PKG_NAME}-${PKG_VERSION}.tar.gz
22 SECTION net
23 PRIORITY optional
24 PKGDEPS kmod-ipv6
25 DESC_LINE IPv6 Routing Advertisement Daemon
26 DESC_FULL Routing Advertisement Daemon for IPv6
27
28 http://v6web.litech.org/radvd/
29 SYMBOL FWRT_PACKAGE_RADVD
30 DEFAULT_STATE n
31 SELECT FWRT_PACKAGE_KMOD_IPV6 \
32 BUSYBOX_CONFIG_FEATURE_IPV6
33 === END package/radvd/info.nfo
34
35 In the following examples, I'll leave out
36 SOURCENAME because it's the default value anyway
37 SECTION, PRIORITY because they're not needed,
38 since we do not parse this part of the control
39 file anyway (but we _could_ generate package/Control.in
40 using that information later)
41
42 So now we'll have to do something like this (and yes,
43 I will visually align the tabs here, in the actual
44 source file they'll have to be different as per the
45 syntactical spec):
46
47 changes:
48 SOURCENAME -> DISTFILE[_2, ...]
49 SOURCES -> MASTER_SITES[_2, ...]
50 RELEASE -> DASHVER
51
52 === BEGIN package/radvd/info.nfo
53 NAME radvd
54 #BROKEN no (default; add something else here to disable)
55 VERSION 0.7.3
56 DASHVER 2
57 PERMIT_SRC y
58 PERMIT_BIN y
59 # the following one is actually default
60 PKGNAME ${NAME}-${VERSION}-${RELEASE}
61 # I also at least want a pseudo-hash namedsize, to
62 # fight against sourceforge and similarly broken upstreams
63 HASHES md5
64 HASH_md5 56ce3f8cbf5966a0d531c21813320423
65 MASTER_SITES http://v6web.litech.org/radvd/dist/ \
66 http://download.sourcemage.org/mirror/
67 # this would be for a second and third distfile, if needed
68 #DISTFILES 3
69 #DISTFILE_2 fromthesamesite.tar.gz
70 #DISTFILE_3 fromanothersite.tar.gz:1
71 #SOURCES_1 http://someothersite/
72 #HASH_2_md5 ...
73 #HASH_3_md5 ...
74 # if this is missing, the init file is not copied
75
76 # this is for the postinst file
77 # if this doesn't exist/default to zero, it's not generated
78 RCCONF_SYMS 1
79 RCCONF_1_TAG radvd package
80 # SYM defaults to TAG
81 RCCONF_1_SYM radvd
82 # VAL defaults to "NO"
83 RCCONF_1_VAL NO
84 # empty here, otherwise same syntax like PKGDEPS
85 #BUILDDEPS
86 # first dependency: on a packet
87 # kmod-ipv6 is the "NAME" field of said package!
88 # dependencies are actually Config.in "select" lines
89 PKGDEPS kmod-ipv6
90 # second dependency: on a flavour
91 busybox,ipv6
92 # this is for Config.in and the control file
93 MENUITEM radvd
94 DESCRIPTION IPv6 Routing Advertisement Daemon
95 # this is for Config.in only
96 DEFAULT n
97 HELPTEXT Routing Advertisement Daemon for IPv6
98
99 http://v6web.litech.org/radvd/
100 === END package/radvd/info.nfo
101
102 PKGDEPS are "select" lines; to select a config symbol which
103 is not a flavour, package or multipackage (see below), prefix
104 its CSYM with an '@' sign. MENUDEPS are "depends on" lines;
105 same things apply.
106
107 You might have noticed I used ${NAME} to substitute one of
108 the fields from the info.nfo file. Since the specification
109 says, I quote,Backslashes (\) have to be escaped by
110 doubling them (\\)., I think we can use \${VARIABLE} to
111 access make variables, and make the ${...} special for the
112 nfotiser, in order to have some kind of variable/code reuse.
113
114
115 Okay, now for something more heavy-weight.
116
117 === BEGIN package/busybox/info.nfo
118 NAME busybox
119 VERSION 1.4.1
120 DASHVER 10
121 PERMIT_SRC y
122 PERMIT_BIN y
123 HASHES md5
124 HASH_md5 5728403bce309cdabcffa414e2e64052
125 MASTER_SITES http://www.busybox.net/downloads/
126 MENUITEM busybox
127 DESCRIPTION The Swiss Army Knife
128 HELPTEXT The Swiss Army Knife of embedded Linux. It slices, it
129 dices, it makes Julian Fries.
130
131 http://busybox.net/
132 DEFAULT y
133
134 # only a few, to demonstrate
135 # by default, main (without _foo) and SUBPACKAGES are tristate,
136 # flavours are boolean and (usually) have no MENUITEM entry
137 FLAVOURS gzip ipv6 syslogd circlogbuf
138 DESCRIPTION_gzip gzip
139 HELPTEXT_gzip The gzip applet for busybox
140 DEFAULT_gzip y
141 DESCRIPTION_ipv6 Enable IPv6 support
142 HELPTEXT_ipv6 Enable IPv6 support in busybox.
143 This adds IPv6 support in the networking applets.
144 DEFAULT_ipv6 n
145 DESCRIPTION_syslogd syslogd
146 HELPTEXT_syslogd The syslogd utility is used to record logs of all the
147 blah...
148 DEFAULT_syslogd y
149 DESCRIPTION_circlogbuf Circular Buffer support
150 HELPTEXT_circlogbuf When you enable this feature, the syslogd utility will
151 blah...
152 DEFAULT_circlogbuf y
153 # a Config.in "depends" line
154 MENUDEP_circlogbuf ,syslogd
155 # the prefixing , means: current package, flavour syslogd
156 # it expands to "busybox,syslogd"
157
158 # of course, there's *so* much missing here
159 === END package/busybox/info.nfo
160
161 All configuration symbols are autogenerated, although busybox
162 does make a case for an option to manually select them, and
163 because I propose to first make an SQLite database out of ALL
164 info.nfo files AT ONCE before writing out the first byte of
165 any generated file, it doesn't matter, since we can get the
166 configuration symbols from the database. So we'd use something
167 like this:
168 CSYM_ipv6 BUSYBOX_CONFIG_FEATURE_IPV6
169
170 But for normal packages, we don't FREEWRT_PACKAGE_foo or
171 FREEWRT_COMPILE_bar any more, we'll just let the nfo system
172 deal with that.
173
174 We also need a CITEM_foo (bool, tristate, int, string) in case
175 we'll have to override the defaults.
176
177 ----
178
179 I already spoke of subpackages.
180
181 Let me make an example for it using OpenSSL, which as of now
182 has a FWRT_COMPILE and two FWRT_PACKAGEs.
183
184 === BEGIN package/openssl/info.nfo
185 NAME openssl
186 VERSION 0.9.8d
187 DASHVER 2
188 PERMIT_SRC y
189 PERMIT_BIN y
190 HASHES md5
191 HASH_md5 8ed1853538e1d05a1f5ada61ebf8bffa
192 MASTER_SITES http://www.openssl.org/source/ #...
193 # this one is actually missing at the moment, I think, but
194 # because it has a "zlib-dynamic" option, we'll need it
195 # btw, PKGDEPS are both build and run time
196 PKGDEPS libz
197 MENUITEM libopenssl # or just openssl? I like just openssl better
198 DESCRIPTION Open source SSL (Secure Socket Layer) libraries
199 DEFAULT n
200 HELPTEXT The OpenSSL Project is a collaborative effort to develop a robust,
201 blah...
202 MULTIPKGS tool
203 NAME_tool openssltool
204 PKGNAME_tool openssl-util-${VERSION}-${RELEASE}
205 PKGDEPS_tool openssl # the NAME
206 MENUITEM_tool openssl-util
207 DESCRIPTION_tool OpenSSL command line tool
208 DEFAULT_tool n
209 HELPTEXT_tool ...
210 === END package/radvd/info.nfo
211
212
213 How about that?
214
215 -> MULTIPKGS can have FLAVOURS
216 -> FLAVOURS and CONFSYMS can only have
217 DESCRIPTION
218 DEFAULT
219 HELPTEXT
220 MENUDEPS
221 CSYMDEPS
222 PKGDEPS
223 CITEM
224 CSYM
225 BROKEN - if set, it's just not displayed
226 BUILDDEPS - flavours only
227 PERMIT_BIN - flavours only
228 -> MULTIPKGS can have everything *except* these:
229 CATEGORY
230 PERMIT_SRC
231 DISTFILES, DISTFILE_n, MASTER_SITES_n
232 HASHES, HASH_n_i
233 CVALDEPS
234
235 CVALDEPS is for additional dependencies, e.g. the base-files*
236 packages depend on stuff from ${TOPDIR}/Config.in, which must
237 be listed there
238
239
240 ________________________________________________________________________________
241
242 Datenbankschema
243
244 Tabelle mit allen Infos zu den Paketen: pkgs
245 -> indiziert nach NAME
246
247 Tabelle mit zwei Feldern, PaketNAME und SubpaketNAME: subpkgs
248 -> beide zusammen geben den primary key
249
250 Tabelle mit zweimal PaketNAME: builddeps
251 -> beide zusammen geben den primary key
252
253 Tabelle mit zweimal PaketNAME: pkgdeps
254 -> beide zusammen geben den primary key
255
256 Table with pkgname, flavourname and flavour-related extensions
257 -> primary key: pkgname+flavourname
258
259 Table for config symbols
260 -> ???
261
262 ?
263
264 XXX what about pure config entries?
265
266 ________________________________________________________________________________
267
268 Feldliste
269
270 NAME <error>
271 BROKEN n
272 VERSION <error>
273 DASHVER 1
274 PKGNAME ${NAME}-${VERSION}-${RELEASE}
275 PERMIT_SRC <error> could be n, but we want to catch it
276 PERMIT_BIN <error>
277 MASTER_SITES <optional>
278 MASTER_SITES_<n> <optional>
279 DISTFILES 1
280 DISTFILE_<n> ${NAME}-${VERSION}.tar.gz
281 HASHES md5 optional if ${DISTFILES}==0
282 HASH_<hash> <error> for <hash> in ${HASHES}
283 HASH_<n>_<hash> <error if n .le. ${DISTFILES}>
284 RCCONF_SYMS 0
285 RCCONF_<n>_TAG <error if n .le. ${RCCONF_SYMS}>
286 RCCONF_<n>_SYM ${RCCONF_n_TAG}
287 RCCONF_<n>_VAL NO
288 CONFFILES <optional>
289 USERS <optional>
290 GROUPS <optional>
291 BUILDDEPS <optional> one per line
292 PKGDEPS <optional> one per line
293 MENUDEPS <optional> one per line
294 CSYMDEPS <optional> one per line
295 CVALDEPS <optional> one per line
296 MENUITEM <optional> see below
297 CATEGORY misc
298 CSYM <auto-generated>
299 CITEM tristate
300 DEFAULT n
301 DESCRIPTION <error>
302 HELPTEXT ${DESCRIPTION}
303 URLS <optional>
304 FLAVOURS <optional> space separated (or with \ continued)
305 MULTIPKGS <optional> space separated (or with \ continued)
306 PERMIT_BIN_<x> <optional>
307 CONFFILES_<x> <optional>
308 BUILDDEPS_<x> <optional>
309 PKGDEPS_<x> <optional>
310 MENUDEPS_<x> <optional>
311 CSYMDEPS_<x> <optional>
312 MENUITEM_<x> <optional> see below
313 CATEGORY_<x> misc multipkgs only
314 CSYM_<x> <auto-generated>
315 CITEM_<x> bool if flavour, tristate if subpackage
316 DEFAULT_<x> n
317 DESCRIPTION_<x> <error>
318 HELPTEXT_<x> ${DESCRIPTION_x}
319 CONFSYMS
320
321 -> if MENUITEM is not empty, the Config.in entry is formatted
322 like this: "${MENUITEM}.....${DESCRIPTION}"
323 else it's "${DESCRIPTION}" only, without padding
324 XXX what about indentation?
325
326 pure config entries: CONFSYMS
327
328 Some relationships between databases are not used for the RDBMS,
329 they are merely text relationships (and thus, the m:n ones do not
330 need relationship solvement tables):
331 m:n FLAVOURS.BDEPS - SOURCES.DIRECTORY
332 m:n PACKAGES.BDEPS - SOURCES.DIRECTORY
333 m:n CSYMS.MDEPS - CSYMS.CSYM
334 m:n CSYMS.SDEPS - CSYMS.CSYM
335 n:1 CSYMS.DIRECTORY - SOURCES.DIRECTORY
336 m:n SOURCES.VDEPS - CSYMS.CSYM
337
338 CSYMS.ORDER is a manually incremented unique integer showing the
339 order of the fields in the input file (to try to preserve it),
340 see http://article.gmane.org/gmane.comp.embedded.freewrt.devel/1022
341
342 The DB scheme is read from an SQL source file by the DB creator,
343 and the category name->description assignment is read from an extra
344 file in the NFO format as well.
345
346 URLs are added to the HELPTEXT (among other things).
347
348 ______________________________________________________________________________
349
350 Draft database designERM
351
352 Note: the field and database names here are shown in mixed case;
353 in the actual database, only the UPPERCASE letters from the draft
354 (not the underscores, lower-case letters and comments) are used as
355 field names IN LOWERCASE. (e.g, desc is shorter than DESCRIPTION,
356 and ord works whereas ORDER is a keyword).
357
358 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
359 ┃ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ⁿ∶¹ ┃
360 ┃ ╭─────────────────╮ ╭────────────────╮ ┃ ╭─────────────╮ 1:1 ┃ ╭──────────────╮ ┃ ╭─────────────╮
361 ┃ │ FLAVOURS │ │ CSYMS │ ┃ │ SOURCES │ ┃ │ PACKAGES │ ┃ │ RCCONF_syms
362 ┃₁├─────────────────┤ 1:1 ├────────────────┤ ┃ ├─────────────┤ ┃ ├──────────────┤ ┃ ├─────────────┤
363 ┃ⁿ̄│ C̲S̲Y̲̲M̲ ┿━━━━━┿ C̲S̲Y̲M̲ ┿┳┳┳┛ ┏━━┿ D̲I̲R̲E̲C̲T̲O̲R̲Y̲ ┿━┓ 1:n ┗━┿ C̲̲S̲Y̲M̲ ┿━┛ ┏━┿ N̲A̲M̲E̲ │
364 ┗━┿ PACKAGE (csym) │ │ BROKEN │┃┃┃ ┃ │ PERMIT_SRC │ ┣━━━━━━━┿ SOURCE │ ┃ │ VALUE
365 FLAVOUR (name) │ │ CITEM (type) │┃┃┃ ┃┏━┿ DISTFILES │ ┃ │ MENUITEM │ ┃ │ TAG
366 PERMIT_BIN │ │ DEFauLT │┃┃┗━ ̴┃̴┃̴ ̴┿ VDEPS¹ │ ┃ │ NAME │ ┃ ╰─────────────╯
367 ┏━┿ BDEPS (dirs)¹ │ │ DESCription │┃┃ ┃┃ │ URLS │ ┃ │ VERSION │ ┃
368 ┃ ╰─────────────────╯ │ HELPtext │┃┃ ┃┃ ╰─────────────╯ ┃ │ DASHVER │ ┃
369 ┃ ⑴ m:n relationshipMDEPS (csyms)¹ ┿┛┃ ┃┃₁ ┃ │ PKGNAME │ ┃
370 ┃ │ SDEPS (csyms)¹ ┿━┛ ┃┃ⁿ̄ ┃ m:nPERMIT_BIN │ ┃
371 ┃ ╭─────────────╮ ┏━━━━━━┿ CATEGORY │ ┃┃ ┗━━━━━━━┿ BDEPS │ 1:n
372 ┃ │ CATEGORIES │ ┃ ¹∶ⁿ │ DIRECTORY ┿━━━━━┫┃ ╭───────────────╮ │ RCCONF_SYMS ┿━━━━━┛
373 ┃ ├─────────────┤ ┃ │ ORDer │ ⁿ∶¹ ┃┃ │ DISTFILES │ │ CONFFILES
374 ┃ │ N̲A̲M̲E̲ ┿━━┛ ╰────────────────╯ ┃┃ ├───────────────┤ │ USERS
375 ┃ │ DESCription │ ┃┗━┿ D̲I̲S̲T̲F̲I̲L̲E̲ │ │ GROUPS
376 ┃ ╰─────────────╯ m:n ┃ │ master_SITES │ ╰──────────────╯
377 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ HASHES
378 ╰───────────────╯

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20