Bug#972340: pyferret FTBFS with more than one supported python3 version

2020-10-17 Thread Stefano Rivera
I sat down to have a look at this, and struggled to figure out what the
package is actually trying to do in its build.

There's some wacky stuff going on, which isn't actually working, so I
started by trimming that out, and enabling set -e.

> dh_missing: warning: lib/python3.9/libpyferret.so exists in debian/tmp but is 
> not installed to anywhere (related file: 
> "debian/tmp/lib/python3.8/libpyferret.so")

From what I can see, this library is a symlink, created for other
libraries to link to, but not installing under that name, only as a
Python C extension.

With the attached patchset, I can get it to build with 3.8 and 3.9,
which gets us to the same state as unstable, which is totally broken:

$ pyferret3
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/pyferret/__init__.py", line 75, in 

from pyferret import libpyferret
ImportError: 
/usr/lib/python3/dist-packages/pyferret/libpyferret.cpython-38-x86_64-linux-gnu.so:
 undefined symbol: load_dsg_mask_ftrset_var_
>>>

Then there's all the shared libraries in
/usr/lib/ferret-vis/external_functions/pylibs that want to link to
libpyferret:

$ ldd /usr/lib/ferret-vis/external_functions/pylibs/subtract.so
linux-vdso.so.1 (0x7ffdd76ad000)
libeatmydata.so => /usr/lib/x86_64-linux-gnu/libeatmydata.so 
(0x7f30e9d3d000)
libpyferret.so => not found
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f30e9d37000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f30e9b72000)
/lib64/ld-linux-x86-64.so.2 (0x7f30e9d4f000)

I don't know what's supposed to use those, but they probably shouldn't
be linking to a library that isn't installed.

If there are plugins like this that need to link to C Python Extensions,
I don't know if it makes any sense to build pyferret for multiple Python
versions. But I don't know enough about the package, to understand
exactly what they are for, and how they're meant to be linked.

So... Some patches attached that get us to the broken status-quo of
unstable, but not sure that that's a useful place to be. I'm certainly
not going to NMU them.

I'd have filed an MR, but the git repo is out of date...

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  +1 415 683 3272
From e6f7f375be676af36ce19c0e2e2057ba55d84094 Mon Sep 17 00:00:00 2001
From: Stefano Rivera 
Date: Fri, 16 Oct 2020 23:01:16 -0700
Subject: [PATCH 1/4] debian/rules: set -e; before any multi-command lines.

---
 debian/changelog | 7 +++
 debian/rules | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7c959ea..977e734 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+pyferret (7.6.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/rules: set -e; before any multi-command lines.
+
+ -- Stefano Rivera   Fri, 16 Oct 2020 23:00:38 -0700
+
 pyferret (7.6.3-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/debian/rules b/debian/rules
index 5ba46b2..5c7c0f2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,6 +41,7 @@ override_dh_auto_install:
 	# Horrible hack breaks The Debian Way. I'm doing the build in the 'install' phase, as i'm installing into debian/tmp
 	# Doing it any earlier, and dh_prep will remove debian/tmp. 
 	# This means I'm also doing 'test' after the Install, not between during make & install. gack.
+	set -e; \
 	for p in $(PY3) ; do \
 		mkdir -p $(INSTALLDIR)/lib/$$p ; \
 		cp $(CURDIR)/install/lib/$$p/site-packages//pyferret/libpyferret.cpython-$$l-$(ARCH).so \
@@ -57,6 +58,7 @@ override_dh_auto_install:
 	@echo "Now doing bench tests"
 	ln -s debian/pyferret3  $(INSTALLDIR)/lib/$(shell py3versions -d)/pyferret
 	# First build necessary files
+	set -e; \
 	for p in  $(PY3) ; do \
 		sed -e 's%@ARCH@%${ARCH}%' \
 -e 's%@LIBDIR@%${LIBDIR}%' \
-- 
2.28.0

From 626a273af6853f66e5e989df539e53dcd31a3e7f Mon Sep 17 00:00:00 2001
From: Stefano Rivera 
Date: Fri, 16 Oct 2020 23:01:53 -0700
Subject: [PATCH 2/4] debian/rules: Drop cp that wasn't executing, because
 there is no "l" variable.

---
 debian/changelog | 2 ++
 debian/rules | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 977e734..79073a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ pyferret (7.6.3-1.1) UNRELEASED; urgency=medium
 
   * Non-maintainer upload.
   * debian/rules: set -e; before any multi-command lines.
+  * debian/rules: Drop cp that wasn't executing, because there is no "l"
+variable.
 
  -- Stefano Rivera   Fri, 16 Oct 2020 23:00:38 -0700
 
diff --git a/debian/rules b/debian/rules
index 5c7c0f2..75b0854 100755
--- a/debian/rules
+++ b/debian/rules
@@ -44,8 +44,6 @@ override_dh_auto_install:
 	set -e; \
 	for p in $(PY3) ; do \
 		mkdir -p $(INSTALLDIR)/lib/$$p ; \
-		cp $(CURDIR)/install/lib/$$p/site-packages//pyferret/libpyferret.cpython-$$l-$(ARCH).so \
-

Bug#972340: pyferret FTBFS with more than one supported python3 version

2020-10-16 Thread Adrian Bunk
Source: pyferret
Version: 7.6.3-1
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/package.php?p=pyferret&suite=sid

...
   dh_missing -a
dh_missing: warning: lib/python3.9/libpyferret.so exists in debian/tmp but is 
not installed to anywhere (related file: 
"debian/tmp/lib/python3.8/libpyferret.so")
dh_missing: error: missing files, aborting
...