Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921089 - sys-apps/portage-3.0.59: Traceback when signing binpkg and pubkey not available for verification
Summary: sys-apps/portage-3.0.59: Traceback when signing binpkg and pubkey not availab...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 920827
Blocks:
  Show dependency tree
 
Reported: 2023-12-30 14:33 UTC by Marc Schiffbauer
Modified: 2024-01-03 05:46 UTC (History)
0 users

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 Marc Schiffbauer gentoo-dev 2023-12-30 14:33:05 UTC
How to reproduce:

FEATURES="$FEATURES binpkg-signing"
BINPKG_GPG_SIGNING_GPG_HOME="/root/.gnupg"
BINPKG_GPG_SIGNING_KEY="0xYOURPRIVATEKEYFORBINPKGSIGNING"

but BINPKG_GPG_VERIFY_GPG_HOME is default (/etc/portage/gpg) which does not have the pubkey of 0xYOURPRIVATEKEYFORBINPKGSIGNING in the keyring. (E.G. it has been created by "getuto")

This is the "crash":

[…]
>>> Completed installing sys-apps/portage-3.0.59 into /var/tmp/portage/sys-apps/portage-3.0.59/image

 * Final size of build directory: 11496 KiB (11.2 MiB)
 * Final size of installed tree:  22604 KiB (22.0 MiB)

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   /usr/lib/python3.11/site-packages/portage/util/libc.cpython-311-x86_64-linux-gnu.so
   /usr/lib/python3.11/site-packages/portage/util/file_copy/reflink_linux.cpython-311-x86_64-linux-gnu.so
   /usr/lib/python3.11/site-packages/portage/util/_whirlpool.cpython-311-x86_64-linux-gnu.so
>>> Done.
!!!
gpg: WARNING: unsafe ownership on homedir '/etc/portage/gnupg'
[GNUPG:] PLAINTEXT 74 0
[GNUPG:] NEWSIG
gpg: Signature made Sat 30 Dec 2023 03:26:09 PM CET
gpg:                using RSA key CE5236E04A99641DC6794A5C2171B35124FF94BF
[GNUPG:] ERRSIG 2171B35124FF94BF 1 10 01 1703946369 9 CE5236E04A99641DC6794A5C2171B35124FF94BF
[GNUPG:] NO_PUBKEY 2171B35124FF94BF
gpg: Can't check signature: No public key
gpg: can't create `/etc/portage/gnupg/random_seed': Permission denied
!!! Invalid binary package: '/usr/portage/packages/sys-apps/portage/portage-3.0.59-8.gpkg.tar.4534', GPG verify failed
[ERROR] Exception in callback AsynchronousTask._exit_listener_cb(<bound method...x3af8297c890>>)
handle: <Handle AsynchronousTask._exit_listener_cb(<bound method...x3af8297c890>>)>
Traceback (most recent call last):
  File "/usr/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.11/site-packages/_emerge/AsynchronousTask.py", line 209, in _exit_listener_cb
    listener(self)
  File "/usr/lib/python3.11/site-packages/_emerge/TaskSequence.py", line 49, in _task_exit_handler
    self._start_next_task()
  File "/usr/lib/python3.11/site-packages/_emerge/TaskSequence.py", line 43, in _start_next_task
    self._start_task(task, self._task_exit_handler)
  File "/usr/lib/python3.11/site-packages/_emerge/CompositeTask.py", line 117, in _start_task
    task.start()
  File "/usr/lib/python3.11/site-packages/_emerge/AsynchronousTask.py", line 34, in start
    self._start()
  File "/usr/lib/python3.11/site-packages/_emerge/EbuildBuild.py", line 517, in _start
    self.ebuild_build._record_binpkg_info(self.ebuild_binpkg)
  File "/usr/lib/python3.11/site-packages/_emerge/EbuildBuild.py", line 559, in _record_binpkg_info
    "BINPKGMD5": f"{pkg._metadata['MD5']}\n",
                    ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '_metadata'
Terminated



emerge --info:

