summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2018-05-31 17:08:05 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-06-03 23:26:51 -0400
commitb6bccf42d1042ee52800d307cffb39191b0f35f3 (patch)
tree278a020499918bfeec119bb847a8f57eb6c8dad3 /recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch
parent0d7cfe86600b0306af97578b16ec7ca264ea1346 (diff)
downloadmeta-virtualization-b6bccf42d1042ee52800d307cffb39191b0f35f3.tar.gz
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>
Diffstat (limited to 'recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch')
-rw-r--r--recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch b/recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch
new file mode 100644
index 00000000..359f6622
--- /dev/null
+++ b/recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch
@@ -0,0 +1,39 @@
1From 1d83b86a9bf017257c068c662ec3bf52ec0cfe90 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Thu, 31 May 2018 16:21:45 -0400
4Subject: [PATCH] templates: actually create DOWNLOAD_TEMP directory
5
6The way 'mktemp' is currently used you will get a temp directory in
7$TMPDIR or '/tmp' and DOWNLOAD_TEMP will not be pointing to an actual
8directory. This will result in the wget operations failing and the
9container will fail to create:
10
11 ERROR: Failed to download http://....
12
13Instead we want to use the '-p' option for mktemp to set the base path
14and this will ensure that the temp directory is created in the correct
15location and DOWNLOAD_TEMP will be consistent with this location.
16
17Upstream-Status: Pending
18
19Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
20---
21 templates/lxc-download.in | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/templates/lxc-download.in b/templates/lxc-download.in
25index f875183..5f1138c 100644
26--- a/templates/lxc-download.in
27+++ b/templates/lxc-download.in
28@@ -320,7 +320,7 @@ fi
29 if ! command -V mktemp >/dev/null 2>&1; then
30 DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$"
31 else
32- DOWNLOAD_TEMP="${DOWNLOAD_TEMP}$(mktemp -d)"
33+ DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)"
34 fi
35
36 # Simply list images
37--
382.7.4
39