Processed: Bug#895463: keyutils FTBFS: Can't Determine Endianness
Processing control commands: > tags -1 pending Bug #895463 {Done: James Cowgill } [src:keyutils] keyutils FTBFS: Can't Determine Endianness Added tag(s) pending. -- 895463: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895463 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
Bug#895463: keyutils FTBFS: Can't Determine Endianness
Control: tags -1 pending Hi, I've uploaded the attached debdiff which fixes this bug. While I was preparing the upload, I also migrated the git repository from alioth to salsa. James diff -Nru keyutils-1.5.9/debian/changelog keyutils-1.5.9/debian/changelog --- keyutils-1.5.9/debian/changelog 2017-11-16 12:19:11.0 + +++ keyutils-1.5.9/debian/changelog 2018-07-16 09:53:06.0 +0100 @@ -1,3 +1,12 @@ +keyutils (1.5.9-9.3) unstable; urgency=medium + + * Non-maintainer upload. + * d/control: Migrate Vcs repository to salsa.d.o. + * d/patches: Add endianness-and-PIE.patch to fix FTBFS. +Thanks to Steve Langasek and Adam Conrad (Closes: #895463) + + -- James Cowgill Mon, 16 Jul 2018 09:53:06 +0100 + keyutils (1.5.9-9.2) unstable; urgency=medium * Non-maintainer upload. diff -Nru keyutils-1.5.9/debian/control keyutils-1.5.9/debian/control --- keyutils-1.5.9/debian/control 2017-09-28 13:12:55.0 +0100 +++ keyutils-1.5.9/debian/control 2018-07-16 09:52:48.0 +0100 @@ -7,8 +7,8 @@ lsb-release, Standards-Version: 3.9.8 Homepage: http://people.redhat.com/~dhowells/keyutils/ -Vcs-Git: https://anonscm.debian.org/git/collab-maint/keyutils.git -Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/keyutils.git +Vcs-Git: https://salsa.debian.org/debian/keyutils.git +Vcs-Browser: https://salsa.debian.org/debian/keyutils Package: keyutils Architecture: linux-any diff -Nru keyutils-1.5.9/debian/patches/endianness-and-PIE.patch keyutils-1.5.9/debian/patches/endianness-and-PIE.patch --- keyutils-1.5.9/debian/patches/endianness-and-PIE.patch 1970-01-01 01:00:00.0 +0100 +++ keyutils-1.5.9/debian/patches/endianness-and-PIE.patch 2018-07-16 09:51:51.0 +0100 @@ -0,0 +1,23 @@ +Description: fix regexp match against `file /proc/$$/exe` for -fPIE bash + Now that bash is built with PIE enabled, keyutils' check for endianness + fails because file no longer returns "executable", but instead returns + "shared object" for file << 5.33 and "pie executable" for file >= 5.33. +Author: Steve Langasek +Author: Adam Conrad +Last-Modified: 2018-05-07 + +--- a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh +@@ -19,10 +19,10 @@ includes=${includes%/*}/ + echo === $OUTPUTFILE === + + endian=`file -L /proc/$$/exe` +-if expr "$endian" : '.* MSB executable.*' >&/dev/null ++if expr "$endian" : '.* MSB \(executable\|shared object\|pie executable\).*' >&/dev/null + then + endian=BE +-elif expr "$endian" : '.* LSB executable.*' >&/dev/null ++elif expr "$endian" : '.* LSB \(executable\|shared object\|pie executable\).*' >&/dev/null + then + endian=LE + else diff -Nru keyutils-1.5.9/debian/patches/series keyutils-1.5.9/debian/patches/series --- keyutils-1.5.9/debian/patches/series2017-09-28 13:12:55.0 +0100 +++ keyutils-1.5.9/debian/patches/series2018-07-16 09:51:51.0 +0100 @@ -16,3 +16,4 @@ Make-build-reproducible.patch Drop-tests-requiring-CONFIG_BIG_KEYS.patch Adjust-tests-for-3.18-kernel-change.patch +endianness-and-PIE.patch signature.asc Description: OpenPGP digital signature
Bug#895463: keyutils FTBFS: Can't Determine Endianness
Package: keyutils Version: 1.5.9-9.2 Followup-For: Bug #895463 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu cosmic ubuntu-patch In Ubuntu, the attached patch was applied to achieve the following: * debian/patches/endianness-and-PIE.patch: Adjust to work with file 5.33. This is a follow-up to Steve's patch to make it also work with the newer file, which reports PIE executables as 'pie executable'. ... Adam -- System Information: Debian Release: buster/sid APT prefers cosmic APT policy: (500, 'cosmic') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.15.0-20-lowlatency (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled diff -Nru keyutils-1.5.9/debian/patches/endianness-and-PIE.patch keyutils-1.5.9/debian/patches/endianness-and-PIE.patch --- keyutils-1.5.9/debian/patches/endianness-and-PIE.patch 2018-04-17 22:21:12.0 -0600 +++ keyutils-1.5.9/debian/patches/endianness-and-PIE.patch 2018-05-07 11:43:57.0 -0600 @@ -1,9 +1,10 @@ Description: fix regexp match against `file /proc/$$/exe` for -fPIE bash Now that bash is built with PIE enabled, keyutils' check for endianness fails because file no longer returns "executable", but instead returns - "shared object". Update our regexps to be portable. + "shared object" for file << 5.33 and "pie executable" for file >= 5.33. Author: Steve Langasek -Last-Modified: 2018-04-17 +Author: Adam Conrad +Last-Modified: 2018-05-07 Index: keyutils-1.5.9/tests/toolbox.inc.sh === @@ -14,11 +15,11 @@ endian=`file -L /proc/$$/exe` -if expr "$endian" : '.* MSB executable.*' >&/dev/null -+if expr "$endian" : '.* MSB \(executable\|shared object\).*' >&/dev/null ++if expr "$endian" : '.* MSB \(executable\|shared object\|pie executable\).*' >&/dev/null then endian=BE -elif expr "$endian" : '.* LSB executable.*' >&/dev/null -+elif expr "$endian" : '.* LSB \(executable\|shared object\).*' >&/dev/null ++elif expr "$endian" : '.* LSB \(executable\|shared object\|pie executable\).*' >&/dev/null then endian=LE else
Bug#895463: keyutils FTBFS: Can't Determine Endianness
Package: keyutils Followup-For: Bug #895463 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu bionic ubuntu-patch Dear Christian, This bug is reproducible in Ubuntu, and I tracked it down to the change to build /bin/bash with -fPIE, which changes the 'file' signature for /proc/$$/exe (aka /bin/bash) to no longer report that it is an "[LM]SB executable". I have uploaded the attached patch to Ubuntu, which makes keyutils' endianness detection portable to systems which build with -fPIE. Please consider including it in Debian as well. -- 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 Developerhttp://www.debian.org/ slanga...@ubuntu.com vor...@debian.org diff -Nru keyutils-1.5.9/debian/patches/endianness-and-PIE.patch keyutils-1.5.9/debian/patches/endianness-and-PIE.patch --- keyutils-1.5.9/debian/patches/endianness-and-PIE.patch 1969-12-31 16:00:00.0 -0800 +++ keyutils-1.5.9/debian/patches/endianness-and-PIE.patch 2018-04-17 21:21:12.0 -0700 @@ -0,0 +1,24 @@ +Description: fix regexp match against `file /proc/$$/exe` for -fPIE bash + Now that bash is built with PIE enabled, keyutils' check for endianness + fails because file no longer returns "executable", but instead returns + "shared object". Update our regexps to be portable. +Author: Steve Langasek +Last-Modified: 2018-04-17 + +Index: keyutils-1.5.9/tests/toolbox.inc.sh +=== +--- keyutils-1.5.9.orig/tests/toolbox.inc.sh keyutils-1.5.9/tests/toolbox.inc.sh +@@ -19,10 +19,10 @@ + echo === $OUTPUTFILE === + + endian=`file -L /proc/$$/exe` +-if expr "$endian" : '.* MSB executable.*' >&/dev/null ++if expr "$endian" : '.* MSB \(executable\|shared object\).*' >&/dev/null + then + endian=BE +-elif expr "$endian" : '.* LSB executable.*' >&/dev/null ++elif expr "$endian" : '.* LSB \(executable\|shared object\).*' >&/dev/null + then + endian=LE + else diff -Nru keyutils-1.5.9/debian/patches/series keyutils-1.5.9/debian/patches/series --- keyutils-1.5.9/debian/patches/series2017-11-21 08:14:40.0 -0800 +++ keyutils-1.5.9/debian/patches/series2018-04-17 21:18:02.0 -0700 @@ -16,3 +16,4 @@ Make-build-reproducible.patch Drop-tests-requiring-CONFIG_BIG_KEYS.patch Adjust-tests-for-3.18-kernel-change.patch +endianness-and-PIE.patch
Bug#895463: keyutils FTBFS: Can't Determine Endianness
Source: keyutils Version: 1.5.9-9.2 Severity: serious Some recent change in unstable makes keyutils FTBFS: https://tests.reproducible-builds.org/debian/history/keyutils.html https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/keyutils.html ... dh_auto_test -- \ PATH=/build/1st/keyutils-1.5.9:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games \ LD_LIBRARY_PATH=/build/1st/keyutils-1.5.9 \ SKIPROOT=yes \ SKIPINSTALLED=yes make -j1 test PATH=/build/1st/keyutils-1.5.9:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games LD_LIBRARY_PATH=/build/1st/keyutils-1.5.9 SKIPROOT=yes SKIPINSTALLED=yes make[2]: Entering directory '/build/1st/keyutils-1.5.9' grep: /etc/rpm/macros.dist: No such file or directory make -C tests run make[3]: Entering directory '/build/1st/keyutils-1.5.9/tests' sh runtest.sh keyctl/update/userupdate keyctl/update/noargs keyctl/update/bad-args keyctl/unlink/valid keyctl/unlink/noargs keyctl/unlink/bad-args keyctl/unlink/all keyctl/timeout/valid keyctl/timeout/noargs keyctl/timeout/bad-args keyctl/show/valid keyctl/show/noargs keyctl/session/valid keyctl/session/bad-args keyctl/search/valid keyctl/search/noargs keyctl/search/bad-args keyctl/revoke/valid keyctl/revoke/noargs keyctl/revoke/bad-args keyctl/requesting/valid keyctl/requesting/piped keyctl/requesting/noargs keyctl/requesting/bad-args keyctl/reading/valid keyctl/reading/noargs keyctl/reading/bad-args keyctl/pupdate/userupdate keyctl/pupdate/noargs keyctl/pupdate/bad-args keyctl/permitting/valid keyctl/permitting/noargs keyctl/permitting/bad-args keyctl/padd/useradd keyctl/padd/noargs keyctl/padd/bad-args keyctl/noargs keyctl/newring/valid keyctl/newring/noargs keyctl/newring/bad-args keyctl/listing/valid keyctl/listing/noargs keyctl/listing/bad-args keyctl/link/valid keyctl/link/recursion keyctl/link/noargs keyctl/link/bad-args keyctl/invalidate/valid keyctl/invalidate/noargs keyctl/invalidate/bad-args keyctl/instantiating/noargs keyctl/instantiating/bad-args keyctl/describing/valid keyctl/describing/noargs keyctl/describing/bad-args keyctl/clear/valid keyctl/clear/noargs keyctl/clear/bad-args keyctl/add/useradd keyctl/add/noargs keyctl/add/bad-args bugzillas/bz1033467 Some tests require root privileges. It is recommended that this be run as root. Running with session keyring RHTS/keyctl/45279 Joined session keyring: 541509331 === /build/1st/keyutils-1.5.9/tests/keyctl/update/userupdate/test.out === +++ [31;1mCan't Determine Endianness[0m make[3]: *** [Makefile:42: run] Error 1