Package: libgtkada
Version: 3.8.3-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu yakkety ubuntu-patch

Hi Ludovic, Nicolas,

As part of the gnat-6 transition in Ubuntu, we observed that libgtkada's
autopkgtests were failing on two architectures: i386 and armhf.

  http://autopkgtest.ubuntu.com/packages/libg/libgtkada/yakkety/armhf/

Digging into this, I found the problem was caused by
/usr/share/doc/libgtkada-doc/examples/testgtk.tgz in libgtkada-doc
containing binary objects for the wrong architecture (for amd64, the
architecture on which the arch: all package was built).  But libgtkada's
debian/rules already includes logic to filter the object files out of the
tarball when creating it.

As of tar 1.29, currently in unstable, the --exclude option apparently gets
silently ignored, and any mention of it has been removed from the manpage.
So a no-change rebuild of libgtkada in sid results in the same buggy tarball
being generated.

$ dpkg -x libgtkada-doc_3.8.3-1_all.deb libgtkada-doc 
$ tar tvf libgtkada-doc/usr/share/doc/libgtkada-doc/examples/testgtk.tgz |grep 
README
-rw-rw-r-- vorlon/vorlon      481 2015-06-01 14:38 testgtk/README
$

I've applied the attached patch to Ubuntu, in order to fix the libgtkada
autopkgtests and unblock the gnat-6 transition.  You may wish to consider
applying this in Debian as well.

I will also be filing a bug against tar about its silent ignoring of options.

Changelog entry for the Ubuntu upload:

  * Restructure the building of the testgtk example tar, because current
    tar in yakkety is ignoring --exclude options; this causes knock-on
    effects of including objects in the sample data, which in turn breaks
    autopkgtests on some architectures.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru libgtkada-3.8.3/debian/clean libgtkada-3.8.3/debian/clean
--- libgtkada-3.8.3/debian/clean	1969-12-31 16:00:00.000000000 -0800
+++ libgtkada-3.8.3/debian/clean	2016-07-13 08:10:43.000000000 -0700
@@ -0,0 +1 @@
+debian/testgtk.tmp/
diff -Nru libgtkada-3.8.3/debian/rules libgtkada-3.8.3/debian/rules
--- libgtkada-3.8.3/debian/rules	2016-04-26 00:13:37.000000000 -0700
+++ libgtkada-3.8.3/debian/rules	2016-07-13 08:31:03.000000000 -0700
@@ -120,18 +120,23 @@
 # Remove in-tree build system (README, *.gpr, objects and executables).
 # Add project described in README.Debian. Move GL support to top dir.
 TESTGTK_TGZ := testgtk.tgz
+TESTGTK_TMP := debian/testgtk.tmp
 override_dh_auto_build-indep: $(TESTGTK_TGZ)
 $(TESTGTK_TGZ):
+	rm -rf $(TESTGTK_TMP)
+	mkdir -p $(TESTGTK_TMP)
+	cp -a testgtk $(TESTGTK_TMP)/testgtk
+	rm -rf $(TESTGTK_TMP)/testgtk/README $(TESTGTK_TMP)/testgtk/obj/* \
+	       $(TESTGTK_TMP)/testgtk/test_rtree \
+	       $(TESTGTK_TMP)/testgtk/testgtk \
+	       $(TESTGTK_TMP)/testgtk/testgtk.gpr
+	cp -a debian/testgtk.gpr $(TESTGTK_TMP)/testgtk/
+	mv $(TESTGTK_TMP)/testgtk/opengl/view_gl.ad* \
+	   $(TESTGTK_TMP)/testgtk/
 	tar --create --auto-compress --file=$@ \
-	  testgtk \
-	  --exclude=testgtk/README \
-	  --exclude=testgtk/obj/* \
-	  --transform 's~^testgtk/opengl/view_gl\.ad~testgtk/view_gl.ad~' \
-	  --exclude=testgtk/test_rtree \
-	  --exclude=testgtk/testgtk \
-	  --exclude=testgtk/testgtk.gpr \
-	  debian/testgtk.gpr \
-	  --transform 's/^debian/testgtk/'
+	  -C $(TESTGTK_TMP) \
+	  testgtk
+	rm -rf $(TESTGTK_TMP)
 override_dh_auto_clean::
 	rm -f $(TESTGTK_TGZ)
 

Reply via email to