Bug#901899: zeroc-ice FTBFS on derivatives other than ubuntu.

2018-06-19 Thread peter green

On 20/06/18 00:52, peter green wrote:

Debdiff attatched, no intent to NMU.

Sorry hit send too early, here is the debdiff.


diff -Nru zeroc-ice-3.7.1/debian/changelog zeroc-ice-3.7.1/debian/changelog
--- zeroc-ice-3.7.1/debian/changelog2018-06-06 21:28:50.0 +
+++ zeroc-ice-3.7.1/debian/changelog2018-06-19 20:56:36.0 +
@@ -1,3 +1,9 @@
+zeroc-ice (3.7.1-2+rpi1) buster-staging; urgency=medium
+
+  * Fix FTBFs on derivatives by checking ID_LIKE in /etc/os-release
+
+ -- Peter Michael Green   Tue, 19 Jun 2018 20:56:36 
+
+
 zeroc-ice (3.7.1-2) unstable; urgency=medium
 
   * Do not set DH_BUILD_DDEBS in debian/rules
diff -Nru zeroc-ice-3.7.1/debian/patches/series 
zeroc-ice-3.7.1/debian/patches/series
--- zeroc-ice-3.7.1/debian/patches/series   2018-06-06 20:16:18.0 
+
+++ zeroc-ice-3.7.1/debian/patches/series   2018-06-19 20:56:36.0 
+
@@ -1 +1,2 @@
 gcc8-build-fixes.patch
+use-id-like.patch
diff -Nru zeroc-ice-3.7.1/debian/patches/use-id-like.patch 
zeroc-ice-3.7.1/debian/patches/use-id-like.patch
--- zeroc-ice-3.7.1/debian/patches/use-id-like.patch1970-01-01 
00:00:00.0 +
+++ zeroc-ice-3.7.1/debian/patches/use-id-like.patch2018-06-19 
20:56:36.0 +
@@ -0,0 +1,18 @@
+Description:  Fix FTBFs on derivatives by checking ID_LIKE in /etc/os-release
+Author: Peter Michael Green 
+Last-Update: 2018-06-19
+
+--- zeroc-ice-3.7.1.orig/config/Make.rules.Linux
 zeroc-ice-3.7.1/config/Make.rules.Linux
+@@ -7,7 +7,10 @@
+ #
+ # **
+ 
+-linux_id= $(if $(wildcard /etc/os-release),$(shell . 
/etc/os-release && echo $${ID}),)
++known_distros   := yocto centos rhel fedora debian ubuntu 
amzn sles poky
++linux_ids   := $(if $(wildcard /etc/os-release),$(shell . 
/etc/os-release && echo $${ID} $${ID_LIKE}),)
++linux_ids_filtered  := $(filter $(known_distros),$(linux_ids))
++linux_id:= $(word 1,$(linux_ids_filtered))
+ is-bin-program  = $(and $(filter 
$(bindir)%,$($4_targetdir)),$(filter $($1_target),program))
+ 
+ ifneq ($(OECORE_SDK_VERSION),)
diff -Nru zeroc-ice-3.7.1/debian/rules zeroc-ice-3.7.1/debian/rules
--- zeroc-ice-3.7.1/debian/rules2018-06-06 20:06:49.0 +
+++ zeroc-ice-3.7.1/debian/rules2018-06-19 20:56:36.0 +
@@ -111,6 +111,8 @@
for v in $(PYTHON_VERSIONS); do \
  rm -rf python-$${v}; \
done
+   rm -rf cpp/lib
+   rm -f cpp/test/Glacier2/staticFiltering/*.cfg
 
 override_dh_auto_clean-indep:
$(MAKE) $(MAKEOPTS) OPTIMIZE=$(OPTIMIZE) LANGUAGES=cpp distclean


Bug#901899: zeroc-ice FTBFS on derivatives other than ubuntu.

2018-06-19 Thread peter green

package: zeroc-ice
severity: important
version: 3.7.0-4

zeroc-ice started failing to build in raspbian with version 3.7.0-4.


dh_install: Cannot find (any matches for) "usr/lib/*/*.so" (tried in ., 
debian/tmp)

dh_install: libzeroc-ice-dev missing files: usr/lib/*/*.so
dh_install: Cannot find (any matches for) "usr/lib/*/*.a" (tried in ., 
debian/tmp)

dh_install: libzeroc-ice-dev missing files: usr/lib/*/*.a
dh_install: Cannot find (any matches for) "usr/lib/*/libGlacier2++11.so.*" 
(tried in ., debian/tmp)

And so-on for many more files.

3.7.0-5, 3.7.1-1 and 3.7.1-2 also failed in the same way.

Investigating it seems that Make.rules.Linux does some distro detection and only enables the multiarch stuff 
if it detects "debian" or "ubuntu" in the "ID" field of /etc/os-release.

I could of course have added raspbian to the list, but that isn't really a 
scalable fix. There are loads of other derivatives out there on which the build 
would almost certainly fail in the same way.

The proper fix is to make use of the ID_LIKE field in /etc/os-release , 
checking for a known distro first in the ID field and then moving on to the 
entries in ID_LIKE until a known distro is found. I implemented this fix in 
Make.rules.Linux .

While working on the aforementioned fix I ran into a broken clean target, so I 
fixed that too.

Debdiff attatched, no intent to NMU.