Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927631 - 23.0 profile upgrade: wrong merged-usr / split-usr detection.
Summary: 23.0 profile upgrade: wrong merged-usr / split-usr detection.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
: 927687 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-23 14:17 UTC by Norman Rieß
Modified: 2024-03-24 10:30 UTC (History)
6 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 Norman Rieß 2024-03-23 14:17:29 UTC
Following the migration guide from 17.1 to 23.0 emerging binutils fails with following error message:

* Your profile is of type merged-usr, but your directories
* on-disk are of type split-usr.
* Please switch back to your last valid profile setting and
* read the documentation about merged-usr and profile changes.

But the profile selected is explicitly set to split-usr:
eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/amd64/23.0/split-usr

The package is downloaded from the seemingly right source

https://mirror.netzwerge.de/gentoo/releases/amd64/binpackages/23.0/x86-64/sys-devel/binutils/binutils-2.41-r5-1.gpkg.tar

According to the update tables.
https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table




Reproducible: Always

Steps to Reproduce:
1. Follow the guide in eselect news
2. Emerge binutils according to the guide.
3. Emerge fails.



emerge --info
Portage 3.0.61 (python 3.11.8-final-0, default/linux/amd64/23.0/split-usr, gcc-13, glibc-2.38-r10, 6.7.1-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.7.1-gentoo-dist-x86_64-AMD_Ryzen_7_5700G_with_Radeon_Graphics-with-glibc2.38
KiB Mem:     8132632 total,   1573724 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sat, 23 Mar 2024 11:00:00 +0000
Head commit of repository gentoo: 5cdbce3a7cb72445f8f3c42bbde9c37d7aa42599
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p5) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.71-r6::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.3::gentoo
dev-build/libtool:         2.4.7-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.2::gentoo
dev-lang/perl:             5.38.2-r2::gentoo
dev-lang/python:           3.11.8_p1::gentoo, 3.12.2_p1::gentoo
sys-apps/baselayout:       2.14-r2::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r10::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://triton/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

Binary Repositories:

binhost
    priority: 9999
    sync-uri: https://mirror.netzwerge.de/gentoo/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--getbinpkg --with-bdeps=y --binpkg-respect-use=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-request-signature buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="de"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl amd64 bzip2 cet crypt dist-kernel dracut gdbm grub iconv ipv6 libtirpc lzma multilib ncurses nls openmp pam pcre readline seccomp split-usr ssl test-rust unicode xattr zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS



>>> Extracting info
 * Package:    sys-devel/binutils-2.41-r5:2.41
 * Repository: gentoo
 * USE:        cet zstd abi_x86_64 elibc_glibc kernel_linux nls plugins amd64
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * 
 * Your profile is of type merged-usr, but your directories
 * on-disk are of type split-usr.
 * Please switch back to your last valid profile setting and
 * read the documentation about merged-usr and profile changes.
 * 
 * ERROR: sys-devel/binutils-2.41-r5::gentoo failed (setup phase):
 *   ERROR: 23.0 merged-usr profile, but disk is split-usr
 * 
 * Call stack:
 *            ebuild.sh, line 784:  Called __ebuild_main 'setup'
 *   phase-functions.sh, line 991:  Called __source_all_bashrcs
 *            ebuild.sh, line 426:  Called __try_source '/var/db/repos/gentoo/profiles/releases/23.0/profile.bashrc'
 *            ebuild.sh, line 487:  Called __qa_source '/var/db/repos/gentoo/profiles/releases/23.0/profile.bashrc'
 *            ebuild.sh, line 123:  Called source '/var/db/repos/gentoo/profiles/releases/23.0/profile.bashrc'
 *       profile.bashrc, line   9:  Called die
 * The specific snippet of code:
 *              die "ERROR: 23.0 merged-usr profile, but disk is split-usr"
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/binutils-2.41-r5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/binutils-2.41-r5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/binutils-2.41-r5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.41-r5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/binutils-2.41-r5/empty'
 * S: '/var/tmp/portage/sys-devel/binutils-2.41-r5/work/binutils-2.41'
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-23 14:56:59 UTC
Thanks, dilfridge is working on a fix for this.
Comment 2 Larry the Git Cow gentoo-dev 2024-03-23 19:27:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43f01d356a8fd347a19d7583eab92d01bee35f9f

commit 43f01d356a8fd347a19d7583eab92d01bee35f9f
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2024-03-23 19:11:09 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2024-03-23 19:27:11 +0000

    profiles: releases/23.0: Fix bashrc safety guard
    
    The previous version relied on an environment variable, which was
    *not* saved in binary packages and also not re-sourced from the
    profile. It always became unset, which meant "merged-usr".
    
    With that, not the local profile and the local filesystem were
    compared, but "merged-usr" and the local filesystem -- which
    obviously fails for any split-usr installation.
    
    Closes: https://bugs.gentoo.org/927631
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 profiles/releases/23.0/profile.bashrc | 43 ++++++++++++++++++++++++++++++++---
 1 file changed, 40 insertions(+), 3 deletions(-)
Comment 3 Norman Rieß 2024-03-23 21:50:01 UTC
Thank you!
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-24 10:30:49 UTC
*** Bug 927687 has been marked as a duplicate of this bug. ***