mirror of
https://github.com/rworkman/slackpkg
synced 2024-12-25 21:58:42 +01:00
Fix getting gpg key on ARM ; use only www.slackware.com
This commit is contained in:
parent
58dabfd6a9
commit
bd0e7982f8
1 changed files with 15 additions and 10 deletions
|
@ -550,19 +550,23 @@ function checkgpg() {
|
||||||
gpg --verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0"
|
gpg --verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Fetch $SLACKKEY from a trusted source
|
||||||
function get_gpg_key() {
|
function get_gpg_key() {
|
||||||
if ping -c 1 slackware.com &>/dev/null; then
|
if ping -c 1 www.slackware.com &>/dev/null; then
|
||||||
echo -e "\t\t\tGetting key from https://www.slackware.com/infra/keys/GPG-KEY"
|
if printf "$ARCH" | grep -q -e "arm" -e "aarch64" &>/dev/null ; then
|
||||||
$DOWNLOADER $TMPDIR/gpgkey https://www.slackware.com/infra/keys/GPG-KEY &>/dev/null
|
echo -e "\t\t\tGetting key from https://www.slackware.com/infra/keys/arm/GPG-KEY"
|
||||||
elif ping -c 1 mirrors.slackware.com &>/dev/null; then
|
$DOWNLOADER $TMPDIR/gpgkey https://www.slackware.com/infra/keys/arm/GPG-KEY &>/dev/null
|
||||||
echo -e "\t\t\tGetting key from https://mirrors.slackware.com/slackware/slackware-current/GPG-KEY"
|
# Backup: https://arm.slackware.com/keys/GPG-KEY
|
||||||
$DOWNLOADER $TMPDIR/gpgkey https://mirrors.slackware.com/slackware/slackware-current/GPG-KEY &>/dev/null
|
else
|
||||||
|
echo -e "\t\t\tGetting key from https://www.slackware.com/infra/keys/GPG-KEY"
|
||||||
|
$DOWNLOADER $TMPDIR/gpgkey https://www.slackware.com/infra/keys/GPG-KEY &>/dev/null
|
||||||
|
# Backup: https://mirrors.slackware.com/slackware/slackware-current/GPG-KEY
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e "\
|
echo -e "\
|
||||||
slackpkg is unable to get the Slackware GPG key from either\n\
|
slackpkg is unable to get the Slackware GPG key from www.slackware.com\n\
|
||||||
slackware.com or mirrors.slackware.com; if you trust the\n\
|
If you trust the source you have configured in /etc/slackpkg/mirrors,\n\
|
||||||
source you have configured in /etc/slackpkg/mirrors, slackpkg\n\
|
slackpkg can import the GPG key from that source.\n\
|
||||||
can import the GPG key from that source.\n\
|
|
||||||
The source currently in use is:\n\
|
The source currently in use is:\n\
|
||||||
\t ${SOURCE}\n\
|
\t ${SOURCE}\n\
|
||||||
Do you want to import the GPG key from this source? (YES|NO)\n"
|
Do you want to import the GPG key from this source? (YES|NO)\n"
|
||||||
|
@ -579,6 +583,7 @@ Do you want to import the GPG key from this source? (YES|NO)\n"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Import $SLACKKEY
|
||||||
function import_gpg_key() {
|
function import_gpg_key() {
|
||||||
mkdir -p ~/.gnupg
|
mkdir -p ~/.gnupg
|
||||||
gpg --yes --batch --delete-key "$SLACKKEY" &>/dev/null
|
gpg --yes --batch --delete-key "$SLACKKEY" &>/dev/null
|
||||||
|
|
Loading…
Reference in a new issue