From d5b195817d294bb802724a2414e173b87799287b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 14 Oct 2024 13:46:43 +0200 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 Modules revision 49eb52e1f06fc6cbb9272cd4730c4c9f --- .gitattributes | 23 ++ Modules.changes | 246 ++++++++++++++++++++++ Modules.spec | 174 +++++++++++++++ Remove-empty-unused-static-function.patch | 25 +++ _service | 4 + modules-4.8.0.tar.gz | 3 + 6 files changed, 475 insertions(+) create mode 100644 .gitattributes create mode 100644 Modules.changes create mode 100644 Modules.spec create mode 100644 Remove-empty-unused-static-function.patch create mode 100644 _service create mode 100644 modules-4.8.0.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/Modules.changes b/Modules.changes new file mode 100644 index 0000000..41ba235 --- /dev/null +++ b/Modules.changes @@ -0,0 +1,246 @@ +------------------------------------------------------------------- +Sat Jul 31 16:52:07 UTC 2021 - Philipp Wagner + +- Update to upstream version 4.8.0 + See https://modules.readthedocs.io/en/latest/NEWS.html#modules-4-8-0-2021-07-14 + for a list of changes. + +------------------------------------------------------------------- +Thu May 6 15:40:13 UTC 2021 - Philipp Wagner + +- Update to upstream version 4.7.1 + * Doc: clarify the license terms used by the project. (fix issue #389) + * Align all files from the Modules project under the GPLv2+ license. + Scripts and libraries that were previously licensed with GPLv3+ have + been moved to GPLv2+ with the consent of their respective copyright + holders. (fix issue #389) + * Revert "Install: have configure script assume the . dot directory + when invoked without the prepended ./" as consent was not obtained + from author to relicense the contribution to GPLv2+. + * Doc: fixes few typos in module(1) and modulefile(4). + * Update the sh-to-mod mechanism to support version 3.2 of the fish + shell. Fish 3.2 introduces the . builtin command that should be + regexp-escaped when determining the shell functions or aliases + defined by the script analyzed by sh-to-mod. + * Vim: update addon files to highlight modulefile variables ModuleTool, + ModuleToolVersion and ModulesCurrentModulefile. + * Doc: update the description and default value of the + --with-dark-background-colors and --with-light-background-colors + installation options. + * Doc: add description of changes that occurred on versions 4.6 and 4.7 + for the --with-dark-background-colors and --with-light-background-colors + installation options and for the MODULES_COLORS environment variable. + * Doc: correct the default value of the --with-tag-abbrev installation + option. + * Doc: add Sticky modules cookbook recipe. +- Correct package license to GPLv2+, matching upstream. + +------------------------------------------------------------------- +Mon Mar 22 18:48:48 UTC 2021 - Philipp Wagner + +- Mark the download service as disabled to meet factory submission + guidelines. +- Add a runtime dependency on Python for createmodule.py script. +- Set /usr/bin/python3 as interpreter for all Python scripts (instead + of relying on /usr/bin/env, which is used by default). +- Add fdupes back to solve rpmlint warning. + +------------------------------------------------------------------- +Sat Feb 20 23:27:43 UTC 2021 - Philipp Wagner + +- Update to version 4.7.0 + Check https://github.com/cea-hpc/modules/releases/tag/v4.7.0 + for details. +- Mark sh and csh module initialization scripts installed into + /etc/profile.d as managed by this package by moving the symlinking + to the %install section. +- Support fish (shell completion and functionality). +- Use a source service instead of manually adding the source tarball. +- Clean up spec file to remove unused code (e.g. CFLAGS which aren't + used in the source code any more, since it's all TCL now). +- Update description to match the current description on the homepage. + +------------------------------------------------------------------- +Fri May 15 05:39:32 UTC 2020 - Egbert Eich + +- Update to version 4.5.0 + Check https://github.com/cea-hpc/modules/releases/tag/v4.5.0 + for details. +- Install profile script to set aliases (boo#1100410) +- Add: Remove-empty-unused-static-function.patch + replaces: modules-4.1.2-return.patch +- Remove: modules-4.1.2-fix-bashisms.patch + BOGUS: applied to a csh context. +- Install .vim files to /usr/share/vim/site. + +------------------------------------------------------------------- +Tue Apr 17 11:13:53 UTC 2018 - boris@steki.net + +- rolled back change from /usr/share/Modules (package name) to old + expected behavior /usr/share/modules +- fixed redhat/fedora builds + +------------------------------------------------------------------- +Mon Apr 16 19:24:51 UTC 2018 - boris@steki.net + +- too many changes to put into changelog please read Changelog in + /usr/share/doc/packages/Modules-doc/ChangeLog (installed from + Modules-doc package) +- removed return.patch +- removed share.patch +- reworked return.patch and renamed to modules-4.1.2-return.patch +- reworked fixing-bashisms patch for current version + renamed modules-3.2.10-fix-bashisms.patch to modules-4.1.2-fix-bashisms.patch + +------------------------------------------------------------------- +Sun Nov 16 20:50:00 UTC 2014 - Led + +- fix bashism in add.modules script +- add patches: + * modules-3.2.10-fix-bashisms.patch + +------------------------------------------------------------------- +Tue Aug 26 10:50:58 UTC 2014 - jengelh@inai.de + +- Resolve build failure with automake-1.14 +- Use some RPM macros instead of hardcoded paths; + remove redundant %clean section + +------------------------------------------------------------------- +Thu Aug 1 14:50:06 UTC 2013 - max@suse.com + +- Set -DUSE_INTERP_RESULT and -DUSE_INTERP_ERRORLINE" to fix build + with Tcl 8.6. + +------------------------------------------------------------------- +Mon Feb 4 09:06:23 UTC 2013 - coolo@suse.com + +- update license to new format + +------------------------------------------------------------------- +Fri Dec 21 09:00:00 UTC 2012 - kkaempf@suse.com + +- update to 3.2.10 + * Fixed the module switch with custom delimiters (Tyson Whitehead) + * If a bash shell check if interactive or not for alias/functions + * Fix the flags with regards to recursive load/unload + * Fix perl.pm init file typo (bug 3497092) + * Moved from cvs to git (and now: modulefile/module-git) + * Fix the module swap with the --delim option (Tyson Whitehead) + * Increased the "update" buffer (Leon Kos) + * Use the locale for sorting modulefiles by the avail command + * Fixed the segfault problem with Tcl_RegExpCompile() (Kenneth Hoste, + Tyson Whitehead) + * Updated the FSF address in LICENSE.GPL (Jan Synacek) + * Forked the Tcl-only version to be maintained by Kent Mein. + * Added the "module-info type" query to return 'C' to indicate that + the modulecmd executable is the "C" version. + (The Tcl-only version will return 'Tcl'.) + * Search /usr/lib64 for tclConfig.sh also (Jan Synacek) + * Tested loading 20 other modulefiles from a single one + * Have ChangeLog generated by a script due to Marcus D. Hanwell + +------------------------------------------------------------------- +Mon Sep 10 08:30:51 UTC 2012 - kkaempf@suse.com + +- complete the move from /usr/Modules to /usr/share/Modules + (bnc#778525) + +------------------------------------------------------------------- +Wed Aug 29 20:11:14 UTC 2012 - alinm.elena@gmail.com + +- update to 3.2.9c + * Fix the coexistence of load/remove flags (Martin Siegert) + * Fixed an overlapping string copy (Wilson Snyder & Orion Poplawski) + * Isolated calls to the new interpreter and get & set env.vars. + * Crucial bug fix of same by (Orion Poplawski). + * Optionally use Tcl memory check routines for malloc/realloc. + * Fixed the "module purge" memory corruption (Poor Yorick) + * Added support for Ruby (Tammo Tjarks) +- replace defaut in the profile files with the proper version +- make module files from /etc %config + +------------------------------------------------------------------- +Thu Dec 1 11:19:55 UTC 2011 - coolo@suse.com + +- add automake as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Tue Oct 18 12:56:41 UTC 2011 - kkaempf@suse.com + +- move /usr/Modules to /usr/share/Modules for FHS 2.2 + +------------------------------------------------------------------- +Tue Oct 18 09:44:17 UTC 2011 - kkaempf@suse.com + +- update to 3.2.8a + * switched to 3.2 release + * lots of changes and bugfixes + * see NEWS for details + +------------------------------------------------------------------- +Wed Jan 25 21:33:43 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Fri Jan 20 21:45:38 CET 2006 - mrueckert@suse.de + +- Remove temporary files if they are no longer used. + (#73973,#144398) + +------------------------------------------------------------------- +Tue Jan 17 16:08:56 CET 2006 - mrueckert@suse.de + +- fix version path so modules find its configs again + +------------------------------------------------------------------- +Mon Sep 13 19:35:50 CEST 2004 - nashif@suse.de + +- Fixed trap call in profile.d script (#45056) + +------------------------------------------------------------------- +Thu Sep 2 18:15:43 CEST 2004 - nashif@suse.de + +- #43781: Fixed segfault, verify tmp file was created. + +------------------------------------------------------------------- +Sat Aug 14 19:20:51 CEST 2004 - nashif@suse.de + +- Renamed package +- Fixed mkstemp (#43781) + +------------------------------------------------------------------- +Sat Apr 24 20:22:16 CEST 2004 - nashif@suse.de + +- Added -fno-strict-aliasing to CFLAGS + +------------------------------------------------------------------- +Sat Jan 10 18:25:58 CET 2004 - adrian@suse.de + +- use x-devel-packages + +------------------------------------------------------------------- +Sat May 17 17:12:39 CEST 2003 - nashif@suse.de + +- Fixed file list in spec file + +------------------------------------------------------------------- +Tue Aug 6 02:17:43 CEST 2002 - nashif@suse.de + +- fixed sourcing of global configuration file + +------------------------------------------------------------------- +Mon Feb 11 13:39:35 CET 2002 - nashif@suse.de + +- new version: 3.1.6 + +------------------------------------------------------------------- +Wed Jun 6 19:07:27 CEST 2001 - nashif@suse.de + +- Fixed configure.in + +------------------------------------------------------------------- +Mon Feb 19 07:25:27 MET 2001 - nashif@suse.de + +- Initial Release (Version 3.1.1) diff --git a/Modules.spec b/Modules.spec new file mode 100644 index 0000000..08cb2c8 --- /dev/null +++ b/Modules.spec @@ -0,0 +1,174 @@ +# +# spec file for package Modules +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: Modules +BuildRequires: automake +BuildRequires: fdupes +BuildRequires: less +BuildRequires: procps +BuildRequires: tcl-devel +URL: http://modules.sourceforge.net/ +Version: 4.8.0 +Release: 0 +Summary: Change environment at runtime +License: GPL-2.0-or-later +Group: System/Management +Requires: python3 +Requires: tcl +Source: https://download.sourceforge.net/project/modules/Modules/modules-%{version}/modules-%{version}.tar.gz +Patch1: Remove-empty-unused-static-function.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: environment-modules +%if 0%{?suse_version} +Recommends: %{name}-doc +%endif + +%if 0%{?rhel_version} || 0%{?fedora_version} +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(Exporter) +%endif + +%description +The Modules package is a tool that simplify shell initialization and lets +users easily modify their environment during the session with modulefiles. + +Each modulefile contains the information needed to configure the shell for an +application. Once the Modules package is initialized, the environment can be +modified on a per-module basis using the module command which interprets +modulefiles. Typically modulefiles instruct the module command to alter or set +shell environment variables such as PATH, MANPATH, etc. modulefiles may be +shared by many users on a system and users may have their own collection to +supplement or replace the shared modulefiles. + +Modules can be loaded and unloaded dynamically and atomically, in an clean +fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, +tcsh, fish, as well as some scripting languages such as tcl, perl, python, +ruby, cmake and r. + +Modules are useful in managing different versions of applications. Modules can +also be bundled into metamodules that will load an entire suite of different +applications. + +%package doc +Summary: Documentation for Environment Modules +Group: Documentation/Other +BuildArch: noarch + +%description doc +The Modules package is a tool that simplify shell initialization and lets +users easily modify their environment during the session with modulefiles. + +Each modulefile contains the information needed to configure the shell for an +application. Once the Modules package is initialized, the environment can be +modified on a per-module basis using the module command which interprets +modulefiles. Typically modulefiles instruct the module command to alter or set +shell environment variables such as PATH, MANPATH, etc. modulefiles may be +shared by many users on a system and users may have their own collection to +supplement or replace the shared modulefiles. + +Modules can be loaded and unloaded dynamically and atomically, in an clean +fashion. All popular shells are supported, including bash, ksh, zsh, sh, csh, +tcsh, fish, as well as some scripting languages such as tcl, perl, python, +ruby, cmake and r. + +Modules are useful in managing different versions of applications. Modules can +also be bundled into metamodules that will load an entire suite of different +applications. + +%define vimdatadir %{_datadir}/vim/site + +%prep +%setup -q -n modules-%{version} +%patch1 -p1 +# This is debatable: +# if the replace 'bash' consecutive calls to 'modules' would still +# run with the original bash. Maybe not intended. +sed -i 's@/usr/bin/env bash@/bin/bash@' script/envml + +%build +./configure \ + --initdir="%{_datadir}/%name/init" \ + --libexecdir="%{_prefix}/%_lib/%{name}/" \ + --prefix="%_prefix" \ + --with-version-path="%_datadir/%{name}" \ + --modulefilesdir="%{_datadir}/modules" \ + --mandir=%{_mandir} \ + --with-etc-path="%_sysconfdir" \ + --with-skel-path="%_sysconfdir/skel" \ + --with-tcl=%{_libdir} \ + %{?!vimdatadir: --disable-vim-addons} \ + %{?vimdatadir: --vimdatadir=%{vimdatadir}} \ + --etcdir=%{_sysconfdir}/%{name} \ + --libdir=%{_libdir}/%{name} \ + --enable-compat-version \ + --with-python=/usr/bin/python3 +make %{?_smp_mflags} + +%install +install -d %{buildroot}/usr/share/modules +install -d %{buildroot}/etc/profile.d +make DESTDIR=%{buildroot} install +install -d %{buildroot}/usr/bin +mv %{buildroot}/usr/share/doc doc_dir +%fdupes -s %{buildroot}%{_datadir} + +ln -sf %{_datadir}/Modules/init/profile.sh %{buildroot}%{_sysconfdir}/profile.d/modules.sh +ln -sf %{_datadir}/Modules/init/profile.csh %{buildroot}%{_sysconfdir}/profile.d/modules.csh + +mkdir -p %{buildroot}%{_datadir}/fish/{vendor_completions.d,vendor_functions.d} +ln -sf %{_datadir}/Modules/init/fish_completion %{buildroot}%{_datadir}/fish/vendor_completions.d/module.fish +ln -sf %{_datadir}/Modules/init/fish %{buildroot}%{_datadir}/fish/vendor_functions.d/module.fish + +%files +%defattr(-,root,root) +%doc doc_dir/README +%dir %{_libdir}/%{name} +%dir %{_datadir}/%{name} +%dir %{_datadir}/modules +%config %{_sysconfdir}/%{name} +%{_bindir}/add.modules +%{_bindir}/envml +%{_bindir}/mkroot +%{_bindir}/modulecmd +%{_bindir}/createmodule.py +%{_datadir}/%{name}/init +%{?vimdatadir:%dir %{dirname:%{?vimdatadir}}} +%{?vimdatadir} +%{_libdir}/%{name}/modulecmd-compat +%{_libdir}/%{name}/modulecmd.tcl +%{_libdir}/%{name}/libtclenvmodules.so +%{_datadir}/modules/* +%{_mandir}/man1/module-compat.1* +%{_mandir}/man1/ml.1* +%{_mandir}/man1/module.1* +%{_mandir}/man4/modulefile-compat.4* +%{_mandir}/man4/modulefile.4* +%{_sysconfdir}/profile.d/modules.sh +%{_sysconfdir}/profile.d/modules.csh +%dir %{_datadir}/fish/ +%dir %{_datadir}/fish/vendor_completions.d/ +%{_datadir}/fish/vendor_completions.d/module.fish +%dir %{_datadir}/fish/vendor_functions.d/ +%{_datadir}/fish/vendor_functions.d/module.fish + +%files doc +%defattr(-,root,root) +%doc doc_dir/COPYING.GPLv2 doc_dir/ChangeLog doc_dir/ChangeLog-compat doc_dir/INSTALL.txt doc_dir/example.txt +%doc doc_dir/MIGRATING.txt doc_dir/NEWS-compat doc_dir/NEWS.txt doc_dir/README doc_dir/diff_v3_v4.txt + +%changelog diff --git a/Remove-empty-unused-static-function.patch b/Remove-empty-unused-static-function.patch new file mode 100644 index 0000000..de9e81b --- /dev/null +++ b/Remove-empty-unused-static-function.patch @@ -0,0 +1,25 @@ +From: Egbert Eich +Date: Fri May 15 07:36:22 2020 +0200 +Subject: Remove empty unused static function +Patch-mainline: never +Git-commit: 44da66e04ab8b6d7df463ecd4263b0c54899d9c4 +References: + +Signed-off-by: Egbert Eich +--- + compat/ModuleCmd_Avail.c | 3 --- + 1 file changed, 3 deletions(-) +diff --git a/compat/ModuleCmd_Avail.c b/compat/ModuleCmd_Avail.c +index 6aca17f..2487a20 100644 +--- a/compat/ModuleCmd_Avail.c ++++ b/compat/ModuleCmd_Avail.c +@@ -688,9 +688,6 @@ static int check_cache( char *dir) + #endif + + +-static int test_version_dir( struct dirent *dp) +-{ +-} + /*++++ + ** ** Function-Header ***************************************************** ** + ** ** diff --git a/_service b/_service new file mode 100644 index 0000000..a36efb1 --- /dev/null +++ b/_service @@ -0,0 +1,4 @@ + + + + diff --git a/modules-4.8.0.tar.gz b/modules-4.8.0.tar.gz new file mode 100644 index 0000000..f33698e --- /dev/null +++ b/modules-4.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6b45cadc2146ed5e0b25a96d44643ad516054eb7745acb14a1dc7bf30744f6e +size 2171216