diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-10-11 20:28:31 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-10-12 10:30:43 -0400 |
commit | 6013c088a2f9357ac940aa89d0bee476e8d8b366 (patch) | |
tree | c601c39eb421ec587f7c1211b6e400fa77c6d7bc | |
parent | 4583c6331737c072fe23b77f2453bcce3d25f81e (diff) | |
download | meta-virtualization-6013c088a2f9357ac940aa89d0bee476e8d8b366.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>
Signed-off-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch | 39 | ||||
-rw-r--r-- | recipes-containers/lxc/lxc_2.0.8.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..2b1ab875 --- /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 f09475d..d6333ad 100644 | ||
26 | --- a/templates/lxc-download.in | ||
27 | +++ b/templates/lxc-download.in | ||
28 | @@ -310,7 +310,7 @@ if ! type mktemp >/dev/null 2>&1; then | ||
29 | DOWNLOAD_TEMP=/tmp/lxc-download.$$ | ||
30 | mkdir -p $DOWNLOAD_TEMP | ||
31 | else | ||
32 | - DOWNLOAD_TEMP=$(mktemp -d) | ||
33 | + DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)" | ||
34 | fi | ||
35 | |||
36 | # Simply list images | ||
37 | -- | ||
38 | 2.19.0 | ||
39 | |||
diff --git a/recipes-containers/lxc/lxc_2.0.8.bb b/recipes-containers/lxc/lxc_2.0.8.bb index c87b8756..facad2eb 100644 --- a/recipes-containers/lxc/lxc_2.0.8.bb +++ b/recipes-containers/lxc/lxc_2.0.8.bb | |||
@@ -23,6 +23,7 @@ RDEPENDS_${PN} = " \ | |||
23 | libidn \ | 23 | libidn \ |
24 | gnutls \ | 24 | gnutls \ |
25 | nettle \ | 25 | nettle \ |
26 | util-linux-mountpoint \ | ||
26 | " | 27 | " |
27 | 28 | ||
28 | RDEPENDS_${PN}_append_libc-glibc = " glibc-utils" | 29 | RDEPENDS_${PN}_append_libc-glibc = " glibc-utils" |
@@ -38,6 +39,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \ | |||
38 | file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \ | 39 | file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \ |
39 | file://logs-optionally-use-base-filenames-to-report-src-fil.patch \ | 40 | file://logs-optionally-use-base-filenames-to-report-src-fil.patch \ |
40 | file://cgroups-work-around-issue-in-gcc-7.patch \ | 41 | file://cgroups-work-around-issue-in-gcc-7.patch \ |
42 | file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \ | ||
41 | file://dnsmasq.conf \ | 43 | file://dnsmasq.conf \ |
42 | " | 44 | " |
43 | 45 | ||