summaryrefslogtreecommitdiff
path: root/package/ulogd
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-11-11 21:31:52 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2013-11-11 21:31:52 +0100
commitf96475863d378f095579093774518084b3c7dbf8 (patch)
treecdd8d5e93b6e178786f482d3438b6c734411512e /package/ulogd
parentc4c872e9cb0b113ec0d9c45371bcad1af8bd28a8 (diff)
convert to new autotool infrastructure
Diffstat (limited to 'package/ulogd')
-rw-r--r--package/ulogd/Makefile6
-rw-r--r--package/ulogd/patches/patch-config_h_in12
-rw-r--r--package/ulogd/patches/patch-configure_ac11
-rw-r--r--package/ulogd/patches/patch-filter_raw2packet_ulogd_raw2packet_BASE_c17
-rw-r--r--package/ulogd/patches/patch-include_linux_tcp_h37
-rw-r--r--package/ulogd/patches/patch-output_sqlite3_queue_h (renamed from package/ulogd/patches/autotools.patch)161
-rw-r--r--package/ulogd/patches/patch-output_sqlite3_ulogd_output_SQLITE3_c14
-rw-r--r--package/ulogd/patches/patch-src_ulogd_c47
8 files changed, 146 insertions, 159 deletions
diff --git a/package/ulogd/Makefile b/package/ulogd/Makefile
index a300bb7ed..1fecb81f6 100644
--- a/package/ulogd/Makefile
+++ b/package/ulogd/Makefile
@@ -11,6 +11,7 @@ PKG_DESCR:= Netfilter userspace logging daemon
PKG_SECTION:= firewall
PKG_DEPENDS:= iptables libnetfilter-conntrack libnetfilter-log libnetfilter-acct libmnl
PKG_BUILDDEP:= iptables libnetfilter_conntrack libnetfilter_log libnetfilter_acct libmnl
+PKG_BUILDDEP+= autotool
PKG_URL:= http://www.netfilter.org/projects/ulogd/
PKG_SITES:= http://www.netfilter.org/projects/ulogd/files/
PKG_MULTI:= 1
@@ -42,15 +43,20 @@ $(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,${PKG_VERSION}-${PKG_RE
$(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_ULOGD_MOD_PGSQL},${PKGSD_ULOGD_MOD_PGSQL},${PKG_SECTION}))
$(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_ULOGD_MOD_SQLITE},${PKGSD_ULOGD_MOD_SQLITE},${PKG_SECTION}))
+AUTOTOOL_STYLE:= autoreconf
TARGET_CPPFLAGS+= -D_GNU_SOURCE
TARGET_CFLAGS+= -fPIC
ifneq (${ADK_PACKAGE_ULOGD_MOD_MYSQL},)
CONFIGURE_ARGS+= --with-mysql=${STAGING_TARGET_DIR}/usr
+else
+CONFIGURE_ARGS+= --without-mysql
endif
ifneq (${ADK_PACKAGE_ULOGD_MOD_PGSQL},)
CONFIGURE_ARGS+= --with-pgsql=${STAGING_TARGET_DIR}/usr
+else
+CONFIGURE_ARGS+= --without-pgsql
endif
ulogd-install:
diff --git a/package/ulogd/patches/patch-config_h_in b/package/ulogd/patches/patch-config_h_in
new file mode 100644
index 000000000..1b768cdcd
--- /dev/null
+++ b/package/ulogd/patches/patch-config_h_in
@@ -0,0 +1,12 @@
+--- ulogd-2.0.2.orig/config.h.in 2013-03-03 22:19:17.000000000 +0100
++++ ulogd-2.0.2/config.h.in 2013-11-11 21:27:31.000000000 +0100
+@@ -66,6 +66,9 @@
+ */
+ #undef HAVE_SYS_NDIR_H
+
++/* Define to 1 if you have the <sys/queue.h> header file. */
++#undef HAVE_SYS_QUEUE_H
++
+ /* Define to 1 if you have the <sys/stat.h> header file. */
+ #undef HAVE_SYS_STAT_H
+
diff --git a/package/ulogd/patches/patch-configure_ac b/package/ulogd/patches/patch-configure_ac
new file mode 100644
index 000000000..389b26f15
--- /dev/null
+++ b/package/ulogd/patches/patch-configure_ac
@@ -0,0 +1,11 @@
+--- ulogd-2.0.2.orig/configure.ac 2013-03-01 16:45:23.000000000 +0100
++++ ulogd-2.0.2/configure.ac 2013-11-11 21:27:31.000000000 +0100
+@@ -32,7 +32,7 @@ fi
+ dnl Checks for header files.
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS(fcntl.h unistd.h)
++AC_CHECK_HEADERS(fcntl.h unistd.h sys/queue.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
diff --git a/package/ulogd/patches/patch-filter_raw2packet_ulogd_raw2packet_BASE_c b/package/ulogd/patches/patch-filter_raw2packet_ulogd_raw2packet_BASE_c
new file mode 100644
index 000000000..b77ea9bf4
--- /dev/null
+++ b/package/ulogd/patches/patch-filter_raw2packet_ulogd_raw2packet_BASE_c
@@ -0,0 +1,17 @@
+--- ulogd-2.0.2.orig/filter/raw2packet/ulogd_raw2packet_BASE.c 2013-03-01 16:44:22.000000000 +0100
++++ ulogd-2.0.2/filter/raw2packet/ulogd_raw2packet_BASE.c 2013-11-11 21:27:31.000000000 +0100
+@@ -588,10 +588,10 @@ static int _interp_udp(struct ulogd_plug
+
+ /* Section 3.1. SCTP Common Header Format */
+ typedef struct sctphdr {
+- __be16 source;
+- __be16 dest;
+- __be32 vtag;
+- __be32 checksum;
++ uint16_t source;
++ uint16_t dest;
++ uint32_t vtag;
++ uint32_t checksum;
+ } __attribute__((packed)) sctp_sctphdr_t;
+
+ static int _interp_sctp(struct ulogd_pluginstance *pi, struct sctphdr *sctph,
diff --git a/package/ulogd/patches/patch-include_linux_tcp_h b/package/ulogd/patches/patch-include_linux_tcp_h
new file mode 100644
index 000000000..2752fc21b
--- /dev/null
+++ b/package/ulogd/patches/patch-include_linux_tcp_h
@@ -0,0 +1,37 @@
+--- ulogd-2.0.2.orig/include/linux/tcp.h 1970-01-01 00:00:00.000000000 +0100
++++ ulogd-2.0.2/include/linux/tcp.h 2013-11-11 21:27:31.000000000 +0100
+@@ -0,0 +1,34 @@
++struct tcphdr
++ {
++ u_int16_t source;
++ u_int16_t dest;
++ u_int32_t seq;
++ u_int32_t ack_seq;
++# if __BYTE_ORDER == __LITTLE_ENDIAN
++ u_int16_t res1:4;
++ u_int16_t doff:4;
++ u_int16_t fin:1;
++ u_int16_t syn:1;
++ u_int16_t rst:1;
++ u_int16_t psh:1;
++ u_int16_t ack:1;
++ u_int16_t urg:1;
++ u_int16_t res2:2;
++# elif __BYTE_ORDER == __BIG_ENDIAN
++ u_int16_t doff:4;
++ u_int16_t res1:4;
++ u_int16_t res2:2;
++ u_int16_t urg:1;
++ u_int16_t ack:1;
++ u_int16_t psh:1;
++ u_int16_t rst:1;
++ u_int16_t syn:1;
++ u_int16_t fin:1;
++# else
++# error "Adjust your <bits/endian.h> defines"
++# endif
++ u_int16_t window;
++ u_int16_t check;
++ u_int16_t urg_ptr;
++};
++
diff --git a/package/ulogd/patches/autotools.patch b/package/ulogd/patches/patch-output_sqlite3_queue_h
index 32df817d4..9a3c55098 100644
--- a/package/ulogd/patches/autotools.patch
+++ b/package/ulogd/patches/patch-output_sqlite3_queue_h
@@ -1,99 +1,5 @@
-diff -Nur ulogd-2.0.2.orig/config.h.in ulogd-2.0.2/config.h.in
---- ulogd-2.0.2.orig/config.h.in 2013-03-03 22:19:17.000000000 +0100
-+++ ulogd-2.0.2/config.h.in 2013-10-05 21:13:00.000000000 +0200
-@@ -66,6 +66,9 @@
- */
- #undef HAVE_SYS_NDIR_H
-
-+/* Define to 1 if you have the <sys/queue.h> header file. */
-+#undef HAVE_SYS_QUEUE_H
-+
- /* Define to 1 if you have the <sys/stat.h> header file. */
- #undef HAVE_SYS_STAT_H
-
-diff -Nur ulogd-2.0.2.orig/configure ulogd-2.0.2/configure
---- ulogd-2.0.2.orig/configure 2013-03-03 22:19:16.000000000 +0100
-+++ ulogd-2.0.2/configure 2013-10-05 21:12:59.000000000 +0200
-@@ -12812,7 +12812,7 @@
-
- fi
-
--for ac_header in fcntl.h unistd.h
-+for ac_header in fcntl.h unistd.h sys/queue.h
- do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-diff -Nur ulogd-2.0.2.orig/configure.ac ulogd-2.0.2/configure.ac
---- ulogd-2.0.2.orig/configure.ac 2013-03-01 16:45:23.000000000 +0100
-+++ ulogd-2.0.2/configure.ac 2013-10-05 21:12:01.000000000 +0200
-@@ -32,7 +32,7 @@
- dnl Checks for header files.
- AC_HEADER_DIRENT
- AC_HEADER_STDC
--AC_CHECK_HEADERS(fcntl.h unistd.h)
-+AC_CHECK_HEADERS(fcntl.h unistd.h sys/queue.h)
-
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
-diff -Nur ulogd-2.0.2.orig/filter/raw2packet/ulogd_raw2packet_BASE.c ulogd-2.0.2/filter/raw2packet/ulogd_raw2packet_BASE.c
---- ulogd-2.0.2.orig/filter/raw2packet/ulogd_raw2packet_BASE.c 2013-03-01 16:44:22.000000000 +0100
-+++ ulogd-2.0.2/filter/raw2packet/ulogd_raw2packet_BASE.c 2013-10-05 21:12:39.000000000 +0200
-@@ -588,10 +588,10 @@
-
- /* Section 3.1. SCTP Common Header Format */
- typedef struct sctphdr {
-- __be16 source;
-- __be16 dest;
-- __be32 vtag;
-- __be32 checksum;
-+ uint16_t source;
-+ uint16_t dest;
-+ uint32_t vtag;
-+ uint32_t checksum;
- } __attribute__((packed)) sctp_sctphdr_t;
-
- static int _interp_sctp(struct ulogd_pluginstance *pi, struct sctphdr *sctph,
-diff -Nur ulogd-2.0.2.orig/include/linux/tcp.h ulogd-2.0.2/include/linux/tcp.h
---- ulogd-2.0.2.orig/include/linux/tcp.h 1970-01-01 01:00:00.000000000 +0100
-+++ ulogd-2.0.2/include/linux/tcp.h 2013-10-05 21:01:46.000000000 +0200
-@@ -0,0 +1,34 @@
-+struct tcphdr
-+ {
-+ u_int16_t source;
-+ u_int16_t dest;
-+ u_int32_t seq;
-+ u_int32_t ack_seq;
-+# if __BYTE_ORDER == __LITTLE_ENDIAN
-+ u_int16_t res1:4;
-+ u_int16_t doff:4;
-+ u_int16_t fin:1;
-+ u_int16_t syn:1;
-+ u_int16_t rst:1;
-+ u_int16_t psh:1;
-+ u_int16_t ack:1;
-+ u_int16_t urg:1;
-+ u_int16_t res2:2;
-+# elif __BYTE_ORDER == __BIG_ENDIAN
-+ u_int16_t doff:4;
-+ u_int16_t res1:4;
-+ u_int16_t res2:2;
-+ u_int16_t urg:1;
-+ u_int16_t ack:1;
-+ u_int16_t psh:1;
-+ u_int16_t rst:1;
-+ u_int16_t syn:1;
-+ u_int16_t fin:1;
-+# else
-+# error "Adjust your <bits/endian.h> defines"
-+# endif
-+ u_int16_t window;
-+ u_int16_t check;
-+ u_int16_t urg_ptr;
-+};
-+
-diff -Nur ulogd-2.0.2.orig/output/sqlite3/queue.h ulogd-2.0.2/output/sqlite3/queue.h
---- ulogd-2.0.2.orig/output/sqlite3/queue.h 1970-01-01 01:00:00.000000000 +0100
-+++ ulogd-2.0.2/output/sqlite3/queue.h 2013-10-05 21:01:46.000000000 +0200
+--- ulogd-2.0.2.orig/output/sqlite3/queue.h 1970-01-01 00:00:00.000000000 +0100
++++ ulogd-2.0.2/output/sqlite3/queue.h 2013-11-11 21:27:31.000000000 +0100
@@ -0,0 +1,574 @@
+/*
+ * Copyright (c) 1991, 1993
@@ -669,66 +575,3 @@ diff -Nur ulogd-2.0.2.orig/output/sqlite3/queue.h ulogd-2.0.2/output/sqlite3/que
+ : (elm->field.cqe_prev))
+
+#endif /* sys/queue.h */
-diff -Nur ulogd-2.0.2.orig/output/sqlite3/ulogd_output_SQLITE3.c ulogd-2.0.2/output/sqlite3/ulogd_output_SQLITE3.c
---- ulogd-2.0.2.orig/output/sqlite3/ulogd_output_SQLITE3.c 2012-08-03 16:11:53.000000000 +0200
-+++ ulogd-2.0.2/output/sqlite3/ulogd_output_SQLITE3.c 2013-10-05 21:01:46.000000000 +0200
-@@ -36,7 +36,11 @@
- #include <ulogd/ulogd.h>
- #include <ulogd/conffile.h>
- #include <sqlite3.h>
-+#if defined(HAVE_SYS_QUEUE_H)
- #include <sys/queue.h>
-+#else
-+#include "queue.h"
-+#endif
-
- #define CFG_BUFFER_DEFAULT 10
-
-diff -Nur ulogd-2.0.2.orig/src/ulogd.c ulogd-2.0.2/src/ulogd.c
---- ulogd-2.0.2.orig/src/ulogd.c 2013-03-01 16:45:23.000000000 +0100
-+++ ulogd-2.0.2/src/ulogd.c 2013-10-05 21:01:46.000000000 +0200
-@@ -78,7 +78,7 @@
- static FILE *logfile = NULL; /* logfile pointer */
- static char *ulogd_logfile = NULL;
- static const char *ulogd_configfile = ULOGD_CONFIGFILE;
--static FILE syslog_dummy;
-+static FILE *syslog_dummy;
-
- static int info_mode = 0;
-
-@@ -420,7 +420,7 @@
- if (level < loglevel_ce.u.value)
- return;
-
-- if (logfile == &syslog_dummy) {
-+ if (logfile == syslog_dummy) {
- /* FIXME: this omits the 'file' string */
- va_start(ap, format);
- vsyslog(ulogd2syslog_level(level), format, ap);
-@@ -941,7 +941,7 @@
- logfile = stdout;
- } else if (!strcmp(name, "syslog")) {
- openlog("ulogd", LOG_PID, LOG_DAEMON);
-- logfile = &syslog_dummy;
-+ logfile = syslog_dummy;
- } else {
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
-@@ -1070,7 +1070,7 @@
- unload_plugins();
- #endif
-
-- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
-+ if (logfile != NULL && logfile != stdout && logfile != syslog_dummy) {
- fclose(logfile);
- logfile = NULL;
- }
-@@ -1090,7 +1090,7 @@
- switch (signal) {
- case SIGHUP:
- /* reopen logfile */
-- if (logfile != stdout && logfile != &syslog_dummy) {
-+ if (logfile != stdout && logfile != syslog_dummy) {
- fclose(logfile);
- logfile = fopen(ulogd_logfile, "a");
- if (!logfile) {
diff --git a/package/ulogd/patches/patch-output_sqlite3_ulogd_output_SQLITE3_c b/package/ulogd/patches/patch-output_sqlite3_ulogd_output_SQLITE3_c
new file mode 100644
index 000000000..6de029c86
--- /dev/null
+++ b/package/ulogd/patches/patch-output_sqlite3_ulogd_output_SQLITE3_c
@@ -0,0 +1,14 @@
+--- ulogd-2.0.2.orig/output/sqlite3/ulogd_output_SQLITE3.c 2012-08-03 16:11:53.000000000 +0200
++++ ulogd-2.0.2/output/sqlite3/ulogd_output_SQLITE3.c 2013-11-11 21:27:31.000000000 +0100
+@@ -36,7 +36,11 @@
+ #include <ulogd/ulogd.h>
+ #include <ulogd/conffile.h>
+ #include <sqlite3.h>
++#if defined(HAVE_SYS_QUEUE_H)
+ #include <sys/queue.h>
++#else
++#include "queue.h"
++#endif
+
+ #define CFG_BUFFER_DEFAULT 10
+
diff --git a/package/ulogd/patches/patch-src_ulogd_c b/package/ulogd/patches/patch-src_ulogd_c
new file mode 100644
index 000000000..a30a3a95a
--- /dev/null
+++ b/package/ulogd/patches/patch-src_ulogd_c
@@ -0,0 +1,47 @@
+--- ulogd-2.0.2.orig/src/ulogd.c 2013-03-01 16:45:23.000000000 +0100
++++ ulogd-2.0.2/src/ulogd.c 2013-11-11 21:27:31.000000000 +0100
+@@ -78,7 +78,7 @@
+ static FILE *logfile = NULL; /* logfile pointer */
+ static char *ulogd_logfile = NULL;
+ static const char *ulogd_configfile = ULOGD_CONFIGFILE;
+-static FILE syslog_dummy;
++static FILE *syslog_dummy;
+
+ static int info_mode = 0;
+
+@@ -420,7 +420,7 @@ void __ulogd_log(int level, char *file,
+ if (level < loglevel_ce.u.value)
+ return;
+
+- if (logfile == &syslog_dummy) {
++ if (logfile == syslog_dummy) {
+ /* FIXME: this omits the 'file' string */
+ va_start(ap, format);
+ vsyslog(ulogd2syslog_level(level), format, ap);
+@@ -941,7 +941,7 @@ static int logfile_open(const char *name
+ logfile = stdout;
+ } else if (!strcmp(name, "syslog")) {
+ openlog("ulogd", LOG_PID, LOG_DAEMON);
+- logfile = &syslog_dummy;
++ logfile = syslog_dummy;
+ } else {
+ logfile = fopen(ulogd_logfile, "a");
+ if (!logfile) {
+@@ -1070,7 +1070,7 @@ static void sigterm_handler(int signal)
+ unload_plugins();
+ #endif
+
+- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) {
++ if (logfile != NULL && logfile != stdout && logfile != syslog_dummy) {
+ fclose(logfile);
+ logfile = NULL;
+ }
+@@ -1090,7 +1090,7 @@ static void signal_handler(int signal)
+ switch (signal) {
+ case SIGHUP:
+ /* reopen logfile */
+- if (logfile != stdout && logfile != &syslog_dummy) {
++ if (logfile != stdout && logfile != syslog_dummy) {
+ fclose(logfile);
+ logfile = fopen(ulogd_logfile, "a");
+ if (!logfile) {