-
Notifications
You must be signed in to change notification settings - Fork 41
LuaDist: Configuration
LuaDist is configured using a Lua configuration file which is available in share/lua/lmod/dist/config.lua. This file is automatically generated when LuaDist is built and does not require changes in most cases.
If needed configuration values can be changed using the luadist commandline arguments, this is described in the [Use](LuaDist: Use) document. However if you would like to change how LuaDist behaves to better fit your need you can edit the following options.
Following variables in the configuration file affect the behavior of LuaDist.
- binary - true by default. Allows the use of binary dists. This should be disabled in source only distribution. Enabled in binary distribution.
- source - true by default. Allows the use of souce dists. This will allow LuaDist to build modules from source, requires a C compiler and CMake to be installed. Source and binary dists can be enabled at the same time, binary packages take precedence.
- test - false by default. Run tests before installing a dist. Currently not implemented.
- debug - false by default. Enabling debug mode will increase verbosity of LuaDist for easier debugging. When building source dists with debugging enabled, LuaDist will allow you to review each dist configuration before building using _ccmake _ or cmake-gui.
- proxy - false by default. If you need to use proxy type its address here as string.
- timeout - 10 by default. Timeout for HTTP fetch function, in seconds.
LuaDist can use local and remote directories as source of dists. Searching is sequential so repositories mentioned first have higher priority than later entries.
- repo - List of URLs containing dists. Eg. "file://home/joe/dists", "http://myserver.tld/repo", "file://C:/Dists" etc.
The following rules apply:
- First repositories have higher priority.
- Remote http and https repositories need dist.manifest file to work.
- Local repositories can contain dists in unpacked or packed form.
- An unpacked dist itself is considered a repository.
Packages installed by the host system can be entered into the "provides" section of the configuration. This informs LuaDist which modules to ignore when resolving dependencies. For example you can have lua installed in your system, adding "lua-5.1.4" into the provides table will ensure that the system package will be used. This feature is usefull when dealing with complex modules such ad Qt or working around missing/broken modules in LuaDist.
Any LuaDist configuration option can be set up from the command-line interface. Lists and even CMake variables can be defined as follows:
> bin/luadist _test install luadist -source=true -binary=false -provides="lua-5.1.4,luasocket-3, luafilesystem-6" --repo="file:///test/repo" -DCMAKE_BUILD_TYPE="Debug"