diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-05-31 17:08:05 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-06-03 23:26:51 -0400 |
commit | b6bccf42d1042ee52800d307cffb39191b0f35f3 (patch) | |
tree | 278a020499918bfeec119bb847a8f57eb6c8dad3 /recipes-containers/lxc | |
parent | 0d7cfe86600b0306af97578b16ec7ca264ea1346 (diff) | |
download | meta-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')
-rw-r--r-- | recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch | 39 | ||||
-rw-r--r-- | recipes-containers/lxc/lxc_3.0.0.bb | 2 |
2 files changed, 41 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 @@ | |||
1 | From 1d83b86a9bf017257c068c662ec3bf52ec0cfe90 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 31 May 2018 16:21:45 -0400 | ||
4 | Subject: [PATCH] templates: actually create DOWNLOAD_TEMP directory | ||
5 | |||
6 | The 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 | ||
8 | directory. This will result in the wget operations failing and the | ||
9 | container will fail to create: | ||
10 | |||
11 | ERROR: Failed to download http://.... | ||
12 | |||
13 | Instead we want to use the '-p' option for mktemp to set the base path | ||
14 | and this will ensure that the temp directory is created in the correct | ||
15 | location and DOWNLOAD_TEMP will be consistent with this location. | ||
16 | |||
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
20 | --- | ||
21 | templates/lxc-download.in | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/templates/lxc-download.in b/templates/lxc-download.in | ||
25 | index 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 | -- | ||
38 | 2.7.4 | ||
39 | |||
diff --git a/recipes-containers/lxc/lxc_3.0.0.bb b/recipes-containers/lxc/lxc_3.0.0.bb index 7158d0a3..762a3125 100644 --- a/recipes-containers/lxc/lxc_3.0.0.bb +++ b/recipes-containers/lxc/lxc_3.0.0.bb | |||
@@ -24,6 +24,7 @@ RDEPENDS_${PN} = " \ | |||
24 | libidn \ | 24 | libidn \ |
25 | gnutls \ | 25 | gnutls \ |
26 | nettle \ | 26 | nettle \ |
27 | util-linux-mountpoint \ | ||
27 | " | 28 | " |
28 | 29 | ||
29 | RDEPENDS_${PN}_append_libc-glibc = " glibc-utils" | 30 | RDEPENDS_${PN}_append_libc-glibc = " glibc-utils" |
@@ -40,6 +41,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | |||
40 | file://lxc-fix-B-S.patch \ | 41 | file://lxc-fix-B-S.patch \ |
41 | file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \ | 42 | file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \ |
42 | file://logs-optionally-use-base-filenames-to-report-src-fil.patch \ | 43 | file://logs-optionally-use-base-filenames-to-report-src-fil.patch \ |
44 | file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \ | ||
43 | file://dnsmasq.conf \ | 45 | file://dnsmasq.conf \ |
44 | file://lxc-net \ | 46 | file://lxc-net \ |
45 | " | 47 | " |