10seconds_install: Fall back to pool.sks-keyservers.net if keys.gnupg.net fails.

This commit is contained in:
Ole Tange 2018-09-06 17:00:29 +02:00
parent b7e789c02f
commit 24de94187a
8 changed files with 56 additions and 33 deletions

View file

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Copyright (C) 2013,2014,2015,2017 Ole Tange and Free Software # Copyright (C) 2013-2018 Ole Tange and Free Software Foundation, Inc.
# Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -15,7 +14,7 @@
# If that fails, it does a personal installation. # If that fails, it does a personal installation.
# If that fails, it copies to $HOME/bin # If that fails, it copies to $HOME/bin
# #
# Download and run the script directly by: # You can download and run the script directly by:
# (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash # (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash
run() { run() {
@ -52,13 +51,40 @@ run() {
$GET http://ftpmirror.gnu.org/parallel/$LATEST.tar.bz2.sig > $LATEST.tar.bz2.sig $GET http://ftpmirror.gnu.org/parallel/$LATEST.tar.bz2.sig > $LATEST.tar.bz2.sig
fi fi
# Check signature - in case ftpmirror.gnu.org is compromised fetch_keys() {
if gpg -h 2>/dev/null >/dev/null; then if gpg -h 2>/dev/null >/dev/null ; then
# GnuPG installed # GnuPG installed
# Setup .gnupg/gpg.conf if not already done # Setup .gnupg/gpg.conf if not already done
echo | gpg 2>/dev/null >/dev/null echo | gpg 2>/dev/null >/dev/null
gpg --keyserver keys.gnupg.net --recv-key FFFFFFF1 keyserver1=keys.gnupg.net
gpg --keyserver keys.gnupg.net --recv-key 88888888 keyserver2=pool.sks-keyservers.net
if gpg --keyserver $keyserver1 --recv-key 0xFFFFFFF1 ||
gpg --keyserver $keyserver2 --recv-key 0xFFFFFFF1 ; then
if gpg --keyserver $keyserver1 --recv-key 0x88888888 ||
gpg --keyserver $keyserver2 --recv-key 0x88888888; then
# OK
return 0
else
echo
echo "Cannot fetch keyID 0x88888888, so the signature cannot be checked."
return 1
fi
else
echo
echo "Cannot fetch keyID 0xFFFFFFF1, so the signature cannot be checked."
return 1
fi
else
# GnuPG not installed
echo
echo "GnuPG (gpg) is not installed so the signature cannot be checked."
return 1
fi
}
# Check signature - in case ftpmirror.gnu.org is compromised
if fetch_keys; then
if gpg --with-fingerprint $LATEST.tar.bz2.sig 2>&1 | if gpg --with-fingerprint $LATEST.tar.bz2.sig 2>&1 |
$GREP -E '^Primary key fingerprint: BE9C B493 81DE 3166 A3BC 66C1 2C62 29E2 FFFF FFF1|^Primary key fingerprint: CDA0 1A42 08C4 F745 0610 7E7B D1AB 4516 8888 8888' ; then $GREP -E '^Primary key fingerprint: BE9C B493 81DE 3166 A3BC 66C1 2C62 29E2 FFFF FFF1|^Primary key fingerprint: CDA0 1A42 08C4 F745 0610 7E7B D1AB 4516 8888 8888' ; then
# Source code signed by Ole Tange <ole@tange.dk> # Source code signed by Ole Tange <ole@tange.dk>
@ -74,8 +100,7 @@ run() {
exit 1 exit 1
fi fi
else else
# GnuPG not installed # GnuPG not installed or public keys not downloaded
echo "GnuPG (gpg) is not installed so the signature cannot be checked."
echo "This means that if the code has been changed by criminals, you will not discover that!" echo "This means that if the code has been changed by criminals, you will not discover that!"
echo echo
echo "Continue anyway? (y/n)" echo "Continue anyway? (y/n)"

View file

@ -206,7 +206,7 @@ to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm> stable-bcc: Jesse Alama <jessealama@fastmail.fm>
Subject: GNU Parallel 20180922 ('') released <<[stable]>> Subject: GNU Parallel 20180922 ('Myanmar/Jacksonville/Chemnitz') released <<[stable]>>
GNU Parallel 20180922 ('') <<[stable]>> has been released. It is available for download at: http://ftpmirror.gnu.org/parallel/ GNU Parallel 20180922 ('') <<[stable]>> has been released. It is available for download at: http://ftpmirror.gnu.org/parallel/
@ -214,7 +214,7 @@ GNU Parallel 20180922 ('') <<[stable]>> has been released. It is available for d
Quote of the month: Quote of the month:
I know I'm late to the party but Gnu Parallel is truly amazing! I know I'm late to the party but GNU Parallel is truly amazing!
-- Sam Diaz-Munoz @sociovirology -- Sam Diaz-Munoz @sociovirology
New in this release: New in this release:
@ -271,6 +271,8 @@ for Big Data Applications https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumb
* Bug fixes and man page updates. * Bug fixes and man page updates.
Get the book: GNU Parallel 2018 http://www.lulu.com/shop/ole-tange/gnu-parallel-2018/paperback/product-23558902.html
GNU Parallel - For people who live life in the parallel lane. GNU Parallel - For people who live life in the parallel lane.

View file

@ -741,10 +741,10 @@ If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk
Copyright (C) 2008,2009,2010 Ole Tange, http://ole.tange.dk Copyright (C) 2008-2010 Ole Tange, http://ole.tange.dk
Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Ole Tange, Copyright (C) 2010-2018 Ole Tange, http://ole.tange.dk and Free
http://ole.tange.dk and Free Software Foundation, Inc. Software Foundation, Inc.
=head1 LICENSE =head1 LICENSE

View file

@ -303,15 +303,14 @@ Report bugs to <bug-parallel@gnu.org>.
Copyright (C) 2004-11-19 Ole Tange, http://ole.tange.dk Copyright (C) 2004-11-19 Ole Tange, http://ole.tange.dk
Copyright (C) 2005,2006,2007,2008,2009,2010 Ole Tange, http://ole.tange.dk Copyright (C) 2005-2010 Ole Tange, http://ole.tange.dk
Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Ole Tange, Copyright (C) 2010-2018 Ole Tange, http://ole.tange.dk and Free
http://ole.tange.dk and Free Software Foundation, Inc. Software Foundation, Inc.
=head1 LICENSE =head1 LICENSE
Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Free Copyright (C) 2010-2018 Free Software Foundation, Inc.
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View file

@ -4862,9 +4862,9 @@ If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk
Copyright (C) 2008,2009,2010 Ole Tange, http://ole.tange.dk Copyright (C) 2008-2010 Ole Tange, http://ole.tange.dk
Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Ole Tange, Copyright (C) 2010-2018 Ole Tange,
http://ole.tange.dk and Free Software Foundation, Inc. http://ole.tange.dk and Free Software Foundation, Inc.
Parts of the manual concerning B<xargs> compatibility is inspired by Parts of the manual concerning B<xargs> compatibility is inspired by
@ -4873,9 +4873,7 @@ the manual of B<xargs> from GNU findutils 4.4.2.
=head1 LICENSE =head1 LICENSE
Copyright (C) Copyright (C) 2007-2018 Free Software Foundation, Inc.
2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View file

@ -2978,7 +2978,7 @@ When asking for help, always report the full output of this:
Output: Output:
GNU parallel 20180122 GNU parallel 20180122
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 Copyright (C) 2007-2018
Ole Tange and Free Software Foundation, Inc. Ole Tange and Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. This is free software: you are free to change and redistribute it.
@ -3139,7 +3139,7 @@ https://my.fsf.org/donate/
=back =back
(C) 2013,2014,2015,2016,2017,2018 Ole Tange, GPLv3 (C) 2013-2018 Ole Tange, GPLv3
=cut =cut

View file

@ -180,16 +180,15 @@ If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk Copyright (C) 2007-10-18 Ole Tange, http://ole.tange.dk
Copyright (C) 2008,2009,2010 Ole Tange, http://ole.tange.dk Copyright (C) 2008-2010 Ole Tange, http://ole.tange.dk
Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Ole Tange, Copyright (C) 2010-2018 Ole Tange,
http://ole.tange.dk and Free Software Foundation, Inc. http://ole.tange.dk and Free Software Foundation, Inc.
=head1 LICENSE =head1 LICENSE
Copyright (C) 2016 Copyright (C) 2016 Ole Tange and Free Software Foundation, Inc.
Ole Tange and Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View file

@ -244,7 +244,7 @@ Report bugs to <bug-parallel@gnu.org>.
=head1 AUTHOR =head1 AUTHOR
Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Ole Tange, Copyright (C) 2010-2018 Ole Tange,
http://ole.tange.dk and Free Software Foundation, Inc. http://ole.tange.dk and Free Software Foundation, Inc.