Portage 3.0.59 (python 3.11.6-final-0, default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr, gcc-13, glibc-2.37-r7, 4.9.132-dappersec x86_64)                                                                                                 [52/1830]
=================================================================
System uname: Linux-4.9.132-dappersec-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-glibc2.37
KiB Mem:    32664168 total,    750816 free
KiB Swap:   16777212 total,  14240772 free
Timestamp of repository gentoo: Sat, 30 Dec 2023 11:01:58 +0000
Head commit of repository gentoo: 7b4b76b120e1652da46d1e56f22ab82d5232ccc9

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p7) 2.40.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.8.2 [enabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.6::gentoo, 3.12.0_p1::gentoo
dev-lang/rust:             1.71.1::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            9999::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          254.5-r1::gentoo
sys-devel/autoconf:        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
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: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000
    volatile: True

Binary Repositories:

binhost
    priority: 900
    sync-uri: https://mirror.leaseweb.com/gentoo/releases/amd64/binpackages/17.1/x86-64

Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Q3AEULA PUEL dlj-1.1 skype-4.0.0.7-copyright googleearth AdobeFlash-11.x google-talkplugin Oracle-BCLA-JavaSE Google-TOS TeamViewer google-chrome RAR"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=skylake -mno-hle -mno-rtm -mtune=skylake"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind"
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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=skylake -mno-hle -mno-rtm -mtune=skylake"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --load-average=3.0 --tree --quiet-build=n --verbose-conflicts --autounmask --autounmask-keep-keywords=n --autounmask-write --autounmask-unrestricted-atoms --autounmask-continue --usepkg=n --autounmask y --autounmask-keep-masks y --autounmask-unrestricted-atoms y --autounmask-keep-keywords y --autounmask-write y --fail-clean n --with-bdeps=y --changed-deps --changed-deps-report=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=skylake -mno-hle -mno-rtm -mtune=skylake"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-signing buildpkg buildpkg-live ccache compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles gpg-keepalive ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=skylake -mno-hle -mno-rtm -mtune=skylake"
GENTOO_MIRRORS="https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/     https://ftp.agdsn.de/gentoo     https://ftp.fau.de/gentoo     https://ftp.gwdg.de/pub/linux/gentoo/     https://ftp.halifax.rwth-aachen.de/gentoo/     https://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/     https://ftp.tu-ilmenau.de/mirror/gentoo/     https://ftp.uni-hannover.de/gentoo/     https://ftp.uni-stuttgart.de/gentoo-distfiles/     https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/     https://mirror.dogado.de/gentoo     https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/     ttps://mirror.netcologne.de/gentoo/     https://mirror.netzwerge.de/gentoo/     https://packages.hs-regensburg.de/gentoo-distfiles/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
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 aalib acl acpi activities aes alsa amd64 ao audiofile avx avx2 bluetooth branding bzip2 cairo cdda cddb cdr chm cli crypt cryptsetup css cups dbus declarative device-mapper dist-kernel djvu dri dts dvd dvdr ebook encode exif f16c ffmpeg flac fma3 fortran gdbm gdm gif gimp gnome-shell google-gadgets gpm gtk gui iconv icu id3tag ieee1394 ipv6 jpeg jpeg2k kde kwallet lame laptop lcms libnotify libtirpc lm_sensors mad mjpeg mmx mmxext mng mp3 mp4 mpeg mtp multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pclmul pcmcia pcre pdf pipewire plasma png policykit popcnt postgres ppds pulseaudio qml qt5 rdrand readline real resolvconf rss samba screencast sdl seccomp semantic-desktop smapi sndfile sound spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd test-rust theora thumbnail tiff truetype udev udisks unicode upower usb vaapi vdpau verify-sig vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xcomposite xft xml xrandr xscreensaver xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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" CAMERAS="canon fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" 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="multiboot pc qemu efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="de en" 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" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel i965" 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, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, MAKEOPTS, 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
Comment 1 Larry the Git Cow gentoo-dev 2023-12-30 21:45:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=89df7574a355a245e19ba297c3685997eec6bbbe

commit 89df7574a355a245e19ba297c3685997eec6bbbe
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2023-12-30 18:21:08 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2023-12-30 18:27:21 +0000

    EbuildBinpkg: Handle binarytree inject failure
    
    Capture stdout and stderr for logging during
    binarytree inject, and set returncode to 1 when
    inject fails and returns None.
    
    Bug: https://bugs.gentoo.org/921089
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/EbuildBinpkg.py | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)
Comment 2 Marc Schiffbauer gentoo-dev 2023-12-31 01:18:32 UTC
Thanks, looks good! I cannot reproduce anymore with -9999
Comment 3 Larry the Git Cow gentoo-dev 2024-01-02 03:39:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73c980cc99406a9257659adbe10af348897d7a98

commit 73c980cc99406a9257659adbe10af348897d7a98
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-02 03:38:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-02 03:38:51 +0000

    sys-apps/portage: add 3.0.60
    
    Closes: https://bugs.gentoo.org/920827
    Closes: https://bugs.gentoo.org/920828
    Closes: https://bugs.gentoo.org/921089
    Closes: https://bugs.gentoo.org/921107
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.60.ebuild | 246 +++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+)