diff --git a/mdadm-4.1-no-Werror.patch b/mdadm-4.1-no-Werror.patch new file mode 100644 index 0000000..2cdac7c --- /dev/null +++ b/mdadm-4.1-no-Werror.patch @@ -0,0 +1,26 @@ +From: martin f. krafft +Subject: Remove -Werror from compiler flags + +-Werror seems like a bad idea on released/packaged code because a toolchain +update (introducing new warnings) could break the build. We'll let upstream +use it to beautify the code, but remove it for out builds. + +Signed-off-by: martin f. krafft + +--- + Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: mdadm-4.1/Makefile +=================================================================== +--- mdadm-4.1.orig/Makefile ++++ mdadm-4.1/Makefile +@@ -48,7 +48,7 @@ endif + + CC ?= $(CROSS_COMPILE)gcc + CXFLAGS ?= -ggdb +-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter ++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter + ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif diff --git a/mdadm.spec b/mdadm.spec index d542a42..12a2630 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Name: mdadm Version: 4.1 %define subversion rc2 -Release: rc2.0.2%{?dist}.1 +Release: rc2.0.3%{?dist} Summary: The mdadm program controls Linux md devices (software RAID arrays) URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ License: GPLv2+ @@ -16,6 +16,9 @@ Source6: mdmonitor.service Source7: mdadm.conf Source8: mdadm_event.conf +# Build without -Werror. From Debian. +Patch00: https://sources.debian.org/data/main/m/mdadm/4.1-2/debian/patches/debian-no-Werror.diff#/mdadm-4.1-no-Werror.patch + # Fedora customization patches Patch97: mdadm-3.3-udev.patch Patch98: mdadm-2.5.2-static.patch @@ -39,6 +42,7 @@ file can be used to help with some common tasks. %setup -q -n %{name}-%{version}_%{subversion} # Fedora customization patches +%patch00 -p1 -b .no-Werror %patch97 -p1 -b .udev %patch98 -p1 -b .static @@ -92,6 +96,9 @@ install -m644 %{SOURCE8} %{buildroot}/etc/libreport/events.d /etc/libreport/events.d/* %changelog +* Sat Mar 16 2019 Björn Esser - 4.1-rc2.0.3 +- Add patch to build without -Werror, fixes FTBFS (#1675363) + * Fri Feb 01 2019 Fedora Release Engineering - 4.1-rc2.0.2.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild