summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-11-07 12:29:29 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-11-07 12:29:29 +0000
commit0932241da1ec50f7c47d2a98ae807695c5371ebb (patch)
tree49af5bdabe8277b86d86a7c38957a4586d15551a /sys-freebsd/freebsd-pf
parentbump to 9.0_rc1 (diff)
downloadgentoo-2-0932241da1ec50f7c47d2a98ae807695c5371ebb.tar.gz
gentoo-2-0932241da1ec50f7c47d2a98ae807695c5371ebb.tar.bz2
gentoo-2-0932241da1ec50f7c47d2a98ae807695c5371ebb.zip
bump to 9.0_rc1
(Portage version: 2.2.0_alpha72/cvs/Linux x86_64)
Diffstat (limited to 'sys-freebsd/freebsd-pf')
-rw-r--r--sys-freebsd/freebsd-pf/ChangeLog11
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-bpf.patch10
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-getline.patch38
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-libevent.patch15
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pcap_pollution.patch17
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pflogd.patch13
-rw-r--r--sys-freebsd/freebsd-pf/freebsd-pf-9.0_rc1.ebuild68
7 files changed, 171 insertions, 1 deletions
diff --git a/sys-freebsd/freebsd-pf/ChangeLog b/sys-freebsd/freebsd-pf/ChangeLog
index 7491c431a862..ba6ea0d88b27 100644
--- a/sys-freebsd/freebsd-pf/ChangeLog
+++ b/sys-freebsd/freebsd-pf/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-freebsd/freebsd-pf
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/ChangeLog,v 1.29 2011/07/06 06:04:57 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/ChangeLog,v 1.30 2011/11/07 12:29:29 aballier Exp $
+
+*freebsd-pf-9.0_rc1 (07 Nov 2011)
+
+ 07 Nov 2011; Alexis Ballier <aballier@gentoo.org> +freebsd-pf-9.0_rc1.ebuild,
+ +files/freebsd-pf-9.0-bpf.patch, +files/freebsd-pf-9.0-getline.patch,
+ +files/freebsd-pf-9.0-libevent.patch,
+ +files/freebsd-pf-9.0-pcap_pollution.patch,
+ +files/freebsd-pf-9.0-pflogd.patch:
+ bump to 9.0_rc1
*freebsd-pf-8.2 (06 Jul 2011)
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-bpf.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-bpf.patch
new file mode 100644
index 000000000000..fb3c7012eccf
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-bpf.patch
@@ -0,0 +1,10 @@
+--- contrib/pf/pflogd/pflogd.c.old 2011-11-02 21:12:57.000000000 +0000
++++ contrib/pf/pflogd/pflogd.c 2011-11-02 21:13:11.000000000 +0000
+@@ -39,6 +39,7 @@
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
++#include <net/bpf.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-getline.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-getline.patch
new file mode 100644
index 000000000000..6679d32e8060
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-getline.patch
@@ -0,0 +1,38 @@
+--- contrib/pf/ftp-proxy/ftp-proxy.c.old 2011-11-02 21:18:19.000000000 +0000
++++ contrib/pf/ftp-proxy/ftp-proxy.c 2011-11-02 21:18:36.000000000 +0000
+@@ -103,7 +103,7 @@
+ int drop_privs(void);
+ void end_session(struct session *);
+ void exit_daemon(void);
+-int getline(char *, size_t *);
++int ftpgetline(char *, size_t *);
+ void handle_connection(const int, short, void *);
+ void handle_signal(int, short, void *);
+ struct session * init_session(void);
+@@ -249,7 +249,7 @@
+ buf_avail);
+ s->cbuf_valid += clientread;
+
+- while ((n = getline(s->cbuf, &s->cbuf_valid)) > 0) {
++ while ((n = ftpgetline(s->cbuf, &s->cbuf_valid)) > 0) {
+ logmsg(LOG_DEBUG, "#%d client: %s", s->id, linebuf);
+ if (!client_parse(s)) {
+ end_session(s);
+@@ -343,7 +343,7 @@
+ }
+
+ int
+-getline(char *buf, size_t *valid)
++ftpgetline(char *buf, size_t *valid)
+ {
+ size_t i;
+
+@@ -1087,7 +1087,7 @@
+ buf_avail);
+ s->sbuf_valid += srvread;
+
+- while ((n = getline(s->sbuf, &s->sbuf_valid)) > 0) {
++ while ((n = ftpgetline(s->sbuf, &s->sbuf_valid)) > 0) {
+ logmsg(LOG_DEBUG, "#%d server: %s", s->id, linebuf);
+ if (!server_parse(s)) {
+ end_session(s);
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-libevent.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-libevent.patch
new file mode 100644
index 000000000000..e488423fc09a
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-libevent.patch
@@ -0,0 +1,15 @@
+--- usr.sbin/ftp-proxy/ftp-proxy/Makefile.old 2011-11-02 20:57:03.000000000 +0000
++++ usr.sbin/ftp-proxy/ftp-proxy/Makefile 2011-11-02 20:57:21.000000000 +0000
+@@ -7,11 +7,9 @@
+
+ SRCS= ftp-proxy.c filter.c
+
+-CFLAGS+= -I${.CURDIR}/../../../contrib/pf/libevent
+ CFLAGS+= -I${.CURDIR}/../../../sys/contrib/pf
+
+-LDADD+= ${LIBEVENT}
+-DPADD+= ${LIBEVENT}
++LDADD+= -levent
+
+ WARNS?= 3
+
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pcap_pollution.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pcap_pollution.patch
new file mode 100644
index 000000000000..184ab6f31bc4
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pcap_pollution.patch
@@ -0,0 +1,17 @@
+--- contrib/pf/pflogd/privsep.c.old 2011-11-02 21:04:01.000000000 +0000
++++ contrib/pf/pflogd/privsep.c 2011-11-02 21:04:27.000000000 +0000
+@@ -32,11 +32,13 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#include <stdio.h>
++#define HAVE_SNPRINTF
++#define HAVE_STRLCPY
+ #include <pcap.h>
+ #include <pcap-int.h>
+ #include <pwd.h>
+ #include <signal.h>
+-#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pflogd.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pflogd.patch
new file mode 100644
index 000000000000..d5a65eab928c
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-9.0-pflogd.patch
@@ -0,0 +1,13 @@
+--- sbin/pflogd/Makefile.old 2011-11-02 21:08:46.000000000 +0000
++++ sbin/pflogd/Makefile 2011-11-02 21:08:53.000000000 +0000
+@@ -6,10 +6,7 @@
+ SRCS= pflogd.c pidfile.c privsep.c privsep_fdpass.c
+ MAN= pflogd.8
+
+-CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h
+-
+ LDADD= -lpcap
+-DPADD= ${LIBPCAP} ${LIBUTIL}
+
+ WARNS?= 2
+
diff --git a/sys-freebsd/freebsd-pf/freebsd-pf-9.0_rc1.ebuild b/sys-freebsd/freebsd-pf/freebsd-pf-9.0_rc1.ebuild
new file mode 100644
index 000000000000..23da16d80cc0
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/freebsd-pf-9.0_rc1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/freebsd-pf-9.0_rc1.ebuild,v 1.1 2011/11/07 12:29:29 aballier Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD's base system libraries"
+SLOT="0"
+KEYWORDS="~x86-fbsd"
+
+IUSE=""
+
+# Crypto is needed to have an internal OpenSSL header
+SRC_URI="mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}
+ dev-libs/libevent
+ sys-freebsd/freebsd-mk-defs
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S="${WORKDIR}"
+
+SUBDIRS="usr.sbin/authpf sbin/pfctl sbin/pflogd usr.sbin/ftp-proxy/ftp-proxy"
+
+pkg_setup() {
+ enewgroup authpf 63
+ mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
+}
+
+src_unpack() {
+ freebsd_src_unpack
+ # pcap-int.h redefines snprintf as pcap_snprintf
+ epatch "${FILESDIR}/${PN}-9.0-pcap_pollution.patch"
+ # Use system's libevent
+ epatch "${FILESDIR}/${PN}-9.0-libevent.patch"
+ epatch "${FILESDIR}/${PN}-9.0-pflogd.patch"
+ epatch "${FILESDIR}/${PN}-9.0-bpf.patch"
+ epatch "${FILESDIR}/${PN}-9.0-getline.patch"
+ # Link in kernel sources
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+}
+
+src_compile() {
+ for dir in ${SUBDIRS}; do
+ einfo "Starting make in ${dir}"
+ cd "${S}/${dir}"
+ mkmake || die "Make ${dir} failed"
+ done
+}
+
+src_install() {
+ for dir in ${SUBDIRS}; do
+ einfo "Starting install in ${dir}"
+ cd "${S}/${dir}"
+ mkinstall || die "Install ${dir} failed"
+ done
+
+ cd "${WORKDIR}"/etc
+ insinto /etc
+ doins pf.os
+ newdoc pf.conf pf.conf.example
+ # pf.initd provided by openrc, but no pf.confd
+ newconfd "${FILESDIR}/pf.confd" pf
+}