Source: linux86
Version: 0.16.17-3.1
Severity: important

After fixing the build error mentioned in bug #822048, I noticed that
the elksemu binary is no longer included in the bcc package.  This is
because of a broken check in debian/rules:

,----
| ifeq ($(findstring i486-linux-gnu,$(DEB_BUILD_GNU_TYPE)),i486-linux-gnu)
|               mv debian/tmp/usr/bin/elksemu debian/tmp-bcc/usr/bin
|               install -d debian/tmp-bcc/usr/share/man/man1
|               mv debian/tmp/usr/man/man1/elksemu.1.gz 
debian/tmp-bcc/usr/share/man/man1
| endif
`----

Apart from the fact that the check should have been on DEB_HOST_GNU_TYPE
rather than DEB_BUILD_GNU_TYPE, i486-linux-gnu is no longer the correct
value:

,----
| $ dpkg-architecture -qDEB_BUILD_GNU_TYPE
| i686-linux-gnu
`----

The following patch fixes that, checking for DEB_HOST_ARCH which is less
volatile than DEB_HOST_GNU_TYPE:

--8<---------------cut here---------------start------------->8---
diff --git a/debian/rules b/debian/rules
index 7475a96..c9745c5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 1997-2008 Juan Cespedes <cespe...@debian.org>
 
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 SHELL  =       bash
 
@@ -65,7 +65,7 @@ binary-arch:  binary-common
 # ``bcc'' specific things:
                install -d debian/tmp-bcc/usr/bin
                mv debian/tmp/usr/bin/bcc debian/tmp-bcc/usr/bin
-ifeq ($(findstring i486-linux-gnu,$(DEB_BUILD_GNU_TYPE)),i486-linux-gnu)
+ifeq (i386,$(DEB_HOST_ARCH))
                mv debian/tmp/usr/bin/elksemu debian/tmp-bcc/usr/bin
                install -d debian/tmp-bcc/usr/share/man/man1
                mv debian/tmp/usr/man/man1/elksemu.1.gz 
debian/tmp-bcc/usr/share/man/man1
--8<---------------cut here---------------end--------------->8---

However, VM86 is pretty much deprecated these days and has been disabled
in the Debian kernel for security reasons (see #792003), so maybe it is
better to actually remove elksemu from the bcc package and adjust the
package description.


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (x86_64)

Reply via email to