diff --git a/Modules.changes b/Modules.changes index dd02483..4e9ce1c 100644 --- a/Modules.changes +++ b/Modules.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +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 diff --git a/Modules.spec b/Modules.spec index c487aa5..7a9c6d3 100644 --- a/Modules.spec +++ b/Modules.spec @@ -1,7 +1,7 @@ # # spec file for package Modules # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,31 +12,28 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: Modules BuildRequires: automake +BuildRequires: fdupes BuildRequires: less BuildRequires: procps BuildRequires: tcl-devel # xorg-x11-devel -Url: http://modules.sourceforge.net/ -Version: 4.1.2 +URL: http://modules.sourceforge.net/ +Version: 4.5.0 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: tcl Source: https://download.sourceforge.net/project/modules/Modules/modules-%{version}/modules-%{version}.tar.gz -# PATCH-FIX-UPSTREAM modules-4.1.2-return.patch -Patch1: modules-4.1.2-return.patch -# PATCH-FIX-UPSTREAM modules-4.1.2-fix-bashisms.patch -Patch2: modules-4.1.2-fix-bashisms.patch +Patch1: Remove-empty-unused-static-function.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: environment-modules -Obsoletes: environment-modules < %{version} %if 0%{?suse_version} Recommends: %{name}-doc %endif @@ -75,11 +72,15 @@ 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. +%define vimdatadir %{_datadir}/vim/site + %prep %setup -q -n modules-%{version} -%patch1 -%patch2 -sed -i 's@/usr/bin/env bash@/bin/bash@' contrib/envml +%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 CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE" \ @@ -93,15 +94,32 @@ CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DUSE_INTERP_RESULT -DUSE_INTERP_ERR --with-etc-path="%_sysconfdir" \ --with-skel-path="%_sysconfdir/skel" \ --with-tcl=%{_libdir} \ - --without-x -make + --without-x \ + %{?!vimdatadir: --disable-vim-addons} \ + %{?vimdatadir: --vimdatadir=%{vimdatadir}} \ + --etcdir=%{_sysconfdir}/%{name} \ + --libdir=%{_libdir}/%{name} +make %{?_smp_mflags} %install -install -d $RPM_BUILD_ROOT/usr/share/modules -install -d $RPM_BUILD_ROOT/etc/profile.d -make DESTDIR=$RPM_BUILD_ROOT install -install -d $RPM_BUILD_ROOT/usr/bin -mv $RPM_BUILD_ROOT/usr/share/doc doc_dir +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} + +%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 + +%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 %files %defattr(-,root,root) @@ -109,15 +127,21 @@ mv $RPM_BUILD_ROOT/usr/share/doc doc_dir %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* diff --git a/Remove-empty-unused-static-function.patch b/Remove-empty-unused-static-function.patch new file mode 100644 index 0000000..8992c95 --- /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/modules-4.1.2-fix-bashisms.patch b/modules-4.1.2-fix-bashisms.patch deleted file mode 100644 index 36a860b..0000000 --- a/modules-4.1.2-fix-bashisms.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: compat/etc/add.modules.in -=================================================================== ---- compat/etc/add.modules.in.orig 2018-03-31 18:22:47.000000000 +0200 -+++ compat/etc/add.modules.in 2018-04-16 21:28:35.703722251 +0200 -@@ -114,7 +114,7 @@ fi - findload $1.old - /bin/cat > $1 <