Patchwork Add dh-autoreconf support and clean up generated files (LP: #1042287)

login
register
mail settings
Submitter Keng-Yu Lin
Date Aug. 28, 2012, 6:47 a.m.
Message ID <1346136437-29365-1-git-send-email-kengyu@canonical.com>
Download mbox | patch
Permalink /patch/180341/
State Accepted
Headers show

Comments

Keng-Yu Lin - Aug. 28, 2012, 6:47 a.m.
dh-autoreconf/dh_autoreconf_clean can handle the clean-up job if it is used.
dh-autoreconf package is available in Lucid-backports and any newer
Ubuntu release.

The patch also cleans up some output files generated by flex.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 debian/control         |    2 +-
 debian/rules           |    6 ++----
 src/acpica/Makefile.am |   10 +++++++++-
 3 files changed, 12 insertions(+), 6 deletions(-)

We can configure the PPA to support -backports.
Colin King - Aug. 29, 2012, 8:15 a.m.
On 28/08/12 07:47, Keng-Yu Lin wrote:
> dh-autoreconf/dh_autoreconf_clean can handle the clean-up job if it is used.
> dh-autoreconf package is available in Lucid-backports and any newer
> Ubuntu release.
>
> The patch also cleans up some output files generated by flex.
>
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>   debian/control         |    2 +-
>   debian/rules           |    6 ++----
>   src/acpica/Makefile.am |   10 +++++++++-
>   3 files changed, 12 insertions(+), 6 deletions(-)
>
> We can configure the PPA to support -backports.
>
> diff --git a/debian/control b/debian/control
> index cd7e199..d8a62bb 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -4,7 +4,7 @@ Priority: optional
>   Maintainer: Firmware Testing Team <firmware-testing-team@lists.launchpad.net>
>   Uploaders: Colin King <colin.king@ubuntu.com>, Keng-Yu Lin <kengyu@ubuntu.com>, Alex Hung <alex.hung@canonical.com>, Chris Van Hoof <vanhoof@canonical.com>, Ivan Hu <ivan.hu@canonical.com>
>   Standards-Version: 3.9.3
> -Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison
> +Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper, dh-autoreconf
>
>   Package: fwts
>   Architecture: any
> diff --git a/debian/rules b/debian/rules
> index 0f317e6..bc81959 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -1,8 +1,6 @@
>   #!/usr/bin/make -f
>
> -override_dh_auto_configure:
> -	autoreconf -ivf
> -	dh_auto_configure
> +export DEB_BUILD_HARDENING=1
>
>   %:
> -	dh $@
> +	dh $@ --with autoreconf
> diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
> index 6b3bfa5..46d801f 100644
> --- a/src/acpica/Makefile.am
> +++ b/src/acpica/Makefile.am
> @@ -40,7 +40,15 @@ dscontrol_munged.c: $(ACPICA_COMP)/dispatcher/dscontrol.c
>
>   BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c
>
> -CLEANFILES = osunixxf_munged.c
> +CLEANFILES = osunixxf_munged.c \
> +	dscontrol_munged.c \
> +	$(ACPICA_SRC)/compiler/aslcompiler.output \
> +	$(ACPICA_SRC)/compiler/dtparser.output \
> +	$(ACPICA_SRC)/compiler/dtparser.y.h \
> +	$(ACPICA_SRC)/compiler/prparser.output \
> +	$(ACPICA_SRC)/compiler/prparser.y.h \
> +	$(ACPICA_SRC)/compiler/prparserlex.c \
> +	$(ACPICA_SRC)/compiler/prparserparse.c
>
>   pkglib_LTLIBRARIES = libfwtsacpica.la
>   libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0
>
Acked-by: Colin Ian King <colin.king@canonical.com>
Chris Van Hoof - Aug. 29, 2012, 4:02 p.m.
On 08/28/2012 02:47 AM, Keng-Yu Lin wrote:
> dh-autoreconf/dh_autoreconf_clean can handle the clean-up job if it is used.
> dh-autoreconf package is available in Lucid-backports and any newer
> Ubuntu release.
> 
> The patch also cleans up some output files generated by flex.
> 
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>  debian/control         |    2 +-
>  debian/rules           |    6 ++----
>  src/acpica/Makefile.am |   10 +++++++++-
>  3 files changed, 12 insertions(+), 6 deletions(-)
> 
> We can configure the PPA to support -backports.
> 
> diff --git a/debian/control b/debian/control
> index cd7e199..d8a62bb 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -4,7 +4,7 @@ Priority: optional
>  Maintainer: Firmware Testing Team <firmware-testing-team@lists.launchpad.net>
>  Uploaders: Colin King <colin.king@ubuntu.com>, Keng-Yu Lin <kengyu@ubuntu.com>, Alex Hung <alex.hung@canonical.com>, Chris Van Hoof <vanhoof@canonical.com>, Ivan Hu <ivan.hu@canonical.com>
>  Standards-Version: 3.9.3
> -Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison
> +Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper, dh-autoreconf
>  
>  Package: fwts
>  Architecture: any
> diff --git a/debian/rules b/debian/rules
> index 0f317e6..bc81959 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -1,8 +1,6 @@
>  #!/usr/bin/make -f
>  
> -override_dh_auto_configure:
> -	autoreconf -ivf
> -	dh_auto_configure
> +export DEB_BUILD_HARDENING=1
>  
>  %:
> -	dh $@
> +	dh $@ --with autoreconf
> diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
> index 6b3bfa5..46d801f 100644
> --- a/src/acpica/Makefile.am
> +++ b/src/acpica/Makefile.am
> @@ -40,7 +40,15 @@ dscontrol_munged.c: $(ACPICA_COMP)/dispatcher/dscontrol.c
>  
>  BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c
>  
> -CLEANFILES = osunixxf_munged.c
> +CLEANFILES = osunixxf_munged.c \
> +	dscontrol_munged.c \
> +	$(ACPICA_SRC)/compiler/aslcompiler.output \
> +	$(ACPICA_SRC)/compiler/dtparser.output \
> +	$(ACPICA_SRC)/compiler/dtparser.y.h \
> +	$(ACPICA_SRC)/compiler/prparser.output \
> +	$(ACPICA_SRC)/compiler/prparser.y.h \
> +	$(ACPICA_SRC)/compiler/prparserlex.c \
> +	$(ACPICA_SRC)/compiler/prparserparse.c
>  
>  pkglib_LTLIBRARIES = libfwtsacpica.la
>  libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0

Gave this a spin locally, looks good to me!

--chris

Acked-by: Chris Van Hoof <vanhoof@canonical.com>

Patch

diff --git a/debian/control b/debian/control
index cd7e199..d8a62bb 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@  Priority: optional
 Maintainer: Firmware Testing Team <firmware-testing-team@lists.launchpad.net>
 Uploaders: Colin King <colin.king@ubuntu.com>, Keng-Yu Lin <kengyu@ubuntu.com>, Alex Hung <alex.hung@canonical.com>, Chris Van Hoof <vanhoof@canonical.com>, Ivan Hu <ivan.hu@canonical.com>
 Standards-Version: 3.9.3
-Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison
+Build-Depends: debhelper (>= 7.0.50~), autoconf, automake, libtool, libpcre3-dev (>= 7.8), libjson0-dev (>= 0.9), flex, bison, hardening-wrapper, dh-autoreconf
 
 Package: fwts
 Architecture: any
diff --git a/debian/rules b/debian/rules
index 0f317e6..bc81959 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,6 @@ 
 #!/usr/bin/make -f
 
-override_dh_auto_configure:
-	autoreconf -ivf
-	dh_auto_configure
+export DEB_BUILD_HARDENING=1
 
 %:
-	dh $@
+	dh $@ --with autoreconf
diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
index 6b3bfa5..46d801f 100644
--- a/src/acpica/Makefile.am
+++ b/src/acpica/Makefile.am
@@ -40,7 +40,15 @@  dscontrol_munged.c: $(ACPICA_COMP)/dispatcher/dscontrol.c
 
 BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c
 
-CLEANFILES = osunixxf_munged.c
+CLEANFILES = osunixxf_munged.c \
+	dscontrol_munged.c \
+	$(ACPICA_SRC)/compiler/aslcompiler.output \
+	$(ACPICA_SRC)/compiler/dtparser.output \
+	$(ACPICA_SRC)/compiler/dtparser.y.h \
+	$(ACPICA_SRC)/compiler/prparser.output \
+	$(ACPICA_SRC)/compiler/prparser.y.h \
+	$(ACPICA_SRC)/compiler/prparserlex.c \
+	$(ACPICA_SRC)/compiler/prparserparse.c
 
 pkglib_LTLIBRARIES = libfwtsacpica.la
 libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0