public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
       [not found] <1517906901-30146-1-git-send-email-erik.kapfer@ipfire.org>
@ 2018-04-08 17:47 ` ummeegge
  2018-04-09 17:43   ` Peter Müller
  0 siblings, 1 reply; 12+ messages in thread
From: ummeegge @ 2018-04-08 17:47 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Hi all,
after some testing rounds in this topic am currently arrived at a more
simple configuration (without GnuTLS, Kerberos, ...) which works for me
without problems also with the already integrated config.dat WUI
extension for TCP protocols.

Current DEV state can be found in here -->
https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=ee0fc28e34f30fe687f4ab9c9130240d27dd87d4
.
A question arises for me now, should we substitute Sysklogd and Klogd
with Rsyslog now ? If yes, how should we proceed further then ?

All the best,

Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-04-08 17:47 ` [PATCH] Rsyslog: New advanced syslogger [TESTING] ummeegge
@ 2018-04-09 17:43   ` Peter Müller
  2018-04-10  9:29     ` ummeegge
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Müller @ 2018-04-09 17:43 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

Hello Erik,

thanks for working on this and sorry for the late reply.

> Hi all,
> after some testing rounds in this topic am currently arrived at a more
> simple configuration (without GnuTLS, Kerberos, ...) which works for me
> without problems also with the already integrated config.dat WUI
> extension for TCP protocols.
Thanks again. Support for those protocols is not that important in my
point of view, since I never saw anybody using SSL or similar for syslogging.

In fact, most "enterprise" software (which is enterprisely sophisticated)
does not even support TCP. :-\
> 
> Current DEV state can be found in here -->
> https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=ee0fc28e34f30fe687f4ab9c9130240d27dd87d4
> .
> A question arises for me now, should we substitute Sysklogd and Klogd
> with Rsyslog now ? If yes, how should we proceed further then ?
I think so, if there are no issues left. Will try and test (might
take a while, since things are busy here...).
> 
> All the best,
> 
> Erik



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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-04-09 17:43   ` Peter Müller
@ 2018-04-10  9:29     ` ummeegge
  0 siblings, 0 replies; 12+ messages in thread
From: ummeegge @ 2018-04-10  9:29 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 2595 bytes --]

Hi Peter,

Am Montag, den 09.04.2018, 19:43 +0200 schrieb Peter Müller:
> Hello Erik,
> 
> thanks for working on this and sorry for the late reply.
> 
> > 
> > Hi all,
> > after some testing rounds in this topic am currently arrived at a
> > more
> > simple configuration (without GnuTLS, Kerberos, ...) which works
> > for me
> > without problems also with the already integrated config.dat WUI
> > extension for TCP protocols.
> Thanks again. 
Your welcome, hope the work is useful. May you have recognize it
already, have seen that the update.sh has been accidentally added in
Git which won´t be needed (to much stuff in my building env ;)... 

> Support for those protocols is not that important in my
> point of view, since I never saw anybody using SSL or similar for
> syslogging.
Even if someone wants to send the logs to a remote area network
OpenVPN/IPSec might therefor be a better solution in my opinion.
Nevertheless, it is also possible to provide Rsyslog extensions via
Pakfire for individual usage but that´s a kind of future music i think.

> 
> In fact, most "enterprise" software (which is enterprisely
> sophisticated)
> does not even support TCP. :-\
Yes that´s true.

> > 
> > 
> > Current DEV state can be found in here -->
> > https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h
> > =ee0fc28e34f30fe687f4ab9c9130240d27dd87d4
> > .
> > A question arises for me now, should we substitute Sysklogd and
> > Klogd
> > with Rsyslog now ? If yes, how should we proceed further then ?
> I think so, if there are no issues left. Will try and test (might
> take a while, since things are busy here...).
No problem, take the time you need, good that you find the changes.

Have meanwhile tested some other configuration directives which works
mostly without problems. Have discovered one dysfunction, if new logs
should be created via configuration file in the standard path won´t
work cause Rsyslog drops the privileges to 'syslogd' and /var/log is
owned by owner and group 'root' but in that case a manual creation of a
desired new log with appropriate permissions should work without
problems.
Have tested also the remote logging (configured via WUI) for UDP and
TCP and this works also via e.g.:

#
# Template seperated logs for remote hosts
#
$template RemoteLogs,"/var/log/remotehosts/%HOSTNAME%/%$now%.log"
if $fromhost-ip != '127.0.0.1' then -?RemoteLogs
& stop

without problems, there was more but potentially not so interesting for
the first.

Looking forward for some further steps in that topic then.

> > 
> > 
> > All the best,
> > 
> > Erik
> 

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-13  6:26   ` ummeegge
  2018-02-13 10:09     ` Michael Tremer
@ 2018-02-27 12:38     ` ummeegge
  1 sibling, 0 replies; 12+ messages in thread
From: ummeegge @ 2018-02-27 12:38 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Hi all,
have found a couple of other needed changes but added also some other
options (TLS, Kerberos) which may be too much but for testing phase may
also interesting and a look over worth.

Remote logging with TCP/UDP via syslogdctrl works now which was one of
the main intents.

All changes and description can be found in here
https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=81f170aca3719eeb2f220b792fae69043e7c1584

All has been build with origin/next (Core 120).

Greetings,

Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-14 14:17           ` ummeegge
@ 2018-02-14 20:29             ` Michael Tremer
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Tremer @ 2018-02-14 20:29 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

On Wed, 2018-02-14 at 15:17 +0100, ummeegge wrote:
> Hi Michael,
> 
> Am Mittwoch, den 14.02.2018, 11:52 +0000 schrieb Michael Tremer:
> > Hi,
> > 
> > I am in favour of this too, but my schedule is really busy at the
> > moment and
> > would not like to get involved into any new projects. We have loads
> > of stuff on
> > the list anyways like OpenVPN, OpenSSL, new kernel, etc.
> 
> Sure.
> 
> > 
> > So I would be happy if you would work on this. 
> 
> I can do this but let us finish the openssl-11 thing first.
> 
> > Please include Peter since he
> > proposed this in the first place and wanted the TCP logging
> > capability.
> 
> This was my intend to send all that to the mailinglist. Should i write
> him an email ?

Please keep in the open what can be done in the open.

Make sure that he is CCed, is involved in testing so that the right git tags are
being set: https://wiki.ipfire.org/devel/git/tags

> 
> > 
> > But I think we should prioritise OpenVPN first which is way more
> > urgent than
> > replacing the syslog daemon.
> 
> Exactly
> 
> 
> Greetings,
> 
> Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-14 11:52         ` Michael Tremer
@ 2018-02-14 14:17           ` ummeegge
  2018-02-14 20:29             ` Michael Tremer
  0 siblings, 1 reply; 12+ messages in thread
From: ummeegge @ 2018-02-14 14:17 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

Hi Michael,

Am Mittwoch, den 14.02.2018, 11:52 +0000 schrieb Michael Tremer:
> Hi,
> 
> I am in favour of this too, but my schedule is really busy at the
> moment and
> would not like to get involved into any new projects. We have loads
> of stuff on
> the list anyways like OpenVPN, OpenSSL, new kernel, etc.
Sure.

> 
> So I would be happy if you would work on this. 
I can do this but let us finish the openssl-11 thing first.

> Please include Peter since he
> proposed this in the first place and wanted the TCP logging
> capability.
This was my intend to send all that to the mailinglist. Should i write
him an email ?

> 
> But I think we should prioritise OpenVPN first which is way more
> urgent than
> replacing the syslog daemon.
Exactly


Greetings,

Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-13 12:41       ` ummeegge
@ 2018-02-14 11:52         ` Michael Tremer
  2018-02-14 14:17           ` ummeegge
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Tremer @ 2018-02-14 11:52 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

Hi,

I am in favour of this too, but my schedule is really busy at the moment and
would not like to get involved into any new projects. We have loads of stuff on
the list anyways like OpenVPN, OpenSSL, new kernel, etc.

So I would be happy if you would work on this. Please include Peter since he
proposed this in the first place and wanted the TCP logging capability.

But I think we should prioritise OpenVPN first which is way more urgent than
replacing the syslog daemon.

-Michael

