All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
@ 2019-06-13  3:05 Yi Zheng
  2019-06-13 15:35 ` Yann E. MORIN
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Yi Zheng @ 2019-06-13  3:05 UTC (permalink / raw)
  To: buildroot

    systemd-journal-remote was added in systemd v211, so add a new option
    to enable or disable it.

    Signed-off-by: Yi Zheng <goodmenzy@gmail.com>
---
 package/systemd/Config.in  | 15 +++++++++++++++
 package/systemd/systemd.mk |  4 ++++
 2 files changed, 19 insertions(+)

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 92ffc7cc5a..3ec529b214 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -122,6 +122,21 @@ config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY

          http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html

+config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
+       bool "enable systemd-journal-remote"
+       default n
+       depends on BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
+       select BR2_PACKAGE_LIBCURL
+       help
+         systemd-journal-remote is a command to receive serialized
+         journal events and store them to journal files. Input
+         streams are in the Journal Export Format[1], i.e. like the
+         output from journalctl --output=export. For transport over
+         the network, this serialized stream is usually carried over
+         an HTTPS connection.
+
+         https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html
+
 config BR2_PACKAGE_SYSTEMD_BACKLIGHT
        bool "enable backlight support"
        help
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index edc4a9ecc1..b7e36d9eb9 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -178,6 +178,10 @@ else
 SYSTEMD_CONF_OPTS += -Dmicrohttpd=false -Dqrencode=false
 endif

+ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y)
+SYSTEMD_CONF_OPTS += -Dremote=true
+endif
+
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 SYSTEMD_DEPENDENCIES += libselinux
 SYSTEMD_CONF_OPTS += -Dselinux=true
--
2.22.0

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-06-13  3:05 [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote Yi Zheng
@ 2019-06-13 15:35 ` Yann E. MORIN
  2019-06-17 19:40 ` Thomas Petazzoni
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2019-06-13 15:35 UTC (permalink / raw)
  To: buildroot

Yi, All,

Thanks for this new iteration. :-)

I still have a few comments, see below.

On 2019-06-13 11:05 +0800, Yi Zheng spake thusly:
>     systemd-journal-remote was added in systemd v211, so add a new option
>     to enable or disable it.
> 
>     Signed-off-by: Yi Zheng <goodmenzy@gmail.com>

These lines should not be indented; I did indent them in my previous
reply just to make them stand out. "git send-email" would not have
indented those lines, if you had been able to use it (alas, you had
to use the gmail web UI to pass through the GFW).

We have other people from RPC, that seem to manage sending patches that
are correctly formatted. I wonder how they manage...

> ---
>  package/systemd/Config.in  | 15 +++++++++++++++
>  package/systemd/systemd.mk |  4 ++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
> index 92ffc7cc5a..3ec529b214 100644
> --- a/package/systemd/Config.in
> +++ b/package/systemd/Config.in
> @@ -122,6 +122,21 @@ config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
> 
>           http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
> 
> +config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
> +       bool "enable systemd-journal-remote"
> +       default n
> +       depends on BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
> +       select BR2_PACKAGE_LIBCURL
> +       help

Because you did not send this with git send-mail, the TAB indentation
has been replaced by spaces.

> +         systemd-journal-remote is a command to receive serialized
> +         journal events and store them to journal files. Input
> +         streams are in the Journal Export Format[1], i.e. like the
> +         output from journalctl --output=export. For transport over
> +         the network, this serialized stream is usually carried over
> +         an HTTPS connection.
> +
> +         https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html
> +
>  config BR2_PACKAGE_SYSTEMD_BACKLIGHT
>         bool "enable backlight support"
>         help
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index edc4a9ecc1..b7e36d9eb9 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -178,6 +178,10 @@ else
>  SYSTEMD_CONF_OPTS += -Dmicrohttpd=false -Dqrencode=false
>  endif
> 
> +ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y)
> +SYSTEMD_CONF_OPTS += -Dremote=true
> +endif

You seemed to have missed in my previous review, that we also want an
explicit disable when the option is not set; see for example how it is
done for BR2_PACKAGE_SYSTEMD_HWDB.

Regards,
Yann E. MORIN.

> +
>  ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
>  SYSTEMD_DEPENDENCIES += libselinux
>  SYSTEMD_CONF_OPTS += -Dselinux=true
> --
> 2.22.0

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-06-13  3:05 [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote Yi Zheng
  2019-06-13 15:35 ` Yann E. MORIN
