Compare commits

...

No commits in common. 'c9' and 'i10cs' have entirely different histories.
c9 ... i10cs

@ -1 +1 @@
cb1def0bb726097edb5d077d59cf9272380243db SOURCES/modules-5.3.0.tar.bz2
5d8fb4740b9d8fe45c8fa674590d150927336216 SOURCES/modules-5.3.1.tar.bz2

2
.gitignore vendored

@ -1 +1 @@
SOURCES/modules-5.3.0.tar.bz2
SOURCES/modules-5.3.1.tar.bz2

@ -0,0 +1,26 @@
From 8c757d59c068d7c41e78f59f575eca9d58785a36 Mon Sep 17 00:00:00 2001
From: Xavier Delaruelle <xavier.delaruelle@cea.fr>
Date: Mon, 28 Oct 2024 06:16:20 +0100
Subject: [PATCH] ts: fix 70/410 when no stdin and re chars in path
Fixes #552
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
Upstream-commit: 8c757d59c068d7c41e78f59f575eca9d58785a36
---
testsuite/modules.70-maint/410-timer.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/modules.70-maint/410-timer.exp b/testsuite/modules.70-maint/410-timer.exp
index fe1dd0ffb..14ba2d2b1 100644
--- a/testsuite/modules.70-maint/410-timer.exp
+++ b/testsuite/modules.70-maint/410-timer.exp
@@ -77,7 +77,7 @@ testouterr_cmd_re sh {list --timer --silent} OK $tserr
# debug
set tserr "($timer_msgs .* \\\(\\d+.\\d+ ms\\\))*
-[msg_load foo/1.0 "Evaluate modulefile: '$mpre/foo/1.0' as 'foo/1.0'"]
+[escre [msg_load foo/1.0 "Evaluate modulefile: '$mp/foo/1.0' as 'foo/1.0'"]]
($timer_msgs .* \\\(\\d+.\\d+ ms\\\))*

