[Build-common-hackers] Bug#290940: marked as done (Improvements for updating config.* files)

Debian Bug Tracking System owner@bugs.debian.org
Wed, 18 May 2005 03:18:27 -0700


Your message dated Wed, 18 May 2005 12:03:15 +0200
with message-id <20050518100315.GA14625@aragorn>
and subject line ack NMUs
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 17 Jan 2005 21:25:15 +0000
>From rmh@debian.org Mon Jan 17 13:25:15 2005
Return-path: <rmh@debian.org>
Received: from 174.red-62-57-140.user.auna.net (khazad.dyndns.org) [62.57.140.174] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CqeN6-000108-00; Mon, 17 Jan 2005 13:25:14 -0800
Received: from rmh by khazad.dyndns.org with local (Exim 4.34)
	id 1CqeHs-000H0y-Lg; Mon, 17 Jan 2005 22:19:48 +0100
Content-Type: multipart/mixed; boundary="===============0071373087=="
MIME-Version: 1.0
From: Robert Millan <rmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Improvements for updating config.* files
X-Mailer: reportbug 3.5
Date: Mon, 17 Jan 2005 22:19:47 +0100
Message-Id: <E1CqeHs-000H0y-Lg@khazad.dyndns.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,DATING,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

This is a multi-part MIME message sent by reportbug.

--===============0071373087==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: cdbs
Version: 0.4.26-1.1
Severity: wishlist
Tags: patch

  - Move auto-update config.{guess,sub} code to buildcore.mk
  - If config.{guess,sub} are found in source dir, and debian/control
    autogeneration is enabled, add autotools-dev to build-depends.
  - Ditto for config.rpath and gnulib.
  - Move part of the tarball logic to buildcore.mk.  Find out if config.*
    files that need updating are in the tarball (during clean target before
    it is unpacked) and add autotools-dev/gnulib dependencies if this is so.
  - In tarball.mk, use the precached location of config.* files to update them
    rapidly.
  - Detect if the package we're building is autotools-dev or gnulib, in which
    case avoid recursive braindamage (gnulib is cdbs'ed, autotools-dev not yet)

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i386)
Kernel: GNU/kFreeBSD 5.3+1-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

-- no debconf information

--===============0071373087==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="config_update.diff"

diff -ur cdbs-0.4.26.old/1/class/autotools-files.mk.in cdbs-0.4.26/1/class/autotools-files.mk.in
--- cdbs-0.4.26.old/1/class/autotools-files.mk.in	2004-09-05 19:56:36.000000000 +0200
+++ cdbs-0.4.26/1/class/autotools-files.mk.in	2005-01-17 20:41:59.000000000 +0100
@@ -68,14 +68,6 @@
 	if test -n "$(DEB_AUTO_UPDATE_AUTOMAKE)" ; then \
 		if test -e $(DEB_SRCDIR)/Makefile.am ; then cd $(DEB_SRCDIR) && automake-$(DEB_AUTO_UPDATE_AUTOMAKE) ; fi ; \
 	fi
-	for ext in guess sub ; do \
-		if test -e /usr/share/misc/config.$$ext ; then \
-			for i in `find $(DEB_SRCDIR) -type f -name config.$$ext` ; do \
-				mv $$i $$i.cdbs-orig ; \
-				cp -f /usr/share/misc/config.$$ext $$i ; \
-			done ; \
-		fi ; \
-	done
 	touch debian/stamp-autotools-files
 
 clean::
diff -ur cdbs-0.4.26.old/1/rules/buildcore.mk.in cdbs-0.4.26/1/rules/buildcore.mk.in
--- cdbs-0.4.26.old/1/rules/buildcore.mk.in	2004-09-24 19:42:07.000000000 +0200
+++ cdbs-0.4.26/1/rules/buildcore.mk.in	2005-01-17 21:58:22.000000000 +0100
@@ -49,12 +49,75 @@
 $(patsubst %,cleanbuilddir/%,$(DEB_PACKAGES)) :: cleanbuilddir/% : 
 	-if test -n "$(DEB_BUILDDIR_$(cdbs_curpkg))" && test "$(DEB_BUILDDIR_$(cdbs_curpkg))" != "$(DEB_SRCDIR)"; then rmdir "$(DEB_BUILDDIR_$(cdbs_curpkg))"; fi
 
+
+# This variable is used by tarball.mk, but we want it here in order to check
+# tarball contents before unpacking.  tarball.mk imports this file anyway.
+DEB_TARBALL ?= $(wildcard *.tar *.tgz *.tar.gz *.tar.bz *.tar.bz2 *.zip)
+
+ifneq (, $(findstring .bz2, $(DEB_TARBALL)))
+CDBS_BUILD_DEPENDS    := $(CDBS_BUILD_DEPENDS), bzip2
+endif
+ifneq (, $(findstring .zip, $(DEB_TARBALL)))
+CDBS_BUILD_DEPENDS    := $(CDBS_BUILD_DEPENDS), unzip
+endif
+
+# make is dumb
+close_parenthesis := )
+
+# Avoid recursive braindamage if we're building autotools-dev
+ifeq (, $(shell grep -x 'Package: autotools-dev' debian/control))
+config_guess		:= $(shell find $(DEB_SRCDIR) -type f -name config.guess)
+config_sub		:= $(shell find $(DEB_SRCDIR) -type f -name config.sub)
+ifneq (, $(DEB_TARBALL))
+config_guess_tar	:= $(shell for i in $(DEB_TARBALL) ; do case $$i in *.tar$(close_parenthesis) tar -tf $$i | grep /config.guess ;; *.tgz|*.tar.gz$(close_parenthesis) tar -tzf $$i | grep /config.guess ;; *.tar.bz|*.tar.bz2$(close_parenthesis) tar -tjf $$i | grep /config.guess ;; *.zip$(close_parenthesis) unzip -l $$i | grep /config.guess ;; esac ; done)
+config_sub_tar		:= $(shell for i in $(DEB_TARBALL) ; do case $$i in *.tar$(close_parenthesis) tar -tf $$i | grep /config.sub ;; *.tgz|*.tar.gz$(close_parenthesis) tar -tzf $$i | grep /config.sub ;; *.tar.bz|*.tar.bz2$(close_parenthesis) tar -tjf $$i | grep /config.sub ;; *.zip$(close_parenthesis) unzip -l $$i | grep /config.sub ;; esac ; done)
+endif
+endif
+# Ditto for gnulib
+ifeq (, $(shell grep -x 'Package: gnulib' debian/control))
+config_rpath		:= $(shell find $(DEB_SRCDIR) -type f -name config.rpath)
+ifneq (, $(DEB_TARBALL))
+config_rpath_tar	:= $(shell for i in $(DEB_TARBALL) ; do case $$i in *.tar$(close_parenthesis) tar -tf $$i | grep /config.rpath ;; *.tgz|*.tar.gz$(close_parenthesis) tar -tzf $$i | grep /config.rpath ;; *.tar.bz|*.tar.bz2$(close_parenthesis) tar -tjf $$i | grep /config.rpath ;; *.zip$(close_parenthesis) unzip -l $$i | grep /config.rpath ;; esac ; done)
+endif
+endif
+
+ifneq (, $(config_guess)$(config_sub)$(config_guess_tar)$(config_sub_tar))
+CDBS_BUILD_DEPENDS	:= $(CDBS_BUILD_DEPENDS), autotools-dev
+endif
+ifneq (, $(config_rpath)$(config_rpath_tar))
+CDBS_BUILD_DEPENDS	:= $(CDBS_BUILD_DEPENDS), gnulib (>= 0.0.20041014-2)
+endif
+
 # This target is called before almost anything else happens.  It's a good place
 # to do stuff like unpack extra source tarballs, apply patches, and stuff.  In
 # the future it will be a good place to generate debian/control, but right
 # now we don't support that very well.
 pre-build:: testdir makebuilddir
 	$(foreach x,$(_cdbs_deprecated_vars),$(warning "$x is a deprecated variable"))
+ifneq (, $(config_guess))
+	if test -e /usr/share/misc/config.guess ; then \
+		for i in $(config_guess) ; do \
+			mv $$i $$i.cdbs-orig ; \
+			cp -f /usr/share/misc/config.guess $$i ; \
+		done ; \
+	fi
+endif
+ifneq (, $(config_sub))
+	if test -e /usr/share/misc/config.sub ; then \
+		for i in $(config_sub) ; do \
+			mv $$i $$i.cdbs-orig ; \
+			cp -f /usr/share/misc/config.sub $$i ; \
+		done ; \
+	fi
+endif
+ifneq (, $(config_rpath))
+	if test -e /usr/share/gnulib/config/config.rpath ; then \
+		for i in $(config_rpath) ; do \
+			mv $$i $$i.cdbs-orig ; \
+			cp -f /usr/share/gnulib/config/config.rpath $$i ; \
+		done ; \
+	fi
+endif
 
 # This target is called after patches are applied.  Right now it's only used
 # by the patch system.
