File: c-reference.html

package info (click to toggle)
epm 4.2-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,812 kB
  • sloc: ansic: 11,090; cpp: 1,596; makefile: 303
file content (455 lines) | stat: -rw-r--r-- 12,631 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<HTML>
<BODY>

<H1 ALIGN="RIGHT"><A NAME="REFERENCE">C - List File Reference</A></H1>

<P>This appendix provides a complete reference for the EPM list file
and setup types formats.</P>

<H2>The EPM List File Format</H2>

<P>Each <I>EPM</I> product has an associated list file that
describes the files to include with the product. Comment lines
begin with the "#" character and are ignored. All other
non-blank lines must begin with a letter, dollar sign ("$"), or
the percent sign ("%").</P>

<!-- NEED 3in -->
<H3>List File Directives</H3>

<P>The following list describes all of the list file directives
supported by <I>EPM</I>:</P>

<DL><DD><DL>

	<DT>$name=value
	<BR>&nbsp;</DT>

	<DD>Sets the named variable to <I>value</I>.
	<B>Note:</B> Variables set in the list file are
	overridden by variables specified on the command-line or
	in the current environment.
	<BR>&nbsp;</DD>

	<!-- NEED 2in -->
	<DT>%copyright <I>copyright notice</I>
	<BR>&nbsp;</DT>

	<DD>Sets the copyright notice for the file.
	<BR>&nbsp;</DD>

	<DT>%description <I>description text</I>
	<BR>&nbsp;</DT>

	<DD>Adds a line of descriptive text to the distribution.
	Multiple lines are supported.
	<BR>&nbsp;</DD>

	<DT>%format <I>format [... format]</I>
	<BR>&nbsp;</DT>

	<DD>Uses following files and directives only if the
	distribution format is the same as <I>format</I>.
	<BR>&nbsp;</DD>

	<DT>%format !<I>format [... format]</I>
	<BR>&nbsp;</DT>

	<DD>Uses following files and directives only if the
	distribution format is not the same as
	<I>format</I>.
	<BR>&nbsp;</DD>

	<DT>%include <I>filename</I>
	<BR>&nbsp;</DT>

	<DD>Includes files listed in <I>filename</I>.
	<BR>&nbsp;</DD>

	<DT>%incompat <I>product</I>
	<DT>%incompat <I>filename</I>
	<BR>&nbsp;</DT>

	<DD>Indicates that this product is incompatible with the
	named product or file.
	<BR>&nbsp;</DD>

	<DT>%if <I>variable [... variable]</I><BR>
	%if !<I>variable [... variable]</I><BR>
	%ifdef <I>variable [... variable]</I><BR>
	%ifdef !<I>variable [... variable]</I><BR>
	%elseif <I>variable [... variable]</I><BR>
	%elseif !<I>variable [... variable]</I><BR>
	%elseifdef <I>variable [... variable]</I><BR>
	%elseifdef !<I>variable [... variable]</I><BR>
	%else<BR>
	%endif
	<BR>&nbsp;</DT>

	<DD>Conditionally includes lines in the list file. The
	<I>%if</I> lines include the lines that follow if the
	named variables are (not) defined with a value. The
	<I>%ifdef</I> lines include the lines that follow if the
	named variables are (not) defined with any value. These
	conditional lines cannot be nested.
	<BR>&nbsp;</DD>

	<DT>%install <I>script or program</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run after all
	files are installed. (This has been obsoleted by the
	%postinstall directive)
	<BR>&nbsp;</DD>

	<DT>%license <I>license file</I>
	<BR>&nbsp;</DT>

	<DD>Specifies the file to display as the software
	license.
	<BR>&nbsp;</DD>

	<DT>%packager <I>name of packager</I>
	<BR>&nbsp;</DT>

	<DD>Specifies the name of the packager.
	<BR>&nbsp;</DD>

	<DT>%patch <I>script or program</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run after all
	files are patched. (This has been obsoleted by the
	%postpatch directive)
	<BR>&nbsp;</DD>

	<!-- NEED 2in -->
	<DT>%postinstall <I>script or program</I><BR>
	%postinstall &lt;<I>scriptfile</I><BR>
	%postinstall &lt;&lt;<I>string</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run after all
	files are installed.
	<BR>&nbsp;</DD>

	<DT>%postpatch <I>script or program</I><BR>
	%postpatch &lt;<I>scriptfile</I><BR>
	%postpatch &lt;&lt;<I>string</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run after all
	files are patched.
	<BR>&nbsp;</DD>

	<DT>%postremove <I>script or program</I><BR>
	%postremove &lt;<I>scriptfile</I><BR>
	%postremove &lt;&lt;<I>string</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run after removing files.
	<BR>&nbsp;</DD>

	<DT>%preinstall <I>script or program</I><BR>
	%preinstall &lt;<I>scriptfile</I><BR>
	%preinstall &lt;&lt;<I>string</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run before all
	files are installed.
	<BR>&nbsp;</DD>

	<DT>%prepatch <I>script or program</I><BR>
	%prepatch &lt;<I>scriptfile</I><BR>
	%prepatch &lt;&lt;<I>string</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run before all
	files are patched.
	<BR>&nbsp;</DD>

	<DT>%preremove <I>script or program</I><BR>
	%preremove &lt;<I>scriptfile</I><BR>
	%preremove &lt;&lt;<I>string</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run before removing files.
	<BR>&nbsp;</DD>

	<DT>%product <I>product name</I>
	<BR>&nbsp;</DT>

	<DD>Specifies the product name.
	<BR>&nbsp;</DD>

	<!-- NEED 2in -->
	<DT>%provides <I>product name</I>
	<BR>&nbsp;</DT>

	<DD>Indicates that this product provides the named dependency.
	<BR>&nbsp;</DD>

	<DT>%readme <I>readme file</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a README file to be included in the distribution.
	<BR>&nbsp;</DD>

	<DT>%remove <I>script or program</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a script or program to be run before removing files.
	(This has been obsoleted by the %preremove directive)
	<BR>&nbsp;</DD>

	<DT>%release <I>number</I>
	<BR>&nbsp;</DT>

	<DD>Specifies the release or build number of a product
	(defaults to 0).
	<BR>&nbsp;</DD>

	<DT>%replaces <I>product</I>
	<BR>&nbsp;</DT>

	<DD>Indicates that this product replaces the named product.
	<BR>&nbsp;</DD>

	<DT>%requires <I>product</I>
	<DT>%requires <I>filename</I>
	<BR>&nbsp;</DT>

	<DD>Indicates that this product requires the named product or file.
	<BR>&nbsp;</DD>

	<DT>%system <I>system[-release] [... system[-release]]</I>
	<BR>&nbsp;</DT>

	<DD>Specifies that the following files should only be
	used for the specified operating systems and
	releases.
	<BR>&nbsp;</DD>

	<DT>%system !<I>system[-release] [... system[-release]]</I>
	<BR>&nbsp;</DT>

	<DD>Specifies that the following files should not be
	used for the specified operating systems and
	releases.
	<BR>&nbsp;</DD>

	<DT>%system all
	<BR>&nbsp;</DT>

	<DD>Specifies that the following files are applicable to
	all operating systems.
	<BR>&nbsp;</DD>

	<DT>%vendor <I>vendor or author name</I>
	<BR>&nbsp;</DT>

	<DD>Specifies the vendor or author of the product.
	<BR>&nbsp;</DD>

	<!-- NEED 2in -->
	<DT>%version <I>version number</I>
	<BR>&nbsp;</DT>

	<DD>Specifies the version number of the product.
	<BR>&nbsp;</DD>

	<DT>c <I>mode user group destination source</I>
	<DT>C <I>mode user group destination source</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a configuration file for installation. The
	second form specifies that the file has changed or is
	new and should be included as part of a patch.
	Configuration files are installed as "destination.N" if
	the destination already exists.
	<BR>&nbsp;</DD>

	<DT>d <I>mode user group destination -</I>
	<DT>D <I>mode user group destination -</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a directory should be created when
	installing the software. The second form specifies that
	the directory is new and should be included as part of a
	patch.
	<BR>&nbsp;</DD>

	<!-- NEED 2in -->
	<DT>f <I>mode user group destination source [nostrip()]</I>
	<DT>F <I>mode user group destination source [nostrip()]</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a file for installation. The second form
	specifies that the file has changed or is new and should
	be included as part of a patch. If the "nostrip()"
	option is included, the file will not be stripped before
	the installation is created.
	<BR>&nbsp;</DD>

	<DT>f <I>mode user group destination source/pattern [nostrip()]</I>
	<DT>F <I>mode user group destination source/pattern [nostrip()]</I>
	<BR>&nbsp;</DT>

	<DD>Specifies one or more files for installation using
	shell wildcard patterns. The second form specifies that
	the files have changed or are new and should be included
	as part of a patch. If the "nostrip()" option is
	included, the file will not be stripped before the
	installation is created.
	<BR>&nbsp;</DD>

	<DT>i <I>mode user group service-name source ["options"]</I>
	<DT>I <I>mode user group service-name source ["options"]</I>
	<BR>&nbsp;</DT>

	<DD>Specifies an initialization script for installation.
	The second form specifies that the file has changed or
	is new and should be included as part of a patch.
	Initialization scripts are stored in
	<VAR>/etc/software/init.d</VAR> and are linked to the
	appropriate system-specific directories for run levels
	0, 2, 3, and 5. Initialization scripts <B>must</B>
	accept at least the <I>start</I> and <I>stop</I>
	commands. The optional <I>options</I> following the
	source filename can be any of the following:
	<BR>&nbsp;
	
	<DL>

		<DT>order(<I>string</I>)</DT>

		<DD>Specifies the relative startup order
		compared to the required and used system
		functions. Supported values include First,
		Early, None, Late, and Last (OSX only).</DD>

		<DT>provides(<I>name(s)</I>)</DT>

		<DD>Specifies names of system functions that are
		provided by this startup item (OSX only).</DD>

		<!-- NEED 3 --><DT>requires(<I>name(s)</I>)</DT>

		<DD>Specifies names of system functions that are
		required by this startup item (OSX only).</DD>

		<DT>runlevels(<I>levels</I>)</DT>

		<DD>Specifies the run levels to use.</DD>

		<DT>start(<I>number</I>)</DT>

		<DD>Specifies the starting sequence number from
		00 to 99.</DD>

		<DT>stop(<I>number</I>)</DT>

		<DD>Specifies the ending sequence number from 00
		to 99.</DD>

		<DT>uses(<I>name(s)</I>)</DT>

		<DD>Specifies names of system functions that are
		used by this startup item (OSX only).</DD>

	</DL>
	<BR>&nbsp;</DD>

	<!-- NEED 2in -->
	<DT>l <I>mode user group destination source</I>
	<DT>L <I>mode user group destination source</I>
	<BR>&nbsp;</DT>

	<DD>Specifies a symbolic link in the installation. The
	second form specifies that the link has changed or is
	new and should be included as part of a patch.
	<BR>&nbsp;</DD>

	<DT>R <I>mode user group destination</I>
	<BR>&nbsp;</DT>

	<DD>Specifies that the file is to be removed upon
	patching.  The <I>user</I> and <I>group</I> fields are
	ignored.  The <I>mode</I> field is only used to
	determine if a check should be made for a previous
	version of the file.
	<BR>&nbsp;</DD>

