* [PATCH] templates/lxc-download.in: Use curl instead of wget
@ 2019-09-17 13:47 Joakim Roubert
2019-09-18 17:54 ` Bruce Ashfield
0 siblings, 1 reply; 5+ messages in thread
From: Joakim Roubert @ 2019-09-17 13:47 UTC (permalink / raw)
To: meta-virtualization; +Cc: Joakim Roubert
When curl's MIT license is preferable to wget's GPLv3. Which it is in
several situations.
Change-Id: I72ee1ce66493c564557b73fae80f5219ef83af6d
Signed-off-by: Joakim Roubert <joakimr@axis.com>
---
.../templates-use-curl-instead-of-wget.patch | 49 +++++++++++++++++++
recipes-containers/lxc/lxc_3.2.1.bb | 3 +-
2 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
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
new file mode 100644
index 0000000..4b185bf
--- /dev/null
+++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
@@ -0,0 +1,49 @@
+From dd7b0a2e4542c352456747a45d7eeb11e9fdec26 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
+
+When curl's MIT license is preferable to wget's GPLv3.
+
+Change-Id: I4684ae7569704514fdcc63e0655c556efcaf44f8
+Signed-off-by: Joakim Roubert <joakimr@axis.com>
+---
+ 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 b70daaf..9526eae 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
+@@ -266,7 +266,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
diff --git a/recipes-containers/lxc/lxc_3.2.1.bb b/recipes-containers/lxc/lxc_3.2.1.bb
index 4b8f10b..b852515 100644
--- a/recipes-containers/lxc/lxc_3.2.1.bb
+++ b/recipes-containers/lxc/lxc_3.2.1.bb
@@ -5,10 +5,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS = "libxml2 libcap"
RDEPENDS_${PN} = " \
rsync \
+ curl \
gzip \
xz \
tar \
- wget \
libcap-bin \
bridge-utils \
dnsmasq \
@@ -41,6 +41,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \
file://template-make-busybox-template-compatible-with-core-.patch \
+ file://templates-use-curl-instead-of-wget.patch \
file://tests-our-init-is-not-busybox.patch \
file://tests-add-no-validate-when-using-download-template.patch \
file://network-restore-ability-to-move-nl80211-devices.patch \
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] templates/lxc-download.in: Use curl instead of wget
2019-09-17 13:47 [PATCH] templates/lxc-download.in: Use curl instead of wget Joakim Roubert
@ 2019-09-18 17:54 ` Bruce Ashfield
2019-09-19 8:31 ` Joakim Roubert
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2019-09-18 17:54 UTC (permalink / raw)
To: Joakim Roubert; +Cc: meta-virtualization, Joakim Roubert
merged
Bruce
In message: [meta-virtualization] [PATCH] templates/lxc-download.in: Use curl instead of wget
on 17/09/2019 Joakim Roubert wrote:
> When curl's MIT license is preferable to wget's GPLv3. Which it is in
> several situations.
>
> Change-Id: I72ee1ce66493c564557b73fae80f5219ef83af6d
> Signed-off-by: Joakim Roubert <joakimr@axis.com>
> ---
> .../templates-use-curl-instead-of-wget.patch | 49 +++++++++++++++++++
> recipes-containers/lxc/lxc_3.2.1.bb | 3 +-
> 2 files changed, 51 insertions(+), 1 deletion(-)
> create mode 100644 recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
>
> 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
> new file mode 100644
> index 0000000..4b185bf
> --- /dev/null
> +++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch
> @@ -0,0 +1,49 @@
> +From dd7b0a2e4542c352456747a45d7eeb11e9fdec26 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
> +
> +When curl's MIT license is preferable to wget's GPLv3.
> +
> +Change-Id: I4684ae7569704514fdcc63e0655c556efcaf44f8
> +Signed-off-by: Joakim Roubert <joakimr@axis.com>
> +---
> + 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 b70daaf..9526eae 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
> +@@ -266,7 +266,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
> diff --git a/recipes-containers/lxc/lxc_3.2.1.bb b/recipes-containers/lxc/lxc_3.2.1.bb
> index 4b8f10b..b852515 100644
> --- a/recipes-containers/lxc/lxc_3.2.1.bb
> +++ b/recipes-containers/lxc/lxc_3.2.1.bb
> @@ -5,10 +5,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
> DEPENDS = "libxml2 libcap"
> RDEPENDS_${PN} = " \
> rsync \
> + curl \
> gzip \
> xz \
> tar \
> - wget \
> libcap-bin \
> bridge-utils \
> dnsmasq \
> @@ -41,6 +41,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
> file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
> file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \
> file://template-make-busybox-template-compatible-with-core-.patch \
> + file://templates-use-curl-instead-of-wget.patch \
> file://tests-our-init-is-not-busybox.patch \
> file://tests-add-no-validate-when-using-download-template.patch \
> file://network-restore-ability-to-move-nl80211-devices.patch \
> --
> 2.20.1
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] templates/lxc-download.in: Use curl instead of wget
2019-09-18 17:54 ` Bruce Ashfield
@ 2019-09-19 8:31 ` Joakim Roubert
2019-09-20 4:44 ` Bruce Ashfield
0 siblings, 1 reply; 5+ messages in thread
From: Joakim Roubert @ 2019-09-19 8:31 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: meta-virtualization
On 2019-09-18 19:54, Bruce Ashfield wrote:
>
> merged
Would it be possible to get this one backported/cherry-picked to the
warrior branch?
BR & TIA,
/Joakim
--
Joakim Roubert
Senior Engineer
Axis Communications AB
Emdalavägen 14, SE-223 69 Lund, Sweden
Tel: +46 46 272 18 00, Tel (direct): +46 46 272 27 48
Fax: +46 46 13 61 30, www.axis.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] templates/lxc-download.in: Use curl instead of wget
2019-09-19 8:31 ` Joakim Roubert
@ 2019-09-20 4:44 ` Bruce Ashfield
2019-09-20 6:04 ` Joakim Roubert
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2019-09-20 4:44 UTC (permalink / raw)
To: Joakim Roubert; +Cc: meta-virtualization
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
On Thu, Sep 19, 2019 at 4:31 AM Joakim Roubert <joakim.roubert@axis.com>
wrote:
> On 2019-09-18 19:54, Bruce Ashfield wrote:
> >
> > merged
>
> Would it be possible to get this one backported/cherry-picked to the
> warrior branch?
>
This qualifies as something I'm willing to cherry pick .. so it is now on
warrior as well.
Bruce
>
> BR & TIA,
>
> /Joakim
> --
> Joakim Roubert
> Senior Engineer
>
> Axis Communications AB
> Emdalavägen 14, SE-223 69 Lund, Sweden
> Tel: +46 46 272 18 00, Tel (direct): +46 46 272 27 48
> Fax: +46 46 13 61 30, www.axis.com
>
>
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
[-- Attachment #2: Type: text/html, Size: 1658 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] templates/lxc-download.in: Use curl instead of wget
2019-09-20 4:44 ` Bruce Ashfield
@ 2019-09-20 6:04 ` Joakim Roubert
0 siblings, 0 replies; 5+ messages in thread
From: Joakim Roubert @ 2019-09-20 6:04 UTC (permalink / raw)
To: Bruce Ashfield; +Cc: meta-virtualization
On 2019-09-20 06:44, Bruce Ashfield wrote:
>
> This qualifies as something I'm willing to cherry pick .. so it is now
> on warrior as well.
Wonderful, thank you very much!
BR,
/Joakim
--
Joakim Roubert
Senior Engineer
Axis Communications AB
Emdalavägen 14, SE-223 69 Lund, Sweden
Tel: +46 46 272 18 00, Tel (direct): +46 46 272 27 48
Fax: +46 46 13 61 30, www.axis.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-20 6:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-17 13:47 [PATCH] templates/lxc-download.in: Use curl instead of wget Joakim Roubert
2019-09-18 17:54 ` Bruce Ashfield
2019-09-19 8:31 ` Joakim Roubert
2019-09-20 4:44 ` Bruce Ashfield
2019-09-20 6:04 ` Joakim Roubert
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.