SHA256
1
0
forked from pool/Modules

Accepting request 807026 from home:eeich:branches:systemsmanagement

- 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.

OBS-URL: https://build.opensuse.org/request/show/807026
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/Modules?expand=0&rev=27
This commit is contained in:
Anna Maresova 2020-05-20 08:37:38 +00:00 committed by Git OBS Bridge
parent 572e24bda7
commit 9a95ca76a8
7 changed files with 84 additions and 47 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri May 15 05:39:32 UTC 2020 - Egbert Eich <eich@suse.com>
- 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

View File

@ -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*

View File

@ -0,0 +1,25 @@
From: Egbert Eich <eich@suse.com>
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 <eich@suse.com>
---
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 ***************************************************** **
** **

View File

@ -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 <<!
if ( -e $ETC/csh.modules ) then
- source $ETC/csh.modules
+ . $ETC/csh.modules
# put your own module loads here
!
if [ -s /tmp/load.$$ ]

View File

@ -1,12 +0,0 @@
Index: compat/ModuleCmd_Avail.c
===================================================================
--- compat/ModuleCmd_Avail.c.orig 2018-03-31 18:22:47.000000000 +0200
+++ compat/ModuleCmd_Avail.c 2018-04-16 21:08:24.521845828 +0200
@@ -690,6 +690,7 @@ static int check_cache( char *dir)
static int test_version_dir( struct dirent *dp)
{
+ return 0;
}
/*++++
** ** Function-Header ***************************************************** **

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1f54f639d1946aa1d7ae8ae03752f8ac464a879c14bc35e63b6a87b8a0b7522
size 1356846

3
modules-4.5.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5f46336f612553af5553d99347f387f733de0aaa0d80d4572e67615289382ec8
size 1849421