aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-12-20 06:49:01 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-12-20 06:49:01 +0000
commit6b4410b36643817d3eddb1db61a0d3b8360885b9 (patch)
tree0c2b22e9c26bfeff8591f488b1f5dfb3d669dbb9 /main
parent21d97e1607395bd694e0fd5f34705ae6cb77baa6 (diff)
downloadaports-6b4410b36643817d3eddb1db61a0d3b8360885b9.tar.bz2
aports-6b4410b36643817d3eddb1db61a0d3b8360885b9.tar.xz
main/ulogd: fix musl build
Diffstat (limited to 'main')
-rw-r--r--main/ulogd/APKBUILD14
-rw-r--r--main/ulogd/musl-fixes.patch62
2 files changed, 74 insertions, 2 deletions
diff --git a/main/ulogd/APKBUILD b/main/ulogd/APKBUILD
index 9afe00c1fd..f8f1fafc41 100644
--- a/main/ulogd/APKBUILD
+++ b/main/ulogd/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ulogd
pkgver=2.0.3
-pkgrel=0
+pkgrel=1
pkgdesc="A userspace logging daemon for netfilter/iptables related logging"
url="http://netfilter.org/projects/ulogd/index.html"
arch="all"
@@ -12,18 +12,25 @@ makedepends="libmnl-dev libpcap-dev libnetfilter_acct-dev
pkgconfig mysql-dev openssl-dev postgresql-dev zlib-dev"
subpackages="$pkgname-mysql $pkgname-pgsql $pkgname-doc"
source="http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
+ musl-fixes.patch
ulogd.initd
ulogd.confd
ulogd.logrotate"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
+ local i
cd "$_builddir"
-# update_config_sub || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
cd "$_builddir"
+ export CFLAGS="$CFLAGS -D_GNU_SOURCE"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -68,14 +75,17 @@ pgsql() {
}
md5sums="4dcd7e7a68022318759b8d3b9fff7519 ulogd-2.0.3.tar.bz2
+5f83766c1255bf75ab65d43bfb320820 musl-fixes.patch
5b229ed2622f1e5871a04cae62053112 ulogd.initd
b9b2fa217ee02211debee5a5dffdcda7 ulogd.confd
77688e9c300750f5423ed2ad37ae8b32 ulogd.logrotate"
sha256sums="1ec965073e7f4e5605b2bd1c143b2094e495ad24a298e6fc8f6fcbd131234376 ulogd-2.0.3.tar.bz2
+a5e1f9bf792227e657fc8af619af6e736712bb5b1e81faa16ea55c447482d547 musl-fixes.patch
acf80bf734536e14e60dde91019a608d278f2cba906d470f89feab1738e059b6 ulogd.initd
78cfce3aceba3f29e08f37b2f29784aedde1266d3b7dfdbe2426d2ed258e9c18 ulogd.confd
1acb7dad5182a9b9f9df88ef15ca31076fdba3ba6a63a5faad0edc96e3204ca9 ulogd.logrotate"
sha512sums="09d61cca6cd1c8137b3a4e5ce101f54e48f30c98761602a97766554bc4130eda632b8541f5c1e3e2ac686ec718bb4d440d3bea57c811317cabb274917c996140 ulogd-2.0.3.tar.bz2
+e512b1e1e6f00cc8d0c4e3eee7c87ba854d668e40d77e82aabfacdc79425b2101f8ec77f8f4fdf19b6f95e2a4595fd5d53560647cad45ab498a359cec92f57fd musl-fixes.patch
dcced874afa8fc6b02fdf6cedae2bde5eb04e9def32082b1f913b436786032f8c6a756cbd25b74c7df36cae2dda5a82a5a43d32b35a4bbe33d76abcfea41a9ba ulogd.initd
bdae1ff90c671b6847dfda1947a33e24bfbe16ad963f85769d923ba33021bc4ca315fd410b46fac102f0a24e879e4be4ad7bb5978c5a6755e74e6b5d7c3e18ee ulogd.confd
2ded9734ca903147ae2fc15af47d3f03ecc44f1f9b284d3c30d013a762d0cebf22e14ed3f5e7be8ee2d3d508c7b7afcdbc3819d4930c264416ed1fa463e03e6d ulogd.logrotate"
diff --git a/main/ulogd/musl-fixes.patch b/main/ulogd/musl-fixes.patch
new file mode 100644
index 0000000000..1b23de7dfe
--- /dev/null
+++ b/main/ulogd/musl-fixes.patch
@@ -0,0 +1,62 @@
+--- 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) {