All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] systemd-container: sort RRECOMMENDS alphabetically
@ 2021-03-01 16:53 Vivien Didelot
  2021-03-01 16:53 ` [PATCH 2/3] systemd-container: recommend tar Vivien Didelot
  2021-03-01 16:53 ` [PATCH 3/3] systemd-container: recommends StartExecPre modules Vivien Didelot
  0 siblings, 2 replies; 5+ messages in thread
From: Vivien Didelot @ 2021-03-01 16:53 UTC (permalink / raw)
  To: Openembedded-core

Sort packages in RRECOMMENDS_${PN}-container alphabetically to avoid
subjective sorting and ease future additions.

Signed-off-by: Vivien Didelot <vdidelot@pbsc.com>
---
 meta/recipes-core/systemd/systemd_247.3.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_247.3.bb b/meta/recipes-core/systemd/systemd_247.3.bb
index c0073ad7b0..1aac754cfc 100644
--- a/meta/recipes-core/systemd/systemd_247.3.bb
+++ b/meta/recipes-core/systemd/systemd_247.3.bb
@@ -485,9 +485,9 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
                         "
 
 RRECOMMENDS_${PN}-container += "\
-                         ${PN}-journal-upload \
-                         ${PN}-journal-remote \
                          ${PN}-journal-gatewayd \
+                         ${PN}-journal-remote \
+                         ${PN}-journal-upload \
                         "
 
 FILES_${PN}-extra-utils = "\
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] systemd-container: recommend tar
  2021-03-01 16:53 [PATCH 1/3] systemd-container: sort RRECOMMENDS alphabetically Vivien Didelot
@ 2021-03-01 16:53 ` Vivien Didelot
  2021-03-02 18:46   ` [OE-core] " Khem Raj
  2021-03-01 16:53 ` [PATCH 3/3] systemd-container: recommends StartExecPre modules Vivien Didelot
  1 sibling, 1 reply; 5+ messages in thread
From: Vivien Didelot @ 2021-03-01 16:53 UTC (permalink / raw)
  To: Openembedded-core; +Cc: Chen Qi

If systemd is configured with importd, "machinectl import-*" can be
used to add container trees under /var/lib/machines.

But "machinectl import-tar" makes use of "tar --numeric-owner" which
is not supported by the busybox binary, as shown below:

    # machinectl import-tar /tmp/container.tar.xz
    Enqueued transfer job 1. Press C-c to continue download in background.
    Importing '/tmp/container.tar.xz', saving as 'container'.
    Imported 0%.
    tar: unrecognized option '--numeric-owner'
    BusyBox v1.31.1 () multi-call binary.
    Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [FILE]...
    Failed to decode and write: Broken pipe
    Exiting.

To fix this, recommend the standard tar package.

Cc: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Vivien Didelot <vdidelot@pbsc.com>
---
 meta/recipes-core/systemd/systemd_247.3.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_247.3.bb b/meta/recipes-core/systemd/systemd_247.3.bb
index 1aac754cfc..3454085e5f 100644
--- a/meta/recipes-core/systemd/systemd_247.3.bb
+++ b/meta/recipes-core/systemd/systemd_247.3.bb
@@ -484,10 +484,12 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
                          ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
                         "
 
+# "machinectl import-tar" uses "tar --numeric-owner", not supported by busybox.
 RRECOMMENDS_${PN}-container += "\
                          ${PN}-journal-gatewayd \
                          ${PN}-journal-remote \
                          ${PN}-journal-upload \
+                         tar \
                         "
 
 FILES_${PN}-extra-utils = "\
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] systemd-container: recommends StartExecPre modules
  2021-03-01 16:53 [PATCH 1/3] systemd-container: sort RRECOMMENDS alphabetically Vivien Didelot
  2021-03-01 16:53 ` [PATCH 2/3] systemd-container: recommend tar Vivien Didelot
