[gromacs/f13/master] Fix BZ #644950, split libraries into an own package.

Jussi Lehtola jussilehtola at fedoraproject.org
Wed Oct 27 16:41:30 UTC 2010


commit 8a3f7c9fb4a3918778b0c6b6ec4ee099900c52c7
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date:   Wed Oct 27 19:41:30 2010 +0300

    Fix BZ #644950, split libraries into an own package.

 gromacs-4.5.1-gmxrc.patch |  160 +++++++++++++++++++++++++++++++++++++++++++++
 gromacs.spec              |   92 +++++++++++++++++++++-----
 2 files changed, 236 insertions(+), 16 deletions(-)
---
diff --git a/gromacs-4.5.1-gmxrc.patch b/gromacs-4.5.1-gmxrc.patch
new file mode 100644
index 0000000..62a2400
--- /dev/null
+++ b/gromacs-4.5.1-gmxrc.patch
@@ -0,0 +1,160 @@
+diff -up gromacs-4.5.1/scripts/GMXRC.bash.cmakein.orig gromacs-4.5.1/scripts/GMXRC.bash.cmakein
+--- gromacs-4.5.1/scripts/GMXRC.bash.cmakein.orig	2010-08-23 20:58:30.000000000 +0300
++++ gromacs-4.5.1/scripts/GMXRC.bash.cmakein	2010-10-25 17:11:05.955213941 +0300
+@@ -8,8 +8,12 @@
+ tmppath=""
+ for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
+   if test "$i" != "$GMXLDLIB"; then
++    if test "${tmppath}" == ""; then
++      tmppath=$i
++    else
+     tmppath=${tmppath}:$i
+   fi
++  fi
+ done
+ LD_LIBRARY_PATH=$tmppath
+ 
+@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
+     tmppath=${tmppath}:$i
+   fi
+ done
++if test "$tmppath" == ""; then
++    tmppath=":"
++fi
+ MANPATH=$tmppath
+ 
+ ##########################################################
+diff -up gromacs-4.5.1/scripts/GMXRC.bash.in.orig gromacs-4.5.1/scripts/GMXRC.bash.in
+--- gromacs-4.5.1/scripts/GMXRC.bash.in.orig	2010-08-23 20:58:30.000000000 +0300
++++ gromacs-4.5.1/scripts/GMXRC.bash.in	2010-10-25 17:11:05.955213941 +0300
+@@ -8,8 +8,12 @@
+ tmppath=""
+ for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
+   if test "$i" != "$GMXLDLIB"; then
++    if test "${tmppath}" == ""; then
++      tmppath=$i
++    else
+     tmppath=${tmppath}:$i
+   fi
++  fi
+ done
+ LD_LIBRARY_PATH=$tmppath
+ 
+@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
+     tmppath=${tmppath}:$i
+   fi
+ done
++if test "$tmppath" == ""; then
++    tmppath=":"
++fi
+ MANPATH=$tmppath
+ 
+ ##########################################################
+diff -up gromacs-4.5.1/scripts/GMXRC.csh.cmakein.orig gromacs-4.5.1/scripts/GMXRC.csh.cmakein
+--- gromacs-4.5.1/scripts/GMXRC.csh.cmakein.orig	2010-08-23 20:58:30.000000000 +0300
++++ gromacs-4.5.1/scripts/GMXRC.csh.cmakein	2010-10-25 17:11:05.955213941 +0300
+@@ -16,7 +16,13 @@ if (! $?GMXMAN) setenv GMXMAN ""
+ # remove previous gromacs part from ld_library_path
+ set tmppath = ""
+ foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` )
+-  if ( "$i" != "$GMXLDLIB" ) set tmppath = "${tmppath}:$i"
++  if ( "$i" != "$GMXLDLIB" ) then
++    if ("${tmppath}" == "") then
++      set tmppath = "$i"
++    else
++      set tmppath = "${tmppath}:$i"
++    endif
++  endif
+ end
+ setenv LD_LIBRARY_PATH $tmppath
+ 
+@@ -39,6 +45,9 @@ set tmppath = ""
+ foreach i ( `echo $MANPATH | sed "s/:/ /g"` )
+   if ( "$i" != "$GMXMAN" ) set tmppath = "${tmppath}:$i"
+ end
++if ("$tmppath" == "") then
++    set tmppath = ":"
++endif
+ setenv MANPATH $tmppath
+ 
+ ##########################################################
+diff -up gromacs-4.5.1/scripts/GMXRC.csh.in.orig gromacs-4.5.1/scripts/GMXRC.csh.in
+--- gromacs-4.5.1/scripts/GMXRC.csh.in.orig	2010-08-23 20:58:30.000000000 +0300
++++ gromacs-4.5.1/scripts/GMXRC.csh.in	2010-10-25 17:11:05.955213941 +0300
+@@ -16,7 +16,13 @@ if (! $?GMXMAN) setenv GMXMAN ""
+ # remove previous gromacs part from ld_library_path
+ set tmppath = ""
+ foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` )
+-  if ( "$i" != "$GMXLDLIB" ) set tmppath = "${tmppath}:$i"
++  if ( "$i" != "$GMXLDLIB" ) then
++    if ("${tmppath}" == "") then
++      set tmppath = "$i"
++    else
++      set tmppath = "${tmppath}:$i"
++    endif
++  endif
+ end
+ setenv LD_LIBRARY_PATH $tmppath
+ 
+@@ -39,6 +45,9 @@ set tmppath = ""
+ foreach i ( `echo $MANPATH | sed "s/:/ /g"` )
+   if ( "$i" != "$GMXMAN" ) set tmppath = "${tmppath}:$i"
+ end
++if ("$tmppath" == "") then
++    set tmppath = ":"
++endif
+ setenv MANPATH $tmppath
+ 
+ ##########################################################
+diff -up gromacs-4.5.1/scripts/GMXRC.zsh.cmakein.orig gromacs-4.5.1/scripts/GMXRC.zsh.cmakein
+--- gromacs-4.5.1/scripts/GMXRC.zsh.cmakein.orig	2010-08-23 20:58:30.000000000 +0300
++++ gromacs-4.5.1/scripts/GMXRC.zsh.cmakein	2010-10-25 17:11:05.955213941 +0300
+@@ -8,8 +8,12 @@
+ tmppath=""
+ for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
+   if test "$i" != "$GMXLDLIB"; then
++    if test "${tmppath}" = ""; then
++      tmppath=$i
++    else
+     tmppath=${tmppath}:$i
+   fi
++  fi
+ done
+ LD_LIBRARY_PATH=$tmppath
+ 
+@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
+     tmppath=${tmppath}:$i
+   fi
+ done
++if test "$tmppath" = ""; then
++    tmppath=":"
++fi
+ MANPATH=$tmppath
+ 
+ ##########################################################
+diff -up gromacs-4.5.1/scripts/GMXRC.zsh.in.orig gromacs-4.5.1/scripts/GMXRC.zsh.in
+--- gromacs-4.5.1/scripts/GMXRC.zsh.in.orig	2010-08-23 20:58:30.000000000 +0300
++++ gromacs-4.5.1/scripts/GMXRC.zsh.in	2010-10-25 17:11:05.955213941 +0300
+@@ -8,8 +8,12 @@
+ tmppath=""
+ for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
+   if test "$i" != "$GMXLDLIB"; then
++    if test "${tmppath}" = ""; then
++      tmppath=$i
++    else
+     tmppath=${tmppath}:$i
+   fi
++  fi
+ done
+ LD_LIBRARY_PATH=$tmppath
+ 
+@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
+     tmppath=${tmppath}:$i
+   fi
+ done
++if test "$tmppath" = ""; then
++    tmppath=":"
++fi
+ MANPATH=$tmppath
+ 
+ ##########################################################
diff --git a/gromacs.spec b/gromacs.spec
index 61d72d0..b9d5a9d 100644
--- a/gromacs.spec
+++ b/gromacs.spec
@@ -1,6 +1,6 @@
 Name:		gromacs
 Version:	4.5.1
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Fast, Free and Flexible Molecular Dynamics
 Group:		Applications/Engineering
 License:	GPLv2+
