Skip to content

Commit 61daab1

Browse files
author
Robert McLay
committed
Merge branch 'main' into IS743-show
2 parents 1b8a79b + 53d526d commit 61daab1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+769
-338
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
luaVersion: ["5.4", "5.3", "5.2", "5.1"]
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: install dependencies MacOS
1515
if: matrix.os == 'macos-latest'
1616
run: brew install coreutils gnu-sed

.versionDate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-13 12:24 -07:00
1+
2025-02-04 18:12 -07:00

Makefile.in

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,6 @@ UNAME_S := $(shell uname -s)
115115
VersionDate := $(shell cat $(VDateFn))
116116
MODE := @MODE@
117117

118-
ifeq ($(UNAME_S),Darwin)
119-
SED := gsed
120-
else
121-
SED := sed
122-
endif
123-
124118
MODE_X := $(shell $(srcdir)/proj_mgmt/convert_mode.sh -x $(MODE))
125119
MODE_R := $(shell $(srcdir)/proj_mgmt/convert_mode.sh -r $(MODE))
126120

@@ -278,7 +272,7 @@ __installMe:
278272
fn=$${bareN%%.in*}; \
279273
ext=$${bareN#*.}; \
280274
: echo "DIRLOC/fn: $(DIRLOC)/$$fn"; \
281-
$(SED) -e 's|@PREFIX@|$(prefix)|g' \
275+
sed -e 's|@PREFIX@|$(prefix)|g' \
282276
-e 's|@LMOD_TOP_DIR@|$(MY_PACKAGE)|g' \
283277
-e 's|@path_to_lua@|$(PATH_TO_LUA)|g' \
284278
-e 's|@hashsum@|$(PATH_TO_HASHSUM)|g' \
@@ -444,7 +438,8 @@ config.status:
444438
./config.status --recheck
445439
446440
trailing_blanks_removed:
447-
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -name '*.lua' -exec $(SED) -i -e 's/ *$$//' {} \;
441+
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -type f -name '*.lua' -exec sed -i.bak.BAK -e 's/ *$$//' {} \;
442+
find . -type d \( -path ./rt -o -path ./spec/Spider/h \) -prune -o -name '*.lua.bak.BAK' -exec rm {} \;
448443
449444
dist:
450445
GIT_BRANCH=`git status | head -n 1 | sed -e 's/^[# ]*On branch //g' -e 's/^[# ]*HEAD detached at//g'`; \

README.new

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,11 @@ Lmod 8.7+
196196
* Issue #731: Support for env. var. LMOD_SHOW_HIDDEN
197197
* Issue #739: Make tcl files have "spider" as mode matching when Lmod is in spider mode.
198198
(8.7.55) * Patch #737: A better test for spaces in front of # for admin.list
199-
199+
(8.7.56) * Issue #742: Switch Makefile.in to use dump-downed sed instead of Gnu Sed
200+
* PR #743: Allow TCL modulefile to test shell type
201+
* Trailing blanks removed.
202+
* Fixed LMOD_FILE_IGNORE_PATTERNS so that it can be an env. var and converted to a Lua array table.
203+
* Documented LMOD_FILE_IGNORE_PATTERNS
204+
* Issue #740: Rewrite ModuleA l_find_vA so that it checks partial version strings.
205+
* Issue #745: posix.setenv("var", false, true) must change to posix.setenv("var", nil, true).
206+
* Issue #728: Disallow fast TCL interp with TCL 9+. This will hopely fixed in the future (;->)

bugReport/my_modules/Core/gcc/10.0.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ local MODULEPATH_ROOT = myFileName():match('(.*)/Core/gcc/.*')
22
prepend_path("MODULEPATH",pathJoin(MODULEPATH_ROOT,"Compiler/gcc/10"))
33

44

5-
5+

configure

Lines changed: 76 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,6 @@ FIND_PATH_TO_LUAC
660660
FIND_PATH_TO_LUA
661661
PATH_TO_TR
662662
BC
663-
PATH_TO_TCLSH
664663
PATH_TO_PAGER
665664
PATH_TO_HASHSUM
666665
PATH_TO_GIT
@@ -676,6 +675,7 @@ SYS_LD_LIB_PATH
676675
TCL_LIBS
677676
TCL_INCLUDE
678677
pkgConfig
678+
PATH_TO_TCLSH
679679
LUA_SUFFIX
680680
PATH_TO_LUAC
681681
PATH_TO_LUA
@@ -3471,6 +3471,8 @@ FOLLOW_READLINK ()
34713471
34723472
ERR_MSG=""
34733473
FOUND_ERROR=
3474+
SRCDIR=$( cd $srcdir; pwd)
3475+
PATH_TO_SRC=$SRCDIR
34743476
34753477
34763478
@@ -4502,6 +4504,76 @@ if test "$ALLOW_TCL_MFILES" = no ; then
45024504
FAST_TCL_INTERP=no
45034505
fi
45044506
4507+
4508+
for ac_prog in tclsh9.0 tclsh9 tclsh
4509+
do
4510+
# Extract the first word of "$ac_prog", so it can be a program name with args.
4511+
set dummy $ac_prog; ac_word=$2
4512+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513+
printf %s "checking for $ac_word... " >&6; }
4514+
if test ${ac_cv_path_PATH_TO_TCLSH+y}
4515+
then :
4516+
printf %s "(cached) " >&6
4517+
else $as_nop
4518+
case $PATH_TO_TCLSH in
4519+
[\\/]* | ?:[\\/]*)
4520+
ac_cv_path_PATH_TO_TCLSH="$PATH_TO_TCLSH" # Let the user override the test with a path.
4521+
;;
4522+
*)
4523+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524+
for as_dir in $PATH
4525+
do
4526+
IFS=$as_save_IFS
4527+
case $as_dir in #(((
4528+
'') as_dir=./ ;;
4529+
*/) ;;
4530+
*) as_dir=$as_dir/ ;;
4531+
esac
4532+
for ac_exec_ext in '' $ac_executable_extensions; do
4533+
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4534+
ac_cv_path_PATH_TO_TCLSH="$as_dir$ac_word$ac_exec_ext"
4535+
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4536+
break 2
4537+
fi
4538+
done
4539+
done
4540+
IFS=$as_save_IFS
4541+
4542+
;;
4543+
esac
4544+
fi
4545+
PATH_TO_TCLSH=$ac_cv_path_PATH_TO_TCLSH
4546+
if test -n "$PATH_TO_TCLSH"; then
4547+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_TCLSH" >&5
4548+
printf "%s\n" "$PATH_TO_TCLSH" >&6; }
4549+
else
4550+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4551+
printf "%s\n" "no" >&6; }
4552+
fi
4553+
4554+
4555+
test -n "$PATH_TO_TCLSH" && break
4556+
done
4557+
test -n "$PATH_TO_TCLSH" || PATH_TO_TCLSH="UNKNOWN_TCLSH"
4558+
4559+
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
4560+
echo
4561+
echo "The tclsh program must be in your path. Quitting!"
4562+
echo
4563+
rm -f makefile
4564+
exit 1
4565+
fi
4566+
4567+
TCL_VERSION=`$PATH_TO_TCLSH $SRCDIR/proj_mgmt/tcl_version_string.tcl`
4568+
if test $TCL_VERSION -ge 9000000; then
4569+
FAST_TCL_INTERP=no
4570+
fi
4571+
4572+
if test -z "$TCL_PKG_CONFIG_DIR" ; then
4573+
TCL_PKG_CONFIG_DIR=`$SRCDIR/proj_mgmt/find_tcl_pc.sh $PATH_TO_TCLSH`
4574+
fi
4575+
4576+
45054577
if test "$FAST_TCL_INTERP" = yes ; then
45064578
OS=$(uname -s)
45074579
# Extract the first word of "pkg-config", so it can be a program name with args.
@@ -4569,9 +4641,9 @@ fi
45694641
DIR=$(xcrun --show-sdk-path)
45704642
TCL_INCLUDE="-I${DIR}/usr/include"
45714643
else
4572-
for i in "" tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
4573-
if test -f /usr/include/$i/tcl.h ; then
4574-
TCL_INCLUDE="-I/usr/include/$i"
4644+
for i in /usr/include /usr/include/tcl /usr/include/tcl9* /usr/include/tcl8* ; do
4645+
if test -f $i/tcl.h ; then
4646+
TCL_INCLUDE="-I$i"
45754647
break;
45764648
fi
45774649
done
@@ -4719,8 +4791,6 @@ SYS_LD_LIB_PATH=$LD_LIBRARY_PATH
47194791
SYS_LD_PRELOAD=$LD_PRELOAD
47204792
47214793
4722-
SRCDIR=$( cd $srcdir; pwd)
4723-
PATH_TO_SRC=$SRCDIR
47244794
47254795
##### UTILS -- start
47264796
@@ -4734,7 +4804,6 @@ PATH_TO_SRC=$SRCDIR
47344804
47354805
47364806
4737-
47384807
if test $MODE = "user_default" ; then
47394808
mode=0755
47404809
EXEC_BITS=$(( 0111 & $mode ));
@@ -5243,59 +5312,6 @@ elif test "$PATH_TO_HASHSUM" = "UNKNOWN_HASHSUM" ; then
52435312
exit 1
52445313
fi
52455314
5246-
# Extract the first word of "tclsh", so it can be a program name with args.
5247-
set dummy tclsh; ac_word=$2
5248-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249-
printf %s "checking for $ac_word... " >&6; }
5250-
if test ${ac_cv_path_PATH_TO_TCLSH+y}
5251-
then :
5252-
printf %s "(cached) " >&6
5253-
else $as_nop
5254-
case $PATH_TO_TCLSH in
5255-
[\\/]* | ?:[\\/]*)
5256-
ac_cv_path_PATH_TO_TCLSH="$PATH_TO_TCLSH" # Let the user override the test with a path.
5257-
;;
5258-
*)
5259-
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260-
for as_dir in $PATH
5261-
do
5262-
IFS=$as_save_IFS
5263-
case $as_dir in #(((
5264-
'') as_dir=./ ;;
5265-
*/) ;;
5266-
*) as_dir=$as_dir/ ;;
5267-
esac
5268-
for ac_exec_ext in '' $ac_executable_extensions; do
5269-
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5270-
ac_cv_path_PATH_TO_TCLSH="$as_dir$ac_word$ac_exec_ext"
5271-
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5272-
break 2
5273-
fi
5274-
done
5275-
done
5276-
IFS=$as_save_IFS
5277-
5278-
test -z "$ac_cv_path_PATH_TO_TCLSH" && ac_cv_path_PATH_TO_TCLSH="UNKNOWN_TCLSH"
5279-
;;
5280-
esac
5281-
fi
5282-
PATH_TO_TCLSH=$ac_cv_path_PATH_TO_TCLSH
5283-
if test -n "$PATH_TO_TCLSH"; then
5284-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TO_TCLSH" >&5
5285-
printf "%s\n" "$PATH_TO_TCLSH" >&6; }
5286-
else
5287-
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288-
printf "%s\n" "no" >&6; }
5289-
fi
5290-
5291-
5292-
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
5293-
echo
5294-
echo "The tclsh program must be in your path. Quitting!"
5295-
echo
5296-
rm -f makefile
5297-
exit 1
5298-
fi
52995315
for ac_prog in gtr tr
53005316
do
53015317
# Extract the first word of "$ac_prog", so it can be a program name with args.

configure.ac

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ FOLLOW_READLINK ()
4444

4545
ERR_MSG=""
4646
FOUND_ERROR=
47+
SRCDIR=$( cd $srcdir; pwd)
48+
PATH_TO_SRC=$SRCDIR
4749

4850
AC_SUBST(DUPLICATE_PATHS)
4951
AC_ARG_WITH(duplicatePaths,
@@ -726,6 +728,26 @@ if test "$ALLOW_TCL_MFILES" = no ; then
726728
FAST_TCL_INTERP=no
727729
fi
728730

731+
AC_SUBST(PATH_TO_TCLSH)
732+
AC_PATH_PROGS(PATH_TO_TCLSH, [tclsh9.0] [tclsh9] [tclsh], UNKNOWN_TCLSH)
733+
if test "$PATH_TO_TCLSH" = "UNKNOWN_TCLSH" -a "$ALLOW_TCL_MFILES" = yes; then
734+
echo
735+
echo "The tclsh program must be in your path. Quitting!"
736+
echo
737+
rm -f makefile
738+
exit 1
739+
fi
740+
741+
TCL_VERSION=`$PATH_TO_TCLSH $SRCDIR/proj_mgmt/tcl_version_string.tcl`
742+
if test $TCL_VERSION -ge 9000000; then
743+
FAST_TCL_INTERP=no
744+
fi
745+
746+
if test -z "$TCL_PKG_CONFIG_DIR" ; then
747+
TCL_PKG_CONFIG_DIR=`$SRCDIR/proj_mgmt/find_tcl_pc.sh $PATH_TO_TCLSH`
748+
fi
749+
750+
729751
if test "$FAST_TCL_INTERP" = yes ; then
730752
OS=$(uname -s)
731753
AC_PATH_PROG(pkgConfig, pkg-config, "UNKNOWN_PKG_CONFIG")
@@ -748,9 +770,9 @@ if test "$FAST_TCL_INTERP" = yes ; then
748770
DIR=$(xcrun --show-sdk-path)
749771
TCL_INCLUDE="-I${DIR}/usr/include"
750772
else
751-
for i in "" tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
752-
if test -f /usr/include/$i/tcl.h ; then
753-
TCL_INCLUDE="-I/usr/include/$i"
773+
for i in /usr/include /usr/include/tcl /usr/include/tcl9* /usr/include/tcl8* ; do
774+
if test -f $i/tcl.h ; then
775+
TCL_INCLUDE="-I$i"
754776
break;
755777
fi
756778
done
@@ -800,8 +822,6 @@ AC_SUBST(SYS_LD_PRELOAD)
800822
SYS_LD_PRELOAD=$LD_PRELOAD
801823

802824
AC_SUBST(PATH_TO_SRC)
803-
SRCDIR=$( cd $srcdir; pwd)
804-
PATH_TO_SRC=$SRCDIR
805825

806826
##### UTILS -- start
807827

@@ -814,7 +834,6 @@ AC_SUBST(PATH_TO_LS)
814834
AC_SUBST(PATH_TO_GIT)
815835
AC_SUBST(PATH_TO_HASHSUM)
816836
AC_SUBST(PATH_TO_PAGER)
817-
AC_SUBST(PATH_TO_TCLSH)
818837

819838
if test $MODE = "user_default" ; then
820839
mode=0755
@@ -894,14 +913,6 @@ elif test "$PATH_TO_HASHSUM" = "UNKNOWN_HASHSUM" ; then
894913
exit 1
895914
fi
896915

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

docs/source/025_new.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
New Features in Lmod
22
====================
33

4+
**LMOD_FILE_IGNORE_PATTERNS**
5+
(Lmod 8.7.56+) Sites can replace the default value with their own
6+
list of file patterns to ignore.
7+
48
**Updated Tracking Module Usage**
59
(Lmod 8.7.54+) The optional module usage tracking system has been
610
updated. It now uses Python3 and mysql.connector.python. The new

docs/source/090_configuring_lmod.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.. _env_vars-label:
2+
.. _show_hidden-label:
3+
24

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

70-
.. _show_hidden-label:
71-
7272
**LMOD_SHOW_HIDDEN**:
7373
[string] This variable is used to control whether hidden modules are
7474
shown. Possible values are: **all**, **avail**, **spider**, and/or
@@ -271,9 +271,21 @@ the configuration option which will set the action.
271271
When this is set, Lmod will treat *prereq()* like *depends_on()* and
272272
*prereq_any()* like *depends_on_any()*.
273273

274+
Setting environment variables or cosmic:assign() at startup
275+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276+
277+
**LMOD_FILE_IGNORE_PATTERNS**
278+
Sites can replace the default value for this Lua Array variable to
279+
ignore files. The default value is::
280+
281+
`{"%.version[-._].*", "%.modulerc[-._].*"}`
282+
283+
Note that you must use Lua based regular expressions.
284+
274285
Configuration or cosmic:assign() at startup
275286
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276287

288+
277289
**LMOD_DOWNSTREAM_CONFLICTS**:
278290
[yes/no, default: no, --with-downstreamConflicts] If yes then
279291
the conflict() function are also remembered to block future module

docs/source/301_converting_to_gen2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This will create files named lmodV2_YYYY_MM_DD.json.
5555
Step 2
5656
------
5757

58-
Place or copy those *.json files to the appropriate machine or
58+
Place or copy those \*.json files to the appropriate machine or
5959
location where you can load then into the new "module_usage_tracking"
6060
machine.
6161

0 commit comments

Comments
 (0)