File: xstow.ini.html

package info (click to toggle)
xstow 1.0.0-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,160 kB
  • ctags: 1,216
  • sloc: cpp: 7,218; sh: 1,194; makefile: 196; awk: 26
file content (556 lines) | stat: -rw-r--r-- 19,577 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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NAME</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:feedback@suse.de" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#content">CONTENT</a></li>
	<li><a href="#syntax">SYNTAX</a></li>
	<li><a href="#processing">PROCESSING</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<ul>

		<li><a href="#section_traserve_links">SECTION traserve-links</a></li>
		<li><a href="#section_keep_dirs">SECTION keep-dirs</a></li>
		<li><a href="#section_matches">SECTION matches</a></li>
		<li><a href="#section_nignore_sub_rule">SECTION NIGNORE-SUB-RULE</a></li>
		<li><a href="#section_stow_dirs">SECTION stow-dirs</a></li>
		<li><a href="#section_protect_dirs">SECTION protect-dirs</a></li>
		<li><a href="#section_debug">SECTION debug</a></li>
		<li><a href="#section_config_files">SECTION config-files</a></li>
		<li><a href="#section_links">SECTION links</a></li>
		<li><a href="#section_exec">SECTION exec</a></li>
	</ul>

	<li><a href="#example_xstow_ini">EXAMPLE xstow.ini</a></li>
	<ul>

		<li><a href="#example_1">EXAMPLE 1</a></li>
		<li><a href="#example_2">EXAMPLE 2</a></li>
	</ul>

	<li><a href="#see_also">SEE ALSO</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>xstow.ini, config file for XStow</p>
<p>
</p>
<hr />
<h1><a name="content">CONTENT</a></h1>
<p>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.</p>
<p>
</p>
<hr />
<h1><a name="syntax">SYNTAX</a></h1>
<p>The syntax of the configuration file is simple. It's the same as it is
used by KDE and GNOME.</p>
<p>The data is splitted into keys values and sections. The '#' sign marks
a comment. Here is an example:</p>
<pre>
        [traserve-links]
        keep-targets = true
        link = /usr/tmp  # comment</pre>
<dl>
<dt><strong><a name="traserve_links" class="item"><strong>[traserve-links]</strong></a></strong>

<dd>
<p>is a section with the name &quot;traserve-links&quot;</p>
</dd>
</li>
<dt><strong><a name="keep_targets_true" class="item"><strong>keep-targets = true</strong></a></strong>

<dd>
<p>is a key - value pair, where 'keep-targets' is the key and 'true' is
the value.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="processing">PROCESSING</a></h1>
<p>XStow processes the config files one after another. Static
configuration options like the <strong>[debug]</strong>=&gt;<strong>module</strong> option can be
overwritten by the next config file. List keys like
<strong>[traverse-links]</strong>=&gt;<strong>link</strong> will be appended to the list.</p>
<p>If you wan't more informations about the current stow setup call XStow
like this:</p>
<pre>
        xstow -s -dl 1 dummy-package | less</pre>
<p>For getting information about which config files were processed you
will have to set some environment values (see <code>xstow(1)</code> for
details).
Eg.:</p>
<pre>
        XSTOW_DEBUG_LEVEL=1 xstow -s -dl 1 dummy-package | less</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>
</p>
<h2><a name="section_traserve_links">SECTION traserve-links</a></h2>
<p>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 FHS 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.</p>
<p>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.</p>
<p>The simple solution is telling xstow which links should be handled as
normal directories. These links can be listed in this section.</p>
<dl>
<dt><strong><a name="link_link" class="item"><strong>link</strong> = LINK</a></strong>

<dd>
<p>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 <strong>link</strong> keys in this section.</p>
</dd>
</li>
<dt><strong><a name="keep_targets_bool" class="item"><strong>keep-targets</strong> = BOOL</a></strong>

<dd>
<p>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 <strong>keep-dirs</strong> section. This avoids that
these targets will be removed and the links will become dead links.</p>
</dd>
</li>
<dt><strong><a name="add_if_target_pattern" class="item"><strong>add-if-target</strong> = PATTERN</a></strong>

