mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-18 02:39:59 +00:00
Enable gpg with card support (issue #32)
This commit is contained in:
parent
cfcf6c46d5
commit
0da184fe01
3
initrd/bin/gpgv
Executable file
3
initrd/bin/gpgv
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# if we are using the full GPG we need a wrapper for the gpgv executable
|
||||
exec gpg --verify "$@"
|
18
modules/gpg
18
modules/gpg
@ -16,36 +16,30 @@ gpg_hash := 6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276
|
||||
gpg_configure := ./configure \
|
||||
CC="$(heads_cc)" \
|
||||
--host i386-elf-linux \
|
||||
--prefix "" \
|
||||
--with-libusb="$(INSTALL)" \
|
||||
--prefix "/" \
|
||||
--enable-card-support \
|
||||
--disable-bzip2 \
|
||||
--disable-gpg \
|
||||
--disable-gpgsm \
|
||||
--disable-asm \
|
||||
--disable-agent \
|
||||
--disable-scdaemon \
|
||||
--disable-tools \
|
||||
--disable-doc \
|
||||
--disable-exec \
|
||||
--disable-photo-viewers \
|
||||
--disable-keyserver-helpers \
|
||||
--disable-ldap \
|
||||
--disable-hkp \
|
||||
--disable-finger \
|
||||
--disable-ccid-driver \
|
||||
--disable-dns-srv \
|
||||
--disable-dns-pka \
|
||||
--disable-dns-cert \
|
||||
--disable-regex \
|
||||
|
||||
# Run one build to generate the executables with the pre-defined
|
||||
# exec_prefix and datarootdir, then a second make to install the binaries
|
||||
# into our actual target location
|
||||
gpg_target := -j $(MAKE_JOBS) \
|
||||
gpg_target := $(MAKE_JOBS) \
|
||||
&& $(MAKE) -C $(build)/$(gpg_dir) \
|
||||
exec_prefix=$(pwd)/install \
|
||||
datarootdir=$(pwd)/install/share \
|
||||
install
|
||||
|
||||
gpg_output := g10/gpgv
|
||||
gpg_output := g10/gpg
|
||||
|
||||
gpg_depends := $(musl_dep)
|
||||
gpg_depends := libusb-compat $(musl_dep)
|
||||
|
24
modules/libusb
Normal file
24
modules/libusb
Normal file
@ -0,0 +1,24 @@
|
||||
# GPG with Yubikey support requires libusb
|
||||
modules-$(CONFIG_GPG) += libusb
|
||||
|
||||
libusb_version := 1.0.21
|
||||
libusb_dir := libusb-$(libusb_version)
|
||||
libusb_tar := libusb-$(libusb_version).tar.bz2
|
||||
libusb_url := https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-$(libusb_version)/$(libusb_tar)
|
||||
libusb_hash := e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||
|
||||
libusb_configure := ./configure \
|
||||
CC="$(heads_cc)" \
|
||||
--host i386-elf-linux \
|
||||
--prefix "$(INSTALL)" \
|
||||
--disable-udev \
|
||||
|
||||
# Run one build to generate the executables with the pre-defined
|
||||
# exec_prefix and datarootdir, then a second make to install the binaries
|
||||
# into our actual target location
|
||||
libusb_target := $(MAKE_JOBS) \
|
||||
install \
|
||||
|
||||
libusb_libraries := libusb/.libs/libusb-1.0.so.0
|
||||
|
||||
libusb_depends := $(musl_dep)
|
25
modules/libusb-compat
Normal file
25
modules/libusb-compat
Normal file
@ -0,0 +1,25 @@
|
||||
# GPG 1.4.21 uses an old version of libusb, which
|
||||
# is emulated with the compatibility library.
|
||||
# This is a bit of a hack to set it up.
|
||||
modules-$(CONFIG_GPG) += libusb-compat
|
||||
|
||||
libusb-compat_version := 0.1.5
|
||||
libusb-compat_dir := libusb-compat-$(libusb-compat_version)
|
||||
libusb-compat_tar := libusb-compat-$(libusb-compat_version).tar.bz2
|
||||
libusb-compat_url := https://downloads.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-$(libusb-compat_version)/$(libusb-compat_tar)
|
||||
libusb-compat_hash := 404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a
|
||||
|
||||
libusb-compat_configure := ./configure \
|
||||
CC="$(heads_cc)" \
|
||||
--host i386-elf-linux \
|
||||
--prefix "$(INSTALL)" \
|
||||
|
||||
# Run one build to generate the executables with the pre-defined
|
||||
# exec_prefix and datarootdir, then a second make to install the binaries
|
||||
# into our actual target location
|
||||
libusb-compat_target := $(MAKE_JOBS) \
|
||||
install \
|
||||
|
||||
libusb-compat_libraries := libusb/.libs/libusb-0.1.so.4
|
||||
|
||||
libusb-compat_depends := libusb $(musl_dep)
|
20
patches/gpg-1.4.21.patch
Normal file
20
patches/gpg-1.4.21.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -u --recursive ../clean/gnupg-1.4.21/configure gnupg-1.4.21/configure
|
||||
--- ../clean/gnupg-1.4.21/configure 2016-08-17 09:20:25.000000000 -0400
|
||||
+++ gnupg-1.4.21/configure 2017-04-05 17:40:53.746515377 -0400
|
||||
@@ -17100,7 +17100,7 @@
|
||||
_libusb_try_libs=`$LIBS $_usb_config --libs`
|
||||
_libusb_try_cflags=`$LIBS $_usb_config --cflags`
|
||||
else
|
||||
- _libusb_try_libs="-lusb"
|
||||
+ _libusb_try_libs="-lusb -lusb-1.0"
|
||||
_libusb_try_cflags=""
|
||||
fi
|
||||
|
||||
@@ -17112,6 +17112,7 @@
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
+#include <sys/types.h>
|
||||
#include <usb.h>
|
||||
int
|
||||
main ()
|
Loading…
Reference in New Issue
Block a user