Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922629 - binary coreutils[acl] installed before binary acl, breaking mv and with that further operation
Summary: binary coreutils[acl] installed before binary acl, breaking mv and with that ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 930802
  Show dependency tree
 
Reported: 2024-01-21 15:39 UTC by Andreas K. Hüttel
Modified: 2024-04-28 00:32 UTC (History)
4 users (show)

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


Attachments
catalyst log (m68k-stage3-coreutils-acl.log,71.55 KB, text/plain)
2024-01-21 15:39 UTC, Andreas K. Hüttel
Details
glibc runtime cycle containing 29 packages from docker.io/gentoo/stage3:systemd-20240205 image (stage3-systemd-20240205-runtime-cycle.txt,5.83 KB, text/plain)
2024-02-07 02:09 UTC, Zac Medico
Details
output of "emerge -epvk world" (e.out.xz,6.06 KB, application/x-xz)
2024-02-08 00:20 UTC, Andreas K. Hüttel
Details
output of "emerge -epvk --debug world" (e-d.out.xz,35.25 KB, application/x-xz)
2024-02-08 00:20 UTC, Andreas K. Hüttel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Hüttel archtester gentoo-dev 2024-01-21 15:39:38 UTC
Created attachment 882781 [details]
catalyst log

Observed in m68k stage3 build, and I *think* this might be a portage problem:

>>> Emerging binary (225 of 285) sys-apps/coreutils-9.4::gentoo
>>> Installing (225 of 285) sys-apps/coreutils-9.4::gentoo
>>> Completed (225 of 285) sys-apps/coreutils-9.4::gentoo
>>> Emerging binary (226 of 285) sys-apps/acl-2.3.1-r2::gentoo
>>> Failed to emerge sys-apps/acl-2.3.1-r2, Log file:
>>>  '/var/log/portage/sys-apps:acl-2.3.1-r2:20240118-153207.log'
>>> Extracting info
 * Package:    sys-apps/acl-2.3.1-r2:0
 * Repository: gentoo
 * USE:        elibc_glibc nls split-usr kernel_linux m68k
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
/bin/mv: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
 * ERROR: sys-apps/acl-2.3.1-r2::gentoo failed (setup phase):
 *   error processing environment
 * 
 * Call stack:
 *   ebuild.sh, line 561:  Called die
 * The specific snippet of code:
 *      __preprocess_ebuild_env || die "error processing environment"
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/acl-2.3.1-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/acl-2.3.1-r2::gentoo'`.
 * The complete build log is located at '/var/log/portage/sys-apps:acl-2.3.1-r2:20240118-153207.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-apps/acl-2.3.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/acl-2.3.1-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-apps/acl-2.3.1-r2/empty'
 * S: '/var/tmp/portage/sys-apps/acl-2.3.1-r2/work/acl-2.3.1'
/bin/mv: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
 * ERROR: sys-apps/acl-2.3.1-r2::gentoo failed:
 *   error processing environment
 * 

And from there everything goes downhill...

Full log attached
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2024-01-21 15:57:57 UTC
There's two coreutils-9.4 binary packages and I dont know which one is used. However, here's the Packages info for both:

BDEPEND: app-arch/xz-utils dev-lang/perl
BUILD_ID: 1
BUILD_TIME: 1693521885
CPV: sys-apps/coreutils-9.4
DEFINED_PHASES: configure install postinst prepare setup test unpack
DEPEND: sys-apps/acl dev-libs/openssl:0/3= sys-apps/attr virtual/libintl
EAPI: 8
IUSE: acl caps gmp hostname kill multicall nls +openssl selinux +split-usr static test vanilla xattr verify-sig
KEYWORDS: ~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux
LICENSE: GPL-3+
MD5: 1c265000b19098eaa3d2c7cad5936c1e
PATH: sys-apps/coreutils/coreutils-9.4-1.gpkg.tar
PROVIDES: m68k_32: libstdbuf.so
RDEPEND: sys-apps/acl dev-libs/openssl:0/3= sys-apps/attr virtual/libintl !app-misc/realpath !<sys-apps/util-linux-2.13 !<sys-apps/sandbox-2.10-r4 !sys-apps/stat !net-mail/base64 !sys-apps/mktemp !<app-forensics/tct-1.18-r1 !<net-fs/netatalk-2.0.3-r4
REQUIRES: m68k_32: libacl.so.1 libattr.so.1 libc.so.6 libcrypto.so.3
RESTRICT: test
SHA1: b93402310b813d304eab9467e4eaca6bb38b92ed
SIZE: 3973120
USE: acl elibc_glibc kernel_linux m68k nls openssl split-usr xattr
MTIME: 1693521964
REPO: gentoo

