Package: autotools-dev Version: 20161112.1 Severity: wishlist Tags: patch Hi,
As discussed in [1], let us deprecate the debhelper tools/sequence from autotools-dev and recommend dh_update_autotools_config as a replacement. I have attached some patches for this purpose. I am happy to apply them and upload on your behalf if you are short on time / capacity. :) Thanks, ~Niels [1] https://lists.alioth.debian.org/pipermail/debhelper-devel/2017-August/006304.html
>From 6055bfee2688d2082666420ac18c421fbcd375d5 Mon Sep 17 00:00:00 2001 From: Niels Thykier <[email protected]> Date: Wed, 2 Aug 2017 18:18:27 +0000 Subject: [PATCH 1/2] Deprecate debhelper tools + sequence Signed-off-by: Niels Thykier <[email protected]> --- debian/autotools_dev.pm | 3 +++ debian/changelog | 7 +++++++ debian/dh_autotools-dev_restoreconfig | 9 +++++++++ debian/dh_autotools-dev_updateconfig | 10 ++++++++++ 4 files changed, 29 insertions(+) diff --git a/debian/autotools_dev.pm b/debian/autotools_dev.pm index ad37384..2c54f78 100644 --- a/debian/autotools_dev.pm +++ b/debian/autotools_dev.pm @@ -3,6 +3,9 @@ use warnings; use strict; use Debian::Debhelper::Dh_Lib; + +deprecated_functionality('The autotools-dev sequence is deprecated and replaced by dh in debhelper (>= 9.20160115)', 11); + insert_before("dh_auto_configure", "dh_autotools-dev_updateconfig"); insert_before("dh_clean", "dh_autotools-dev_restoreconfig"); diff --git a/debian/changelog b/debian/changelog index d9e4eb3..d48001d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +autotools-dev (20161112.2) UNRELEASED; urgency=medium + + * Deprecate debhelper tools and sequence. They have been + replaced by debhelper (>= 9.20160115). + + -- Niels Thykier <[email protected]> Wed, 02 Aug 2017 18:02:42 +0000 + autotools-dev (20161112.1) unstable; urgency=medium * Sync to upstream git 2016-11-12 diff --git a/debian/dh_autotools-dev_restoreconfig b/debian/dh_autotools-dev_restoreconfig index 7969ee0..f505594 100644 --- a/debian/dh_autotools-dev_restoreconfig +++ b/debian/dh_autotools-dev_restoreconfig @@ -15,6 +15,13 @@ B<dh_autotools-dev_restoreconfig> [S<I<debhelper options>>] =head1 DESCRIPTION +B<Deprecated>: dh_autotools-dev_updateconfig and +dh_autotools-dev_restoreconfig are deprecated and replaced by +L<dh_update_autotools_config(1)> and L<dh_clean(1)> from debhelper. +Please replace all uses of dh_autotools-dev_updateconfig with +dh_update_autotools_config and then remove any use of +dh_autotools-dev_restoreconfig. + dh_autotools-dev_restoreconfig restores the original B<config.sub> and B<config.guess> files that have been backed up by dh_autotools-dev_updateconfig under the names B<config.sub.dh-orig> and B<config.guess.dh-orig>. @@ -40,6 +47,8 @@ It can also be direcly called in the clean rule. init(); +deprecated_functionality('dh_autotools-dev_restoreconfig is deprecated; please see dh_autotools-dev_restoreconfig(1) for a replacement', 11); + complex_doit('for c_g in `find . -type f -name config.guess` ; do if test -e "$c_g.dh-orig" ; then mv -f "$c_g.dh-orig" "$c_g" ; fi ; done'); complex_doit('for c_s in `find . -type f -name config.sub` ; do if test -e "$c_s.dh-orig" ; then mv -f "$c_s.dh-orig" "$c_s" ; fi ; done'); complex_doit('find . -type f \( -name config.guess.dh-orig -o -name config.sub.dh-orig \) -delete'); diff --git a/debian/dh_autotools-dev_updateconfig b/debian/dh_autotools-dev_updateconfig index 8b6cb57..4364332 100644 --- a/debian/dh_autotools-dev_updateconfig +++ b/debian/dh_autotools-dev_updateconfig @@ -15,6 +15,14 @@ B<dh_autotools-dev_updateconfig> [S<I<debhelper options>>] =head1 DESCRIPTION +B<Deprecated>: dh_autotools-dev_updateconfig and +dh_autotools-dev_restoreconfig are deprecated and replaced by +L<dh_update_autotools_config(1)> and L<dh_clean(1)> from debhelper. +Please replace all uses of dh_autotools-dev_updateconfig with +dh_update_autotools_config and then remove any use of +dh_autotools-dev_restoreconfig. + + dh_autotools-dev_updateconfig replaces all occurances of B<config.sub> and B<config.guess> in the source tree by the up-to-date versions found in the autotools-dev package. The original files are backed up under the names B<config.sub.dh-orig> and @@ -40,6 +48,8 @@ rule. init(); +deprecated_functionality('dh_autotools-dev_updateconfig is deprecated; please see dh_autotools-dev_updateconfig(1) for a replacement', 11); + complex_doit('for c_g in `find -type f -name config.guess` ; do if ! test -e "$c_g.dh-orig" ; then mv -f "$c_g" "$c_g.dh-orig" ; cp -f /usr/share/misc/config.guess "$c_g" ; fi ; done'); complex_doit('for c_s in `find -type f -name config.sub` ; do if ! test -e "$c_s.dh-orig" ; then mv -f "$c_s" "$c_s.dh-orig" ; cp -f /usr/share/misc/config.sub "$c_s" ; fi ; done'); -- 2.14.2
>From 600b6e3a4853619d5e2c68cd7c19506b15aded2f Mon Sep 17 00:00:00 2001 From: Niels Thykier <[email protected]> Date: Wed, 2 Aug 2017 18:46:39 +0000 Subject: [PATCH 2/2] Update autotools-dev.README.Debian Signed-off-by: Niels Thykier <[email protected]> --- debian/autotools-dev.README.Debian | 27 +++++++++++++-------------- debian/changelog | 2 ++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/debian/autotools-dev.README.Debian b/debian/autotools-dev.README.Debian index 43cec3e..faa2b1a 100644 --- a/debian/autotools-dev.README.Debian +++ b/debian/autotools-dev.README.Debian @@ -119,8 +119,8 @@ and autoconf and contains generated files. You do *not* have the choice of using this method when libtool is being used in the build. Use the method 1 above, instead. - You can use dh_autotools* to help automate the config.sub and - config.guess update at package build time. + You can use dh_update_autotools_config from debhelper to help automate + the config.sub and config.guess update at package build time. This document contains enough information to properly implement any of the @@ -336,20 +336,19 @@ requires a build-dependency on autotools-dev, of course. Using the debhelper helpers: -If you use the "dh" command provided by debhelper mode v7 and newer, -please check the dh_autotools-dev_updateconfig manpage on how to enable -the "autotools_dev" dh module. It will update config.sub and config.guess -for the build. +If you use the "dh" command provided by debhelper at version 9.20160115 +or later, then it will automatically call dh_update_autotools_config to +update config.sub and config.guess for the build. You should also check the dh-autoreconf documentation to automate -retooling on build time, which is preferred over just updating config.sub -and config.guess. Do NOT use dh-autoreconf and dh_autotools-dev_* helpers -at the same time, dh-autoreconf takes care of updating config.sub and -config.guess by itself. - -dh_autotools-dev_updateconfig and dh_autotools-dev_restoreconfig can be -used directly instead of the "dh" module. Refer to their respective -manpages for examples. +retooling on build time, which is preferred over just updating +config.sub and config.guess. Be careful with mixing the "autoreconf" +and "autotools-dev" dh sequences as they are order sensitive. Please +consider simply removing the "autotools-dev" sequence and rely on +debhelper (>= 9.20160115) built-in functionality. + +dh_update_autotools_config can be used directly without relying on "dh". +Refer to its manpage for more information. CDBS-based packages: diff --git a/debian/changelog b/debian/changelog index d48001d..723ee5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ autotools-dev (20161112.2) UNRELEASED; urgency=medium * Deprecate debhelper tools and sequence. They have been replaced by debhelper (>= 9.20160115). + * Update autotools-dev.README.Debian to reflect the current + status. (Closes: #812521) -- Niels Thykier <[email protected]> Wed, 02 Aug 2017 18:02:42 +0000 -- 2.14.2

