Skip to content

Commit

Permalink
Merge branch 'main' into IS743-show
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Feb 19, 2025
2 parents 1b8a79b + 53d526d commit 61daab1
Show file tree
Hide file tree
Showing 78 changed files with 769 additions and 338 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
luaVersion: ["5.4", "5.3", "5.2", "5.1"]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: install dependencies MacOS
if: matrix.os == 'macos-latest'
run: brew install coreutils gnu-sed
Expand Down
2 changes: 1 addition & 1 deletion .versionDate
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-12-13 12:24 -07:00
2025-02-04 18:12 -07:00
11 changes: 3 additions & 8 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ UNAME_S := $(shell uname -s)
VersionDate := $(shell cat $(VDateFn))
MODE := @MODE@

ifeq ($(UNAME_S),Darwin)
SED := gsed
else
SED := sed
endif

MODE_X := $(shell $(srcdir)/proj_mgmt/convert_mode.sh -x $(MODE))
MODE_R := $(shell $(srcdir)/proj_mgmt/convert_mode.sh -r $(MODE))

Expand Down Expand Up @@ -278,7 +272,7 @@ __installMe:
fn=$${bareN%%.in*}; \
ext=$${bareN#*.}; \
: echo "DIRLOC/fn: $(DIRLOC)/$$fn"; \
$(SED) -e 's|@PREFIX@|$(prefix)|g' \
sed -e 's|@PREFIX@|$(prefix)|g' \
-e 's|@LMOD_TOP_DIR@|$(MY_PACKAGE)|g' \
-e 's|@path_to_lua@|$(PATH_TO_LUA)|g' \
-e 's|@hashsum@|$(PATH_TO_HASHSUM)|g' \
Expand Down Expand Up @@ -444,7 +438,8 @@ config.status:
./config.status --recheck
trailing_blanks_removed:
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -name '*.lua' -exec $(SED) -i -e 's/ *$$//' {} \;
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -type f -name '*.lua' -exec sed -i.bak.BAK -e 's/ *$$//' {} \;
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -name '*.lua.bak.BAK' -exec rm {} \;
dist:
GIT_BRANCH=`git status | head -n 1 | sed -e 's/^[# ]*On branch //g' -e 's/^[# ]*HEAD detached at//g'`; \
Expand Down
9 changes: 8 additions & 1 deletion README.new
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,11 @@ Lmod 8.7+
* Issue #731: Support for env. var. LMOD_SHOW_HIDDEN
* Issue #739: Make tcl files have "spider" as mode matching when Lmod is in spider mode.
(8.7.55) * Patch #737: A better test for spaces in front of # for admin.list

(8.7.56) * Issue #742: Switch Makefile.in to use dump-downed sed instead of Gnu Sed
* PR #743: Allow TCL modulefile to test shell type
* Trailing blanks removed.
* Fixed LMOD_FILE_IGNORE_PATTERNS so that it can be an env. var and converted to a Lua array table.
* Documented LMOD_FILE_IGNORE_PATTERNS
* Issue #740: Rewrite ModuleA l_find_vA so that it checks partial version strings.
* Issue #745: posix.setenv("var", false, true) must change to posix.setenv("var", nil, true).
* Issue #728: Disallow fast TCL interp with TCL 9+. This will hopely fixed in the future (;->)
2 changes: 1 addition & 1 deletion bugReport/my_modules/Core/gcc/10.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ local MODULEPATH_ROOT = myFileName():match('(.*)/Core/gcc/.*')
prepend_path("MODULEPATH",pathJoin(MODULEPATH_ROOT,"Compiler/gcc/10"))



136 changes: 76 additions & 60 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ FIND_PATH_TO_LUAC
FIND_PATH_TO_LUA
PATH_TO_TR
BC
PATH_TO_TCLSH
PATH_TO_PAGER
PATH_TO_HASHSUM
PATH_TO_GIT
Expand All @@ -676,6 +675,7 @@ SYS_LD_LIB_PATH
TCL_LIBS
TCL_INCLUDE
pkgConfig
PATH_TO_TCLSH
LUA_SUFFIX
PATH_TO_LUAC
PATH_TO_LUA
Expand Down Expand Up @@ -3471,6 +3471,8 @@ FOLLOW_READLINK ()
ERR_MSG=""
FOUND_ERROR=
SRCDIR=$( cd $srcdir; pwd)
PATH_TO_SRC=$SRCDIR
Expand Down Expand Up @@ -4502,6 +4504,76 @@ if test "$ALLOW_TCL_MFILES" = no ; then
FAST_TCL_INTERP=no
fi
for ac_prog in tclsh9.0 tclsh9 tclsh
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PATH_TO_TCLSH+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $PATH_TO_TCLSH in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_TO_TCLSH="$PATH_TO_TCLSH" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_PATH_TO_TCLSH="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PATH_TO_TCLSH=$ac_cv_path_PATH_TO_TCLSH
if test -n "$PATH_TO_TCLSH"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_TCLSH" >&5
printf "%s\n" "$PATH_TO_TCLSH" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
test -n "$PATH_TO_TCLSH" && break
done
test -n "$PATH_TO_TCLSH" || PATH_TO_TCLSH="UNKNOWN_TCLSH"
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
echo
echo "The tclsh program must be in your path. Quitting!"
echo
rm -f makefile
exit 1
fi
TCL_VERSION=`$PATH_TO_TCLSH $SRCDIR/proj_mgmt/tcl_version_string.tcl`
if test $TCL_VERSION -ge 9000000; then
FAST_TCL_INTERP=no
fi
if test -z "$TCL_PKG_CONFIG_DIR" ; then
TCL_PKG_CONFIG_DIR=`$SRCDIR/proj_mgmt/find_tcl_pc.sh $PATH_TO_TCLSH`
fi
if test "$FAST_TCL_INTERP" = yes ; then
OS=$(uname -s)
# Extract the first word of "pkg-config", so it can be a program name with args.
Expand Down Expand Up @@ -4569,9 +4641,9 @@ fi
DIR=$(xcrun --show-sdk-path)
TCL_INCLUDE="-I${DIR}/usr/include"
else
for i in "" tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
if test -f /usr/include/$i/tcl.h ; then
TCL_INCLUDE="-I/usr/include/$i"
for i in /usr/include /usr/include/tcl /usr/include/tcl9* /usr/include/tcl8* ; do
if test -f $i/tcl.h ; then
TCL_INCLUDE="-I$i"
break;
fi
done
Expand Down Expand Up @@ -4719,8 +4791,6 @@ SYS_LD_LIB_PATH=$LD_LIBRARY_PATH
SYS_LD_PRELOAD=$LD_PRELOAD
SRCDIR=$( cd $srcdir; pwd)
PATH_TO_SRC=$SRCDIR
##### UTILS -- start
Expand All @@ -4734,7 +4804,6 @@ PATH_TO_SRC=$SRCDIR
if test $MODE = "user_default" ; then
mode=0755
EXEC_BITS=$(( 0111 & $mode ));
Expand Down Expand Up @@ -5243,59 +5312,6 @@ elif test "$PATH_TO_HASHSUM" = "UNKNOWN_HASHSUM" ; then
exit 1
fi
# Extract the first word of "tclsh", so it can be a program name with args.
set dummy tclsh; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_PATH_TO_TCLSH+y}
then :
printf %s "(cached) " >&6
else $as_nop
case $PATH_TO_TCLSH in
[\\/]* | ?:[\\/]*)
ac_cv_path_PATH_TO_TCLSH="$PATH_TO_TCLSH" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
case $as_dir in #(((
'') as_dir=./ ;;
*/) ;;
*) as_dir=$as_dir/ ;;
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
ac_cv_path_PATH_TO_TCLSH="$as_dir$ac_word$ac_exec_ext"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_PATH_TO_TCLSH" && ac_cv_path_PATH_TO_TCLSH="UNKNOWN_TCLSH"
;;
esac
fi
PATH_TO_TCLSH=$ac_cv_path_PATH_TO_TCLSH
if test -n "$PATH_TO_TCLSH"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_TCLSH" >&5
printf "%s\n" "$PATH_TO_TCLSH" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
echo
echo "The tclsh program must be in your path. Quitting!"
echo
rm -f makefile
exit 1
fi
for ac_prog in gtr tr
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
Expand Down
39 changes: 25 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ FOLLOW_READLINK ()

ERR_MSG=""
FOUND_ERROR=
SRCDIR=$( cd $srcdir; pwd)
PATH_TO_SRC=$SRCDIR

AC_SUBST(DUPLICATE_PATHS)
AC_ARG_WITH(duplicatePaths,
Expand Down Expand Up @@ -726,6 +728,26 @@ if test "$ALLOW_TCL_MFILES" = no ; then
FAST_TCL_INTERP=no
fi

AC_SUBST(PATH_TO_TCLSH)
AC_PATH_PROGS(PATH_TO_TCLSH, [tclsh9.0] [tclsh9] [tclsh], UNKNOWN_TCLSH)
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
echo
echo "The tclsh program must be in your path. Quitting!"
echo
rm -f makefile
exit 1
fi

TCL_VERSION=`$PATH_TO_TCLSH $SRCDIR/proj_mgmt/tcl_version_string.tcl`
if test $TCL_VERSION -ge 9000000; then
FAST_TCL_INTERP=no
fi

if test -z "$TCL_PKG_CONFIG_DIR" ; then
TCL_PKG_CONFIG_DIR=`$SRCDIR/proj_mgmt/find_tcl_pc.sh $PATH_TO_TCLSH`
fi


if test "$FAST_TCL_INTERP" = yes ; then
OS=$(uname -s)
AC_PATH_PROG(pkgConfig, pkg-config, "UNKNOWN_PKG_CONFIG")
Expand All @@ -748,9 +770,9 @@ if test "$FAST_TCL_INTERP" = yes ; then
DIR=$(xcrun --show-sdk-path)
TCL_INCLUDE="-I${DIR}/usr/include"
else
for i in "" tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
if test -f /usr/include/$i/tcl.h ; then
TCL_INCLUDE="-I/usr/include/$i"
for i in /usr/include /usr/include/tcl /usr/include/tcl9* /usr/include/tcl8* ; do
if test -f $i/tcl.h ; then
TCL_INCLUDE="-I$i"
break;
fi
done
Expand Down Expand Up @@ -800,8 +822,6 @@ AC_SUBST(SYS_LD_PRELOAD)
SYS_LD_PRELOAD=$LD_PRELOAD

AC_SUBST(PATH_TO_SRC)
SRCDIR=$( cd $srcdir; pwd)
PATH_TO_SRC=$SRCDIR

##### UTILS -- start

Expand All @@ -814,7 +834,6 @@ AC_SUBST(PATH_TO_LS)
AC_SUBST(PATH_TO_GIT)
AC_SUBST(PATH_TO_HASHSUM)
AC_SUBST(PATH_TO_PAGER)
AC_SUBST(PATH_TO_TCLSH)

if test $MODE = "user_default" ; then
mode=0755
Expand Down Expand Up @@ -894,14 +913,6 @@ elif test "$PATH_TO_HASHSUM" = "UNKNOWN_HASHSUM" ; then
exit 1
fi

AC_PATH_PROG(PATH_TO_TCLSH, tclsh, UNKNOWN_TCLSH)
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
echo
echo "The tclsh program must be in your path. Quitting!"
echo
rm -f makefile
exit 1
fi
AC_PATH_PROGS(PATH_TO_TR, [gtr] [tr],"")
AC_PATH_PROGS(PATH_TO_LS, [gls] [ls], "")

Expand Down
4 changes: 4 additions & 0 deletions docs/source/025_new.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
New Features in Lmod
====================

**LMOD_FILE_IGNORE_PATTERNS**
(Lmod 8.7.56+) Sites can replace the default value with their own
list of file patterns to ignore.

**Updated Tracking Module Usage**
(Lmod 8.7.54+) The optional module usage tracking system has been
updated. It now uses Python3 and mysql.connector.python. The new
Expand Down
16 changes: 14 additions & 2 deletions docs/source/090_configuring_lmod.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.. _env_vars-label:
.. _show_hidden-label:


Configuring Lmod for your site
==============================
Expand Down Expand Up @@ -67,8 +69,6 @@ configuration step.
your site has the SHELL_STARTUP_DEBUG package installed so that the
invoking of the module command in the system startup will a no-op.

.. _show_hidden-label:

**LMOD_SHOW_HIDDEN**:
[string] This variable is used to control whether hidden modules are
shown. Possible values are: **all**, **avail**, **spider**, and/or
Expand Down Expand Up @@ -271,9 +271,21 @@ the configuration option which will set the action.
When this is set, Lmod will treat *prereq()* like *depends_on()* and
*prereq_any()* like *depends_on_any()*.

Setting environment variables or cosmic:assign() at startup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**LMOD_FILE_IGNORE_PATTERNS**
Sites can replace the default value for this Lua Array variable to
ignore files. The default value is::

`{"%.version[-._].*", "%.modulerc[-._].*"}`

Note that you must use Lua based regular expressions.

Configuration or cosmic:assign() at startup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


**LMOD_DOWNSTREAM_CONFLICTS**:
[yes/no, default: no, --with-downstreamConflicts] If yes then
the conflict() function are also remembered to block future module
Expand Down
2 changes: 1 addition & 1 deletion docs/source/301_converting_to_gen2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This will create files named lmodV2_YYYY_MM_DD.json.
Step 2
------

Place or copy those *.json files to the appropriate machine or
Place or copy those \*.json files to the appropriate machine or
location where you can load then into the new "module_usage_tracking"
machine.

Expand Down
Loading

0 comments on commit 61daab1

Please sign in to comment.