Hi, Aron Xu wrote:
> Ah sorry, I misunderstood this bug with #616291. I guess NMUing the > package for your patch is easy, would you like to do that? Now I am starting to regret not having said "yes". Any opinions on this patch from the maintainers? Upstream part forwarded upstream: https://issues.apache.org/jira/browse/AXIS2C-1603 Patch refreshed. As before, it does four things: - makes the patch system work as expected again --- 3.0 (quilt) format and cdbs's rules/patchsys-quilt.mk are not meant to be used together - uses dh_autoreconf so the configure script is rebuilt on autobuilders (which ensures all the source needed to rebuild the configure script is there and makes it easier to patch it) - applies a patch to the upstream build system to add a --disable-werror option - in debian/rules, uses the --disable-werror option Thoughts of all kinds welcome, as usual. Ciao, Jonathan
http://bugs.debian.org/624167 axiom/configure.ac | 15 ++- configure.ac | 15 ++- debian/changelog | 8 ++ debian/control | 2 +- debian/patches/01-configure-disable-werror.patch | 134 ++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 7 +- neethi/configure.ac | 15 ++- util/configure.ac | 15 ++- 9 files changed, 202 insertions(+), 10 deletions(-) create mode 100644 debian/patches/01-configure-disable-werror.patch diff --git a/axiom/configure.ac b/axiom/configure.ac index a7e50b8f..1c10401f 100644 --- a/axiom/configure.ac +++ b/axiom/configure.ac @@ -49,11 +49,24 @@ AC_CHECK_LIB(z, inflate) #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -Wno-implicit-function-declaration" CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -ansi -Werror -Wall -Wno-implicit-function-declaration " + CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration " fi LDFLAGS="$LDFLAGS -lpthread" +AC_MSG_CHECKING(whether to set -Werror) +AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], +[ case "${enableval}" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS -Werror" + ;; + esac ], +) + dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) diff --git a/configure.ac b/configure.ac index e85c9bc4..527b7805 100644 --- a/configure.ac +++ b/configure.ac @@ -63,11 +63,24 @@ fi CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE" + CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -g -D_GNU_SOURCE" # CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration" fi LDFLAGS="$LDFLAGS -lpthread" +AC_MSG_CHECKING(whether to set -Werror) +AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], +[ case "${enableval}" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS -Werror" + ;; + esac ], +) + dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) diff --git a/debian/changelog b/debian/changelog index f8539684..d1be9746 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +axis2c (1.6.0-5.2) local; urgency=low + + * Do not use patchsys-quilt. dpkg-source takes care of applying patches. + * Disable -Werror (Closes: #624167) + * Use dh-autoreconf to run autotools at build time + + -- Jonathan Nieder <[email protected]> Fri, 20 Jul 2012 21:19:48 -0500 + axis2c (1.6.0-5.1) unstable; urgency=low * Non maintainer upload. diff --git a/debian/control b/debian/control index 47795127..5f53f006 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Uploaders: Daniel Nurmi <[email protected]>, Thierry Carrez <[email protected]>, Soren Hansen <[email protected]>, Steffen Moeller <[email protected]> -Build-Depends: cdbs, debhelper (>= 7), autotools-dev, libapr1-dev, apache2-threaded-dev, zlib1g-dev, libssl-dev, quilt +Build-Depends: cdbs, debhelper (>= 7), dh-autoreconf, pkg-config, libapr1-dev, apache2-threaded-dev, zlib1g-dev, libssl-dev, quilt Standards-Version: 3.9.2 DM-Upload-Allowed: yes Homepage: http://ws.apache.org/axis2/c/ diff --git a/debian/patches/01-configure-disable-werror.patch b/debian/patches/01-configure-disable-werror.patch new file mode 100644 index 00000000..b8f04aa7 --- /dev/null +++ b/debian/patches/01-configure-disable-werror.patch @@ -0,0 +1,134 @@ +From: Jonathan Nieder <[email protected]> +Date: Thu, 12 Jan 2012 15:46:43 -0600 +Subject: configure: introduce a --disable-werror switch + +Addresses https://issues.apache.org/jira/browse/AXIS2C-1603 +--- + configure.ac | 15 ++++++++++++++- + axiom/configure.ac | 15 ++++++++++++++- + neethi/configure.ac | 15 ++++++++++++++- + util/configure.ac | 15 ++++++++++++++- + 4 files changed, 56 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e85c9bc4..527b7805 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -63,11 +63,24 @@ fi + CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + if test "$GCC" = "yes"; then +- CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE" ++ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -g -D_GNU_SOURCE" + # CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration" + fi + LDFLAGS="$LDFLAGS -lpthread" + ++AC_MSG_CHECKING(whether to set -Werror) ++AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], ++[ case "${enableval}" in ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ CFLAGS="$CFLAGS -Werror" ++ ;; ++ esac ], ++) ++ + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) +diff --git a/axiom/configure.ac b/axiom/configure.ac +index a7e50b8f..1c10401f 100644 +--- a/axiom/configure.ac ++++ b/axiom/configure.ac +@@ -49,11 +49,24 @@ AC_CHECK_LIB(z, inflate) + #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -Wno-implicit-function-declaration" + CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" + if test "$GCC" = "yes"; then +- CFLAGS="$CFLAGS -ansi -Werror -Wall -Wno-implicit-function-declaration " ++ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration " + fi + + LDFLAGS="$LDFLAGS -lpthread" + ++AC_MSG_CHECKING(whether to set -Werror) ++AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], ++[ case "${enableval}" in ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ CFLAGS="$CFLAGS -Werror" ++ ;; ++ esac ], ++) ++ + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) +diff --git a/neethi/configure.ac b/neethi/configure.ac +index 4d70b47e..d3439431 100644 +--- a/neethi/configure.ac ++++ b/neethi/configure.ac +@@ -34,11 +34,24 @@ AC_CHECK_LIB(dl, dlopen) + #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -Wno-implicit-function-declaration" + CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" + if test "$GCC" = "yes"; then +- CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration " ++ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration " + fi + + LDFLAGS="$LDFLAGS -lpthread" + ++AC_MSG_CHECKING(whether to set -Werror) ++AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], ++[ case "${enableval}" in ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ CFLAGS="$CFLAGS -Werror" ++ ;; ++ esac ], ++) ++ + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) +diff --git a/util/configure.ac b/util/configure.ac +index ab034dff..868a8ef2 100644 +--- a/util/configure.ac ++++ b/util/configure.ac +@@ -55,10 +55,23 @@ AC_CHECK_LIB(compat, ftime) + #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -Wno-implicit-function-declaration" + CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" + if test "$GCC" = "yes"; then +- CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE" ++ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -D_GNU_SOURCE" + fi + LDFLAGS="$LDFLAGS -lpthread" + ++AC_MSG_CHECKING(whether to set -Werror) ++AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], ++[ case "${enableval}" in ++ no) ++ AC_MSG_RESULT(no) ++ ;; ++ *) ++ AC_MSG_RESULT(yes) ++ CFLAGS="$CFLAGS -Werror" ++ ;; ++ esac ], ++) ++ + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) +-- +1.7.8.3 + diff --git a/debian/patches/series b/debian/patches/series index 8aa44192..03a5cfa0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +01-configure-disable-werror.patch 02_fix_doc_dir.patch 03_enable-security.patch 04_fix_testsuite.patch diff --git a/debian/rules b/debian/rules index a5477b52..1a52fcec 100755 --- a/debian/rules +++ b/debian/rules @@ -1,11 +1,10 @@ #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/autotools.mk -include /usr/share/cdbs/1/rules/patchsys-quilt.mk +include /usr/share/cdbs/1/rules/autoreconf.mk DEB_CONFIGURE_PREFIX:=/usr/lib/axis2 -DEB_CONFIGURE_EXTRA_FLAGS := --with-apache2=/usr/include/apache2 --with-apr=/usr/include/apr-1.0 --enable-openssl --enable-multi-thread=no +DEB_CONFIGURE_EXTRA_FLAGS := --disable-werror --with-apache2=/usr/include/apache2 --with-apr=/usr/include/apr-1.0 --enable-openssl --enable-multi-thread=no DEB_CONFIGURE_EXTRA_FLAGS += --enable-tests DEB_MAKE_CHECK_TARGET := check @@ -25,6 +24,4 @@ binary-install/libapache2-mod-axis2c:: sed -i -e "s/\(libdir=.*\)axis2/\1apache2/g" -e "/dependency_libs/ s/'.*'/''/" debian/$(cdbs_curpkg)/usr/lib/apache2/modules/logging/libaxis2_mod_log.la clean:: - find . -name Makefile -print0 | xargs -0 rm || /bin/true chmod 755 tools/codegen/javatool/WSDL2C.sh - diff --git a/neethi/configure.ac b/neethi/configure.ac index 4d70b47e..d3439431 100644 --- a/neethi/configure.ac +++ b/neethi/configure.ac @@ -34,11 +34,24 @@ AC_CHECK_LIB(dl, dlopen) #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -Wno-implicit-function-declaration" CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration " + CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration " fi LDFLAGS="$LDFLAGS -lpthread" +AC_MSG_CHECKING(whether to set -Werror) +AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], +[ case "${enableval}" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS -Werror" + ;; + esac ], +) + dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) diff --git a/util/configure.ac b/util/configure.ac index ab034dff..868a8ef2 100644 --- a/util/configure.ac +++ b/util/configure.ac @@ -55,10 +55,23 @@ AC_CHECK_LIB(compat, ftime) #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -Wno-implicit-function-declaration" CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE" + CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -D_GNU_SOURCE" fi LDFLAGS="$LDFLAGS -lpthread" +AC_MSG_CHECKING(whether to set -Werror) +AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build], +[ case "${enableval}" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS -Werror" + ;; + esac ], +) + dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) -- 1.7.10.4

