Skip to contentSkip to conversation

package: disable libseccomp for find

PATCH In review Martin Hundebøll 2 participants 2 messages Jan 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package: disable libseccomp for find

Distros where libseccomp is enabled for the find util segfaults in do_package:

ERROR: base-files-3.0.14-r89 do_package: Fatal errors occurred in subprocesses:
Command '['file', '-b', 'build/tmp-glibc/work/iwg26-oe-linux-gnueabi/base-files/3.0.14-r89/package/etc/skel/.bashrc']' died with <Signals.SIGSYS: 31>.: Traceback (most recent call last):
File "poky/meta/lib/oe/utils.py", line 272, in run

    ret = self._target(*self._args, **self._kwargs)

File "poky/meta/lib/oe/package.py", line 70, in is_elf
result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['file', '-b', 'build/tmp-glibc/work/iwg26-oe-linux-gnueabi/base-files/3.0.14-r89/package/etc/skel/.bashrc']' died with <Signals.SIGSYS: 31>.

---
 meta/lib/oe/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/package.py +1 -1
index b8585d4253..0c22307c46 100644
@@ -71,7 +71,7 @@ def is_kernel_module_signed(path):
 # 16 - kernel module
 def is_elf(path):
     exec_type = 0
-    result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
+    result = subprocess.check_output(["file", "-S", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
 
     if "ELF" in result:
         exec_type |= 1
Signature · 1 line
2.25.0
#1 lore raw

meta/lib/oe/package.py def is_kernel_module_signed(path): · line 74

Quoted 2 lines · Martin Hundebøll
meta/lib/oe/package.py +1 -1
-    result = subprocess.check_output(["file", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
+    result = subprocess.check_output(["file", "-S", "-b", path], stderr=subprocess.STDOUT).decode("utf-8")
$ file -S /usr/bin/file
Usage: file [-bcCdEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding]
            [--mime-type] [-e <testname>] [-F <separator>]  [-f <namefile>]
            [-m <magicfiles>] [-P <parameter=value>] <file> ...
       file -C [-m <magicfiles>]
       file [--help]

Only the latest release of file supports -S.

Ross