sys-process/atop-2.9.0-r1 withe USE="modules modules-sign" fails after kernel upgrade (sys-kernel/gentoo-sources-6.1.57 -> sys-kernel/gentoo-sources-6.1.66) with the following error: * A module seem to have been built for kernel version '6.1.57-gentoo-ns' * while it was meant for '6.1.66-gentoo-ns'. This may indicate an * ebuild issue (e.g. used runtime `uname -r` kernel rather than * the chosen sources). Please report this to the ebuild's maintainer. Reproducible: Always Steps to Reproduce: 1. emerge -avu1 sys-kernel/gentoo-sources 2. cd /usr/src && unlink linux && ln -s linux-6.1.66-gentoo linux 3. cd linux && make oldconfig && make install modules_install 4. emerge @module-rebuild Actual Results: * A module seem to have been built for kernel version '6.1.57-gentoo-ns' * while it was meant for '6.1.66-gentoo-ns'. This may indicate an * ebuild issue (e.g. used runtime `uname -r` kernel rather than * the chosen sources). Please report this to the ebuild's maintainer. * ERROR: sys-process/atop-2.9.0-r1::gentoo failed (install phase): * module and source version mismatch in '/var/tmp/portage/sys-process/atop-2.9.0-r1/image/lib/modules/6.1.66-gentoo-ns/extra/netatop.ko' * * Call stack: * ebuild.sh, line 136: Called src_install * environment, line 2372: Called linux-mod-r1_src_install * environment, line 1961: Called modules_post_process * environment, line 2063: Called _modules_sanity_modversion '/var/tmp/portage/sys-process/atop-2.9.0-r1/image/lib/modules/6.1.66-gentoo-ns/extra/netatop.ko' * environment, line 763: Called die * The specific snippet of code: * die "module and source version mismatch in '${mod}'"; * * If you need support, post the output of `emerge --info '=sys-process/atop-2.9.0-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-process/atop-2.9.0-r1::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-process/atop-2.9.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-process/atop-2.9.0-r1/temp/environment'. * Working directory: '/var/tmp/portage/sys-process/atop-2.9.0-r1/work/atop-2.9.0' * S: '/var/tmp/portage/sys-process/atop-2.9.0-r1/work/atop-2.9.0' Expected Results: module(s) compiled. signed and installed for the new kernel Portage 3.0.56 (python 3.11.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-13, glibc-2.37-r7, 6.1.57-gentoo-ns x86_64) ================================================================= System uname: Linux-6.1.57-gentoo-ns-x86_64-Intel-R-_Core-TM-_i3-10105_CPU_@_3.70GHz-with-glibc2.37 KiB Mem: 16193752 total, 722172 free KiB Swap: 8388604 total, 8275196 free Timestamp of repository gentoo: Sun, 10 Dec 2023 12:30:01 +0000 Head commit of repository gentoo: 65cb03e482630b630233c7cf09960e2578464428 Timestamp of repository guru: Sat, 09 Dec 2023 18:32:02 +0000 Head commit of repository guru: 5f75502fa106adefa50da9738bca72f6cf60db3d Timestamp of repository nest: Sat, 09 Dec 2023 18:32:00 +0000 Head commit of repository nest: 81df559442214cc53778052e60d29e6b79a798aa sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p7) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.11.6::gentoo, 3.12.1::gentoo dev-lang/rust-bin: 1.71.1::gentoo dev-util/cmake: 3.27.7::gentoo dev-util/meson: 1.2.3::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/openrc: 0.48::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r9::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/gcc: 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 15.0.7::gentoo, 16.0.6::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: False sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False local location: /var/db/repos/local masters: gentoo volatile: False nest location: /var/db/repos/nest sync-type: git sync-uri: https://github.com/gentoo-mirror/nest.git masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -mtune=native -mharden-sls=all" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/applications/google-chrome.desktop /usr/share/applications/signal-desktop.desktop /usr/share/easy-rsa /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -mtune=native -mharden-sls=all" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --jobs 4 --load-average 8 --ask y --ask-enter-invalid --alert 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="-O2 -pipe -march=native -mtune=native -mharden-sls=all" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks downgrade-backup 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 suidctl unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native -mtune=native -mharden-sls=all" GENTOO_MIRRORS="https://gentoo.mirror.root.lu/ https://tux.rainside.sk/gentoo/ https://mirror.leaseweb.com/gentoo/" LANG="en_CA.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j8 -l9" 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="X a52 aac acl acpi alsa amd64 apparmor bash-completion bindist bluetooth branding bzip2 cairo cdda cddb cdr cli crypt cups dbus dri dts dvb dvd dvdr elogind emboss encode exif ffmpeg flac fortran fuse gdbm gif gpm gtk gui hddtemp iconv icu idn jpeg lcms libglvnd libnotify libtirpc lm-sensors mad mbox mng modules-sign mp3 mp4 mpeg mtp ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf png policykit ppds qt5 readline replaygain sdl seccomp spell split-usr ssl startup-notification svg system-icu system-jpeg system-png system-sqlite test-rust tiff truetype udev udisks unicode upower usb v4l vaapi vorbis vulkan webp wxwidgets x264 xattr xcb xfce xinerama xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-CA" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" 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="intel i965 iris vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat 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, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 878650 [details] /var/tmp/portage/sys-process/atop-2.9.0-r1/temp/build.log
$ emerge -pqv '=sys-process/atop-2.9.0-r1::gentoo' [ebuild R ] sys-process/atop-2.9.0-r1 USE="modules modules-sign strip -dist-kernel"
$ emerge --info '=sys-process/atop-2.9.0-r1::gentoo' Portage 3.0.56 (python 3.11.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-13, glibc-2.37-r7, 6.1.57-gentoo-ns x86_64) ================================================================= System Settings ================================================================= [skipped, as above] ================================================================= Package Settings ================================================================= sys-process/atop-2.9.0-r1::gentoo was built with the following: USE="modules modules-sign strip -dist-kernel" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict suidctl unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
It also happens on sys-process/atop-2.10.0-r1. This is probably caused because both ebuilds use a patch that uses `uname -r` (the current kernel) in make install instead of getting the kernel version from for e.g. `eselect kernel show`. See the line 23 of this file: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-process/atop/files/atop-2.9.0-netatop-makefile.patch I'll also add my own logs. Note that I use the xanmod-rt-kernel, which is based on the dist-kernel, but that this also happens if the current running kernel is gentoo-dist. tux ~ # uname -r 6.6.41-rt37-xanmod1-dist
Created attachment 899841 [details] Logs for trying to build atop modules with mismatching uname -r and eselect kernel show
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df8c8087a90e1123ea8a7e62a10d2be5df9167b1 commit df8c8087a90e1123ea8a7e62a10d2be5df9167b1 Author: Paul Zander <negril.nx+gentoo@gmail.com> AuthorDate: 2024-08-11 20:51:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-08-11 20:56:01 +0000 sys-process/atop: patch out uname usage Bonus: dies when it finds uname in netatop source Closes: https://bugs.gentoo.org/919693 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> sys-process/atop/atop-2.10.0-r1.ebuild | 8 ++++++++ sys-process/atop/atop-2.9.0-r1.ebuild | 8 ++++++++ 2 files changed, 16 insertions(+)
(In reply to benoit.dufour from comment #4) > It also happens on sys-process/atop-2.10.0-r1. > This is probably caused because both ebuilds use a patch that uses `uname > -r` (the current kernel) in make install instead of getting the kernel > version from for e.g. `eselect kernel show`. > See the line 23 of this file: > https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-process/atop/files/atop-2. > 9.0-netatop-makefile.patch > > I'll also add my own logs. > Note that I use the xanmod-rt-kernel, which is based on the dist-kernel, but > that this also happens if the current running kernel is gentoo-dist. > tux ~ # > uname -r > 6.6.41-rt37-xanmod1-dist Note that this analysis was bogus. The patch was not adding uname (it's in a context line) but also the ebuild wasn't using the install target for this reason.
I noticed too late. I had already sent the message with the little ping on IRC. So I thought you would notice without I ping you another time. Anyway, thanks you a lot, like that I won't have to triple reboot anymore after a kernel upgrade.