</DL></DD></DL>

<!-- NEED 3in -->
<H3>List Variables</H3>

<P><I>EPM</I> maintains a list of variables and their values
which can be used to substitute values in the list file. These
variables are imported from the current environment and taken
from the command-line and list file as provided. Substitutions
occur when the variable name is referenced with the dollar sign
($):</P>

<PRE>
    %postinstall &lt;&lt;EOF
    echo What is your name:
    read $$name
    echo Your name is $$name
    EOF

    f 0555 root sys ${bindir}/foo foo
    f 0555 root sys $datadir/foo/foo.dat foo.dat
</PRE>

<P>Variable names can be surrounded by curly brackets (${name})
or alone ($name); without brackets the name is terminated by the
first slash (/), dash (-), or whitespace. The dollar sign can be
inserted using $$.</P>

<!-- NEED 5in -->
<H2><A NAME="SETUPTYPES">The setup.types File</A></H2>

<P>The EPM <B>setup</B> program normally presents the user with
a list of software products to install, which is called a
"custom" software installation.</P>

<P>If a file called <I>setup.types</I> is present in the package
directory, the user will instead be presented with a list of
installation types. Each type has an associated product list
which determines the products that are installed by default. If
a type has no products associated with it, then it is treated as
a custom installation and the user is presented with a list of
packages to choose from.</P>

<P>The <I>setup.types</I> file is an ASCII text file consisting
of type and product lines. Comments can be inserted by starting
a line with the pound sign (#). Each installation type is
defined by a line starting with the word <CODE>TYPE</CODE>.
Products are defined by a line starting with the word
<CODE>INSTALL</CODE>:</P>

<PRE>
    # Pre-select the user packages
    TYPE Typical End-User Configuration
    INSTALL foo
    INSTALL foo-help

    # Pre-select the developer packages
    TYPE Typical Developer Configuration
    INSTALL foo
    INSTALL foo-help
    INSTALL foo-devel
    INSTALL foo-examples

    # Allow the user to select packages
    TYPE Custom Configuration
</PRE>

<P>In the example above, three installation types are defined.
Since the last type includes no products, the user will be
presented with the full list of products to choose from.</P>

</BODY>
</HTML>