Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 869467

Summary: sys-apps/portage: gpkg-sign doesn't work as unprivileged user
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: gentoo, syu.os
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-10 11:06:27 UTC
$ gpkg-sign inkscape-1.2.1-r2-1.gpkg.tar 
!!!
flock: cannot open lock file /run/lock/portage-binpkg-gpg.lock: Permission denied
 * Signature exception: inkscape-1.2.1-r2-1.gpkg.tar


I think it wouldn't be unreasonable to make it work as non-root ;-).
Comment 1 Sheng Yu 2022-09-10 20:28:31 UTC
You can set the lock to somewhere that allow read/write in make.conf

BINPKG_GPG_SIGNING_BASE_COMMAND="/usr/bin/flock /tmp/portage-binpkg-gpg.lock /usr/bin/gpg --sign --armor [PORTAGE_CONFIG]"