aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2018-12-14 07:11:20 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-12-14 07:15:19 +0000
commitb60d437158115c32aa5591a97a51d78c6495f325 (patch)
treedcb2daa3bd7ef3b7116a345cc766c6e4ced823d3 /main
parent6e3d487970c313c40d922b9cc2d3479052ce82c6 (diff)
downloadaports-b60d437158115c32aa5591a97a51d78c6495f325.tar.bz2
aports-b60d437158115c32aa5591a97a51d78c6495f325.tar.xz
main/ulogd: upgrade to 2.0.7
Create openrc subpkg, remove unused patch, update musl patch
Diffstat (limited to 'main')
-rw-r--r--main/ulogd/APKBUILD13
-rw-r--r--main/ulogd/fix-pluginit.patch12
-rw-r--r--main/ulogd/musl-fixes.patch68
3 files changed, 13 insertions, 80 deletions
diff --git a/main/ulogd/APKBUILD b/main/ulogd/APKBUILD
index 6527492c41..8b940758b4 100644
--- a/main/ulogd/APKBUILD
+++ b/main/ulogd/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ulogd
-pkgver=2.0.5
-pkgrel=8
+pkgver=2.0.7
+pkgrel=0
pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
url="http://netfilter.org/projects/ulogd/index.html"
arch="all"
@@ -12,10 +12,9 @@ makedepends="libmnl-dev libpcap-dev libnetfilter_acct-dev bsd-compat-headers
libnfnetlink-dev libnetfilter_conntrack-dev libnetfilter_log-dev
pkgconfig mariadb-connector-c-dev openssl-dev postgresql-dev zlib-dev linux-headers
autoconf automake libtool"
-subpackages="$pkgname-mysql $pkgname-pgsql $pkgname-doc"
+subpackages="$pkgname-mysql $pkgname-pgsql $pkgname-doc $pkgname-openrc"
source="https://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
musl-fixes.patch
- fix-pluginit.patch
ulogd.initd
ulogd.confd
"
@@ -42,7 +41,6 @@ package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
install -Dm644 ulogd.conf "$pkgdir"/etc/ulogd.conf
- install -Dm644 ulogd.logrotate "$pkgdir"/etc/logrotate.d/ulogd
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -dm755 "$pkgdir"/usr/share/doc/ulogd
@@ -67,8 +65,7 @@ pgsql() {
mv "$pkgdir"/usr/lib/ulogd/ulogd_output_PGSQL.so "$subpkgdir"/usr/lib/ulogd/
}
-sha512sums="bf00b8adaad7bd04077a83521b0d7accc26e644c8f3386819e7f91476178b6733f1c6554fb82dd0d3913398c83a61d65f61dc973f199f610bfaadc6251504819 ulogd-2.0.5.tar.bz2
-637598d5cd03dc284f301ac966da0adc09ae7ecffe0d202ab9a7dcf389274ee0c76b1785a095c0f67ce7eee883e66efd56c1006d5323a2d716070e88daca9122 musl-fixes.patch
-5e98a45dac0d13520d16c6b45560dfed398bdac78f5328a40566088493a90793ccd01c0ac576bed4d0b97fdb49df19191bde83f631323c387bf1ed77dcbfa57c fix-pluginit.patch
+sha512sums="1ad12bcf91bebe8bf8580de38693318cdabd17146f1f65acf714334885cf13adf5f783abdf2dd67474ef12f82d2cfb84dd4859439bc7af10a0df58e4c7e48b09 ulogd-2.0.7.tar.bz2
+f65e051520645c5e1618b1ef9d570ebac77ec8d05972c9b58ca93475a9612a725b26634a71e9fb8e117ae004a2dc13da2a1368b549d2808bd299e39b8f8d6bab musl-fixes.patch
ab60e367a18d6dafcf5ee22562e303d74944f97b1e42717607db85f11d15d94be3e0e9aaa422c2bac13cdeee1aabc550f751f3e6419b1c7b16d86d0ee8fad55a ulogd.initd
bdae1ff90c671b6847dfda1947a33e24bfbe16ad963f85769d923ba33021bc4ca315fd410b46fac102f0a24e879e4be4ad7bb5978c5a6755e74e6b5d7c3e18ee ulogd.confd"
diff --git a/main/ulogd/fix-pluginit.patch b/main/ulogd/fix-pluginit.patch
deleted file mode 100644
index 030313068a..0000000000
--- a/main/ulogd/fix-pluginit.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru ulogd-2.0.5.orig/src/ulogd.c ulogd-2.0.5/src/ulogd.c
---- ulogd-2.0.5.orig/src/ulogd.c 2016-03-15 16:15:23.743995611 +0200
-+++ ulogd-2.0.5/src/ulogd.c 2016-03-16 15:59:31.459082159 +0200
-@@ -571,7 +571,7 @@
- INIT_LLIST_HEAD(&pi->plist);
- pi->plugin = pl;
- pi->stack = stack;
-- memcpy(pi->id, pi_id, sizeof(pi->id));
-+ strncpy(pi->id, pi_id, sizeof(pi->id));
-
- ptr = (void *)pi + sizeof(*pi);
-
diff --git a/main/ulogd/musl-fixes.patch b/main/ulogd/musl-fixes.patch
index d210a83d17..f50c65cce4 100644
--- a/main/ulogd/musl-fixes.patch
+++ b/main/ulogd/musl-fixes.patch
@@ -1,62 +1,10 @@
---- a/filter/raw2packet/ulogd_raw2packet_BASE.c
-+++ b/filter/raw2packet/ulogd_raw2packet_BASE.c
-@@ -43,6 +43,7 @@
- #include <ulogd/ipfix_protocol.h>
- #include <netinet/if_ether.h>
- #include <string.h>
-+#include <linux/types.h>
-
- enum input_keys {
- INKEY_RAW_PCKT,
--- a/src/ulogd.c
+++ b/src/ulogd.c
-@@ -78,12 +78,12 @@
- "(C) 2008-2012 Eric Leblond <eric@regit.org>\n"
-
- /* global variables */
-+static int log_to_syslog = 0;
- static FILE *logfile = NULL; /* logfile pointer */
- static char *ulogd_logfile = NULL;
- static const char *ulogd_configfile = ULOGD_CONFIGFILE;
- static const char *ulogd_pidfile = NULL;
- static int ulogd_pidfile_fd = -1;
--static FILE syslog_dummy;
-
- static int info_mode = 0;
-
-@@ -427,7 +427,7 @@
- if (level < loglevel_ce.u.value)
- return;
-
-- if (logfile == &syslog_dummy) {
-+ if (log_to_syslog) {
- /* FIXME: this omits the 'file' string */
- va_start(ap, format);
- vsyslog(ulogd2syslog_level(level), format, ap);
-@@ -950,7 +950,7 @@
- logfile = stdout;
- } else if (!strcmp(name, "syslog")) {
- openlog("ulogd", LOG_PID, LOG_DAEMON);
-- logfile = &syslog_dummy;
-+ log_to_syslog = 1;
- } else {
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
-@@ -1240,7 +1240,7 @@
- unload_plugins();
- #endif
-
-- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
-+ if (logfile != NULL && logfile != stdout) {
- fclose(logfile);
- logfile = NULL;
- }
-@@ -1262,7 +1262,7 @@
- switch (signal) {
- case SIGHUP:
- /* reopen logfile */
-- if (logfile != stdout && logfile != &syslog_dummy) {
-+ if (logfile != stdout && logfile != NULL) {
- fclose(logfile);
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
+@@ -65,6 +65,7 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sched.h>
++#include <linux/limits.h>
+ #include <ulogd/conffile.h>
+ #include <ulogd/ulogd.h>
+ #ifdef DEBUG