systemd-container: sort RRECOMMENDS alphabetically
PATCH 1/3 systemd-container: sort RRECOMMENDS alphabetically
Sort packages in RRECOMMENDS_${PN}-container alphabetically to avoid subjective sorting and ease future additions.
--- meta/recipes-core/systemd/systemd_247.3.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd_247.3.bb +2 -2
@@ -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 = "\
Signature · 1 line
2.30.1
PATCH 2/3 systemd-container: recommend tar
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.
--- meta/recipes-core/systemd/systemd_247.3.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd_247.3.bb +2 -0
@@ -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 = "\
Signature · 1 line
2.30.1
Re: [OE-core] [PATCH 2/3] systemd-container: recommend tar
we should be enabling CONFIG_LONG_OPTS=y in busybox when using systemd
Quoted 46 lines · Vivien Didelot
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 <[email protected]>Signed-off-by Vivien Didelot <[email protected]>--- meta/recipes-core/systemd/systemd_247.3.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-core/systemd/systemd_247.3.bb +2
-0@@ -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 = "\
Re: [OE-core] [PATCH 2/3] systemd-container: recommend tar
Hi Khem,
Quoted 1 line · On Tue, 02 Mar 2021 10:46:51 -0800 Khem Raj <[email protected]> wrote:
we should be enabling
CONFIG_LONG_OPTS=yin 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
PATCH 3/3 systemd-container: recommends StartExecPre modules
In reply to Vivien DidelotThe [email protected] 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.
--- meta/recipes-core/systemd/systemd_247.3.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-core/systemd/systemd_247.3.bb +3 -0
@@ -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 \ "
Signature · 1 line
2.30.1