mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
testing/rsyslog: buildfixes for json-0.11
use json-c as pkg-config package and append JSON_C_CFLAGS wherever needed
This commit is contained in:
parent
aa51eef2ac
commit
cab07abe1c
@ -8,9 +8,12 @@ url="http://www.rsyslog.com/"
|
||||
arch="all"
|
||||
license="GPLv3 LGPL-3"
|
||||
makedepends="zlib-dev gnutls-dev mysql-dev postgresql-dev net-snmp-dev
|
||||
libnet-dev libgcrypt-dev libee-dev libestr-dev json-c-dev"
|
||||
libnet-dev libgcrypt-dev libee-dev libestr-dev json-c-dev
|
||||
util-linux-dev
|
||||
autoconf automake libtool"
|
||||
subpackages="$pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-tls $pkgname-snmp"
|
||||
source="http://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
|
||||
json-c.patch
|
||||
$pkgname.initd
|
||||
$pkgname.confd
|
||||
$pkgname.logrotate
|
||||
@ -20,6 +23,17 @@ source="http://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
|
||||
_builddir="$srcdir"/$pkgname-$pkgver
|
||||
|
||||
prepare() {
|
||||
cd "$_builddir"
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
|
||||
esac
|
||||
done
|
||||
libtoolize --force && aclocal && autoconf && automake --add-missing \
|
||||
|| return 1
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
export LDFLAGS="-lestr"
|
||||
./configure \
|
||||
@ -42,10 +56,6 @@ prepare() {
|
||||
--enable-cached-man-pages \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
make || return 1
|
||||
}
|
||||
|
||||
@ -85,18 +95,20 @@ snmp() {
|
||||
}
|
||||
|
||||
md5sums="8e0e868a425bfa5c2c13bdc28338e1af rsyslog-7.4.1.tar.gz
|
||||
35bebdd2ad3b9ab1249093429dc52475 json-c.patch
|
||||
6b63d774eb718bc1ab91f3fb5471ade3 rsyslog.initd
|
||||
0a0aef98f677364e6178c34274df7723 rsyslog.confd
|
||||
bc43debc9ffdf66bc1409025fd3d1176 rsyslog.logrotate
|
||||
65fbf5a7a81a53a70974e3085e96cb41 rsyslog.conf"
|
||||
sha256sums="f890b56fc5122fabf79994e11bdefb26285e3415ba80c20f23bd3ce489098c96 rsyslog-7.4.1.tar.gz
|
||||
39aa50b44b4746cbf5816f98457da2125c3a833fdf6bb87f7b2c1c0961189e6a json-c.patch
|
||||
dfe1c50766df7bf862507f8f0819e01f78c3054e57e8c4db1f16b3874a04094c rsyslog.initd
|
||||
c476c2180fcceaf581d26d2da6201fbe7a2b9fc89c58456fdb3bdaf18a4cbb56 rsyslog.confd
|
||||
f0effc19bd1f1bfa367d65d6516c73509cb34545157b9e91cf6e437685dd3fe5 rsyslog.logrotate
|
||||
559a8221d2ef9376a77e08de05206f3d2214a81fa88649f5bca2a1207f8918c5 rsyslog.conf"
|
||||
sha512sums="c74de170ee83725d8e89712e9a980569e8331d776b52e773d6eeff33dff0c524691378c0d469096691846beffdaf46fab9be706873679588d0afc4cb83f9a663 rsyslog-7.4.1.tar.gz
|
||||
2f0e8443e6d76ef016b4f63b4d16fc81b58894ef7725bd661344fc175fceabccbe135c964fbbeeb1704ac04792c08b1709aa15bc84127a959891551827fedd21 json-c.patch
|
||||
e35f07e9ce499b874bcc441cb3fa1f7a1c545bc72fec24f96debfbe00dff4d0a27d987c7cc70fd160c718bd25d9a0d291c241fc527aeef897842b7c8a48b35d3 rsyslog.initd
|
||||
c216674e6867d655c2c09b6205071591ae2b1611ad5dd0346e682733abafa8a1be261fdd9bb985bb5d05d5bfa708a68262b1a94e654a2c18d352fd02d6f950a3 rsyslog.confd
|
||||
d54377ddf39197656811a84272568ea761f984e19dd04fc54f372dd04a9244e66d02b26ab33073d0344d054f031660ec611f3c7a18c266e7b68cef5e2c47f06f rsyslog.logrotate
|
||||
032ccce1850bc89fb37b4b23f1607ce73086ff2b057838a1b83e36751ee0412c537fc0c9cbc2c6e8098311e6a04569c7fc7f7dea80111e8c8623b3b0cc3cccd1 rsyslog.conf"
|
||||
|
||||
|
||||
378
testing/rsyslog/json-c.patch
Normal file
378
testing/rsyslog/json-c.patch
Normal file
@ -0,0 +1,378 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index ed3b54b..c0093d0 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -14,7 +14,7 @@ lmtcpsrv_la_SOURCES = \
|
||||
tcps_sess.h \
|
||||
tcpsrv.c \
|
||||
tcpsrv.h
|
||||
-lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+lmtcpsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
lmtcpsrv_la_LDFLAGS = -module -avoid-version
|
||||
lmtcpsrv_la_LIBADD =
|
||||
|
||||
diff --git a/action.c b/action.c
|
||||
index 259fb66..6b52d70 100644
|
||||
--- a/action.c
|
||||
+++ b/action.c
|
||||
@@ -98,7 +98,7 @@
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
-#include <json/json.h>
|
||||
+#include <json.h>
|
||||
|
||||
#include "dirty.h"
|
||||
#include "template.h"
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index 3682381..8c504b5 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -349,9 +349,6 @@
|
||||
/* Defined if debug mode is disabled. */
|
||||
#undef NDEBUG
|
||||
|
||||
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
-#undef NO_MINUS_C_MINUS_O
|
||||
-
|
||||
/* Indicator for a BSD OS */
|
||||
#undef OS_BSD
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bb0de0c..acf2cbe 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -33,7 +33,7 @@ PKG_PROG_PKG_CONFIG
|
||||
|
||||
# modules we require
|
||||
PKG_CHECK_MODULES(LIBESTR, libestr >= 0.1.5)
|
||||
-PKG_CHECK_MODULES([JSON_C], [json])
|
||||
+PKG_CHECK_MODULES([JSON_C], [json-c])
|
||||
|
||||
case "${host}" in
|
||||
*-*-linux*)
|
||||
diff --git a/grammar/Makefile.am b/grammar/Makefile.am
|
||||
index d231bb4..b5476e7 100644
|
||||
--- a/grammar/Makefile.am
|
||||
+++ b/grammar/Makefile.am
|
||||
@@ -11,7 +11,7 @@ libgrammar_la_SOURCES = \
|
||||
rainerscript.h \
|
||||
parserif.h \
|
||||
grammar.h
|
||||
-libgrammar_la_CPPFLAGS = $(RSRT_CFLAGS)
|
||||
+libgrammar_la_CPPFLAGS = $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
|
||||
#testdriver_SOURCES = testdriver.c libgrammar.la
|
||||
#testdriver_CPPFLAGS = $(RSRT_CFLAGS)
|
||||
diff --git a/plugins/imdiag/Makefile.am b/plugins/imdiag/Makefile.am
|
||||
index 33e86e9..b8d21ae 100644
|
||||
--- a/plugins/imdiag/Makefile.am
|
||||
+++ b/plugins/imdiag/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = imdiag.la
|
||||
|
||||
imdiag_la_SOURCES = imdiag.c
|
||||
-imdiag_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+imdiag_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
imdiag_la_LDFLAGS = -module -avoid-version
|
||||
imdiag_la_LIBADD =
|
||||
diff --git a/plugins/imfile/Makefile.am b/plugins/imfile/Makefile.am
|
||||
index 551639b..3c70868 100644
|
||||
--- a/plugins/imfile/Makefile.am
|
||||
+++ b/plugins/imfile/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = imfile.la
|
||||
|
||||
imfile_la_SOURCES = imfile.c
|
||||
-imfile_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+imfile_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
imfile_la_LDFLAGS = -module -avoid-version
|
||||
imfile_la_LIBADD =
|
||||
diff --git a/plugins/imklog/Makefile.am b/plugins/imklog/Makefile.am
|
||||
index 7d0d37c..ae84737 100644
|
||||
--- a/plugins/imklog/Makefile.am
|
||||
+++ b/plugins/imklog/Makefile.am
|
||||
@@ -10,6 +10,6 @@ if ENABLE_IMKLOG_LINUX
|
||||
imklog_la_SOURCES += bsd.c
|
||||
endif
|
||||
|
||||
-imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+imklog_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
imklog_la_LDFLAGS = -module -avoid-version
|
||||
imklog_la_LIBADD =
|
||||
diff --git a/plugins/immark/Makefile.am b/plugins/immark/Makefile.am
|
||||
index 6d8ed24..782dacc 100644
|
||||
--- a/plugins/immark/Makefile.am
|
||||
+++ b/plugins/immark/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = immark.la
|
||||
|
||||
immark_la_SOURCES = immark.c immark.h
|
||||
-immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS)
|
||||
+immark_la_CPPFLAGS = $(RSRT_CFLAGS) -I$(top_srcdir) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
|
||||
immark_la_LDFLAGS = -module -avoid-version
|
||||
immark_la_LIBADD =
|
||||
diff --git a/plugins/imtcp/Makefile.am b/plugins/imtcp/Makefile.am
|
||||
index 2665353..24ec856 100644
|
||||
--- a/plugins/imtcp/Makefile.am
|
||||
+++ b/plugins/imtcp/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = imtcp.la
|
||||
|
||||
imtcp_la_SOURCES = imtcp.c
|
||||
-imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+imtcp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
imtcp_la_LDFLAGS = -module -avoid-version
|
||||
imtcp_la_LIBADD =
|
||||
diff --git a/plugins/imudp/Makefile.am b/plugins/imudp/Makefile.am
|
||||
index bc64b8c..8409f86 100644
|
||||
--- a/plugins/imudp/Makefile.am
|
||||
+++ b/plugins/imudp/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = imudp.la
|
||||
|
||||
imudp_la_SOURCES = imudp.c
|
||||
-imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+imudp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
imudp_la_LDFLAGS = -module -avoid-version
|
||||
imudp_la_LIBADD = $(IMUDP_LIBS)
|
||||
diff --git a/plugins/imuxsock/Makefile.am b/plugins/imuxsock/Makefile.am
|
||||
index 28f9f9e..3db3a58 100644
|
||||
--- a/plugins/imuxsock/Makefile.am
|
||||
+++ b/plugins/imuxsock/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = imuxsock.la
|
||||
|
||||
imuxsock_la_SOURCES = imuxsock.c
|
||||
-imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+imuxsock_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
imuxsock_la_LDFLAGS = -module -avoid-version
|
||||
imuxsock_la_LIBADD = $(RSRT_LIBS)
|
||||
diff --git a/plugins/ommail/Makefile.am b/plugins/ommail/Makefile.am
|
||||
index 97c9296..6a178e0 100644
|
||||
--- a/plugins/ommail/Makefile.am
|
||||
+++ b/plugins/ommail/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = ommail.la
|
||||
|
||||
ommail_la_SOURCES = ommail.c
|
||||
-ommail_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+ommail_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
ommail_la_LDFLAGS = -module -avoid-version
|
||||
ommail_la_LIBADD =
|
||||
diff --git a/plugins/ommysql/Makefile.am b/plugins/ommysql/Makefile.am
|
||||
index e253b9d..f2336d0 100644
|
||||
--- a/plugins/ommysql/Makefile.am
|
||||
+++ b/plugins/ommysql/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
pkglib_LTLIBRARIES = ommysql.la
|
||||
|
||||
ommysql_la_SOURCES = ommysql.c ommysql.h
|
||||
-ommysql_la_CPPFLAGS = $(RSRT_CFLAGS) $(MYSQL_CFLAGS) $(PTHREADS_CFLAGS)
|
||||
+ommysql_la_CPPFLAGS = $(RSRT_CFLAGS) $(MYSQL_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
|
||||
ommysql_la_LDFLAGS = -module -avoid-version
|
||||
ommysql_la_LIBADD = $(MYSQL_LIBS)
|
||||
|
||||
diff --git a/plugins/ompgsql/Makefile.am b/plugins/ompgsql/Makefile.am
|
||||
index 607239c..664d3d1 100644
|
||||
--- a/plugins/ompgsql/Makefile.am
|
||||
+++ b/plugins/ompgsql/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
pkglib_LTLIBRARIES = ompgsql.la
|
||||
|
||||
ompgsql_la_SOURCES = ompgsql.c ompgsql.h
|
||||
-ompgsql_la_CPPFLAGS = -I$(top_srcdir) $(PGSQL_CFLAGS) $(RSRT_CFLAGS)
|
||||
+ompgsql_la_CPPFLAGS = -I$(top_srcdir) $(PGSQL_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
ompgsql_la_LDFLAGS = -module -avoid-version
|
||||
ompgsql_la_LIBADD = $(PGSQL_LIBS)
|
||||
|
||||
diff --git a/plugins/omprog/Makefile.am b/plugins/omprog/Makefile.am
|
||||
index 63fe09b..2d7e89b 100644
|
||||
--- a/plugins/omprog/Makefile.am
|
||||
+++ b/plugins/omprog/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
pkglib_LTLIBRARIES = omprog.la
|
||||
|
||||
omprog_la_SOURCES = omprog.c
|
||||
-omprog_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
|
||||
+omprog_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
|
||||
omprog_la_LDFLAGS = -module -avoid-version
|
||||
omprog_la_LIBADD =
|
||||
|
||||
diff --git a/plugins/omruleset/Makefile.am b/plugins/omruleset/Makefile.am
|
||||
index fdd91a6..c927dca 100644
|
||||
--- a/plugins/omruleset/Makefile.am
|
||||
+++ b/plugins/omruleset/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
pkglib_LTLIBRARIES = omruleset.la
|
||||
|
||||
omruleset_la_SOURCES = omruleset.c
|
||||
-omruleset_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
|
||||
+omruleset_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
|
||||
omruleset_la_LDFLAGS = -module -avoid-version
|
||||
omruleset_la_LIBADD =
|
||||
|
||||
diff --git a/plugins/omsnmp/Makefile.am b/plugins/omsnmp/Makefile.am
|
||||
index f75fb09..12c3083 100644
|
||||
--- a/plugins/omsnmp/Makefile.am
|
||||
+++ b/plugins/omsnmp/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = omsnmp.la
|
||||
|
||||
omsnmp_la_SOURCES = omsnmp.c omsnmp.h
|
||||
-omsnmp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+omsnmp_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
omsnmp_la_LDFLAGS = -module -avoid-version
|
||||
omsnmp_la_LIBADD = $(SNMP_LIBS)
|
||||
diff --git a/plugins/omstdout/Makefile.am b/plugins/omstdout/Makefile.am
|
||||
index 9f5d497..c4d9bcb 100644
|
||||
--- a/plugins/omstdout/Makefile.am
|
||||
+++ b/plugins/omstdout/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
pkglib_LTLIBRARIES = omstdout.la
|
||||
|
||||
omstdout_la_SOURCES = omstdout.c
|
||||
-omstdout_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS)
|
||||
+omstdout_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS)
|
||||
omstdout_la_LDFLAGS = -module -avoid-version
|
||||
omstdout_la_LIBADD =
|
||||
|
||||
diff --git a/plugins/omtesting/Makefile.am b/plugins/omtesting/Makefile.am
|
||||
index 4700e1e..2ee9017 100644
|
||||
--- a/plugins/omtesting/Makefile.am
|
||||
+++ b/plugins/omtesting/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
pkglib_LTLIBRARIES = omtesting.la
|
||||
|
||||
omtesting_la_SOURCES = omtesting.c
|
||||
-omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+omtesting_la_CPPFLAGS = -I$(top_srcdir) $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
omtesting_la_LDFLAGS = -module -avoid-version
|
||||
omtesting_la_LIBADD =
|
||||
diff --git a/plugins/omudpspoof/Makefile.am b/plugins/omudpspoof/Makefile.am
|
||||
index 79c495a..ff3c213 100644
|
||||
--- a/plugins/omudpspoof/Makefile.am
|
||||
+++ b/plugins/omudpspoof/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
pkglib_LTLIBRARIES = omudpspoof.la
|
||||
|
||||
omudpspoof_la_SOURCES = omudpspoof.c
|
||||
-omudpspoof_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(UDPSPOOF_CFLAGS)
|
||||
+omudpspoof_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(UDPSPOOF_CFLAGS) $(JSON_C_CFLAGS)
|
||||
omudpspoof_la_LDFLAGS = -module -avoid-version
|
||||
omudpspoof_la_LIBADD = $(UDPSPOOF_LIBS)
|
||||
|
||||
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
|
||||
index dea06fe..99b0022 100644
|
||||
--- a/runtime/Makefile.am
|
||||
+++ b/runtime/Makefile.am
|
||||
@@ -97,9 +97,9 @@ librsyslog_la_SOURCES = \
|
||||
#
|
||||
|
||||
if WITH_MODDIRS
|
||||
-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools
|
||||
+librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/:$(moddirs)\" $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS) -I\$(top_srcdir)/tools
|
||||
else
|
||||
-librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
|
||||
+librsyslog_la_CPPFLAGS = -DSD_EXPORT_SYMBOLS -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(PTHREADS_CFLAGS) $(JSON_C_CFLAGS) -I\$(top_srcdir)/tools -I\$(top_srcdir)/grammar
|
||||
endif
|
||||
#librsyslog_la_LDFLAGS = -module -avoid-version
|
||||
librsyslog_la_LIBADD = $(DL_LIBS) $(RT_LIBS)
|
||||
@@ -148,7 +148,7 @@ lmnetstrms_la_LIBADD =
|
||||
# generic stream server framework
|
||||
pkglib_LTLIBRARIES += lmstrmsrv.la
|
||||
lmstrmsrv_la_SOURCES = strmsrv.c strmsrv.h strms_sess.c strms_sess.h
|
||||
-lmstrmsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+lmstrmsrv_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
lmstrmsrv_la_LDFLAGS = -module -avoid-version
|
||||
lmstrmsrv_la_LIBADD =
|
||||
|
||||
@@ -159,7 +159,7 @@ pkglib_LTLIBRARIES += lmnsd_ptcp.la
|
||||
lmnsd_ptcp_la_SOURCES = nsd_ptcp.c nsd_ptcp.h \
|
||||
nsdsel_ptcp.c nsdsel_ptcp.h \
|
||||
nsdpoll_ptcp.c nsdpoll_ptcp.h
|
||||
-lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+lmnsd_ptcp_la_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
lmnsd_ptcp_la_LDFLAGS = -module -avoid-version
|
||||
lmnsd_ptcp_la_LIBADD =
|
||||
endif # if ENABLE_INET
|
||||
@@ -181,10 +181,10 @@ endif
|
||||
if ENABLE_LIBGCRYPT
|
||||
noinst_LTLIBRARIES += libgcry.la
|
||||
libgcry_la_SOURCES = libgcry.c libgcry_common.c libgcry.h
|
||||
- libgcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS)
|
||||
+ libgcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
pkglib_LTLIBRARIES += lmcry_gcry.la
|
||||
lmcry_gcry_la_SOURCES = lmcry_gcry.c lmcry_gcry.h
|
||||
- lmcry_gcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS)
|
||||
+ lmcry_gcry_la_CPPFLAGS = $(RSRT_CFLAGS) $(LIBGCRYPT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
lmcry_gcry_la_LDFLAGS = -module -avoid-version
|
||||
lmcry_gcry_la_LIBADD = libgcry.la $(LIBGCRYPT_LIBS)
|
||||
endif
|
||||
diff --git a/runtime/msg.c b/runtime/msg.c
|
||||
index a5c5281..4ca104e 100644
|
||||
--- a/runtime/msg.c
|
||||
+++ b/runtime/msg.c
|
||||
@@ -41,9 +41,7 @@
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#include <libestr.h>
|
||||
-#include <json/json.h>
|
||||
-/* For struct json_object_iter, should not be necessary in future versions */
|
||||
-#include <json/json_object_private.h>
|
||||
+#include <json.h>
|
||||
#if HAVE_MALLOC_H
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
diff --git a/runtime/msg.h b/runtime/msg.h
|
||||
index 6faf066..ac220b6 100644
|
||||
--- a/runtime/msg.h
|
||||
+++ b/runtime/msg.h
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <pthread.h>
|
||||
#include <libestr.h>
|
||||
-#include <json/json.h>
|
||||
+#include <json.h>
|
||||
#include "obj.h"
|
||||
#include "syslogd-types.h"
|
||||
#include "template.h"
|
||||
diff --git a/template.c b/template.c
|
||||
index b675255..9cefa05 100644
|
||||
--- a/template.c
|
||||
+++ b/template.c
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
-#include <json/json.h>
|
||||
+#include <json.h>
|
||||
#include "stringbuf.h"
|
||||
#include "syslogd-types.h"
|
||||
#include "template.h"
|
||||
diff --git a/template.h b/template.h
|
||||
index 318db6f..87a1c77 100644
|
||||
--- a/template.h
|
||||
+++ b/template.h
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef TEMPLATE_H_INCLUDED
|
||||
#define TEMPLATE_H_INCLUDED 1
|
||||
|
||||
-#include <json/json.h>
|
||||
+#include <json.h>
|
||||
#include <libestr.h>
|
||||
#include "regexp.h"
|
||||
#include "stringbuf.h"
|
||||
diff --git a/tools/Makefile.am b/tools/Makefile.am
|
||||
index 6832494..76c13cc 100644
|
||||
--- a/tools/Makefile.am
|
||||
+++ b/tools/Makefile.am
|
||||
@@ -38,7 +38,7 @@ rsyslogd_SOURCES = \
|
||||
pidfile.h \
|
||||
\
|
||||
../dirty.h
|
||||
-rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS)
|
||||
+rsyslogd_CPPFLAGS = $(PTHREADS_CFLAGS) $(RSRT_CFLAGS) $(JSON_C_CFLAGS)
|
||||
# note: it looks like librsyslog.la must be explicitely given on LDDADD,
|
||||
# otherwise dependencies are not properly calculated (resulting in a
|
||||
# potentially incomplete build, a problem we had several times...)
|
||||
87
testing/rsyslog/rsyslog.conf
Normal file
87
testing/rsyslog/rsyslog.conf
Normal file
@ -0,0 +1,87 @@
|
||||
# rsyslog v5: 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.
|
||||
|
||||
$ModLoad immark.so # provides --MARK-- message capability
|
||||
$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
|
||||
$ModLoad imklog.so # kernel logging (formerly provided by rklogd)
|
||||
|
||||
# Include configuration files from directory
|
||||
$IncludeConfig /etc/rsyslog.d/*
|
||||
|
||||
# Check config syntax on startup and abort if unclean (default off)
|
||||
#$AbortOnUncleanConfig on
|
||||
|
||||
# Reduce repeating messages (default off)
|
||||
#$RepeatedMsgReduction on
|
||||
|
||||
# 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!
|
||||
*.info;mail.none;authpriv.none;cron.none -/var/log/messages
|
||||
|
||||
# The authpriv file has restricted access.
|
||||
authpriv.* /var/log/secure
|
||||
|
||||
# Log all the mail messages in one place.
|
||||
mail.* -/var/log/maillog
|
||||
|
||||
# Log cron stuff
|
||||
cron.* -/var/log/cron
|
||||
|
||||
# Everybody gets emergency messages
|
||||
*.emerg *
|
||||
|
||||
# Save news errors of level crit and higher in a special file.
|
||||
uucp,news.crit -/var/log/spooler
|
||||
|
||||
# Save boot messages also to boot.log
|
||||
local7.* /var/log/boot.log
|
||||
|
||||
# More configuration examples:
|
||||
#
|
||||
# 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 1g # 1gb space limit (use as much as possible)
|
||||
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
|
||||
#$ActionQueueType LinkedList # run asynchronously
|
||||
#$ActionResumeRetryCount -1 # infinety retries if host is down
|
||||
#$ActionResumeInterval 30 # retry interval
|
||||
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
|
||||
#*.* @@remote-host
|
||||
|
||||
# Remote Logging with TCP + SSL/TLS
|
||||
#$DefaultNetstreamDriver gtls
|
||||
#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
|
||||
#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_CLIENT.cert.pem
|
||||
#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_CLIENT.key.pem
|
||||
#$ActionSendStreamDriverAuthMode x509/name # enable peer authentication
|
||||
#$ActionSendStreamDriverPermittedPeer foo # authorize to send encrypted data to server foo
|
||||
#$ActionSendStreamDriverMode 1 # run driver in TLS-only mode
|
||||
|
||||
# ######### Receiving Messages from Remote Hosts ##########
|
||||
# TCP Syslog Server:
|
||||
#$ModLoad imtcp # provides TCP syslog reception
|
||||
#$TCPServerRun 10514 # start a TCP syslog server at port 10514
|
||||
|
||||
# TCP + SSL/TLS Syslog Server:
|
||||
#$ModLoad imtcp # provides TCP syslog reception
|
||||
#$DefaultNetstreamDriver gtls # use gnuTLS for data encryption
|
||||
#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
|
||||
#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_SERVER.cert.pem
|
||||
#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_SERVER.key.pem
|
||||
#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
|
||||
#$InputTCPServerStreamDriverAuthMode x509/name # enable peer authentication
|
||||
#$InputTCPServerStreamDriverPermittedPeer bar # authorize client named bar (one line per client)
|
||||
#$TCPServerRun 10514 # start a TCP syslog server at port 10514
|
||||
|
||||
# UDP Syslog Server:
|
||||
#$ModLoad imudp.so # provides UDP syslog reception
|
||||
#$UDPServerRun 514 # start a UDP syslog server at standard port 514
|
||||
|
||||
17
testing/rsyslog/rsyslog.confd
Normal file
17
testing/rsyslog/rsyslog.confd
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.confd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
|
||||
|
||||
# Configuration file
|
||||
CONFIGFILE="/etc/rsyslog.conf"
|
||||
|
||||
# PID file
|
||||
PIDFILE="/var/run/rsyslogd.pid"
|
||||
|
||||
# Options to rsyslogd
|
||||
# See rsyslogd(8) for more details
|
||||
# Notes:
|
||||
# * Do not specify another PIDFILE but use the variable above to change the location
|
||||
# * Do not specify another CONFIGFILE but use the variable above to change the location
|
||||
# * "-c5" tells rsyslog to _not_ run in sysklogd compatibility mode
|
||||
RSYSLOG_OPTS="-c5"
|
||||
39
testing/rsyslog/rsyslog.initd
Normal file
39
testing/rsyslog/rsyslog.initd
Normal file
@ -0,0 +1,39 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.initd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
need clock hostname localmount
|
||||
provide logger
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting rsyslogd"
|
||||
start-stop-daemon \
|
||||
--start --quiet --exec /usr/sbin/rsyslogd \
|
||||
-- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping rsyslogd"
|
||||
start-stop-daemon \
|
||||
--stop --quiet \
|
||||
--pidfile "${PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
if [ ! -f "${PIDFILE}" ]; then
|
||||
eerror "rsyslogd not running"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ebegin "Re-opening rsyslogd log files"
|
||||
start-stop-daemon --stop --signal HUP \
|
||||
--pidfile "${PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
9
testing/rsyslog/rsyslog.logrotate
Normal file
9
testing/rsyslog/rsyslog.logrotate
Normal file
@ -0,0 +1,9 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.logrotate,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
|
||||
/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log {
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/rsyslog reload &>/dev/null || true
|
||||
endscript
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user