From 2827d37bdcc4fa9efc2f8a953fdbcd2e57b287a2 Mon Sep 17 00:00:00 2001 From: Jonathan Dieter Date: Apr 24 2017 18:39:41 +0000 Subject: Add patch to fix build in Rawhide Signed-off-by: Jonathan Dieter --- diff --git a/0001-common-Fix-overflow-error-with-GCC-7.patch b/0001-common-Fix-overflow-error-with-GCC-7.patch new file mode 100644 index 0000000..05b32d3 --- /dev/null +++ b/0001-common-Fix-overflow-error-with-GCC-7.patch @@ -0,0 +1,37 @@ +From 40848993ca0b4ce826b37508b740055d97a961e2 Mon Sep 17 00:00:00 2001 +From: Jonathan Dieter +Date: Mon, 24 Apr 2017 21:16:12 +0300 +Subject: [PATCH] [common] Fix overflow error with GCC 7 + +Make sure n is always added to unsigned 1 to avoid overflow errors + +Signed-off-by: Jonathan Dieter +--- + src/common/galois_coeff.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common/galois_coeff.h b/src/common/galois_coeff.h +index 305bd10..da5a683 100644 +--- a/src/common/galois_coeff.h ++++ b/src/common/galois_coeff.h +@@ -38,7 +38,7 @@ constexpr uint8_t gf_mul2(uint8_t x) { + * \return log(x) + */ + constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) { +- return x == pow2n ? n : gf_log(x, gf_mul2(pow2n), n + 1); ++ return x == pow2n ? n : gf_log(x, gf_mul2(pow2n), n + 1U); + } + + /*! \brief Compute base 2 exponent in GF(2^8). +@@ -48,7 +48,7 @@ constexpr uint8_t gf_log(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) { + * \return exp(x) + */ + constexpr uint8_t gf_exp(uint8_t x, uint8_t pow2n = 2, uint8_t n = 1) { +- return x == n ? pow2n : gf_exp(x, gf_mul2(pow2n), n + 1); ++ return x == n ? pow2n : gf_exp(x, gf_mul2(pow2n), n + 1U); + } + + /*! \brief Returns lookup table for base 2 logarithm in GF(2^8). */ +-- +2.9.3 + diff --git a/lizardfs.spec b/lizardfs.spec index 8ce3411..3ffd419 100644 --- a/lizardfs.spec +++ b/lizardfs.spec @@ -1,7 +1,7 @@ Name: lizardfs Summary: Distributed, fault tolerant file system Version: 3.10.6 -Release: 5%{?dist} +Release: 6%{?dist} # LizardFS is under GPLv3 while crcutil is under ASL 2.0 and there's one header, # src/common/coroutine.h, under the Boost license License: GPLv3 and ASL 2.0 and Boost @@ -16,6 +16,9 @@ Patch1: 0001-chunkserver-Add-alternative-include-path-for-falloca.patch # Make sure we drop supplementary groups when running setgid # Pull request at https://github.com/lizardfs/lizardfs/pull/533 Patch2: 0001-main-Remove-supplementary-groups-when-dropping-privi.patch +# Fix overflow error in GCC 7 +# Pull request at https://github.com/lizardfs/lizardfs/pull/540 +Patch3: 0001-common-Fix-overflow-error-with-GCC-7.patch BuildRequires: fuse-devel BuildRequires: cmake BuildRequires: pkgconfig @@ -196,9 +199,7 @@ exit 0 ############################################################ %prep -%setup -q -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 # Remove /usr/bin/env from bash scripts for i in src/tools/mfstools.sh src/mount/mfssnapshot src/master/mfsrestoremaster.in \ @@ -413,6 +414,9 @@ install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/security/limits.d/95-lizardf %changelog +* Mon Apr 24 2017 Jonathan Dieter - 3.10.6-6 +- Add patch to fix building in Rawhide + * Thu Apr 20 2017 Jonathan Dieter - 3.10.6-5 - Fix BuildRequires for Judy-devel - Add BR: pam-devel