Commit Graph

178 Commits

Author SHA1 Message Date
Xavier Delaruelle
0b7f7d8e59 doc: add doc ref and links in README 2021-09-02 21:08:15 +02:00
Xavier Delaruelle
8095f11b89 Set silent_shell_debug code if option enabled on autoinit
Generate the silent_shell_debug code in module shell function during the
autoinit processing if the silent_shell_debug configuration option is
enabled.

Choice made at installation time may now be updated later on with the
silent_shell_debug configuration option. If enabled prior calling
autoinit (or enabled within initrc configuration file), the silent shell
debug code will be included in module shell function.
2021-08-31 20:48:42 +02:00
Xavier Delaruelle
4baf5dc4db Add quarantine_support configuration option
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
2021-08-26 20:13:51 +02:00
Xavier Delaruelle
32cdb149e4 install: add Makefile rules to build Gtags indexes 2021-08-23 21:59:48 +02:00
Xavier Delaruelle
7a4002ab8f install: add Makefile rule to build Ctags index 2021-08-07 13:34:53 +02:00
Xavier Delaruelle
92bd6684bb ts: check coverage of split tcl files
Update makefile rules to check coverage of split tcl source files rather
built modulecmd.tcl script.
2021-08-01 09:30:16 +02:00
Xavier Delaruelle
5d0c5eb469 install: add rules to build modulecmd.tcl from split files
modulecmd.tcl has been split in the repository in several tcl files
located in the tcl/ directory. This change has been done to make code
editing easier.

modulecmd.tcl is still shipped as a single executable script to ensure
best performances. This single script is made by joining all the tcl
files from tcl/ directory.

An alternative approach has been tested where modulecmd.tcl auto loads
the procedure located in external tcl files. But a performance overhead
was observed. So it has been decided to split code to edit sources but
still build and ship a standalone modulecmd.tcl script.
2021-07-30 10:12:20 +02:00
Xavier Delaruelle
09e9251e18 install: remove compat version-related rules 2021-07-24 14:06:09 +02:00
Xavier Delaruelle
0689bb5bb9 ts: use default conf names in example for tests 2021-07-24 14:06:06 +02:00
Xavier Delaruelle
c2ffd669d6 Look at conf files in etcdir or initdir not both
Only look at configuration files found in the location designated by the
'--etcdir' or '--initdir' option (depending on the value of
'--with-initconf-in' option). Configuration files were previously
searched in both locations.
2021-07-18 21:45:22 +02:00
Xavier Delaruelle
aaf29548bd script: remove createmodule.sh and createmodule.py
createmodule.sh and createmodule.py scripts are superseded by the
`sh-to-mod` sub-command that supports conversion from more shell
languages (ksh, zsh, fish, csh) and handles more environment changes
(alias, shell function).
2021-07-16 15:55:55 +02:00
Xavier Delaruelle
f4b69a2e9d install: add --with-variant-shortcut configure option 2021-06-28 20:44:23 +02:00
Xavier Delaruelle
db74c4cbdf install: allow building from submodule repository
Fix installation scripts to allow building Modules when its repository
is set as a git submodule.

Closes #398.
2021-05-11 20:14:07 +02:00
Xavier Delaruelle
c00ecefaa4 install: add --with-editor configure option
Introduce the --with-editor configure option to choose at installation
time the default editor command to use to interactively edit
modulefiles. Default editor is 'vi'.
2021-04-24 13:36:51 +02:00
Xavier Delaruelle
105e3234cb doc: add link to @EnvModules Twitter page in README 2021-02-28 19:25:49 +01:00
Xavier Delaruelle
c8217f7263 install: correctly clear git remote in build ref tag 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
b41655eb30 install: silently include version.inc in Makefiles
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.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
5473b7f17d install: silent compat version make build 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
7518083803 install: no include of version.inc for 'clean' make goals 2021-02-17 16:04:04 +01:00
Xavier Delaruelle
6f82545fa9 install: no print directory change for build make targets
Pass the --no-print-directory option to the make commands which are
silenced by default.
2021-02-17 16:04:04 +01:00
Xavier Delaruelle
94df593f4a install: pretty print on makefile build targets
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.
2021-02-17 16:04:03 +01:00
Xavier Delaruelle
f5dfb30fcb Add {avail,list}_{terse_,}output configurations 2021-02-08 07:17:37 +01:00
Xavier Delaruelle
06f049c3ee Add mcookie_version_check config
Add mcookie_version_check configuration to disable the version check on
the Modules magic cookie used in modulefiles. Option, enabled by
default, is linked to the MODULES_MCOOKIE_VERSION_CHECK environment
variable.

Closes #377.
2021-01-25 06:08:13 +01:00
Xavier Delaruelle
4e0ec6450b Add tag_color_name configuration 2020-12-18 18:58:53 +01:00
Xavier Delaruelle
979349da7d Add tag_abbrev configuration 2020-12-18 18:58:37 +01:00
Xavier Delaruelle
d371aac50a install: clear git remote in build ref tag 2020-12-18 18:58:26 +01:00
Xavier Delaruelle
045c0a5aba Add implicit_requirement config
Introduce the implicit_requirement configuration option to control
whether a prereq or conflict requirement should be implicitly set
toward modules respectively specified on module load or module unload
commands in modulefile.

Default value for option could be set at configure time with the
--enable-implicit-requirement option (enabled by default). This value
could be superseded by setup of implicit_requirement option with config
sub-command. Which set the MODULES_IMPLICIT_REQUIREMENT environment
variable.
2020-11-15 10:03:42 +01:00
Xavier Delaruelle
058fd0b59f ts: test wildcard char in modulespath conf 2020-11-15 10:03:31 +01:00
Xavier Delaruelle
b0a133a443 ts/travis: test multilib support with use of alt lib 2020-09-26 08:04:39 +02:00
Xavier Delaruelle
72ef59f412 ts/lib: test tcl ext lib against a failed mktime call
Add an utility library that supersedes the mktime function from libc.
The mktime function from this added library always returns an error
(-1). It is used for coverage test of the mktime call made within the
Envmodules_ParseDateTimeArgObjCmd function of the Tcl extension library.
2020-09-18 22:41:32 +02:00
Xavier Delaruelle
f868cc2d11 ts/lib: test tcl ext lib against a failed time call
Add an utility library that supersedes the time function from libc. The
time function from this added library always returns an error (-1). It
is used for coverage test of the time call made within the
Envmodules_InitStateClockSecondsObjCmd function of the Tcl extension
library.
2020-09-16 22:32:22 +02:00
Xavier Delaruelle
178b9ef6df install: add --with-nearly-forbidden-days configure opt
Introduce the --with-nearly-forbidden-days ./configure script option to
define the number of days a module is considered nearly forbidden prior
reaching its expiry date limit set by module-forbid command.
2020-08-28 07:18:25 +02:00
Xavier Delaruelle
d72eb251ea ts/lib: test tcl ext lib against a dup ent res getgroups call
Add an utility library that supersedes the getgroups function from libc.
The getgroups function from this added library always returns a list
with 3 elements that all correspond to user's primary group. It is used
for coverage test of the getgroups call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
2020-08-10 08:06:09 +02:00
Xavier Delaruelle
f1d67c9f11 install: raise error when making srpm/rpm if no compat
Raise an error when trying to build SRPM or RPM packages if
compatibility version sources are missing.
2020-08-10 08:06:09 +02:00
Xavier Delaruelle
4a78e9ae91 Add support for multilib systems
Introduce the `--enable-multilib-support` configure option to add
mechanism in `modulecmd.tcl` to look at an alternative location to find
the Modules Tcl extension library in case this library cannot be found
at its main location.

It adds the ability on specific architecture (e.g., x86_64) to use the
library build for another architecture compatible with current machine
(e.g., i686).

When this option is enabled, modulecmd.tcl is produced in a way that
make it identical whether built from 32bit or 64bit systems. This way no
conflict happen on EL/Fedora systems when installing both 64bit and
32bit RPM packages.
2020-08-10 08:06:09 +02:00
Xavier Delaruelle
87f8e51823 ts/lib: test tcl ext lib against a zero res getgroups call
Add an utility library that supersedes the getgroups function from libc.
The getgroups function from this added library always returns an empty
result (0). It is used for coverage test of the getgroups call made
within the Envmodules_InitStateUsergroupsObjCmd function of the Tcl
extension library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
1675363e0e ts/lib: test tcl ext lib against a failed getgrgid call
Add an utility library that supersedes the getgrgid function from libc.
The getgrgid function from this added library always returns an error
(NULL). It is used for coverage test of the getgrgid call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
166096f4d8 ts/lib: test tcl ext lib against a failed getgroups call
Add an utility library that supersedes the getgroups function from libc.
The getgroups function from this added library always returns an error
(-1). It is used for coverage test of the getgroups call made within the
Envmodules_InitStateUsergroupsObjCmd function of the Tcl extension
library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
4542008335 ts/lib: test tcl ext lib against a failed getpwuid call
Add an utility library that supersedes the getpwuid function from libc.
The getpwuid function from this added library always returns an error
(NULL). It is used for coverage test of the getpwuid call made within
the Envmodules_InitStateUsernameObjCmd function of the Tcl extension
library.
2020-07-16 21:53:51 +02:00
Xavier Delaruelle
8e5a3b531a doc: include logo on README 2020-06-24 08:45:24 +02:00
Xavier Delaruelle
a0e0a597ec install: improve test deps dl retry mechanism 2020-05-10 15:54:27 +02:00
Xavier Delaruelle
5e347988d9 travis: retry test deps setup as their dl regularly fail
Add a 'test-deps' make target to specifically build all dependencies for
tests, like Nagelfar and Tcl8.3 download. Call this specific target in
Travis CI through the `travis_retry` utility to retry dependency
download if they fail.
2020-05-10 15:54:27 +02:00
Xavier Delaruelle
862dfd841f install: consistenly output Makefile warning msgs on stderr 2020-04-12 09:59:25 +02:00
Xavier Delaruelle
dcd6025503 install/ts/doc: install and test envml.cmd along other *.cmd 2020-03-10 07:44:20 +01:00
Xavier Delaruelle
e2a381d549 install: rm README on 'make clean' 2020-02-22 13:21:18 +01:00
Xavier Delaruelle
004c3b6dc9 install: build and install createmodule.py in bindir 2020-02-10 07:19:52 +01:00
Xavier Delaruelle
1041e10b3f install: ensure all built scripts have exec perms 2020-02-10 07:08:52 +01:00
Xavier Delaruelle
9535266a60 install: build createmodule.py/gitlog2changelog.py to set shebang
Adapt configure script and Makefile to detect `python` command location
and set it as shebang for `createmodule.py` and `gitlog2changelog.py`.
If python command is not found python3 then python2 are searched.
2020-02-10 07:00:32 +01:00
Xavier Delaruelle
f9ed70d8d0 install: %D git-log placeholder by not be supported 2020-02-09 13:55:10 +01:00
Xavier Delaruelle
b82fe6cd23 install/travis: add rules to build rpm and test it 2020-02-09 13:25:03 +01:00