mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] sysklogd: Add new package.
@ 2021-10-18  7:14 Christian Melki
  2021-10-26  9:09 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Melki @ 2021-10-18  7:14 UTC (permalink / raw)
  To: ptxdist

Changes in v2:

* Add handling for similar functions in busybox.
* Example config installed as fallback in install_alternative
* Old syntax configuration replaced with modern one.
* Whitespace and ifdef corrections.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 rules/sysklogd-bbinit.in |  8 ++++
 rules/sysklogd.in        | 42 +++++++++++++++++++
 rules/sysklogd.make      | 90 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 140 insertions(+)
 create mode 100644 rules/sysklogd-bbinit.in
 create mode 100644 rules/sysklogd.in
 create mode 100644 rules/sysklogd.make

diff --git a/rules/sysklogd-bbinit.in b/rules/sysklogd-bbinit.in
new file mode 100644
index 000000000..ea8f80832
--- /dev/null
+++ b/rules/sysklogd-bbinit.in
@@ -0,0 +1,8 @@
+## SECTION=initmethod_bbinit
+
+config SYSKLOGD_BBINIT_LINK
+	string
+	depends on SYSKLOGD_STARTSCRIPT
+	prompt "syslogd"
+	default "S10syslogd"
+
diff --git a/rules/sysklogd.in b/rules/sysklogd.in
new file mode 100644
index 000000000..e841e1935
--- /dev/null
+++ b/rules/sysklogd.in
@@ -0,0 +1,42 @@
+## SECTION=networking
+
+menuconfig SYSKLOGD
+	tristate
+	prompt "sysklogd                      "
+	depends on !BUSYBOX_SYSLOGD || ALLYES
+	depends on !BUSYBOX_LOGGER || ALLYES
+	select SYSTEMD		if SYSKLOGD_SYSTEMD
+	help
+	  The venerable BSD syslogd and klogd rolled into one syslogd.
+	  This is a maintained and updated variant of the same.
+
+comment "BusyBox' syslogd is selected!"
+	depends on BUSYBOX_SYSLOGD
+
+comment "BusyBox' logger is selected!"
+	depends on BUSYBOX_LOGGER
+
+if SYSKLOGD
+
+comment "runtime options   ---"
+
+config SYSKLOGD_SYSTEMD
+	bool
+	default y
+	prompt "Enable systemd support"
+	depends on INITMETHOD_SYSTEMD
+	help
+	  Installs the systemd service file and enables support for the
+	  systemd-journal
+
+config SYSKLOGD_STARTSCRIPT
+	bool
+	default y
+	depends on INITMETHOD_BBINIT
+	help
+	  Installs (if present) the
+	  "./projectroot/etc/init.d/syslogd" startscript from your
+	  workspace, otherwise a generic one from the ptxdist
+	  installation ("<PTXDIST>/projectroot/etc/init.d/syslogd").
+
+endif
diff --git a/rules/sysklogd.make b/rules/sysklogd.make
new file mode 100644
index 000000000..27c79f4e0
--- /dev/null
+++ b/rules/sysklogd.make
@@ -0,0 +1,90 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Christian Melki <christian.melki@t2data.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SYSKLOGD) += sysklogd
+
+#
+# Paths and names
+#
+SYSKLOGD_VERSION	:= 2.2.3
+SYSKLOGD_MD5		:= 2c6749c49f52b8c5dad18e9a9315e7dd
+SYSKLOGD		:= sysklogd-$(SYSKLOGD_VERSION)
+SYSKLOGD_SUFFIX		:= tar.gz
+SYSKLOGD_URL		:= https://github.com/troglobit/sysklogd/releases/download/v$(SYSKLOGD_VERSION)/$(SYSKLOGD).$(SYSKLOGD_SUFFIX)
+SYSKLOGD_SOURCE		:= $(SRCDIR)/$(SYSKLOGD).$(SYSKLOGD_SUFFIX)
+SYSKLOGD_DIR		:= $(BUILDDIR)/$(SYSKLOGD)
+SYSKLOGD_LICENSE	:= BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+SYSKLOGD_CONF_TOOL = autoconf
+SYSKLOGD_CONF_OPT = \
+	$(CROSS_AUTOCONF_USR)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sysklogd.install:
+	@$(call targetinfo)
+	@$(call world/install, SYSKLOGD)
+	@install -vD -m 644 $(SYSKLOGD_DIR)/syslog.conf \
+		$(SYSKLOGD_PKGDIR)/etc/syslog.conf
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sysklogd.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sysklogd)
+	@$(call install_fixup, sysklogd,PRIORITY,optional)
+	@$(call install_fixup, sysklogd,SECTION,base)
+	@$(call install_fixup, sysklogd,AUTHOR,"Christian Melki <christian.melki@t2data.com>")
+	@$(call install_fixup, sysklogd,DESCRIPTION,missing)
+
+	@$(call install_copy, sysklogd, 0, 0, 0755, -, /usr/bin/logger)
+	@$(call install_copy, sysklogd, 0, 0, 0755, -, /usr/sbin/syslogd)
+	@$(call install_lib, sysklogd, 0, 0, 0644, libsyslog)
+
+	@$(call install_alternative, sysklogd, 0, 0, 0644, /etc/syslog.conf, n)
+
+ifdef PTXCONF_SYSKLOGD_STARTSCRIPT
+	@$(call install_alternative, sysklogd, 0, 0, 0755, /etc/init.d/syslogd, n)
+
+ifneq ($(call remove_quotes,$(PTXCONF_SYSKLOGD_BBINIT_LINK)),)
+	@$(call install_link, sysklogd, \
+		../init.d/syslogd, \
+		/etc/rc.d/$(PTXCONF_SYSKLOGD_BBINIT_LINK))
+endif
+endif
+
+ifdef PTXCONF_INITMETHOD_SYSTEMD
+	@$(call install_alternative, sysklogd, 0, 0, 0644, \
+		/usr/lib/systemd/system/sysklogd.service)
+	@$(call install_link, sysklogd, ../syslogd.service, \
+		/usr/lib/systemd/system/multi-user.target.wants/syslogd.service)
+	@$(call install_link, sysklogd, syslogd.service, \
+		/usr/lib/systemd/system/syslog.service)
+endif
+
+	@$(call install_finish, sysklogd)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] [APPLIED] sysklogd: Add new package.
  2021-10-18  7:14 [ptxdist] [PATCH v2] sysklogd: Add new package Christian Melki