@ 2021-03-01 16:53 ` Vivien Didelot
  1 sibling, 0 replies; 5+ messages in thread
From: Vivien Didelot @ 2021-03-01 16:53 UTC (permalink / raw)
  To: Openembedded-core

The systemd-nspawn@.service file uses the following line to try
loading the tun, loop and dm-mod kernel modules, in a non fatal way:

    ExecStartPre=-/sbin/modprobe -abq tun loop dm-mod

A non-zero return code from modprobe will not stop the service from
starting, but it would be convenient to inform the user about this
optional support, so add these modules to RRECOMMENDS.

Signed-off-by: Vivien Didelot <vdidelot@pbsc.com>
---
 meta/recipes-core/systemd/systemd_247.3.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_247.3.bb b/meta/recipes-core/systemd/systemd_247.3.bb
index 3454085e5f..cd67e65abe 100644
--- a/meta/recipes-core/systemd/systemd_247.3.bb
+++ b/meta/recipes-core/systemd/systemd_247.3.bb
@@ -489,6 +489,9 @@ RRECOMMENDS_${PN}-container += "\
                          ${PN}-journal-gatewayd \
                          ${PN}-journal-remote \
                          ${PN}-journal-upload \
+                         kernel-module-dm-mod \
+                         kernel-module-loop \
+                         kernel-module-tun \
                          tar \
                         "
 
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 2/3] systemd-container: recommend tar
  2021-03-01 16:53 ` [PATCH 2/3] systemd-container: recommend tar Vivien Didelot
@ 2021-03-02 18:46   ` Khem Raj
  2021-03-03  0:47     ` Vivien Didelot
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2021-03-02 18:46 UTC (permalink / raw)
  To: Vivien Didelot, Openembedded-core; +Cc: Chen Qi

we should be enabling CONFIG_LONG_OPTS=y in busybox when using systemd

On 3/1/21 8:53 AM, Vivien Didelot wrote:
> If systemd is configured with importd, "machinectl import-*" can be
> used to add container trees under /var/lib/machines.
> 
> But "machinectl import-tar" makes use of "tar --numeric-owner" which
> is not supported by the busybox binary, as shown below:
> 
>      # machinectl import-tar /tmp/container.tar.xz
>      Enqueued transfer job 1. Press C-c to continue download in background.
>      Importing '/tmp/container.tar.xz', saving as 'container'.
>      Imported 0%.
>      tar: unrecognized option '--numeric-owner'
>      BusyBox v1.31.1 () multi-call binary.
>      Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [FILE]...
>      Failed to decode and write: Broken pipe
>      Exiting.
> 
> To fix this, recommend the standard tar package.
> 
> Cc: Chen Qi <Qi.Chen@windriver.com>
> Signed-off-by: Vivien Didelot <vdidelot@pbsc.com>
> ---
>   meta/recipes-core/systemd/systemd_247.3.bb | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-core/systemd/systemd_247.3.bb b/meta/recipes-core/systemd/systemd_247.3.bb
> index 1aac754cfc..3454085e5f 100644
> --- a/meta/recipes-core/systemd/systemd_247.3.bb
> +++ b/meta/recipes-core/systemd/systemd_247.3.bb
> @@ -484,10 +484,12 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
>                            ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
>                           "
>   
> +# "machinectl import-tar" uses "tar --numeric-owner", not supported by busybox.
>   RRECOMMENDS_${PN}-container += "\
>                            ${PN}-journal-gatewayd \
>                            ${PN}-journal-remote \
>                            ${PN}-journal-upload \
> +                         tar \
>                           "
>   
>   FILES_${PN}-extra-utils = "\
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 2/3] systemd-container: recommend tar
  2021-03-02 18:46   ` [OE-core] " Khem Raj
@ 2021-03-03  0:47     ` Vivien Didelot
  0 siblings, 0 replies; 5+ messages in thread
From: Vivien Didelot @ 2021-03-03  0:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: Openembedded-core, Chen Qi, Richard Purdie

Hi Khem,

On Tue, 02 Mar 2021 10:46:51 -0800 Khem Raj <raj.khem@gmail.com> wrote:
> we should be enabling CONFIG_LONG_OPTS=y in busybox when using systemd

To sum up:

  * the systemd-container package contains the machinectl binary;

  * the machinectl "import-*" subcommands require systemd to be configured
    with the "importd" PACKAGECONFIG entry enabled;

  * "machinectl import-tar" uses "tar --numeric-owner" which isn't supported
    by the default busybox configuration.

If busybox configured with CONFIG_LONG_OPTS=y does support tar --numeric-owner,
it might be a better approach to enable this when PACKAGECONFIG[importd]
is used instead of adding "tar" as a recommended package for systemd-container.

However I have no strong opinion on this, and have no clue how to achieve this.


Thanks,

	Vivien

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-03  0:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 16:53 [PATCH 1/3] systemd-container: sort RRECOMMENDS alphabetically Vivien Didelot
2021-03-01 16:53 ` [PATCH 2/3] systemd-container: recommend tar Vivien Didelot
2021-03-02 18:46   ` [OE-core] " Khem Raj
2021-03-03  0:47     ` Vivien Didelot
2021-03-01 16:53 ` [PATCH 3/3] systemd-container: recommends StartExecPre modules Vivien Didelot

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.