Commit f341f1ae by Stéphane Graber Committed by GitHub

Merge pull request #1473 from taikedz/keyservfix

Allow setting the key server as an environment variable
parents b49bb7dc a9a53b50
...@@ -34,7 +34,6 @@ DOWNLOAD_FLUSH_CACHE="false" ...@@ -34,7 +34,6 @@ DOWNLOAD_FLUSH_CACHE="false"
DOWNLOAD_FORCE_CACHE="false" DOWNLOAD_FORCE_CACHE="false"
DOWNLOAD_INTERACTIVE="false" DOWNLOAD_INTERACTIVE="false"
DOWNLOAD_KEYID="0xE7FB0CAEC8173D669066514CBAEFF88C22F6E216" DOWNLOAD_KEYID="0xE7FB0CAEC8173D669066514CBAEFF88C22F6E216"
DOWNLOAD_KEYSERVER="hkp://pool.sks-keyservers.net"
DOWNLOAD_LIST_IMAGES="false" DOWNLOAD_LIST_IMAGES="false"
DOWNLOAD_MODE="system" DOWNLOAD_MODE="system"
DOWNLOAD_READY_GPG="false" DOWNLOAD_READY_GPG="false"
...@@ -54,9 +53,13 @@ LXC_NAME= ...@@ -54,9 +53,13 @@ LXC_NAME=
LXC_PATH= LXC_PATH=
LXC_ROOTFS= LXC_ROOTFS=
# Deal with GPG over http proxy if [ -z "${DOWNLOAD_KEYSERVER:-}" ]; then
if [ -n "${http_proxy:-}" ]; then DOWNLOAD_KEYSERVER="hkp://pool.sks-keyservers.net"
DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80"
# Deal with GPG over http proxy
if [ -n "${http_proxy:-}" ]; then
DOWNLOAD_KEYSERVER="hkp://p80.pool.sks-keyservers.net:80"
fi
fi fi
# Make sure the usual locations are in PATH # Make sure the usual locations are in PATH
...@@ -201,7 +204,7 @@ Optional arguments: ...@@ -201,7 +204,7 @@ Optional arguments:
[ --variant <variant> ]: Variant of the image (default: "default") [ --variant <variant> ]: Variant of the image (default: "default")
[ --server <server> ]: Image server (default: "images.linuxcontainers.org") [ --server <server> ]: Image server (default: "images.linuxcontainers.org")
[ --keyid <keyid> ]: GPG keyid (default: 0x...) [ --keyid <keyid> ]: GPG keyid (default: 0x...)
[ --keyserver <keyserver> ]: GPG keyserver to use [ --keyserver <keyserver> ]: GPG keyserver to use. Environment variable: DOWNLOAD_KEYSERVER
[ --no-validate ]: Disable GPG validation (not recommended) [ --no-validate ]: Disable GPG validation (not recommended)
[ --flush-cache ]: Flush the local copy (if present) [ --flush-cache ]: Flush the local copy (if present)
[ --force-cache ]: Force the use of the local copy even if expired [ --force-cache ]: Force the use of the local copy even if expired
...@@ -212,6 +215,11 @@ LXC internal arguments (do not pass manually!): ...@@ -212,6 +215,11 @@ LXC internal arguments (do not pass manually!):
[ --rootfs <rootfs> ]: The path to the container's rootfs [ --rootfs <rootfs> ]: The path to the container's rootfs
[ --mapped-uid <map> ]: A uid map (user namespaces) [ --mapped-uid <map> ]: A uid map (user namespaces)
[ --mapped-gid <map> ]: A gid map (user namespaces) [ --mapped-gid <map> ]: A gid map (user namespaces)
Environment Variables:
DOWNLOAD_KEYSERVER : The URL of the key server to use, instead of the default.
Can be further overridden by using optional argument --keyserver
EOF EOF
return 0 return 0
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment