Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
SUMMARY = "A fork of json-c library"
|
||||
HOMEPAGE = "https://github.com/rsyslog/libfastjson"
|
||||
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a958bb07122368f3e1d9b2efe07d231f"
|
||||
|
||||
DEPENDS = ""
|
||||
|
||||
SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https;branch=master"
|
||||
|
||||
SRCREV = "3a8402c1de7c7747c95229db26d8d32fb85a7a52"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
||||
@@ -0,0 +1,34 @@
|
||||
From 6d575d98565ce3119a14359eecb11ccdff92a303 Mon Sep 17 00:00:00 2001
|
||||
From: Yash Shinde <53660251+Yashinde145@users.noreply.github.com>
|
||||
Date: Thu, 29 Jun 2023 18:10:15 +0530
|
||||
Subject: [PATCH] Fix function inline errors in debug optimization (-Og)
|
||||
|
||||
Compiler does not inline any functions when using debug optimization (-Og).
|
||||
Hence, remove -Winline flag when compiling with debug optimization.
|
||||
|
||||
Signed-off-by: Nicolas Marguet <nicolas.marguet@windriver.com>
|
||||
---
|
||||
Upstream-Status: Backport [https://github.com/rsyslog/librelp/commit/6d575d9]
|
||||
|
||||
configure.ac | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 21c1fde..1204c4e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -230,6 +230,12 @@ if test "$enable_debug" = "no"; then
|
||||
AC_DEFINE(NDEBUG, 1, [Defined if debug mode is disabled.])
|
||||
fi
|
||||
|
||||
+#Compiler does not inline any functions when not optimizing(-Og).
|
||||
+#Hence, remove -Winline flag when DEBUG is enabled.
|
||||
+#ifdef DEBUG
|
||||
+WARN_CFLAGS="$(echo "$WARN_CFLAGS" | sed s/-Winline//g)"
|
||||
+#endif
|
||||
+
|
||||
# valgrind
|
||||
AC_ARG_ENABLE(valgrind,
|
||||
[AS_HELP_STRING([--enable-valgrind],[Enable valgrind tests@<:@default=yes@:>@])],
|
||||
--
|
||||
2.39.0
|
||||
@@ -0,0 +1,88 @@
|
||||
From 6e9b27f04132287463c89d3be0ce4f506944920d Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Williams <patrick@stwcx.xyz>
|
||||
Date: Fri, 3 Feb 2023 16:11:29 -0600
|
||||
Subject: [PATCH] tcp: fix some compiler warnings with enable-tls-openssl
|
||||
|
||||
When --enable-tls=no and --enable-tls-openssl=yes, the following
|
||||
compiler errors are reported:
|
||||
|
||||
```
|
||||
| ../../git/src/tcp.c:3765:1: error: no previous declaration for 'relpTcpGetRtryDirection_gtls' [-Werror=missing-declarations]
|
||||
| 3765 | relpTcpGetRtryDirection_gtls(LIBRELP_ATTR_UNUSED relpTcp_t *const pThis)
|
||||
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
| ../../git/src/tcp.c:3583:1: error: 'relpTcpChkPeerName' defined but not used [-Werror=unused-function]
|
||||
| 3583 | relpTcpChkPeerName(NOTLS_UNUSED relpTcp_t *const pThis, NOTLS_UNUSED void* cert)
|
||||
| | ^~~~~~~~~~~~~~~~~~
|
||||
```
|
||||
|
||||
Fix these by:
|
||||
1. Add static on the openssl path for relpTcpGetRtryDirection_gtls.
|
||||
2. Move the relpTcpChkPeerName forward declaration to another ifdef
|
||||
leg.
|
||||
3. Wrap relpTcpChkPeerName in gnutls-based ifdef.
|
||||
4. Remove relpTcpChkPeerName_gtls from openssl path.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/rsyslog/librelp/pull/255]
|
||||
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
||||
---
|
||||
src/tcp.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/tcp.c b/src/tcp.c
|
||||
index 7a75cc4..18cffda 100644
|
||||
--- a/src/tcp.c
|
||||
+++ b/src/tcp.c
|
||||
@@ -132,12 +132,12 @@ callOnErr(const relpTcp_t *__restrict__ const pThis,
|
||||
static int LIBRELP_ATTR_NONNULL() relpTcpGetCN(char *const namebuf, const size_t lenNamebuf, const char *const szDN);
|
||||
#ifdef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION
|
||||
static int relpTcpVerifyCertificateCallback(gnutls_session_t session);
|
||||
+static int relpTcpChkPeerName(relpTcp_t *const pThis, void* cert);
|
||||
#endif /* #ifdef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION */
|
||||
#if defined(HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION) || defined(ENABLE_TLS_OPENSSL)
|
||||
static void relpTcpChkOnePeerName(relpTcp_t *const pThis, char *peername, int *pbFoundPositiveMatch);
|
||||
static int relpTcpAddToCertNamesBuffer(relpTcp_t *const pThis, char *const buf,
|
||||
const size_t buflen, int *p_currIdx, const char *const certName);
|
||||
-static int relpTcpChkPeerName(relpTcp_t *const pThis, void* cert);
|
||||
#endif /* defined(HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION) || defined(ENABLE_TLS_OPENSSL) */
|
||||
|
||||
|
||||
@@ -2820,11 +2820,6 @@ relpTcpLstnInitTLS_gtls(LIBRELP_ATTR_UNUSED relpTcp_t *const pThis)
|
||||
{
|
||||
return RELP_RET_ERR_INTERNAL;
|
||||
}
|
||||
-static int
|
||||
-relpTcpChkPeerName_gtls(LIBRELP_ATTR_UNUSED relpTcp_t *const pThis, LIBRELP_ATTR_UNUSED void *vcert)
|
||||
-{
|
||||
- return RELP_RET_ERR_INTERNAL;
|
||||
-}
|
||||
#endif /* defined(ENABLE_TLS)*/
|
||||
|
||||
|
||||
@@ -3579,6 +3574,7 @@ finalize_it:
|
||||
|
||||
}
|
||||
|
||||
+#ifdef HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION
|
||||
static int
|
||||
relpTcpChkPeerName(NOTLS_UNUSED relpTcp_t *const pThis, NOTLS_UNUSED void* cert)
|
||||
{
|
||||
@@ -3592,6 +3588,7 @@ relpTcpChkPeerName(NOTLS_UNUSED relpTcp_t *const pThis, NOTLS_UNUSED void* cert)
|
||||
#endif /* #ifdef WITH_TLS*/
|
||||
LEAVE_RELPFUNC;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static relpRetVal LIBRELP_ATTR_NONNULL()
|
||||
relpTcpAcceptConnReqInitTLS(NOTLS_UNUSED relpTcp_t *const pThis, NOTLS_UNUSED relpSrv_t *const pSrv)
|
||||
@@ -3761,7 +3758,7 @@ relpTcpGetRtryDirection_gtls(relpTcp_t *const pThis)
|
||||
return gnutls_record_get_direction(pThis->session);
|
||||
}
|
||||
#else /* #ifdef ENABLE_TLS */
|
||||
-relpRetVal LIBRELP_ATTR_NONNULL()
|
||||
+static relpRetVal LIBRELP_ATTR_NONNULL()
|
||||
relpTcpGetRtryDirection_gtls(LIBRELP_ATTR_UNUSED relpTcp_t *const pThis)
|
||||
{
|
||||
return RELP_RET_ERR_INTERNAL;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From 2a7e26510cf9276b7e640ca8282cc1c5e46075d0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 15 Aug 2023 11:59:40 -0700
|
||||
Subject: [PATCH] tests: Fix callback prototype
|
||||
|
||||
clang errors about it
|
||||
|
||||
| ../../git/tests/receive.c:71:34: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
|
||||
| 71 | hdlr_enable(int sig, void (*hdlr)())
|
||||
| | ^
|
||||
| | void
|
||||
| 1 error generated.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/rsyslog/librelp/pull/260]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
tests/receive.c | 2 +-
|
||||
tests/send.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/receive.c b/tests/receive.c
|
||||
index f376cb4..c12e911 100644
|
||||
--- a/tests/receive.c
|
||||
+++ b/tests/receive.c
|
||||
@@ -68,7 +68,7 @@ doSleep(int iSeconds, const int iuSeconds)
|
||||
}
|
||||
|
||||
static void
|
||||
-hdlr_enable(int sig, void (*hdlr)())
|
||||
+hdlr_enable(int sig, void (*hdlr)(const int))
|
||||
{
|
||||
struct sigaction sigAct;
|
||||
memset(&sigAct, 0, sizeof (sigAct));
|
||||
diff --git a/tests/send.c b/tests/send.c
|
||||
index d7e90f0..1b1df4f 100644
|
||||
--- a/tests/send.c
|
||||
+++ b/tests/send.c
|
||||
@@ -57,7 +57,7 @@ struct usrdata { /* used for testing user pointer pass-back */
|
||||
struct usrdata *userdata = NULL;
|
||||
|
||||
static void
|
||||
-hdlr_enable(int sig, void (*hdlr)())
|
||||
+hdlr_enable(int sig, void (*hdlr)(const int))
|
||||
{
|
||||
struct sigaction sigAct;
|
||||
memset(&sigAct, 0, sizeof (sigAct));
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 5c32487a9c127f37141488d416cdb5d5bec6aca1 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 19 Aug 2023 10:24:40 -0700
|
||||
Subject: [PATCH] tests: Include missing sys/time.h
|
||||
|
||||
This is found when building for musl C library systems where sys/time.h
|
||||
is not included indirectly and select() and timeval structs are used
|
||||
|
||||
Fixes
|
||||
|
||||
../../git/tests/receive.c:64:17: error: variable has incomplete type 'struct timeval'
|
||||
64 | struct timeval tvSelectTimeout;
|
||||
| ^
|
||||
../../git/tests/receive.c:64:9: note: forward declaration of 'struct timeval'
|
||||
64 | struct timeval tvSelectTimeout;
|
||||
| ^
|
||||
../../git/tests/receive.c:67:2: error: call to undeclared function 'select'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|
||||
67 | select(0, NULL, NULL, NULL, &tvSelectTimeout);
|
||||
| ^
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/rsyslog/librelp/pull/261]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
tests/receive.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/receive.c b/tests/receive.c
|
||||
index f376cb4..e20861e 100644
|
||||
--- a/tests/receive.c
|
||||
+++ b/tests/receive.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
+#include <sys/time.h>
|
||||
#include "librelp.h"
|
||||
|
||||
#define TRY(f) { const int TRY_r = f; if(TRY_r != RELP_RET_OK) { \
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
cd ${SCRIPTPATH}
|
||||
useradd tester || echo "user already exists"
|
||||
su tester -c "make -C tests -k check-TESTS"
|
||||
userdel tester
|
||||
@@ -0,0 +1,86 @@
|
||||
SUMMARY = "A reliable logging library"
|
||||
HOMEPAGE = "https://github.com/rsyslog/librelp"
|
||||
|
||||
LICENSE = "GPL-3.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
|
||||
|
||||
DEPENDS = "gmp libidn zlib"
|
||||
|
||||
SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \
|
||||
file://0001-Fix-function-inline-errors-in-debug-optimization-Og.patch \
|
||||
file://0001-tests-Fix-callback-prototype.patch \
|
||||
file://0001-tcp-fix-some-compiler-warnings-with-enable-tls-opens.patch \
|
||||
file://0001-tests-Include-missing-sys-time.h.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig ptest
|
||||
|
||||
PACKAGECONFIG ?= "tls-openssl valgrind"
|
||||
# Valgrind is not available for RISCV yet
|
||||
PACKAGECONFIG:remove:riscv64 = "valgrind"
|
||||
PACKAGECONFIG:remove:riscv32 = "valgrind"
|
||||
|
||||
PACKAGECONFIG[tls] = "--enable-tls,--disable-tls,gnutls nettle"
|
||||
PACKAGECONFIG[tls-openssl] = "--enable-tls-openssl,--disable-tls-openssl,openssl"
|
||||
PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,"
|
||||
|
||||
# For ptests, copy source tests/*.sh scripts, Makefile and
|
||||
# executables and run them with make on target.
|
||||
TESTDIR = "tests"
|
||||
do_compile_ptest() {
|
||||
echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
|
||||
oe_runmake -C ${TESTDIR} buildtest-TESTS
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
install -d ${D}${PTEST_PATH}/${TESTDIR}
|
||||
|
||||
# copy source tests/*.sh and python scripts
|
||||
cp -f ${S}/${TESTDIR}/*.sh ${S}/${TESTDIR}/*.py ${D}${PTEST_PATH}/${TESTDIR}
|
||||
# install data files needed by the test scripts on the target
|
||||
cp -f ${S}/${TESTDIR}/*.supp ${D}${PTEST_PATH}/${TESTDIR}
|
||||
cp -rf ${S}/${TESTDIR}/tls-certs ${D}${PTEST_PATH}/${TESTDIR}
|
||||
|
||||
# copy executables
|
||||
find ${B}/${TESTDIR} -type f -executable -exec cp {} ${D}${PTEST_PATH}/${TESTDIR} \;
|
||||
cp -rf ${B}/${TESTDIR}/.libs ${D}${PTEST_PATH}/${TESTDIR}
|
||||
# copy Makefile
|
||||
# run-ptest will run make which runs the executables
|
||||
cp -f ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR}
|
||||
cp -f ${B}/${TESTDIR}/set-envvars ${D}${PTEST_PATH}/${TESTDIR}
|
||||
|
||||
# give permissions to all users
|
||||
# some tests need to write to this directory
|
||||
chmod 777 -R ${D}${PTEST_PATH}/${TESTDIR}
|
||||
|
||||
# do NOT need to rebuild Makefile or $(check_PROGRAMS)
|
||||
sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
|
||||
# fix the srcdir, top_srcdir, abs_top_builddir
|
||||
sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/${TESTDIR},' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/${TESTDIR},' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
|
||||
# install test-driver
|
||||
install -m 644 ${S}/test-driver ${D}${PTEST_PATH}
|
||||
|
||||
# fix the python3 path for tests/set-envar
|
||||
sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/${TESTDIR}/set-envvars
|
||||
|
||||
# these 2 scripts need help finding their /usr/lib/librelp/ptest/tests/.libs libraries
|
||||
sed -i 's:${B}/src:${PTEST_PATH}/${TESTDIR}:' ${D}${PTEST_PATH}/${TESTDIR}/send
|
||||
sed -i 's:${B}/src:${PTEST_PATH}/${TESTDIR}:' ${D}${PTEST_PATH}/${TESTDIR}/receive
|
||||
}
|
||||
|
||||
RDEPENDS:${PN}-ptest += "\
|
||||
make bash coreutils libgcc util-linux gawk grep \
|
||||
python3-core python3-io \
|
||||
"
|
||||
RRECOMMENDS:${PN}-ptest += "${@bb.utils.filter('PACKAGECONFIG', 'valgrind', d)}"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 7baf35b88d742032a2dc456c396843e17e866f8e Mon Sep 17 00:00:00 2001
|
||||
From: Ming Liu <peter.x.liu@external.atlascopco.com>
|
||||
Date: Wed, 27 Jun 2018 14:04:57 +0800
|
||||
Subject: [PATCH] Include sys/time.h
|
||||
|
||||
struct timeval is defined in sys/time.h with a musl libc.
|
||||
|
||||
Upstream-Status: Inappropriate [musl libc specific]
|
||||
|
||||
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
tests/msleep.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/tests/msleep.c b/tests/msleep.c
|
||||
index 98dbece..96f6950 100644
|
||||
--- a/tests/msleep.c
|
||||
+++ b/tests/msleep.c
|
||||
@@ -26,11 +26,7 @@
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
-#if defined(__FreeBSD__)
|
||||
#include <sys/time.h>
|
||||
-#else
|
||||
-#include <time.h>
|
||||
-#endif
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
2.7.4
|
||||
@@ -0,0 +1,46 @@
|
||||
From 194e199ce08acc2192f6a63420ff24d9064666e5 Mon Sep 17 00:00:00 2001
|
||||
From: Yi Fan Yu <yifan.yu@windriver.com>
|
||||
Date: Sat, 27 Mar 2021 19:18:25 -0400
|
||||
Subject: [PATCH] tests: disable the check for inotify
|
||||
|
||||
We don't need to check inotify.h.
|
||||
Assume it is present since it is part of the linux kernel
|
||||
since 2.6.13 [1].
|
||||
|
||||
[1](https://kernelnewbies.org/Linux_2_6_13)
|
||||
|
||||
(it would require installing the libc headers otherwise,
|
||||
for the test to detect /usr/include/sys/inotify.h.)
|
||||
|
||||
Upstream-Status: Inappropriate [OE-specific]
|
||||
|
||||
Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
|
||||
---
|
||||
tests/diag.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/diag.sh b/tests/diag.sh
|
||||
index 6cd60ea88..7424f48c5 100755
|
||||
--- a/tests/diag.sh
|
||||
+++ b/tests/diag.sh
|
||||
@@ -2672,7 +2672,7 @@ case $1 in
|
||||
fi
|
||||
;;
|
||||
'check-inotify') # Check for inotify/fen support
|
||||
- if [ -n "$(find /usr/include -name 'inotify.h' -print -quit)" ]; then
|
||||
+ if true; then
|
||||
echo [inotify mode]
|
||||
elif [ -n "$(find /usr/include/sys/ -name 'port.h' -print -quit)" ]; then
|
||||
grep -qF "PORT_SOURCE_FILE" < /usr/include/sys/port.h
|
||||
@@ -2687,7 +2687,7 @@ case $1 in
|
||||
fi
|
||||
;;
|
||||
'check-inotify-only') # Check for ONLY inotify support
|
||||
- if [ -n "$(find /usr/include -name 'inotify.h' -print -quit)" ]; then
|
||||
+ if true; then
|
||||
echo [inotify mode]
|
||||
else
|
||||
echo [inotify not supported, skipping...]
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
tests: Skip omfile-outchannel test as it fails on musl
|
||||
|
||||
scanf error in index i=5559
|
||||
sequence error detected in rstb_168227_f19f3b245QVE.out.log
|
||||
number of lines in file: 5559 rstb_168227_f19f3b245QVE.out.log
|
||||
|
||||
Patch is also applied in void linux
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
--- a/tests/omfile-outchannel.sh 2021-03-09 05:51:07.000000000 -0600
|
||||
+++ b/tests/omfile-outchannel.sh 2022-05-26 15:55:23.358520256 -0500
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
# addd 2018-08-02 by RGerhards, released under ASL 2.0
|
||||
+
|
||||
+# This test fails for x86_64-musl, under GitHub's CI/CD. Disable for now.
|
||||
+exit 77
|
||||
+
|
||||
. ${srcdir:=.}/diag.sh init
|
||||
export NUMMESSAGES=10000
|
||||
echo "ls -l $RSYSLOG_DYNNAME*
|
||||
@@ -0,0 +1,118 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# This is an init script for openembedded
|
||||
# Copy it to /etc/init.d/rsyslog and type
|
||||
# > update-rc.d rsyslog defaults 5
|
||||
#
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=rsyslog
|
||||
RSYSLOGD=rsyslogd
|
||||
RSYSLOGD_BIN=/usr/sbin/rsyslogd
|
||||
RSYSLOGD_OPTIONS=""
|
||||
RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
# Exit if the package is not installed
|
||||
[ -x "$RSYSLOGD_BIN" ] || exit 0
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
DAEMON=$1
|
||||
DAEMON_ARGS=$2
|
||||
PIDFILE=$3
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon could not be started
|
||||
# if daemon had already been started, start-stop-daemon will return 1
|
||||
# so add -o/--oknodo(if nothing is done, exit 0)
|
||||
start-stop-daemon -S --quiet --pidfile $PIDFILE --exec $DAEMON \
|
||||
--oknodo -- $DAEMON_ARGS || return 1
|
||||
}
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
NAME=$1
|
||||
PIDFILE=$2
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
# QUIT/TERM/INT should work here, but they don't ?????
|
||||
start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME
|
||||
RETVAL="$?"
|
||||
rm -f $PIDFILE
|
||||
return "$RETVAL"
|
||||
}
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service
|
||||
#
|
||||
do_reload() {
|
||||
NAME=$1
|
||||
PIDFILE=$2
|
||||
start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
do_status() {
|
||||
NAME=$1
|
||||
PIDFILE=$2
|
||||
# -t: test only but not stop
|
||||
start-stop-daemon -K -t --quiet --pidfile $PIDFILE --name $NAME
|
||||
# exit with status 0 if process is found
|
||||
if [ "$?" = "0" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "starting $RSYSLOGD ... "
|
||||
do_start "$RSYSLOGD_BIN" "$RSYSLOGD_OPTIONS" "$RSYSLOGD_PIDFILE"
|
||||
case "$?" in
|
||||
0) echo "done" ;;
|
||||
1) echo "failed" ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
echo -n "stopping $RSYSLOGD ... "
|
||||
do_stop "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
|
||||
case "$?" in
|
||||
0|1) echo "done" ;;
|
||||
2) echo "failed" ;;
|
||||
esac
|
||||
;;
|
||||
reload|force-reload)
|
||||
echo -n "reloading $RSYSLOGD ... "
|
||||
do_reload "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
|
||||
echo "done"
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
echo -n "status $RSYSLOGD ... "
|
||||
do_status "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "running"
|
||||
exit 0
|
||||
else
|
||||
echo "stopped"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
@@ -0,0 +1,91 @@
|
||||
# if you experience problems, check
|
||||
# http://www.rsyslog.com/troubleshoot for assistance
|
||||
|
||||
# rsyslog v3: load input modules
|
||||
# If you do not load inputs, nothing happens!
|
||||
# You may need to set the module load path if modules are not found.
|
||||
#
|
||||
# Ported from debian's sysklogd.conf
|
||||
|
||||
$ModLoad immark # provides --MARK-- message capability
|
||||
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
|
||||
$ModLoad imklog # kernel logging (formerly provided by rklogd)
|
||||
|
||||
#
|
||||
# Set the default permissions
|
||||
#
|
||||
$FileOwner root
|
||||
$FileGroup adm
|
||||
$FileCreateMode 0640
|
||||
$DirCreateMode 0755
|
||||
$Umask 0022
|
||||
|
||||
auth,authpriv.* /var/log/auth.log
|
||||
*.*;auth,authpriv.none -/var/log/syslog
|
||||
cron.* /var/log/cron.log
|
||||
daemon.* -/var/log/daemon.log
|
||||
kern.* -/var/log/kern.log
|
||||
lpr.* -/var/log/lpr.log
|
||||
mail.* -/var/log/mail.log
|
||||
user.* -/var/log/user.log
|
||||
|
||||
#
|
||||
# Logging for the mail system. Split it up so that
|
||||
# it is easy to write scripts to parse these files.
|
||||
#
|
||||
mail.info -/var/log/mail.info
|
||||
mail.warn -/var/log/mail.warn
|
||||
mail.err /var/log/mail.err
|
||||
|
||||
# Logging for INN news system
|
||||
#
|
||||
news.crit /var/log/news.crit
|
||||
news.err /var/log/news.err
|
||||
news.notice -/var/log/news.notice
|
||||
|
||||
#
|
||||
# Some `catch-all' logfiles.
|
||||
#
|
||||
*.=debug;\
|
||||
auth,authpriv.none;\
|
||||
news.none;mail.none -/var/log/debug
|
||||
*.=info;*.=notice;*.=warn;\
|
||||
auth,authpriv.none;\
|
||||
cron,daemon.none;\
|
||||
mail,news.none -/var/log/messages
|
||||
|
||||
#
|
||||
# Emergencies are sent to everybody logged in.
|
||||
#
|
||||
*.emerg :omusrmsg:*
|
||||
|
||||
# Save boot messages also to boot.log
|
||||
local7.* /var/log/boot.log
|
||||
|
||||
# Remote Logging (we use TCP for reliable delivery)
|
||||
# An on-disk queue is created for this action. If the remote host is
|
||||
# down, messages are spooled to disk and sent when it is up again.
|
||||
#$WorkDirectory /var/spool/rsyslog # where to place spool files
|
||||
#$ActionQueueFileName uniqName # unique name prefix for spool files
|
||||
$ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible)
|
||||
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
|
||||
#$ActionQueueType LinkedList # run asynchronously
|
||||
#$ActionResumeRetryCount -1 # infinite retries if host is down
|
||||
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
|
||||
#*.* @@remote-host:514
|
||||
|
||||
|
||||
# ######### Receiving Messages from Remote Hosts ##########
|
||||
# TCP Syslog Server:
|
||||
# provides TCP syslog reception and GSS-API (if compiled to support it)
|
||||
#$ModLoad imtcp.so # load module
|
||||
#$InputTCPServerRun 514 # start up TCP listener at port 514
|
||||
|
||||
# UDP Syslog Server:
|
||||
#$ModLoad imudp.so # provides UDP syslog reception
|
||||
#$UDPServerRun 514 # start a UDP syslog server at standard port 514
|
||||
|
||||
#
|
||||
# Include all config files in /etc/rsyslog.d/
|
||||
#
|
||||
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||
@@ -0,0 +1,39 @@
|
||||
# /etc/logrotate.d/rsyslog - Ported from Debian
|
||||
|
||||
/var/log/syslog
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
compress
|
||||
postrotate
|
||||
@BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/mail.info
|
||||
/var/log/mail.warn
|
||||
/var/log/mail.err
|
||||
/var/log/mail.log
|
||||
/var/log/daemon.log
|
||||
/var/log/kern.log
|
||||
/var/log/auth.log
|
||||
/var/log/user.log
|
||||
/var/log/lpr.log
|
||||
/var/log/cron.log
|
||||
/var/log/debug
|
||||
/var/log/messages
|
||||
{
|
||||
rotate 4
|
||||
weekly
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
@BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true
|
||||
endscript
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=System Logging Service
|
||||
Requires=syslog.socket
|
||||
Wants=network.target network-online.target
|
||||
After=network.target network-online.target
|
||||
Documentation=man:rsyslogd(8)
|
||||
Documentation=http://www.rsyslog.com/doc/
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=@sbindir@/rsyslogd -n -iNONE
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
|
||||
# Increase the default a bit in order to allow many simultaneous
|
||||
# files to be monitored, we might need a lot of fds.
|
||||
LimitNOFILE=16384
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=syslog.service
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
cd ${SCRIPTPATH}
|
||||
useradd tester || echo "user already exists"
|
||||
ln -sf /usr/sbin/logrotate /usr/bin/logrotate
|
||||
su tester -c "make -C tests -k check-TESTS"
|
||||
userdel tester
|
||||
rm -f /usr/bin/logrotate
|
||||
@@ -0,0 +1,43 @@
|
||||
From d0852006bf3d305e8984b85b41997d43d4476937 Mon Sep 17 00:00:00 2001
|
||||
From: Roy Li <rongqing.li@windriver.com>
|
||||
Date: Wed, 18 Jun 2014 13:46:52 +0800
|
||||
Subject: [PATCH] use pkgconfig to check libgcrypt
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
libgcrypt does no longer provide libgcrypt-config, and provide
|
||||
*.pc, so we should use pkgconfig to check
|
||||
|
||||
Signed-off-by: Roy Li <rongqing.li@windriver.com>
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
|
||||
---
|
||||
configure.ac | 15 +--------------
|
||||
1 file changed, 1 insertion(+), 14 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 62178c3..b56c9c7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -889,20 +889,7 @@ AC_ARG_ENABLE(libgcrypt,
|
||||
[enable_libgcrypt=yes]
|
||||
)
|
||||
if test "x$enable_libgcrypt" = "xyes"; then
|
||||
- AC_PATH_PROG([LIBGCRYPT_CONFIG],[libgcrypt-config],[no])
|
||||
- if test "x${LIBGCRYPT_CONFIG}" = "xno"; then
|
||||
- AC_MSG_FAILURE([libgcrypt-config not found in PATH])
|
||||
- fi
|
||||
- AC_CHECK_LIB(
|
||||
- [gcrypt],
|
||||
- [gcry_cipher_open],
|
||||
- [LIBGCRYPT_CFLAGS="`${LIBGCRYPT_CONFIG} --cflags`"
|
||||
- LIBGCRYPT_LIBS="`${LIBGCRYPT_CONFIG} --libs`"
|
||||
- ],
|
||||
- [AC_MSG_FAILURE([libgcrypt is missing])],
|
||||
- [`${LIBGCRYPT_CONFIG} --libs --cflags`]
|
||||
- )
|
||||
- AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present])
|
||||
+ PKG_CHECK_MODULES(LIBGCRYPT, libgcrypt)
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes)
|
||||
AC_SUBST(LIBGCRYPT_CFLAGS)
|
||||
@@ -0,0 +1,207 @@
|
||||
SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd"
|
||||
DESCRIPTION = "\
|
||||
Rsyslog is an enhanced syslogd supporting, among others, MySQL,\
|
||||
PostgreSQL, failover log destinations, syslog/tcp, fine grain\
|
||||
output format control, high precision timestamps, queued operations\
|
||||
and the ability to filter on any message part. It is quite\
|
||||
compatible to stock sysklogd and can be used as a drop-in replacement.\
|
||||
Its advanced features make it suitable for enterprise-class,\
|
||||
encryption protected syslog relay chains while at the same time being\
|
||||
very easy to setup for the novice user."
|
||||
|
||||
DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging"
|
||||
HOMEPAGE = "http://www.rsyslog.com/"
|
||||
LICENSE = "GPL-3.0-only & LGPL-3.0-only & Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \
|
||||
file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \
|
||||
file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\
|
||||
"
|
||||
|
||||
SRC_URI = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \
|
||||
file://initscript \
|
||||
file://rsyslog.conf \
|
||||
file://rsyslog.logrotate \
|
||||
file://rsyslog.service \
|
||||
file://use-pkgconfig-to-check-libgcrypt.patch \
|
||||
file://run-ptest \
|
||||
file://0001-tests-disable-the-check-for-inotify.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:libc-musl = " \
|
||||
file://0001-Include-sys-time-h.patch \
|
||||
file://disable-omfile-outchannel.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "acbdd8579489df36b4a383dc6909a61b7623807f0aff54c062115f2de7ea85ba"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases"
|
||||
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
inherit autotools pkgconfig systemd update-rc.d ptest
|
||||
|
||||
EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes"
|
||||
EXTRA_OECONF += "--enable-imfile-tests"
|
||||
EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes"
|
||||
EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes"
|
||||
EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes"
|
||||
|
||||
# first line is default yes in configure
|
||||
PACKAGECONFIG ??= " \
|
||||
rsyslogd rsyslogrt klog inet regexp uuid libcap-ng libgcrypt \
|
||||
fmhttp imdiag openssl imfile \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \
|
||||
"
|
||||
|
||||
# default yes in configure
|
||||
PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp,"
|
||||
PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,,"
|
||||
PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,,"
|
||||
PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl,"
|
||||
PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,,"
|
||||
PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,,"
|
||||
PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng,"
|
||||
PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,,"
|
||||
PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
|
||||
PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt,"
|
||||
PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,,"
|
||||
|
||||
# default no in configure
|
||||
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,,"
|
||||
PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,,"
|
||||
PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,,"
|
||||
PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp,"
|
||||
PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
|
||||
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,"
|
||||
PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd,"
|
||||
PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal,"
|
||||
PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse,"
|
||||
PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
|
||||
PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql,"
|
||||
PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi,"
|
||||
PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,,"
|
||||
PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind,"
|
||||
PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb,"
|
||||
|
||||
|
||||
TESTDIR = "tests"
|
||||
do_compile_ptest() {
|
||||
echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
|
||||
oe_runmake -C ${TESTDIR} buildtest-TESTS
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
# install the tests
|
||||
cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
|
||||
cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
|
||||
|
||||
# give permissions to all users
|
||||
# some tests need to write to this directory as user 'daemon'
|
||||
chmod 777 -R ${D}${PTEST_PATH}/tests
|
||||
|
||||
# do NOT need to rebuild Makefile itself
|
||||
sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
# do NOT need to rebuild $(check_PROGRAMS)
|
||||
sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
|
||||
# fix the srcdir, top_srcdir
|
||||
sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
# fix the abs_top_builddir
|
||||
sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
|
||||
|
||||
# install test-driver
|
||||
install -m 644 ${S}/test-driver ${D}${PTEST_PATH}
|
||||
|
||||
# install necessary links
|
||||
install -d ${D}${PTEST_PATH}/tools
|
||||
ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd
|
||||
|
||||
install -d ${D}${PTEST_PATH}/runtime
|
||||
install -d ${D}${PTEST_PATH}/runtime/.libs
|
||||
(
|
||||
cd ${D}/${libdir}/rsyslog
|
||||
allso="*.so"
|
||||
for i in $allso; do
|
||||
ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i
|
||||
done
|
||||
)
|
||||
|
||||
# fix the module load path with runtime/.libs
|
||||
find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \
|
||||
sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g'
|
||||
# fix the python3 path for tests/set-envar
|
||||
sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
install -d "${D}${sysconfdir}/init.d"
|
||||
install -d "${D}${sysconfdir}/logrotate.d"
|
||||
install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
|
||||
install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
|
||||
install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
|
||||
sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
|
||||
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then
|
||||
install -d 0755 ${D}${sysconfdir}/rsyslog.d
|
||||
echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf
|
||||
fi
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then
|
||||
install -d 0755 ${D}${sysconfdir}/rsyslog.d
|
||||
echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf
|
||||
fi
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir}
|
||||
sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN} += "${bindir}"
|
||||
|
||||
INITSCRIPT_NAME = "syslog"
|
||||
INITSCRIPT_PARAMS = "defaults"
|
||||
|
||||
CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf"
|
||||
|
||||
RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng"
|
||||
|
||||
RPROVIDES:${PN} += "${PN}-systemd"
|
||||
RREPLACES:${PN} += "${PN}-systemd"
|
||||
RCONFLICTS:${PN} += "${PN}-systemd"
|
||||
SYSTEMD_SERVICE:${PN} = "${BPN}.service"
|
||||
|
||||
RDEPENDS:${PN} += "logrotate"
|
||||
|
||||
# for rsyslog-ptest
|
||||
VALGRIND = "valgrind"
|
||||
|
||||
# valgrind supports armv7 and above
|
||||
VALGRIND:armv4 = ''
|
||||
VALGRIND:armv5 = ''
|
||||
VALGRIND:armv6 = ''
|
||||
|
||||
# X32 isn't supported by valgrind at this time
|
||||
VALGRIND:linux-gnux32 = ''
|
||||
VALGRIND:linux-muslx32 = ''
|
||||
|
||||
# Disable for some MIPS variants
|
||||
VALGRIND:mipsarchr6 = ''
|
||||
VALGRIND:linux-gnun32 = ''
|
||||
|
||||
# Disable for powerpc64 with musl
|
||||
VALGRIND:libc-musl:powerpc64 = ''
|
||||
VALGRIND:libc-musl:powerpc64le = ''
|
||||
|
||||
# RISC-V support for valgrind is not there yet
|
||||
VALGRIND:riscv64 = ""
|
||||
VALGRIND:riscv32 = ""
|
||||
|
||||
# util-linux: logger needs the -d option
|
||||
RDEPENDS:${PN}-ptest += "\
|
||||
make diffutils gzip bash gawk coreutils procps \
|
||||
libgcc python3-core python3-io python3-json \
|
||||
curl util-linux shadow \
|
||||
"
|
||||
|
||||
RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}"
|
||||
Reference in New Issue
Block a user