Current genkernel fails to integrate GPG support into the initramfs: [I] sys-kernel/genkernel (3.5.0.6@07.11.2016) [I] app-vim/gnupg (2.6@16.09.2016) # uname -r 4.8.6-ck-r2 # grep GPG /etc/genkernel.conf GPG="yes" But genkernel all fails like: gnupg: >> Configuring... * gnupg: >> Compiling... * ERROR: Failed to compile the "" target... * * -- Grepping log... -- * *checking whether gcc and cc understand -c and -o together... yes *checking how to run the C preprocessor... gcc -E *checking for ranlib... ranlib *checking for ar... ar *checking for perl... /usr/bin/perl *checking for strerror in -lcposix... no *-- *make[2]: Entering directory '/var/tmp/genkernel/9801.4320.27932.6125/gnupg-1.4.11/util' *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../intl -Os -Wall -Wno-pointer-sign -MT logger.o -MD -MP -MF .deps/logger.Tpo -c -o logger.o logger.c *mv -f .deps/logger.Tpo .deps/logger.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../intl -Os -Wall -Wno-pointer-sign -MT strgutil.o -MD -MP -MF .deps/strgutil.Tpo -c -o strgutil.o strgutil.c *strgutil.c: In function ‘set_native_charset’: *strgutil.c:509:17: warning: variable ‘full_newset’ set but not used [-Wunused-but-set-variable] *-- *mv -f .deps/mpi-inv.Tpo .deps/mpi-inv.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Os -Wall -Wno-pointer-sign -MT mpi-mul.o -MD -MP -MF .deps/mpi-mul.Tpo -c -o mpi-mul.o mpi-mul.c *mv -f .deps/mpi-mul.Tpo .deps/mpi-mul.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Os -Wall -Wno-pointer-sign -MT mpi-pow.o -MD -MP -MF .deps/mpi-pow.Tpo -c -o mpi-pow.o mpi-pow.c *mpi-pow.c: In function ‘mpi_powm’: *mpi-pow.c:45:16: warning: variable ‘esign’ set but not used [-Wunused-but-set-variable] *-- *mv -f .deps/mpi-mpow.Tpo .deps/mpi-mpow.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Os -Wall -Wno-pointer-sign -MT mpi-scan.o -MD -MP -MF .deps/mpi-scan.Tpo -c -o mpi-scan.o mpi-scan.c *mv -f .deps/mpi-scan.Tpo .deps/mpi-scan.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Os -Wall -Wno-pointer-sign -MT mpicoder.o -MD -MP -MF .deps/mpicoder.Tpo -c -o mpicoder.o mpicoder.c *mpicoder.c: In function ‘mpi_fromstr’: *mpicoder.c:203:9: warning: variable ‘hexmode’ set but not used [-Wunused-but-set-variable] *-- *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Os -Wall -Wno-pointer-sign -MT mpih-cmp.o -MD -MP -MF .deps/mpih-cmp.Tpo -c -o mpih-cmp.o mpih-cmp.c *mv -f .deps/mpih-cmp.Tpo .deps/mpih-cmp.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -Os -Wall -Wno-pointer-sign -MT mpih-div.o -MD -MP -MF .deps/mpih-div.Tpo -c -o mpih-div.o mpih-div.c *In file included from mpih-div.c:32:0: *mpih-div.c: In function ‘mpihelp_mod_1’: *mpi-internal.h:160:17: warning: variable ‘_ql’ set but not used [-Wunused-but-set-variable] * mpi_limb_t _q, _ql, _r; \ * ^ *mpih-div.c:99:3: note: in expansion of macro ‘UDIV_QRNND_PREINV’ * UDIV_QRNND_PREINV(dummy, r, r, * ^ ^ ... ... ... *rijndael.c:2053:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] *rijndael.c:2070:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] * *((u32*)(b )) ^= *((u32*)rk[0][0]); * ^ *rijndael.c:2071:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] * *((u32*)(b+ 4)) ^= *((u32*)rk[0][1]); * ^ *rijndael.c:2072:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] * *((u32*)(b+ 8)) ^= *((u32*)rk[0][2]); * ^ *rijndael.c:2073:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] *-- *mv -f .deps/sha512.Tpo .deps/sha512.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../intl -DGNUPG_LIBDIR="\"//lib/gnupg\"" -Os -Wall -Wno-pointer-sign -MT idea-stub.o -MD -MP -MF .deps/idea-stub.Tpo -c -o idea-stub.o idea-stub.c *mv -f .deps/idea-stub.Tpo .deps/idea-stub.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../intl -DGNUPG_LIBDIR="\"//lib/gnupg\"" -Os -Wall -Wno-pointer-sign -MT md.o -MD -MP -MF .deps/md.Tpo -c -o md.o md.c *md.c: In function ‘md_stop_debug’: *md.c:524:21: warning: variable ‘c’ set but not used [-Wunused-but-set-variable] *-- *mv -f .deps/bftest.Tpo .deps/bftest.Po *gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../intl -DLOCALEDIR="\"//share/locale\"" -Os -Wall -Wno-pointer-sign -MT mpicalc.o -MD -MP -MF .deps/mpicalc.Tpo -c -o mpicalc.o mpicalc.c *mv -f .deps/mpicalc.Tpo .deps/mpicalc.Po *gcc -Os -Wall -Wno-pointer-sign -static -o bftest bftest.o ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a -ldl *../cipher/libcipher.a(idea-stub.o): In function `idea_get_info': *idea-stub.c:(.text+0x86): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking *../util/libutil.a(fileutil.o): In function `make_filename': *fileutil.c:(.text+0x1aa): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking *fileutil.c:(.text+0x149): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking *-- *mpi-cmp.c:(.text+0xb6): multiple definition of `mpihelp_sub_1' *../mpi/libmpi.a(mpi-add.o):mpi-add.c:(.text+0xb6): first defined here *../mpi/libmpi.a(mpi-cmp.o): In function `mpihelp_sub': *mpi-cmp.c:(.text+0x113): multiple definition of `mpihelp_sub' *../mpi/libmpi.a(mpi-add.o):mpi-add.c:(.text+0x113): first defined here *collect2: error: ld returned 1 exit status *make[2]: *** [Makefile:411: mpicalc] Error 1 *make[2]: Leaving directory '/var/tmp/genkernel/9801.4320.27932.6125/gnupg-1.4.11/tools' *make[1]: *** [Makefile:363: all-recursive] Error 1 *make[1]: Leaving directory '/var/tmp/genkernel/9801.4320.27932.6125/gnupg-1.4.11' *make: *** [Makefile:300: all] Error 2 *-- * Running with options: all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load .. * * ERROR: Failed to compile the "" target... * * -- End log... -- Reproducible: Always
This breaks all the Howtos and Wiki about GPG encrypted LUKS key.
Already fixed in the v3.5.2.0 release, which bumps the gnupg version. Please test & confirm.
(In reply to Robin Johnson from comment #2) > Already fixed in the v3.5.2.0 release, which bumps the gnupg version. Please > test & confirm. Unfortunately I have this problem with sys-kernel/genkernel-3.4.52.4 (which uses app-crypt/gnupg-1.4.11), so I'm guessing the issue re-occured. On the forum (https://forums.gentoo.org/viewtopic-p-8112528.html#8112528), someone mentioned to bump the GnuPG version to 1.4.21 and this did work for me.
(In reply to Robin Johnson from comment #2) > Already fixed in the v3.5.2.0 release, which bumps the gnupg version. Please > test & confirm. With sys-kernel/genkernel-3.5.2.0 and app-crypt/gnupg-2.2.0, the option GPG="yes" is able to build an initramfs successfully. I did no further gpg testing yet..