@@ -21,6 +21,8 @@ Patch0:		gromacs-GMXRC.patch
 Patch1:		gromacs-gmxdemo.patch
 # Patch configure for the library suffix
 Patch2:		gromacs-configure.patch
+# Patch for BZ #644950, CVE-2010-4001
+Patch3:		gromacs-4.5.1-gmxrc.patch
 
 BuildRequires:	cmake
 BuildRequires:	atlas-devel
@@ -30,7 +32,6 @@ BuildRequires:	libxml2-devel
 BuildRequires:	libX11-devel
 
 Requires:	gromacs-common = %{version}-%{release}
-Obsoletes:	gromacs-libs < %{version}-%{release}
 
 %description
 GROMACS is a versatile and extremely well optimized package to perform
@@ -55,7 +56,7 @@ Summary:	GROMACS shared data and documentation
 Group:		Applications/Engineering
 BuildArch:	noarch
 # Due to switch to noarch package
-Obsoletes:	gromacs-common < %{version}-%{release}
+Obsoletes:	gromacs-common < 4.0.7-1
 
 %description common
 GROMACS is a versatile and extremely well optimized package to perform
@@ -84,11 +85,25 @@ molecular dynamics software. You need it if you want to write your own analysis
 programs.
 
 
+%package libs
+Summary:	GROMACS shared libraries
+Group:		System Environment/Libraries
+
+%description libs
+GROMACS is a versatile and extremely well optimized package to perform
+molecular dynamics computer simulations and subsequent trajectory analysis.
+It is developed for biomolecules like proteins, but the extremely high
+performance means it is used also in several other field like polymer chemistry
+and solid state physics.
+
+This package contains libraries needed for operation of GROMACS.
+
+
+
 %package openmpi
 Summary:	GROMACS Open MPI binaries and libraries
 Group:		Applications/Engineering
 Obsoletes:	gromacs-mpi < %{version}-%{release}