<dd>
<p>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
<strong>[links]</strong>=&gt;<strong>absolute-links</strong> to true and using a pattern like /* here. 
If <strong>keep-targets</strong> is set to true the applied links will added to the
<strong>keep-dirs</strong> list too.</p>
</dd>
</li>
<dt><strong><a name="add_if_target_regex_regex" class="item"><strong>add-if-target-regex</strong> = REGEX</a></strong>

<dd>
<p>Does the same as <strong>add-if-target</strong>, 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.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_keep_dirs">SECTION keep-dirs</a></h2>
<p>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.</p>
<dl>
<dt><strong><a name="dir_dir" class="item"><strong>dir</strong> = DIR</a></strong>

<dd>
<p>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 <strong>dir</strong> keys in this
section. <strong>The value should not end with a '/'!!</strong></p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_matches">SECTION matches</a></h2>
<p>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.</p>
<dl>
<dt><strong><a name="ignore_pattern" class="item"><strong>ignore</strong> = PATTERN</a></strong>

<dd>
<p>Ignore files matching this pattern.
It is allowed that there are more than one <strong>ignore</strong> keys in this
section.</p>
</dd>
</li>
<dt><strong><a name="ignore_regex_regex" class="item"><strong>ignore-regex</strong> = REGEX</a></strong>

<dd>
<p>Does the same as <strong>ignore</strong>, 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.</p>
</dd>
</li>
<dt><strong><a name="copy_pattern" class="item"><strong>copy</strong> = PATTERN</a></strong>

<dd>
<p>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. 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 <strong>copy</strong> keys in this
section.</p>
</dd>
</li>
<dt><strong><a name="copy_regex_regex" class="item"><strong>copy-regex</strong> = REGEX</a></strong>

<dd>
<p>Does the same as <strong>copy</strong>, 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.</p>
</dd>
</li>
<dt><strong><a name="nignore_nignore_rule" class="item"><strong>nignore</strong> = NIGNORE_RULE</a></strong>

<dd>
<p>Ignore everything except file and directories matching this
expression. eg: &quot;systree/bintree&quot;.
For using nignore support fnmatch and configration file
support has to be enabled. 
A rule (eg.: &quot;systree/headertree&quot; ) has a set of subrules (eg.: &quot;systree&quot; and &quot;headertree&quot; ).
These subrules are defined in a separate section which is named as the subrule.
Eg, the subrule for &quot;systree&quot;:</p>
</dd>
<dd>
<pre>
        [systree]
        dir       = /usr
        dir       = /usr/local
        follow    = false</pre>
</dd>
<dd>
<p>There is an example config file &quot;nignore.ini&quot; in the doc directory of this package.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_nignore_sub_rule">SECTION NIGNORE-SUB-RULE</a></h2>
<p>Description of a nignore subrule. This section is called like the nignore subrule, eg: &quot;systree&quot;.</p>
<dl>
<dt><strong><a name="dir_dir2" class="item"><strong>dir</strong> = DIR</a></strong>

<dd>
<p>Directories where a file of the package should be installed. You can use shell pattern's too
(eg.: &quot;/man/man*&quot;), but use this feature only if this subrule is the last one in an nignore rule.</p>
</dd>
</li>
<dt><strong><a name="follow_bool" class="item"><strong>follow</strong> = BOOL</a></strong>

<dd>
<p>Follow subdirs.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_stow_dirs">SECTION stow-dirs</a></h2>
<dl>
<dt><strong><a name="dir_dir3" class="item"><strong>dir</strong> = DIR</a></strong>

<dd>
<p>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 <strong>dir</strong> keys in this
section. <strong>The value should not end with a '/'!!</strong></p>
</dd>
</li>
<dt><strong><a name="auto_add_dirs_pattern" class="item"><strong>auto-add-dirs</strong> = PATTERN</a></strong>

<dd>
<p>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 <strong>auto-add-dirs</strong> keys in
this section.</p>
</dd>
</li>
<dt><strong><a name="auto_add_dirs_regex_regex" class="item"><strong>auto-add-dirs-regex</strong> = REGEX</a></strong>

<dd>
<p>Does the same as <strong>auto-add-dirs</strong>, 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.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_protect_dirs">SECTION protect-dirs</a></h2>
<p>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:</p>
<pre>
        make install DESTDIR=/stow/package_name</pre>
<p>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.</p>
<dl>
<dt><strong><a name="dir_dir4" class="item"><strong>dir</strong> = DIR</a></strong>

<dd>
<p>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 <strong>dir</strong> keys 
in this section. <strong>The value should not end with a '/'!!</strong></p>
</dd>
</li>
<dt><strong><a name="auto_add_dirs_pattern2" class="item"><strong>auto-add-dirs</strong> = PATTERN</a></strong>

<dd>
<p>Automatically add a directory if it matches this pattern.
It is allowed that there are more than one <strong>auto-add-dirs</strong> keys in
this section.</p>
</dd>
</li>
<dt><strong><a name="auto_add_dirs_regex_regex2" class="item"><strong>auto-add-dirs-regex</strong> = REGEX</a></strong>

<dd>
<p>Does the same as <strong>auto-add-dirs</strong>, 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.</p>
</dd>
</li>
<dt><strong><a name="target_dir" class="item"><strong>target</strong> = DIR</a></strong>

<dd>
<p>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 <strong>target</strong> keys in this
section. <strong>The value should not end with a '/'!!</strong></p>
</dd>
</li>
<dt><strong><a name="target_add_traversable_links_bool" class="item"><strong>target-add-traversable-links</strong> = BOOL</a></strong>

<dd>
<p>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.</p>
</dd>
</li>
</dl>
<p>If your stow directory is '/stow' and all packages should be installed
in '/usr/local/' such a config file will make sense:</p>
<pre>
        [traverse-links]
        link = /usr/local/etc</pre>
<pre>
        [protect-dirs]
        target = /usr/local
        target-add-traversable-links = true</pre>
<p>XStow will report an error if it would install a package outside of
'/usr/local'</p>
<p>
</p>
<h2><a name="section_debug">SECTION debug</a></h2>
<p>These values will be ignored if one of these values is set by command
line option.</p>
<dl>
<dt><strong><a name="module_module" class="item"><strong>module</strong> = MODULE</a></strong>

<dd>
<p>Set the default debug module.</p>
</dd>
</li>
<dt><strong><a name="level_integer" class="item"><strong>level</strong> = INTEGER</a></strong>

<dd>
<p>Set the debug level.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_config_files">SECTION config-files</a></h2>
<dl>
<dt><strong><a name="in_home_bool" class="item"><strong>in-home</strong> = BOOL</a></strong>

<dd>
<p>Search in home directory for a config file named &quot;xstow.ini&quot; or
&quot;.xstow.ini&quot;. Only in the home directory will be searched for hidden
files.</p>
</dd>
</li>
<dt><strong><a name="in_stow_dir_bool" class="item"><strong>in-stow-dir</strong> = BOOL</a></strong>

<dd>
<p>Search in current stow directory for a config file</p>
</dd>
</li>
<dt><strong><a name="in_other_stow_dirs_bool" class="item"><strong>in-other-stow-dirs</strong> = BOOL</a></strong>

<dd>
<p>Search in other public stow directories for config files.</p>
</dd>
</li>
<dt><strong><a name="file_file" class="item"><strong>file</strong> = FILE</a></strong>

<dd>
<p>Read this config file too.</p>
</dd>
<dd>
<p>It is allowed that there are more than one <strong>file</strong> keys in this
section.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_links">SECTION links</a></h2>
<dl>
<dt><strong><a name="absolute_paths_bool" class="item"><strong>absolute-paths</strong> = BOOL</a></strong>

<dd>
<p>Create links with absolute path names.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="section_exec">SECTION exec</a></h2>
<p>If a package comes with some GNU info files, <strong>install-info</strong> creates
an index directory named 'dir' in STOWDIR/PACKAGE/share/info. If this
is the first package with an info index file this won't be a
problem.</p>
<p>If a second package creates another 'dir' file in
the packages info directory, this file will not contain the
informations from the first package too and xstow will report a
problem unless you use the <strong>ignore</strong> or <strong>copy</strong> option.</p>
<p>But using the <strong>copy</strong> option is not a solution since the content of
each of the files is incomplete.
You can use the <strong>ignore</strong> option and run <strong>mkinfodir</strong> in the
/usr/local/info directory after installing the package with
xstow. (Such a script is available on various distributions.)</p>
<p>The other solution is running a program that merges the old and the
new 'dir' file.
This section provides a hook, that allows executing such tools if
a file or directory matches a condition.</p>
<p>XStow shippes a programm called <strong>merge-info</strong>(1) that can be used this
way.</p>
<p>There can be more than one <strong>exec</strong> Section within an ini file!</p>
<dl>
<dt><strong><a name="match_pattern" class="item"><strong>match</strong> = PATTERN</a></strong>

<dt><strong><a name="exec_command" class="item"><strong>exec</strong> = COMMAND</a></strong>

<dd>
<p>Executes the command if a file matches the <strong>match</strong> expression. %t is
replaces by the target file and %s is replaced by the source file.</p>
</dd>
</li>
<dt><strong><a name="exec_unstow_command" class="item"><strong>exec-unstow</strong> = COMMAND</a></strong>

<dd>
<p>Executes the command if a file matches the <strong>match</strong> expression and a
packages is unstowed. If <strong>exec-unstow</strong> is not set and a package will
be unstowed, nothing will be executed.
%t is replaces by the target file and %s is replaced by the source
file.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="example_xstow_ini">EXAMPLE xstow.ini</a></h1>
<p>
</p>
<h2><a name="example_1">EXAMPLE 1</a></h2>
<p>Here is an example xstow.ini which is common for a system where xstow
is managing the /usr/local tree.</p>
<pre>
        [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</pre>
<pre>
        [keep-dirs]
        dir = /usr/local/bin
        dir = /usr/local/sbin
        dir = /usr/local/lib
        dir = /usr/local/include</pre>
<pre>
        [matches]
        ignore = *~ 
        ignore = core
        ignore = core.*
        ignore = CVS</pre>
<pre>
        [exec]
        match = dir # GNU info index file
        exec = merge-info %t %s -o %t
        exec-unstow = merge-info -u %t %s -o %t</pre>
<pre>
        [stow-dirs]
        dir = /usr/local/stow
        dir = /usr/local/stow2</pre>
<p>
</p>
<h2><a name="example_2">EXAMPLE 2</a></h2>
<p>This is an example xstow.ini for a system where xstow is managing the
'/usr/local' tree, but the stow directory is '/stow'.</p>
<pre>
        [matches]
        ignore = *~
        ignore = CVS
        ignore = core*</pre>
<pre>
        [stow-dirs]
        dir = /stow</pre>
<pre>
        [protect-dirs]
        target = /usr/local</pre>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><code>xstow(1)</code> merge-info(1)
xstow.ini file.</p>

</body>

</html>