@ 2019-06-17 19:40 ` Thomas Petazzoni
  2019-06-18  7:05   ` Yi Zheng
  2019-11-27 20:46 ` Thomas Petazzoni
  2020-10-13 15:16 ` Michael Nosthoff
  3 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2019-06-17 19:40 UTC (permalink / raw)
  To: buildroot

Hello Yi,

On Thu, 13 Jun 2019 11:05:27 +0800
Yi Zheng <goodmenzy@gmail.com> wrote:

>     systemd-journal-remote was added in systemd v211, so add a new option
>     to enable or disable it.
> 
>     Signed-off-by: Yi Zheng <goodmenzy@gmail.com>
> ---
>  package/systemd/Config.in  | 15 +++++++++++++++
>  package/systemd/systemd.mk |  4 ++++
>  2 files changed, 19 insertions(+)

I have fixed the various issues pointed by Yann (formatting issues in
the commit log and Config.in file, missing "else" condition to
explicitly disable the option), and applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-06-17 19:40 ` Thomas Petazzoni
@ 2019-06-18  7:05   ` Yi Zheng
  0 siblings, 0 replies; 15+ messages in thread
From: Yi Zheng @ 2019-06-18  7:05 UTC (permalink / raw)
  To: buildroot

Thanks a lot!
It is very hard for me to use gmail.
VPS linkage is not stable in China.

Thanks for your kindness to fixup that patch to fulfill the coding standards.

