From ede156243078e9bd643ef99363341cb88f89452c Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Wed, 26 Jul 2017 12:38:18 +0200 Subject: [PATCH] apt 1.4: Make apt-key work with busybox mktemp --- .../apt/cmdline-apt-key.in.patch | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/disabled-packages/apt/cmdline-apt-key.in.patch b/disabled-packages/apt/cmdline-apt-key.in.patch index b0e353342..91d86678f 100644 --- a/disabled-packages/apt/cmdline-apt-key.in.patch +++ b/disabled-packages/apt/cmdline-apt-key.in.patch @@ -1,5 +1,6 @@ ---- ../cache/apt-1.4.7/cmdline/apt-key.in 2017-07-14 07:45:39.000000000 +1000 -+++ ./cmdline/apt-key.in 2017-07-19 17:43:09.131197161 +1000 +diff -u -r ../apt-1.4.7/cmdline/apt-key.in ./cmdline/apt-key.in +--- ../apt-1.4.7/cmdline/apt-key.in 2017-07-13 23:45:39.000000000 +0200 ++++ ./cmdline/apt-key.in 2017-07-26 12:18:17.424086422 +0200 @@ -16,10 +16,7 @@ aptkey_echo() { echo "$@"; } @@ -17,7 +18,7 @@ $ACTION "$TRUSTEDFILE" "$@" fi - local TRUSTEDPARTS="/etc/apt/trusted.gpg.d" -+ local TRUSTEDPARTS="/data/data/com.termux/files/usr/etc/apt/trusted.gpg.d" ++ local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d" eval "$(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)" if [ -d "$TRUSTEDPARTS" ]; then TRUSTEDPARTS="$(readlink -f "$TRUSTEDPARTS")" @@ -26,7 +27,17 @@ if [ -z "$TRUSTEDFILE" ]; then - TRUSTEDFILE="/etc/apt/trusted.gpg" -+ TRUSTEDFILE="/data/data/com.termux/files/usr/etc/apt/trusted.gpg" ++ TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg" eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring) eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f) fi +@@ -612,7 +609,8 @@ + unset TMPDIR + fi + fi +- GPGHOMEDIR="$(mktemp --directory --tmpdir 'apt-key-gpghome.XXXXXXXXXX')" ++ # Use short options as busybox mktemp does not support long ones: ++ GPGHOMEDIR="$(mktemp -d -t 'apt-key-gpghome.XXXXXXXXXX')" + CURRENTTRAP="${CURRENTTRAP} cleanup_gpg_home;" + trap "${CURRENTTRAP}" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM + if [ -z "$GPGHOMEDIR" ]; then