summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/sysklogd
diff options
context:
space:
mode:
authorPierre-Jean Texier <pjtexier@koncepto.io>2020-03-01 14:14:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-02 21:00:53 +0000
commit5fb445614eb8d6d68aaf42770462a5fc4f243903 (patch)
treee5128def9ad1de83af11a47ed69bfd2a0f271b4d /meta/recipes-extended/sysklogd
parent2af240a7d409c9b1988006ebc1a145046fccca41 (diff)
downloadpoky-5fb445614eb8d6d68aaf42770462a5fc4f243903.tar.gz
sysklogd: upgrade 2.0.3 -> 2.1.1
License-Update: Relicensed under the BSD-3-Clause license since v2.1 Remove patches applied upstream. Since version v2.1, klogd was removed from the sysklogd project since syslogd performs logging of kernel messages. So, this patch remove klogd support. (From OE-Core rev: c28457322eb6a141d0e8c66fc1c7eee681c0fe88) Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/sysklogd')
-rw-r--r--meta/recipes-extended/sysklogd/files/0001-Drop-libcompat-to-simplify-build-deps-and-really-fix.patch127
-rw-r--r--meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch44
-rw-r--r--meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch29
-rwxr-xr-xmeta/recipes-extended/sysklogd/files/sysklogd22
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc16
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb3
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd_2.1.1.bb3
7 files changed, 8 insertions, 236 deletions
diff --git a/meta/recipes-extended/sysklogd/files/0001-Drop-libcompat-to-simplify-build-deps-and-really-fix.patch b/meta/recipes-extended/sysklogd/files/0001-Drop-libcompat-to-simplify-build-deps-and-really-fix.patch
deleted file mode 100644
index 9ba7ecc2b0..0000000000
--- a/meta/recipes-extended/sysklogd/files/0001-Drop-libcompat-to-simplify-build-deps-and-really-fix.patch
+++ /dev/null
@@ -1,127 +0,0 @@
1From 84d70e63fc105e3713943ed8c0bdd4e31a698226 Mon Sep 17
200:00:00 2001 From: Joachim Nilsson <troglobit@gmail.com> Date: Thu, 16 Jan
32020 22:16:51 +0100 Subject: [PATCH] Drop libcompat to simplify build deps
4and really fix
5
6The original idea with libcompat was to keep as few objects as
7possible for linking with libsyslog. That in turn to prevent
8a user of libsyslog from suddenly also getting strong binding
9to symbols like strlcpy() from libsyslog, rather than their C
10library of choice.
11
12However, this caused strlcpy.c to be built as both .o and .lo
13files, which in turn caused really bizarre build problems due
14to bad DAG dependency.
15
16This patch drops libcompat and instead marks all replacement APIs
17as weak symbols, which a C library can override.
18
19Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
20
21Upstream-Status: Backport
22[https://github.com/troglobit/sysklogd/commit/84d70e63fc105e3713943ed8c0bdd4e31a698226]
23
24Signed-off-by: Changqing Li <changqing.li@windriver.com>
25---
26 lib/pidfile.c | 8 +++++++-
27 lib/utimensat.c | 10 ++++++++--
28 src/Makefile.am | 7 +------
29 3 files changed, 16 insertions(+), 9 deletions(-)
30
31diff --git a/lib/pidfile.c b/lib/pidfile.c
32index 81f2315..25b1c04 100644
33--- a/lib/pidfile.c
34+++ b/lib/pidfile.c
35@@ -31,6 +31,9 @@
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39+#include <config.h>
40+#ifndef HAVE_PIDFILE
41+
42 #define _GNU_SOURCE /* Needed with GLIBC to get asprintf() */
43 #include <sys/stat.h> /* utimensat() */
44 #include <sys/time.h> /* utimensat() on *BSD */
45@@ -54,7 +57,7 @@ const char *__pidfile_path = RUNSTATEDIR;
46 const char *__pidfile_name = NULL;
47
48 int
49-pidfile(const char *basename)
50+__pidfile(const char *basename)
51 {
52 int save_errno;
53 int atexit_already;
54@@ -127,6 +130,9 @@ pidfile(const char *basename)
55 return (0);
56 }
57
58+weak_alias(__pidfile, pidfile);
59+#endif /* HAVE_PIDFILE */
60+
61 static void
62 pidfile_cleanup(void)
63 {
64diff --git a/lib/utimensat.c b/lib/utimensat.c
65index edf7e10..b68ce0e 100644
66--- a/lib/utimensat.c
67+++ b/lib/utimensat.c
68@@ -15,7 +15,8 @@
69 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
70 */
71
72-#include "config.h"
73+#include <config.h>
74+#ifndef HAVE_UTIMENSAT
75
76 #include <errno.h>
77 #ifdef HAVE_FCNTL_H
78@@ -23,7 +24,8 @@
79 #endif
80 #include <sys/time.h> /* lutimes(), utimes(), utimensat() */
81
82-int utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
83+int
84+__utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int flags)
85 {
86 int ret = -1;
87 struct timeval tv[2];
88@@ -45,3 +47,7 @@ int utimensat(int dirfd, const char *pathname, const struct timespec ts[2], int
89
90 return ret;
91 }
92+
93+weak_alias(__utimensat, utimensat);
94+
95+#endif /* HAVE_UTIMENSAT */
96diff --git a/src/Makefile.am b/src/Makefile.am
97index 6e2a51c..1db88d3 100644
98--- a/src/Makefile.am
99+++ b/src/Makefile.am
100@@ -19,7 +19,6 @@
101 bin_PROGRAMS =
102 sbin_PROGRAMS = syslogd
103 lib_LTLIBRARIES = libsyslog.la
104-noinst_LTLIBRARIES = libcompat.la
105
106 if ENABLE_KLOGD
107 sbin_PROGRAMS += klogd
108@@ -48,10 +47,6 @@ logger_CPPFLAGS = $(AM_CPPFLAGS) -D_XOPEN_SOURCE=600
109 logger_LDADD = $(LIBS) $(LIBOBJS)
110 logger_LDADD += libsyslog.la
111
112-# Convenience library for libsyslog instead of linking with $(LTLIBOBJS),
113-# which would pull in pidfile() and other (strong) symbols as well.
114-libcompat_la_SOURCES = ../lib/strlcpy.c ../lib/strlcat.c
115-
116 pkgconfigdir = $(libdir)/pkgconfig
117 pkgincludedir = $(includedir)/syslog
118 pkgconfig_DATA = libsyslog.pc
119@@ -59,4 +54,4 @@ pkginclude_HEADERS = syslog.h
120 libsyslog_la_SOURCES = syslog.c syslog.h compat.h
121 libsyslog_la_CPPFLAGS = $(AM_CPPFLAGS) -D_XOPEN_SOURCE=600
122 libsyslog_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:0:0
123-libsyslog_la_LIBADD = libcompat.la
124+libsyslog_la_LIBADD = $(LTLIBOJBS)
125--
1262.7.4
127
diff --git a/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch b/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch
deleted file mode 100644
index b2d45c0a0a..0000000000
--- a/meta/recipes-extended/sysklogd/files/0001-Remove-__BEGIN_DECLS-__END_DECLS.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 8c7995ac8da99eed55bf5410c558b1f0a74998d0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 7 Dec 2019 10:27:28 -0800
4Subject: [PATCH 1/2] Remove __BEGIN_DECLS/__END_DECLS
5
6The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and
7are not defined in any standard. Using them fails build on musl
8libc, its better to avoid them
9
10Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/syslog.h | 8 ++++++--
14 1 file changed, 6 insertions(+), 2 deletions(-)
15
16diff --git a/src/syslog.h b/src/syslog.h
17index 4fb7627..120a18f 100644
18--- a/src/syslog.h
19+++ b/src/syslog.h
20@@ -221,7 +221,9 @@ struct syslog_data {
21 .log_mask = 0xff, \
22 }
23
24-__BEGIN_DECLS
25+#ifdef __cplusplus
26+extern "C" {
27+#endif
28 void openlog (const char *, int, int);
29 void closelog (void);
30
31@@ -245,7 +247,9 @@ void syslogp_r (int, struct syslog_data *, const char *, const char *,
32 const char *, ...);
33 void vsyslogp_r (int, struct syslog_data *, const char *, const char *,
34 const char *, va_list);
35-__END_DECLS
36+#ifdef __cplusplus
37+}
38+#endif
39
40 #else /* !__KERNEL__ */
41
42--
432.24.0
44
diff --git a/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch b/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch
deleted file mode 100644
index 799a7a4c4c..0000000000
--- a/meta/recipes-extended/sysklogd/files/0002-include-sys-types.h-for-off_t.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 10cff4ba2d09b30f8f1967f910e8ab08447a8add Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 7 Dec 2019 10:31:04 -0800
4Subject: [PATCH 2/2] include sys/types.h for off_t
5
6Fixes
7error: unknown type name 'off_t'
8
9Upstream-Status: Submitted [https://github.com/troglobit/sysklogd/pull/10]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/compat.h | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/src/compat.h b/src/compat.h
16index a867636..1ef1bf0 100644
17--- a/src/compat.h
18+++ b/src/compat.h
19@@ -34,6 +34,7 @@
20 #include <pthread.h>
21 #include <stdlib.h>
22 #include <string.h>
23+#include <sys/types.h>
24
25 /*
26 * The following macro is used to remove const cast-away warnings
27--
282.24.0
29
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd
index 4a4ca8a78e..2a356a637a 100755
--- a/meta/recipes-extended/sysklogd/files/sysklogd
+++ b/meta/recipes-extended/sysklogd/files/sysklogd
@@ -18,9 +18,7 @@
18PATH=/bin:/usr/bin:/sbin:/usr/sbin 18PATH=/bin:/usr/bin:/sbin:/usr/sbin
19 19
20pidfile_syslogd=/var/run/syslogd.pid 20pidfile_syslogd=/var/run/syslogd.pid
21pidfile_klogd=/var/run/klogd.pid
22binpath_syslogd=/usr/sbin/syslogd 21binpath_syslogd=/usr/sbin/syslogd
23binpath_klogd=/usr/sbin/klogd
24 22
25test -x $binpath || exit 0 23test -x $binpath || exit 0
26 24
@@ -112,28 +110,16 @@ case "$1" in
112 create_xconsole 110 create_xconsole
113 start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD 111 start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
114 log_end_msg $? 112 log_end_msg $?
115 log_begin_msg "Starting kernel log daemon..."
116 start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
117 log_end_msg $?
118 ;; 113 ;;
119 stop) 114 stop)
120 log_begin_msg "Stopping system log daemon..." 115 log_begin_msg "Stopping system log daemon..."
121 start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd 116 start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd
122 log_end_msg $? 117 log_end_msg $?
123 log_begin_msg "Stopping kernel log daemon..."
124 start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
125 log_end_msg $?
126 ;; 118 ;;
127 reload|force-reload) 119 reload|force-reload)
128 log_begin_msg "Reloading system log daemon..." 120 log_begin_msg "Reloading system log daemon..."
129 start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd 121 start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd
130 log_end_msg $? 122 log_end_msg $?
131 log_begin_msg "Reloading kernel log daemon..."
132 pid=`cat $pidfile_klogd 2> /dev/null`
133 start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
134 waitpid $pid
135 start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
136 log_end_msg $?
137 ;; 123 ;;
138 restart) 124 restart)
139 log_begin_msg "Restarting system log daemon..." 125 log_begin_msg "Restarting system log daemon..."
@@ -142,12 +128,6 @@ case "$1" in
142 waitpid $pid 128 waitpid $pid
143 start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD 129 start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
144 log_end_msg $? 130 log_end_msg $?
145 log_begin_msg "Reloading kernel log daemon..."
146 pid=`cat $pidfile_klogd 2> /dev/null`
147 start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
148 waitpid $pid
149 start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
150 log_end_msg $?
151 ;; 131 ;;
152 reload-or-restart) 132 reload-or-restart)
153 if running 133 if running
@@ -160,8 +140,6 @@ case "$1" in
160 status) 140 status)
161 status syslogd 141 status syslogd
162 RETVAL=$? 142 RETVAL=$?
163 status klogd
164 rval=$?
165 [ $RETVAL -eq 0 ] && exit $rval 143 [ $RETVAL -eq 0 ] && exit $rval
166 exit $RETVAL 144 exit $RETVAL
167 ;; 145 ;;
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 8618c9ffec..2e3d9831b1 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -1,27 +1,21 @@
1SUMMARY = "System Log Daemons" 1SUMMARY = "System Log Daemons"
2DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd" 2DESCRIPTION = "The sysklogd package implements system log daemons: syslogd"
3HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/" 3HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
4SECTION = "base" 4SECTION = "base"
5 5
6LICENSE = "GPLv2+ & BSD" 6LICENSE = "BSD-3-Clause"
7LICENSE_syslogd = "BSD" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=5b4be4b2549338526758ef479c040943 \
8LICENSE_klogd = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \ 8 file://src/syslogd.c;beginline=2;endline=15;md5=a880fecbc04503f071c494a9c0dd4f97 \
11 file://src/klogd.c;beginline=2;endline=19;md5=4f5591d04cccbeb0352758ed4a9d7213 \
12 " 9 "
13 10
14inherit update-rc.d update-alternatives systemd autotools 11inherit update-rc.d update-alternatives systemd autotools
15 12
16SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \ 13SRC_URI = "git://github.com/troglobit/sysklogd.git;nobranch=1 \
17 file://0001-Remove-__BEGIN_DECLS-__END_DECLS.patch \
18 file://0002-include-sys-types.h-for-off_t.patch \
19 file://0001-Drop-libcompat-to-simplify-build-deps-and-really-fix.patch \
20 file://sysklogd \ 14 file://sysklogd \
21 " 15 "
22S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
23 17
24EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --with-klogd --without-logger" 18EXTRA_OECONF = "--with-systemd=${systemd_system_unitdir} --without-logger"
25 19
26do_install_append () { 20do_install_append () {
27 install -d ${D}${sysconfdir} 21 install -d ${D}${sysconfdir}
@@ -31,7 +25,7 @@ do_install_append () {
31} 25}
32 26
33SYSTEMD_PACKAGES = "${PN}" 27SYSTEMD_PACKAGES = "${PN}"
34SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service" 28SYSTEMD_SERVICE_${PN} = "syslogd.service"
35SYSTEMD_AUTO_ENABLE = "enable" 29SYSTEMD_AUTO_ENABLE = "enable"
36 30
37INITSCRIPT_NAME = "syslog" 31INITSCRIPT_NAME = "syslog"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb b/meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb
deleted file mode 100644
index 21f750fa60..0000000000
--- a/meta/recipes-extended/sysklogd/sysklogd_2.0.3.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require sysklogd.inc
2
3SRCREV = "ad686ca86d977f9eac4cd0a0d0e9a5964a4621d3"
diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.1.1.bb b/meta/recipes-extended/sysklogd/sysklogd_2.1.1.bb
new file mode 100644
index 0000000000..eb6b4effae
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_2.1.1.bb
@@ -0,0 +1,3 @@
1require sysklogd.inc
2
3SRCREV = "24dafe9a27ac959ebeb89acd3ebd3d62cca4b755"