On Tue, 2018-02-13 at 13:41 +0100, ummeegge wrote:
> Hello,
> Rsyslogd runs here on different machines closely one week now without
> problems, it builds also in openssl-11 environment and i would make
> some more testings in that topic if the installer bug is fixed (fresh
> install) but logically if there is interest in general to substitude
> sysklogd/klogd with rsyslogd otherwise i will invest no more time in it
> for the first.
> 
> Greetings,
> 
> Erik
> 
> 
> Am Dienstag, den 13.02.2018, 10:09 +0000 schrieb Michael Tremer:
> > Hello,
> > 
> > if we would migrate to rsyslog, then yes, these things of course have
> > to be
> > changed, too.
> > 
> > Best,
> > -Michael
> > 
> > On Tue, 2018-02-13 at 07:26 +0100, ummeegge wrote:
> > > 
> > > Hi,
> > > not sure if this is still of interest but have found some other
> > > parts
> > > to change which can be found in here --> https://git.ipfire.org/?p=
> > > peop
> > > le/ummeegge/ipfire-
> > > 2.x.git;a=commit;h=8997ad4da368a3038b6bb8673ef69de9dc99d3f9 .
> > > 
> > > 
> > > Greetings,
> > > 
> > > Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-13 10:09     ` Michael Tremer
@ 2018-02-13 12:41       ` ummeegge
  2018-02-14 11:52         ` Michael Tremer
  0 siblings, 1 reply; 12+ messages in thread
From: ummeegge @ 2018-02-13 12:41 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Hello,
Rsyslogd runs here on different machines closely one week now without
problems, it builds also in openssl-11 environment and i would make
some more testings in that topic if the installer bug is fixed (fresh
install) but logically if there is interest in general to substitude
sysklogd/klogd with rsyslogd otherwise i will invest no more time in it
for the first.

Greetings,

Erik


Am Dienstag, den 13.02.2018, 10:09 +0000 schrieb Michael Tremer:
> Hello,
> 
> if we would migrate to rsyslog, then yes, these things of course have
> to be
> changed, too.
> 
> Best,
> -Michael
> 
> On Tue, 2018-02-13 at 07:26 +0100, ummeegge wrote:
> > 
> > Hi,
> > not sure if this is still of interest but have found some other
> > parts
> > to change which can be found in here --> https://git.ipfire.org/?p=
> > peop
> > le/ummeegge/ipfire-
> > 2.x.git;a=commit;h=8997ad4da368a3038b6bb8673ef69de9dc99d3f9 .
> > 
> > 
> > Greetings,
> > 
> > Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-13  6:26   ` ummeegge
@ 2018-02-13 10:09     ` Michael Tremer
  2018-02-13 12:41       ` ummeegge
  2018-02-27 12:38     ` ummeegge
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Tremer @ 2018-02-13 10:09 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

Hello,

if we would migrate to rsyslog, then yes, these things of course have to be
changed, too.

Best,
-Michael

On Tue, 2018-02-13 at 07:26 +0100, ummeegge wrote:
> Hi,
> not sure if this is still of interest but have found some other parts
> to change which can be found in here --> https://git.ipfire.org/?p=peop
> le/ummeegge/ipfire-
> 2.x.git;a=commit;h=8997ad4da368a3038b6bb8673ef69de9dc99d3f9 .
> 
> 
> Greetings,
> 
> Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-06  9:14 ` ummeegge
@ 2018-02-13  6:26   ` ummeegge
  2018-02-13 10:09     ` Michael Tremer
  2018-02-27 12:38     ` ummeegge
  0 siblings, 2 replies; 12+ messages in thread
From: ummeegge @ 2018-02-13  6:26 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

Hi,
not sure if this is still of interest but have found some other parts
to change which can be found in here --> https://git.ipfire.org/?p=peop
le/ummeegge/ipfire-
2.x.git;a=commit;h=8997ad4da368a3038b6bb8673ef69de9dc99d3f9 .


Greetings,

Erik

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

* Re: [PATCH] Rsyslog: New advanced syslogger [TESTING]
  2018-02-06  8:56 Erik Kapfer
@ 2018-02-06  9:14 ` ummeegge
  2018-02-13  6:26   ` ummeegge
  0 siblings, 1 reply; 12+ messages in thread
From: ummeegge @ 2018-02-06  9:14 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 41832 bytes --]

Hi all,
this is a testing patch and the first try to drop sysklogd and replace it with rsyslogd. This patch also do not includes needed core update.sh changes... Please do not use this for productive systems!

Did some testings with all changes and a freshly builded ISO in a VM and have had so far no problems with it but as in the commit message mentioned, there needs to be reviewed a lot and surely adjusted some things which i also probably forgot.
The logging WUI needs to be checked far better then i did it until now but for the first checkout it seems to be working.

@Peter this should be a working base for you to check also the already merged syslogctrl.c changes, did in there also some smaller changes which i have also listed in the commit message.

All can also be found in Git --> https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=8bdd3636db74ec3c05d69cc3e194bd37abcacf9c .

Hope this is helpful.

Best,

Erik


Am 06.02.2018 um 09:56 schrieb Erik Kapfer:

> Sysklogd are replaced by Rsyslogd.
> Reduced version with libestr libfastjson and liblogging.
> 
> Rsyslog configuration:
>    Two modules are used 'imuxsock' and 'imklog' which is the minimum to get the old sysklod ouput.
>    Works in 'RSYSLOG_TraditionalFileFormat' which equals to the log output of the old sysklogd.
>    Process drops his permissions to already existing 'syslogd'.
>    A work directory has been set to /var/spool/rsyslogd.
>    New configuration directory /etc/rsyslog.d has been introduced to.
>    One change of the old sysklogd configuration lines needed to be done whereby ':omusrmsg:*' for emergency messages has been set.
> 
> Rsyslog initscript:
>    Set a usermod and includes 'syslogd' to 'tty' otherwise the privileges can not be reduced.
>    Bootlog lines from sysklogd has been integrated.
> 
> ToDo´s:
>    Check if usermod in initscript is practical and if there are possible other ways.
>    Check for really needed modules.
>    Config for encrypted remote log server streams (there are currently no directives for this).
>    Adapted only the configuration name in syslogdctrl.c and if pid file doesn't exists, initscript will be used for restart instead of sysklogd command.
> 
> Signed-off-by: Erik Kapfer <erik.kapfer(a)ipfire.org>
> ---
> config/etc/rsyslog.conf                      | 74 +++++++++++++++++++++
> config/etc/syslog.conf                       | 23 -------
> config/rootfiles/common/armv5tel/initscripts |  8 +--
> config/rootfiles/common/i586/initscripts     |  8 +--
> config/rootfiles/common/libestr              |  6 ++
> config/rootfiles/common/libfastjson          | 13 ++++
> config/rootfiles/common/liblogging           | 10 +++
> config/rootfiles/common/logwatch             |  6 +-
> config/rootfiles/common/rsyslog              | 42 ++++++++++++
> config/rootfiles/common/stage2               |  2 +-
> config/rootfiles/common/sysklogd             |  8 ---
> config/rootfiles/common/x86_64/initscripts   |  8 +--
> config/rootfiles/common/x86_64/stage2        |  2 +-
> lfs/initscripts                              |  6 +-
> lfs/libestr                                  | 86 ++++++++++++++++++++++++
> lfs/libfastjson                              | 86 ++++++++++++++++++++++++
> lfs/liblogging                               | 86 ++++++++++++++++++++++++
> lfs/rsyslog                                  | 98 ++++++++++++++++++++++++++++
> make.sh                                      |  5 +-
> src/initscripts/system/rsyslogd              | 84 ++++++++++++++++++++++++
> src/initscripts/system/sysklogd              | 63 ------------------
> src/misc-progs/syslogdctrl.c                 | 20 +++---
> 22 files changed, 619 insertions(+), 125 deletions(-)
> create mode 100644 config/etc/rsyslog.conf
> delete mode 100644 config/etc/syslog.conf
> create mode 100644 config/rootfiles/common/libestr
> create mode 100644 config/rootfiles/common/libfastjson
> create mode 100644 config/rootfiles/common/liblogging
> create mode 100644 config/rootfiles/common/rsyslog
> delete mode 100644 config/rootfiles/common/sysklogd
> create mode 100644 lfs/libestr
> create mode 100644 lfs/libfastjson
> create mode 100644 lfs/liblogging
> create mode 100644 lfs/rsyslog
> create mode 100644 src/initscripts/system/rsyslogd
> delete mode 100644 src/initscripts/system/sysklogd
> 
> diff --git a/config/etc/rsyslog.conf b/config/etc/rsyslog.conf
> new file mode 100644
> index 0000000..92a0fe4
> --- /dev/null
> +++ b/config/etc/rsyslog.conf
> @@ -0,0 +1,74 @@
> +#  /etc/rsyslog.conf	Configuration file for rsyslog.
> +#
> +#			For more information see
> +#			/usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
> +#
> +
> +#################
> +#### MODULES ####
> +#################
> +
> +# provides support for local system logging
> +module(load="imuxsock")
> +
> +# provides kernel logging support (previously done by rklogd)
> +module(load="imklog")
> +
> +###########################
> +#### GLOBAL DIRECTIVES ####
> +###########################
> +
> +#
> +# Use traditional timestamp format.
> +# To enable high precision timestamps, comment out the following line.
> +#
> +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
> +
> +# Filter duplicated messages
> +#$RepeatedMsgReduction on
> +
> +#
> +# Drop privileges.
> +#
> +$PrivDropToUser syslogd
> +$PrivDropToGroup syslogd
> +
> +#
> +# Where to place spool and state files
> +#
> +$WorkDirectory /var/spool/rsyslogd
> +
> +#
> +# Include all config files in /etc/rsyslog.d/
> +#
> +$IncludeConfig /etc/rsyslog.d/*.conf
> +
> +###############
> +#### RULES ####
> +###############
> +
> +# Log all kernel messages to the console.
> +# Logging much else clutters up the screen.
> +#kern.* 							/dev/console
> +
> +# Log anything (except mail) of level info or higher.
> +# Don't log private authentication messages!
> +# local0.* any dhcpcd log (even debug) in messages
> +cron.none;daemon.*;local0.*;local2.*;\
> +*.info;mail.none;authpriv.*					-/var/log/messages
> +
> +# Log crons
> +#cron.*								-/var/log/cron.log
> +
> +# Everybody gets emergency messages
> +*.emerg								:omusrmsg:*
> +
> +# Display logs on tty12
> +*.* 								/dev/tty12
> +
> +# Optionally log to a remote host
> +#*.* 								@hostname.domain
> +
> +# Postfix logs
> +mail.*								-/var/log/mail
> +
> diff --git a/config/etc/syslog.conf b/config/etc/syslog.conf
> deleted file mode 100644
> index cdef756..0000000
> --- a/config/etc/syslog.conf
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -# Log all kernel messages to the console.
> -# Logging much else clutters up the screen.
> -#kern.*							/dev/console
> -
> -# Log anything (except mail) of level info or higher.
> -# Don't log private authentication messages!
> -# local0.* any dhcpcd log (even debug) in messages
> -cron.none;daemon.*;local0.*;local2.*;*.info;mail.none;authpriv.*	-/var/log/messages
> -
> -# Log crons
> -#cron.*										-/var/log/cron.log
> -
> -# Everybody gets emergency messages
> -*.emerg										*
> -
> -# Display logs on tty12
> -*.*												/dev/tty12
> -
> -# Optionally log to a remote host
> -#*.*											@hostname.domain
> -
> -# Postfix logs
> -mail.*										-/var/log/mail
> diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts
> index d3a3cf8..0d7a99b 100644
> --- a/config/rootfiles/common/armv5tel/initscripts
> +++ b/config/rootfiles/common/armv5tel/initscripts
> @@ -79,7 +79,7 @@ etc/rc.d/init.d/static-routes
> etc/rc.d/init.d/swap
> etc/rc.d/init.d/swconfig
> etc/rc.d/init.d/sysctl
> -etc/rc.d/init.d/sysklogd
> +etc/rc.d/init.d/rsyslogd
> etc/rc.d/init.d/template
> etc/rc.d/init.d/udev
> etc/rc.d/init.d/udev_retry
> @@ -108,7 +108,7 @@ etc/rc.d/rc0.d/K80network
> etc/rc.d/rc0.d/K82wlanclient
> #etc/rc.d/rc0.d/K84bluetooth
> #etc/rc.d/rc0.d/K85messagebus
> -etc/rc.d/rc0.d/K90sysklogd
> +etc/rc.d/rc0.d/K90rsyslogd
> etc/rc.d/rc0.d/S60sendsignals
> etc/rc.d/rc0.d/S70localnet
> etc/rc.d/rc0.d/S80mountfs
> @@ -116,7 +116,7 @@ etc/rc.d/rc0.d/S90swap
> etc/rc.d/rc0.d/S99halt
> #etc/rc.d/rc3.d
> etc/rc.d/rc3.d/S01vnstat
> -etc/rc.d/rc3.d/S10sysklogd
> +etc/rc.d/rc3.d/S10rsyslogd
> etc/rc.d/rc3.d/S11unbound
> etc/rc.d/rc3.d/S15fireinfo
> #etc/rc.d/rc3.d/S15messagebus
> @@ -157,7 +157,7 @@ etc/rc.d/rc6.d/K80network
> etc/rc.d/rc6.d/K82wlanclient
> #etc/rc.d/rc6.d/K84bluetooth
> #etc/rc.d/rc6.d/K85messagebus
> -etc/rc.d/rc6.d/K90sysklogd
> +etc/rc.d/rc6.d/K90rsyslogd
> etc/rc.d/rc6.d/S60sendsignals
> etc/rc.d/rc6.d/S70mountfs
> etc/rc.d/rc6.d/S80swap
> diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts
> index 67e495c..21edcc7 100644
> --- a/config/rootfiles/common/i586/initscripts
> +++ b/config/rootfiles/common/i586/initscripts
> @@ -79,7 +79,7 @@ etc/rc.d/init.d/sshd
> etc/rc.d/init.d/static-routes
> etc/rc.d/init.d/swap
> etc/rc.d/init.d/sysctl
> -etc/rc.d/init.d/sysklogd
> +etc/rc.d/init.d/rsyslogd
> etc/rc.d/init.d/template
> etc/rc.d/init.d/udev
> etc/rc.d/init.d/udev_retry
> @@ -109,7 +109,7 @@ etc/rc.d/rc0.d/K82wlanclient
> #etc/rc.d/rc0.d/K84bluetooth
> #etc/rc.d/rc0.d/K85messagebus
> etc/rc.d/rc0.d/K87acpid
> -etc/rc.d/rc0.d/K90sysklogd
> +etc/rc.d/rc0.d/K90rsyslogd
> etc/rc.d/rc0.d/S60sendsignals
> etc/rc.d/rc0.d/S70localnet
> etc/rc.d/rc0.d/S80mountfs
> @@ -117,7 +117,7 @@ etc/rc.d/rc0.d/S90swap
> etc/rc.d/rc0.d/S99halt
> #etc/rc.d/rc3.d
> etc/rc.d/rc3.d/S01vnstat
> -etc/rc.d/rc3.d/S10sysklogd
> +etc/rc.d/rc3.d/S10rsyslogd
> etc/rc.d/rc3.d/S12acpid
> etc/rc.d/rc3.d/S15fireinfo
> #etc/rc.d/rc3.d/S15messagebus
> @@ -160,7 +160,7 @@ etc/rc.d/rc6.d/K82wlanclient
> #etc/rc.d/rc6.d/K84bluetooth
> #etc/rc.d/rc6.d/K85messagebus
> etc/rc.d/rc6.d/K87acpid
> -etc/rc.d/rc6.d/K90sysklogd
> +etc/rc.d/rc6.d/K90rsyslogd
> etc/rc.d/rc6.d/S60sendsignals
> etc/rc.d/rc6.d/S70mountfs
> etc/rc.d/rc6.d/S80swap
> diff --git a/config/rootfiles/common/libestr b/config/rootfiles/common/libestr
> new file mode 100644
> index 0000000..d58e7a9
> --- /dev/null
> +++ b/config/rootfiles/common/libestr
> @@ -0,0 +1,6 @@
> +#usr/include/libestr.h
> +#usr/lib/libestr.la
> +#usr/lib/libestr.so
> +usr/lib/libestr.so.0
> +usr/lib/libestr.so.0.0.0
> +#usr/lib/pkgconfig/libestr.pc
> diff --git a/config/rootfiles/common/libfastjson b/config/rootfiles/common/libfastjson
> new file mode 100644
> index 0000000..f7611e1
> --- /dev/null
> +++ b/config/rootfiles/common/libfastjson
> @@ -0,0 +1,13 @@
> +#usr/include/libfastjson
> +#usr/include/libfastjson/atomic.h
> +#usr/include/libfastjson/json.h
> +#usr/include/libfastjson/json_object.h
> +#usr/include/libfastjson/json_object_iterator.h
> +#usr/include/libfastjson/json_object_private.h
> +#usr/include/libfastjson/json_tokener.h
> +#usr/include/libfastjson/json_util.h
> +#usr/lib/libfastjson.la
> +#usr/lib/libfastjson.so
> +usr/lib/libfastjson.so.4
> +usr/lib/libfastjson.so.4.2.0
> +#usr/lib/pkgconfig/libfastjson.pc
> diff --git a/config/rootfiles/common/liblogging b/config/rootfiles/common/liblogging
> new file mode 100644
> index 0000000..e51bfd9
> --- /dev/null
> +++ b/config/rootfiles/common/liblogging
> @@ -0,0 +1,10 @@
> +#usr/bin/stdlogctl
> +#usr/include/liblogging
> +#usr/include/liblogging/stdlog.h
> +#usr/lib/liblogging-stdlog.la
> +#usr/lib/liblogging-stdlog.so
> +usr/lib/liblogging-stdlog.so.0
> +usr/lib/liblogging-stdlog.so.0.1.0
> +#usr/lib/pkgconfig/liblogging-stdlog.pc
> +#usr/share/man/man1/stdlogctl.1
> +#usr/share/man/man3/stdlog.3
> diff --git a/config/rootfiles/common/logwatch b/config/rootfiles/common/logwatch
> index fe67a8c..a6ec26d 100644
> --- a/config/rootfiles/common/logwatch
> +++ b/config/rootfiles/common/logwatch
> @@ -56,7 +56,7 @@ usr/share/logwatch/default.conf/logfiles/samba.conf
> #usr/share/logwatch/default.conf/logfiles/secure.conf
> #usr/share/logwatch/default.conf/logfiles/sonicwall.conf
> #usr/share/logwatch/default.conf/logfiles/spamassassin.conf
> -usr/share/logwatch/default.conf/logfiles/syslog.conf
> +#usr/share/logwatch/default.conf/logfiles/syslog.conf
> #usr/share/logwatch/default.conf/logfiles/tac_acc.conf
> #usr/share/logwatch/default.conf/logfiles/tivoli-smc.conf
> #usr/share/logwatch/default.conf/logfiles/up2date.conf
> @@ -146,7 +146,7 @@ usr/share/logwatch/default.conf/services/postfix.conf
> #usr/share/logwatch/default.conf/services/qmail.conf
> #usr/share/logwatch/default.conf/services/raid.conf
> usr/share/logwatch/default.conf/services/resolver.conf
> -#usr/share/logwatch/default.conf/services/rsyslogd.conf
> +usr/share/logwatch/default.conf/services/rsyslogd.conf
> #usr/share/logwatch/default.conf/services/rt314.conf
> usr/share/logwatch/default.conf/services/samba.conf
> usr/share/logwatch/default.conf/services/saslauthd.conf
> @@ -290,7 +290,7 @@ usr/share/logwatch/scripts/services/postfix
> #usr/share/logwatch/scripts/services/qmail-smtpd
> #usr/share/logwatch/scripts/services/raid
> usr/share/logwatch/scripts/services/resolver
> -#usr/share/logwatch/scripts/services/rsyslogd
> +usr/share/logwatch/scripts/services/rsyslogd
> #usr/share/logwatch/scripts/services/rt314
> usr/share/logwatch/scripts/services/samba
> usr/share/logwatch/scripts/services/saslauthd
> diff --git a/config/rootfiles/common/rsyslog b/config/rootfiles/common/rsyslog
> new file mode 100644
> index 0000000..0eb4dd4
> --- /dev/null
> +++ b/config/rootfiles/common/rsyslog
> @@ -0,0 +1,42 @@
> +etc/rc.d/init.d/rsyslogd
> +etc/rsyslog.conf
> +etc/rsyslog.d
> +usr/bin/rscryutil
> +#usr/lib/rsyslog
> +#usr/lib/rsyslog/imklog.la
> +usr/lib/rsyslog/imklog.so
> +#usr/lib/rsyslog/immark.la
> +usr/lib/rsyslog/immark.so
> +#usr/lib/rsyslog/imtcp.la
> +usr/lib/rsyslog/imtcp.so
> +#usr/lib/rsyslog/imudp.la
> +usr/lib/rsyslog/imudp.so
> +#usr/lib/rsyslog/imuxsock.la
> +usr/lib/rsyslog/imuxsock.so
> +#usr/lib/rsyslog/lmcry_gcry.la
> +usr/lib/rsyslog/lmcry_gcry.so
> +#usr/lib/rsyslog/lmnet.la
> +usr/lib/rsyslog/lmnet.so
> +#usr/lib/rsyslog/lmnetstrms.la
> +usr/lib/rsyslog/lmnetstrms.so
> +#usr/lib/rsyslog/lmnsd_ptcp.la
> +usr/lib/rsyslog/lmnsd_ptcp.so
> +#usr/lib/rsyslog/lmregexp.la
> +usr/lib/rsyslog/lmregexp.so
> +#usr/lib/rsyslog/lmstrmsrv.la
> +usr/lib/rsyslog/lmstrmsrv.so
> +#usr/lib/rsyslog/lmtcpclt.la
> +usr/lib/rsyslog/lmtcpclt.so
> +#usr/lib/rsyslog/lmtcpsrv.la
> +usr/lib/rsyslog/lmtcpsrv.so
> +#usr/lib/rsyslog/lmzlibw.la
> +usr/lib/rsyslog/lmzlibw.so
> +#usr/lib/rsyslog/mmexternal.la
> +usr/lib/rsyslog/mmexternal.so
> +#usr/lib/rsyslog/omtesting.la
> +usr/lib/rsyslog/omtesting.so
> +usr/sbin/rsyslogd
> +#usr/share/man/man5/rsyslog.conf.5
> +#usr/share/man/man8/rsyslogd.8
> +var/log/dhcpcd.log
> +var/log/messages
> diff --git a/config/rootfiles/common/stage2 b/config/rootfiles/common/stage2
> index a5ba6ae..953255b 100644
> --- a/config/rootfiles/common/stage2
> +++ b/config/rootfiles/common/stage2
> @@ -42,7 +42,7 @@ etc/profile.d/umask.sh
> etc/resolv.conf
> etc/securetty
> etc/sysctl.conf
> -etc/syslog.conf
> +etc/rsyslog.conf
> etc/system-release
> #home
> home/nobody
> diff --git a/config/rootfiles/common/sysklogd b/config/rootfiles/common/sysklogd
> deleted file mode 100644
> index f5d55c2..0000000
> --- a/config/rootfiles/common/sysklogd
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -usr/sbin/klogd
> -usr/sbin/syslogd
> -#usr/share/man/man5/syslog.conf.5
> -#usr/share/man/man8/klogd.8
> -#usr/share/man/man8/sysklogd.8
> -#usr/share/man/man8/syslogd.8
> -var/log/dhcpcd.log
> -var/log/messages
> diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts
> index 67e495c..21edcc7 100644
> --- a/config/rootfiles/common/x86_64/initscripts
> +++ b/config/rootfiles/common/x86_64/initscripts
> @@ -79,7 +79,7 @@ etc/rc.d/init.d/sshd
> etc/rc.d/init.d/static-routes
> etc/rc.d/init.d/swap
> etc/rc.d/init.d/sysctl
> -etc/rc.d/init.d/sysklogd
> +etc/rc.d/init.d/rsyslogd
> etc/rc.d/init.d/template
> etc/rc.d/init.d/udev
> etc/rc.d/init.d/udev_retry
> @@ -109,7 +109,7 @@ etc/rc.d/rc0.d/K82wlanclient
> #etc/rc.d/rc0.d/K84bluetooth
> #etc/rc.d/rc0.d/K85messagebus
> etc/rc.d/rc0.d/K87acpid
> -etc/rc.d/rc0.d/K90sysklogd
> +etc/rc.d/rc0.d/K90rsyslogd
> etc/rc.d/rc0.d/S60sendsignals
> etc/rc.d/rc0.d/S70localnet
> etc/rc.d/rc0.d/S80mountfs
> @@ -117,7 +117,7 @@ etc/rc.d/rc0.d/S90swap
> etc/rc.d/rc0.d/S99halt
> #etc/rc.d/rc3.d
> etc/rc.d/rc3.d/S01vnstat
> -etc/rc.d/rc3.d/S10sysklogd
> +etc/rc.d/rc3.d/S10rsyslogd
> etc/rc.d/rc3.d/S12acpid
> etc/rc.d/rc3.d/S15fireinfo
> #etc/rc.d/rc3.d/S15messagebus
> @@ -160,7 +160,7 @@ etc/rc.d/rc6.d/K82wlanclient
> #etc/rc.d/rc6.d/K84bluetooth
> #etc/rc.d/rc6.d/K85messagebus
> etc/rc.d/rc6.d/K87acpid
> -etc/rc.d/rc6.d/K90sysklogd
> +etc/rc.d/rc6.d/K90rsyslogd
> etc/rc.d/rc6.d/S60sendsignals
> etc/rc.d/rc6.d/S70mountfs
> etc/rc.d/rc6.d/S80swap
> diff --git a/config/rootfiles/common/x86_64/stage2 b/config/rootfiles/common/x86_64/stage2
> index 70a33d6..b8cb01b 100644
> --- a/config/rootfiles/common/x86_64/stage2
> +++ b/config/rootfiles/common/x86_64/stage2
> @@ -42,7 +42,7 @@ etc/profile.d/umask.sh
> etc/resolv.conf
> etc/securetty
> etc/sysctl.conf
> -etc/syslog.conf
> +etc/rsyslog.conf
> etc/system-release
> #home
> home/nobody
> diff --git a/lfs/initscripts b/lfs/initscripts
> index 9d3a52c..df6f0a5 100644
> --- a/lfs/initscripts
> +++ b/lfs/initscripts
> @@ -92,13 +92,13 @@ $(TARGET) :
> 		install -v -m 755 $$i /etc/rc.d/helper/; \
> 	done
> 
> -	ln -sf ../init.d/sysklogd    /etc/rc.d/rc0.d/K90sysklogd
> +	ln -sf ../init.d/rsyslogd    /etc/rc.d/rc0.d/K90rsyslogd
> 	ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals
> 	ln -sf ../init.d/localnet    /etc/rc.d/rc0.d/S70localnet
> 	ln -sf ../init.d/mountfs     /etc/rc.d/rc0.d/S80mountfs
> 	ln -sf ../init.d/swap        /etc/rc.d/rc0.d/S90swap
> 	ln -sf ../init.d/halt        /etc/rc.d/rc0.d/S99halt
> -	ln -sf ../init.d/sysklogd    /etc/rc.d/rc3.d/S10sysklogd
> +	ln -sf ../init.d/rsyslogd    /etc/rc.d/rc3.d/S10rsyslogd
> 	ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
> 	ln -sf ../init.d/messagebus  /etc/rc.d/rc3.d/S15messagebus
> 	ln -sf ../init.d/messagebus  /etc/rc.d/rc0.d/K85messagebus
> @@ -107,7 +107,7 @@ $(TARGET) :
> 	ln -sf ../init.d/bluetooth   /etc/rc.d/rc0.d/K84bluetooth
> 	ln -sf ../init.d/bluetooth   /etc/rc.d/rc6.d/K84bluetooth
> 	ln -sf ../init.d/cpufreq     /etc/rc.d/rc3.d/S18cpufreq
> -	ln -sf ../init.d/sysklogd    /etc/rc.d/rc6.d/K90sysklogd
> +	ln -sf ../init.d/rsyslogd    /etc/rc.d/rc6.d/K90rsyslogd
> 	ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
> 	ln -sf ../init.d/mountfs     /etc/rc.d/rc6.d/S70mountfs
> 	ln -sf ../init.d/swap        /etc/rc.d/rc6.d/S80swap
> diff --git a/lfs/libestr b/lfs/libestr
> new file mode 100644
> index 0000000..5e2d168
> --- /dev/null
> +++ b/lfs/libestr
> @@ -0,0 +1,86 @@
> +###############################################################################
> +#                                                                             #
> +# IPFire.org - A linux based firewall                                         #
> +# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
> +#                                                                             #
> +# This program is free software: you can redistribute it and/or modify        #
> +# it under the terms of the GNU General Public License as published by        #
> +# the Free Software Foundation, either version 3 of the License, or           #
> +# (at your option) any later version.                                         #
> +#                                                                             #
> +# This program is distributed in the hope that it will be useful,             #
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
> +# GNU General Public License for more details.                                #
> +#                                                                             #
> +# You should have received a copy of the GNU General Public License           #
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
> +#                                                                             #
> +###############################################################################
> +
> +###############################################################################
> +# Definitions
> +###############################################################################
> +
> +include Config
> +
> +VER        = 0.1.10
> +
> +THISAPP    = libestr-$(VER)
> +DL_FILE    = $(THISAPP).tar.gz
> +DL_FROM    = $(URL_IPFIRE)
> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
> +TARGET     = $(DIR_INFO)/$(THISAPP)
> +PROG       = libestr
> +
> +###############################################################################
> +# Top-level Rules
> +###############################################################################
> +
> +objects = $(DL_FILE)
> +
> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> +
> +$(DL_FILE)_MD5 = f4c9165a23587e77f7efe65d676d5e8e
> +
> +install : $(TARGET)
> +
> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
> +
> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
> +
> +md5 : $(subst %,%_MD5,$(objects))
> +
> +dist: 
> +	@$(PAK)
> +
> +###############################################################################
> +# Downloading, checking, md5sum
> +###############################################################################
> +
> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
> +	@$(CHECK)
> +
> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
> +	@$(LOAD)
> +
> +$(subst %,%_MD5,$(objects)) :
> +	@$(MD5)
> +
> +###############################################################################
> +# Installation Details
> +###############################################################################
> +
> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> +	@$(PREBUILD)
> +	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> +	cd $(DIR_APP) && ./configure	\
> +		--prefix=/usr		\
> +		--enable-static=no
> +
> +	cd $(DIR_APP) && make $(MAKETUNING)
> +	cd $(DIR_APP) && make install
> +
> +	@rm -rf $(DIR_APP)
> +	@$(POSTBUILD)
> +
> diff --git a/lfs/libfastjson b/lfs/libfastjson
> new file mode 100644
> index 0000000..80f41af
> --- /dev/null
> +++ b/lfs/libfastjson
> @@ -0,0 +1,86 @@
> +###############################################################################
> +#                                                                             #
> +# IPFire.org - A linux based firewall                                         #
> +# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
> +#                                                                             #
> +# This program is free software: you can redistribute it and/or modify        #
> +# it under the terms of the GNU General Public License as published by        #
> +# the Free Software Foundation, either version 3 of the License, or           #
> +# (at your option) any later version.                                         #
> +#                                                                             #
> +# This program is distributed in the hope that it will be useful,             #
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
> +# GNU General Public License for more details.                                #
> +#                                                                             #
> +# You should have received a copy of the GNU General Public License           #
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
> +#                                                                             #
> +###############################################################################
> +
> +###############################################################################
> +# Definitions
> +###############################################################################
> +
> +include Config
> +
> +VER        = 0.99.8
> +
> +THISAPP    = libfastjson-$(VER)
> +DL_FILE    = $(THISAPP).tar.gz
> +DL_FROM    = $(URL_IPFIRE)
> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
> +TARGET     = $(DIR_INFO)/$(THISAPP)
> +PROG       = libfastjson
> +
> +###############################################################################
> +# Top-level Rules
> +###############################################################################
> +
> +objects = $(DL_FILE)
> +
> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> +
> +$(DL_FILE)_MD5 = fe7b4eae1bf40499f6f92b51d7e5899e
> +
> +install : $(TARGET)
> +
> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
> +
> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
> +
> +md5 : $(subst %,%_MD5,$(objects))
> +
> +dist: 
> +	@$(PAK)
> +
> +###############################################################################
> +# Downloading, checking, md5sum
> +###############################################################################
> +
> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
> +	@$(CHECK)
> +
> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
> +	@$(LOAD)
> +
> +$(subst %,%_MD5,$(objects)) :
> +	@$(MD5)
> +
> +###############################################################################
> +# Installation Details
> +###############################################################################
> +
> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> +	@$(PREBUILD)
> +	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> +	cd $(DIR_APP) && ./configure	\
> +		--prefix=/usr		\
> +		--enable-static=no
> +
> +	cd $(DIR_APP) && make $(MAKETUNING)
> +	cd $(DIR_APP) && make install
> +
> +	@rm -rf $(DIR_APP)
> +	@$(POSTBUILD)
> +
> diff --git a/lfs/liblogging b/lfs/liblogging
> new file mode 100644
> index 0000000..22ae480
> --- /dev/null
> +++ b/lfs/liblogging
> @@ -0,0 +1,86 @@
> +###############################################################################
> +#                                                                             #
> +# IPFire.org - A linux based firewall                                         #
> +# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
> +#                                                                             #
> +# This program is free software: you can redistribute it and/or modify        #
> +# it under the terms of the GNU General Public License as published by        #
> +# the Free Software Foundation, either version 3 of the License, or           #
> +# (at your option) any later version.                                         #
> +#                                                                             #
> +# This program is distributed in the hope that it will be useful,             #
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
> +# GNU General Public License for more details.                                #
> +#                                                                             #
> +# You should have received a copy of the GNU General Public License           #
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
> +#                                                                             #
> +###############################################################################
> +
> +###############################################################################
> +# Definitions
> +###############################################################################
> +
> +include Config
> +
> +VER        = 1.0.6
> +
> +THISAPP    = liblogging-$(VER)
> +DL_FILE    = $(THISAPP).tar.gz
> +DL_FROM    = $(URL_IPFIRE)
> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
> +TARGET     = $(DIR_INFO)/$(THISAPP)
> +PROG       = liblogging
> +
> +###############################################################################
> +# Top-level Rules
> +###############################################################################
> +
> +objects = $(DL_FILE)
> +
> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> +
> +$(DL_FILE)_MD5 = f215c7e7ac6cfd1f5dabdba08c522b29
> +
> +install : $(TARGET)
> +
> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
> +
> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
> +
> +md5 : $(subst %,%_MD5,$(objects))
> +
> +dist: 
> +	@$(PAK)
> +
> +###############################################################################
> +# Downloading, checking, md5sum
> +###############################################################################
> +
> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
> +	@$(CHECK)
> +
> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
> +	@$(LOAD)
> +
> +$(subst %,%_MD5,$(objects)) :
> +	@$(MD5)
> +
> +###############################################################################
> +# Installation Details
> +###############################################################################
> +
> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> +	@$(PREBUILD)
> +	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> +	cd $(DIR_APP) && ./configure	\
> +		--prefix=/usr		\
> +		--enable-static=no
> +
> +	cd $(DIR_APP) && make $(MAKETUNING)
> +	cd $(DIR_APP) && make install
> +
> +	@rm -rf $(DIR_APP)
> +	@$(POSTBUILD)
> +
> diff --git a/lfs/rsyslog b/lfs/rsyslog
> new file mode 100644
> index 0000000..ebb3766
> --- /dev/null
> +++ b/lfs/rsyslog
> @@ -0,0 +1,98 @@
> +###############################################################################
> +#                                                                             #
> +# IPFire.org - A linux based firewall                                         #
> +# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
> +#                                                                             #
> +# This program is free software: you can redistribute it and/or modify        #
> +# it under the terms of the GNU General Public License as published by        #
> +# the Free Software Foundation, either version 3 of the License, or           #
> +# (at your option) any later version.                                         #
> +#                                                                             #
> +# This program is distributed in the hope that it will be useful,             #
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
> +# GNU General Public License for more details.                                #
> +#                                                                             #
> +# You should have received a copy of the GNU General Public License           #
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
> +#                                                                             #
> +###############################################################################
> +
> +###############################################################################
> +# Definitions
> +###############################################################################
> +
> +include Config
> +
> +VER        = 8.32.0
> +
> +THISAPP    = rsyslog-$(VER)
> +DL_FILE    = $(THISAPP).tar.gz
> +DL_FROM    = $(URL_IPFIRE)
> +DIR_APP    = $(DIR_SRC)/$(THISAPP)
> +TARGET     = $(DIR_INFO)/$(THISAPP)
> +PROG       = rsyslog
> +
> +###############################################################################
> +# Top-level Rules
> +###############################################################################
> +
> +objects = $(DL_FILE)
> +
> +$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
> +
> +$(DL_FILE)_MD5 = 0811aad3186bcae3b2dcd92063d9eb1d
> +
> +install : $(TARGET)
> +
> +check : $(patsubst %,$(DIR_CHK)/%,$(objects))
> +
> +download :$(patsubst %,$(DIR_DL)/%,$(objects))
> +
> +md5 : $(subst %,%_MD5,$(objects))
> +
> +dist: 
> +	@$(PAK)
> +
> +###############################################################################
> +# Downloading, checking, md5sum
> +###############################################################################
> +
> +$(patsubst %,$(DIR_CHK)/%,$(objects)) :
> +	@$(CHECK)
> +
> +$(patsubst %,$(DIR_DL)/%,$(objects)) :
> +	@$(LOAD)
> +
> +$(subst %,%_MD5,$(objects)) :
> +	@$(MD5)
> +
> +###############################################################################
> +# Installation Details
> +###############################################################################
> +
> +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> +	@$(PREBUILD)
> +	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
> +
> +	cd $(DIR_APP) && ./configure	\
> +		--prefix=/usr		\
> +		--disable-largefile	\
> +		--enable-usertools	\
> +		CFLAGS="-L/lib"
> +
> +	cd $(DIR_APP) && make $(MAKETUNING)
> +	cd $(DIR_APP) && make install
> +
> +	touch /var/log/{dhcpcd.log,messages}
> +	chmod 664 /var/log/{dhcpcd.log,messages}
> +	chown root:syslogd /var/log/{dhcpcd.log,messages}
> +
> +	# Add additional configuration directory
> +	mkdir -v /etc/rsyslog.d
> +	chown -R root:root /etc/rsyslog.d
> +	chmod 755 /etc/rsyslog.d
> +
> +	@rm -rf $(DIR_APP)
> +	@$(POSTBUILD)
> +
> diff --git a/make.sh b/make.sh
> index c7b6eb8..043f0e4 100755
> --- a/make.sh
> +++ b/make.sh
> @@ -1016,7 +1016,6 @@ buildbase() {
> 	lfsmake2 patch
> 	lfsmake2 psmisc
> 	lfsmake2 shadow
> -	lfsmake2 sysklogd
> 	lfsmake2 sysvinit
> 	lfsmake2 tar
> 	lfsmake2 texinfo
> @@ -1142,6 +1141,10 @@ buildipfire() {
>   lfsmake2 gdbm
>   lfsmake2 pam
>   lfsmake2 curl
> +  lfsmake2 libestr
> +  lfsmake2 liblogging
> +  lfsmake2 libfastjson
> +  lfsmake2 rsyslog
>   lfsmake2 tcl
>   lfsmake2 sqlite
>   lfsmake2 libffi
> diff --git a/src/initscripts/system/rsyslogd b/src/initscripts/system/rsyslogd
> new file mode 100644
> index 0000000..cb9e6af
> --- /dev/null
> +++ b/src/initscripts/system/rsyslogd
> @@ -0,0 +1,84 @@
> +#!/bin/bash
> +
> +#
> +# Startup script for rsyslog.
> +#
> +# Short-Description: Enhanced system logging and kernel message trapping BINs
> +#
> +# $Author: ummeegge ipfire org
> +# $Date: 02.02.2018
> +#############################################################################
> +#
> +
> +. /etc/sysconfig/rc
> +. ${rc_functions}
> +
> +NAME="rsyslogd"
> +BIN="/usr/sbin/${NAME}"
> +CONF="/etc/rsyslog.conf"
> +lockfile="/var/lock/subsys/${NAME}"
> +PIDFILE="/var/run/rsyslogd.pid"
> +DESC="enhanced syslogd"
> +SYSLOGD_OPTIONS="-i ${PIDFILE}"
> +
> +# Exit if the package is not installed
> +[ -x ${BIN} ] || exit 5
> +
> +# Do not start rsyslog when sysklogd is running
> +if [ -e /var/run/syslogd.pid ]; then
> +	echo "Shut down sysklogd before you run rsyslog"
> +	exit 1
> +fi
> +
> +if ! grep -q "^tty:x:5:syslogd$" /etc/group; then
> +    usermod -a -G tty syslogd
> +fi
> +
> +# Add work dir if not presant
> +if [ ! -e "/var/spool/${NAME}" ]; then
> +        mkdir /var/spool/${NAME}
> +fi
> +
> +case "${1}" in
> +	start)
> +		boot_mesg "Starting ${DESC}... "
> +		loadproc ${BIN} ${SYSLOGD_OPTIONS}
> +
> +		boot_mesg "Saving Bootlog..."
> +		if [ -e /var/log/bootlog ]; then
> +		    mv -f /var/log/bootlog /var/log/bootlog.old
> +		fi
> +		dmesg -c > /var/log/bootlog
> +
> +		evaluate_retval && touch ${lockfile}
> +	;;
> +
> +	stop)
> +		boot_mesg "Stopping ${DESC}... "
> +		killproc ${BIN}
> +		rm -f ${PIDFILE} ${lockfile}
> +	;;
> +
> +	reload)
> +		boot_mesg "Reloading ${DESC}..."
> +		reloadproc ${BIN} ${SYSLOGD_OPTIONS}
> +	;;
> +
> +	restart)
> +		${0} stop
> +		sleep 1
> +		${0} start
> +	;;
> +
> +	status)
> +		statusproc ${BIN}
> +	;;
> +
> +	*)
> +		echo "Usage: ${0} {start|stop|reload|restart|status}"
> +		exit 1
> +	;;
> +esac
> +
> +# End $rc_base/init.d/rsyslog
> +
> diff --git a/src/initscripts/system/sysklogd b/src/initscripts/system/sysklogd
> deleted file mode 100644
> index 4482559..0000000
> --- a/src/initscripts/system/sysklogd
> +++ /dev/null
> @@ -1,63 +0,0 @@
> -#!/bin/sh
> -########################################################################
> -# Begin $rc_base/init.d/sysklogd
> -#
> -# Description : Sysklogd loader
> -#
> -# Authors     : Gerard Beekmans - gerard(a)linuxfromscratch.org
> -#
> -# Version     : 00.00
> -#
> -# Notes       :
> -#
> -########################################################################
> -
> -. /etc/sysconfig/rc
> -. ${rc_functions}
> -
> -case "${1}" in
> -	start)
> -		boot_mesg "Starting kernel log daemon..."
> -		loadproc klogd -c 1
> -
> -		boot_mesg "Starting system log daemon..."
> -		loadproc syslogd -m 0
> -
> -		boot_mesg "Saving Bootlog..."
> -		if [ -e /var/log/bootlog ]; then
> -		    mv -f /var/log/bootlog /var/log/bootlog.old
> -		fi
> -		dmesg -c > /var/log/bootlog
> -		evaluate_retval
> -		;;
> -	stop)
> -		boot_mesg "Stopping kernel log daemon..."
> -		killproc klogd
> -
> -		boot_mesg "Stopping system log daemon..."
> -		killproc syslogd
> -		;;
> -
> -	reload)
> -		boot_mesg "Reloading system log daemon config file..."
> -		reloadproc syslogd 1
> -		;;
> -
> -	restart)
> -		${0} stop
> -		sleep 1
> -		${0} start
> -		;;
> -
> -	status)
> -		statusproc syslogd
> -		statusproc klogd
> -		;;
> -
> -	*)
> -		echo "Usage: ${0} {start|stop|reload|restart|status}"
> -		exit 1
> -		;;
> -esac
> -
> -# End $rc_base/init.d/sysklogd
> diff --git a/src/misc-progs/syslogdctrl.c b/src/misc-progs/syslogdctrl.c
> index d73c422..e3d665b 100644
> --- a/src/misc-progs/syslogdctrl.c
> +++ b/src/misc-progs/syslogdctrl.c
> @@ -106,7 +106,7 @@ int main(void)
> 
>    /* O_CREAT with O_EXCL will make open() fail if the file already exists -
>     * mostly to prevent 2 copies running at once */
> -   if ((config_fd = open( "/etc/syslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )
> +   if ((config_fd = open( "/etc/rsyslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )
>    {
>       perror("Unable to open new config file");
>       exit(ERR_CONFIG);
> @@ -118,18 +118,18 @@ int main(void)
>       if (strcmp(protocol, "tcp") == 0)
>       {
>          /* write line for TCP */
> -         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@@%s/' /etc/syslog.conf >&%d", hostname, config_fd);
> +         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@@%s/' /etc/rsyslog.conf >&%d", hostname, config_fd);
>       }
>       else
>       {
>          /* write line for UDP */
> -         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@%s/' /etc/syslog.conf >&%d", hostname, config_fd);
> +         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@%s/' /etc/rsyslog.conf >&%d", hostname, config_fd);
>       }
>    }
>    else
>    {
>       /* if remote syslog has been disabled */
> -      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@@\\?.\\+\\)$/#\\1/' /etc/syslog.conf >&%d", config_fd );
> +      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@@\\?.\\+\\)$/#\\1/' /etc/rsyslog.conf >&%d", config_fd );
>    }
> 
>      /* if the return code isn't 0 failsafe */
> @@ -137,31 +137,31 @@ int main(void)
>    {
>       fprintf(stderr, "sed returned bad exit code: %d\n", rc);
>       close(config_fd);
> -      unlink("/etc/syslog.conf.new");
> +      unlink("/etc/rsyslog.conf.new");
>       exit(ERR_CONFIG);
>    }
>    close(config_fd);
> 
> -   if (rename("/etc/syslog.conf.new", "/etc/syslog.conf") == -1)
> +   if (rename("/etc/rsyslog.conf.new", "/etc/rsyslog.conf") == -1)
>    {
>       perror("Unable to replace old config file");
> -      unlink("/etc/syslog.conf.new");
> +      unlink("/etc/rsyslog.conf.new");
>       exit(ERR_CONFIG);
>    }
> 
> 
>    /* Get syslogd to read the new config file */
> -   if ((fd = open("/var/run/syslogd.pid", O_RDONLY)) == -1)
> +   if ((fd = open("/var/run/rsyslogd.pid", O_RDONLY)) == -1)
>    {
>       if(errno == ENOENT)
>       {
>          /* pid file doesn't exists.. restart syslog */
> -         if((rc = safe_system("/usr/sbin/syslogd u syslogd -m 0")) == 0 )
> +         if((rc = safe_system("/etc/init.d/rsyslog restart")) == 0 )
>             return 0;
>          else
>          {
>             fprintf(stderr,
> -               "Unable to restart syslogd - returned exit code %d\n", rc);
> +               "Unable to restart rsyslogd - returned exit code %d\n", rc);
>             exit(ERR_SYSLOG);
>          }
>       } else {
> -- 
> 2.7.4
> 


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

* [PATCH] Rsyslog: New advanced syslogger [TESTING]
@ 2018-02-06  8:56 Erik Kapfer
  2018-02-06  9:14 ` ummeegge
  0 siblings, 1 reply; 12+ messages in thread
