diff --git a/.gitignore b/.gitignore index 4774c19..19e92c0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /liberasurecode-1.1.1.tar.gz /liberasurecode-1.2.0.tar.gz /liberasurecode-1.4.0.tar.gz +/liberasurecode-1.5.0.tar.gz diff --git a/liberasurecode-1.4.0-nommi.patch b/liberasurecode-1.4.0-nommi.patch deleted file mode 100644 index bb83718..0000000 --- a/liberasurecode-1.4.0-nommi.patch +++ /dev/null @@ -1,182 +0,0 @@ -commit 0962144c51421a39be921876328bcecb912c7674 -Author: Pete Zaitcev -Date: Wed May 24 14:35:15 2017 -0600 - - Allow to disable optimizations for portability - - We're having trouble on Fedora when the build system runs - on Intel CPUs. The ./configure detects AVX instructions and - builds liberasurecode with them. The resulting library crashes - with SIGILL when users run it on ADM CPUs without AVX. - - See the details here: - https://bugzilla.redhat.com/show_bug.cgi?id=1454543 - - The patch allows to disable the optimizations, so that - distro packaging then can invoke this options and build - portable libraries. - - For the record, "make test" runs about 16% slower on an Intel - CPU if optimizations are disabled. So, there's a measurable - performance impact. However, operators intersted in outright - performance might want to consider Erasure Coding implementations - other than the one built-in into liberasurecode. The library - supports other back-ends that are significantly faster than - even optimized built-in code. - - Change-Id: I09603b97ceeb833ba582cf3217e0be51c019d645 - -diff --git a/configure.ac b/configure.ac -index c3509d2..69df9a3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -151,68 +151,81 @@ AC_SUBST(ac_aux_dir) - AC_SUBST(OBJECTS) - - dnl Do CPUID and associated compiler flag checks -+dnl but allow to disable all of this in order to build portable binaries - --SUPPORTED_FLAGS="" --$CC - -E -mmmx /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="-mmmx" -- AC_MSG_RESULT([$CC supports -mmmx]) --fi --$CC - -E -msse /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse" -- AC_MSG_RESULT([$CC supports -msse]) --fi --$CC - -E -msse2 /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse2" -- AC_MSG_RESULT([$CC supports -msse2]) --fi --$CC - -E -msse3 /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse3" -- AC_MSG_RESULT([$CC supports -msse3]) --fi --$CC - -E -mssse3 /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mssse3" -- AC_MSG_RESULT([$CC supports -mssse3]) --fi --$CC - -E -msse4.1 /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.1" -- AC_MSG_RESULT([$CC supports -msse4.1]) --fi --$CC - -E -msse4.2 /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.2" -- AC_MSG_RESULT([$CC supports -msse4.2]) --fi --$CC - -E -mavx /dev/null 2>&1 --if [[ $? == "0" ]]; then -- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mavx" -- AC_MSG_RESULT([$CC supports -mavx]) --fi -+AC_ARG_ENABLE([mmi], [ --disable-mmi do not use host-specific instructions], -+[case "${enableval}" in -+ yes) mmi=true ;; -+ no) mmi=false ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --disable-mmi]) ;; -+esac],[mmi=true]) -+ -+if test x$mmi = xtrue ; then -+ -+ SUPPORTED_FLAGS="" -+ $CC - -E -mmmx /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="-mmmx" -+ AC_MSG_RESULT([$CC supports -mmmx]) -+ fi -+ $CC - -E -msse /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse" -+ AC_MSG_RESULT([$CC supports -msse]) -+ fi -+ $CC - -E -msse2 /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse2" -+ AC_MSG_RESULT([$CC supports -msse2]) -+ fi -+ $CC - -E -msse3 /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse3" -+ AC_MSG_RESULT([$CC supports -msse3]) -+ fi -+ $CC - -E -mssse3 /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mssse3" -+ AC_MSG_RESULT([$CC supports -mssse3]) -+ fi -+ $CC - -E -msse4.1 /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.1" -+ AC_MSG_RESULT([$CC supports -msse4.1]) -+ fi -+ $CC - -E -msse4.2 /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.2" -+ AC_MSG_RESULT([$CC supports -msse4.2]) -+ fi -+ $CC - -E -mavx /dev/null 2>&1 -+ if [[ $? == "0" ]]; then -+ SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mavx" -+ AC_MSG_RESULT([$CC supports -mavx]) -+ fi - --# Detect the SIMD features supported by both the compiler and the CPU --SIMD_FLAGS="" --cat "$srcdir/get_flags_from_cpuid.c" \ -- | sed "s/FLAGSFROMAUTOCONF/${SUPPORTED_FLAGS}/" \ -- | $CC -x c -g - -o get_flags_from_cpuid --if [[ -e ./get_flags_from_cpuid ]]; then -- chmod 755 get_flags_from_cpuid; ./get_flags_from_cpuid; rm ./get_flags_from_cpuid -- if [[ -e compiler_flags ]]; then -- SIMD_FLAGS=`cat compiler_flags` -- rm -f compiler_flags -- else -- AC_MSG_WARN([Could not run the CPUID detection program]) -- fi --else -- AC_MSG_WARN([Could not compile the CPUID detection program]) --fi -+ # Detect the SIMD features supported by both the compiler and the CPU -+ SIMD_FLAGS="" -+ cat "$srcdir/get_flags_from_cpuid.c" \ -+ | sed "s/FLAGSFROMAUTOCONF/${SUPPORTED_FLAGS}/" \ -+ | $CC -x c -g - -o get_flags_from_cpuid -+ if [[ -e ./get_flags_from_cpuid ]]; then -+ chmod 755 get_flags_from_cpuid -+ ./get_flags_from_cpuid -+ rm ./get_flags_from_cpuid -+ if [[ -e compiler_flags ]]; then -+ SIMD_FLAGS=`cat compiler_flags` -+ rm -f compiler_flags -+ else -+ AC_MSG_WARN([Could not run the CPUID detection program]) -+ fi -+ else -+ AC_MSG_WARN([Could not compile the CPUID detection program]) -+ fi - --AC_MSG_RESULT([Generating with SIMD flags: $SIMD_FLAGS]) --CFLAGS="$CFLAGS $SIMD_FLAGS" -+ AC_MSG_RESULT([Generating with SIMD flags: $SIMD_FLAGS]) -+ CFLAGS="$CFLAGS $SIMD_FLAGS" -+fi - - # Certain code may be dependent on 32 vs. 64-bit arch, so add a - # flag for 64-bit -@@ -231,7 +244,7 @@ AM_CONDITIONAL(HAVE_DOXYGEN, $DOXYGEN) - AC_SUBST(HAVE_DOXYGEN) - - dnl Let people disable the doxygen stuff. --AC_ARG_ENABLE(doxygen, [ --enable-doxygen Use doxygen to build documentation (default=auto)], -+AC_ARG_ENABLE(doxygen, [ --enable-doxygen use doxygen to build documentation (default=auto)], - enable_doxygen="$enableval", - enable_doxygen=auto) - diff --git a/liberasurecode-1.5.0-ldtest.patch b/liberasurecode-1.5.0-ldtest.patch new file mode 100644 index 0000000..cddcd13 --- /dev/null +++ b/liberasurecode-1.5.0-ldtest.patch @@ -0,0 +1,39 @@ +This patch undoes parts of the following upstream patch: + +commit 19442df2cd9a5bc8ec4deded7046ea7aca1d50a2 +Author: Kota Tsuyuzaki +Date: Mon Feb 20 14:12:43 2017 -0800 + + Fix warning on automake tool + + .......... + + Change-Id: I0e79bed7755a1f286b746a70fcf56fdc972bfd5d + +diff -u liberasurecode-1.5.0/Makefile.am liberasurecode-1.5.0-p3/Makefile.am +--- liberasurecode-1.5.0/Makefile.am 2017-06-29 11:36:37.000000000 -0600 ++++ liberasurecode-1.5.0-p3/Makefile.am 2017-07-05 20:44:59.041285796 -0600 +@@ -46,6 +46,11 @@ + $(LN_S) liberasurecode/config_liberasurecode.h) + + test: check ++ $(eval SONAMES := $(shell find $(abs_top_builddir) -name '*.so')) ++ $(eval SODIRS := $(dir $(SONAMES))) ++ $(eval LD_LIBRARY_PATH := LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") ++ $(eval DYLD_LIBRARY_PATH := DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") ++ $(eval DYLD_FALLBACK_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(DYLD_FALLBACK_LIBRARY_PATH):"$(subst / ,/:,$(SODIRS))") + @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \ + ./test/liberasurecode_test + @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) \ +@@ -60,6 +65,11 @@ + --malloc-fill=A5 --free-fill=DE --fullpath-after=. --trace-children=yes + + valgrind-test: check ++ $(eval SONAMES := $(shell find $(abs_top_builddir) -name '*.so')) ++ $(eval SODIRS := $(dir $(SONAMES))) ++ $(eval LD_LIBRARY_PATH := LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") ++ $(eval DYLD_LIBRARY_PATH := DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(subst / ,/:,$(SODIRS))") ++ $(eval DYLD_FALLBACK_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(DYLD_FALLBACK_LIBRARY_PATH):"$(subst / ,/:,$(SODIRS))") + @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) $(VALGRIND_EXEC_COMMAND) \ + ./test/alg_sig_test + @$(LD_LIBRARY_PATH) $(DYLD_LIBRARY_PATH) $(DYLD_FALLBACK_LIBRARY_PATH) $(VALGRIND_EXEC_COMMAND) \ diff --git a/liberasurecode.spec b/liberasurecode.spec index cb6676e..bd3a4e4 100644 --- a/liberasurecode.spec +++ b/liberasurecode.spec @@ -1,6 +1,6 @@ Name: liberasurecode -Version: 1.4.0 -Release: 3%{?dist} +Version: 1.5.0 +Release: 1%{?dist} Summary: Erasure Code API library written in C with pluggable backends # Main license is a 2-clause BSD with clause numbers removed for some reason. @@ -12,7 +12,7 @@ URL: https://bitbucket.org/tsg-/liberasurecode/ # and switched to tags without the 'v' prefix. Source0: %{name}-%{version}.tar.gz Patch2: liberasurecode-1.0.5-docs.patch -Patch3: liberasurecode-1.4.0-nommi.patch +Patch3: liberasurecode-1.5.0-ldtest.patch BuildRequires: autoconf BuildRequires: automake @@ -84,6 +84,9 @@ find $RPM_BUILD_ROOT%{_datadir}/doc -type f -exec chmod a-x {} ';' %changelog +* Wed Jul 05 2017 Pete Zaitcev 1.5.0-1 +- Upstream 1.5.0: --disable-mmi is included upstream + * Thu May 25 2017 Pete Zaitcev 1.4.0-3 - Disable unportable optimizations, avoid crash with SIGILL (#1454543) diff --git a/sources b/sources index 397a5af..547c617 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2e14e016d7e8fa176dcef3bb714dec08 liberasurecode-1.4.0.tar.gz +SHA512 (liberasurecode-1.5.0.tar.gz) = 369b19cb3db90a459667f024949784780f53b409961180ed36dc2299f4bad0037dc44d36b09e198da8e9f8a129bd7d1d2c4648216356d86f0fdf96c4166def5f