From aa760812ce353a8c3fefebce82dc0a374e7a5637b8b60cc4c1e360879ac7ba14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Thu, 25 Feb 2021 20:40:49 +0000 Subject: [PATCH 1/2] Accepting request 874078 from home:phiwag:branches:systemsmanagement Update to 4.7.0, add fish support, and clean up spec file OBS-URL: https://build.opensuse.org/request/show/874078 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/Modules?expand=0&rev=29 --- Modules.changes | 24 +++- Modules.spec | 119 +++++++++++-------- _service | 4 + _service:download_files:modules-4.7.0.tar.gz | 3 + modules-4.5.0.tar.gz | 3 - 5 files changed, 94 insertions(+), 59 deletions(-) create mode 100644 _service create mode 100644 _service:download_files:modules-4.7.0.tar.gz delete mode 100644 modules-4.5.0.tar.gz diff --git a/Modules.changes b/Modules.changes index 4e9ce1c..a0524ab 100644 --- a/Modules.changes +++ b/Modules.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +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 @@ -14,9 +29,9 @@ Fri May 15 05:39:32 UTC 2020 - Egbert Eich ------------------------------------------------------------------- Tue Apr 17 11:13:53 UTC 2018 - boris@steki.net -- rolled back change from /usr/share/Modules (package name) to old +- rolled back change from /usr/share/Modules (package name) to old expected behavior /usr/share/modules -- fixed redhat/fedora builds +- fixed redhat/fedora builds ------------------------------------------------------------------- Mon Apr 16 19:24:51 UTC 2018 - boris@steki.net @@ -87,7 +102,7 @@ Mon Sep 10 08:30:51 UTC 2012 - kkaempf@suse.com ------------------------------------------------------------------- Wed Aug 29 20:11:14 UTC 2012 - alinm.elena@gmail.com -- update to 3.2.9c +- 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. @@ -96,7 +111,7 @@ Wed Aug 29 20:11:14 UTC 2012 - alinm.elena@gmail.com * 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 +- make module files from /etc %config ------------------------------------------------------------------- Thu Dec 1 11:19:55 UTC 2011 - coolo@suse.com @@ -182,4 +197,3 @@ Wed Jun 6 19:07:27 CEST 2001 - nashif@suse.de 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 index 7a9c6d3..d25d6af 100644 --- a/Modules.spec +++ b/Modules.spec @@ -1,7 +1,7 @@ # # spec file for package Modules # -# Copyright (c) 2020 SUSE LLC +# 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 @@ -18,13 +18,11 @@ Name: Modules BuildRequires: automake -BuildRequires: fdupes BuildRequires: less BuildRequires: procps BuildRequires: tcl-devel -# xorg-x11-devel URL: http://modules.sourceforge.net/ -Version: 4.5.0 +Version: 4.7.0 Release: 0 Summary: Change environment at runtime License: BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later @@ -44,33 +42,52 @@ BuildRequires: perl(Exporter) %endif %description -The Modules package provides for dynamic modification of a user's -environment with module files. Each module file contains the -information needed to configure the shell for an application. Once the -package is initialized, the environment can be modified dynamically on -a per-module basis using the module command that interprets module -files. Typically, module files instruct the module command to alter or -set shell environment variables, such as PATH or MANPATH. Module files -may be shared by many users on a system and users may have their own -collection to supplement or replace the shared module files. The -modules environment is common on SGI/Crays and many workstation farms. +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 Change environment at runtime +Summary: Documentation for Environment Modules Group: Documentation/Other BuildArch: noarch %description doc -The Modules package provides for dynamic modification of a user's -environment with module files. Each module file contains the -information needed to configure the shell for an application. Once the -package is initialized, the environment can be modified dynamically on -a per-module basis using the module command that interprets module -files. Typically, module files instruct the module command to alter or -set shell environment variables, such as PATH or MANPATH. Module files -may be shared by many users on a system and users may have their own -collection to supplement or replace the shared module files. The -modules environment is common on SGI/Crays and many workstation farms. +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 @@ -83,22 +100,21 @@ modules environment is common on SGI/Crays and many workstation farms. sed -i 's@/usr/bin/env bash@/bin/bash@' script/envml %build -CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE" \ ./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} \ - --without-x \ - %{?!vimdatadir: --disable-vim-addons} \ - %{?vimdatadir: --vimdatadir=%{vimdatadir}} \ - --etcdir=%{_sysconfdir}/%{name} \ - --libdir=%{_libdir}/%{name} + --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 make %{?_smp_mflags} %install @@ -107,19 +123,13 @@ 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} -%post -[ -e %{_sysconfdir}/profiles.d/modules.sh ] || \ - ln -sf %{_datadir}/Modules/init/profile.sh %{_sysconfdir}/profile.d/modules.sh -[ -e %{_sysconfdir}/profiles.d/modules.sh ] || \ - ln -sf %{_datadir}/Modules/init/profile.csh %{_sysconfdir}/profile.d/modules.csh +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 -%postun -[ -e %{_sysconfdir}/profiles.d/modules.sh ] || \ - rm -f %{_sysconfdir}/profile.d/modules.sh -[ -e %{_sysconfdir}/profiles.d/modules.csh ] || \ - rm -f %{_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) @@ -145,6 +155,13 @@ mv %{buildroot}/usr/share/doc doc_dir %{_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) diff --git a/_service b/_service new file mode 100644 index 0000000..e1612ad --- /dev/null +++ b/_service @@ -0,0 +1,4 @@ + + + + diff --git a/_service:download_files:modules-4.7.0.tar.gz b/_service:download_files:modules-4.7.0.tar.gz new file mode 100644 index 0000000..981af67 --- /dev/null +++ b/_service:download_files:modules-4.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ab0a649e23b4dd00963e4cae60e573b449194ecb4035c5ce487330b272b4d06 +size 2073600 diff --git a/modules-4.5.0.tar.gz b/modules-4.5.0.tar.gz deleted file mode 100644 index 3b52e79..0000000 --- a/modules-4.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f46336f612553af5553d99347f387f733de0aaa0d80d4572e67615289382ec8 -size 1849421 From e4df3f4459bd727f718b032acde7c84c725c6506a5ebde1de0b50f40dd85793b Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 29 Mar 2021 12:02:18 +0000 Subject: [PATCH 2/2] Accepting request 880611 from home:phiwag:branches:systemsmanagement - 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. OBS-URL: https://build.opensuse.org/request/show/880611 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/Modules?expand=0&rev=30 --- Modules.changes | 10 ++++++++++ Modules.spec | 7 +++++-- _service | 2 +- ..._files:modules-4.7.0.tar.gz => modules-4.7.0.tar.gz | 0 4 files changed, 16 insertions(+), 3 deletions(-) rename _service:download_files:modules-4.7.0.tar.gz => modules-4.7.0.tar.gz (100%) diff --git a/Modules.changes b/Modules.changes index a0524ab..4c5d4bc 100644 --- a/Modules.changes +++ b/Modules.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +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 diff --git a/Modules.spec b/Modules.spec index d25d6af..cca0b94 100644 --- a/Modules.spec +++ b/Modules.spec @@ -18,6 +18,7 @@ Name: Modules BuildRequires: automake +BuildRequires: fdupes BuildRequires: less BuildRequires: procps BuildRequires: tcl-devel @@ -27,6 +28,7 @@ Release: 0 Summary: Change environment at runtime License: BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-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 @@ -62,7 +64,6 @@ 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 @@ -114,7 +115,8 @@ sed -i 's@/usr/bin/env bash@/bin/bash@' script/envml %{?vimdatadir: --vimdatadir=%{vimdatadir}} \ --etcdir=%{_sysconfdir}/%{name} \ --libdir=%{_libdir}/%{name} \ - --enable-compat-version + --enable-compat-version \ + --with-python=/usr/bin/python3 make %{?_smp_mflags} %install @@ -123,6 +125,7 @@ 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 diff --git a/_service b/_service index e1612ad..595d83c 100644 --- a/_service +++ b/_service @@ -1,4 +1,4 @@ - + diff --git a/_service:download_files:modules-4.7.0.tar.gz b/modules-4.7.0.tar.gz similarity index 100% rename from _service:download_files:modules-4.7.0.tar.gz rename to modules-4.7.0.tar.gz