`-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>.
Use sed instead of perl in configure and Makefile scripts as perl is not
required anymore to build documentation. sed is a lighter requirement to
build and install software.
Introduce a version.inc file sourced by Makefiles, that holds release
number and build information. Makefiles use these information to set
correct version number in manpages and modulecmd.tcl script.
version.inc is present in dist tarball. This file is generated from
version.inc.in file by main Makefile when working in git repository.
Release information are retrieved from the tags of the git repository.
Release number corresponds to last git tag set. Build number is the
result of the 'git describe' command: this information helps to know
from what git branch and commit the current build is made of.
* remove incorrect references to apt-get
* use space instead of tabs
* normalize description messages reusing short sentences already made
for zsh completion
* fix function to filter module command output and only return
modulefile list not mixed with files
* simplify install process by removing need for a '.in' file (and fix
bash_completion install on the way)
Introduce MODULE_USE_COMPAT_VERSION environment variable to control the
activation of the compatibility version rather main version in case of
--enable-compat-version installation.
The initialization script of the shells supporting compatibility version
are adapted to define the 'module' command based on the modulecmd-compat
binary if MODULE_USE_COMPAT_VERSION is set to 1. Elsewhere module is
based on modulecmd.tcl.
'switchml' function of alias is reintroduced to switch between main and
compatibility version based on the state of the
MODULE_USE_COMPAT_VERSION environment variable.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Introduce '--enable-compat-version' configure argument to configure and
build compatibility (C) version in addition to main version.
This compatibility version is located in the 'compat' directory, which
is automatically populated with 'c-master' git branch if we work in the
git repository.
'configure' script is adapted to run the compatibility version relative
configure script. Unknown command-line arguments are passed down to this
script, which raise error if these arguments are not known there either.
Some compatibility version configure script argument are also
incompatible in this dual installation mode, so an error is raised
(--enable-versioning for instance).
Build process will generate and install modulecmd-compat, module-compat.1
and modulefile-compat.4 from this compatibility version. 'compat' suffix
enables clear distinction with main version files.
Acknowledgment: this development has been made and funded within the
framework of the PRACE Fifth Implementation Phase (PRACE-5IP) project
(http://www.prace-ri.eu/). PRACE-5IP receives funding from the EU's
Horizon 2020 research and innovation programme (2014-2020) under grant
agreement no. 730913.
Remove the --enable-set-switchml, --enable-use-cver-dotmodulespath,
--with-cver-initdir, --with-cver-bindir and --with-cver-mandir configure
option that previously enabled to link Modules-Tcl installation to an
external Modules-C installation.
This change is an initial step toward a bundled installation of Tcl/C
versions, so the external linking support will transform into a dual
flavor installation.
Generate a shared 'Makefile.inc' file rather all 'Makefile's at
configure time. Avoid init/Makefile being rebuilt by initscript '%.in'
rules.
Correct 'all' rule typo in doc/Makefile.
Enforce '.modulespath' symlink creation when usecverdotmodulespath is
enabled.
Add a 'configure' shell script to generate Makefiles, rather than
choosing installtion directories or enabled features a the 'make' step.
By doing so, installation process is clearer and closer to build
conventions.
Use a custom 'configure' shell script rather than using autoconf and
automake tool suites in order to keep good readability of Makefiles.
Moreover our build use case is relatively small since nothing is
complied so there is no real benefit of using autoconf/automake.
Adapt Makefiles to this 'configure' change and add 'distclean' target.
Add the 'usecverdotmodulespath' make argument to generate
init/.modulespath config file as a symlink on C version installed
.modulespath configuration (by doing so both C and Tcl versions
installed on the same environment can share the same MODULEPATH
initialization setup).
'cverinitdir' must be known for 'usecverdotmodulespath' to be taken in
account.
Introduce 'switchml' tool, a shell function (or alias for csh or tcsh
shells) that swap currently enabled Modules version (C or Tcl) by the
other version (C or Tcl).
In case a swapped version was defining specific PATH or MANPATH entries,
these specific entries are removed when switching to the other version
to avoid still relying on the binaries and man pages of the swapped-out
version.
Add makefile rules to generate the modulerc and .modulespath
configuration files. modulerc is generated in any case. By default it
hosts the MODULEPATH and LOADEDMODULES definition passed to the Makefile
with the 'modulepath' and 'loadedmodules' argument.
The 'setdotmodulespath' Makefile argument is also introduced. When set
to 'y', the .modulespath is generated and hosts the MODULEPATH
definition. In this case, modulerc config file only gets the
LOADEDMODULES definition or is set empty if no value is passed to the
'loadedmodules' argument.
Add the possibility to set PATH and MANPATH in shell init scripts
(sh-like, csh-like and fish scripts) if specific option are enabled in
makefile (enabled by default). With this, bin directory and man
directory of the modules-tcl installation are prepended to the MANPATH
and PATH environment variables.
Prepending is required for PATH as manpath utility in its default Linux
setup will automatically set MANPATH from PATH change, so if we want
MANPATH to be prepended, PATH has to be prepended.
Introduce an 'install' target in makefiles to provide an installation
process for modules-tcl.
Defines installation paths with Makefile variables in order to avoid
having a ./configure step. Install paths are set during the 'make' step
by passing 'prefix', 'libexecdir', 'mandir', etc arguments to the make
command. If no path definitions are passed to the 'make' command,
installation will be made in '/usr/local/modules-tcl' by default.
Installation paths provided (or set from the default value found in
Makefile) are saved at the 'make' step in a .makeinstallpath file. Then
at the 'make install' step, this .makeinstallpath file is read and make
knows where to install modules-tcl.
These paths definitions are also used to translate *.in init script to
their installed version.
modulecmd.tcl script is by default set to be installed in the libexec
directory to follow FHS specification (as this script is an executable
but not directly accessed by users).