BDEPEND: app-arch/xz-utils dev-lang/perl
BUILD_ID: 2
BUILD_TIME: 1704362555
CPV: sys-apps/coreutils-9.4
DEFINED_PHASES: configure install postinst prepare setup test unpack
DEPEND: sys-apps/acl dev-libs/openssl:0/3= sys-apps/attr virtual/libintl
EAPI: 8
IUSE: acl caps gmp hostname kill multicall nls +openssl selinux +split-usr static test vanilla xattr verify-sig
KEYWORDS: ~alpha ~amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc ~x86 ~x86-linux
LICENSE: GPL-3+
MD5: 9120ad5d8c685500423df3ce1e8a4f53
PATH: sys-apps/coreutils/coreutils-9.4-2.gpkg.tar
PROVIDES: m68k_32: libstdbuf.so
RDEPEND: sys-apps/acl dev-libs/openssl:0/3= sys-apps/attr virtual/libintl !<sys-apps/util-linux-2.13 !<sys-apps/sandbox-2.10-r4 !sys-apps/stat !net-mail/base64 !sys-apps/mktemp !<app-forensics/tct-1.18-r1 !<net-fs/netatalk-2.0.3-r4 >=sys-libs/glibc-2.38-r8
REQUIRES: m68k_32: ld.so.1 libacl.so.1 libattr.so.1 libc.so.6 libcrypto.so.3
RESTRICT: test
SHA1: 6dffc58e0aa3d99f7a092230eece525fb692e666
SIZE: 4003840
USE: acl elibc_glibc kernel_linux m68k nls openssl split-usr xattr
MTIME: 1704362599
REPO: gentoo
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2024-01-21 17:55:06 UTC
Same just happened for an alpha stage3 build.


