Convert the --enable-quarantine-support installation option in a
quarantine_support configuration option. When this option is enabled the
autoinit sub-command produces the module shell code with quarantine
mecahnism support. When disabled, code is generated without quarantine
support.
This way decision to have or not the quarantine mechanism code can also
be made in initrc configuration file. As a result
--enable-quarantine-support installation option new controls the default
behavior to generate or not the quarantine code, but this could now be
superseded in initrc configuration file.
Different setup cases are foreseen:
1. quarantine code has been included in module shell function, then
quarantine_support config is disabled
> config disablement is not effective as shell code is already set
2. quarantine code has not been included in module shell function,
then quarantine_support config is enabled
> config enablement is not effective as shell code is already set
3. during module initialization, quarantine_support config is enabled in
initrc
> shell code generated with quarantine code
4. during module initialization, quarantine_support config is disabled
in initrc
> shell code generated without quarantine code
5. during module initialization, quarantine_support config is enabled by
default or via env
> shell code generated with quarantine code
6. during module initialization, quarantine_support config is disabled by
default or via env
> shell code generated with quarantine code
When the installation option `--enable-modulespath` is set, the list of
modulepath to enable by default is now only defined in the `modulespath`
configuration file and not anymore in the `initrc` configuration file.
Rename the configuration template files following the new default naming
scheme for these files: modulerc becomes initrc and .modulespath becomes
modulespath.
Make --enable-modulespath the primary option name and
--enable-dotmodulespath the secondary option name as .modulespath is not
anymore the primary name of this configuration file.
Silently include version.inc in main, doc and init Makefiles to avoid
'Makefile:349: version.inc: No such file or directory' warning message
when version.inc needs to be rebuilt prior being loaded.
Print generated file names rather commands executed to generate these
files on makefile build targets. Output when making Modules is this way
simplified. When option `V=1` is passed to make verbose mode is enabled
and executed commands are shown.
Simplified make output does not apply to the install, uninstall, test,
clean, distclean targets and their relatives.
`-E` option is a *relatively* recent option of GNU sed (v4.2), yet
mandatory for OS portability (as detailled in b68e44e).
Adapt configure step to detect if sed option `-E` is supported and
fallback to `-r` otherwise.
Fixes#317
Introduce the ability to install the Modules initialization
configuration files in the ``etcdir`` rather than in the ``initdir``. A
new configure option is introduced for this task:
``--with-initconf-in``. Accepted values for this option are: ``etcdir``
or ``initdir`` (default).
Add the ability to control whether or not code to support quarantine
mechanism should be added to the module function and initialization
scripts. Enabled by default
Fixes#167
Add the ability to control whether or not code to support silent shell
debug should be added to the module function and sh-kind initialization
scripts. Enabled by default
Fixes#166
Add the ability to append rather prepend the man or bin directory when
adding these directory to the relative environment variable is enabled
(with --enable-set-manpath or --enable-set-binpath).
Takes the form of 2 new configure options: --enable-append-manpath and
--enable-append-binpath. No effect if set but relative
--enable-set-{bin,man}path option is unset or disabled.
Check paths in configure script to detect the location of the 'ps' and
'basename' commands. Then use this found location in profile.sh scripts.
First part of #147 is solved here.
Introduce the '@VERSION@' pattern, combination of Modules release and
build information, for building files to install.
Still rely on @MODULES_RELEASE@ and @MODULES_BUILD@ when these
information are needed prior to ./configure call (dist-related stuff) or
are expected to change after ./configure call (modulecmd.tcl in
dev environment).
If --enable-versioning configure option is set, default modulepath option
is changed from '$prefix/modulefiles' to
'$baseprefix/$MODULE_VERSION/modulefiles'.
Adapt installation process to handle modulepath containing special '$'
character. Adapt also install testsuite to correctly check these
modulepaths containing variable references.
When --enable-versioning is set at configure time, deploy the setup of
the MODULE_VERSION and MODULE_VERSION_STACK environment variables in
modulecmd.tcl and in a version-specific modulefile.
This version-specific modulefile is deployed in a @baseprefix@/versions
modulepath directory, which is also created specifically for versioning
installation mode.
MODULE_VERSION and MODULE_VERSION_STACK environment variables setup in
modulecmd.tcl is commented if versioning installation mode is not
enabled rather deleted to guaranty consistency across code coverage
tests (same code line numbering whatever the installation options set).
version-specific modulefile is a bit different than the one used before
<4.0 as now module version is initialized when loading this module by
calling the autoinit action on the modulecmd.tcl script.
These version-specific modulefiles enable to switch from one module
version to another but there is an incompatibility of initialization
between Modules 3.2 and Modules >=4. Switching from Modules 3.2 to
Modules >4 will be possible, but not going back from >4 to version 3.2.
Add 'install-testsiteconfig' make target to setup a dummy siteconfig.tcl
file in install_etcdir. Link that to some of the travis checks to run
testsuite with an existing siteconfig.tcl
Add the possibility to setup a site-specific configuration Tcl script
which will be sourced at the start of modulecmd.tcl. This site-specific
Tcl script enables to supersede global variable and procedure definition
made in modulecmd.tcl. This way local adaptations can be made without
editing the modulecmd.tcl script.
'--etcdir' configure option is added to specify the location of the
site-specific configuration script.
Avoid dependency to the MODULESHOME environment variable when looking
for the etc/rc global RC file. To define an environment dynamic global RC
file the MODULERCFILE variable may be used. By not relying on an
environment variable we ensure this etc/rc will always be read, if it
exists, whatever the current environment state.
Location of this etc/rc is based on @prefix@ defined at configure time
which is also the basis for the MODULESHOME value, so this change should
not have an impact if MODULESHOME variable were not manipulated
afterward.
This change is useful when using module through commands resetting the
environment like 'sudo' (see RH#1443124, RH#1139165 [1])
module.1 man page is already mentionning @prefix@/etc/rc, no change
needed there.
Adapt testsuite to provide a way to test the use of a @prefix@/etc/rc
file for the whole 'make test' duration, with 'make install-testetcrc'.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1139165
Add --with-quarantine-vars configure option to define quarantine
mechanism configuration at build time.
Value passed to the configure option will be used by Makefile to
initialize in the various initialization scripts the
MODULES_RUN_QUARANTINE variable and eventual MODULES_RUNENV_<VAR>.