Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 740426 - sys-apps/file-5.39 & sys-apps/file-5.39-r2 are broken with USE=seccomp
Summary: sys-apps/file-5.39 & sys-apps/file-5.39-r2 are broken with USE=seccomp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-05 03:59 UTC by Steven Trogdon
Modified: 2021-04-23 07:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2020-09-05 03:59:30 UTC
Possibly all available sys-apps/file are broken with USE=seccomp in Prefix. This was tested with sys-libs/libseccomp-2.4.3. If sys-apps/file-5.39 is installed with USE=seccomp I get:

$ file test.py
file: SECCOMP initialisation failed (Invalid argument)

where test.py is a python file. With USE=-seccomp I get (libseccomp must be uninstalled):


$ file test.py
test.py: Python script, ASCII text executables

Even with USE=-seccomp the installation of sys-apps/file-5.39 gives

file: SECCOMP initialisation failed (Invalid argument)

Perhaps not related, but testing the install of sys-lib/libseccomp-2.4.3 (ebuild libseccomp-2.4.3 test) gives one failure

Test 52-basic-load%%001-00001 result:   FAILURE 52-basic-load rc=22
Regression Test Summary
 tests run: 8031
 tests skipped: 41
 tests passed: 8030
 tests failed: 1
 tests errored: 0
============================================================
FAIL: regression
==================
1 of 1 test failed
==================
make[2]: *** [Makefile:1302: check-TESTS] Error 1
make[1]: *** [Makefile:1429: check-am] Error 2
make: *** [Makefile:513: check-recursive] Error 1
Comment 1 Steven Trogdon 2020-09-05 18:32:56 UTC
sys-apps/file-5.39-r2 will not even install with USE=seccomp, regardless the version of sys-libs/libseccomp installed. The failure is

Making all in magic
make[2]: Entering directory '/storage/strogdon/gentoo-rap/var/tmp/portage/sys-apps/file-5.39-r2/work/file-5.39-abi_x86_64.amd64/magic'
../src/file -C -m magic
file: SECCOMP initialisation failed (Invalid argument)
make[2]: *** [Makefile:833: magic.mgc] Error 1
make[2]: Leaving directory '/storage/strogdon/gentoo-rap/var/tmp/portage/sys-apps/file-5.39-r2/work/file-5.39-abi_x86_64.amd64/magic'
make[1]: *** [Makefile:458: all-recursive] Error 1
make[1]: Leaving directory '/storage/strogdon/gentoo-rap/var/tmp/portage/sys-apps/file-5.39-r2/work/file-5.39-abi_x86_64.amd64'
make: *** [Makefile:367: all] Error 2
 ^[[31;01m*^[[0m ERROR: sys-apps/file-5.39-r2::gentoo failed (compile phase):


I suppose sys-apps/file-5.39-r1 will have a similar problem.
Comment 2 Mike Johnson 2020-09-10 22:39:59 UTC
I have the same with an arm64 installation with sys-apps/file-5.39-r3.  It fails with both libseccomp 2.4.3 and 2.5.0.  Funny though, sys-apps/file-5.39-r2 installed in June somehow, don't recall fighting with it.  I can install file-5.39-r3 with USE="-seccomp".

make[3]: Leaving directory '/var/tmp/portage/sys-apps/file-5.39-r3/work/file-5.39-.arm64/src'
make[2]: Leaving directory '/var/tmp/portage/sys-apps/file-5.39-r3/work/file-5.39-.arm64/src'
Making all in magic
make[2]: Entering directory '/var/tmp/portage/sys-apps/file-5.39-r3/work/file-5.39-.arm64/magic'
../src/file -C -m magic
make[2]: *** [Makefile:834: magic.mgc] Bad system call
make[2]: *** Deleting file 'magic.mgc'
make[2]: Leaving directory '/var/tmp/portage/sys-apps/file-5.39-r3/work/file-5.39-.arm64/magic'
make[1]: *** [Makefile:459: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/file-5.39-r3/work/file-5.39-.arm64'
make: *** [Makefile:368: all] Error 2
 * ERROR: sys-apps/file-5.39-r3::gentoo failed (compile phase):
 *   emake failed
Comment 3 Mike Johnson 2020-09-10 22:59:07 UTC
My mistake, apparently I used the patch from https://bugs.gentoo.org/show_bug.cgi?id=730540 back in June to successfully install sys-apps/file-5.39-r2.  But it doesn't suffice for sys-apps/file-5.39-r3, patch applies properly, I still have the same error.
Comment 4 Fabian Groffen gentoo-dev 2020-09-11 06:12:54 UTC
Seems like the quickest way forward here is to mask seccomp for sys-apps/file on Prefix.  I don't know what seccomp is actually doing, so I can be ignorant here, but would that (masking the flag) work for you?
Comment 5 Steven Trogdon 2020-09-11 06:23:02 UTC
Installing with USE=-seccomp works for me. I see no side effect. So, yes masking the seccomp useflag would work.
Comment 6 Fabian Groffen gentoo-dev 2020-09-11 07:14:12 UTC
Seems we already did:

# Michael Haubenwallner <haubi@gentoo.org> (2018-06-21)
# sys-libs/libseccomp is a linux interface, not sure if it will work
# in prefix for Linux either, bug #585756
seccomp

what profile are you using?

(eselect profile show)
Comment 7 Fabian Groffen gentoo-dev 2020-09-11 07:18:07 UTC
@heroxbd: this is likely a standalone profile, where would you put the mask for this, is there part of the prefix profile shared by both rpath and standalone?  Should features/prefix work for this?
Comment 8 Steven Trogdon 2020-09-11 15:38:04 UTC
(In reply to Fabian Groffen from comment #6)
> Seems we already did:
> 
> # Michael Haubenwallner <haubi@gentoo.org> (2018-06-21)
> # sys-libs/libseccomp is a linux interface, not sure if it will work
> # in prefix for Linux either, bug #585756
> seccomp
> 
> what profile are you using?
> 
> (eselect profile show)

Not sure if meant for me but

 $ eselect profile show
Current /storage/strogdon/gentoo-rap/etc/portage/make.profile symlink:
  default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+
Comment 9 Mike Johnson 2020-09-12 09:17:10 UTC
I have:
$ eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/arm64/17.0/desktop/gnome

+seccomp is the default for sys-apps/file, I have -seccomp in package.use now.
Comment 10 Fabian Groffen gentoo-dev 2020-09-13 09:58:42 UTC
(In reply to Mike Johnson from comment #9)
> I have:
> $ eselect profile show
> Current /etc/portage/make.profile symlink:
>   default/linux/arm64/17.0/desktop/gnome
> 
> +seccomp is the default for sys-apps/file, I have -seccomp in package.use
> now.

that's not even a prefix profile

are you supposed to be using prefix?
Comment 11 Mike Johnson 2020-09-13 20:49:58 UTC
How can this be explained then?

# eselect profile list
Available profile symlink targets:
  [1]   default/linux/arm64/17.0 (stable)
  [2]   default/linux/arm64/17.0/desktop (stable)
  [3]   default/linux/arm64/17.0/desktop/gnome (stable) *
  [4]   default/linux/arm64/17.0/desktop/gnome/systemd (stable)
  [5]   default/linux/arm64/17.0/desktop/plasma (stable)
  [6]   default/linux/arm64/17.0/desktop/plasma/systemd (stable)
  [7]   default/linux/arm64/17.0/desktop/systemd (stable)
  [8]   default/linux/arm64/17.0/developer (stable)
  [9]   default/linux/arm64/17.0/systemd (stable)
  [10]  default/linux/arm64/17.0/big-endian (exp)
  [11]  default/linux/arm64/17.0/musl (exp)
  [12]  default/linux/arm64/17.0/musl/hardened (exp)
Comment 12 Mike Johnson 2020-09-13 20:56:46 UTC
When I set the machine up months ago, there was a page on the Gentoo wiki that recommended using default/linux/arm64/17.1, I can't find that page now.  I had no 17.1, but did have 17.0, so used that, now morphed to desktop/gnome
Comment 13 Mike Johnson 2020-09-13 21:02:31 UTC
Ah, it is the gnome guide, https://wiki.gentoo.org/wiki/GNOME/Guide.
It uses amd64 as an example, I simply changed it to arm64
Comment 14 Fabian Groffen gentoo-dev 2020-09-14 09:45:42 UTC
yes, but you're not using Gentoo Prefix, are you?
Comment 15 Steven Trogdon 2020-09-15 21:15:00 UTC
(In reply to Steven Trogdon from comment #8)
> (In reply to Fabian Groffen from comment #6)
> > Seems we already did:
> > 
> > # Michael Haubenwallner <haubi@gentoo.org> (2018-06-21)
> > # sys-libs/libseccomp is a linux interface, not sure if it will work
> > # in prefix for Linux either, bug #585756
> > seccomp
> > 
> > what profile are you using?
> > 
> > (eselect profile show)
> 
> Not sure if meant for me but
> 
>  $ eselect profile show
> Current /storage/strogdon/gentoo-rap/etc/portage/make.profile symlink:
>   default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+

seccomp is in my profiles/prefix/use.mask file, so apparently it's not functioning as desired.
Comment 16 Fabian Groffen gentoo-dev 2020-09-16 07:03:30 UTC
Yeah, the standalone/RAP profiles don't inherit from profiles/prefix.

I think we need to move the appropriate maskes from profiles/prefix down to profiles/features/prefix or something
Comment 17 Steven Trogdon 2020-12-08 02:53:58 UTC
There is now a sys-apps/file-5.39-r3. 

On a fresh Prefix install with 

$ eselect profile show
Current /storage/strogdon/gentoo-rap/etc/portage/make.profile symlink:
  default/linux/amd64/17.1/no-multilib/prefix/kernel-3.2+

sys-apps/file-5.39-r3 is automatically installed with USE=seccomp without explicitly specifying seccomp

 $ eix -I sys-apps/file
[I] sys-apps/file
     Available versions:  5.37-r1 5.38-r1 5.39-r3 **9999*l {bzip2 lzma python seccomp static-libs zlib ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" PYTHON_TARGETS="python3_6 python3_7 python3_8 python3_9"}
     Installed versions:  5.39-r3(09:28:50 PM 11/25/2020)(bzip2 seccomp zlib -lzma -python -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" PYTHON_TARGETS="python3_7 python3_8 -python3_6 -python3_9")
     Homepage:            https://www.darwinsys.com/file/
     Description:         identify a file's format by scanning binary data for patterns

And this version seems to be functioning properly:

$ file ~/usr/lib/python3.8/site-packages/jupyter.py 
/storage/strogdon/gentoo-rap/usr/lib/python3.8/site-packages/jupyter.py: Python script, ASCII text executable
Comment 18 Fabian Groffen gentoo-dev 2020-12-08 07:49:17 UTC
Ok, nice, thanks for keeeping on trying :)
Comment 19 Bob Deblier 2021-04-23 07:05:55 UTC
sys-apps/file-5.40-r1 is broken again on arm:

Making all in magic
make[2]: Entering directory '/var/tmp/portage/sys-apps/file-5.40-r1/work/file-5.40-.arm/magic'
../src/file -C -m magic
make[2]: *** [Makefile:843: magic.mgc] Bad system call
make[2]: Leaving directory '/var/tmp/portage/sys-apps/file-5.40-r1/work/file-5.40-.arm/magic'
make[1]: *** [Makefile:459: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/file-5.40-r1/work/file-5.40-.arm'
make: *** [Makefile:368: all] Error 2
 * ERROR: sys-apps/file-5.40-r1::gentoo failed (compile phase):
 *   emake failed
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-23 07:24:51 UTC
(In reply to Bob Deblier from comment #19)
> sys-apps/file-5.40-r1 is broken again on arm:
> 
> Making all in magic
> make[2]: Entering directory
> '/var/tmp/portage/sys-apps/file-5.40-r1/work/file-5.40-.arm/magic'
> ../src/file -C -m magic
> make[2]: *** [Makefile:843: magic.mgc] Bad system call
> make[2]: Leaving directory
> '/var/tmp/portage/sys-apps/file-5.40-r1/work/file-5.40-.arm/magic'
> make[1]: *** [Makefile:459: all-recursive] Error 1
> make[1]: Leaving directory
> '/var/tmp/portage/sys-apps/file-5.40-r1/work/file-5.40-.arm'
> make: *** [Makefile:368: all] Error 2
>  * ERROR: sys-apps/file-5.40-r1::gentoo failed (compile phase):
>  *   emake failed

Likely not Prefix specific (..are you using Prefix?) and this is a closed bug, way too easy to miss comments here.

See bug 784857