On Wed, 09 Oct 2013 10:23:34 +0200, Vincent Danjean wrote:

>   To fix 723964, you just need to allow autoreconf to install new
> files. For example, instead of "autoreconf", you can put
> "autoreconf -vif" in debian/rules.

That's true but then the package doesn't build twice:

 dpkg-source -b devtodo-0.1.20
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building devtodo using existing ./devtodo_0.1.20.orig.tar.gz
dpkg-source: warning: ignoring deletion of file Makefile.in
dpkg-source: warning: ignoring deletion of file config.sub
dpkg-source: warning: ignoring deletion of file config.guess
dpkg-source: warning: ignoring deletion of file configure
dpkg-source: warning: ignoring deletion of file aclocal.m4
dpkg-source: warning: ignoring deletion of file src/Makefile.in
dpkg-source: warning: ignoring deletion of file util/Makefile.in
dpkg-source: warning: ignoring deletion of file doc/Makefile.in
dpkg-source: warning: executable mode 0755 of 'compile' will not be represented 
in diff
dpkg-source: info: local changes detected, the modified files are:
 devtodo-0.1.20/INSTALL
 devtodo-0.1.20/compile
 devtodo-0.1.20/config.h.in
 devtodo-0.1.20/depcomp
 devtodo-0.1.20/install-sh
 devtodo-0.1.20/ltmain.sh
 devtodo-0.1.20/missing
dpkg-source: error: aborting due to unexpected upstream changes, see 
/tmp/devtodo_0.1.20-6.1.diff.h4SvXa
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-buildpackage: error: dpkg-source -b devtodo-0.1.20 gave error exit status 2
E: Failed autobuilding of package

>   Another possibility to fix this bug is to use the dh-autoreconf
> package (build-depends on it and call dh with "--with autoreconf"
>   => this will invoke autoreconf with good option, this will take
> care of the restoration of removed files (Makefile.in, ...) and
> modified files (config.{guess,sub}, ...)
> I think it would be better for long-term maintainability but it
> involves more modification (mainly simplification of debian/rules)

Right, that would be the best solution, although a bit invasive for
an NMU ...

A compromise would be to throw dh_autoreconf_clean and
dh_autoreconf_clean into debian/rules and removing the manual actions
there, hereby preserving most of the structure. But that's also not
very elegant.

Anyway, pattch attached for this idea (seems to work, also with
building twice).

Hm, while we're there, I'm also attaching the more invasive rewrite
... (also tested with building twice).


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Your Eyes
diff -Nru devtodo-0.1.20/debian/changelog devtodo-0.1.20/debian/changelog
--- devtodo-0.1.20/debian/changelog	2012-06-19 03:38:36.000000000 +0200
+++ devtodo-0.1.20/debian/changelog	2013-10-29 17:39:30.000000000 +0100
@@ -1,3 +1,14 @@
+devtodo (0.1.20-6.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "FTBFS: required file './compile' not found":
+    use dh_autoreconf{,_clean} in debian/rules, build-depend on
+    dh-autoreconf.
+    Thanks to Vincent Danjean for the analysis.
+    (Closes: #723964)
+
+ -- gregor herrmann <gre...@debian.org>  Tue, 29 Oct 2013 17:29:50 +0100
+
 devtodo (0.1.20-6) unstable; urgency=low
 
   * fix SYNOPSIS spelling in manpage (Closes: #534236)
diff -Nru devtodo-0.1.20/debian/control devtodo-0.1.20/debian/control
--- devtodo-0.1.20/debian/control	2012-06-19 03:32:57.000000000 +0200
+++ devtodo-0.1.20/debian/control	2013-10-29 17:35:21.000000000 +0100
@@ -2,7 +2,7 @@
 Section: utils
 Priority: optional
 Maintainer: Ryan Niebur <r...@debian.org>
-Build-Depends: debhelper (>= 7.2), autotools-dev, libreadline-dev, libncurses-dev, bash-completion, automake, autoconf, libtool, dpkg-dev (>= 1.16.1~)
+Build-Depends: debhelper (>= 7.2), dh-autoreconf, libreadline-dev, libncurses-dev, bash-completion, automake, autoconf, libtool, dpkg-dev (>= 1.16.1~)
 Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/collab-maint/devtodo.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/devtodo.git;a=summary
diff -Nru devtodo-0.1.20/debian/rules devtodo-0.1.20/debian/rules
--- devtodo-0.1.20/debian/rules	2012-06-19 03:28:47.000000000 +0200
+++ devtodo-0.1.20/debian/rules	2013-10-29 17:36:57.000000000 +0100
@@ -7,25 +7,23 @@
 destdir=$(CURDIR)/debian/devtodo/
 
 override_dh_auto_configure:
+	dh_autoreconf
 	dh_auto_configure -- CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 build: build-arch build-indep
 build-arch: build-stamp
 build-indep: build-stamp
 build-stamp:
-	ln -sf /usr/share/misc/config.sub config.sub
-	ln -sf /usr/share/misc/config.guess config.guess
-	autoreconf
 	dh build
 	touch build-stamp
 
-override_dh_auto_build:
-	cp /usr/bin/libtool ./
-	dh_auto_build
-
 clean:
 	dh clean
 
+override_dh_clean:
+	dh_autoreconf_clean
+	dh_clean
+
 install: build
 	dh install
 	rm $(destdir)/usr/bin/tdl $(destdir)/usr/share/man/man1/tdl.1.gz
diff -Nru devtodo-0.1.20/debian/changelog devtodo-0.1.20/debian/changelog
--- devtodo-0.1.20/debian/changelog	2012-06-19 03:38:36.000000000 +0200
+++ devtodo-0.1.20/debian/changelog	2013-10-29 17:44:16.000000000 +0100
@@ -1,3 +1,14 @@
+devtodo (0.1.20-6.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "FTBFS: required file './compile' not found":
+    use dh-autoreconf and dh(1) in debian/rules, build-depend on
+    dh-autoreconf.
+    Thanks to Vincent Danjean for the analysis.
+    (Closes: #723964)
+
+ -- gregor herrmann <gre...@debian.org>  Tue, 29 Oct 2013 17:29:50 +0100
+
 devtodo (0.1.20-6) unstable; urgency=low
 
   * fix SYNOPSIS spelling in manpage (Closes: #534236)
diff -Nru devtodo-0.1.20/debian/control devtodo-0.1.20/debian/control
--- devtodo-0.1.20/debian/control	2012-06-19 03:32:57.000000000 +0200
+++ devtodo-0.1.20/debian/control	2013-10-29 17:35:21.000000000 +0100
@@ -2,7 +2,7 @@
 Section: utils
 Priority: optional
 Maintainer: Ryan Niebur <r...@debian.org>
-Build-Depends: debhelper (>= 7.2), autotools-dev, libreadline-dev, libncurses-dev, bash-completion, automake, autoconf, libtool, dpkg-dev (>= 1.16.1~)
+Build-Depends: debhelper (>= 7.2), dh-autoreconf, libreadline-dev, libncurses-dev, bash-completion, automake, autoconf, libtool, dpkg-dev (>= 1.16.1~)
 Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/collab-maint/devtodo.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/devtodo.git;a=summary
diff -Nru devtodo-0.1.20/debian/rules devtodo-0.1.20/debian/rules
--- devtodo-0.1.20/debian/rules	2012-06-19 03:28:47.000000000 +0200
+++ devtodo-0.1.20/debian/rules	2013-10-29 17:46:40.000000000 +0100
@@ -6,41 +6,18 @@
 
 destdir=$(CURDIR)/debian/devtodo/
 
+%:
+	dh $@ --with autoreconf,bash_completion
+
 override_dh_auto_configure:
 	dh_auto_configure -- CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
 
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp:
-	ln -sf /usr/share/misc/config.sub config.sub
-	ln -sf /usr/share/misc/config.guess config.guess
-	autoreconf
-	dh build
-	touch build-stamp
-
-override_dh_auto_build:
-	cp /usr/bin/libtool ./
-	dh_auto_build
-
-clean:
-	dh clean
-
-install: build
-	dh install
-	rm $(destdir)/usr/bin/tdl $(destdir)/usr/share/man/man1/tdl.1.gz
+override_dh_auto_install:
+	dh_auto_install
+	rm $(destdir)/usr/bin/tdl $(destdir)/usr/share/man/man1/tdl.1
 	cp contrib/devtodo.bash-completion debian/
-	dh_bash-completion
-
-binary-indep: build install
 
 override_dh_fixperms:
 	dh_fixperms
 	# for scripts.sh and scripts.tcsh
 	chmod 644 $(CURDIR)/debian/devtodo/usr/share/doc/devtodo/examples/scripts.*sh
-
-binary-arch: build install
-	dh binary-arch
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install

Attachment: signature.asc
Description: Digital signature

Reply via email to