From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::1]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ccCj5-0007ZY-LC for ptxdist@pengutronix.de; Fri, 10 Feb 2017 16:03:07 +0100 Received: from home (ipservice-092-218-106-017.092.218.pools.vodafone-ip.de [92.218.106.17]) by smtp.strato.de (RZmta 39.12 AUTH) with ESMTPSA id 208fe4t1AF36gGE (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Fri, 10 Feb 2017 16:03:06 +0100 (CET) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by home (Postfix) with ESMTP id 45EB31A0AE6 for ; Fri, 10 Feb 2017 16:03:06 +0100 (CET) in-reply-to: <20170116104000.57ra457cm3dqay5u@pengutronix.de> from: "Artur Wiebe" date: Fri, 10 Feb 2017 16:03:06 +0100 MIME-Version: 1.0 message-id: <12a9-589dd600-13-405ad380@161070632> Subject: Re: [ptxdist] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyBbUEFUQ0hd?= =?utf-8?q?__Journald_gateway_and_remote_support?= List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1016622070==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============1016622070== content-type: multipart/alternative; boundary="----=_=-_OpenGroupware_org_NGMime-4777-1486738986.164518-6------" ------=_=-_OpenGroupware_org_NGMime-4777-1486738986.164518-6------ content-type: text/plain; charset=utf-8 content-transfer-encoding: quoted-printable content-length: 6556 Hi Michael, the features are basically systemd-journal-gatewayd and systemd-journal= -remote. The package also provides /lib/systemd/system/systemd-journal-gatewayd.= socket and /lib/systemd/system/systemd-journal-remote.socket which are = just not enabled by default. While journal-gatewayd is meant to be run as a sevice, journal-remote c= an be used also from command-line, script or custom service. I use journal-remote in a custom service like this for example: ExecStart=3D/lib/systemd/systemd-journal-remote --output=3D/var/log/jou= rnal/remote/remote-mc.journal --getter=3D'/usr/bin/python3 -u -B /usr/s= bin/mc-log mc 5600' To make it work out of the box we could add options to enable the one o= r the other socket. I don't see a good way to better name this option or make it more featu= re-oriented. Artur -- Dipl. Ing. Artur Wiebe Software-Ingenieur Email: artur@4wiebe.de Telefon: +491632699840 Web: artur.4wiebe.de Quellenstra=C3=9Fe 49, 72124 Pliezhausen USt-IdNr: DE299286057 Am Montag, Januar 16, 2017 11:40 CET, Michael Olbrich schrieb: =C2=A0On Tue, Jan 10, 2017 at 02:05:24PM +0100, Artur Wiebe wrote: > Build systemd with libmicrohttpd support > > Signed-off-by: Artur Wiebe > --- > projectroot/etc/group | 4 +++- > projectroot/etc/passwd | 3 +++ > rules/systemd.in | 27 +++++++++++++++++++-------- > rules/systemd.make | 8 +++++++- > 4 files changed, 32 insertions(+), 10 deletions(-) > > diff --git a/projectroot/etc/group b/projectroot/etc/group > index 9ff570261..bee568357 100644 > --- a/projectroot/etc/group > +++ b/projectroot/etc/group > @@ -22,5 +22,7 @@ input:x:116: > mysql:x:117: > systemd-journal:x:201: > systemd-network:x:202: > -systemd-journal-remote:x:203: > +systemd-journal-gateway:x:206: > +systemd-journal-remote:x:207: > +systemd-journal-upload:x:208: Don't change an existing goup id. > nogroup:x:65534: > diff --git a/projectroot/etc/passwd b/projectroot/etc/passwd > index 29c85577a..b41d6e8a8 100644 > --- a/projectroot/etc/passwd > +++ b/projectroot/etc/passwd > @@ -9,5 +9,8 @@ systemd-network:x:202:202:systemd-network:/dev/null:/= bin/false > systemd-resolve:x:203:65534:systemd-resolve:/dev/null:/bin/false > systemd-timesync:x:204:65534:systemd-timesync:/dev/null:/bin/false > systemd-bus-proxy:x:205:65534:systemd-timesync:/dev/null:/bin/false Hmm, systemd-bus-proxy should be removed first. It's no longer used. I'= ll make a patch for that. > +systemd-journal-gateway:x:206:206:systemd-journal-gateway:/dev/null:= /bin/false > +systemd-journal-remote:x:207:207:systemd-journal-remote:/dev/null:/b= in/false > +systemd-journal-upload:x:208:208:systemd-journal-upload:/dev/null:/b= in/false > rpcuser:x:65533:65534:RPC user:/dev/null:/bin/false > nobody:x:65534:65534:Unprivileged Nobody:/dev/null:/bin/false > diff --git a/rules/systemd.in b/rules/systemd.in > index 86ee54534..ccce1f908 100644 > --- a/rules/systemd.in > +++ b/rules/systemd.in > @@ -21,6 +21,7 @@ menuconfig SYSTEMD > select MACHINE=5FID if RUNTIME > select XZ if SYSTEMD=5FXZ > select LZ4 if SYSTEMD=5FLZ4 > + select LIBMICROHTTPD if SYSTEMD=5FMICROHTTPD > select LIBSECCOMP if SYSTEMD=5FSECCOMP > select LIBSELINUX if GLOBAL=5FSELINUX > select IPTABLES if SYSTEMD=5FIPMASQUERADE > @@ -58,14 +59,6 @@ config SYSTEMD=5FVCONSOLE > bool > prompt "virtual console support" > > -config SYSTEMD=5FXZ > - bool > - prompt "XZ compressed journal support" > - > -config SYSTEMD=5FLZ4 > - bool > - prompt "LZ4 compressed journal support" > - > config SYSTEMD=5FDISABLE=5FRANDOM=5FSEED > bool > prompt "disable random seed services" > @@ -113,5 +106,23 @@ config SYSTEMD=5FSECCOMP > Enable this if you want to use SystemCallFilter in service files > > > +menu "journald " > + > +config SYSTEMD=5FXZ > + bool > + prompt "XZ compressed journal support" > + > +config SYSTEMD=5FLZ4 > + bool > + prompt "LZ4 compressed journal support" > + > +config SYSTEMD=5FMICROHTTPD I'd like to see a more feature oriented option here. Both the name and = how it is used. I've never used this myself but from what I can tell, this = is used to send or receive a journal in push or pull mode. I'd like to see= options, that work out of the box without extra rules to actually make = it work. You don't need to implement all use-cases. Just start with your use-cas= e. We can add others as needed. Michael > + bool > + prompt "Journald gateway and remote support" > + help > + Build systemd with libmicrohttpd support > + > +endmenu > + > endif > > diff --git a/rules/systemd.make b/rules/systemd.make > index f78de72d4..525097525 100644 > --- a/rules/systemd.make > +++ b/rules/systemd.make > @@ -89,7 +89,7 @@ SYSTEMD=5FCONF=5FOPT :=3D \ > --disable-libcryptsetup \ > --disable-qrencode \ > --disable-gnutls \ > - --disable-microhttpd \ > + --$(call ptx/endis,PTXCONF=5FSYSTEMD=5FMICROHTTPD)-microhttpd \ > --disable-libcurl \ > --disable-libidn \ > --$(call ptx/endis,PTXCONF=5FSYSTEMD=5FIPMASQUERADE)-libiptc \ > @@ -187,6 +187,8 @@ SYSTEMD=5FHELPER :=3D \ > systemd-hostnamed \ > systemd-initctl \ > systemd-journald \ > + $(call ptx/ifdef, PTXCONF=5FSYSTEMD=5FMICROHTTPD,systemd-journal-ga= tewayd,) \ > + $(call ptx/ifdef, PTXCONF=5FSYSTEMD=5FMICROHTTPD,systemd-journal-re= mote,) \ > $(call ptx/ifdef, PTXCONF=5FSYSTEMD=5FLOCALES,systemd-localed,) \ > $(call ptx/ifdef, PTXCONF=5FSYSTEMD=5FLOGIND,systemd-logind,) \ > systemd-modules-load \ > @@ -312,6 +314,10 @@ ifdef PTXCONF=5FSYSTEMD=5FLOCALES > @$(call install=5Fcopy, systemd, 0, 0, 0644, -, /usr/share/systemd/kb= d-model-map) > endif > > +ifdef PTXCONF=5FSYSTEMD=5FMICROHTTPD > + @$(call install=5Falternative, systemd, 0, 0, 0644, /etc/systemd/jo= urnal-remote.conf) > +endif > + > @$(call install=5Fcopy, systemd, 0, 0, 0644, -, /lib/udev/rules.d/99-= systemd.rules) > ifdef PTXCONF=5FSYSTEMD=5FNETWORK > @$(call install=5Ftree, systemd, 0, 0, -, /lib/systemd/network) > -- > 2.11.0 > > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= > ptxdist mailing list > ptxdist@pengutronix.de -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |= Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F ptxdist mailing list ptxdist@pengutronix.de =C2=A0 ------=_=-_OpenGroupware_org_NGMime-4777-1486738986.164518-6------ content-type: text/html; charset=utf-8 content-transfer-encoding: quoted-printable content-length: 8644 Hi Michael,

the features are basically systemd-journal= -gatewayd and systemd-journal-remote.
The package also provides /l= ib/systemd/system/systemd-journal-gatewayd.socket and /lib/systemd/syst= em/systemd-journal-remote.socket which are just not enabled by default.=
While journal-gatewayd is meant to be run as a sevice, journal-re= mote can be used also from command-line, script or custom service.

I use journal-remote in a custom service like this for example:<= br />ExecStart=3D/lib/systemd/systemd-journal-remote --output=3D/var/lo= g/journal/remote/remote-mc.journal --getter=3D'/usr/bin/python3 -u = -B /usr/sbin/mc-log mc 5600'

To make it work out of the = box we could add options to enable the one or the other socket.
I don't see a good way to better name this option or make it mo= re feature-oriented.

Artur

--
Dipl. Ing. Artur Wiebe
Software-Ingenieur

Email: a= rtur@4wiebe.de
Telefon: +491632699840
Web: artur.4wiebe.de
Quellenstraße 49, 7= 2124 = Pliezhausen
USt-IdNr: DE299286057


Am = Montag, Januar 16, 2017 11:40 CET, Michael Olbrich <m.olbrich@pengut= ronix.de> schrieb:
 
On Tue, Jan 10, 2017 at 02:= 05:24PM +0100, Artur Wiebe wrote:
> Build systemd with libmicro= httpd support
>
> Signed-off-by: Artur Wiebe <artur@= 4wiebe.de>
> ---
> projectroot/etc/group | 4 +++-> projectroot/etc/passwd | 3 +++
> rules/systemd.in | 27 = +++++++++++++++++++--------
> rules/systemd.make | 8 +++++++-> 4 files changed, 32 insertions(+), 10 deletions(-)
>> diff --git a/projectroot/etc/group b/projectroot/etc/group
> index 9ff570261..bee568357 100644
> --- a/projectroot/et= c/group
> +++ b/projectroot/etc/group
> @@ -22,5 +22,7 = @@ input:x:116:
> mysql:x:117:
> systemd-journal:x:201:=
> systemd-network:x:202:
> -systemd-journal-remote:x:2= 03:
> +systemd-journal-gateway:x:206:
> +systemd-journa= l-remote:x:207:
> +systemd-journal-upload:x:208:

Don= 't change an existing goup id.

> nogroup:x:65534:
> diff --git a/projectroot/etc/passwd b/projectroot/etc/passwd
> index 29c85577a..b41d6e8a8 100644
> --- a/projectroot/et= c/passwd
> +++ b/projectroot/etc/passwd
> @@ -9,5 +9,8 = @@ systemd-network:x:202:202:systemd-network:/dev/null:/bin/false
= > systemd-resolve:x:203:65534:systemd-resolve:/dev/null:/bin/false> systemd-timesync:x:204:65534:systemd-timesync:/dev/null:/bin/f= alse
> systemd-bus-proxy:x:205:65534:systemd-timesync:/dev/null= :/bin/false

Hmm, systemd-bus-proxy should be removed first. = It's no longer used. I'll
make a patch for that.

> +systemd-journal-gateway:x:206:206:systemd-journal-gateway:/dev/= null:/bin/false
> +systemd-journal-remote:x:207:207:systemd-jou= rnal-remote:/dev/null:/bin/false
> +systemd-journal-upload:x:20= 8:208:systemd-journal-upload:/dev/null:/bin/false
> rpcuser:x:6= 5533:65534:RPC user:/dev/null:/bin/false
> nobody:x:65534:65534= :Unprivileged Nobody:/dev/null:/bin/false
> diff --git a/rules/= systemd.in b/rules/systemd.in
> index 86ee54534..ccce1f908 1006= 44
> --- a/rules/systemd.in
> +++ b/rules/systemd.in> @@ -21,6 +21,7 @@ menuconfig SYSTEMD
> select MACHINE=5F= ID if RUNTIME
> select XZ if SYSTEMD=5FXZ
> select LZ4 = if SYSTEMD=5FLZ4
> + select LIBMICROHTTPD if SYSTEMD=5FMICROHTT= PD
> select LIBSECCOMP if SYSTEMD=5FSECCOMP
> select LI= BSELINUX if GLOBAL=5FSELINUX
> select IPTABLES if SYSTEMD=5FIPM= ASQUERADE
> @@ -58,14 +59,6 @@ config SYSTEMD=5FVCONSOLE
&= gt; bool
> prompt "virtual console support"
>=
> -config SYSTEMD=5FXZ
> - bool
> - prompt &qu= ot;XZ compressed journal support"
> -
> -config SY= STEMD=5FLZ4
> - bool
> - prompt "LZ4 compressed jo= urnal support"
> -
> config SYSTEMD=5FDISABLE=5FRA= NDOM=5FSEED
> bool
> prompt "disable random seed s= ervices"
> @@ -113,5 +106,23 @@ config SYSTEMD=5FSECCOMP> Enable this if you want to use SystemCallFilter in service fil= es
>
>
> +menu "journald "
> = +
> +config SYSTEMD=5FXZ
> + bool
> + prompt &q= uot;XZ compressed journal support"
> +
> +config S= YSTEMD=5FLZ4
> + bool
> + prompt "LZ4 compressed j= ournal support"
> +
> +config SYSTEMD=5FMICROHTTPD=

I'd like to see a more feature oriented option here. Bo= th the name and how
it is used. I've never used this myself bu= t from what I can tell, this is
used to send or receive a journal = in push or pull mode. I'd like to see
options, that work out o= f the box without extra rules to actually make it
work.
You d= on't need to implement all use-cases. Just start with your use-case= .
We can add others as needed.

Michael


> + bool
> + prompt "Journald gateway and remote suppo= rt"
> + help
> + Build systemd with libmicrohttpd = support
> +
> +endmenu
> +
> endif
>
> diff --git a/rules/systemd.make b/rules/systemd.make> index f78de72d4..525097525 100644
> --- a/rules/systemd= .make
> +++ b/rules/systemd.make
> @@ -89,7 +89,7 @@ SY= STEMD=5FCONF=5FOPT :=3D \
> --disable-libcryptsetup \
>= --disable-qrencode \
> --disable-gnutls \
> - --disabl= e-microhttpd \
> + --$(call ptx/endis,PTXCONF=5FSYSTEMD=5FMICRO= HTTPD)-microhttpd \
> --disable-libcurl \
> --disable-l= ibidn \
> --$(call ptx/endis,PTXCONF=5FSYSTEMD=5FIPMASQUERADE)-= libiptc \
> @@ -187,6 +187,8 @@ SYSTEMD=5FHELPER :=3D \
&g= t; systemd-hostnamed \
> systemd-initctl \
> systemd-jo= urnald \
> + $(call ptx/ifdef, PTXCONF=5FSYSTEMD=5FMICROHTTPD,s= ystemd-journal-gatewayd,) \
> + $(call ptx/ifdef, PTXCONF=5FSYS= TEMD=5FMICROHTTPD,systemd-journal-remote,) \
> $(call ptx/ifdef= , PTXCONF=5FSYSTEMD=5FLOCALES,systemd-localed,) \
> $(call ptx/= ifdef, PTXCONF=5FSYSTEMD=5FLOGIND,systemd-logind,) \
> systemd-= modules-load \
> @@ -312,6 +314,10 @@ ifdef PTXCONF=5FSYSTEMD=5F= LOCALES
> @$(call install=5Fcopy, systemd, 0, 0, 0644, -, /usr/= share/systemd/kbd-model-map)
> endif
>
> +ifdef= PTXCONF=5FSYSTEMD=5FMICROHTTPD
> + @$(call install=5Falternati= ve, systemd, 0, 0, 0644, /etc/systemd/journal-remote.conf)
> +e= ndif
> +
> @$(call install=5Fcopy, systemd, 0, 0, 0644,= -, /lib/udev/rules.d/99-systemd.rules)
> ifdef PTXCONF=5FSYSTE= MD=5FNETWORK
> @$(call install=5Ftree, systemd, 0, 0, -, /lib/s= ystemd/network)
> --
> 2.11.0
>
>
= > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F
> ptxdist mailing list
> ptxdist@pengutronix.de

--
Pengutronix e.K. | |
Industrial Linux Solutions | = http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Ge= rmany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 268= 6 | Fax: +49-5121-206917-5555 |

=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
ptxdist mailing list
= ptxdist@pengutronix.de

  ------=_=-_OpenGroupware_org_NGMime-4777-1486738986.164518-6-------- --===============1016622070== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============1016622070==--