-Obsoletes:	gromacs-mpi-libs < %{version}-%{release}
 Requires:	gromacs-common = %{version}-%{release}
 BuildRequires:	openmpi-devel
 Requires:	openmpi
@@ -105,6 +120,22 @@ a single node) and with Open MPI (for running on multiple nodes).
 This package single and double precision binaries and libraries.
 
 
+%package openmpi-libs
+Summary:	GROMACS Open MPI shared libraries
+Group:		System Environment/Libraries
+Obsoletes:	gromacs-mpi-libs < %{version}-%{release}
+Requires:	openmpi
+
+%description openmpi-libs
+GROMACS is a versatile and extremely well optimized package to perform
+molecular dynamics computer simulations and subsequent trajectory analysis.
+It is developed for biomolecules like proteins, but the extremely high
+performance means it is used also in several other field like polymer chemistry
+and solid state physics.
+
+This package contains libraries needed for operation of GROMACS Open MPI.
+
+
 %package openmpi-devel
 Summary:	GROMACS Open MPI development libraries
 Group:		Applications/Engineering
@@ -142,6 +173,21 @@ mdrun has been compiled with thread parallellization (for running on
 a single node) and with MPICH2 (for running on multiple nodes).
 This package single and double precision binaries and libraries.
 
+%package mpich2-libs
+Summary:	GROMACS MPICH2 shared libraries
+Group:		System Environment/Libraries
+Requires:	mpich2
+
+%description mpich2-libs
+GROMACS is a versatile and extremely well optimized package to perform
+molecular dynamics computer simulations and subsequent trajectory analysis.
+It is developed for biomolecules like proteins, but the extremely high
+performance means it is used also in several other field like polymer chemistry
+and solid state physics.
+
+This package contains libraries needed for operation of GROMACS MPICH2.
+
+
 %package mpich2-devel
 Summary:	GROMACS MPICH2 development libraries
 Group:		Applications/Engineering
