From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- .../files/templates-use-curl-instead-of-wget.patch | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 external/meta-virtualization/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch (limited to 'external/meta-virtualization/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch') diff --git a/external/meta-virtualization/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch b/external/meta-virtualization/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch new file mode 100644 index 00000000..156df82f --- /dev/null +++ b/external/meta-virtualization/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch @@ -0,0 +1,50 @@ +From 07890dd8ffdcd08b7be1ddbd9f56ac55482c76bb Mon Sep 17 00:00:00 2001 +From: Joakim Roubert +Date: Fri, 16 Aug 2019 07:52:48 +0200 +Subject: [PATCH] Use curl instead of wget + +When curl's MIT license is preferable to wget's GPLv3. + +Change-Id: I4684ae7569704514fdcc63e0655c556efcaf44f8 +Signed-off-by: Joakim Roubert + +--- + templates/lxc-download.in | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/templates/lxc-download.in b/templates/lxc-download.in +index d7e6128..8a4b567 100644 +--- a/templates/lxc-download.in ++++ b/templates/lxc-download.in +@@ -74,9 +74,9 @@ cleanup() { + fi + } + +-wget_wrapper() { ++curl_wrapper() { + for _ in $(seq 3); do +- if wget "$@"; then ++ if curl "$@"; then + return 0 + fi + done +@@ -85,8 +85,8 @@ wget_wrapper() { + } + + download_file() { +- if ! wget_wrapper -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then +- if ! wget_wrapper -T 30 -q "http://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then ++ if ! curl_wrapper -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then ++ if ! curl_wrapper -m 30 -s "http://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then + if [ "$3" = "noexit" ]; then + return 1 + else +@@ -271,7 +271,7 @@ while :; do + done + + # Check for required binaries +-for bin in tar xz wget; do ++for bin in tar xz curl; do + if ! command -V "${bin}" >/dev/null 2>&1; then + echo "ERROR: Missing required tool: ${bin}" 1>&2 + exit 1 -- cgit 1.2.3-korg