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.
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.
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.
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.
Improve markup of NEWS and MIGRATING documents starting from this 4.6
version to enable references to module sub-commands, command line
switches, environment variables and modulefile Tcl commands.
Add function in libtclenvmodules to implement `initStateUsergroups` as a
Tcl command, which provides a more efficient way to retrieve current
groups of running process, rather forking to execute `id` external
binary.
Note that if current system does not support the `getgroups` system
call, only the primary group name of current user will be returned.
Add function in libtclenvmodules to implement `initStateUsername` as a
Tcl command, which provides a more efficient way to retrieve current
username, rather forking to execute `id` external binary.
Be able to fetch groups of current user through `module-info` modulefile
command. With no extra argument, all group names are returned. If a name
is provided as argument, true is returned if this name matches one entry
in the group list, false is returned otherwise.
Create `usergroups` state to collect all the groups the user running
modulecmd.tcl process is member of. Add an initStateUsergroups procedure
to initialize this state, which calls `id -G -n` to fetch these group
names. This external command is available on every Unices and its
`-G -n` arguments operate the same way.
An error will be obtained on Windows platform as `id` command is not
known there.
initStateUsergroups procedure is recorded in modulecmd.tcl as
__initStateUsergroups and renamed if initStateUsergroups procedure is
not found from Modules Tcl extension library. A more efficient version
of initStateUsergroups will be provided in the library later on (not to
depend on an external command call).
Be able to fetch current username through `module-info` modulefile
command. With no extra argument, username is returned. If a name is
provided as argument, true is returned if this name matches current
username, false is returned otherwise.
Create `username` state to collect the name of the user running
modulecmd.tcl process. Add an initStateUsername procedure to initialize
this state, which calls `id -u -n` to fetch username. This external
command is available on every Unices and its `-u -n` arguments operate
the same way.
An error will be obtained on Windows platform as `id` command is not
known there.
initStateUsername procedure is recorded in modulecmd.tcl as
__initStateUsername and renamed if initStateUsername procedure is not
found from Modules Tcl extension library. A more efficient version of
initStateUsername will be provided in the library later on (not to
depend on an external command call).
Use inclusive terminology [1] to eliminate 'master' and 'slave' terms as
much as possible from code and documentation. 'master' has been changed
into 'main' and 'slave' into 'subordinate' or 'sub'.
After this change, some references to the 'master' and 'slave' word can
still be found in repository:
* `slaves` sub-command of `interp` Tcl command
* `--slave` option of `update-alternatives tool in RPM spec file
* `master_doc` attribute of Sphinx `conf.py` file
* git 'master' branch need to be renamed and tools referring it need to
be updated accordingly (configure, script/mpub, script/mrel)
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=49decddd39e5f6132ccd7d9fdc3d7c470b0061bb
Version 4 of Modules is available since almost 3 years. Many
improvements have been made to integrate features of version 3.2 still
needed in module command. So it is now time to disable the build of
version 3.2 which was triggered by default since 4.0.
Enable the definition of the installation directory argument of the
./configure script with the `--arg val` syntax form in addition to the
`--arg=val` syntax.
Fixes#348
Only pass to compatibility version ./configure script arguments that
make sense to it. Do not transmit anymore arguments that are unknown to
this compatibility version ./configure script.
Compatibility version ./configure script argument listed in project's
main configure script are only a subset of supported arguments. Main
configure script can only be used to run compatibility configure script
with the argument list here.
When modulefile is displayed, report modulefile commands resulting from
source-sh script evaluation rather source-sh modulefile command.
As for unload modulefile evaluation, display mode relies on
MODULES_LMSOURCESH if modulefile is currently loaded. However it will
requery script to fetch the definition of shell aliases and functions.