All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@kernel.org>
To: meta-virtualization@yoctoproject.org
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>,
	Mark Asselstine <mark.asselstine@windriver.com>
Subject: [sumo] [PATCH v1 1/2] lxc: fixup 'download' template use
Date: Thu, 11 Oct 2018 20:28:31 +0000	[thread overview]
Message-ID: <20181011202832.20004-1-okaya@kernel.org> (raw)

From: Mark Asselstine <mark.asselstine@windriver.com>

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>
---
 ...ually-create-DOWNLOAD_TEMP-directory.patch | 39 +++++++++++++++++++
 recipes-containers/lxc/lxc_2.0.8.bb           |  2 +
 2 files changed, 41 insertions(+)
 create mode 100644 recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch

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 0000000..2b1ab87
--- /dev/null
+++ b/recipes-containers/lxc/files/templates-actually-create-DOWNLOAD_TEMP-directory.patch
@@ -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 f09475d..d6333ad 100644
+--- a/templates/lxc-download.in
++++ b/templates/lxc-download.in
+@@ -310,7 +310,7 @@ if ! type mktemp >/dev/null 2>&1; then
+     DOWNLOAD_TEMP=/tmp/lxc-download.$$
+     mkdir -p $DOWNLOAD_TEMP
+ else
+-    DOWNLOAD_TEMP=$(mktemp -d)
++    DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)"
+ fi
+ 
+ # Simply list images
+-- 
+2.19.0
+
diff --git a/recipes-containers/lxc/lxc_2.0.8.bb b/recipes-containers/lxc/lxc_2.0.8.bb
index c87b875..facad2e 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} = " \
 		libidn \
 		gnutls \
 		nettle \
+		util-linux-mountpoint \
 "
 
 RDEPENDS_${PN}_append_libc-glibc = " glibc-utils"
@@ -38,6 +39,7 @@ SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
 	file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
 	file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
 	file://cgroups-work-around-issue-in-gcc-7.patch \
+	file://templates-actually-create-DOWNLOAD_TEMP-directory.patch \
 	file://dnsmasq.conf \
 	"
 
-- 
2.19.0



             reply	other threads:[~2018-10-11 20:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 20:28 Sinan Kaya [this message]
2018-10-11 20:28 ` [sumo] [PATCH v1 2/2] lxc: use compiled tests instead of copying source building on target Sinan Kaya
2018-10-12 14:31 ` [sumo] [PATCH v1 1/2] lxc: fixup 'download' template use Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181011202832.20004-1-okaya@kernel.org \
    --to=okaya@kernel.org \
    --cc=bruce.ashfield@windriver.com \
    --cc=mark.asselstine@windriver.com \
    --cc=meta-virtualization@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.