@@ -103,9 +166,10 @@
 
 debian/control::
 ifneq ($(DEB_AUTO_UPDATE_DEBIAN_CONTROL),)
-	cat debian/control.in \
-	| sed "s/@cdbs@/$(CDBS_BUILD_DEPENDS)/g" \
-	> debian/control
+	sed -e "s/@cdbs@/$(CDBS_BUILD_DEPENDS)/g" \
+	< debian/control.in > debian/control
+	# make sure new build-depends (if any) are installed
+	dpkg-checkbuilddeps -B
 endif
 
 # This rule is called before the common-install target.  It's currently only
diff -ur cdbs-0.4.26.old/1/rules/tarball.mk.in cdbs-0.4.26/1/rules/tarball.mk.in
--- cdbs-0.4.26.old/1/rules/tarball.mk.in	2005-01-17 18:08:11.000000000 +0100
+++ cdbs-0.4.26/1/rules/tarball.mk.in	2005-01-17 21:56:54.000000000 +0100
@@ -32,15 +32,6 @@
 # The user developper may override this variable to choose which tarballs
 # to unpack.
 
-DEB_TARBALL ?= $(wildcard *.tgz *.tar.gz *.tar.bz *.tar.bz2 *.zip)
-
-ifneq (, $(findstring .bz2, $(DEB_TARBALL)))
-CDBS_BUILD_DEPENDS    := $(CDBS_BUILD_DEPENDS), bzip2
-endif
-ifneq (, $(findstring .zip, $(DEB_TARBALL)))
-CDBS_BUILD_DEPENDS    := $(CDBS_BUILD_DEPENDS), unzip
-endif
-
 ifeq ($(DEB_TAR_SRCDIR),)
 $(error You must specify DEB_TAR_SRCDIR)
 endif
@@ -77,6 +68,30 @@
 		find $(DEB_SRCDIR) -type f -name $$i | xargs rm -f ; \
 	done
 endif
+ifneq (, $(config_guess_tar))
+	if test -e /usr/share/misc/config.guess ; then \
+		for i in $(config_guess_tar) ; do \
+			cp -f /usr/share/misc/config.guess \
+			$(_cdbs_tarball_dir)/$$i ; \
+		done ; \
+	fi
+endif
+ifneq (, $(config_sub_tar))
+	if test -e /usr/share/misc/config.sub ; then \
+		for i in $(config_sub_tar) ; do \
+			cp -f /usr/share/misc/config.sub \
+			$(_cdbs_tarball_dir)/$$i ; \
+		done ; \
+	fi
+endif
+ifneq (, $(config_rpath_tar))
+	if test -e /usr/share/gnulib/config/config.rpath ; then \
+		for i in $(config_rpath_tar) ; do \
+			cp -f /usr/share/gnulib/config/config.rpath \
+			$(_cdbs_tarball_dir)/$$i ; \
+		done ; \
+	fi
+endif
 
 $(addsuffix .gz,$(_cdbs_tarball_stamp_base)) $(addsuffix .tgz,$(_cdbs_tarball_stamp_base)):
 	tar -C $(_cdbs_tarball_dir) $(_cdbs_tar_verbose) -xzf $(patsubst stamp-%,%,$(notdir $@))

--===============0071373087==--

---------------------------------------
Received: (at 290940-done) by bugs.debian.org; 18 May 2005 10:02:55 +0000
>From rmh@debian.org Wed May 18 03:02:55 2005
Return-path: <rmh@debian.org>
Received: from 216.red-62-57-140.user.auna.net (aragorn) [62.57.140.216] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DYLOA-0000B0-00; Wed, 18 May 2005 03:02:55 -0700
Received: from rmh by aragorn with local (Exim 4.50)
	id 1DYLOV-0001ta-Ld; Wed, 18 May 2005 12:03:15 +0200
Date: Wed, 18 May 2005 12:03:15 +0200
From: Robert Millan <rmh@debian.org>
To: 284101-done@bugs.debian.org, 249931-done@bugs.debian.org,
	277672-done@bugs.debian.org, 280365-done@bugs.debian.org,
	290940-done@bugs.debian.org, 293197-done@bugs.debian.org
Subject: ack NMUs
Message-ID: <20050518100315.GA14625@aragorn>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Sender: Robert Millan <rmh@debian.org>
Organisation: free as in freedom
User-Agent: Mutt/1.5.9i
Delivered-To: 290940-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 5


Acknowledging my own NMUs.

-- 
 .''`.   Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S)
: :' :
`. `'    http://www.debian.org/ports/kfreebsd-gnu
  `-