Thomas Petazzoni <thomas.petazzoni@bootlin.com> ?2019?6?18??? ??3:40???
>
> Hello Yi,
>
> On Thu, 13 Jun 2019 11:05:27 +0800
> Yi Zheng <goodmenzy@gmail.com> wrote:
>
> >     systemd-journal-remote was added in systemd v211, so add a new option
> >     to enable or disable it.
> >
> >     Signed-off-by: Yi Zheng <goodmenzy@gmail.com>
> > ---
> >  package/systemd/Config.in  | 15 +++++++++++++++
> >  package/systemd/systemd.mk |  4 ++++
> >  2 files changed, 19 insertions(+)
>
> I have fixed the various issues pointed by Yann (formatting issues in
> the commit log and Config.in file, missing "else" condition to
> explicitly disable the option), and applied to master. Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-06-13  3:05 [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote Yi Zheng
  2019-06-13 15:35 ` Yann E. MORIN
  2019-06-17 19:40 ` Thomas Petazzoni
@ 2019-11-27 20:46 ` Thomas Petazzoni
  2019-11-28  8:08   ` Jérémy ROSEN
  2020-10-13 15:16 ` Michael Nosthoff
  3 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2019-11-27 20:46 UTC (permalink / raw)
  To: buildroot

Hello,

+Jeremy Rosen in Cc, for the systemd expertise.

On Thu, 13 Jun 2019 11:05:27 +0800
Yi Zheng <goodmenzy@gmail.com> wrote:

>     systemd-journal-remote was added in systemd v211, so add a new option
>     to enable or disable it.
> 
>     Signed-off-by: Yi Zheng <goodmenzy@gmail.com>

Unfortunately, this commit seems to break things for some users. We
have a bug report at https://bugs.busybox.net/show_bug.cgi?id=12301.
Could you have a look ?

J?r?my, what do you think ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-11-27 20:46 ` Thomas Petazzoni
@ 2019-11-28  8:08   ` Jérémy ROSEN
  2019-11-28  8:27     ` Thomas Petazzoni
  2019-11-28  9:33     ` Yi Zheng
  0 siblings, 2 replies; 15+ messages in thread
From: Jérémy ROSEN @ 2019-11-28  8:08 UTC (permalink / raw)
  To: buildroot

Hey all,
Ok, as usuall some background knowledge

systemd provides three binaries to deal with sending journal data over the
network

* systemd-journald-gateway : a tiny HTTP server that provides the logs
* systemd-journald-upload : a process to run periodically to push the logs
to a remote HTTP server
* systemd-journald-remote : aprocess to run on the remorse computer (not on
the target) to receive data and/or to fetch data from the target

All three options are selected together with -Dremote=true (which is the
default). It would be nice to be able to select them individually, but
upstream does not provide that option.

gatewayd is a bit more tricky because it will detect if libmicrohttpd is
available and only builds if it is.

So, as a fix I would make BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY depend
on BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
Also, fix default values to match previous behaviour

Cheers
Jeremy


Le mer. 27 nov. 2019 ? 21:46, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :

> Hello,
>
> +Jeremy Rosen in Cc, for the systemd expertise.
>
> On Thu, 13 Jun 2019 11:05:27 +0800
> Yi Zheng <goodmenzy@gmail.com> wrote:
>
> >     systemd-journal-remote was added in systemd v211, so add a new option
> >     to enable or disable it.
> >
> >     Signed-off-by: Yi Zheng <goodmenzy@gmail.com>
>
> Unfortunately, this commit seems to break things for some users. We
> have a bug report at https://bugs.busybox.net/show_bug.cgi?id=12301.
> Could you have a look ?
>
> J?r?my, what do you think ?
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>


-- 
[image: SMILE]  <http://www.smile.eu/>

20 rue des Jardins
92600 Asni?res-sur-Seine
*J?r?my ROSEN*
Architecte technique

[image: email] jeremy.rosen at smile.fr
[image: phone]  +33 6 88 25 87 42
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>

[image: D?couvrez l?univers Smile, rendez-vous sur smile.eu]
<https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191128/ff090d9d/attachment.html>

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-11-28  8:08   ` Jérémy ROSEN
@ 2019-11-28  8:27     ` Thomas Petazzoni
  2019-11-28 15:15       ` Jérémy ROSEN
  2019-11-28  9:33     ` Yi Zheng
  1 sibling, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2019-11-28  8:27 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 28 Nov 2019 09:08:19 +0100
J?r?my ROSEN <jeremy.rosen@smile.fr> wrote:

> Ok, as usuall some background knowledge
> 
> systemd provides three binaries to deal with sending journal data over the
> network
> 
> * systemd-journald-gateway : a tiny HTTP server that provides the logs
> * systemd-journald-upload : a process to run periodically to push the logs
> to a remote HTTP server
> * systemd-journald-remote : aprocess to run on the remorse computer (not on
> the target) to receive data and/or to fetch data from the target
> 
> All three options are selected together with -Dremote=true (which is the
> default). It would be nice to be able to select them individually, but
> upstream does not provide that option.
> 
> gatewayd is a bit more tricky because it will detect if libmicrohttpd is
> available and only builds if it is.
> 
> So, as a fix I would make BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY depend
> on BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
> Also, fix default values to match previous behaviour

But if all of gateway, upload and remote are always built together when
-Dremote=true, what is the point of having fine-grained options for
each of gateway, upload and remote ? Just to install/enable (or not)
the correspond service file ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-11-28  8:08   ` Jérémy ROSEN
  2019-11-28  8:27     ` Thomas Petazzoni
@ 2019-11-28  9:33     ` Yi Zheng
  1 sibling, 0 replies; 15+ messages in thread
From: Yi Zheng @ 2019-11-28  9:33 UTC (permalink / raw)
  To: buildroot

Hi,

  My last mail should be withdrawn.  Your info is important. The dependence
seems tricky.....

J?r?my ROSEN <jeremy.rosen@smile.fr> ?2019?11?28??? ??4:08???

> Hey all,
> Ok, as usuall some background knowledge
>
> systemd provides three binaries to deal with sending journal data over the
> network
>
> * systemd-journald-gateway : a tiny HTTP server that provides the logs
> * systemd-journald-upload : a process to run periodically to push the logs
> to a remote HTTP server
> * systemd-journald-remote : aprocess to run on the remorse computer (not
> on the target) to receive data and/or to fetch data from the target
>
> All three options are selected together with -Dremote=true (which is the
> default). It would be nice to be able to select them individually, but
> upstream does not provide that option.
>
> gatewayd is a bit more tricky because it will detect if libmicrohttpd is
> available and only builds if it is.
>
> So, as a fix I would make BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY depend
> on BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
> Also, fix default values to match previous behaviour
>
> Cheers
> Jeremy
>
>
> Le mer. 27 nov. 2019 ? 21:46, Thomas Petazzoni <
> thomas.petazzoni at bootlin.com> a ?crit :
>
>> Hello,
>>
>> +Jeremy Rosen in Cc, for the systemd expertise.
>>
>> On Thu, 13 Jun 2019 11:05:27 +0800
>> Yi Zheng <goodmenzy@gmail.com> wrote:
>>
>> >     systemd-journal-remote was added in systemd v211, so add a new
>> option
>> >     to enable or disable it.
>> >
>> >     Signed-off-by: Yi Zheng <goodmenzy@gmail.com>
>>
>> Unfortunately, this commit seems to break things for some users. We
>> have a bug report at https://bugs.busybox.net/show_bug.cgi?id=12301.
>> Could you have a look ?
>>
>> J?r?my, what do you think ?
>>
>> Thanks,
>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
>>
>
>
> --
> [image: SMILE]  <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asni?res-sur-Seine
> *J?r?my ROSEN*
> Architecte technique
>
> [image: email] jeremy.rosen at smile.fr
> [image: phone]  +33 6 88 25 87 42
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: D?couvrez l?univers Smile, rendez-vous sur smile.eu]
> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191128/12b81f4a/attachment.html>

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-11-28  8:27     ` Thomas Petazzoni
@ 2019-11-28 15:15       ` Jérémy ROSEN
  0 siblings, 0 replies; 15+ messages in thread
From: Jérémy ROSEN @ 2019-11-28 15:15 UTC (permalink / raw)
  To: buildroot

Le jeu. 28 nov. 2019 ? 09:28, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :

> Hello,
>
> On Thu, 28 Nov 2019 09:08:19 +0100
> J?r?my ROSEN <jeremy.rosen@smile.fr> wrote:
>
> > Ok, as usuall some background knowledge
> >
> > systemd provides three binaries to deal with sending journal data over
> the
> > network
> >
> > * systemd-journald-gateway : a tiny HTTP server that provides the logs
> > * systemd-journald-upload : a process to run periodically to push the
> logs
> > to a remote HTTP server
> > * systemd-journald-remote : aprocess to run on the remorse computer (not
> on
> > the target) to receive data and/or to fetch data from the target
> >
> > All three options are selected together with -Dremote=true (which is the
> > default). It would be nice to be able to select them individually, but
> > upstream does not provide that option.
> >
> > gatewayd is a bit more tricky because it will detect if libmicrohttpd is
> > available and only builds if it is.
> >
> > So, as a fix I would make BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY depend
> > on BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
> > Also, fix default values to match previous behaviour
>
> But if all of gateway, upload and remote are always built together when
> -Dremote=true, what is the point of having fine-grained options for
> each of gateway, upload and remote ? Just to install/enable (or not)
> the correspond service file ?
>
> The usual "smaller for the embedded space" argument...
I kinda agree that having it optional is a bit overkill (except maybe for
gateway, because it pulls in libhttpd)

It's a choice we have to make.


> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>


-- 
[image: SMILE]  <http://www.smile.eu/>

20 rue des Jardins
92600 Asni?res-sur-Seine
*J?r?my ROSEN*
Architecte technique

[image: email] jeremy.rosen at smile.fr
[image: phone]  +33 6 88 25 87 42
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>

[image: D?couvrez l?univers Smile, rendez-vous sur smile.eu]
<https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20191128/ae7f3f43/attachment.html>

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2019-06-13  3:05 [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote Yi Zheng
                   ` (2 preceding siblings ...)
  2019-11-27 20:46 ` Thomas Petazzoni
@ 2020-10-13 15:16 ` Michael Nosthoff
  2020-10-13 15:35   ` Thomas Petazzoni
  3 siblings, 1 reply; 15+ messages in thread
From: Michael Nosthoff @ 2020-10-13 15:16 UTC (permalink / raw)
  To: buildroot

Hi all,

sorry, I didn't have the original mail thread so I'm responding to the
initial patch from patchwork.

Since this issue is still unresolved I did have a second look and found
that the decision tree that systemd does for this options is even
trickier than everyone assumed.


As Jeremy already explained there are three binaries that depend on this
-Dremote switch.

What has been slighty incorrect is that not only
systemd-journal-gatewayd but also systemd-journal-remoted depend on
libmicrohttpd see [0].
For as systemd-journal-upload depends on libcurl [1].


Now for the really strange part:

systemd-journald-gateway and systemd-journald-remote are always built
together. There is no switch.
But there is some more logic to the -remote flag besides true and false.
If you don't specify its value is 'auto'.
And this is where [2] comes into play. It depends on the availability of
libcurl and/or libmicrohttp which of the 3 binaries is built.

-remote=auto && libcurl=y && libmicrohttpd=n? builds systemd-journal-upload
-remote=auto && libcurl=n && libmicrohttpd=y? builds
systemd-journal-gatewayd and systemd-journal-remoted

But if you specify -remote=true you are REQUIRED to have libcurl AND
libmicrohttp and all three binaries are build.

So this is pretty messy and I can think two ways of getting this at
least a bit more consistent.


The all or nothing solution could be something like this:

|config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE bool "journal events remote
tools" select BR2_PACKAGE_LIBMICROHTTPD |||select BR2_PACKAGE_LIBCURL| help installs systemd-journal-gatewayd, |||systemd-journal-remote| and |||systemd-journal-upload|
http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
|||https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html
https://www.freedesktop.org/software/systemd/man/systemd-journal-upload.html||

which would set -Dremote=true -Dmicrohttpd=true -Dlibcurl=true

The other solution would be omitting the -remote= flag all together (defaulting it to auto) and steering the tool compilation via depending on -Dlibcurl=true and/or -Dlibmicrohttpd=true.
This would give the possibility to build systemd-journal-gatewayd and systemd-journal-remote without systemd-journal-upload and vice versa.
This would actually be the way it was before applying this patch but the descriptions were at least a bit misleading.

Also I'm not sure if the libcurl dependency might be needed for something else in systemd (at least importd also needs it).


I'm tending to the first (simpler) solution. Which is actually how it is
currently as you need to enable both Options now to get all three tools.
Else you get none.

I hope that wasn't to confusing. What do you think?

Regards,
Michael


[0] https://github.com/systemd/systemd/blob/master/meson.build#L2653
[1] https://github.com/systemd/systemd/blob/master/meson.build#L2635
[2] https://github.com/systemd/systemd/blob/master/meson.build#L1422

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2020-10-13 15:16 ` Michael Nosthoff
@ 2020-10-13 15:35   ` Thomas Petazzoni
  2020-10-13 15:40     ` Michael Nosthoff
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2020-10-13 15:35 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 13 Oct 2020 17:16:48 +0200
Michael Nosthoff via buildroot <buildroot@busybox.net> wrote:

> systemd-journald-gateway and systemd-journald-remote are always built
> together. There is no switch.
> But there is some more logic to the -remote flag besides true and false.
> If you don't specify its value is 'auto'.
> And this is where [2] comes into play. It depends on the availability of
> libcurl and/or libmicrohttp which of the 3 binaries is built.
> 
> -remote=auto && libcurl=y && libmicrohttpd=n? builds systemd-journal-upload
> -remote=auto && libcurl=n && libmicrohttpd=y? builds
> systemd-journal-gatewayd and systemd-journal-remoted
> 
> But if you specify -remote=true you are REQUIRED to have libcurl AND
> libmicrohttp and all three binaries are build.
> 
> So this is pretty messy and I can think two ways of getting this at
> least a bit more consistent.
> 
> 
> The all or nothing solution could be something like this:
> 
> |config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE bool "journal events remote
> tools" select BR2_PACKAGE_LIBMICROHTTPD |||select BR2_PACKAGE_LIBCURL| help installs systemd-journal-gatewayd, |||systemd-journal-remote| and |||systemd-journal-upload|
> http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
> |||https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html
> https://www.freedesktop.org/software/systemd/man/systemd-journal-upload.html||
> 
> which would set -Dremote=true -Dmicrohttpd=true -Dlibcurl=true
> 
> The other solution would be omitting the -remote= flag all together (defaulting it to auto) and steering the tool compilation via depending on -Dlibcurl=true and/or -Dlibmicrohttpd=true.
> This would give the possibility to build systemd-journal-gatewayd and systemd-journal-remote without systemd-journal-upload and vice versa.
> This would actually be the way it was before applying this patch but the descriptions were at least a bit misleading.
> 
> Also I'm not sure if the libcurl dependency might be needed for something else in systemd (at least importd also needs it).
> 
> 
> I'm tending to the first (simpler) solution. Which is actually how it is
> currently as you need to enable both Options now to get all three tools.
> Else you get none.
> 
> I hope that wasn't to confusing. What do you think?

I agree the first option you're proposing looks simpler. How big are
each of those tools? Unless one is really really big and unnecessary in
some scenarios, I think your proposed option is straightforward and
would solve the problem.

Thanks for the investigation!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2020-10-13 15:35   ` Thomas Petazzoni
@ 2020-10-13 15:40     ` Michael Nosthoff
  2020-10-13 15:49       ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Nosthoff @ 2020-10-13 15:40 UTC (permalink / raw)
  To: buildroot

Hi Thomas,
>> I hope that wasn't to confusing. What do you think?
> 
> I agree the first option you're proposing looks simpler. How big are
> each of those tools? Unless one is really really big and unnecessary in
> some scenarios, I think your proposed option is straightforward and
> would solve the problem.
> 

# ls -la /usr/lib/systemd/systemd-journal-*
-rwxr-xr-x 1 root root  25964 Oct 13 14:57
/usr/lib/systemd/systemd-journal-gatewayd
-rwxr-xr-x 1 root root  46508 Oct 13 14:57
/usr/lib/systemd/systemd-journal-remote
-rwxr-xr-x 1 root root  34144 Oct 13 14:57
/usr/lib/systemd/systemd-journal-upload


So I would write this up in a patch and submit it. Trickiest part will
be the description I think.


Regards,
Michael

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2020-10-13 15:40     ` Michael Nosthoff
@ 2020-10-13 15:49       ` Thomas Petazzoni
  2020-10-13 16:28         ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2020-10-13 15:49 UTC (permalink / raw)
  To: buildroot

On Tue, 13 Oct 2020 17:40:19 +0200
Michael Nosthoff <buildroot@heine.tech> wrote:

> # ls -la /usr/lib/systemd/systemd-journal-*
> -rwxr-xr-x 1 root root  25964 Oct 13 14:57
> /usr/lib/systemd/systemd-journal-gatewayd
> -rwxr-xr-x 1 root root  46508 Oct 13 14:57
> /usr/lib/systemd/systemd-journal-remote
> -rwxr-xr-x 1 root root  34144 Oct 13 14:57
> /usr/lib/systemd/systemd-journal-upload

In the context of systemd, these sizes are definitely in the noise
compared to everything else. So I'm fine with a single option that
would enable all 3 tools in one go.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2020-10-13 15:49       ` Thomas Petazzoni
@ 2020-10-13 16:28         ` Yann E. MORIN
  2020-10-13 17:03           ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2020-10-13 16:28 UTC (permalink / raw)
  To: buildroot

Michael, Thomas, All,

On 2020-10-13 17:49 +0200, Thomas Petazzoni spake thusly:
> On Tue, 13 Oct 2020 17:40:19 +0200
> Michael Nosthoff <buildroot@heine.tech> wrote:
> > # ls -la /usr/lib/systemd/systemd-journal-*
> > -rwxr-xr-x 1 root root  25964 Oct 13 14:57
> > /usr/lib/systemd/systemd-journal-gatewayd
> > -rwxr-xr-x 1 root root  46508 Oct 13 14:57
> > /usr/lib/systemd/systemd-journal-remote
> > -rwxr-xr-x 1 root root  34144 Oct 13 14:57
> > /usr/lib/systemd/systemd-journal-upload
> 
> In the context of systemd, these sizes are definitely in the noise
> compared to everything else. So I'm fine with a single option that
> would enable all 3 tools in one go.

10% in-line with that.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote
  2020-10-13 16:28         ` Yann E. MORIN
@ 2020-10-13 17:03           ` Yann E. MORIN
  0 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2020-10-13 17:03 UTC (permalink / raw)
  To: buildroot

Michael, Thomas, All,

On 2020-10-13 18:28 +0200, Yann E. MORIN spake thusly:
> On 2020-10-13 17:49 +0200, Thomas Petazzoni spake thusly:
> > In the context of systemd, these sizes are definitely in the noise
> > compared to everything else. So I'm fine with a single option that
> > would enable all 3 tools in one go.
> 10% in-line with that.

[HW]ell, I meant: 100 % (I don't know what 10 % would amount to, though).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2020-10-13 17:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13  3:05 [Buildroot] [PATCH] systemd: add option to enable systemd-journal-remote Yi Zheng
2019-06-13 15:35 ` Yann E. MORIN
2019-06-17 19:40 ` Thomas Petazzoni
2019-06-18  7:05   ` Yi Zheng
2019-11-27 20:46 ` Thomas Petazzoni
2019-11-28  8:08   ` Jérémy ROSEN
2019-11-28  8:27     ` Thomas Petazzoni
2019-11-28 15:15       ` Jérémy ROSEN
2019-11-28  9:33     ` Yi Zheng
2020-10-13 15:16 ` Michael Nosthoff
2020-10-13 15:35   ` Thomas Petazzoni
2020-10-13 15:40     ` Michael Nosthoff
2020-10-13 15:49       ` Thomas Petazzoni
2020-10-13 16:28         ` Yann E. MORIN
2020-10-13 17:03           ` Yann E. MORIN

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.