From: Erik Kapfer @ 2018-02-06  8:56 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 38803 bytes --]

Sysklogd are replaced by Rsyslogd.
Reduced version with libestr libfastjson and liblogging.

Rsyslog configuration:
    Two modules are used 'imuxsock' and 'imklog' which is the minimum to get the old sysklod ouput.
    Works in 'RSYSLOG_TraditionalFileFormat' which equals to the log output of the old sysklogd.
    Process drops his permissions to already existing 'syslogd'.
    A work directory has been set to /var/spool/rsyslogd.
    New configuration directory /etc/rsyslog.d has been introduced to.
    One change of the old sysklogd configuration lines needed to be done whereby ':omusrmsg:*' for emergency messages has been set.

Rsyslog initscript:
    Set a usermod and includes 'syslogd' to 'tty' otherwise the privileges can not be reduced.
    Bootlog lines from sysklogd has been integrated.

ToDo´s:
    Check if usermod in initscript is practical and if there are possible other ways.
    Check for really needed modules.
    Config for encrypted remote log server streams (there are currently no directives for this).
    Adapted only the configuration name in syslogdctrl.c and if pid file doesn't exists, initscript will be used for restart instead of sysklogd command.

Signed-off-by: Erik Kapfer <erik.kapfer(a)ipfire.org>
---
 config/etc/rsyslog.conf                      | 74 +++++++++++++++++++++
 config/etc/syslog.conf                       | 23 -------
 config/rootfiles/common/armv5tel/initscripts |  8 +--
 config/rootfiles/common/i586/initscripts     |  8 +--
 config/rootfiles/common/libestr              |  6 ++
 config/rootfiles/common/libfastjson          | 13 ++++
 config/rootfiles/common/liblogging           | 10 +++
 config/rootfiles/common/logwatch             |  6 +-
 config/rootfiles/common/rsyslog              | 42 ++++++++++++
 config/rootfiles/common/stage2               |  2 +-
 config/rootfiles/common/sysklogd             |  8 ---
 config/rootfiles/common/x86_64/initscripts   |  8 +--
 config/rootfiles/common/x86_64/stage2        |  2 +-
 lfs/initscripts                              |  6 +-
 lfs/libestr                                  | 86 ++++++++++++++++++++++++
 lfs/libfastjson                              | 86 ++++++++++++++++++++++++
 lfs/liblogging                               | 86 ++++++++++++++++++++++++
 lfs/rsyslog                                  | 98 ++++++++++++++++++++++++++++
 make.sh                                      |  5 +-
 src/initscripts/system/rsyslogd              | 84 ++++++++++++++++++++++++
 src/initscripts/system/sysklogd              | 63 ------------------
 src/misc-progs/syslogdctrl.c                 | 20 +++---
 22 files changed, 619 insertions(+), 125 deletions(-)
 create mode 100644 config/etc/rsyslog.conf
 delete mode 100644 config/etc/syslog.conf
 create mode 100644 config/rootfiles/common/libestr
 create mode 100644 config/rootfiles/common/libfastjson
 create mode 100644 config/rootfiles/common/liblogging
 create mode 100644 config/rootfiles/common/rsyslog
 delete mode 100644 config/rootfiles/common/sysklogd
 create mode 100644 lfs/libestr
 create mode 100644 lfs/libfastjson
 create mode 100644 lfs/liblogging
 create mode 100644 lfs/rsyslog
 create mode 100644 src/initscripts/system/rsyslogd
 delete mode 100644 src/initscripts/system/sysklogd

diff --git a/config/etc/rsyslog.conf b/config/etc/rsyslog.conf
new file mode 100644
index 0000000..92a0fe4
--- /dev/null
+++ b/config/etc/rsyslog.conf
@@ -0,0 +1,74 @@
+#  /etc/rsyslog.conf	Configuration file for rsyslog.
+#
+#			For more information see
+#			/usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
+#
+
+#################
+#### MODULES ####
+#################
+
+# provides support for local system logging
+module(load="imuxsock")
+
+# provides kernel logging support (previously done by rklogd)
+module(load="imklog")
+
+###########################
+#### GLOBAL DIRECTIVES ####
+###########################
+
+#
+# Use traditional timestamp format.
+# To enable high precision timestamps, comment out the following line.
+#
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
+# Filter duplicated messages
+#$RepeatedMsgReduction on
+
+#
+# Drop privileges.
+#
+$PrivDropToUser syslogd
+$PrivDropToGroup syslogd
+
+#
+# Where to place spool and state files
+#
+$WorkDirectory /var/spool/rsyslogd
+
+#
+# Include all config files in /etc/rsyslog.d/
+#
+$IncludeConfig /etc/rsyslog.d/*.conf
+
+###############
+#### RULES ####
+###############
+
+# Log all kernel messages to the console.
+# Logging much else clutters up the screen.
+#kern.* 							/dev/console
+
+# Log anything (except mail) of level info or higher.
+# Don't log private authentication messages!
+# local0.* any dhcpcd log (even debug) in messages
+cron.none;daemon.*;local0.*;local2.*;\
+*.info;mail.none;authpriv.*					-/var/log/messages
+
+# Log crons
+#cron.*								-/var/log/cron.log
+
+# Everybody gets emergency messages
+*.emerg								:omusrmsg:*
+
+# Display logs on tty12
+*.* 								/dev/tty12
+
+# Optionally log to a remote host
+#*.* 								@hostname.domain
+
+# Postfix logs
+mail.*								-/var/log/mail
+
diff --git a/config/etc/syslog.conf b/config/etc/syslog.conf
deleted file mode 100644
index cdef756..0000000
--- a/config/etc/syslog.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-# Log all kernel messages to the console.
-# Logging much else clutters up the screen.
-#kern.*							/dev/console
-
-# Log anything (except mail) of level info or higher.
-# Don't log private authentication messages!
-# local0.* any dhcpcd log (even debug) in messages
-cron.none;daemon.*;local0.*;local2.*;*.info;mail.none;authpriv.*	-/var/log/messages
-
-# Log crons
-#cron.*										-/var/log/cron.log
-
-# Everybody gets emergency messages
-*.emerg										*
-
-# Display logs on tty12
-*.*												/dev/tty12
-
-# Optionally log to a remote host
-#*.*											@hostname.domain
-
-# Postfix logs
-mail.*										-/var/log/mail
diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts
index d3a3cf8..0d7a99b 100644
--- a/config/rootfiles/common/armv5tel/initscripts
+++ b/config/rootfiles/common/armv5tel/initscripts
@@ -79,7 +79,7 @@ etc/rc.d/init.d/static-routes
 etc/rc.d/init.d/swap
 etc/rc.d/init.d/swconfig
 etc/rc.d/init.d/sysctl
-etc/rc.d/init.d/sysklogd
+etc/rc.d/init.d/rsyslogd
 etc/rc.d/init.d/template
 etc/rc.d/init.d/udev
 etc/rc.d/init.d/udev_retry
@@ -108,7 +108,7 @@ etc/rc.d/rc0.d/K80network
 etc/rc.d/rc0.d/K82wlanclient
 #etc/rc.d/rc0.d/K84bluetooth
 #etc/rc.d/rc0.d/K85messagebus
-etc/rc.d/rc0.d/K90sysklogd
+etc/rc.d/rc0.d/K90rsyslogd
 etc/rc.d/rc0.d/S60sendsignals
 etc/rc.d/rc0.d/S70localnet
 etc/rc.d/rc0.d/S80mountfs
@@ -116,7 +116,7 @@ etc/rc.d/rc0.d/S90swap
 etc/rc.d/rc0.d/S99halt
 #etc/rc.d/rc3.d
 etc/rc.d/rc3.d/S01vnstat
-etc/rc.d/rc3.d/S10sysklogd
+etc/rc.d/rc3.d/S10rsyslogd
 etc/rc.d/rc3.d/S11unbound
 etc/rc.d/rc3.d/S15fireinfo
 #etc/rc.d/rc3.d/S15messagebus
@@ -157,7 +157,7 @@ etc/rc.d/rc6.d/K80network
 etc/rc.d/rc6.d/K82wlanclient
 #etc/rc.d/rc6.d/K84bluetooth
 #etc/rc.d/rc6.d/K85messagebus
-etc/rc.d/rc6.d/K90sysklogd
+etc/rc.d/rc6.d/K90rsyslogd
 etc/rc.d/rc6.d/S60sendsignals
 etc/rc.d/rc6.d/S70mountfs
 etc/rc.d/rc6.d/S80swap
diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts
index 67e495c..21edcc7 100644
--- a/config/rootfiles/common/i586/initscripts
+++ b/config/rootfiles/common/i586/initscripts
@@ -79,7 +79,7 @@ etc/rc.d/init.d/sshd
 etc/rc.d/init.d/static-routes
 etc/rc.d/init.d/swap
 etc/rc.d/init.d/sysctl
-etc/rc.d/init.d/sysklogd
+etc/rc.d/init.d/rsyslogd
 etc/rc.d/init.d/template
 etc/rc.d/init.d/udev
 etc/rc.d/init.d/udev_retry
@@ -109,7 +109,7 @@ etc/rc.d/rc0.d/K82wlanclient
 #etc/rc.d/rc0.d/K84bluetooth
 #etc/rc.d/rc0.d/K85messagebus
 etc/rc.d/rc0.d/K87acpid
-etc/rc.d/rc0.d/K90sysklogd
+etc/rc.d/rc0.d/K90rsyslogd
 etc/rc.d/rc0.d/S60sendsignals
 etc/rc.d/rc0.d/S70localnet
 etc/rc.d/rc0.d/S80mountfs
@@ -117,7 +117,7 @@ etc/rc.d/rc0.d/S90swap
 etc/rc.d/rc0.d/S99halt
 #etc/rc.d/rc3.d
 etc/rc.d/rc3.d/S01vnstat
-etc/rc.d/rc3.d/S10sysklogd
+etc/rc.d/rc3.d/S10rsyslogd
 etc/rc.d/rc3.d/S12acpid
 etc/rc.d/rc3.d/S15fireinfo
 #etc/rc.d/rc3.d/S15messagebus
@@ -160,7 +160,7 @@ etc/rc.d/rc6.d/K82wlanclient
 #etc/rc.d/rc6.d/K84bluetooth
 #etc/rc.d/rc6.d/K85messagebus
 etc/rc.d/rc6.d/K87acpid
-etc/rc.d/rc6.d/K90sysklogd
+etc/rc.d/rc6.d/K90rsyslogd
 etc/rc.d/rc6.d/S60sendsignals
 etc/rc.d/rc6.d/S70mountfs
 etc/rc.d/rc6.d/S80swap
diff --git a/config/rootfiles/common/libestr b/config/rootfiles/common/libestr
new file mode 100644
index 0000000..d58e7a9
--- /dev/null
+++ b/config/rootfiles/common/libestr
@@ -0,0 +1,6 @@
+#usr/include/libestr.h
+#usr/lib/libestr.la
+#usr/lib/libestr.so
+usr/lib/libestr.so.0
+usr/lib/libestr.so.0.0.0
+#usr/lib/pkgconfig/libestr.pc
diff --git a/config/rootfiles/common/libfastjson b/config/rootfiles/common/libfastjson
new file mode 100644
index 0000000..f7611e1
--- /dev/null
+++ b/config/rootfiles/common/libfastjson
@@ -0,0 +1,13 @@
+#usr/include/libfastjson
+#usr/include/libfastjson/atomic.h
+#usr/include/libfastjson/json.h
+#usr/include/libfastjson/json_object.h
+#usr/include/libfastjson/json_object_iterator.h
+#usr/include/libfastjson/json_object_private.h
+#usr/include/libfastjson/json_tokener.h
+#usr/include/libfastjson/json_util.h
+#usr/lib/libfastjson.la
+#usr/lib/libfastjson.so
+usr/lib/libfastjson.so.4
+usr/lib/libfastjson.so.4.2.0
+#usr/lib/pkgconfig/libfastjson.pc
diff --git a/config/rootfiles/common/liblogging b/config/rootfiles/common/liblogging
new file mode 100644
index 0000000..e51bfd9
--- /dev/null
+++ b/config/rootfiles/common/liblogging
@@ -0,0 +1,10 @@
+#usr/bin/stdlogctl
+#usr/include/liblogging
+#usr/include/liblogging/stdlog.h
+#usr/lib/liblogging-stdlog.la
+#usr/lib/liblogging-stdlog.so
+usr/lib/liblogging-stdlog.so.0
+usr/lib/liblogging-stdlog.so.0.1.0
+#usr/lib/pkgconfig/liblogging-stdlog.pc
+#usr/share/man/man1/stdlogctl.1
+#usr/share/man/man3/stdlog.3
diff --git a/config/rootfiles/common/logwatch b/config/rootfiles/common/logwatch
index fe67a8c..a6ec26d 100644
--- a/config/rootfiles/common/logwatch
+++ b/config/rootfiles/common/logwatch
@@ -56,7 +56,7 @@ usr/share/logwatch/default.conf/logfiles/samba.conf
 #usr/share/logwatch/default.conf/logfiles/secure.conf
 #usr/share/logwatch/default.conf/logfiles/sonicwall.conf
 #usr/share/logwatch/default.conf/logfiles/spamassassin.conf
-usr/share/logwatch/default.conf/logfiles/syslog.conf
+#usr/share/logwatch/default.conf/logfiles/syslog.conf
 #usr/share/logwatch/default.conf/logfiles/tac_acc.conf
 #usr/share/logwatch/default.conf/logfiles/tivoli-smc.conf
 #usr/share/logwatch/default.conf/logfiles/up2date.conf
@@ -146,7 +146,7 @@ usr/share/logwatch/default.conf/services/postfix.conf
 #usr/share/logwatch/default.conf/services/qmail.conf
 #usr/share/logwatch/default.conf/services/raid.conf
 usr/share/logwatch/default.conf/services/resolver.conf
-#usr/share/logwatch/default.conf/services/rsyslogd.conf
+usr/share/logwatch/default.conf/services/rsyslogd.conf
 #usr/share/logwatch/default.conf/services/rt314.conf
 usr/share/logwatch/default.conf/services/samba.conf
 usr/share/logwatch/default.conf/services/saslauthd.conf
@@ -290,7 +290,7 @@ usr/share/logwatch/scripts/services/postfix
 #usr/share/logwatch/scripts/services/qmail-smtpd
 #usr/share/logwatch/scripts/services/raid
 usr/share/logwatch/scripts/services/resolver
-#usr/share/logwatch/scripts/services/rsyslogd
+usr/share/logwatch/scripts/services/rsyslogd
 #usr/share/logwatch/scripts/services/rt314
 usr/share/logwatch/scripts/services/samba
 usr/share/logwatch/scripts/services/saslauthd
diff --git a/config/rootfiles/common/rsyslog b/config/rootfiles/common/rsyslog
new file mode 100644
index 0000000..0eb4dd4
--- /dev/null
+++ b/config/rootfiles/common/rsyslog
@@ -0,0 +1,42 @@
+etc/rc.d/init.d/rsyslogd
+etc/rsyslog.conf
+etc/rsyslog.d
+usr/bin/rscryutil
+#usr/lib/rsyslog
+#usr/lib/rsyslog/imklog.la
+usr/lib/rsyslog/imklog.so
+#usr/lib/rsyslog/immark.la
+usr/lib/rsyslog/immark.so
+#usr/lib/rsyslog/imtcp.la
+usr/lib/rsyslog/imtcp.so
+#usr/lib/rsyslog/imudp.la
+usr/lib/rsyslog/imudp.so
+#usr/lib/rsyslog/imuxsock.la
+usr/lib/rsyslog/imuxsock.so
+#usr/lib/rsyslog/lmcry_gcry.la
+usr/lib/rsyslog/lmcry_gcry.so
+#usr/lib/rsyslog/lmnet.la
+usr/lib/rsyslog/lmnet.so
+#usr/lib/rsyslog/lmnetstrms.la
+usr/lib/rsyslog/lmnetstrms.so
+#usr/lib/rsyslog/lmnsd_ptcp.la
+usr/lib/rsyslog/lmnsd_ptcp.so
+#usr/lib/rsyslog/lmregexp.la
+usr/lib/rsyslog/lmregexp.so
+#usr/lib/rsyslog/lmstrmsrv.la
+usr/lib/rsyslog/lmstrmsrv.so
+#usr/lib/rsyslog/lmtcpclt.la
+usr/lib/rsyslog/lmtcpclt.so
+#usr/lib/rsyslog/lmtcpsrv.la
+usr/lib/rsyslog/lmtcpsrv.so
+#usr/lib/rsyslog/lmzlibw.la
+usr/lib/rsyslog/lmzlibw.so
+#usr/lib/rsyslog/mmexternal.la
+usr/lib/rsyslog/mmexternal.so
+#usr/lib/rsyslog/omtesting.la
+usr/lib/rsyslog/omtesting.so
+usr/sbin/rsyslogd
+#usr/share/man/man5/rsyslog.conf.5
+#usr/share/man/man8/rsyslogd.8
+var/log/dhcpcd.log
+var/log/messages
diff --git a/config/rootfiles/common/stage2 b/config/rootfiles/common/stage2
index a5ba6ae..953255b 100644
--- a/config/rootfiles/common/stage2
+++ b/config/rootfiles/common/stage2
@@ -42,7 +42,7 @@ etc/profile.d/umask.sh
 etc/resolv.conf
 etc/securetty
 etc/sysctl.conf
-etc/syslog.conf
+etc/rsyslog.conf
 etc/system-release
 #home
 home/nobody
diff --git a/config/rootfiles/common/sysklogd b/config/rootfiles/common/sysklogd
deleted file mode 100644
index f5d55c2..0000000
--- a/config/rootfiles/common/sysklogd
+++ /dev/null
@@ -1,8 +0,0 @@
-usr/sbin/klogd
-usr/sbin/syslogd
-#usr/share/man/man5/syslog.conf.5
-#usr/share/man/man8/klogd.8
-#usr/share/man/man8/sysklogd.8
-#usr/share/man/man8/syslogd.8
-var/log/dhcpcd.log
-var/log/messages
diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts
index 67e495c..21edcc7 100644
--- a/config/rootfiles/common/x86_64/initscripts
+++ b/config/rootfiles/common/x86_64/initscripts
@@ -79,7 +79,7 @@ etc/rc.d/init.d/sshd
 etc/rc.d/init.d/static-routes
 etc/rc.d/init.d/swap
 etc/rc.d/init.d/sysctl
-etc/rc.d/init.d/sysklogd
+etc/rc.d/init.d/rsyslogd
 etc/rc.d/init.d/template
 etc/rc.d/init.d/udev
 etc/rc.d/init.d/udev_retry
@@ -109,7 +109,7 @@ etc/rc.d/rc0.d/K82wlanclient
 #etc/rc.d/rc0.d/K84bluetooth
 #etc/rc.d/rc0.d/K85messagebus
 etc/rc.d/rc0.d/K87acpid
-etc/rc.d/rc0.d/K90sysklogd
+etc/rc.d/rc0.d/K90rsyslogd
 etc/rc.d/rc0.d/S60sendsignals
 etc/rc.d/rc0.d/S70localnet
 etc/rc.d/rc0.d/S80mountfs
@@ -117,7 +117,7 @@ etc/rc.d/rc0.d/S90swap
 etc/rc.d/rc0.d/S99halt
 #etc/rc.d/rc3.d
 etc/rc.d/rc3.d/S01vnstat
-etc/rc.d/rc3.d/S10sysklogd
+etc/rc.d/rc3.d/S10rsyslogd
 etc/rc.d/rc3.d/S12acpid
 etc/rc.d/rc3.d/S15fireinfo
 #etc/rc.d/rc3.d/S15messagebus
@@ -160,7 +160,7 @@ etc/rc.d/rc6.d/K82wlanclient
 #etc/rc.d/rc6.d/K84bluetooth
 #etc/rc.d/rc6.d/K85messagebus
 etc/rc.d/rc6.d/K87acpid
-etc/rc.d/rc6.d/K90sysklogd
+etc/rc.d/rc6.d/K90rsyslogd
 etc/rc.d/rc6.d/S60sendsignals
 etc/rc.d/rc6.d/S70mountfs
 etc/rc.d/rc6.d/S80swap
diff --git a/config/rootfiles/common/x86_64/stage2 b/config/rootfiles/common/x86_64/stage2
index 70a33d6..b8cb01b 100644
--- a/config/rootfiles/common/x86_64/stage2
+++ b/config/rootfiles/common/x86_64/stage2
@@ -42,7 +42,7 @@ etc/profile.d/umask.sh
 etc/resolv.conf
 etc/securetty
 etc/sysctl.conf
-etc/syslog.conf
+etc/rsyslog.conf
 etc/system-release
 #home
 home/nobody
diff --git a/lfs/initscripts b/lfs/initscripts
index 9d3a52c..df6f0a5 100644
--- a/lfs/initscripts
+++ b/lfs/initscripts
@@ -92,13 +92,13 @@ $(TARGET) :
 		install -v -m 755 $$i /etc/rc.d/helper/; \
 	done
 
-	ln -sf ../init.d/sysklogd    /etc/rc.d/rc0.d/K90sysklogd
+	ln -sf ../init.d/rsyslogd    /etc/rc.d/rc0.d/K90rsyslogd
 	ln -sf ../init.d/sendsignals /etc/rc.d/rc0.d/S60sendsignals
 	ln -sf ../init.d/localnet    /etc/rc.d/rc0.d/S70localnet
 	ln -sf ../init.d/mountfs     /etc/rc.d/rc0.d/S80mountfs
 	ln -sf ../init.d/swap        /etc/rc.d/rc0.d/S90swap
 	ln -sf ../init.d/halt        /etc/rc.d/rc0.d/S99halt
-	ln -sf ../init.d/sysklogd    /etc/rc.d/rc3.d/S10sysklogd
+	ln -sf ../init.d/rsyslogd    /etc/rc.d/rc3.d/S10rsyslogd
 	ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
 	ln -sf ../init.d/messagebus  /etc/rc.d/rc3.d/S15messagebus
 	ln -sf ../init.d/messagebus  /etc/rc.d/rc0.d/K85messagebus
@@ -107,7 +107,7 @@ $(TARGET) :
 	ln -sf ../init.d/bluetooth   /etc/rc.d/rc0.d/K84bluetooth
 	ln -sf ../init.d/bluetooth   /etc/rc.d/rc6.d/K84bluetooth
 	ln -sf ../init.d/cpufreq     /etc/rc.d/rc3.d/S18cpufreq
-	ln -sf ../init.d/sysklogd    /etc/rc.d/rc6.d/K90sysklogd
+	ln -sf ../init.d/rsyslogd    /etc/rc.d/rc6.d/K90rsyslogd
 	ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
 	ln -sf ../init.d/mountfs     /etc/rc.d/rc6.d/S70mountfs
 	ln -sf ../init.d/swap        /etc/rc.d/rc6.d/S80swap
diff --git a/lfs/libestr b/lfs/libestr
new file mode 100644
index 0000000..5e2d168
--- /dev/null
+++ b/lfs/libestr
@@ -0,0 +1,86 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 0.1.10
+
+THISAPP    = libestr-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = libestr
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = f4c9165a23587e77f7efe65d676d5e8e
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && ./configure	\
+		--prefix=/usr		\
+		--enable-static=no
+
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
+
diff --git a/lfs/libfastjson b/lfs/libfastjson
new file mode 100644
index 0000000..80f41af
--- /dev/null
+++ b/lfs/libfastjson
@@ -0,0 +1,86 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 0.99.8
+
+THISAPP    = libfastjson-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = libfastjson
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = fe7b4eae1bf40499f6f92b51d7e5899e
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && ./configure	\
+		--prefix=/usr		\
+		--enable-static=no
+
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
+
diff --git a/lfs/liblogging b/lfs/liblogging
new file mode 100644
index 0000000..22ae480
--- /dev/null
+++ b/lfs/liblogging
@@ -0,0 +1,86 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 1.0.6
+
+THISAPP    = liblogging-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = liblogging
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = f215c7e7ac6cfd1f5dabdba08c522b29
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && ./configure	\
+		--prefix=/usr		\
+		--enable-static=no
+
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
+
diff --git a/lfs/rsyslog b/lfs/rsyslog
new file mode 100644
index 0000000..ebb3766
--- /dev/null
+++ b/lfs/rsyslog
@@ -0,0 +1,98 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2018  IPFire Team  <info(a)ipfire.org>                          #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 8.32.0
+
+THISAPP    = rsyslog-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = rsyslog
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = 0811aad3186bcae3b2dcd92063d9eb1d
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+dist: 
+	@$(PAK)
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+
+	cd $(DIR_APP) && ./configure	\
+		--prefix=/usr		\
+		--disable-largefile	\
+		--enable-usertools	\
+		CFLAGS="-L/lib"
+
+	cd $(DIR_APP) && make $(MAKETUNING)
+	cd $(DIR_APP) && make install
+
+	touch /var/log/{dhcpcd.log,messages}
+	chmod 664 /var/log/{dhcpcd.log,messages}
+	chown root:syslogd /var/log/{dhcpcd.log,messages}
+
+	# Add additional configuration directory
+	mkdir -v /etc/rsyslog.d
+	chown -R root:root /etc/rsyslog.d
+	chmod 755 /etc/rsyslog.d
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
+
diff --git a/make.sh b/make.sh
index c7b6eb8..043f0e4 100755
--- a/make.sh
+++ b/make.sh
@@ -1016,7 +1016,6 @@ buildbase() {
 	lfsmake2 patch
 	lfsmake2 psmisc
 	lfsmake2 shadow
-	lfsmake2 sysklogd
 	lfsmake2 sysvinit
 	lfsmake2 tar
 	lfsmake2 texinfo
@@ -1142,6 +1141,10 @@ buildipfire() {
   lfsmake2 gdbm
   lfsmake2 pam
   lfsmake2 curl
+  lfsmake2 libestr
+  lfsmake2 liblogging
+  lfsmake2 libfastjson
+  lfsmake2 rsyslog
   lfsmake2 tcl
   lfsmake2 sqlite
   lfsmake2 libffi
diff --git a/src/initscripts/system/rsyslogd b/src/initscripts/system/rsyslogd
new file mode 100644
index 0000000..cb9e6af
--- /dev/null
+++ b/src/initscripts/system/rsyslogd
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+#
+# Startup script for rsyslog.
+#
+# Short-Description: Enhanced system logging and kernel message trapping BINs
+#
+# $Author: ummeegge ipfire org
+# $Date: 02.02.2018
+#############################################################################
+#
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+NAME="rsyslogd"
+BIN="/usr/sbin/${NAME}"
+CONF="/etc/rsyslog.conf"
+lockfile="/var/lock/subsys/${NAME}"
+PIDFILE="/var/run/rsyslogd.pid"
+DESC="enhanced syslogd"
+SYSLOGD_OPTIONS="-i ${PIDFILE}"
+
+# Exit if the package is not installed
+[ -x ${BIN} ] || exit 5
+
+# Do not start rsyslog when sysklogd is running
+if [ -e /var/run/syslogd.pid ]; then
+	echo "Shut down sysklogd before you run rsyslog"
+	exit 1
+fi
+
+if ! grep -q "^tty:x:5:syslogd$" /etc/group; then
+    usermod -a -G tty syslogd
+fi
+
+# Add work dir if not presant
+if [ ! -e "/var/spool/${NAME}" ]; then
+        mkdir /var/spool/${NAME}
+fi
+
+case "${1}" in
+	start)
+		boot_mesg "Starting ${DESC}... "
+		loadproc ${BIN} ${SYSLOGD_OPTIONS}
+
+		boot_mesg "Saving Bootlog..."
+		if [ -e /var/log/bootlog ]; then
+		    mv -f /var/log/bootlog /var/log/bootlog.old
+		fi
+		dmesg -c > /var/log/bootlog
+
+		evaluate_retval && touch ${lockfile}
+	;;
+
+	stop)
+		boot_mesg "Stopping ${DESC}... "
+		killproc ${BIN}
+		rm -f ${PIDFILE} ${lockfile}
+	;;
+
+	reload)
+		boot_mesg "Reloading ${DESC}..."
+		reloadproc ${BIN} ${SYSLOGD_OPTIONS}
+	;;
+
+	restart)
+		${0} stop
+		sleep 1
+		${0} start
+	;;
+
+	status)
+		statusproc ${BIN}
+	;;
+
+	*)
+		echo "Usage: ${0} {start|stop|reload|restart|status}"
+		exit 1
+	;;
+esac
+
+# End $rc_base/init.d/rsyslog
+
diff --git a/src/initscripts/system/sysklogd b/src/initscripts/system/sysklogd
deleted file mode 100644
index 4482559..0000000
--- a/src/initscripts/system/sysklogd
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-########################################################################
-# Begin $rc_base/init.d/sysklogd
-#
-# Description : Sysklogd loader
-#
-# Authors     : Gerard Beekmans - gerard(a)linuxfromscratch.org
-#
-# Version     : 00.00
-#
-# Notes       :
-#
-########################################################################
-
-. /etc/sysconfig/rc
-. ${rc_functions}
-
-case "${1}" in
-	start)
-		boot_mesg "Starting kernel log daemon..."
-		loadproc klogd -c 1
-
-		boot_mesg "Starting system log daemon..."
-		loadproc syslogd -m 0
-
-		boot_mesg "Saving Bootlog..."
-		if [ -e /var/log/bootlog ]; then
-		    mv -f /var/log/bootlog /var/log/bootlog.old
-		fi
-		dmesg -c > /var/log/bootlog
-		evaluate_retval
-		;;
-	stop)
-		boot_mesg "Stopping kernel log daemon..."
-		killproc klogd
-
-		boot_mesg "Stopping system log daemon..."
-		killproc syslogd
-		;;
-
-	reload)
-		boot_mesg "Reloading system log daemon config file..."
-		reloadproc syslogd 1
-		;;
-
-	restart)
-		${0} stop
-		sleep 1
-		${0} start
-		;;
-
-	status)
-		statusproc syslogd
-		statusproc klogd
-		;;
-
-	*)
-		echo "Usage: ${0} {start|stop|reload|restart|status}"
-		exit 1
-		;;
-esac
-
-# End $rc_base/init.d/sysklogd
diff --git a/src/misc-progs/syslogdctrl.c b/src/misc-progs/syslogdctrl.c
index d73c422..e3d665b 100644
--- a/src/misc-progs/syslogdctrl.c
+++ b/src/misc-progs/syslogdctrl.c
@@ -106,7 +106,7 @@ int main(void)
 
    /* O_CREAT with O_EXCL will make open() fail if the file already exists -
     * mostly to prevent 2 copies running at once */
