fixed FTBFS if "-Werror=format-security" flag is used (#1037343)
devel-pkg must Requires: %%{name}%%{?_isa} apply proper LDFLAGS added needed bits for el5 reenable testsuite using Patch3
This commit is contained in:
parent
aeb4d02405
commit
d1f90c92e1
13
SuperLU-fix-format-security.patch
Normal file
13
SuperLU-fix-format-security.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: SuperLU_4.3/SRC/util.c
|
||||||
|
===================================================================
|
||||||
|
--- SuperLU_4.3.orig/SRC/util.c
|
||||||
|
+++ SuperLU_4.3/SRC/util.c
|
||||||
|
@@ -29,7 +29,7 @@
|
||||||
|
|
||||||
|
void superlu_abort_and_exit(char* msg)
|
||||||
|
{
|
||||||
|
- fprintf(stderr, msg);
|
||||||
|
+ fputs(stderr, msg);
|
||||||
|
exit (-1);
|
||||||
|
}
|
||||||
|
|
52
SuperLU-fix-testsuite.patch
Normal file
52
SuperLU-fix-testsuite.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
Index: SuperLU_4.3/TESTING/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- SuperLU_4.3.orig/TESTING/Makefile
|
||||||
|
+++ SuperLU_4.3/TESTING/Makefile
|
||||||
|
@@ -52,9 +52,9 @@ testmat:
|
||||||
|
|
||||||
|
single: ./stest stest.out
|
||||||
|
|
||||||
|
-./stest: $(SLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||||
|
+./stest: $(SLINTST) $(ALINTST) $(TMGLIB)
|
||||||
|
$(LOADER) $(LOADOPTS) $(SLINTST) $(ALINTST) \
|
||||||
|
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
|
||||||
|
stest.out: stest stest.csh
|
||||||
|
@echo Testing SINGLE PRECISION linear equation routines
|
||||||
|
@@ -62,9 +62,9 @@ stest.out: stest stest.csh
|
||||||
|
|
||||||
|
double: ./dtest dtest.out
|
||||||
|
|
||||||
|
-./dtest: $(DLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||||
|
+./dtest: $(DLINTST) $(ALINTST) $(TMGLIB)
|
||||||
|
$(LOADER) $(LOADOPTS) $(DLINTST) $(ALINTST) \
|
||||||
|
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
|
||||||
|
dtest.out: dtest dtest.csh
|
||||||
|
@echo Testing DOUBLE PRECISION linear equation routines
|
||||||
|
@@ -72,9 +72,9 @@ dtest.out: dtest dtest.csh
|
||||||
|
|
||||||
|
complex: ./ctest ctest.out
|
||||||
|
|
||||||
|
-./ctest: $(CLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||||
|
+./ctest: $(CLINTST) $(ALINTST) $(TMGLIB)
|
||||||
|
$(LOADER) $(LOADOPTS) $(CLINTST) $(ALINTST) \
|
||||||
|
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
|
||||||
|
ctest.out: ctest ctest.csh
|
||||||
|
@echo Testing SINGLE COMPLEX linear equation routines
|
||||||
|
@@ -82,9 +82,9 @@ ctest.out: ctest ctest.csh
|
||||||
|
|
||||||
|
complex16: ./ztest ztest.out
|
||||||
|
|
||||||
|
-./ztest: $(ZLINTST) $(ALINTST) $(SUPERLULIB) $(TMGLIB)
|
||||||
|
+./ztest: $(ZLINTST) $(ALINTST) $(TMGLIB)
|
||||||
|
$(LOADER) $(LOADOPTS) $(ZLINTST) $(ALINTST) \
|
||||||
|
- $(TMGLIB) $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
+ $(TMGLIB) -Wl,-rpath,../SRC $(SUPERLULIB) $(BLASLIB) -lm -o $@
|
||||||
|
|
||||||
|
ztest.out: ztest ztest.csh
|
||||||
|
@echo Testing DOUBLE COMPLEX linear equation routines
|
75
SuperLU.spec
75
SuperLU.spec
@ -1,19 +1,24 @@
|
|||||||
Name: SuperLU
|
Name: SuperLU
|
||||||
Version: 4.3
|
Version: 4.3
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: Subroutines to solve sparse linear systems
|
Summary: Subroutines to solve sparse linear systems
|
||||||
|
%{?el5:Group: System/Libraries}
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
|
URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
|
||||||
Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_%{version}.tar.gz
|
Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_%{version}.tar.gz
|
||||||
# Build with -fPIC
|
# Build with -fPIC
|
||||||
Patch0: %{name}-add-fpic.patch
|
Patch0: %{name}-add-fpic.patch
|
||||||
# Build shared library
|
# Build shared library
|
||||||
Patch1: %{name}-build-shared-lib3.patch
|
Patch1: %{name}-build-shared-lib3.patch
|
||||||
|
# Fixes FTBFS if "-Werror=format-security" flag is used (#1037343)
|
||||||
|
Patch2: %{name}-fix-format-security.patch
|
||||||
|
# Fixes testsuite
|
||||||
|
Patch3: SuperLU-fix-testsuite.patch
|
||||||
|
|
||||||
|
%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
|
||||||
BuildRequires: atlas-devel
|
BuildRequires: atlas-devel
|
||||||
BuildRequires: csh
|
BuildRequires: csh
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SuperLU contains a set of subroutines to solve a sparse linear system
|
SuperLU contains a set of subroutines to solve a sparse linear system
|
||||||
@ -22,10 +27,10 @@ The columns of A may be preordered before factorization; the
|
|||||||
preordering for sparsity is completely separate from the factorization.
|
preordering for sparsity is completely separate from the factorization.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files and libraries for SuperLU development
|
Summary: Header files and libraries for SuperLU development
|
||||||
Group: Development/Libraries
|
%{?el5:Group: Development/Libraries}
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
%{?el5:Requires: pkgconfig}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The %{name}-devel package contains the header files
|
The %{name}-devel package contains the header files
|
||||||
@ -35,26 +40,33 @@ and libraries for use with CUnit package.
|
|||||||
%setup -q -n %{name}_%{version}
|
%setup -q -n %{name}_%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
chmod a-x SRC/qselect.c EXAMPLE/cg20.cua
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
find . -type f | sed -e "/TESTING/d" | xargs chmod a-x
|
||||||
# Remove the shippped executables from EXAMPLE
|
# Remove the shippped executables from EXAMPLE
|
||||||
find EXAMPLE -type f | while read file
|
find EXAMPLE -type f | while read file
|
||||||
do
|
do
|
||||||
[ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || :
|
[ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || :
|
||||||
done
|
done
|
||||||
cp -p MAKE_INC/make.linux make.inc
|
cp -p MAKE_INC/make.linux make.inc
|
||||||
sed -i "s|-O3|$RPM_OPT_FLAGS|" make.inc
|
sed -i -e "s|-O3|$RPM_OPT_FLAGS|" \
|
||||||
sed -i "s|\$(SUPERLULIB) ||" make.inc
|
-e "s|\$(SUPERLULIB) ||" \
|
||||||
sed -i "s|\$(HOME)/Codes/%{name}_%{version}|%{_builddir}/%{name}_%{version}|" make.inc
|
-e "s|\$(HOME)/Codes/%{name}_%{version}|%{_builddir}/%{name}_%{version}|" \
|
||||||
|
-e 's!lib/libsuperlu_4.3.a$!SRC/libsuperlu.so!' \
|
||||||
|
-e 's!-shared!& %{__global_ldflags}!' \
|
||||||
%if 0%{?fedora} >= 21
|
%if 0%{?fedora} >= 21
|
||||||
sed -i "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" make.inc
|
-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lsatlas|" \
|
||||||
%else
|
%else
|
||||||
sed -i "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|" make.inc
|
-e "s|-L/usr/lib -lblas|-L%{_libdir}/atlas -lf77blas|" \
|
||||||
%endif
|
%endif
|
||||||
|
make.inc
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} superlulib
|
make %{?_smp_mflags} superlulib
|
||||||
|
make -C TESTING
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%{?el5:rm -rf %{buildroot}}
|
||||||
mkdir -p %{buildroot}%{_libdir}
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
mkdir -p %{buildroot}%{_includedir}/%{name}
|
mkdir -p %{buildroot}%{_includedir}/%{name}
|
||||||
install -p SRC/libsuperlu.so.%{version} %{buildroot}%{_libdir}
|
install -p SRC/libsuperlu.so.%{version} %{buildroot}%{_libdir}
|
||||||
@ -62,6 +74,18 @@ install -p SRC/*.h %{buildroot}%{_includedir}/%{name}
|
|||||||
chmod -x %{buildroot}%{_includedir}/%{name}/*.h
|
chmod -x %{buildroot}%{_includedir}/%{name}/*.h
|
||||||
cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}
|
cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd TESTING
|
||||||
|
for _test in c d s z
|
||||||
|
do
|
||||||
|
chmod +x ${_test}test.csh
|
||||||
|
./${_test}test.csh
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
%{?el5:%clean}
|
||||||
|
%{?el5:rm -rf %{buildroot}}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
@ -76,6 +100,13 @@ cp -Pp SRC/libsuperlu.so %{buildroot}%{_libdir}
|
|||||||
%{_libdir}/libsuperlu.so
|
%{_libdir}/libsuperlu.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 06 2014 Björn Esser <bjoern.esser@gmail.com> - 4.3-8
|
||||||
|
- fixed FTBFS if "-Werror=format-security" flag is used (#1037343)
|
||||||
|
- devel-pkg must Requires: %%{name}%%{?_isa}
|
||||||
|
- apply proper LDFLAGS
|
||||||
|
- added needed bits for el5
|
||||||
|
- reenable testsuite using Patch3
|
||||||
|
|
||||||
* Fri Oct 4 2013 Orion Poplawski <orion@cora.nwra.com> - 4.3-7
|
* Fri Oct 4 2013 Orion Poplawski <orion@cora.nwra.com> - 4.3-7
|
||||||
- Rebuild for atlas 3.10
|
- Rebuild for atlas 3.10
|
||||||
- Handle UnversionedDocDirs change
|
- Handle UnversionedDocDirs change
|
||||||
|
Loading…
Reference in New Issue
Block a user