mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
lxc: backport changes from master for templates-use-curl-instead-of-wget.patch
backport the changes of templates-use-curl-instead-of-wget.patch from master in following commits:05f316f70a
: lxc: update to 5.x and meson2119189361
: treewide: bulk update patches with status field Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
a517e15529
commit
a9361e9f81
|
@ -1,22 +1,24 @@
|
||||||
From 1db2db7783bd7ec2aa1da86e640019891634c659 Mon Sep 17 00:00:00 2001
|
From 3e4cb0b738649f7750413cefbcfdb2115213ad0d Mon Sep 17 00:00:00 2001
|
||||||
From: Joakim Roubert <joakimr@axis.com>
|
From: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||||
Date: Fri, 16 Aug 2019 07:52:48 +0200
|
Date: Sun, 14 Aug 2022 14:08:56 -0400
|
||||||
Subject: [PATCH] Use curl instead of wget
|
Subject: [PATCH] download: Use curl instead of wget
|
||||||
|
|
||||||
When curl's MIT license is preferable to wget's GPLv3.
|
When curl's MIT license is preferable to wget's GPLv3.
|
||||||
|
|
||||||
Change-Id: I4684ae7569704514fdcc63e0655c556efcaf44f8
|
Upstream-Status: Inappropriate [embedded specific]
|
||||||
|
|
||||||
Signed-off-by: Joakim Roubert <joakimr@axis.com>
|
Signed-off-by: Joakim Roubert <joakimr@axis.com>
|
||||||
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
|
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
|
||||||
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||||
---
|
---
|
||||||
templates/lxc-download.in | 10 +++++-----
|
templates/lxc-download.in | 8 ++++----
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
Index: git/templates/lxc-download.in
|
diff --git a/templates/lxc-download.in b/templates/lxc-download.in
|
||||||
===================================================================
|
index a62ddf482..690307338 100755
|
||||||
--- git.orig/templates/lxc-download.in
|
--- a/templates/lxc-download.in
|
||||||
+++ git/templates/lxc-download.in
|
+++ b/templates/lxc-download.in
|
||||||
@@ -59,9 +59,9 @@
|
@@ -59,9 +59,9 @@ cleanup() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,19 +30,16 @@ Index: git/templates/lxc-download.in
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -70,8 +70,9 @@
|
@@ -70,7 +70,7 @@ wget_wrapper() {
|
||||||
}
|
}
|
||||||
|
|
||||||
download_file() {
|
download_file() {
|
||||||
- if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then
|
- if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then
|
||||||
- if [ "$3" = "noexit" ]; then
|
+ if ! curl_wrapper --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
|
||||||
+ if ! curl_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
|
if [ "$3" = "noexit" ]; then
|
||||||
+ if ! curl_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "http://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
|
|
||||||
+ if [ "$3" = "noexit" ]; then
|
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
echo "ERROR: Failed to download https://${DOWNLOAD_SERVER}/$1" 1>&2
|
@@ -176,7 +176,7 @@ while :; do
|
||||||
@@ -176,7 +177,7 @@
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check for required binaries
|
# Check for required binaries
|
||||||
|
@ -49,3 +48,6 @@ Index: git/templates/lxc-download.in
|
||||||
if ! command -V "${bin}" >/dev/null 2>&1; then
|
if ! command -V "${bin}" >/dev/null 2>&1; then
|
||||||
echo "ERROR: Missing required tool: ${bin}" 1>&2
|
echo "ERROR: Missing required tool: ${bin}" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user