man xstow.ini (Formats) - xstow.ini, config file for XStow

NAME

xstow.ini, config file for XStow

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.

SYNTAX

The syntax of the configuration file is simple. It's the same as it is used by KDE and GNOME.

The data is splitted into keys values and sections. The '#' sign marks a comment. Here is an example:

        [traserve-links]
        keep-targets = true
        link = /usr/tmp  # comment
is a section with the name traserve-links is a key - value pair, where 'keep-targets' is the key and 'true' is the value.

PROCESSING

XStow processes the config files one after another. Static configuration options like the [debug]=>module option can be overwritten by the next config file. List keys like [traverse-links]=>link will be appended to the list.

If you wan't more informations about the current stow setup call XStow like this:

        xstow -s -dl 1 dummy-package | less
For getting information about which config files were processed you will have to set some environment values (see xstow(1) for details). Eg.:

        XSTOW_DEBUG_LEVEL=1 xstow -s -dl 1 dummy-package | less

DESCRIPTION

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 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.

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.

The simple solution is telling xstow which links should be handled as normal directories. These links can be listed in this section. 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 link keys in this section. 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 keep-dirs section. This avoids that these targets will be removed and the links will become dead links. 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 [links]=>absolute-links to true and using a pattern like /* here. If keep-targets is set to true the applied links will added to the keep-dirs list too. Does the same as add-if-target, 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.

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. 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 dir keys in this section. The value should not end with a '/'!!

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. Ignore files matching this pattern. It is allowed that there are more than one ignore keys in this section. Does the same as ignore, 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. 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 GNU info(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 copy keys in this section. Does the same as copy, 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. Ignore everything except file and directories matching this expression. eg: systree/bintree. For using nignore support fnmatch and configration file support has to be enabled. A rule (eg.: systree/headertree ) has a set of subrules (eg.: systree and headertree ). These subrules are defined in a separate section which is named as the subrule. Eg, the subrule for systree:

        [systree]
        dir       = /usr
        dir       = /usr/local
        follow    = false
There is an example config file nignore.ini in the doc directory of this package.

SECTION NIGNORE-SUB-RULE

Description of a nignore subrule. This section is called like the nignore subrule, eg: systree. Directories where a file of the package should be installed. You can use shell pattern's too (eg.: /man/man*), but use this feature only if this subrule is the last one in an nignore rule. Follow subdirs.

SECTION stow-dirs

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 dir keys in this section. The value should not end with a '/'!! 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 auto-add-dirs keys in this section. Does the same as auto-add-dirs, 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.

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:

        make install DESTDIR=/stow/package_name
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. 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 dir keys in this section. The value should not end with a '/'!! Automatically add a directory if it matches this pattern. It is allowed that there are more than one auto-add-dirs keys in this section. Does the same as auto-add-dirs, 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. 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 target keys in this section. The value should not end with a '/'!! 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.

SECTION debug

These values will be ignored if one of these values is set by command line option. Set the default debug module. Set the debug level.

SECTION config-files

Search in home directory for a config file named xstow.ini or .xstow.ini. Only in the home directory will be searched for hidden files. Search in current stow directory for a config file Search in other public stow directories for config files. Read this config file too.

It is allowed that there are more than one file keys in this section.

SECTION links

Create links with absolute path names.

EXAMPLE xstow.ini

EXAMPLE 1

Here is an example xstow.ini which is common for a system where xstow is managing the /usr/local tree.

        [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
        [keep-dirs]
        dir = /usr/local/bin
        dir = /usr/local/sbin
        dir = /usr/local/lib
        dir = /usr/local/include
        [matches]
        ignore = *~ 
        ignore = core
        ignore = core.*
        ignore = CVS
        [stow-dirs]
        dir = /usr/local/stow
        dir = /usr/local/stow2

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'.

        [matches]
        ignore = *~
        ignore = CVS
        ignore = core*
        [stow-dirs]
        dir = /stow
        [protect-dirs]
        target = /usr/local

SEE ALSO

xstow(1)

In the document directory of this package is a more advanced sample xstow.ini file.