All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] systemd: fix PN-container package splitting
@ 2018-11-19 22:33 Adrian Freihofer
  2018-11-20 17:39 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Freihofer @ 2018-11-19 22:33 UTC (permalink / raw)
  To: openembedded-core

From: Adrian Freihofer <adrian.freihofer@scs.ch>

- Fix package splitting for services installed with
  systemd-container. Some files have been installed with systemd
  package instead of systemd-container package. (*.service,
  *.socket, *.html...)
- Split journal-upload, journal-remote, journal-gatewayd into
  separate packages. These services are not strictly related to
  nspawn containers. Remote logging is now possible without
  installing all the container stuff.
- systemd-container package rdepends on the new packages to
  maintain 100% backwards compatibility. But nspawn does not
  really depend on them. rrecommends would be fine as well.

Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
---
 meta/recipes-core/systemd/systemd_239.bb | 56 ++++++++++++++++++++----
 1 file changed, 48 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
index e19a8babce..0755d15c4b 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -240,6 +240,9 @@ do_install() {
 	# Delete journal README, as log can be symlinked inside volatile.
 	rm -f ${D}/${localstatedir}/log/README
 
+	# journal-remote creates this at start
+	rm -rf ${D}/${localstatedir}/log/journal/remote
+
 	install -d ${D}${systemd_unitdir}/system/graphical.target.wants
 	install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
 	install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
@@ -310,19 +313,35 @@ PACKAGES =+ "\
     ${PN}-zsh-completion \
     ${PN}-xorg-xinitrc \
     ${PN}-container \
+    ${PN}-journal-gatewayd \
+    ${PN}-journal-upload \
+    ${PN}-journal-remote \
     ${PN}-extra-utils \
 "
 
 SUMMARY_${PN}-container = "Tools for containers and VMs"
 DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
 
-SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
+SUMMARY_${PN}-journal-gatewayd = "HTTP server for journal events"
+DESCRIPTION_${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default."
+
+SUMMARY_${PN}-journal-upload = "Send journal messages over the network"
+DESCRIPTION_${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL."
+
+SUMMARY_${PN}-journal-remote = "Receive journal messages over the network"
+DESCRIPTION_${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files."
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \
+                    ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \
+                    ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \
+                    ${@bb.utils.contains('PACKAGECONFIG', '', '${PN}-journal-remote', '', d)} \
+"
 SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
 
-USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils ${PN}-journal-gateway ${PN}-journal-upload ${PN}-journal-remote"
+USERADD_PARAM_${PN}-journal-gateway += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
+USERADD_PARAM_${PN}-journal-remote += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
+USERADD_PARAM_${PN}-journal-upload += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
 USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
 USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
 USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
@@ -363,6 +382,29 @@ RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
 
 RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
 
+
+FILES_${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \
+                                ${systemd_system_unitdir}/systemd-journal-gatewayd.service \
+                                ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \
+                                ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \
+                                ${datadir}/systemd/gatewayd/browse.html \
+                               "
+SYSTEMD_SERVICE_${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket"
+
+FILES_${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \
+                              ${systemd_system_unitdir}/systemd-journal-upload.service \
+                              ${sysconfdir}/systemd/journal-upload.conf \
+                             "
+SYSTEMD_SERVICE_${PN}-journal-upload = "systemd-journal-upload.service"
+
+FILES_${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \
+                              ${sysconfdir}/systemd/journal-remote.conf \
+                              ${systemd_system_unitdir}/systemd-journal-remote.service \
+                              ${systemd_system_unitdir}/systemd-journal-remote.socket \
+                             "
+SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket"
+
+
 FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
                          ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
                          ${base_bindir}/machinectl \
@@ -381,9 +423,6 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
                          ${systemd_system_unitdir}/var-lib-machines.mount \
                          ${rootlibexecdir}/systemd/systemd-import \
                          ${rootlibexecdir}/systemd/systemd-importd \
-                         ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
-                         ${rootlibexecdir}/systemd/systemd-journal-remote \
-                         ${rootlibexecdir}/systemd/systemd-journal-upload \
                          ${rootlibexecdir}/systemd/systemd-machined \
                          ${rootlibexecdir}/systemd/systemd-pull \
                          ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
@@ -396,6 +435,7 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
                          ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
                          ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
                         "
+RDEPENDS_${PN}-container += "${PN}-journal-upload ${PN}-journal-remote ${PN}-journal-gatewayd"
 
 FILES_${PN}-extra-utils = "\
                         ${base_bindir}/systemd-escape \
-- 
2.17.1



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

* Re: [PATCH] systemd: fix PN-container package splitting
  2018-11-19 22:33 [PATCH] systemd: fix PN-container package splitting Adrian Freihofer
@ 2018-11-20 17:39 ` Richard Purdie
  2018-11-20 17:54   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2018-11-20 17:39 UTC (permalink / raw)
  To: Adrian Freihofer, openembedded-core

On Mon, 2018-11-19 at 23:33 +0100, Adrian Freihofer wrote:
> From: Adrian Freihofer <adrian.freihofer@scs.ch>
> 
> - Fix package splitting for services installed with
>   systemd-container. Some files have been installed with systemd
>   package instead of systemd-container package. (*.service,
>   *.socket, *.html...)
> - Split journal-upload, journal-remote, journal-gatewayd into
>   separate packages. These services are not strictly related to
>   nspawn containers. Remote logging is now possible without
>   installing all the container stuff.
> - systemd-container package rdepends on the new packages to
>   maintain 100% backwards compatibility. But nspawn does not
>   really depend on them. rrecommends would be fine as well.
> 
> Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
> ---
>  meta/recipes-core/systemd/systemd_239.bb | 56 ++++++++++++++++++++
> ----
>  1 file changed, 48 insertions(+), 8 deletions(-)

This causes failures in oe-selftest:


https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/242/steps/7/logs/step2d

(you can run individual tests with oe-selftest -r <testname>

Cheers,

Richard



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

* Re: [PATCH] systemd: fix PN-container package splitting
  2018-11-20 17:39 ` Richard Purdie
@ 2018-11-20 17:54   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2018-11-20 17:54 UTC (permalink / raw)
  To: Adrian Freihofer, openembedded-core

On Tue, 2018-11-20 at 17:39 +0000, Richard Purdie wrote:
> On Mon, 2018-11-19 at 23:33 +0100, Adrian Freihofer wrote:
> > From: Adrian Freihofer <adrian.freihofer@scs.ch>
> > 
> > - Fix package splitting for services installed with
> >   systemd-container. Some files have been installed with systemd
> >   package instead of systemd-container package. (*.service,
> >   *.socket, *.html...)
> > - Split journal-upload, journal-remote, journal-gatewayd into
> >   separate packages. These services are not strictly related to
> >   nspawn containers. Remote logging is now possible without
> >   installing all the container stuff.
> > - systemd-container package rdepends on the new packages to
> >   maintain 100% backwards compatibility. But nspawn does not
> >   really depend on them. rrecommends would be fine as well.
> > 
> > Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
> > ---
> >  meta/recipes-core/systemd/systemd_239.bb | 56 ++++++++++++++++++++
> > ----
> >  1 file changed, 48 insertions(+), 8 deletions(-)
> 
> This causes failures in oe-selftest:
> 
> 
> 
https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/242/steps/7/logs/step2d
> 
> (you can run individual tests with oe-selftest -r <testname>

Also:


https://autobuilder.yoctoproject.org/typhoon/#/builders/35/builds/192/steps/7/logs/step5b

https://autobuilder.yoctoproject.org/typhoon/#/builders/35/builds/192/steps/7/logs/step7b

Cheers,

Richard



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

end of thread, other threads:[~2018-11-20 17:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 22:33 [PATCH] systemd: fix PN-container package splitting Adrian Freihofer
2018-11-20 17:39 ` Richard Purdie
2018-11-20 17:54   ` Richard Purdie

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.