Created
November 15, 2010 07:23
-
-
Save umq/700127 to your computer and use it in GitHub Desktop.
FreeBSD port skeleton for Phreebird suite by Dan Kaminsky
http://www.slideshare.net/dakami/phreebird-suite-10-introducing-the-domain-key-infrastructure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a shell archive. Save it in a file, remove anything before | |
# this line, and then unpack it by entering "sh file". Note, it may | |
# create directories; files and directories will be owned by you and | |
# have default permissions. | |
# | |
# This archive contains: | |
# | |
# dns/phreebird | |
# dns/phreebird/pkg-descr | |
# dns/phreebird/Makefile | |
# dns/phreebird/pkg-plist | |
# dns/phreebird/distinfo | |
# dns/phreebird/files | |
# dns/phreebird/files/patch-phreebird.c | |
# | |
echo c - dns/phreebird | |
mkdir -p dns/phreebird > /dev/null 2>&1 | |
echo x - dns/phreebird/pkg-descr | |
sed 's/^X//' >dns/phreebird/pkg-descr << 'e93269945cae5ce7d812b06dace35eaa' | |
XPhreebird is a DNSSEC proxy that operates in front of an existing | |
XDNS server (BIND, Unbound, PowerDNS, Microsoft DNS, QIP) and | |
Xsupplements its records with DNSSEC responses. | |
X | |
XWWW: http://www.slideshare.net/dakami/phreebird-suite-10-introducing-the-domain-key-infrastructure | |
e93269945cae5ce7d812b06dace35eaa | |
echo x - dns/phreebird/Makefile | |
sed 's/^X//' >dns/phreebird/Makefile << '4cf56305728c691ca9ab5ade2c5136c4' | |
X# New ports collection makefile for: phreebird | |
X# Date created: 2010-11-12 | |
X# Whom: Hirohisa Yamaguchi <umq@ueo.co.jp> | |
X# | |
X# $FreeBSD$ | |
X# | |
X | |
XPORTNAME= phreebird | |
XPORTVERSION= 1.02 | |
XCATEGORIES= dns security | |
XMASTER_SITES= http://s3.amazonaws.com/dmk/ | |
XDISTNAME= ${PORTNAME}_suite_${PORTVERSION} | |
X | |
XMAINTAINER= umq@ueo.co.jp | |
XCOMMENT= Zero Configuration DNSSEC Proxy | |
X | |
XLIB_DEPENDS= ldns.1:${PORTSDIR}/dns/ldns \ | |
X event-1.4:${PORTSDIR}/devel/libevent \ | |
X ghthash.2:${PORTSDIR}/devel/libghthash \ | |
X unbound.2:${PORTSDIR}/dns/unbound | |
X | |
XLICENSE= BSD | |
XLICENSE_FILE= ${WRKSRC}/LICENCE | |
XUSE_DOS2UNIX= yes | |
XUSE_LDCONFIG= yes | |
XCFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib -g \ | |
X -DPB_VERSION="\\\"${PORTVERSION}\\\"" | |
XDOCS= CHANGELOG.txt HACKING.txt INSTALL.txt README.txt | |
X | |
X.include <bsd.port.pre.mk> | |
Xdo-configure: | |
X ${REINPLACE_CMD} -e 's/(CC)/(CC) $$(CFLAGS)/' -e 's/ -ldl//' \ | |
X -e 's# -I /usr/local/ssl/include##' -e 's/^CC/#&/' ${WRKSRC}/Makefile | |
X | |
Xdo-install: | |
X ${INSTALL_PROGRAM} ${WRKSRC}/bin/ldns_chase ${PREFIX}/bin/ | |
X ${INSTALL_SCRIPT} ${WRKSRC}/phreeload ${PREFIX}/bin/ | |
X ${INSTALL_PROGRAM} ${WRKSRC}/bin/unbound_trace ${PREFIX}/bin/ | |
X ${INSTALL_LIB} ${WRKSRC}/lib/phreeload.so ${PREFIX}/lib/ | |
X ${INSTALL_PROGRAM} ${WRKSRC}/bin/phreebird ${PREFIX}/sbin/ | |
X.if !defined(NOPORTDOCS) | |
X ${MKDIR} ${DOCSDIR} | |
X @${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ | |
X.endif | |
X | |
X.include <bsd.port.post.mk> | |
4cf56305728c691ca9ab5ade2c5136c4 | |
echo x - dns/phreebird/pkg-plist | |
sed 's/^X//' >dns/phreebird/pkg-plist << '2436bfa40b93f7e8157807d0df214edb' | |
X@comment $FreeBSD$ | |
Xbin/ldns_chase | |
Xbin/phreeload | |
Xbin/unbound_trace | |
Xlib/phreeload.so | |
Xsbin/phreebird | |
X%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt | |
X%%PORTDOCS%%%%DOCSDIR%%/HACKING.txt | |
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL.txt | |
X%%PORTDOCS%%%%DOCSDIR%%/README.txt | |
X%%PORTDOCS%%@dirrm %%DOCSDIR%% | |
2436bfa40b93f7e8157807d0df214edb | |
echo x - dns/phreebird/distinfo | |
sed 's/^X//' >dns/phreebird/distinfo << '15a42269abb56c91cb7dd1bcb3ed2853' | |
XSHA256 (phreebird_suite_1.02.tar.gz) = 851f74625841584a432de6c57ae431f0553eb5bb5633b06087be46e51e44f01b | |
XSIZE (phreebird_suite_1.02.tar.gz) = 5690630 | |
15a42269abb56c91cb7dd1bcb3ed2853 | |
echo c - dns/phreebird/files | |
mkdir -p dns/phreebird/files > /dev/null 2>&1 | |
echo x - dns/phreebird/files/patch-phreebird.c | |
sed 's/^X//' >dns/phreebird/files/patch-phreebird.c << 'a86d25eec6a27882938a0e729cde9c45' | |
X--- ./phreebird.c.orig 2010-11-15 16:15:24.000000000 +0900 | |
X+++ ./phreebird.c 2010-11-15 16:15:24.000000000 +0900 | |
X@@ -305,6 +305,7 @@ | |
X exit(255); | |
X | |
X } | |
X+/* | |
X if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &bsize, sizeof(int)) < 0) { | |
X fprintf(stderr, "Error setting socket option (rcvbuf %u).\n", bsize); | |
X exit(255); | |
X@@ -313,6 +314,7 @@ | |
X fprintf(stderr, "Error setting socket option. (sndbuf %u).\n", bsize); | |
X exit(255); | |
X } | |
X+*/ | |
X | |
X addr.sin_family = AF_INET; | |
X addr.sin_port = htons(port); | |
X@@ -460,7 +462,7 @@ | |
X amount_read = read(clientfd, &to_read, 2); | |
X if (amount_read < 2) { | |
X close(clientfd); | |
X- event_free(store_cache->clientevent); // FREE2 | |
X+ event_del(store_cache->clientevent); // FREE2 | |
X return; // MIDRET, ok because no alloc before here | |
X } | |
X buffer = calloc(to_read, 1); //ALLOC3 | |
X@@ -1157,7 +1159,7 @@ | |
X bool rate_exceeded=false; | |
X | |
X | |
X- if(ldns_rr_list_rr_count(src)==0){ return; } | |
X+ if(ldns_rr_list_rr_count(src)==0){ return 0; } | |
X | |
X // XXX *must* allow cache size to be specified, and allow records to expire! | |
X if(rrsig_cache == NULL){ | |
a86d25eec6a27882938a0e729cde9c45 | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment