File: xstow.ini.5

package info (click to toggle)
xstow 0.5.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 852 kB
  • ctags: 1,024
  • sloc: cpp: 6,089; sh: 3,157; makefile: 128
file content (472 lines) | stat: -rw-r--r-- 17,008 bytes parent folder | download | duplicates (2)
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
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
.\" Automatically generated by Pod::Man version 1.15
.\" Sun Jul 27 00:16:33 2003
.\"
.\" Standard preamble:
.\" ======================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R

.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used
.\" to do unbreakable dashes and therefore won't be available.  \*(C` and
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
.\" index entries marked with X<> in POD.  Of course, you'll have to process
.\" the output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it
.\" makes way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.bd B 3
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ======================================================================
.\"
.IX Title "xstow.ini 5"
.TH xstow.ini 5 "XStow 0.5.1" "2003-07-11" "XStow Reference Guide"
.UC
.SH "NAME"
xstow.ini, config file for XStow
.SH "CONTENT"
.IX Header "CONTENT"
The xstow.ini file contains some static informations about your
system. It's possible setting most necessary values by setting the
required command line option, but in some cases this won't make sense
if you are using xstow quite often.
.SH "SYNTAX"
.IX Header "SYNTAX"
The syntax of the configuration file is simple. It's the same as it is
used by \s-1KDE\s0 and \s-1GNOME\s0.
.PP
The data is splitted into keys values and sections. The '#' sign marks
a comment. Here is an example:
.PP
.Vb 3
\&        [traserve-links]
\&        keep-targets = true
\&        link = /usr/tmp  # comment
.Ve
.Ip "\fB[traserve-links]\fR"
.IX Item "[traserve-links]"
is a section with the name \*(L"traserve-links\*(R"
.Ip "\fBkeep-targets = true\fR"
.IX Item "keep-targets = true"
is a key \- value pair, where 'keep-targets' is the key and 'true' is
the value.
.SH "PROCESSING"
.IX Header "PROCESSING"
XStow processes the config files one after another. Static
configuration options like the \fB[debug]\fR=>\fBmodule\fR option can be
overwritten by the next config file. List keys like
\&\fB[traverse-links]\fR=>\fBlink\fR will be appended to the list.
.PP
If you wan't more informations about the current stow setup call XStow
like this:
.PP
.Vb 1
\&        xstow -s -dl 1 dummy-package | less
.Ve
For getting information about which config files were processed you
will have to set some environment values (see \fIxstow\fR\|(1) for
details).
Eg.:
.PP
.Vb 1
\&        XSTOW_DEBUG_LEVEL=1 xstow -s -dl 1 dummy-package | less
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
.Sh "\s-1SECTION\s0 traserve-links"
.IX Subsection "SECTION traserve-links"
In this section a number of links are listed, which xstow will
identify as links that are not part of an xstow managed package.
Eg.: 
For conforming to the \s-1FHS\s0 it is common setting a link from /usr/share/man
to /usr/man. This will cause old applications installing theire
manpages in /usr/share/man, rather than in /usr/man.
.PP
But xstow is paranoid and believes that the link contains to something
else and it is not allowed writing data into the directory the link
points to.
.PP
The simple solution is telling xstow which links should be handled as
normal directories. These links can be listed in this section.
.Ip "\fBlink\fR = \s-1LINK\s0"
.IX Item "link = LINK"
The value of this key must contain an absolute path to the link that
should be handled as a normal directory. The link itself can be an
absolute, or relativ link.
It is allowed that there are more than one \fBlink\fR keys in this section.
.Ip "\fBkeep-targets\fR = \s-1BOOL\s0"
.IX Item "keep-targets = BOOL"
Allowed values are 'true' and '1' (incasesensitive). Anything else
will be interpreted as false.
If keep-targets is set to true the target of the links in this section
will automatically added to the \fBkeep-dirs\fR section. This avoids that
these targets will be removed and the links will become dead links.
.Ip "\fBadd-if-target\fR = \s-1PATTERN\s0"
.IX Item "add-if-target = PATTERN"
Automatic add all links which targets match the pattern to the link
list. XStow will use this as the last chance for solving
dependencies. Only if all other tests failed the application will
try appling this test. This means that it is no problem setting
\&\fB[links]\fR=>\fBabsolute-links\fR to true and using a pattern like /* here. 
If \fBkeep-targets\fR is set to true the applied links will added to the
\&\fBkeep-dirs\fR list too.
.Ip "\fBadd-if-target-regex\fR = \s-1REGEX\s0"
.IX Item "add-if-target-regex = REGEX"
Does the same as \fBadd-if-target\fR, but support regular
expressions. XStow will always try matching the regular expressions
before the normal shell patterns, cause a regex can be much more exact
than a shell pattern.
.Sh "\s-1SECTION\s0 keep-dirs"
.IX Subsection "SECTION keep-dirs"
In this section directories are listed that should not be remove. When
xstow removes a package and a directory becomes emty the directory
will be removed too.
.Ip "\fBdir\fR = \s-1DIR\s0"
.IX Item "dir = DIR"
The value of this key must contain an absolute path to the directory
that should be kept.
It is allowed that there are more than one \fBdir\fR keys in this
section. \fBThe value should not end with a '/'!!\fR
.Sh "\s-1SECTION\s0 matches"
.IX Subsection "SECTION matches"
XStow will try matching this pattern to all file names that were found
in packages. Only the file names. So you do not have to care about the
slashes.
.Ip "\fBignore\fR = \s-1PATTERN\s0"
.IX Item "ignore = PATTERN"
Ignore files matching this pattern.
It is allowed that there are more than one \fBignore\fR keys in this
section.
.Ip "\fBignore-regex\fR = \s-1PATTERN\s0"
.IX Item "ignore-regex = PATTERN"
Does the same as \fBignore\fR, but support regular
expressions. XStow will always try matching the regular expressions
before the normal shell patterns, cause a regex can be much more exact
than a shell pattern.
.Ip "\fBcopy\fR = \s-1PATTERN\s0"
.IX Item "copy = PATTERN"
Copy files or directories matching this pattern instead of linking it.
This makes sense in case of some global files that will be used by
more than one package and will be updated in the course of the
installation process. eg.: The directory index of the \s-1GNU\s0 \fIinfo\fR\|(1) files
is a file named 'dir'. Files that were installed this way won't be
removed in case of unstowing a package, since XStow can not handle
package dependencies and does not know if any other package requires
the file.
If a directory matches this expression the content of the directory
will be copied recoursively. This can be useful in case of some /etc
files, installed by the installation process.
It is allowed that there are more than one \fBcopy\fR keys in this
section.
.Ip "\fBcopy-regex\fR = \s-1PATTERN\s0"
.IX Item "copy-regex = PATTERN"
Does the same as \fBcopy\fR, but support regular
expressions. XStow will always try matching the regular expressions
before the normal shell patterns, cause a regex can be much more exact
than a shell pattern.
.Ip "\fBnignore\fR = \s-1NIGNORE_RULE\s0"
.IX Item "nignore = NIGNORE_RULE"
Ignore everything except file and directories matching this
expression. eg: \*(L"systree/bintree\*(R".
For using nignore support fnmatch and configration file
support has to be enabled. 
A rule (eg.: \*(L"systree/headertree\*(R" ) has a set of subrules (eg.: \*(L"systree\*(R" and \*(L"headertree\*(R" ).
These subrules are defined in a separate section which is named as the subrule.
Eg, the subrule for \*(L"systree\*(R":
.PP
.Vb 4
\&        [systree]
\&        dir       = /usr
\&        dir       = /usr/local
\&        follow    = false
.Ve
There is an example config file \*(L"nignore.ini\*(R" in the doc directory of this package.
.Sh "\s-1SECTION\s0 \s-1NIGNORE-SUB-RULE\s0"
.IX Subsection "SECTION NIGNORE-SUB-RULE"
Description of a nignore subrule. This section is called like the nignore subrule, eg: \*(L"systree\*(R".
.Ip "\fBdir\fR = \s-1DIR\s0"
.IX Item "dir = DIR"
Directories where a file of the package should be installed. You can use shell pattern's too
(eg.: \*(L"/man/man*\*(R"), but use this feature only if this subrule is the last one in an nignore rule. 
.Ip "follow = \s-1BOOL\s0"
.IX Item "follow = BOOL"
Follow subdirs.
.Sh "\s-1SECTION\s0 stow-dirs"
.IX Subsection "SECTION stow-dirs"
.Ip "\fBdir\fR = \s-1DIR\s0"
.IX Item "dir = DIR"
The value of this key must contain an absolute path to the directory
that can be handled as it would be part of the own stow directory.
This means xstow is allowed to make changes in packages that are
related to this directory.
It is allowed that there are more than one \fBdir\fR keys in this
section. \fBThe value should not end with a '/'!!\fR
.Ip "\fBauto-add-dirs\fR = \s-1PATTERN\s0"
.IX Item "auto-add-dirs = PATTERN"
Automatically add a directory if it matches this pattern. In Stow
directories, which were detected with this pattern, never will be
searched for configuration files.
It is allowed that there are more than one \fBauto-add-dirs\fR keys in
this section.
.Ip "\fBauto-add-dirs-regex\fR = \s-1REGEX\s0"
.IX Item "auto-add-dirs-regex = REGEX"
Does the same as \fBauto-add-dirs\fR, but support regular
expressions. XStow will always try matching the regular expressions
before the normal shell patterns, cause a regex can be much more exact
than a shell pattern.
.Sh "\s-1SECTION\s0 protect-dirs"
.IX Subsection "SECTION protect-dirs"
The goal of this section is limiting the access within a legal target
directory. Eg.: If your stow directory is '/stow' and you installing
packages this way: 
.PP
.Vb 1
\&        make install DESTDIR=/stow/package_name
.Ve
But the 'prefix' is set to '/usr/local'. In this case target directory 
will be '/', but the real target directory of package will be
\&'/usr/local'. The following keys withing this section allowing to
restrict the installation access within the valid target directory.
.Ip "\fBdir\fR = \s-1DIR\s0"
.IX Item "dir = DIR"
The value of this key must contain an absolute path to the directory
that has not be changed. XStow is not allowed installing a package
there and withing the subdirectories, and will report an error, 
if it would. It is allowed that there are more than one \fBdir\fR keys 
in this section. \fBThe value should not end with a '/'!!\fR
.Ip "\fBauto-add-dirs\fR = \s-1PATTERN\s0"
.IX Item "auto-add-dirs = PATTERN"
Automatically add a directory if it matches this pattern.
It is allowed that there are more than one \fBauto-add-dirs\fR keys in
this section.
.Ip "\fBauto-add-dirs-regex\fR = \s-1REGEX\s0"
.IX Item "auto-add-dirs-regex = REGEX"
Does the same as \fBauto-add-dirs\fR, but support regular
expressions. XStow will always try matching the regular expressions
before the normal shell patterns, cause a regex can be much more exact
than a shell pattern.
.Ip "\fBtarget\fR = \s-1DIR\s0"
.IX Item "target = DIR"
The value of this key must contain an absolute path to the directory
that is allowed to be changed. If this value is set, XStow will report
an error if it would touch any other, or upper directory within the tree.
It is allowed that there are more than one \fBtarget\fR keys in this
section. \fBThe value should not end with a '/'!!\fR
.Ip "\fBtarget-add-traversable-links\fR = \s-1BOOL\s0"
.IX Item "target-add-traversable-links = BOOL"
Automatically add the targets of traversable links to the targets list.
This can be useful if you do not add manually all possible targets of 
traversable links to the target list. By default this value is set to
false.
.Sh "\s-1SECTION\s0 debug"
.IX Subsection "SECTION debug"
These values will be ignored if one of these values is set by command
line option.
.Ip "\fBmodule\fR = \s-1MODULE\s0"
.IX Item "module = MODULE"
Set the default debug module.
.Ip "\fBlevel\fR = \s-1INTEGER\s0"
.IX Item "level = INTEGER"
Set the debug level.
.Sh "\s-1SECTION\s0 config-files"
.IX Subsection "SECTION config-files"
.Ip "\fBin-home\fR \s-1BOOL\s0"
.IX Item "in-home BOOL"
Search in home directory for a config file named \*(L"xstow.ini\*(R" or
\&\*(L".xstow.ini\*(R". Only in the home directory will be searched for hidden
files. 
.Ip "\fBin-stow-dir\fR \s-1BOOL\s0"
.IX Item "in-stow-dir BOOL"
Search in current stow directory for a config file
.Ip "\fBin-other-stow-dirs\fR \s-1BOOL\s0"
.IX Item "in-other-stow-dirs BOOL"
Search in other public stow directories for config files.
.Ip "\fBfile\fR \s-1FILE\s0"
.IX Item "file FILE"
Read this config file too.
.PP
It is allowed that there are more than one \fBfile\fR keys in this
section.
.Sh "\s-1SECTION\s0 links"
.IX Subsection "SECTION links"
.Ip "\fBabsolute-paths\fR = \s-1BOOL\s0"
.IX Item "absolute-paths = BOOL"
Create links with absolute path names.
.SH "EXAMPLE xstow.ini"
.IX Header "EXAMPLE xstow.ini"
.Sh "\s-1EXAMPLE\s0 1"
.IX Subsection "EXAMPLE 1"
Here is an example xstow.ini which is common for a system where xstow
is managing the /usr/local tree.
.PP
.Vb 7
\&        [traverse-links]
\&        keep-targets = true 
\&        link = /usr/local/tmp
\&        link = /usr/local/var
\&        link = /usr/local/man
\&        link = /usr/local/doc
\&        link = /usr/local/info
.Ve
.Vb 5
\&        [keep-dirs]
\&        dir = /usr/local/bin
\&        dir = /usr/local/sbin
\&        dir = /usr/local/lib
\&        dir = /usr/local/include
.Ve
.Vb 5
\&        [matches]
\&        ignore = *~ 
\&        ignore = core
\&        ignore = core.*
\&        ignore = CVS
.Ve
.Vb 3
\&        [stow-dirs]
\&        dir = /usr/local/stow
\&        dir = /usr/local/stow2
.Ve
.Sh "\s-1EXAMPLE\s0 2"
.IX Subsection "EXAMPLE 2"
This is an example xstow.ini for a system where xstow is managing the
\&'/usr/local' tree, but the stow directory is '/stow'.
.PP
.Vb 4
\&        [matches]
\&        ignore = *~
\&        ignore = CVS
\&        ignore = core*
.Ve
.Vb 2
\&        [stow-dirs]
\&        dir = /stow
.Ve
.Vb 2
\&        [protect-dirs]
\&        target = /usr/local
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIxstow\fR\|(1)
.PP
In the document directory of this package is a more advanced sample
xstow.ini file.