Michael Tokarev: pass CWFLAGS to upstream Makefile without -Werror

Michael Tokarev mjt at alioth.debian.org
Wed Sep 14 16:01:25 UTC 2011


Module: mdadm
Branch: maint/squeeze
Commit: 106cda726518b6a5f06956192b39723160a2d09a
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=106cda726518b6a5f06956192b39723160a2d09a

Author: Michael Tokarev <mjt at tls.msk.ru>
Date:   Sun Sep 11 10:36:41 2011 +0400

pass CWFLAGS to upstream Makefile without -Werror

Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>

---

 debian/changelog |   13 +++++++------
 debian/rules     |   12 ++++++++++--
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 90be703..7ac5f9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mdadm (3.1.4-1+8efb9d1+squeeze1) stable; urgency=low
+mdadm (3.1.4-1+8efb9d1+squeeze1) unstable; urgency=low
 
   [ martin f. krafft ]
   * Do not print io rescheduling info message when run by cron
@@ -9,17 +9,18 @@ mdadm (3.1.4-1+8efb9d1+squeeze1) stable; urgency=low
   * Schedule start/stop of mdadm-raid before/after filesystems are
     checked&mounted/unmounted; thanks to Mario 'BitKoenig' Holbe
     (closes: #611632).
-  * Work around a shell coding bug for cases when there are zero active
-    devices (closes: #618561).
   * Make mdadm-raid init script depend on hostname; thanks to Mario
    'BitKoenig' Holbe (closes: #610421).
-  * Schedule start/stop of mdadm-raid before/after filesystems are
-    checked&mounted/unmounted; thanks to Mario 'BitKoenig' Holbe
-    (closes: #611632).
+  * Work around a shell coding bug for cases when there are zero active
+    devices (closes: #618561).
 
   [ Michael Tokarev ]
   * don't print W: auto-read-only in checkarray in quiet mode,
     thanks to Bernd Hanisch for the patch (Closes: #605722)
+  * pass CWFLAGS to upstream Makefile without -Werror so it builds
+    by a more recent gcc which triggers more warnings.  Upstream
+    fixed the warnings in later versions but backporting these into
+    stable appears to be a wrong idea.
 
  -- Michael Tokarev <mjt at tls.msk.ru>  Sat, 10 Sep 2011 00:32:52 +0400
 
diff --git a/debian/rules b/debian/rules
index f5a8db1..3a5b8e2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,14 @@ else
     CXFLAGS_UDEB += -Os
 endif
 
+# upstream uses -Werror and a more recent compiler triggers more warnings
+# than the one used to build the package initially, so the build fails.
+# Instead of more intrusive approach of fixing code (which is fixed in
+# a more recent upstream version) we omit -Werror here.
+# This is kinda ugly, but backporting large fixes for stable is more risky
+# (-Werror chokes on set-but-unused variables which is harmless).
+CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
+
 .PHONY: configure
 configure:
 
@@ -36,14 +44,14 @@ build-stamp: debian/mdadm-startall.8
 mdadm.udeb: FLAGS = CXFLAGS="$(CXFLAGS_UDEB)" CONFFILE=/tmp/mdadm.conf
 mdadm.udeb: configure
 	dh_testdir
-	$(MAKE) $(FLAGS) all
+	$(MAKE) $(FLAGS) all CWFLAGS="$(CWFLAGS)"
 	mv mdadm mdadm.udeb
 .PHONY: mdadm.udeb
 
 mdadm: FLAGS = CXFLAGS="$(CXFLAGS)" CONFFILE=/etc/mdadm/mdadm.conf CONFFILE2=/etc/mdadm.conf
 mdadm: configure
 	dh_testdir
-	$(MAKE) $(FLAGS) all
+	$(MAKE) $(FLAGS) all CWFLAGS="$(CWFLAGS)"
 .PHONY: mdadm
 
 INTERPOLATED_FILES = debian/bugscript debian/mkconf




More information about the pkg-mdadm-commits mailing list