diff options
author | feld <feld@FreeBSD.org> | 2014-03-06 21:04:17 +0800 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2014-03-06 21:04:17 +0800 |
commit | 10dc01cdc3a1a5fdd499feb9d2d6c75c5c53cb1d (patch) | |
tree | 2ce0caa85662b5eb13afc06b7f83706ee9f4af3d | |
parent | 3acb93b9fc3816919bd3b3fb4aa7fe69b0e4a710 (diff) | |
download | freebsd-ports-gnome-10dc01cdc3a1a5fdd499feb9d2d6c75c5c53cb1d.tar.gz freebsd-ports-gnome-10dc01cdc3a1a5fdd499feb9d2d6c75c5c53cb1d.tar.zst freebsd-ports-gnome-10dc01cdc3a1a5fdd499feb9d2d6c75c5c53cb1d.zip |
Update to 0.8.9
Support STAGE
-rw-r--r-- | irc/bip/Makefile | 34 | ||||
-rw-r--r-- | irc/bip/distinfo | 4 | ||||
-rw-r--r-- | irc/bip/files/patch-bip-191 | 66 | ||||
-rw-r--r-- | irc/bip/files/patch-bip-269 | 139 | ||||
-rw-r--r-- | irc/bip/pkg-plist | 8 |
5 files changed, 25 insertions, 226 deletions
diff --git a/irc/bip/Makefile b/irc/bip/Makefile index 37915f0beeda..d6163961b1aa 100644 --- a/irc/bip/Makefile +++ b/irc/bip/Makefile @@ -2,10 +2,9 @@ # $FreeBSD$ PORTNAME= bip -PORTVERSION= 0.8.8 -PORTREVISION= 2 +PORTVERSION= 0.8.9 CATEGORIES= irc -MASTER_SITES= https://projects.duckcorp.org/attachments/download/39/ +MASTER_SITES= https://projects.duckcorp.org/attachments/download/61/ MAINTAINER= swills@FreeBSD.org COMMENT= A simple IRC proxy with SSL support @@ -14,39 +13,36 @@ LICENSE= GPLv2 GNU_CONFIGURE= yes LDFLAGS+= -L${LOCALBASE}/lib -USE_GMAKE= yes +CFLAGS+= -Wno-sign-compare -Wno-error +USES= gmake INSTALL_TARGET= SUBDIR=src install-exec USE_OPENSSL= yes PATCH_STRIP= -p1 -PLIST_FILES= bin/bip bin/bipmkpw SUB_FILES= pkg-message -MAN1= bip.1 bipmkpw.1 -MAN5= bip.conf.5 PORTDOCS= AUTHORS BUGS ChangeLog NEWS README TODO +EXAMPLEFILES= bip.conf bip.vim -PORTEXAMPLES= bip.conf bip.vim - -NO_STAGE= yes .include <bsd.port.pre.mk> post-install: - @cd ${WRKSRC} && ${INSTALL_MAN} ${MAN1} ${MANPREFIX}/man/man1 - @cd ${WRKSRC} && ${INSTALL_MAN} ${MAN5} ${MANPREFIX}/man/man5 + @cd ${WRKSRC} && ${INSTALL} bip.1 ${STAGEDIR}${PREFIX}/man/man1 + @cd ${WRKSRC} && ${INSTALL} bipmkpw.1 ${STAGEDIR}${PREFIX}/man/man1 + @cd ${WRKSRC} && ${INSTALL} bip.conf.5 ${STAGEDIR}${PREFIX}/man/man5 -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${STAGEDIR}${DOCSDIR} .for docs in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/${docs} ${STAGEDIR}${DOCSDIR} .endfor .endif -.if !defined(NOPORTEXAMPLES) - @${MKDIR} ${EXAMPLESDIR} -.for examples in ${PORTEXAMPLES} - ${INSTALL_DATA} ${WRKSRC}/samples/${examples} ${EXAMPLESDIR} +.if ${PORT_OPTIONS:MEXAMPLES} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} +.for i in ${EXAMPLEFILES} + ${INSTALL_DATA} ${WRKSRC}/samples/${i} ${STAGEDIR}${EXAMPLESDIR} .endfor .endif @${CAT} ${PKGMESSAGE} diff --git a/irc/bip/distinfo b/irc/bip/distinfo index eb15a9dcd946..6231f651fec6 100644 --- a/irc/bip/distinfo +++ b/irc/bip/distinfo @@ -1,2 +1,2 @@ -SHA256 (bip-0.8.8.tar.gz) = 7ca3fb96f5ee6b76eb398d7ea45344ea24855344ced11632241a33353bba05d7 -SIZE (bip-0.8.8.tar.gz) = 220232 +SHA256 (bip-0.8.9.tar.gz) = 3c950f71ef91c8b686e6835f9b722aa7ccb88d3da4ec1af19617354fd3132461 +SIZE (bip-0.8.9.tar.gz) = 256711 diff --git a/irc/bip/files/patch-bip-191 b/irc/bip/files/patch-bip-191 deleted file mode 100644 index 426c6340cdc5..000000000000 --- a/irc/bip/files/patch-bip-191 +++ /dev/null @@ -1,66 +0,0 @@ -From 284c7a8020b664ecc6cb1f326af55325a46f7d3a Mon Sep 17 00:00:00 2001 -From: Nathan Phillip Brink <binki@gentoo.org> -Date: Mon, 12 Sep 2011 23:25:09 +0000 -Subject: [PATCH] Throttle almost everything (except PING, PONG, and certain QUIT messages) sent to the IRCd. - -Fixes being killed for Excess Flooding on freenode by using the existing -fakelag mechanism. The existing fakelag works great but was just not hooked -into earlier. ---- - src/connection.c | 14 +++++++++++--- - 1 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/src/connection.c b/src/connection.c -index c793e18..e226f92 100644 ---- a/src/connection.c -+++ b/src/connection.c -@@ -23,6 +23,7 @@ static SSL_CTX *sslctx = NULL; - static int ssl_cx_idx; - static BIO *errbio = NULL; - extern char *conf_ssl_certfile; -+static int cn_want_write(connection_t *cn); - static int SSLize(connection_t *cn, int *nc); - static SSL_CTX *SSL_init_context(void); - /* SSH like trust management */ -@@ -326,6 +327,11 @@ static int real_write_all(connection_t *cn) - return 0; - } - -+/* -+ * May only be used when writing to the client or when sending -+ * timing-sensitive data to the server (PONG, PING for lagtest, QUIT) -+ * because fakelag is not enforced. -+ */ - void write_line_fast(connection_t *cn, char *line) - { - int r; -@@ -353,13 +359,15 @@ void write_line_fast(connection_t *cn, char *line) - void write_lines(connection_t *cn, list_t *lines) - { - list_append(cn->outgoing, lines); -- real_write_all(cn); -+ if (cn_want_write(cn)) -+ real_write_all(cn); - } - - void write_line(connection_t *cn, char *line) - { - list_add_last(cn->outgoing, bip_strdup(line)); -- real_write_all(cn); -+ if (cn_want_write(cn)) -+ real_write_all(cn); - } - - list_t *read_lines(connection_t *cn, int *error) -@@ -718,7 +726,7 @@ static int check_event_write(fd_set *fds, connection_t *cn, int *nc) - /* token generation interval: 1200ms */ - #define TOKEN_INTERVAL 1200 - --int cn_want_write(connection_t *cn) -+static int cn_want_write(connection_t *cn) - { - if (cn->anti_flood) { - struct timeval tv; --- -1.7.3.4 - diff --git a/irc/bip/files/patch-bip-269 b/irc/bip/files/patch-bip-269 deleted file mode 100644 index 053583dd4174..000000000000 --- a/irc/bip/files/patch-bip-269 +++ /dev/null @@ -1,139 +0,0 @@ -commit 222a33cb84a2e52ad55a88900b7895bf9dd0262c -Author: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr> -Date: Sat Jan 7 11:41:02 2012 +0100 - - Buffer Overflow: check against the implicit size of select() arrays - - Reported by Julien Tinnes (Fix #269) - exit is called when the listening socket can not be created - -diff --git a/src/bip.c b/src/bip.c -index d46ee2b..b4ac706 100644 ---- a/src/bip.c -+++ b/src/bip.c -@@ -1311,7 +1311,7 @@ int main(int argc, char **argv) - close(fd); - - bip.listener = listen_new(conf_ip, conf_port, conf_css); -- if (!bip.listener) -+ if (!bip.listener || bip.listener->connected == CONN_ERROR) - fatal("Could not create listening socket"); - - for (;;) { -commit 222a33cb84a2e52ad55a88900b7895bf9dd0262c -Author: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr> -Date: Sat Jan 7 11:41:02 2012 +0100 - - Buffer Overflow: check against the implicit size of select() arrays - - Reported by Julien Tinnes (Fix #269) - exit is called when the listening socket can not be created - -diff --git a/src/connection.c b/src/connection.c -index 07ab431..5c4c24a 100644 ---- a/src/connection.c -+++ b/src/connection.c -@@ -124,6 +124,18 @@ static void connect_trynext(connection_t *cn) - continue; - } - -+ if (cn->handle >= FD_SETSIZE) { -+ mylog(LOG_WARN, "too many fd used, close socket %d", -+ cn->handle); -+ -+ if (close(cn->handle) == -1) -+ mylog(LOG_WARN, "Error on socket close: %s", -+ strerror(errno)); -+ -+ cn->handle = -1; -+ break; -+ } -+ - socket_set_nonblock(cn->handle); - - if (cn->connecting_data->src) { -@@ -789,13 +801,8 @@ list_t *wait_event(list_t *cn_list, int *msec, int *nc) - /* - * This shouldn't happen ! just in case... - */ -- if (cn->handle < 0) { -- mylog(LOG_WARN, "wait_event invalid socket %d", -- cn->handle); -- if (cn_is_connected(cn)) -- cn->connected = CONN_ERROR; -- continue; -- } -+ if (cn->handle < 0 || cn->handle >= FD_SETSIZE) -+ fatal("wait_event invalid socket %d", cn->handle); - - /* exceptions are OOB and disconnections */ - FD_SET(cn->handle, &fds_except); -@@ -966,6 +973,18 @@ static void create_listening_socket(char *hostname, char *port, - continue; - } - -+ if (cn->handle >= FD_SETSIZE) { -+ mylog(LOG_WARN, "too many fd used, close listening socket %d", -+ cn->handle); -+ -+ if (close(cn->handle) == -1) -+ mylog(LOG_WARN, "Error on socket close: %s", -+ strerror(errno)); -+ -+ cn->handle = -1; -+ break; -+ } -+ - if (setsockopt(cn->handle, SOL_SOCKET, SO_REUSEADDR, - (char *)&multi_client, - sizeof(multi_client)) < 0) { -@@ -1113,10 +1132,21 @@ connection_t *accept_new(connection_t *cn) - - mylog(LOG_DEBUG, "Trying to accept new client on %d", cn->handle); - err = accept(cn->handle, &sa, &sa_len); -+ - if (err < 0) { -- mylog(LOG_ERROR, "accept failed: %s", strerror(errno)); -+ fatal("accept failed: %s", strerror(errno)); -+ } -+ -+ if (err >= FD_SETSIZE) { -+ mylog(LOG_WARN, "too many client connected, close %d", err); -+ -+ if (close(err) == -1) -+ mylog(LOG_WARN, "Error on socket close: %s", -+ strerror(errno)); -+ - return NULL; - } -+ - socket_set_nonblock(err); - - conn = connection_init(cn->anti_flood, cn->ssl, cn->timeout, 0); -commit 222a33cb84a2e52ad55a88900b7895bf9dd0262c -Author: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr> -Date: Sat Jan 7 11:41:02 2012 +0100 - - Buffer Overflow: check against the implicit size of select() arrays - - Reported by Julien Tinnes (Fix #269) - exit is called when the listening socket can not be created - -diff --git a/src/irc.c b/src/irc.c -index ebc1b34..147a315 100644 ---- a/src/irc.c -+++ b/src/irc.c -@@ -2439,9 +2439,10 @@ void bip_on_event(bip_t *bip, connection_t *conn) - - if (conn == bip->listener) { - struct link_client *n = irc_accept_new(conn); -- assert(n); -- list_add_last(&bip->conn_list, CONN(n)); -- list_add_last(&bip->connecting_client_list, n); -+ if (n) { -+ list_add_last(&bip->conn_list, CONN(n)); -+ list_add_last(&bip->connecting_client_list, n); -+ } - return; - } - diff --git a/irc/bip/pkg-plist b/irc/bip/pkg-plist new file mode 100644 index 000000000000..309a65d6cb15 --- /dev/null +++ b/irc/bip/pkg-plist @@ -0,0 +1,8 @@ +bin/bip +bin/bipmkpw +man/man1/bip.1.gz +man/man1/bipmkpw.1.gz +man/man5/bip.conf.5.gz +%%EXAMPLESDIR%%/bip.conf +%%EXAMPLESDIR%%/bip.vim +@dirrmtry %%EXAMPLESDIR%% |