diff --git a/defaults/software.sh b/defaults/software.sh index e77a3066..4ca22176 100644 --- a/defaults/software.sh +++ b/defaults/software.sh @@ -18,8 +18,3 @@ ISCSI_VER="${ISCSI_VER:-VERSION_ISCSI}" ISCSI_DIR="${ISCSI_DIR:-open-iscsi-${ISCSI_VER}}" ISCSI_SRCTAR="${ISCSI_SRCTAR:-${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz}" ISCSI_BINCACHE="${ISCSI_BINCACHE:-%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2}" - -GPG_VER="${GPG_VER:-VERSION_GPG}" -GPG_DIR="${GPG_DIR:-gnupg-${GPG_VER}}" -GPG_SRCTAR="${GPG_SRCTAR:-${DISTDIR}/gnupg-${GPG_VER}.tar.bz2}" -GPG_BINCACHE="${GPG_BINCACHE:-%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2}" diff --git a/gen_compile.sh b/gen_compile.sh index 90c38cdb..a68aa52b 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -452,48 +452,3 @@ compile_iscsi() { rm -rf "${ISCSI_DIR}" > /dev/null fi } - -compile_gpg() { - if [ -f "${GPG_BINCACHE}" ] - then - print_info 1 "gnupg: >> Using cache" - else - [ ! -f "${GPG_SRCTAR}" ] && - gen_die "Could not find gnupg source tarball: ${GPG_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" - cd "${TEMP}" - rm -rf "${GPG_DIR}" - tar -jxf "${GPG_SRCTAR}" - [ ! -d "${GPG_DIR}" ] && - gen_die "gnupg directory ${GPG_DIR} invalid" - cd "${GPG_DIR}" - apply_patches gnupg ${GPG_VER} - print_info 1 'gnupg: >> Configuring...' - # --enable-minimal works, but it doesn't reduce the command length much. - # Given its history and the precision this needs, explicit is cleaner. - LDFLAGS='-static' CFLAGS='-Os' ./configure --prefix=/ \ - --enable-static-rnd=linux --disable-dev-random --disable-asm \ - --disable-selinux-support --disable-gnupg-iconv --disable-card-support \ - --disable-agent-support --disable-bzip2 --disable-exec \ - --disable-photo-viewers --disable-keyserver-helpers --disable-ldap \ - --disable-hkp --disable-finger --disable-generic --disable-mailto \ - --disable-keyserver-path --disable-dns-srv --disable-dns-pka \ - --disable-dns-cert --disable-nls --disable-threads --disable-regex \ - --disable-optimization --with-included-zlib --without-capabilities \ - --without-tar --without-ldap --without-libcurl --without-mailprog \ - --without-libpth-prefix --without-libiconv-prefix --without-libintl-prefix\ - --without-zlib --without-bzip2 --without-libusb --without-readline \ - >> ${LOGFILE} 2>&1 || gen_die 'Configuring gnupg failed!' - print_info 1 'gnupg: >> Compiling...' - compile_generic "" "utils" - print_info 1 'gnupg: >> Copying to cache...' - [ -f "${TEMP}/${GPG_DIR}/g10/gpg" ] || - gen_die 'gnupg executable does not exist!' - strip "${TEMP}/${GPG_DIR}/g10/gpg" || - gen_die 'Could not strip gpg binary!' - bzip2 -z -c "${TEMP}/${GPG_DIR}/g10/gpg" > "${GPG_BINCACHE}" || - gen_die 'Could not copy the gpg binary to the package directory, does the directory exist?' - - cd "${TEMP}" - rm -rf "${GPG_DIR}" > /dev/null - fi -} diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 8aad5974..d9dc1539 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -143,14 +143,12 @@ determine_real_args() { BUSYBOX_BINCACHE=`cache_replace "${BUSYBOX_BINCACHE}"` ISCSI_BINCACHE=`cache_replace "${ISCSI_BINCACHE}"` BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"` - GPG_BINCACHE=`cache_replace "${GPG_BINCACHE}"` DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"` BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"` ISCSI_BINCACHE=`arch_replace "${ISCSI_BINCACHE}"` BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"` - GPG_BINCACHE=`arch_replace "${GPG_BINCACHE}"` if [ -n "${CMD_BOOTLOADER}" ] then diff --git a/gen_initramfs.sh b/gen_initramfs.sh index a377edd8..819f83cb 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -456,18 +456,16 @@ append_gpg() { then rm -r "${TEMP}/initramfs-gpg-temp" fi - cd ${TEMP} mkdir -p "${TEMP}/initramfs-gpg-temp/sbin/" - if [ ! -e ${GPG_BINCACHE} ] ; then - print_info 1 ' GPG: Adding support (compiling binaries)...' - compile_gpg - fi - bzip2 -dc "${GPG_BINCACHE}" > "${TEMP}/initramfs-gpg-temp/sbin/gpg" || - gen_die 'Could not extract gpg binary cache!' - chmod a+x "${TEMP}/initramfs-gpg-temp/sbin/gpg" + + print_info 1 "Including GPG support" + copy_binaries /sbin/gpg + cd "${TEMP}/initramfs-gpg-temp/" log_future_cpio_content - find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" + find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ + || gen_die "compressing gpg cpio" + cd "${TEMP}" rm -rf "${TEMP}/initramfs-gpg-temp" > /dev/null }