diff -Nru launchpad-getkeys-0.3.4/debian/changelog launchpad-getkeys-0.3.4/debian/changelog --- launchpad-getkeys-0.3.4/debian/changelog 2016-11-08 11:23:18.000000000 +0000 +++ launchpad-getkeys-0.3.4/debian/changelog 2016-11-08 11:23:18.000000000 +0000 @@ -1,6 +1,9 @@ -launchpad-getkeys (0.3.4-1~webupd8~yakkety1) yakkety; urgency=medium +launchpad-getkeys (0.3.4-1~webupd8~yakkety2) yakkety; urgency=medium - * Update apt-key command to reflect syntax change in Ubuntu 16.10 + * apt-key no longer supports "--keyserver-options" (and thus, + setting a proxy through its options) for Ubuntu 16.10, so + the script was modified to reflect this change + * Depend on apt >= 1.3 (available in Ubuntu 16.10 and newer) -- Alin Andrei Wed, 08 Nov 2016 13:23:18 +0200 diff -Nru launchpad-getkeys-0.3.4/launchpad-getkeys launchpad-getkeys-0.3.4/launchpad-getkeys --- launchpad-getkeys-0.3.4/launchpad-getkeys 2016-11-08 11:23:18.000000000 +0000 +++ launchpad-getkeys-0.3.4/launchpad-getkeys 2016-11-08 11:23:18.000000000 +0000 @@ -19,15 +19,13 @@ GPG keys * -k SERVER:PORT will pass a new keyserver, in case the default keyserver is down -* -p http://PROXY:PORT lets you specify a proxy-server other than the default one. " exit 0 } -while getopts "k:p:h\?" opt; do +while getopts "k:h\?" opt; do case "$opt" in k ) KEYSERVER="$OPTARG" ;; - p ) PROXY="$OPTARG" ;; h ) HELP ;; \?) HELP ;; * ) warn "Unknown option '$opt'"; ;; @@ -44,25 +42,25 @@ fi fi -if [[ $PROXY ]]; then - - PROXYSERVERANDPORT=$(echo $PROXY | grep ":") - if [[ ! $PROXYSERVERANDPORT ]]; then - echo "Error: please enter a proxyserver and a port, like so: sudo launchpad-getkeys -p PROXYSERVER:PORT (without http://)" - exit 0 - fi -fi - -if [[ ! $PROXY ]]; then - PROXY=$http_proxy -fi +#if [[ $PROXY ]]; then +# +# PROXYSERVERANDPORT=$(echo $PROXY | grep ":") +# if [[ ! $PROXYSERVERANDPORT ]]; then +# echo "Error: please enter a proxyserver and a port, like so: sudo launchpad-getkeys -p PROXYSERVER:PORT (without http://)" +# exit 0 +# fi +#fi + +#if [[ ! $PROXY ]]; then +# PROXY=$http_proxy +#fi # use apt proxy -APT_PROXIES=$(apt-config shell http_proxy Acquire::http::Proxy https_proxy Acquire::https::Proxy ftp_proxy Acquire::ftp::Proxy) +#APT_PROXIES=$(apt-config shell http_proxy Acquire::http::Proxy https_proxy Acquire::https::Proxy ftp_proxy Acquire::ftp::Proxy) -if [ -n "$APT_PROXIES" ]; then - eval export $APT_PROXIES -fi +#if [ -n "$APT_PROXIES" ]; then +# eval export $APT_PROXIES +#fi echo " Please wait... launchpad-getkeys is running an update so @@ -82,9 +80,9 @@ while read curline; do GPGKEYTOGET=$(echo $curline | grep NO_PUBKEY | sed -e 's/.*: \|NO_PUBKEY //g') if [[ $KEYSERVER ]]; then - apt-key adv --keyserver hkp://$KEYSERVER --recv-keys $GPGKEYTOGET --keyserver-options http-proxy=$PROXY + apt-key adv --keyserver hkp://$KEYSERVER --recv-keys $GPGKEYTOGET else - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $GPGKEYTOGET --keyserver-options http-proxy=$PROXY + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $GPGKEYTOGET fi let n=n+1 done < /tmp/updateresults