All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package: disable libseccomp for find
@ 2020-01-20 13:01 Martin Hundebøll
  2020-01-20 13:41 ` Ross Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Hundebøll @ 2020-01-20 13:01 UTC (permalink / raw)
  To: openembedded-core

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>.

Signed-off-by: Martin Hundebøll <martin@geanix.com>
---
 meta/lib/oe/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index b8585d4253..0c22307c46 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -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
-- 
2.25.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] package: disable libseccomp for find
  2020-01-20 13:01 [PATCH] package: disable libseccomp for find Martin Hundebøll
@ 2020-01-20 13:41 ` Ross Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Ross Burton @ 2020-01-20 13:41 UTC (permalink / raw)
  To: openembedded-core

On 20/01/2020 13:01, Martin Hundebøll wrote:
> -    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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-20 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 13:01 [PATCH] package: disable libseccomp for find Martin Hundebøll
2020-01-20 13:41 ` Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.