From 049fb9b0e90391c6c732249ff93e2319727ec7c8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 5 Mar 2008 20:06:24 +0000 Subject: [PATCH] - Add patch to fix extraneous version path entry properly - Use --with-module-path to point to /etc/modulefiles for local modules, this also fixes bug #436041 --- environment-modules.spec | 16 +++++++++++++--- modules-3.2.6-versioning.patch | 9 +++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 modules-3.2.6-versioning.patch diff --git a/environment-modules.spec b/environment-modules.spec index fa5f3ad..6e0600b 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -1,12 +1,13 @@ Name: environment-modules Version: 3.2.6 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base License: GPLv2+ URL: http://modules.sourceforge.net/ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2 +Patch0: modules-3.2.6-versioning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: tcl-devel, tclx-devel @@ -35,12 +36,14 @@ suite of different applications. %prep %setup -q -n modules-%{version} +%patch -p1 -b .versioning %build %configure --disable-versioning --prefix=%{_datadir} \ --exec-prefix=%{_datadir}/Modules \ - --with-version-path=%{_datadir}/Modules/modulefiles + --with-module-path=%{_sysconfdir}/modulefiles +# --with-debug=42 --with-log-facility-debug=stderr make %{?_smp_mflags} @@ -50,6 +53,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d ln -s %{_datadir}/Modules/init/bash $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/modules.sh ln -s %{_datadir}/Modules/init/csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/modules.csh +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modulefiles %clean @@ -59,6 +63,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.GPL README TODO +%{_sysconfdir}/modulefiles %{_sysconfdir}/profile.d/* %{_bindir}/modulecmd %{_datadir}/Modules/ @@ -67,7 +72,12 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Sat Feb 9 2008 - Orion Poplawski - 3.2.6-2 +* Wed Mar 5 2008 - Orion Poplawski - 3.2.6-4 +- Add patch to fix extraneous version path entry properly +- Use --with-module-path to point to /etc/modulefiles for local modules, + this also fixes bug #436041 + +* Sat Feb 9 2008 - Orion Poplawski - 3.2.6-3 - Rebuild for gcc 3.4 * Thu Jan 03 2008 - Alex Lancaster - 3.2.6-2 diff --git a/modules-3.2.6-versioning.patch b/modules-3.2.6-versioning.patch new file mode 100644 index 0000000..975a13b --- /dev/null +++ b/modules-3.2.6-versioning.patch @@ -0,0 +1,9 @@ +--- modules-3.2.6/modulefiles/modules.in.versioning 2007-03-25 08:24:51.000000000 -0600 ++++ modules-3.2.6/modulefiles/modules.in 2008-03-05 10:32:38.000000000 -0700 +@@ -24,5 +24,5 @@ + prepend-path PATH $modroot/bin + prepend-path MANPATH $modroot/share/man + +-module use @VERSIONPATH@ ++@VERSIONING@module use @VERSIONPATH@ +