* [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone
@ 2023-03-17 10:28 Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 1/2] lxc: backport changes from master for templates-use-curl-instead-of-wget.patch Xiangyu Chen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Xiangyu Chen @ 2023-03-17 10:28 UTC (permalink / raw)
To: meta-virtualization
From: Xiangyu Chen <xiangyu.chen@windriver.com>
Hi Bruce,
This series of patch to fix the template of lxc-download on kirkstone.
When we using a download container command[1], the lxc-create would report missing
"fi" error, this has been already fixed on master, so backport those changes in
templates-use-curl-instead-of-wget.patch to kirkstone.
05f316f70a4d : lxc: update to 5.x and meson
211918936180 : treewide: bulk update patches with status field
After backport those changes, the lxc-create with download template still has
failure, after checking the image website url, it was redirected to a mirror
site, so curl need to add a -L option to support url redirect, the version of
curl in kirkstone also need to add an option -f to use return an error code to
tell the caller when http/https has errors.
[1] lxc-create -t download -n test -- --dist archlinux --release current --arch arm64
Xiangyu Chen (2):
lxc: backport changes from master for
templates-use-curl-instead-of-wget.patch
lxc: add -L and -f for curl in
templates-use-curl-instead-of-wget.patch
.../templates-use-curl-instead-of-wget.patch | 40 ++++++++++---------
1 file changed, 21 insertions(+), 19 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [meta-virtualization][kirkstone][PATCH 1/2] lxc: backport changes from master for templates-use-curl-instead-of-wget.patch
2023-03-17 10:28 [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Xiangyu Chen
@ 2023-03-17 10:28 ` Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 2/2] lxc: add -L and -f for curl in templates-use-curl-instead-of-wget.patch Xiangyu Chen
2023-03-17 19:33 ` [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Bruce Ashfield
2 siblings, 0 replies; 4+ messages in thread
From: Xiangyu Chen @ 2023-03-17 10:28 UTC (permalink / raw)
To: meta-virtualization
From: Xiangyu Chen <xiangyu.chen@windriver.com>
backport the changes of templates-use-curl-instead-of-wget.patch
from master in following commits:
05f316f70a4d : lxc: update to 5.x and meson
211918936180 : treewide: bulk update patches with status field
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
---
.../templates-use-curl-instead-of-wget.patch | 40 ++++++++++---------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
index f06e596..ff5c5f6 100644
--- a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
+++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
@@ -1,22 +1,24 @@
-From 1db2db7783bd7ec2aa1da86e640019891634c659 Mon Sep 17 00:00:00 2001
-From: Joakim Roubert <joakimr@axis.com>
-Date: Fri, 16 Aug 2019 07:52:48 +0200
-Subject: [PATCH] Use curl instead of wget
+From 3e4cb0b738649f7750413cefbcfdb2115213ad0d Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@gmail.com>
+Date: Sun, 14 Aug 2022 14:08:56 -0400
+Subject: [PATCH] download: Use curl instead of wget
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: Yanfei Xu <yanfei.xu@windriver.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
- templates/lxc-download.in | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ templates/lxc-download.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
-Index: git/templates/lxc-download.in
-===================================================================
---- git.orig/templates/lxc-download.in
-+++ git/templates/lxc-download.in
-@@ -59,9 +59,9 @@
+diff --git a/templates/lxc-download.in b/templates/lxc-download.in
+index a62ddf482..690307338 100755
+--- a/templates/lxc-download.in
++++ b/templates/lxc-download.in
+@@ -59,9 +59,9 @@ cleanup() {
fi
}
@@ -28,19 +30,16 @@ Index: git/templates/lxc-download.in
return 0
fi
done
-@@ -70,8 +70,9 @@
+@@ -70,7 +70,7 @@ wget_wrapper() {
}
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 [ "$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 "http://${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 [ "$3" = "noexit" ]; then
return 1
else
- echo "ERROR: Failed to download https://${DOWNLOAD_SERVER}/$1" 1>&2
-@@ -176,7 +177,7 @@
+@@ -176,7 +176,7 @@ while :; do
done
# Check for required binaries
@@ -49,3 +48,6 @@ Index: git/templates/lxc-download.in
if ! command -V "${bin}" >/dev/null 2>&1; then
echo "ERROR: Missing required tool: ${bin}" 1>&2
exit 1
+--
+2.25.1
+
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-virtualization][kirkstone][PATCH 2/2] lxc: add -L and -f for curl in templates-use-curl-instead-of-wget.patch
2023-03-17 10:28 [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 1/2] lxc: backport changes from master for templates-use-curl-instead-of-wget.patch Xiangyu Chen
@ 2023-03-17 10:28 ` Xiangyu Chen
2023-03-17 19:33 ` [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Bruce Ashfield
2 siblings, 0 replies; 4+ messages in thread
From: Xiangyu Chen @ 2023-03-17 10:28 UTC (permalink / raw)
To: meta-virtualization
From: Xiangyu Chen <xiangyu.chen@windriver.com>
Add support of redirect option -L for curl, the
linuxcontainers.org sometimes redirect to other
mirror site such like us.lxd.images.canonical.com,
this would cause the lxc-download script report
download failed.
The version of curl in kirkstone also need to add an
option -f to use an error code to tell the caller
when http/https has errors.
Reproduce and verified on following command:
lxc-create -t download -n test -- --dist archlinux --release current --arch arm64
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
---
.../lxc/files/templates-use-curl-instead-of-wget.patch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
index ff5c5f6..a334723 100644
--- a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
+++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
@@ -35,7 +35,7 @@ index a62ddf482..690307338 100755
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 ! 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 -L -f --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
return 1
else
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone
2023-03-17 10:28 [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 1/2] lxc: backport changes from master for templates-use-curl-instead-of-wget.patch Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 2/2] lxc: add -L and -f for curl in templates-use-curl-instead-of-wget.patch Xiangyu Chen
@ 2023-03-17 19:33 ` Bruce Ashfield
2 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2023-03-17 19:33 UTC (permalink / raw)
To: Xiangyu Chen; +Cc: meta-virtualization
In message: [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone
on 17/03/2023 Xiangyu Chen wrote:
> From: Xiangyu Chen <xiangyu.chen@windriver.com>
>
> Hi Bruce,
>
> This series of patch to fix the template of lxc-download on kirkstone.
>
> When we using a download container command[1], the lxc-create would report missing
> "fi" error, this has been already fixed on master, so backport those changes in
> templates-use-curl-instead-of-wget.patch to kirkstone.
>
> 05f316f70a4d : lxc: update to 5.x and meson
> 211918936180 : treewide: bulk update patches with status field
>
> After backport those changes, the lxc-create with download template still has
> failure, after checking the image website url, it was redirected to a mirror
> site, so curl need to add a -L option to support url redirect, the version of
> curl in kirkstone also need to add an option -f to use return an error code to
> tell the caller when http/https has errors.
Thanks for the explanation, you answered my questions about
"is this an issue in master" and "why aren't these just cherr picks".
These are merged to kirkstone.
Bruce
>
>
> [1] lxc-create -t download -n test -- --dist archlinux --release current --arch arm64
>
>
> Xiangyu Chen (2):
> lxc: backport changes from master for
> templates-use-curl-instead-of-wget.patch
> lxc: add -L and -f for curl in
> templates-use-curl-instead-of-wget.patch
>
> .../templates-use-curl-instead-of-wget.patch | 40 ++++++++++---------
> 1 file changed, 21 insertions(+), 19 deletions(-)
>
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#7943): https://lists.yoctoproject.org/g/meta-virtualization/message/7943
> Mute This Topic: https://lists.yoctoproject.org/mt/97669932/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-17 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 10:28 [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 1/2] lxc: backport changes from master for templates-use-curl-instead-of-wget.patch Xiangyu Chen
2023-03-17 10:28 ` [meta-virtualization][kirkstone][PATCH 2/2] lxc: add -L and -f for curl in templates-use-curl-instead-of-wget.patch Xiangyu Chen
2023-03-17 19:33 ` [meta-virtualization][kirkstone][PATCH 0/2] fix the template of lxc download failure on kirkstone Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.