>>> Emerging binary (228 of 289) virtual/perl-Math-BigInt-1.999.842::gentoo
>>> Installing (228 of 289) virtual/perl-Math-BigInt-1.999.842::gentoo
>>> Completed (228 of 289) virtual/perl-Math-BigInt-1.999.842::gentoo
>>> Emerging binary (229 of 289) sys-apps/coreutils-9.4::gentoo
>>> Installing (229 of 289) sys-apps/coreutils-9.4::gentoo
>>> Completed (229 of 289) sys-apps/coreutils-9.4::gentoo
>>> Emerging binary (230 of 289) sys-apps/acl-2.3.1-r2::gentoo
>>> Failed to emerge sys-apps/acl-2.3.1-r2, Log file:
>>> '/var/log/portage/sys-apps:acl-2.3.1-r2:20240121-170157.log'
>>> Extracting info
[32m * [39;49;00mPackage:    sys-apps/acl-2.3.1-r2:0
[32m * [39;49;00mRepository: gentoo
[32m * [39;49;00mUSE:        nls elibc_glibc kernel_linux alpha
[32m * [39;49;00mFEATURES:   preserve-libs sandbox userpriv usersandbox
/usr/bin/mv: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
 [31;01m*[0m ERROR: sys-apps/acl-2.3.1-r2::gentoo failed (setup phase):
 [31;01m*[0m   error processing environment
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m   ebuild.sh, line 561:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m          __preprocess_ebuild_env || die "error processing environment"
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=sys-apps/acl-2.3.1-r2::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-apps/acl-2.3.1-r2::gentoo'`.
 [31;01m*[0m The complete build log is located at '/var/log/portage/sys-apps:acl-2.3.1-r2:20240121-170157.log'.
 [31;01m*[0m For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-apps/acl-2.3.1-r2/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-apps/acl-2.3.1-r2/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/sys-apps/acl-2.3.1-r2/empty'
 [31;01m*[0m S: '/var/tmp/portage/sys-apps/acl-2.3.1-r2/work/acl-2.3.1'
/usr/bin/mv: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
 [31;01m*[0m ERROR: sys-apps/acl-2.3.1-r2::gentoo failed:
 [31;01m*[0m   error processing environment
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m   misc-functions.sh, line 17:  Called source '/var/tmp/portage/._portage_reinstall_.9a3h70z_/bin/ebuild.sh'
 [31;01m*[0m           ebuild.sh, line 561:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m          __preprocess_ebuild_env || die "error processing environment"
 [31;01m*[0m 
...
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2024-02-06 23:17:10 UTC
Same observed in the loong stage3, with binary tar emerged before source acl

[...]
>>> Emerging binary (231 of 280) sys-apps/attr-2.5.2::gentoo
>>> Installing (231 of 280) sys-apps/attr-2.5.2::gentoo
>>> Completed (231 of 280) sys-apps/attr-2.5.2::gentoo
>>> Emerging binary (232 of 280) virtual/acl-0-r2::gentoo
>>> Installing (232 of 280) virtual/acl-0-r2::gentoo
>>> Completed (232 of 280) virtual/acl-0-r2::gentoo
>>> Emerging binary (233 of 280) app-arch/tar-1.35::gentoo
>>> Installing (233 of 280) app-arch/tar-1.35::gentoo
>>> Completed (233 of 280) app-arch/tar-1.35::gentoo
>>> Emerging binary (234 of 280) sys-devel/gettext-0.22.4::gentoo
>>> Installing (234 of 280) sys-devel/gettext-0.22.4::gentoo
>>> Completed (234 of 280) sys-devel/gettext-0.22.4::gentoo
>>> Emerging (235 of 280) sys-apps/acl-2.3.2::gentoo
>>> Failed to emerge sys-apps/acl-2.3.2, Log file:
>>> '/var/log/portage/sys-apps:acl-2.3.2:20240206-215741.log'
[32m * [39;49;00mPackage:    sys-apps/acl-2.3.2:0
[32m * [39;49;00mRepository: gentoo
[32m * [39;49;00mMaintainer: base-system@gentoo.org
[32m * [39;49;00mUSE:        elibc_glibc kernel_linux loong nls split-usr
[32m * [39;49;00mFEATURES:   preserve-libs sandbox userpriv usersandbox
/bin/tar: error while loading shared libraries: libacl.so.1: cannot open shared object file: No such file or directory
 [31;01m*[0m ERROR: sys-apps/acl-2.3.2::gentoo failed (unpack phase):
 [31;01m*[0m   unpack: failure unpacking acl-2.3.2.tar.xz
 [31;01m*[0m 
 [31;01m*[0m Call stack:
 [31;01m*[0m               ebuild.sh, line  136:  Called src_unpack
 [31;01m*[0m             environment, line 2109:  Called default
 [31;01m*[0m      phase-functions.sh, line  871:  Called default_src_unpack
 [31;01m*[0m      phase-functions.sh, line  898:  Called __eapi0_src_unpack
 [31;01m*[0m        phase-helpers.sh, line  807:  Called unpack 'acl-2.3.2.tar.xz'
 [31;01m*[0m        phase-helpers.sh, line  547:  Called __unpack_tar 'xz -T32 -d'
 [31;01m*[0m        phase-helpers.sh, line  372:  Called __assert_sigpipe_ok 'unpack: failure unpacking acl-2.3.2.tar.xz'
 [31;01m*[0m   isolated-functions.sh, line   41:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m                  [[ ${x} -ne 0 && ${x} -ne ${PORTAGE_SIGPIPE_STATUS:-141} ]] && die "$@"
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=sys-apps/acl-2.3.2::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-apps/acl-2.3.2::gentoo'`.
 [31;01m*[0m The complete build log is located at '/var/log/portage/sys-apps:acl-2.3.2:20240206-215741.log'.
 [31;01m*[0m For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-apps/acl-2.3.2/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-apps/acl-2.3.2/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/sys-apps/acl-2.3.2/work'
 [31;01m*[0m S: '/var/tmp/portage/sys-apps/acl-2.3.2/work/acl-2.3.2'
Comment 4 Zac Medico gentoo-dev 2024-02-07 02:09:14 UTC
Created attachment 884435 [details]
glibc runtime cycle containing 29 packages from docker.io/gentoo/stage3:systemd-20240205 image

The injected libc deps are definitely coming into play here. The runtime cycle for the docker.io/gentoo/stage3:systemd-20240205 image has 29 packages.
Comment 5 Zac Medico gentoo-dev 2024-02-07 02:31:08 UTC
It should help to increase the priority of deps where there is runtime + buildtime intersection, as suggested in bug 921333 comment 12. Since injected libc deps are runtime only, they'll have lower priority.

We could also possibly use soname dependencies to enrich priorities without doing full soname dependency accounting, ignoring soname dependencies that don't intersect with *DEPEND.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2024-02-08 00:04:50 UTC
I made a big and very ugly reproducer (sorry), based on the stage builds.

* Download the 750M .tar.xz from
  dev.gentoo.org/~dilfridge/dilfridge-m68k.tar.xz

* Unpack it in /var/lib/machines

Set up your system for a qemu chroot
* Build app-emulation/qemu[static-user] with QEMU_USER_TARGETS="m68k"
* Copy /usr/bin/qemu-m68k to /var/lib/machines/dilfridge-m68k/usr/bin
* Configure binfmt-misc
  see e.g. https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Compiling_with_QEMU_user_chroot#Configuration

Start the container via
systemd-nspawn -M dilfridge-m68k

On the emulated shell, run
  emerge -eavk world

You'll see that tar[acl] is scheduled for binary install before acl.
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2024-02-08 00:06:27 UTC
(In reply to Andreas K. Hüttel from comment #6)
> I made a big and very ugly reproducer (sorry), based on the stage builds.
> 
> * Download the 750M .tar.xz from
>   dev.gentoo.org/~dilfridge/dilfridge-m68k.tar.xz
> 

PS. Obviously I have this running here, so I can also provide debug output, log files, etc... Maybe easier.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2024-02-08 00:20:20 UTC
Created attachment 884505 [details]
output of "emerge -epvk world"
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2024-02-08 00:20:41 UTC
Created attachment 884506 [details]
output of "emerge -epvk --debug world"
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-08 00:39:48 UTC
zac was (of course) right, get_smallest_cycle goes wild again with many 1-node cycles.

We also have:
```
runtime cycle digraph (5 nodes):

(app-arch/tar-1.35-1:0/0::gentoo, binary scheduled for merge) depends on
  (virtual/acl-0-r2-1:0/0::gentoo, binary scheduled for merge) (runtime)
(sys-devel/gettext-0.22.4-1:0/0::gentoo, binary scheduled for merge) depends on
  (sys-apps/attr-2.5.2-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
  (virtual/acl-0-r2-1:0/0::gentoo, binary scheduled for merge) (runtime)
(sys-apps/attr-2.5.2-r1:0/0::gentoo, ebuild scheduled for merge) depends on
  (sys-devel/gettext-0.22.4-1:0/0::gentoo, binary scheduled for merge) (buildtime)
(sys-apps/acl-2.3.2-r1:0/0::gentoo, ebuild scheduled for merge) depends on
  (sys-apps/attr-2.5.2-r1:0/0::gentoo, ebuild scheduled for merge) (buildtime)
  (sys-devel/gettext-0.22.4-1:0/0::gentoo, binary scheduled for merge) (buildtime)
(virtual/acl-0-r2-1:0/0::gentoo, binary scheduled for merge) depends on
  (sys-apps/acl-2.3.2-r1:0/0::gentoo, ebuild scheduled for merge) (runtime)
```