@@ -168,7 +214,7 @@ Group:		Applications/Engineering
 Requires:	bash-completion
 BuildArch:	noarch
 # Due to switch to noarch package
-Obsoletes:	gromacs-bash < %{version}-%{release}
+Obsoletes:	gromacs-bash < 4.0.7-1 
 
 
 %description bash
@@ -187,7 +233,7 @@ Group:		Applications/Engineering
 Requires:	zsh
 BuildArch:	noarch
 # Due to switch to noarch package
-Obsoletes:	gromacs-zsh < %{version}-%{release}
+Obsoletes:	gromacs-zsh < 4.0.7-1
 
 
 %description zsh
@@ -207,7 +253,7 @@ Group:		Applications/Engineering
 Requires:	csh
 BuildArch:	noarch
 # Due to switch to noarch package
-Obsoletes:	gromacs-csh < %{version}-%{release}
+Obsoletes:	gromacs-csh < 4.0.7-1 
 
 
 %description csh
@@ -226,7 +272,7 @@ Group:		Applications/Engineering
 Requires:	gromacs-common = %{version}-%{release}
 BuildArch:	noarch
 # Due to switch to noarch package
-Obsoletes:	gromacs-tutor < %{version}-%{release}
+Obsoletes:	gromacs-tutor < 4.0.7-1 
 
 %description tutor
 GROMACS is a versatile and extremely well optimized package to perform
@@ -242,6 +288,7 @@ This package provides tutorials for the use of GROMACS.
 %patch0 -p1 -b .gmxrc
 %patch1 -p1 -b .gmxdemo
 #%patch2 -p1 -b .libsuffix
+%patch3 -p1 -b .gmxrc_cve
 
 # Fix incorrect permission
 #chmod a-x src/tools/gmx_xpm2ps.c
@@ -456,14 +503,6 @@ rm -rf %{buildroot}
 %files
 %defattr(-,root,root,-)
 %{_bindir}/g_*
-%{_libdir}/libgmx.so.*
-%{_libdir}/libgmx_d.so.*
-%{_libdir}/libgmxana.so.*
-%{_libdir}/libgmxana_d.so.*
-%{_libdir}/libgmxpreprocess.so.*
-%{_libdir}/libgmxpreprocess_d.so.*
-%{_libdir}/libmd.so.*
-%{_libdir}/libmd_d.so.*
 
 %files common
 %defattr(-,root,root,-)
@@ -476,6 +515,17 @@ rm -rf %{buildroot}
 %exclude %{_datadir}/%{name}/template/
 %exclude %{_datadir}/%{name}/tutor/
 
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/libgmx.so.*
+%{_libdir}/libgmx_d.so.*
+%{_libdir}/libgmxana.so.*
+%{_libdir}/libgmxana_d.so.*
+%{_libdir}/libgmxpreprocess.so.*
+%{_libdir}/libgmxpreprocess_d.so.*
+%{_libdir}/libmd.so.*
+%{_libdir}/libmd_d.so.*
+
 %files devel
 %defattr(-,root,root,-)
 %{_includedir}/%{name}
@@ -494,6 +544,9 @@ rm -rf %{buildroot}
 %files openmpi
 %defattr(-,root,root,-)
 %{_libdir}/openmpi/bin/g_mdrun*
+
+%files openmpi-libs
+%defattr(-,root,root,-)
 %{_libdir}/openmpi/lib/lib*.so.*
 
 %files openmpi-devel
@@ -503,6 +556,9 @@ rm -rf %{buildroot}
 %files mpich2
 %defattr(-,root,root,-)
 %{_libdir}/mpich2/bin/g_mdrun*
+
+%files mpich2-libs
+%defattr(-,root,root,-)
 %{_libdir}/mpich2/lib/lib*.so.*
 
 %files mpich2-devel
@@ -529,6 +585,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Wed Oct 27 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 4.5.1-2
+- Patch around #644950.
+- Split libraries in own packages to avoid multilib problems.
+
 * Sat Oct 09 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 4.5.1-1
 - Update to 4.5.1.
 


More information about the scm-commits mailing list