ulogd: update to 2.0.7.
Add runit service, logrotate file, and system account
This commit is contained in:
parent
b00e4b1800
commit
6eeeb9c08a
5 changed files with 36 additions and 70 deletions
9
srcpkgs/ulogd/files/ulogd.logrotate
Normal file
9
srcpkgs/ulogd/files/ulogd.logrotate
Normal file
|
@ -0,0 +1,9 @@
|
|||
/var/log/ulog.log /var/log/ulog.pcap {
|
||||
missingok
|
||||
compress
|
||||
sharedscripts
|
||||
create 640 _ulogd adm
|
||||
postrotate
|
||||
sv hup ulogd
|
||||
endscript
|
||||
}
|
2
srcpkgs/ulogd/files/ulogd/run
Normal file
2
srcpkgs/ulogd/files/ulogd/run
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec ulogd -u _ulogd
|
10
srcpkgs/ulogd/patches/00-musl-path.patch
Normal file
10
srcpkgs/ulogd/patches/00-musl-path.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/ulogd.c
|
||||
+++ src/ulogd.c
|
||||
@@ -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
|
|
@ -1,62 +0,0 @@
|
|||
--- ulogd-2.0.3.orig/filter/raw2packet/ulogd_raw2packet_BASE.c
|
||||
+++ ulogd-2.0.3/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,
|
||||
--- ulogd-2.0.3.orig/src/ulogd.c
|
||||
+++ ulogd-2.0.3/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) {
|
|
@ -1,16 +1,23 @@
|
|||
# Template file for 'ulogd'
|
||||
pkgname=ulogd
|
||||
version=2.0.5
|
||||
revision=3
|
||||
version=2.0.7
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
maintainer="Orphaned <orphan@voidlinux.eu>"
|
||||
maintainer="Cameron Nemo <camerontnorman@gmail.com>"
|
||||
hostmakedepends="pkg-config automake"
|
||||
makedepends="libnfnetlink-devel libmnl-devel libnetfilter_log-devel libnetfilter_conntrack-devel libnetfilter_acct-devel"
|
||||
license="GPL-2"
|
||||
makedepends="libnfnetlink-devel libmnl-devel libnetfilter_log-devel
|
||||
libnetfilter_conntrack-devel libnetfilter_acct-devel"
|
||||
license="GPL-2.0-only"
|
||||
homepage="http://www.netfilter.org/projects/ulogd/"
|
||||
short_desc="A userspace logging daemon for netfilter/iptables related logging"
|
||||
distfiles="http://www.netfilter.org/projects/${pkgname}/files/${pkgname}-${version}.tar.bz2"
|
||||
checksum=a221cb9f77347c0ca00d0937e27c1b90e3291a553cc62a4139b788e2e420e8c0
|
||||
distfiles="${homepage}/files/${pkgname}-${version}.tar.bz2"
|
||||
checksum=990a05494d9c16029ba0a83f3b7294fc05c756546b8d60d1c1572dc25249a92b
|
||||
configure_args="--sbindir=/usr/bin"
|
||||
patch_args="-Np1"
|
||||
CFLAGS="-D_GNU_SOURCE"
|
||||
system_accounts="_ulogd"
|
||||
|
||||
post_install() {
|
||||
vinstall ulogd.conf 644 etc
|
||||
vinstall ${FILESDIR}/ulogd.logrotate 644 etc/logrotate.d ulogd
|
||||
vsv ulogd
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue