You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.9 KiB
47 lines
1.9 KiB
10 years ago
|
diff -u -r ../upstream.git/cmdline/apt-key.in ./cmdline/apt-key.in
|
||
|
--- ../upstream.git/cmdline/apt-key.in 2014-04-25 13:39:00.000000000 +0200
|
||
|
+++ ./cmdline/apt-key.in 2014-06-03 11:55:07.623749140 +0200
|
||
|
@@ -40,10 +40,7 @@
|
||
|
TMP_KEYRING=${APT_DIR}/var/lib/apt/keyrings/maybe-import-keyring.gpg
|
||
|
|
||
|
requires_root() {
|
||
|
- if [ "$(id -u)" -ne 0 ]; then
|
||
|
- echo >&1 "ERROR: This command can only be used by root."
|
||
|
- exit 1
|
||
|
- fi
|
||
|
+ # We do not require root
|
||
|
}
|
||
|
|
||
|
# gpg defaults to mode 0600 for new keyrings. Create one with 0644 instead.
|
||
|
@@ -216,11 +213,11 @@
|
||
|
remove_key_from_keyring "$FORCED_KEYRING" "$1"
|
||
|
else
|
||
|
# otherwise all known keyrings are up for inspection
|
||
|
- local TRUSTEDFILE="/etc/apt/trusted.gpg"
|
||
|
+ local TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
|
||
|
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring)
|
||
|
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f)
|
||
|
remove_key_from_keyring "$TRUSTEDFILE" "$1"
|
||
|
- TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
|
||
|
+ TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
|
||
|
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
|
||
|
if [ -d "$TRUSTEDPARTS" ]; then
|
||
|
for trusted in $(run-parts --list "$TRUSTEDPARTS" --regex '^.*\.gpg$'); do
|
||
|
@@ -278,14 +275,14 @@
|
||
|
done
|
||
|
|
||
|
if [ -z "$TRUSTEDFILE" ]; then
|
||
|
- TRUSTEDFILE="/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)
|
||
|
if [ -r "$TRUSTEDFILE" ]; then
|
||
|
GPG="$GPG --keyring $TRUSTEDFILE"
|
||
|
fi
|
||
|
GPG="$GPG --primary-keyring $TRUSTEDFILE"
|
||
|
- TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
|
||
|
+ TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
|
||
|
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d)
|
||
|
if [ -d "$TRUSTEDPARTS" ]; then
|
||
|
# strip / suffix as gpg will double-slash in that case (#665411)
|