Hi, i emerged the new portage und wanted test the new features discribed on the gentoo homepage. When i put the "gpg" feature in my /etc/make.conf file, emerge crashes whatever i do. For example: root@platon ~ # emerge -pv devfsd Traceback (most recent call last): File "/usr/bin/emerge", line 10, in ? import portage File "/usr/lib/portage/pym/portage.py", line 6878, in ? portdb=portdbapi(settings["PORTDIR"]) File "/usr/lib/portage/pym/portage.py", line 4902, in __init__ self.manifestVerifier = portage_gpg.FileChecker(self.mysettings["PORTAGE_GPG_DIR"], "gentoo.gpg", minimumTrust=self.manifestVerifyLevel) File "/usr/lib/portage/pym/portage_gpg.py", line 46, in __init__ raise portage_exception.DirectoryNotFound, "keydir: %s" % keydir portage_exception.DirectoryNotFound: 'keydir: ' Without the gpg-feature everythin works fine. Reproducible: Always Steps to Reproduce: 1.Insert FEATURES="gpg" in make.conf 2. 3. An "emerge info" with the gpg feature ist impossible cause: root@platon ~ # emerge info Traceback (most recent call last): File "/usr/bin/emerge", line 10, in ? import portage File "/usr/lib/portage/pym/portage.py", line 6878, in ? portdb=portdbapi(settings["PORTDIR"]) File "/usr/lib/portage/pym/portage.py", line 4902, in __init__ self.manifestVerifier = portage_gpg.FileChecker(self.mysettings["PORTAGE_GPG_DIR"], "gentoo.gpg", minimumTrust=self.manifestVerifyLevel) File "/usr/lib/portage/pym/portage_gpg.py", line 46, in __init__ raise portage_exception.DirectoryNotFound, "keydir: %s" % keydir portage_exception.DirectoryNotFound: 'keydir: ' Here is my emerge info without the gpg-feature: root@platon ~ # emerge info Portage 2.0.51 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.8-gentoo-r10 i686) ================================================================= System uname: 2.6.8-gentoo-r10 i686 Pentium II (Deschutes) Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium2 -O3" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium2 -O3" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs candy ccache distlocks maketest sandbox" GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://ftp.rxd.hu http://ftp.heanet.ie/pub/gentoo/" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa apache2 apm audiofile avi berkdb bidi bitmap-fonts bonobo cdr cjk crypt cups directfb divx4linux doc dvd encode esd f77 fam fbcon flac foomaticdb gdbm gif gimpprint gnome gtk gtk2 gtkhtml guile imagemagick imap imlib java jbig jpeg kerberos lcms ldap lesstif libg++ libwww mad maildir md5sum mikmod mmx motif mozilla mpeg mpi mplayer ncurses nls nocd oggvorbis opengl oss pam pdflib peex perl plotutils png ppds python quicktime readline samba sasl sdl slang spell sse ssl svga tcltk tcpd tetex theora tiff truetype unicode usb vim-with-x wmf wxwindows x86 xine xml xml2 xmms xosd xprint xv xvid zlib linguas_de"
Some for me. I added the gpg-flag while compiling gcc... Here's my output: Traceback (most recent call last): File "/usr/lib/portage/bin/portageq", line 9, in ? import portage,types,string File "/usr/lib/portage/pym/portage.py", line 6820, in ? portdb=portdbapi(settings["PORTDIR"]) File "/usr/lib/portage/pym/portage.py", line 4865, in __init__ self.manifestVerifier = portage_gpg.FileChecker(self.mysettings["PORTAGE_GPG_DIR"], "gentoo.gpg", minimumTrust=self.manifestVerifyLevel) File "/usr/lib/portage/pym/portage_gpg.py", line 46, in __init__ raise portage_exception.DirectoryNotFound, "keydir: %s" % keydir portage_exception.DirectoryNotFound: 'keydir: ' * /usr/sbin/gcc-config: Could not get portage CHOST! * Scanning libtool files for hardcoded gcc library paths... Traceback (most recent call last): File "/usr/bin/portageq", line 9, in ? import portage,types,string File "/usr/lib/portage/pym/portage.py", line 6820, in ? portdb=portdbapi(settings["PORTDIR"]) File "/usr/lib/portage/pym/portage.py", line 4865, in __init__ self.manifestVerifier = portage_gpg.FileChecker(self.mysettings["PORTAGE_GPG_DIR"], "gentoo.gpg", minimumTrust=self.manifestVerifyLevel) File "/usr/lib/portage/pym/portage_gpg.py", line 46, in __init__ raise portage_exception.DirectoryNotFound, "keydir: %s" % keydir portage_exception.DirectoryNotFound: 'keydir: ' :0: assertion failed: (/usr/bin/portageq envvar 'CHOST') | getline CHOST
It's a little complicated and the development will go on (today is 04/10/21): 1) PORTAGE_GPG_DIR must be set in /etc/make.conf (i set it to /var/tmp/portage/ ) 2) Then you need the gentoo developer's keys in gentoo.gpg in PORTAGE_GPG_DIR and this gentoo.gpg file needs a trusted detached signature-file gentoo.gpg.asc. There are two ways to get the keyring: * Generate it yourself - trust yourself and sign it yourself: run /usr/lib/portage/bin/portage_gpg_update.sh which tries gets the key id's from a gentoo homepage and the keys from keyservers and puts gentoo.gpg file in /usr/portage/metadata. Copy it from there to your PORTAGE_GPG_DIR and generate a signature. * get an old gentoo.gpg file signed by carpaski from http://dev.gentoo.org/~carpaski/gpg/gentoo.gpg http://dev.gentoo.org/~carpaski/gpg/gentoo.gpg.asc and put both file in your PORTAGE_GPG_DIR. To trust the signiture you need to lsign carpaski's gpg key (B31DFA34) more detailed: i generated a special portage-key: gpg --homedir /var/tmp/gpgdir --gen-key (remember /var/tmp/gpgdir is my PORTAGE_GPG_DIR.) (if you trust carpaski and want to use the old keyring:) -------------------------------------------------------- dl: wget dev.gentoo.org/~carpaski/gpg/gentoo.gpg dev.gentoo.org/~carpaski/gpg/gentoo.gpg.asc get carpaski's key: gpg --homedir /var/tmp/gpgdir --keyserver hkp://subkeys.pgp.net --recv-keys B31DFA34 and sign it: gpg --homedir /var/tmp/gpgdir --lsign-key B31DFA34 (if you trust yourself:) ------------------------ get gentoo.gpg: /usr/lib/portage/bin/portage_gpg_update.sh cp /usr/portage/metadata/gentoo.gpg /var/tmp/gpgdir verify the keys (well, you can't really) sign it: cd /var/tmp/gpgdir gpg --homedir /var/tmp/gpgdir --detach-sign --armor gentoo.gpg After that it should work.
with FEATURES="sandbox userpriv usersandbox gpg" and Gnupg installed (version 1.2.6) sh-2.05b# emerge --pretend sync Traceback (most recent call last): File "/usr/bin/emerge", line 10, in ? import portage File "/usr/lib/portage/pym/portage.py", line 6878, in ? portdb=portdbapi(settings["PORTDIR"]) File "/usr/lib/portage/pym/portage.py", line 4902, in __init__ self.manifestVerifier = portage_gpg.FileChecker(self.mysettings["PORTAGE_GPG_DIR"], "gentoo.gpg", minimumTrust=self.manifestVerifyLevel) File "/usr/lib/portage/pym/portage_gpg.py", line 46, in __init__ raise portage_exception.DirectoryNotFound, "keydir: %s" % keydir portage_exception.DirectoryNotFound: 'keydir: '
same problem here, after upgrading to new portage and adding "gpg" to FEATURES...
Comment #2 works. Thanks tove.
-- don't forget -- it's only a hack -- only to /test/ the gpg FEATURE --
FEATURES="gpg" will be disabled with a notice if PORTAGE_GPG_DIR is not set correctly. I'm limiting the scope of this bug here so it can be fixed. No need to turn it into a metabug about portage gpg support in general...
*** Bug 68387 has been marked as a duplicate of this bug. ***
*** Bug 68376 has been marked as a duplicate of this bug. ***
Bug has been fixed and released in stable portages on or before 2.0.51-r2
http://dev.gentoo.org/~carpaski/gpg/gentoo.gpg does not exist any longer. Is there a new way to get a gentoo.gpg? Thanks Tobi
Please, reopen bug! Problem still not solved. Key not available.
(In reply to comment #12) > Please, reopen bug! > > Problem still not solved. Key not available. Different problem.
run /usr/lib/portage/bin/portage_gpg_update.sh to get keys