@ 2021-10-26  9:09 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2021-10-26  9:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Christian Melki

Thanks, applied as 822b224b012890cd8b621bb9b32bef6b0bea18c0.

Michael

[sent from post-receive hook]

On Tue, 26 Oct 2021 11:09:17 +0200, Christian Melki <christian.melki@t2data.com> wrote:
> Changes in v2:
> 
> * Add handling for similar functions in busybox.
> * Example config installed as fallback in install_alternative
> * Old syntax configuration replaced with modern one.
> * Whitespace and ifdef corrections.
> 
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> Message-Id: <20211018071453.3769512-1-christian.melki@t2data.com>
> [mol: fix service file name in targetinstall]
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/sysklogd-bbinit.in b/rules/sysklogd-bbinit.in
> new file mode 100644
> index 000000000000..ea8f8083287b
> --- /dev/null
> +++ b/rules/sysklogd-bbinit.in
> @@ -0,0 +1,8 @@
> +## SECTION=initmethod_bbinit
> +
> +config SYSKLOGD_BBINIT_LINK
> +	string
> +	depends on SYSKLOGD_STARTSCRIPT
> +	prompt "syslogd"
> +	default "S10syslogd"
> +
> diff --git a/rules/sysklogd.in b/rules/sysklogd.in
> new file mode 100644
> index 000000000000..e841e1935a1a
> --- /dev/null
> +++ b/rules/sysklogd.in
> @@ -0,0 +1,42 @@
> +## SECTION=networking
> +
> +menuconfig SYSKLOGD
> +	tristate
> +	prompt "sysklogd                      "
> +	depends on !BUSYBOX_SYSLOGD || ALLYES
> +	depends on !BUSYBOX_LOGGER || ALLYES
> +	select SYSTEMD		if SYSKLOGD_SYSTEMD
> +	help
> +	  The venerable BSD syslogd and klogd rolled into one syslogd.
> +	  This is a maintained and updated variant of the same.
> +
> +comment "BusyBox' syslogd is selected!"
> +	depends on BUSYBOX_SYSLOGD
> +
> +comment "BusyBox' logger is selected!"
> +	depends on BUSYBOX_LOGGER
> +
> +if SYSKLOGD
> +
> +comment "runtime options   ---"
> +
> +config SYSKLOGD_SYSTEMD
> +	bool
> +	default y
> +	prompt "Enable systemd support"
> +	depends on INITMETHOD_SYSTEMD
> +	help
> +	  Installs the systemd service file and enables support for the
> +	  systemd-journal
> +
> +config SYSKLOGD_STARTSCRIPT
> +	bool
> +	default y
> +	depends on INITMETHOD_BBINIT
> +	help
> +	  Installs (if present) the
> +	  "./projectroot/etc/init.d/syslogd" startscript from your
> +	  workspace, otherwise a generic one from the ptxdist
> +	  installation ("<PTXDIST>/projectroot/etc/init.d/syslogd").
> +
> +endif
> diff --git a/rules/sysklogd.make b/rules/sysklogd.make
> new file mode 100644
> index 000000000000..b3ad40be32fb
> --- /dev/null
> +++ b/rules/sysklogd.make
> @@ -0,0 +1,90 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Christian Melki <christian.melki@t2data.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_SYSKLOGD) += sysklogd
> +
> +#
> +# Paths and names
> +#
> +SYSKLOGD_VERSION	:= 2.2.3
> +SYSKLOGD_MD5		:= 2c6749c49f52b8c5dad18e9a9315e7dd
> +SYSKLOGD		:= sysklogd-$(SYSKLOGD_VERSION)
> +SYSKLOGD_SUFFIX		:= tar.gz
> +SYSKLOGD_URL		:= https://github.com/troglobit/sysklogd/releases/download/v$(SYSKLOGD_VERSION)/$(SYSKLOGD).$(SYSKLOGD_SUFFIX)
> +SYSKLOGD_SOURCE		:= $(SRCDIR)/$(SYSKLOGD).$(SYSKLOGD_SUFFIX)
> +SYSKLOGD_DIR		:= $(BUILDDIR)/$(SYSKLOGD)
> +SYSKLOGD_LICENSE	:= BSD-3-Clause
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +SYSKLOGD_CONF_TOOL = autoconf
> +SYSKLOGD_CONF_OPT = \
> +	$(CROSS_AUTOCONF_USR)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/sysklogd.install:
> +	@$(call targetinfo)
> +	@$(call world/install, SYSKLOGD)
> +	@install -vD -m 644 $(SYSKLOGD_DIR)/syslog.conf \
> +		$(SYSKLOGD_PKGDIR)/etc/syslog.conf
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/sysklogd.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, sysklogd)
> +	@$(call install_fixup, sysklogd,PRIORITY,optional)
> +	@$(call install_fixup, sysklogd,SECTION,base)
> +	@$(call install_fixup, sysklogd,AUTHOR,"Christian Melki <christian.melki@t2data.com>")
> +	@$(call install_fixup, sysklogd,DESCRIPTION,missing)
> +
> +	@$(call install_copy, sysklogd, 0, 0, 0755, -, /usr/bin/logger)
> +	@$(call install_copy, sysklogd, 0, 0, 0755, -, /usr/sbin/syslogd)
> +	@$(call install_lib, sysklogd, 0, 0, 0644, libsyslog)
> +
> +	@$(call install_alternative, sysklogd, 0, 0, 0644, /etc/syslog.conf)
> +
> +ifdef PTXCONF_SYSKLOGD_STARTSCRIPT
> +	@$(call install_alternative, sysklogd, 0, 0, 0755, /etc/init.d/syslogd)
> +
> +ifneq ($(call remove_quotes,$(PTXCONF_SYSKLOGD_BBINIT_LINK)),)
> +	@$(call install_link, sysklogd, \
> +		../init.d/syslogd, \
> +		/etc/rc.d/$(PTXCONF_SYSKLOGD_BBINIT_LINK))
> +endif
> +endif
> +
> +ifdef PTXCONF_INITMETHOD_SYSTEMD
> +	@$(call install_alternative, sysklogd, 0, 0, 0644, \
> +		/usr/lib/systemd/system/syslogd.service)
> +	@$(call install_link, sysklogd, ../syslogd.service, \
> +		/usr/lib/systemd/system/multi-user.target.wants/syslogd.service)
> +	@$(call install_link, sysklogd, syslogd.service, \
> +		/usr/lib/systemd/system/syslog.service)
> +endif
> +
> +	@$(call install_finish, sysklogd)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

end of thread, other threads:[~2021-10-26  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  7:14 [ptxdist] [PATCH v2] sysklogd: Add new package Christian Melki
2021-10-26  9:09 ` [ptxdist] [APPLIED] " Michael Olbrich

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