summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2008-08-09 03:39:35 +0000
committerJeremy Olexa <darkside@gentoo.org>2008-08-09 03:39:35 +0000
commit4c9cab0458890fbd634c846894802193c5b0d3a7 (patch)
treef2f29fd9d1dc051975e9f6b1feeadc6028f58e94 /app-admin/ulogd
parentRemoved installation of example INDI code. This resolves the file collisions ... (diff)
downloadgentoo-2-4c9cab0458890fbd634c846894802193c5b0d3a7.tar.gz
gentoo-2-4c9cab0458890fbd634c846894802193c5b0d3a7.tar.bz2
gentoo-2-4c9cab0458890fbd634c846894802193c5b0d3a7.zip
(non maintainer commit) Fix postgres use flag automagic dep, add sqlite3 support, and ip-as-string support. Thanks to Andrey Bondarenko for the patch in bug #167260
(Portage version: 2.2_rc6/cvs/Linux 2.6.26-gentoo x86_64)
Diffstat (limited to 'app-admin/ulogd')
-rw-r--r--app-admin/ulogd/files/ulogd-1.23-configure.in.patch225
-rw-r--r--app-admin/ulogd/metadata.xml3
-rw-r--r--app-admin/ulogd/ulogd-1.23-r2.ebuild82
3 files changed, 310 insertions, 0 deletions
diff --git a/app-admin/ulogd/files/ulogd-1.23-configure.in.patch b/app-admin/ulogd/files/ulogd-1.23-configure.in.patch
new file mode 100644
index 000000000000..c6df5e0aedfa
--- /dev/null
+++ b/app-admin/ulogd/files/ulogd-1.23-configure.in.patch
@@ -0,0 +1,225 @@
+--- configure.in.orig 2005-02-16 16:23:32.000000000 +0500
++++ configure.in 2008-01-25 23:42:04.000000000 +0500
+@@ -34,18 +34,18 @@
+ dnl
+ dnl test for MySQL
+ dnl
+-AC_ARG_WITH(mysql,
+- --with-mysql=<directory> mysql installed in <directory>,[
+-if test $withval != yes
+-then
+- dir=$withval
+-else
+- dir="/usr/local"
+-fi
+-mysqldir=""
++AC_ARG_WITH(mysql,
++ AS_HELP_STRING([--with-mysql=DIR], [mysql installed in DIR]),
++ [],
++ [with_mysql=no])
++
+ AC_MSG_CHECKING(for MySQL files)
+-for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
+-do
++mysqldir=""
++if test "$with_mysql" = no; then
++ AC_MSG_RESULT(disabled)
++else
++ for d in $with_mysql /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
++ do
+ if test -f $d/lib/mysql/libmysqlclient.so
+ then
+ AC_MSG_RESULT(found mysql in $d)
+@@ -59,12 +59,12 @@
+ mysqldir_suffix=
+ break
+ fi
+-done
++ done
+
+-if test x$mysqldir = x
+-then
++ if test x$mysqldir = x
++ then
+ AC_MSG_WARN(MySQL backend not used)
+-else
++ else
+ AC_DEFINE(HAVE_MYSQL)
+ MYSQLINCLUDES=${mysqldir}/include${mysqldir_suffix}
+ MYSQLLIBS=${mysqldir}/lib${mysqldir_suffix}
+@@ -107,8 +107,8 @@
+ AC_MSG_RESULT(found new MySQL)
+ fi
+
+-fi
+-])
++ fi
++fi
+
+
+ dnl
+@@ -117,31 +117,31 @@
+ dnl feature is only used in ulogd_MYSQL.c, there are no checks in any
+ dnl way.
+ dnl
+-
+ AC_ARG_WITH(mysql-log-ip-as-string,
+- --with-mysql-log-ip-as-string log IPs as string rather than as
+- unsigned long-integer.
+-,[
+- EXTRA_MYSQL_DEF="${EXTRA_MYSQL_DEF} -DIP_AS_STRING=1"
+- AC_MSG_WARN(the use of --with-mysql-log-ip-as-string is discouraged)
+-])
++ AS_HELP_STRING([--with-mysql-log-ip-as-string],
++ [log IPs as string rather than as unsigned long-integer]),
++ [
++ EXTRA_MYSQL_DEF="${EXTRA_MYSQL_DEF} -DIP_AS_STRING=1"
++ AC_MSG_WARN(the use of --with-mysql-log-ip-as-string is discouraged)
++ ])
+
+
+ dnl
+ dnl test for PostgreSQL
+ dnl
+-AC_ARG_WITH(pgsql,
+- --with-pgsql=<directory> pgsql installed in <directory>,[
+-if test $withval != yes
++AC_ARG_WITH(pgsql,
++ AS_HELP_STRING([--with-pgsql=DIR],[pgsql installed in DIR]),
++ [],
++ [with_pgsql=no])
++
++AC_MSG_CHECKING(for PGSQL files)
++pgsqldir=""
++if test $with_pgsql = no
+ then
+- dir=$withval
++ AC_MSG_RESULT(disabled)
+ else
+- dir="/usr/local"
+-fi
+-pgsqldir=""
+-AC_MSG_CHECKING(for PGSQL files)
+-for d in $dir /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql
+-do
++ for d in $with_pgsql /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql
++ do
+ if test -f $d/lib/pgsql/libpq.so
+ then
+ AC_MSG_RESULT(found pgsql in $d)
+@@ -153,12 +153,11 @@
+ pgsqldir=$d
+ break
+ fi
+-done
++ done
+
+-if test x$pgsqldir = x
+-then
++ if test x$pgsqldir = x; then
+ AC_MSG_WARN(PGSQL backend not used)
+-else
++ else
+ AC_DEFINE(HAVE_PGSQL)
+ for i in include include/postgresql include/pgsql
+ do
+@@ -180,36 +179,34 @@
+ AC_SUBST(PGSQLINCLUDES)
+ AC_SUBST(PGSQL_LIB)
+
++ fi
+ fi
+-])
+
+ dnl
+ dnl Check whether the user wants to log IP-addresses as strings rather
+ dnl than integers to his pgsql-database.
+ dnl
+-
+ AC_ARG_WITH(pgsql-log-ip-as-string,
+- --with-pgsql-log-ip-as-string log IPs as string rather than as interger
+-,[
+- EXTRA_PGSQL_DEF="-DIP_AS_STRING=1"
+-])
+-
++ AS_HELP_STRING([--with-pgsql-log-ip-as-string],
++ [log IPs as string rather than as integer]),
++ [EXTRA_PGSQL_DEF="-DIP_AS_STRING=1"])
+
+ dnl
+ dnl test for sqlite3
+ dnl
+ AC_ARG_WITH(sqlite3,
+- --with-sqlite3=<directory> sqlite3 installed in <directory>,[
+-if test $withval != yes
++ AS_HELP_STRING([--with-sqlite3=DIR],[sqlite3 installed in DIR]),
++ [],
++ [with_sqlite3=no])
++
++AC_MSG_CHECKING(for sqlite3 files)
++sqlite3dir=""
++if test $with_sqlite3 = no
+ then
+- dir=$withval
++ AC_MSG_RESULT(disabled)
+ else
+- dir="/usr/local"
+-fi
+-mysqldir=""
+-AC_MSG_CHECKING(for sqlite3 files)
+-for d in $dir /usr /usr/local /usr/local/sqlite3
+-do
++ for d in $with_sqlite3 /usr /usr/local /usr/local/sqlite3
++ do
+ if test -f $d/lib/sqlite3/libsqlite3.so
+ then
+ AC_MSG_RESULT(found sqlite3 in $d)
+@@ -223,12 +220,12 @@
+ sqlite3dir_suffix=
+ break
+ fi
+-done
++ done
+
+-if test x$sqlite3dir = x
+-then
++ if test x$sqlite3dir = x
++ then
+ AC_MSG_WARN(sqlite3 backend not used)
+-else
++ else
+ AC_DEFINE(HAVE_SQLITE3)
+ SQLITE3INCLUDES=${sqlite3dir}/include${sqlite3dir_suffix}
+ SQLITE3LIBS=${sqlite3dir}/lib${sqlite3dir_suffix}
+@@ -246,8 +243,8 @@
+ AC_SUBST(SQLITE3INCLUDES)
+ AC_SUBST(SQLITE3_LIB)
+
+-fi
+-])
++ fi
++fi
+
+
+ dnl
+@@ -256,14 +253,13 @@
+ dnl feature is only used in ulogd_SQLITE3.c, there are no checks in any
+ dnl way.
+ dnl
+-
+ AC_ARG_WITH(sqlite3-log-ip-as-string,
+- --with-sqlite3-log-ip-as-string log IPs as string rather than as
+- unsigned long-integer.
+-,[
+- EXTRA_SQLITE3_DEF="${EXTRA_SQLITE3_DEF} -DIP_AS_STRING=1"
+- AC_MSG_WARN(the use of --with-sqlite3-log-ip-as-string is discouraged)
+-])
++ AS_HELP_STRING([--with-sqlite3-log-ip-as-string],
++ [log IPs as string rather than as unsigned long-integer]),
++ [
++ EXTRA_SQLITE3_DEF="${EXTRA_SQLITE3_DEF} -DIP_AS_STRING=1"
++ AC_MSG_WARN(the use of --with-sqlite3-log-ip-as-string is discouraged)
++ ])
+
+
+ AC_SUBST(DATABASE_DIR)
diff --git a/app-admin/ulogd/metadata.xml b/app-admin/ulogd/metadata.xml
index fae7d74a9aee..630c61dd999c 100644
--- a/app-admin/ulogd/metadata.xml
+++ b/app-admin/ulogd/metadata.xml
@@ -6,4 +6,7 @@
<email>maintainer-needed@gentoo.org</email>
<name>Default assignee for orphaned packages</name>
</maintainer>
+ <use>
+ <flag name='ip-as-string'>Logs IP addresses as stings</flag>
+ </use>
</pkgmetadata>
diff --git a/app-admin/ulogd/ulogd-1.23-r2.ebuild b/app-admin/ulogd/ulogd-1.23-r2.ebuild
new file mode 100644
index 000000000000..13db63cdd9f1
--- /dev/null
+++ b/app-admin/ulogd/ulogd-1.23-r2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ulogd-1.23-r2.ebuild,v 1.1 2008/08/09 03:39:34 darkside Exp $
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="iptables daemon for ULOG target for userspace iptables filter logging"
+SRC_URI="http://ftp.netfilter.org/pub/ulogd/${P}.tar.bz2"
+HOMEPAGE="http://www.gnumonks.org/gnumonks/projects/project_details?p_id=1"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc -sparc ~x86"
+IUSE="sqlite3 mysql postgres ip-as-string"
+
+DEPEND="net-firewall/iptables
+ sqlite3? ( =dev-db/sqlite-3* )
+ mysql? ( virtual/mysql )
+ postgres? ( virtual/postgresql-server )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-gcc41.patch"
+ epatch "${FILESDIR}/${P}-configure.in.patch"
+ EPATCH_OPTS="-F3" \
+ epatch "${FILESDIR}/glsa-200701.patch"
+
+ eautoreconf
+}
+
+src_compile() {
+ # enables logfiles over 2G (#74924)
+ append-lfs-flags
+
+ myconf=""
+ if use ip-as-string; then
+ use sqlite3 && myconf="${myconf} --with-sqlite3-log-ip-as-string"
+ use mysql && myconf="${myconf} --with-mysql-log-ip-as-string"
+ use postgres && myconf="${myconf} --with-pgsql-log-ip-as-string"
+ fi
+
+ if [[ -z "${myconf}" ]]; then
+ ewarn
+ ewarn "No database support enabled, ip-as-string flag ignored."
+ epause
+ fi
+
+ myconf="${myconf} `use_with sqlite3`"
+ myconf="${myconf} `use_with mysql`"
+ myconf="${myconf} `use_with postgres pgsql`"
+
+ econf ${myconf}
+
+ # not parallel make safe: bug #128976
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ # the Makefile seems to be "broken" -
+ # it relies on the existance of /usr, /etc ..
+ dodir /usr/sbin
+
+ make DESTDIR="${D}" install || die "install failed"
+
+ newinitd "${FILESDIR}"/ulogd-0.98 ulogd
+
+ dodoc README AUTHORS Changes
+ cd doc/
+ dodoc ulogd.txt ulogd.a4.ps
+
+ if use mysql; then
+ dodoc mysql.table mysql.table.ipaddr-as-string
+ fi
+
+ if use postgres; then
+ dodoc pgsql.table
+ fi
+
+ dohtml ulogd.html
+}