Thursday, April 29, 2021

Re: eventlog vs. syslog-ng eventlog

On Thu, 29 Apr 2021 08:21:24 +0100, Stuart Henderson wrote:

> Yes retiring the separate port makes sense.

Here's a diff that just changes sysyutils/syslog-ng to use the
bundled copy of libevtlog. After this is committed I will remove
sysyutils/eventlog.

OK?

- todd

Index: sysutils/syslog-ng/Makefile
===================================================================
RCS file: /cvs/ports/sysutils/syslog-ng/Makefile,v
retrieving revision 1.68
diff -u -p -u -r1.68 Makefile
--- sysutils/syslog-ng/Makefile 30 Dec 2019 22:45:11 -0000 1.68
+++ sysutils/syslog-ng/Makefile 29 Apr 2021 17:20:02 -0000
@@ -6,7 +6,7 @@ V = 3.12.1
REL = 3.12
DISTNAME = syslog-ng-$V
CATEGORIES = sysutils
-REVISION = 7
+REVISION = 8

MAINTAINER = Steven Mestdagh <steven@openbsd.org>

@@ -15,13 +15,15 @@ HOMEPAGE = https://syslog-ng.com/
# GPL v2
PERMIT_PACKAGE = Yes

-WANTLIB += c crypto curl dbi evtlog glib-2.0 gmodule-2.0 gthread-2.0
+WANTLIB += c crypto curl dbi glib-2.0 gmodule-2.0 gthread-2.0
WANTLIB += iconv intl ivykis json-c m maxminddb nghttp2 pcre pthread
WANTLIB += ssl z

MASTER_SITES = http://github.com/balabit/syslog-ng/releases/download/${DISTNAME}/

-SHARED_LIBS = syslog-ng 5.0 \
+SHARED_LIBS = evtlog 1.0 \
+ evtlog-${REL} 1.0 \
+ syslog-ng 5.0 \
syslog-ng-${REL} 5.0

# needs a newer compiler due to libmaxminddb header
@@ -31,7 +33,6 @@ COMPILER_LANGS = c
LIB_DEPENDS = devel/glib2 \
devel/json-c \
devel/libivykis \
- sysutils/eventlog \
databases/libdbi>=0.9.0 \
net/curl \
net/libmaxminddb
@@ -62,9 +63,7 @@ CONFIGURE_ENV += OPENSSL_CFLAGS="-I/usr/
LDFLAGS="-L${LOCALBASE}/lib"
# json-c only installs libjson-c.pc; syslog-ng checks for libjson.pc
CONFIGURE_ENV += JSON_C_CFLAGS="`pkg-config json-c --cflags`" \
- JSON_C_LIBS="`pkg-config json-c --libs`" \
- EVTLOG_LIBS="-L${LOCALBASE}/lib -levtlog" \
- EVTLOG_CFLAGS="-I${LOCALBASE}/include/eventlog"
+ JSON_C_LIBS="`pkg-config json-c --libs`"

USE_GMAKE = Yes

Index: sysutils/syslog-ng/patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/sysutils/syslog-ng/patches/patch-Makefile_in,v
retrieving revision 1.11
diff -u -p -u -r1.11 patch-Makefile_in
--- sysutils/syslog-ng/patches/patch-Makefile_in 10 Nov 2017 21:58:26 -0000 1.11
+++ sysutils/syslog-ng/patches/patch-Makefile_in 29 Apr 2021 17:11:47 -0000
@@ -2,20 +2,10 @@ $OpenBSD: patch-Makefile_in,v 1.11 2017/
- temporary hack until libtool is fixed.
- work around different getent API, adapted from
https://github.com/balabit/syslog-ng/commit/8b33cbe143b00d6af72cb5145fecd67e6158a9dd
-- avoid rebuilding libeventlog, already in devel/eventlog

Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
-@@ -3572,7 +3572,7 @@ noinst_LIBRARIES =
- noinst_DATA =
- noinst_LTLIBRARIES = modules/dbparser/libsyslog-ng-patterndb.la \
- modules/diskq/libsyslog-ng-disk-buffer.la
--lib_LTLIBRARIES = lib/eventlog/src/libevtlog.la lib/libsyslog-ng.la
-+lib_LTLIBRARIES = lib/libsyslog-ng.la
-
- # this is intentionally formatted so conflicts are less likely to arise. one name in every line.
- pkginclude_HEADERS = syslog-ng-config.h lib/eventlog/src/evtmaps.h \
@@ -4183,7 +4183,9 @@ compatinclude_HEADERS = \
lib/compat/string.h \
lib/compat/time.h \
@@ -37,15 +27,6 @@ Index: Makefile.in

lib_compat_tests_TESTS = \
lib/compat/tests/test_strtok_r
-@@ -4327,7 +4330,7 @@ lib_libsyslog_ng_la_LDFLAGS = -no-undefined -release $
- -version-info ${LSNG_CURRENT}:${LSNG_REVISION}:${LSNG_AGE}
-
- lib_test_subdirs = lib_filter lib_logproto lib_parser lib_rewrite lib_template lib_stats lib_control
--lib_libsyslog_ng_la_DEPENDENCIES = lib/eventlog/src/libevtlog.la \
-+lib_libsyslog_ng_la_DEPENDENCIES = \
- $(am__append_8)
-
- # this is intentionally formatted so conflicts are less likely to arise. one name in every line.
@@ -7089,7 +7092,7 @@ lib/str-repr/lib_libsyslog_ng_la-encode.lo: \
lib/str-repr/$(am__dirstamp) \
lib/str-repr/$(DEPDIR)/$(am__dirstamp)
Index: sysutils/syslog-ng/patches/patch-configure
===================================================================
RCS file: sysutils/syslog-ng/patches/patch-configure
diff -N sysutils/syslog-ng/patches/patch-configure
--- sysutils/syslog-ng/patches/patch-configure 28 Nov 2017 18:03:07 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-configure,v 1.7 2017/11/28 18:03:07 steven Exp $
-- avoid rebuilding libeventlog, already in devel/eventlog
-
-Index: configure
---- configure.orig
-+++ configure
-@@ -14441,9 +14441,6 @@ done
-
-
-
--EVTLOG_LIBS="-Wl,${WHOLE_ARCHIVE_OPT} -L\$(top_builddir)/lib/eventlog/src -levtlog -Wl,${NO_WHOLE_ARCHIVE_OPT}"
--EVTLOG_NO_LIBTOOL_LIBS="-Wl,${WHOLE_ARCHIVE_OPT} -L\$(top_builddir)/lib/eventlog/src/.libs -levtlog -Wl,${NO_WHOLE_ARCHIVE_OPT}"
--EVTLOG_CFLAGS="-I\$(top_srcdir)/lib/eventlog/src -I\$(top_builddir)/lib/eventlog/src"
-
-
- old_LIBS=$LIBS
-@@ -17665,7 +17662,7 @@ fi
- else
- pkg_failed=untried
- fi
--
-+pkg_failed=yes
-
-
- if test $pkg_failed = yes; then
Index: sysutils/syslog-ng/pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/syslog-ng/pkg/PLIST,v
retrieving revision 1.24
diff -u -p -u -r1.24 PLIST
--- sysutils/syslog-ng/pkg/PLIST 9 Dec 2019 14:45:16 -0000 1.24
+++ sysutils/syslog-ng/pkg/PLIST 29 Apr 2021 17:22:01 -0000
@@ -225,9 +225,13 @@ include/syslog-ng/value-pairs/evttag.h
include/syslog-ng/value-pairs/transforms.h
include/syslog-ng/value-pairs/value-pairs.h
include/syslog-ng/versioning.h
+@lib lib/libevtlog-3.12.so.${LIBevtlog-3.12_VERSION}
+@static-lib lib/libevtlog.a
+lib/libevtlog.la
+@lib lib/libevtlog.so.${LIBevtlog_VERSION}
@lib lib/libsyslog-ng-3.12.so.${LIBsyslog-ng-3.12_VERSION}
-lib/libsyslog-ng-native-connector.a
-lib/libsyslog-ng.a
+@static-lib lib/libsyslog-ng-native-connector.a
+@static-lib lib/libsyslog-ng.a
lib/libsyslog-ng.la
@lib lib/libsyslog-ng.so.${LIBsyslog-ng_VERSION}
lib/pkgconfig/syslog-ng-add-contextual-data.pc
@@ -235,37 +239,37 @@ lib/pkgconfig/syslog-ng-native-connector
lib/pkgconfig/syslog-ng-test.pc
lib/pkgconfig/syslog-ng.pc
lib/syslog-ng/
-lib/syslog-ng/libadd-contextual-data.so
-lib/syslog-ng/libaffile.so
-lib/syslog-ng/libafprog.so
-lib/syslog-ng/libafsocket.so
-lib/syslog-ng/libafsql.so
-lib/syslog-ng/libafuser.so
-lib/syslog-ng/libbasicfuncs.so
-lib/syslog-ng/libcef.so
-lib/syslog-ng/libconfgen.so
-lib/syslog-ng/libcryptofuncs.so
-lib/syslog-ng/libcsvparser.so
-lib/syslog-ng/libdate.so
-lib/syslog-ng/libdbparser.so
-lib/syslog-ng/libdisk-buffer.so
-lib/syslog-ng/libgeoip2-plugin.so
-lib/syslog-ng/libgraphite.so
-lib/syslog-ng/libhttp.so
-lib/syslog-ng/libjson-plugin.so
-lib/syslog-ng/libkvformat.so
-lib/syslog-ng/liblinux-kmsg-format.so
-lib/syslog-ng/libmap-value-pairs.so
-lib/syslog-ng/libpseudofile.so
-lib/syslog-ng/libsnmptrapd-parser.so
-lib/syslog-ng/libstardate.so
-lib/syslog-ng/libsyslogformat.so
-lib/syslog-ng/libsystem-source.so
-lib/syslog-ng/libtags-parser.so
+@so lib/syslog-ng/libadd-contextual-data.so
+@so lib/syslog-ng/libaffile.so
+@so lib/syslog-ng/libafprog.so
+@so lib/syslog-ng/libafsocket.so
+@so lib/syslog-ng/libafsql.so
+@so lib/syslog-ng/libafuser.so
+@so lib/syslog-ng/libbasicfuncs.so
+@so lib/syslog-ng/libcef.so
+@so lib/syslog-ng/libconfgen.so
+@so lib/syslog-ng/libcryptofuncs.so
+@so lib/syslog-ng/libcsvparser.so
+@so lib/syslog-ng/libdate.so
+@so lib/syslog-ng/libdbparser.so
+@so lib/syslog-ng/libdisk-buffer.so
+@so lib/syslog-ng/libgeoip2-plugin.so
+@so lib/syslog-ng/libgraphite.so
+@so lib/syslog-ng/libhttp.so
+@so lib/syslog-ng/libjson-plugin.so
+@so lib/syslog-ng/libkvformat.so
+@so lib/syslog-ng/liblinux-kmsg-format.so
+@so lib/syslog-ng/libmap-value-pairs.so
+@so lib/syslog-ng/libpseudofile.so
+@so lib/syslog-ng/libsnmptrapd-parser.so
+@so lib/syslog-ng/libstardate.so
+@so lib/syslog-ng/libsyslogformat.so
+@so lib/syslog-ng/libsystem-source.so
+@so lib/syslog-ng/libtags-parser.so
lib/syslog-ng/libtest/
-lib/syslog-ng/libtest/libsyslog-ng-test.a
-lib/syslog-ng/libtfgetent.so
-lib/syslog-ng/libxml.so
+@static-lib lib/syslog-ng/libtest/libsyslog-ng-test.a
+@so lib/syslog-ng/libtfgetent.so
+@so lib/syslog-ng/libxml.so
@man man/man1/dqtool.1
@man man/man1/loggen.1
@man man/man1/pdbtool.1

No comments:

Post a Comment