rpms/environment-modules/EL-5 createmodule.sh, NONE, 1.1 environment-modules-3.2.7-bindir.patch, NONE, 1.1 environment-modules-3.2.7-manpath.patch, NONE, 1.1 import.log, NONE, 1.1 modules.sh, NONE, 1.1 .cvsignore, 1.8, 1.9 environment-modules.spec, 1.11, 1.12 sources, 1.8, 1.9 modules-3.2.6-versioning.patch, 1.1, NONE
Orion Poplawski
orion at fedoraproject.org
Tue Mar 2 16:59:10 UTC 2010
Author: orion
Update of /cvs/pkgs/rpms/environment-modules/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22121/EL-5
Modified Files:
.cvsignore environment-modules.spec sources
Added Files:
createmodule.sh environment-modules-3.2.7-bindir.patch
environment-modules-3.2.7-manpath.patch import.log modules.sh
Removed Files:
modules-3.2.6-versioning.patch
Log Message:
Sync to devel
--- NEW FILE createmodule.sh ---
#!/bin/bash
#
# createmodule.sh - Takes the name of a environment init script and
# produces a modulefile that duplicates the changes made by the init script
#
# Copyright (C) 2010 by Orion E. Poplawski
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if [ -z "$1" ]
then
echo "usage: $0 <initscript> [args]" 1>&2
exit 1
fi
#Will print out array assignment list
printenvarray () {
env | while read x
do
key=${x%%=*}
value=${x#*=}
echo [$key]="'$value'"
done
}
#Apparently we need to declare the associative arrays
declare -A env1 env2
#Record starting environment
eval env1=(`printenvarray`)
#Source the environment script
. "$@"
#Record ending environment
eval env2=(`printenvarray`)
#Print out the modulefile
echo "#%Module 1.0"
#Keys that changed
for key in "${!env1[@]}"
do
if [ "${env1[$key]}" != "${env2[$key]}" ]
then
#Working directory change
if [ "$key" = PWD ]
then
echo -e "chdir\t\t${env2[PWD]}"
#Test for delete
elif [ -z "${env2[$key]}" ]
then
echo -e "unsetenv\t${key}\t${env2[$key]}"
#Test for prepend
elif [ "${env2[$key]%${env1[$key]}}" != "${env2[$key]}" ]
then
added="${env2[$key]%${env1[$key]}}"
echo -e "prepend-path\t$key\t${added%:}"
#Test for append
elif [ "${env2[$key]#${env1[$key]}}" != "${env2[$key]}" ]
then
added="${env2[$key]#${env1[$key]}}"
echo -e "append-path\t$key\t${added#:}"
else
#Unhandled
echo "Unhandled change of $key" 1>&2
echo "Before <${env1[$key]}>" 1>&2
echo "After <${env2[$key]}>" 1>&2
fi
fi
#Delete keys we've handled
unset env1[$key]
unset env2[$key]
done
#New keys
for key in "${!env2[@]}"
do
if [ "$key" = OLDPWD ]
then
continue
fi
#Use prepend-path for new paths
if [ "${key/PATH/}" != "$key" ]
then
echo -e "prepend-path\t${key}\t${env2[$key]}"
else
echo -e "setenv\t\t${key}\t${env2[$key]}"
fi
done
environment-modules-3.2.7-bindir.patch:
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE environment-modules-3.2.7-bindir.patch ---
--- modules-3.2.7/init/Makefile.in.bindir 2009-09-22 12:13:52.000000000 -0600
+++ modules-3.2.7/init/Makefile.in 2009-09-23 12:19:50.797470155 -0600
@@ -404,7 +404,7 @@
sed -e "/@$(if $(subst 0,,$(WANTS_VERSIONING)),NOT,)VERSIONING\@/d; \
s,@$(if $(subst 0,,$(WANTS_VERSIONING)),,NOT)VERSIONING\@,,g; \
s, at prefix\@,${prefix},g; \
- s, at bindir\@,${exec_prefix}/bin,g; \
+ s, at bindir\@,${bindir},g; \
s, at VERSION\@, at VERSION@,g; \
s, at BASEPREFIX\@, at BASEPREFIX@,g;" < $< > $@
environment-modules-3.2.7-manpath.patch:
cmdPath.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- NEW FILE environment-modules-3.2.7-manpath.patch ---
diff -up modules-3.2.7/cmdPath.c.manpath modules-3.2.7/cmdPath.c
--- modules-3.2.7/cmdPath.c.manpath 2009-07-30 12:03:20.000000000 -0600
+++ modules-3.2.7/cmdPath.c 2010-01-07 15:32:49.175198225 -0700
@@ -58,6 +58,10 @@ static void *UseId[] = { &UseId, Id };
#define PATH_BUFLEN 1024
#endif
+#ifndef MANPATH
+#define MANPATH "/usr/share/man"
+#endif
+
/** ************************************************************************ **/
/** MACROS **/
/** ************************************************************************ **/
@@ -215,7 +219,7 @@ int cmdSetPath( ClientData client_data,
_TCLCHK(interp)
if( oldpath == NULL)
- oldpath = !strcmp( argv[arg1], "MANPATH") ? "/usr/man" : "";
+ oldpath = !strcmp( argv[arg1], "MANPATH") ? MANPATH : "";
/**
** Split the new path into its components directories so each
--- NEW FILE import.log ---
environment-modules-3_2_7b-7_fc14:EL-5:environment-modules-3.2.7b-7.fc14.src.rpm:1267549135
--- NEW FILE modules.sh ---
shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\``
if [ -f /usr/share/Modules/init/$shell ]
then
. /usr/share/Modules/init/$shell
else
. /usr/share/Modules/init/sh
fi
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/environment-modules/EL-5/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- .cvsignore 5 Mar 2008 20:11:44 -0000 1.8
+++ .cvsignore 2 Mar 2010 16:59:09 -0000 1.9
@@ -1 +1 @@
-modules-3.2.6.tar.bz2
+modules-3.2.7b.tar.bz2
Index: environment-modules.spec
===================================================================
RCS file: /cvs/pkgs/rpms/environment-modules/EL-5/environment-modules.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- environment-modules.spec 5 Mar 2008 20:11:44 -0000 1.11
+++ environment-modules.spec 2 Mar 2010 16:59:10 -0000 1.12
@@ -1,16 +1,22 @@
Name: environment-modules
-Version: 3.2.6
-Release: 4%{?dist}
+Version: 3.2.7b
+Release: 7%{?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
+Source1: modules.sh
+Source2: createmodule.sh
+Patch0: environment-modules-3.2.7-bindir.patch
+Patch1: environment-modules-3.2.7-manpath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: tcl-devel, tclx-devel
+BuildRequires: tcl-devel, tclx-devel, libX11-devel
+BuildRequires: man
+#For ps in startup script
+Requires: procps
%description
The Environment Modules package provides for the dynamic modification of
@@ -33,16 +39,23 @@ Modules are useful in managing different
Modules can also be bundled into metamodules that will load an entire
suite of different applications.
+NOTE: You will need to get a new shell after installing this package to
+have access to the module alias.
+
%prep
-%setup -q -n modules-%{version}
-%patch -p1 -b .versioning
+%setup -q -n modules-3.2.7
+%patch0 -p1 -b .bindir
+%patch1 -p1 -b .manpath
%build
-%configure --disable-versioning --prefix=%{_datadir} \
+export CPPFLAGS=-DMANPATH=\'\"`manpath`\"\'
+%configure --disable-versioning \
+ --prefix=%{_datadir} \
--exec-prefix=%{_datadir}/Modules \
--with-module-path=%{_sysconfdir}/modulefiles
+
# --with-debug=42 --with-log-facility-debug=stderr
make %{?_smp_mflags}
@@ -51,7 +64,8 @@ make %{?_smp_mflags}
rm -rf $RPM_BUILD_ROOT
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
+cp -p %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/modules.sh
+cp -p %SOURCE2 $RPM_BUILD_ROOT%{_datadir}/Modules/bin
ln -s %{_datadir}/Modules/init/csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/modules.csh
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modulefiles
@@ -72,6 +86,44 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Jan 7 2010 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-7
+- Add patch to set a sane default MANPATH
+- Add createmodule.sh utility script for creating modulefiles
+
+* Mon Nov 30 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-6
+- Add Requires: propcs (bug #54272)
+
+* Mon Oct 26 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-5
+- Don't assume different shell init scripts exist (bug #530770)
+
+* Fri Oct 23 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-4
+- Don't load bash init script when bash is running as "sh" (bug #529745)
+
+* Mon Oct 19 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-3
+- Support different flavors of "sh" (bug #529493)
+
+* Wed Sep 23 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-2
+- Add patch to fix modulecmd path in init files
+
+* Wed Sep 23 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7b-1
+- Update to 3.2.7b
+
+* Mon Sep 21 2009 Orion Poplawski <orion at cora.nwra.com> - 3.2.7-1
+- Update to 3.2.7, fixes bug #524475
+- Drop versioning patch fixed upstream
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.6-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.6-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Wed Sep 3 2008 - Orion Poplawski <orion at cora.nwra.com> - 3.2.6-6
+- Change %%patch -> %%patch0
+
+* Fri Mar 14 2008 - Orion Poplawski <orion at cora.nwra.com> - 3.2.6-5
+- Add BR libX11-devel so modulecmd can handle X resources
+
* Wed Mar 5 2008 - Orion Poplawski <orion at cora.nwra.com> - 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,
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/environment-modules/EL-5/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- sources 5 Mar 2008 20:11:44 -0000 1.8
+++ sources 2 Mar 2010 16:59:10 -0000 1.9
@@ -1 +1 @@
-59bc6401efbc677d6190b00a440cccdf modules-3.2.6.tar.bz2
+3ebba50a1f79e63aa9e2189e9e6c7952 modules-3.2.7b.tar.bz2
--- modules-3.2.6-versioning.patch DELETED ---
More information about the scm-commits
mailing list