-   if ((config_fd = open( "/etc/syslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )
+   if ((config_fd = open( "/etc/rsyslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )
    {
       perror("Unable to open new config file");
       exit(ERR_CONFIG);
@@ -118,18 +118,18 @@ int main(void)
       if (strcmp(protocol, "tcp") == 0)
       {
          /* write line for TCP */
-         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@@%s/' /etc/syslog.conf >&%d", hostname, config_fd);
+         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@@%s/' /etc/rsyslog.conf >&%d", hostname, config_fd);
       }
       else
       {
          /* write line for UDP */
-         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@%s/' /etc/syslog.conf >&%d", hostname, config_fd);
+         snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+\\)@@\\?.\\+$/\\1@%s/' /etc/rsyslog.conf >&%d", hostname, config_fd);
       }
    }
    else
    {
       /* if remote syslog has been disabled */
-      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@@\\?.\\+\\)$/#\\1/' /etc/syslog.conf >&%d", config_fd );
+      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@@\\?.\\+\\)$/#\\1/' /etc/rsyslog.conf >&%d", config_fd );
    }
 
      /* if the return code isn't 0 failsafe */
@@ -137,31 +137,31 @@ int main(void)
    {
       fprintf(stderr, "sed returned bad exit code: %d\n", rc);
       close(config_fd);
-      unlink("/etc/syslog.conf.new");
+      unlink("/etc/rsyslog.conf.new");
       exit(ERR_CONFIG);
    }
    close(config_fd);
    
-   if (rename("/etc/syslog.conf.new", "/etc/syslog.conf") == -1)
+   if (rename("/etc/rsyslog.conf.new", "/etc/rsyslog.conf") == -1)
    {
       perror("Unable to replace old config file");
-      unlink("/etc/syslog.conf.new");
+      unlink("/etc/rsyslog.conf.new");
       exit(ERR_CONFIG);
    }
 
 
    /* Get syslogd to read the new config file */
-   if ((fd = open("/var/run/syslogd.pid", O_RDONLY)) == -1)
+   if ((fd = open("/var/run/rsyslogd.pid", O_RDONLY)) == -1)
    {
       if(errno == ENOENT)
       {
          /* pid file doesn't exists.. restart syslog */
-         if((rc = safe_system("/usr/sbin/syslogd u syslogd -m 0")) == 0 )
+         if((rc = safe_system("/etc/init.d/rsyslog restart")) == 0 )
             return 0;
          else
          {
             fprintf(stderr,
-               "Unable to restart syslogd - returned exit code %d\n", rc);
+               "Unable to restart rsyslogd - returned exit code %d\n", rc);
             exit(ERR_SYSLOG);
          }
       } else {
-- 
2.7.4


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

end of thread, other threads:[~2018-04-10  9:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1517906901-30146-1-git-send-email-erik.kapfer@ipfire.org>
2018-04-08 17:47 ` [PATCH] Rsyslog: New advanced syslogger [TESTING] ummeegge
2018-04-09 17:43   ` Peter Müller
2018-04-10  9:29     ` ummeegge
2018-02-06  8:56 Erik Kapfer
2018-02-06  9:14 ` ummeegge
2018-02-13  6:26   ` ummeegge
2018-02-13 10:09     ` Michael Tremer
2018-02-13 12:41       ` ummeegge
2018-02-14 11:52         ` Michael Tremer
2018-02-14 14:17           ` ummeegge
2018-02-14 20:29             ` Michael Tremer
2018-02-27 12:38     ` ummeegge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox