Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions admin/rsyslog/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ if PACKAGE_rsyslog
default n
help
Enable input file module in rsyslog
config RSYSLOG_mmnormalize
bool "Enable mmnormalize module support"
default n
help
Enable mmnormalize module in rsyslog
endif
5 changes: 3 additions & 2 deletions admin/rsyslog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ define Package/rsyslog
+RSYSLOG_libdbi:libdbi +libestr +libfastjson +RSYSLOG_gnutls:libgnutls \
+RSYSLOG_mmdblookup:libmaxminddb +RSYSLOG_mysql:libmysqlclient \
+RSYSLOG_omhttp:libcurl +RSYSLOG_openssl:libopenssl \
+RSYSLOG_pgsql:libpq +libuuid +zlib
+RSYSLOG_pgsql:libpq +libuuid +zlib +RSYSLOG_mmnormalize:liblognorm
MENU:=1
endef

Expand All @@ -61,7 +61,8 @@ CONFIGURE_ARGS+= \
$(if $(CONFIG_RSYSLOG_mail),--enable-mail) \
$(if $(CONFIG_RSYSLOG_mmjsonparse),--enable-mmjsonparse) \
$(if $(CONFIG_RSYSLOG_mmdblookup),--enable-mmdblookup) \
$(if $(CONFIG_RSYSLOG_imfile),--enable-imfile)
$(if $(CONFIG_RSYSLOG_imfile),--enable-imfile) \
$(if $(CONFIG_RSYSLOG_mmnormalize),--enable-mmnormalize)

define Package/rsyslog/install
$(INSTALL_DIR) $(1)/usr/sbin
Expand Down
47 changes: 47 additions & 0 deletions libs/liblognorm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=liblognorm
PKG_VERSION:=2.0.6
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.liblognorm.com/files/download
PKG_HASH:=cff057e85c22038992f9ed12eb8d4e63c45adf53a5a51faaa3279f605809f6f2

PKG_MAINTAINER:=Carlo Filippi <[email protected]>
PKG_LICENSE:=LGPL-2.1-or-later Apache-2.0
PKG_LICENSE_FILES:=COPYING COPYING.ASL20

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/liblognorm
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Lognorm library
URL:=https://www.liblognorm.com/
DEPENDS:=+libestr +libfastjson
endef

define Package/liblognorm/description
Liblognorm is a fast-samples based log normalization library
endef

CONFIGURE_ARGS += --enable-docs=no
TARGET_CFLAGS += $(FPIC)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about enabled REGEXP support?
Dont we need to disable docs?

Have you checked https://github.com/rsyslog/liblognorm/blob/master/configure.ac#L189 ?

Anyway, I am not sure, if we want to add 8 years old library, which doesnt switch to PCRE2 support, yet.
rsyslog/liblognorm#374

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs building is not needed so I disabled it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support for pcre2 would be optimal, but the rsyslog/liblognorm#374 is still open.

I prefer to stick to the original release by the author and not add a patch that integrates it.

Debian has also chosen to maintain the author's version in the last os release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support for pcre2 would be optimal, but the rsyslog/liblognorm#374 is still open.

My biggest concern is that we dont have any package which relies on PCRE and we have all packages using PCRE2. (#22006) and I dont like to merge a new package, which is using PCRE.

Even though, it is disabled by default according to https://github.com/rsyslog/liblognorm/blob/01641bd80924731e6bad84025ed9a22dc480ef13/configure.ac#L73, but still someone tries to add PCRE2 support into liblognom 2 years ago and no one looked at it yet. This raises another potentionally redflag to add it here, because what if there is security flaw or some other nasty bug, which will needs to be fixed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BKPepe thanks for your comment. I read #22006 and changelogs from https://www.pcre.org/. I totally agree with you and the community policy.

I left a comment in rsyslog/liblognorm#374 to try once again to get PCRE2 support in rsyslog/liblognorm. If no one will look in next days, I can write a patch to add the support to PCR2 in openwrt. What do you think about?


define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
endef

define Package/liblognorm/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblognorm.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,liblognorm))