[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#649741: parted: Avoid multiple builds: FTBFS on hurd-i386



Package: parted
Version: 2.3-8
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hi,

looking at the build log for parted shows that the targets are built
(and configured) more than once, see below:

/usr/bin/make -C build-deb
/usr/bin/make -C build-deb check-abi;

/usr/bin/make -C build-udeb/lib
/usr/bin/make -C build-udeb/libparted
/usr/bin/make -C build-udeb/parted

/usr/bin/make -C build-dbg/lib
/usr/bin/make -C build-dbg/libparted

/usr/bin/make -C build-deb
/usr/bin/make -C build-deb check-abi;

/usr/bin/make -C build-udeb/lib
/usr/bin/make -C build-udeb/libparted
/usr/bin/make -C build-udeb/parted

/usr/bin/make -C build-dbg/lib
/usr/bin/make -C build-dbg/libparted

/usr/bin/make -C build-deb install DESTDIR=.../parted-2.3/debian/tmp
/usr/bin/make -C build-udeb/libparted install
[ -z "parted-udeb" ] || /usr/bin/make -C build-udeb/parted install

/usr/bin/make -C build-dbg/lib
/usr/bin/make -C build-dbg/libparted

With the attached patch of debian/rules the targets are built only once:

/usr/bin/make -C build-deb
/usr/bin/make -C build-deb check-abi;

/usr/bin/make -C build-udeb/lib
/usr/bin/make -C build-udeb/libparted
/usr/bin/make -C build-udeb/parted

/usr/bin/make -C build-dbg/lib
/usr/bin/make -C build-dbg/libparted

/usr/bin/make -C build-deb install DESTDIR=.../parted-2.3.new/debian/tmp
/usr/bin/make -C build-udeb/libparted install
[ -z "parted-udeb" ] || /usr/bin/make -C build-udeb/parted install

This is normally not a problem, except taking longer time, but on
GNU/Hurd the second build is made in a fakeroot environment, which may
have a different behaviour than outside. The resulting problem here is
that the build can hang on the second build under fakeroot. Two
successive builds resulted in a hang the first time and a build the
second, causing unpredictable results. On the buildd sthibault with a
clean build environment the build has now been hanging for 114 days :(

Therefore this problem is to be qualified as an important bug. The
resulting built packages have been unpacked and compared with no
differences. Additionally the static library archives have been compared
with nm, giving identical results for the symbols and their addresses.

Thanks!
diff -ur parted-2.3/debian/rules parted-2.3.modified/debian/rules
--- parted-2.3/debian/rules	2011-11-22 17:15:42.000000000 +0100
+++ parted-2.3.modified/debian/rules	2011-11-23 14:03:25.000000000 +0100
@@ -168,8 +168,10 @@
 	@echo "SUBSTLIST:	$(SUBSTLIST)"
 
 packaging-files: $(GENFILES)
+	touch $@
 
-build-deb/config.status: patch
+#debian/stamp-patch is created by patching source files!
+build-deb/config.status: debian/stamp-patched
 	dh_testdir
 	[ -d build-deb ] || mkdir build-deb
 
@@ -185,8 +187,9 @@
 	    --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
 		$(CONFDEVMAPPER) \
 	    $(CONFFLAGS)
+	touch $@
 
-build-udeb/config.status: patch
+build-udeb/config.status: debian/stamp-patched
 	dh_testdir
 	[ -d build-udeb ] || mkdir build-udeb
 
@@ -196,8 +199,9 @@
 	    --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
 	    --without-readline $(CONFDEVMAPPER) \
 		$(CONFFLAGS)
+	touch $@
 
-build-dbg/config.status: patch
+build-dbg/config.status: debian/stamp-patched
 	dh_testdir
 	[ -d build-dbg ] || mkdir build-dbg
 
@@ -257,7 +261,9 @@
 	dh_testroot
 
 #	 Add here commands to clean up after the build process
-	rm -rf build-deb build-udeb build-dbg
+	rm -rf packaging-files
+	rm -rf install install-deb install-udeb install-dbg
+	rm -rf build build-deb build-udeb build-dbg
 
 #	 Remove all debian/libparted*.* except for libparted.*,
 #	 libparted-dev.*, and libparted-i18n.*
@@ -274,8 +280,11 @@
 
 	dh_clean
 
-install: DH_OPTIONS=-Nparted$(BINPKGVER)-udeb -Nlibparted$(LIBSONAME)-udeb -Nlibparted$(LIBSONAME)debian1-dbg
-install: build packaging-files
+install: install-deb install-udeb install-dbg
+	touch $@
+
+install-deb: DH_OPTIONS=-Nparted$(BINPKGVER)-udeb -Nlibparted$(LIBSONAME)-udeb -Nlibparted$(LIBSONAME)debian1-dbg
+install-deb: build-deb packaging-files
 	dh_testdir
 	dh_testroot
 	dh_prep
@@ -324,6 +333,7 @@
 	        "dh_movefiles!!!" >&2; \
 	   echo " *** Maybe the debian/*.files files need updating ..." >&2; \
 	 fi
+	touch $@
 
 install-udeb: DH_OPTIONS=-pparted$(BINPKGVER)-udeb -plibparted$(LIBSONAME)-udeb
 install-udeb: LIBPARTED_UDEB=$(shell dh_listpackages | grep -E '^libparted$(LIBSONAME)-udeb$$')
@@ -344,6 +354,7 @@
 
 	[ -z "$(PARTED_UDEB)" ] || $(MAKE) -C build-udeb/parted install \
 			DESTDIR=$(CURDIR)/debian/parted$(BINPKGVER)-udeb
+	touch $@
 
 install-dbg: DH_OPTIONS=-plibparted$(LIBSONAME)debian1-dbg
 install-dbg: build-dbg
@@ -353,6 +364,7 @@
 
 	install -D -m644 build-dbg/libparted/.libs/libparted.a \
 	   debian/libparted$(LIBSONAME)debian1-dbg/usr/lib/libparted_g.a
+	touch $@
 
 # This single target is used to build all the packages, all at once, or
 # one at a time. So keep in mind: any options passed to commands here will
@@ -385,14 +397,16 @@
 # Build architecture independant packages using the common target.
 # Unfortunately, we still need to build since the info file has to be
 # re-generated before installation and the locales need to be installed :-(
-binary-indep: build install
+
+binary-indep: build-deb install-deb
 # (Uncomment this next line if you have such packages.)
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
 
 # Build architecture dependant packages using the common target.
 # FIXME: this is an ugly hack :-( Work out a better way to build the
 # separate debug package ...
-binary-arch: build install install-udeb
+
+binary-arch: build install
 	$(MAKE) -f debian/rules DH_OPTIONS="-a -Nlibparted$(LIBSONAME)debian1-dbg" binary-common
 	$(MAKE) -f debian/rules binary-libparted$(LIBSONAME)debian1-dbg
 
@@ -400,16 +414,12 @@
 binary-%-dbg: build-dbg install-dbg
 	$(MAKE) -f debian/rules DH_OPTIONS="-p$(*)-dbg" binary-common
 
-binary-%: build install
-	$(MAKE) -f debian/rules DH_OPTIONS=-p$* binary-common
-
 binary: binary-arch binary-indep
 
 include /usr/share/quilt/quilt.make
 
-.PHONY: configure configure-udeb configure-dbg
-.PHONY: build build-udeb build-dbg
-.PHONY: install install-udeb install-dbg
-.PHONY: clean binary-indep binary-arch binary
-.PHONY: binary-%-dbg binary-%-udeb binary-%
-.PHONY: packaging-files
+.PHONY: build-deb build-udeb build-dbg build
+.PHONY: install-deb install-udeb install-dbg install
+.PHONY: binary-indep binary-arch binary
+.PHONY: binary-arch binary-indep binary-%-dbg binary
+.PHONY: packaging-files clean

Reply to: