- Package:
- dh-autoreconf
- Source:
- dh-autoreconf
- Submitter:
- Russ Allbery
- Date:
- 2023-08-20 06:27:05 UTC
- Severity:
- normal
I'm not exactly sure whose bug this is, but I'll start here. I have a package (gnubg) which uses mkinstalldirs. After the first build and clean cycle, mkinstalldirs has been deleted by dh_autoreconf_clean. But then running autoreconf doesn't bring it back, which means that the build fails. As near as I can tell, autoreconf updates mkinstalldirs if it exists, but if it's been deleted, it doesn't copy it into the source tree, which leads to build failures when the package is built twice in sequence. This may actually be a bug in autoreconf; I'm not sure whether it should be reassigned there, or whether it's something dh-autoreconf should deal with.
Thanks for the bug report, I feared that something like this happens somewhere. A solution on the dh-autoreconf would be to switch from the current checksum and delete approach to a hardlink + restore approach. If we change dh-autoreconf to do this in jessie, we should do a rebuild of all things build-depending on it to make sure that nothing breaks (for example, because a file is updated in place and the hardlink thus not working). But I really believe that automake should reinstall that file if it is missing.
I came across a similar issue while trying to convert the package ufraw to use dh-autoreconf. At the start of the second build, dh_autoreconf_clean would delete mkinstalldirs and the build would fail. It seems that dh_autoreconf was replacing mkinstalldirs with a copy from /usr/share/automake-1.11/mkinstalldirs, and there were minor differences between these two files, causing dh_autoreconf_clean to delete the modified file. For now, I have patched mkinstalldirs included with ufraw as below, but this seems a rather fragile workaround.--- a/mkinstalldirs +++ b/mkinstalldirs @@ -81,9 +81,9 @@ echo "mkdir -p -- $*" exec mkdir -p -- "$@" else - # On NextStep and OpenStep, the 'mkdir' command does not + # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as - # directories to create, and then abort because '.' already + # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version
Control: unblock 924973 by 670796 Control: unblock 1049821 by 670796 As workaround, I am currently using following in g3dviewer: diff --git a/debian/rules b/debian/rules index 0ef8b15b5613ea736ecaaa72bc6b4b000de38017..a99803c6f7db41b04f40585e8095213a46da4850 100755 --- a/debian/rules +++ b/debian/rules @@ -7,8 +7,11 @@ export DEB_CPPFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64 binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep: dh $@ +override_dh_autoreconf: + dh_autoreconf -Xmkinstalldirs + override_dh_installdocs: dh_installdocs -A README NEWS TODO AUTHORS .PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \ - override_dh_installdocs + override_dh_installdocs override_dh_autoreconf diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000000000000000000000000000000000000..039409ebff7151490cbd46057186153e1be682e4 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "(^|/)mkinstalldirs$"