[prev in list] [next in list] [prev in thread] [next in thread]
List: lxc-devel
Subject: [lxc-devel] [lxc/master] lxc-oci: cmd parsing and less verbose umoci
From: flx42 on Github <lxc-bot () linuxcontainers ! org>
Date: 2018-03-29 18:19:58
Message-ID: 20180329181958.BA3E35216B () mailman01 ! srv ! dcmtl ! stgraber ! net
[Download RAW message or body]
[Attachment #2 (text/x-mailbox)]
The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2246
This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.
=== Description (from pull-request) ===
[Attachment #3 (text/plain)]
From d99e3b2ea72f99c8d8809cb6d774d1cdcc6e8dda Mon Sep 17 00:00:00 2001
From: Felix Abecassis <fabecassis@nvidia.com>
Date: Thu, 29 Mar 2018 10:20:31 -0700
Subject: [PATCH 1/2] lxc-oci: fix Cmd/Entrypoint parsing
Don't use the -r option of jq, since it will strip the double quotes.
Fixes: #2195
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
---
templates/lxc-oci.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/lxc-oci.in b/templates/lxc-oci.in
index d843a079e..4dca46ac0 100644
--- a/templates/lxc-oci.in
+++ b/templates/lxc-oci.in
@@ -100,8 +100,8 @@ getep() {
configpath="$1"
- ep=$(jq -c -r '.config.Entrypoint[]?'< "${configpath}")
- cmd=$(jq -c -r '.config.Cmd[]?' < "${configpath}")
+ ep=$(jq -c '.config.Entrypoint[]?'< "${configpath}" | tr '\n' ' ')
+ cmd=$(jq -c '.config.Cmd[]?'< "${configpath}" | tr '\n' ' ')
if [ -z "${ep}" ]; then
ep="${cmd}"
if [ -z "${ep}" ]; then
From 845ba283d6dedc4719096c4099e82e7517f074aa Mon Sep 17 00:00:00 2001
From: Felix Abecassis <fabecassis@nvidia.com>
Date: Thu, 29 Mar 2018 10:21:22 -0700
Subject: [PATCH 2/2] lxc-oci: make umoci less verbose
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
---
templates/lxc-oci.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/lxc-oci.in b/templates/lxc-oci.in
index 4dca46ac0..d4fef193e 100644
--- a/templates/lxc-oci.in
+++ b/templates/lxc-oci.in
@@ -312,7 +312,7 @@ if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ]; then
fi
# shellcheck disable=SC2039
# shellcheck disable=SC2068
-umoci unpack ${umoci_args[@]} --image "${DOWNLOAD_TEMP}:latest" "${LXC_ROOTFS}.tmp"
+umoci --log=error unpack ${umoci_args[@]} --image "${DOWNLOAD_TEMP}:latest" "${LXC_ROOTFS}.tmp"
rmdir "${LXC_ROOTFS}"
mv "${LXC_ROOTFS}.tmp/rootfs" "${LXC_ROOTFS}"
[Attachment #4 (text/plain)]
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic