mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
lxc: fixup 'download' template use
We have a new dependency on 'mountpoint' which is now called in the download template script. We also hit an upstream bug due to improper use of 'mktemp', so we apply a patch to fix this and sent the fix upstream as well. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
parent
0d7cfe8660
commit
b6bccf42d1
|
@ -0,0 +1,39 @@
|
||||||
|
From 1d83b86a9bf017257c068c662ec3bf52ec0cfe90 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mark Asselstine <mark.asselstine@windriver.com>
|
||||||
|
Date: Thu, 31 May 2018 16:21:45 -0400
|
||||||
|
Subject: [PATCH] templates: actually create DOWNLOAD_TEMP directory
|
||||||
|
|
||||||
|
The way 'mktemp' is currently used you will get a temp directory in
|
||||||
|
$TMPDIR or '/tmp' and DOWNLOAD_TEMP will not be pointing to an actual
|
||||||
|
directory. This will result in the wget operations failing and the
|
||||||
|
container will fail to create:
|
||||||
|
|
||||||
|
ERROR: Failed to download http://....
|
||||||
|
|
||||||
|
Instead we want to use the '-p' option for mktemp to set the base path
|
||||||
|
and this will ensure that the temp directory is created in the correct
|
||||||
|
location and DOWNLOAD_TEMP will be consistent with this location.
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
|
||||||
|
---
|
||||||
|
templates/lxc-download.in | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/templates/lxc-download.in b/templates/lxc-download.in
|
||||||
|
index f875183..5f1138c 100644
|
||||||
|
--- a/templates/lxc-download.in
|
||||||
|
+++ b/templates/lxc-download.in
|
||||||
|
@@ -320,7 +320,7 @@ fi
|
||||||
|
if ! command -V mktemp >/dev/null 2>&1; then
|
||||||
|
DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$"
|
||||||
|
else
|
||||||
|
- DOWNLOAD_TEMP="${DOWNLOAD_TEMP}$(mktemp -d)"
|
||||||
|
+ DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Simply list images
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
|
@ -24,6 +24,7 @@ RDEPENDS_${PN} = " \
|
||||||
libidn \
|
libidn \
|
||||||
gnutls \
|
gnutls \
|
||||||
nettle \
|
nettle \
|
||||||
|
util-linux-mountpoint \
|
||||||
"
|
"
|
||||||
|
|
||||||
RDEPENDS_${PN}_append_libc-glibc = " glibc-utils"
|
RDEPENDS_${PN}_append_libc-glibc = " glibc-utils"
|
||||||
|
@ -40,6 +41,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
|
||||||
file://lxc-fix-B-S.patch \
|
file://lxc-fix-B-S.patch \
|
||||||
file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
|
file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
|
||||||
file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
|
file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
|
||||||
|
file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \
|
||||||
file://dnsmasq.conf \
|
file://dnsmasq.conf \
|
||||||
file://lxc-net \
|
file://lxc-net \
|
||||||
"
|
"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user