@ -0,0 +1,131 @@
From a124745566804f8987a2c68944d395be10591f8c Mon Sep 17 00:00:00 2001
From: Xavier Delaruelle <xavier.delaruelle@cea.fr>
Date: Tue, 15 Oct 2024 07:52:44 +0200
Subject: [PATCH] ts: adapt 50/400 tests when install manpath is default
Fix source-sh tests in 50/400 test case to adapt expected value set to
MANPATH variable when the installed MANPATH value set at configure step
is included in the default MANPATH value set for test.
Fixes #549
---
testsuite/modules.50-cmds/400-source-sh.exp | 46 ++++++++++++++-------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/testsuite/modules.50-cmds/400-source-sh.exp b/testsuite/modules.50-cmds/400-source-sh.exp
index 19a23fb81..753975c2a 100644
--- a/testsuite/modules.50-cmds/400-source-sh.exp
+++ b/testsuite/modules.50-cmds/400-source-sh.exp
@@ -1612,12 +1612,26 @@ if {$install_setmanpath eq {y}} {
} else {
set mandirenc $install_mandir
}
- if {$install_appendmanpath eq {y}} {
- set updatedmanpath $default_manpath:$install_mandir
- set lmsourceshpath "append-path MANPATH $mandirenc|"
- } else {
- set updatedmanpath $install_mandir:$default_manpath
- set lmsourceshpath "prepend-path MANPATH $mandirenc|"
+ set updated_manpath_list [split $default_manpath :]
+ set is_default_manpath_updated 0
+ foreach install_manpath_elt [split $install_mandir :] {
+ if {$install_manpath_elt ni $updated_manpath_list} {
+ if {$install_appendmanpath eq {y}} {
+ lappend updated_manpath_list $install_manpath_elt
+ } else {
+ set updated_manpath_list [linsert $updated_manpath_list 0 $install_manpath_elt]
+ }
+ set is_default_manpath_updated 1
+ }
+ }
+ set updatedmanpath [join $updated_manpath_list :]
+
+ if {$is_default_manpath_updated} {
+ if {$install_appendmanpath eq {y}} {
+ set lmsourceshpath "append-path MANPATH $mandirenc|"
+ } else {
+ set lmsourceshpath "prepend-path MANPATH $mandirenc|"
+ }
}
}
# setup PATH without Modules bin location
@@ -1647,13 +1661,13 @@ if {$install_versioning eq {y}} {
lappend ans [list set MODULE_VERSION_STACK $install_version]
}
# MANPATH is set before PATH if the latter is appended and not the former
-if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n}} {
+if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n} && $is_default_manpath_updated} {
lappend ans [list set MANPATH $updatedmanpath]
}
if {$install_setbinpath eq {y}} {
lappend ans [list set PATH $updatedpath]
}
-if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y})} {
+if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y}) && $is_default_manpath_updated} {
lappend ans [list set MANPATH $updatedmanpath]
}
lappend ans [list set _LMFILES_ $mp/source-sh/1]
@@ -1703,7 +1717,7 @@ set extratserr {}
set tserr "-------------------------------------------------------------------
$mp/source-sh/1:\n\n"
set tserr_path {}
-if {$install_setmanpath eq {y}} {
+if {$install_setmanpath eq {y} && $is_default_manpath_updated} {
if {$install_appendmanpath eq {y}} {
append tserr_path "append-path\tMANPATH $mandirenc\n"
} else {
@@ -1754,13 +1768,13 @@ if {$install_versioning eq {y}} {
lappend ans [list set MODULE_VERSION_STACK $install_version]
}
# MANPATH is set before PATH if the latter is appended and not the former
-if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n}} {
+if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n} && $is_default_manpath_updated} {
lappend ans [list set MANPATH $updatedmanpath]
}
if {$install_setbinpath eq {y}} {
lappend ans [list set PATH $updatedpath]
}
-if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y})} {
+if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y}) && $is_default_manpath_updated} {
lappend ans [list set MANPATH $updatedmanpath]
}
lappend ans [list set _LMFILES_ $mp/source-sh/1]
@@ -1792,13 +1806,13 @@ if {$install_versioning eq {y}} {
lappend ans [list set MODULE_VERSION_STACK $install_version]
}
# MANPATH is set before PATH if the latter is appended and not the former
-if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n}} {
+if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n} && $is_default_manpath_updated} {
lappend ans [list set MANPATH $updatedmanpath]
}
if {$install_setbinpath eq {y}} {
lappend ans [list set PATH $updatedpath]
}
-if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y})} {
+if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y}) && $is_default_manpath_updated} {
lappend ans [list set MANPATH $updatedmanpath]
}
lappend ans [list set _LMFILES_ $modpath/setenv/1.0:$mp/source-sh/1]
@@ -1829,19 +1843,19 @@ setenv_var MODULES_COLLECTION_TARGET bar
if {$install_setbinpath eq {y}} {
setenv_var PATH $updatedpath
}
-if {$install_setmanpath eq {y}} {
+if {$install_setmanpath eq {y} && $is_default_manpath_updated} {
setenv_var MANPATH $updatedmanpath
}
setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|${lmsourceshpath}setenv\ MODULES_COLLECTION_TARGET\ bar\|setenv\ testsuite\ yes
set ans [list]
# MANPATH is set before PATH if the latter is appended and not the former
-if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n}} {
+if {$install_setmanpath eq {y} && $install_appendbinpath eq {y} && $install_appendmanpath eq {n} && $is_default_manpath_updated} {
lappend ans [list set MANPATH $default_manpath]
}
if {$install_setbinpath eq {y}} {
lappend ans [list set PATH $default_path]
}
-if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y})} {
+if {$install_setmanpath eq {y} && ($install_appendbinpath eq {n} || $install_appendmanpath eq {y}) && $is_default_manpath_updated} {
lappend ans [list set MANPATH $default_manpath]
}
lappend ans [list unset _LMFILES_]

@ -2,14 +2,22 @@
%global vimdatadir %{_datadir}/vim/vimfiles
Name: environment-modules
Version: 5.3.0
Release: 1%{?dist}
Version: 5.3.1
Release: 8%{?dist}
Summary: Provides dynamic modification of a user's environment
License: GPLv2+
License: GPL-2.0-or-later
URL: http://modules.sourceforge.net/
Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2
# fix source-sh test with non-default manpath (RHEL-62847)
# https://github.com/cea-hpc/modules/commit/a124745566804f8987a2c68944d395be10591f8c
Patch0: environment-modules-5.3.1-fix-source-sh-test.patch
# fix intermittent test failures (RHEL-62847)
# https://github.com/cea-hpc/modules/commit/8c757d59c068d7c41e78f59f575eca9d58785a36
Patch1: environment-modules-5.3.1-fix-intermittent-test-failures.patch
BuildRequires: tcl
BuildRequires: dejagnu
BuildRequires: make
@ -32,6 +40,9 @@ Requires(postun): %{_sbindir}/update-alternatives
Provides: environment(modules)
Obsoletes: environment-modules-compat <= 4.8.99
# Tcl linter is useful for module lint command
Recommends: nagelfar
%description
The Environment Modules package provides for the dynamic modification of
a user's environment via modulefiles.
@ -56,21 +67,25 @@ suite of different applications.
NOTE: You will need to get a new shell after installing this package to
have access to the module alias.
%prep
%autosetup -p1 -n modules-%{version}
%build
%configure --prefix=%{_datadir}/Modules \
--libdir=%{_libdir} \
--libdir=%{_libdir}/%{name} \
--etcdir=%{_sysconfdir}/%{name} \
--bindir=%{_datadir}/Modules/bin \
--libexecdir=%{_datadir}/Modules/libexec \
--mandir=%{_mandir} \
--vimdatadir=%{vimdatadir} \
--nagelfardatadir=%{_datadir}/Modules/nagelfar \
--with-bashcompletiondir=%{_datadir}/bash-completion/completions \
--with-fishcompletiondir=%{_datadir}/fish/vendor_completions.d \
--with-zshcompletiondir=%{_datadir}/zsh/site-functions \
--enable-multilib-support \
--disable-doc-install \
--disable-nagelfar-addons \
--enable-modulespath \
--with-python=/usr/bin/python3 \
--with-modulepath=%{_datadir}/Modules/modulefiles:%{_sysconfdir}/modulefiles:%{_datadir}/modulefiles \
@ -85,10 +100,12 @@ have access to the module alias.
mkdir -p %{buildroot}%{_sysconfdir}/modulefiles
mkdir -p %{buildroot}%{_datadir}/modulefiles
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
mkdir -p %{buildroot}%{_datadir}/fish/vendor_conf.d
mkdir -p %{buildroot}%{_bindir}
# setup for alternatives
touch %{buildroot}%{_sysconfdir}/profile.d/modules.{csh,sh}
touch %{buildroot}%{_datadir}/fish/vendor_conf.d/modules.fish
touch %{buildroot}%{_bindir}/modulecmd
# remove modulecmd wrapper as it will be handled by alternatives
rm -f %{buildroot}%{_datadir}/Modules/bin/modulecmd
@ -114,6 +131,7 @@ make test QUICKTEST=1
# Cleanup from pre-alternatives
[ ! -L %{_sysconfdir}/profile.d/modules.sh ] && rm -f %{_sysconfdir}/profile.d/modules.sh
[ ! -L %{_sysconfdir}/profile.d/modules.csh ] && rm -f %{_sysconfdir}/profile.d/modules.csh
[ ! -L %{_datadir}/fish/vendor_conf.d/modules.fish ] && rm -f %{_datadir}/fish/vendor_conf.d/modules.fish
[ ! -L %{_bindir}/modulecmd ] && rm -f %{_bindir}/modulecmd
# Migration from version 3.x to 4
@ -124,6 +142,7 @@ fi
%{_sbindir}/update-alternatives \
--install %{_sysconfdir}/profile.d/modules.sh modules.sh %{_datadir}/Modules/init/profile.sh 40 \
--slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/profile.csh \
--slave %{_datadir}/fish/vendor_conf.d/modules.fish modules.fish %{_datadir}/Modules/init/fish \
--slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd.tcl
%postun
@ -131,21 +150,33 @@ if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove modules.sh %{_datadir}/Modules/init/profile.sh
fi
%files
%license COPYING.GPLv2
%doc ChangeLog README NEWS.txt MIGRATING.txt INSTALL.txt CONTRIBUTING.txt changes.txt
%doc ChangeLog.gz README NEWS.txt MIGRATING.txt INSTALL.txt CONTRIBUTING.txt changes.txt
%{_sysconfdir}/modulefiles
%dir %{_datadir}/fish/vendor_conf.d
%ghost %{_sysconfdir}/profile.d/modules.csh
%ghost %{_sysconfdir}/profile.d/modules.sh
%ghost %{_datadir}/fish/vendor_conf.d/modules.fish
%ghost %{_bindir}/modulecmd
%{_bindir}/envml
%{_libdir}/libtclenvmodules.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libtclenvmodules.so
%dir %{_datadir}/Modules
%{_datadir}/Modules/bin
%dir %{_datadir}/Modules/libexec
%{_datadir}/Modules/libexec/modulecmd.tcl
%dir %{_datadir}/Modules/init
%{_datadir}/Modules/init/*
# do not need to require shell package as we "own" completion dir
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/module
%{_datadir}/bash-completion/completions/ml
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_module
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/module.fish
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/initrc
%config(noreplace) %{_sysconfdir}/%{name}/modulespath
@ -159,44 +190,96 @@ fi
%{vimdatadir}/ftdetect/modulefile.vim
%{vimdatadir}/ftplugin/modulefile.vim
%{vimdatadir}/syntax/modulefile.vim
%dir %{_datadir}/Modules/nagelfar
%{_datadir}/Modules/nagelfar/*
%changelog
* Wed May 17 2023 Lukáš Zaoral <lzaoral@redhat.com> - 5.3.0-1
- Rebase to environment-modules 5.3.0 (rhbz#2207885)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 5.3.1-8
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Sep 22 2022 Lukáš Zaoral <lzaoral@redhat.com> - 5.0.1-2
- Fix profile.sh login shell misdetection (#2128975)
* Tue Oct 29 2024 Lukáš Zaoral <lzaoral@redhat.com> - 5.3.1-7
- fix intermittent test failures (RHEL-62847)
* Mon Dec 6 2021 Lukáš Zaoral <lzaoral@redhat.com> - 5.0.1-1
- Update to 5.0.1 (#2004402)
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 5.3.1-6
- Rebuilt for MSVSphere 10
* Wed Sep 15 2021 Lukáš Zaoral <lzaoral@redhat.com> - 5.0.0-1
- Update to 5.0.0 (#2004402)
+ Based on spec by Xavier Delaruelle in Fedora Rawhide. Thanks a lot!
- Configuration guide example.txt is replaced by more up to date INSTALL.txt
document
* Wed Oct 16 2024 Lukáš Zaoral <lzaoral@redhat.com> - 5.3.1-6
- fix source-sh test with non-default manpath (RHEL-62847)
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.3.1-5
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 27 2023 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.3.1-1
- Update to 5.3.1 (#2217986)
- Distribute ChangeLog as a zipped file to reduce installation size
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.0.0-0.3.alpha
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Sat May 27 2023 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.3.0-2
- Install module initialization script for fish as configuration snippet for
this shell via alternatives (#2196379)
* Tue Aug 3 2021 Lukáš Zaoral <lzaoral@redhat.com> - 5.0.0-0.2.alpha
- Rebuilt for added gating.yaml. Related rhbz#1989523
* Mon May 15 2023 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.3.0-1
- Update to 5.3.0 (#2203629)
* Tue Aug 3 2021 Lukáš Zaoral <lzaoral@redhat.com> - 5.0.0-0.1.alpha
- Update to 5.0.0-alpha (#1989523)
+ Based on spec by Xavier Delaruelle in Fedora Rawhide. Thanks a lot!
* Tue Apr 11 2023 Lukáš Zaoral <lzaoral@redhat.com> - 5.2.0-3
- migrate to SPDX license format
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Nov 08 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.2.0-1
- Update to 5.2.0 (#2140892)
- Recommends Nagelfar Tcl syntax linter
- Add Nagelfar linter addons
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue May 31 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.1.1-1
- Update to 5.1.1 (#2092100)
- Move libtclenvmodules in an environment-modules directory under libdir
* Sat Apr 30 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.1.0-1
- Update to 5.1.0 (#2080577)
- Install shell completion scripts in system-wide shell-specific locations
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Oct 16 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.0.1-1
- Update to 5.0.1 (#2014796)
* Sun Sep 12 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.0.0-1
- Update to 5.0.0
- Configuration guide example.txt is replaced by more up to date INSTALL.txt
document
* Sun Jul 25 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.0.0-0.1.alpha
- Update to 5.0.0-alpha
- Remove createmodule.sh and createmodule.py utilities ('module sh-to-mod'
should be used instead)
- Remove configure options that have been made default starting version 5.0
- Remove compat subpackage
- Run non-regression tests in quick mode
* Wed May 19 2021 Joe Orton <jorton@redhat.com> - 4.7.0-3
- add bcond for compat subpackage (#1940568)
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jul 14 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.8.0-1
- Update to 4.8.0 (#1982175)
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 4.7.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Apr 6 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.7.1-1
- Update to 4.7.1 (#1946442)
* Fri Feb 19 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.7.0-1
- Update to 4.7.0 (#1930632)

Loading…
Cancel
Save