summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-irc/bip
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-irc/bip')
-rw-r--r--net-irc/bip/Manifest1
-rw-r--r--net-irc/bip/bip-0.8.8-r1.ebuild72
-rw-r--r--net-irc/bip/files/bip-0.8.8-configure.patch50
-rw-r--r--net-irc/bip/files/bip-CVE-2012-0806.patch121
-rw-r--r--net-irc/bip/files/bip-freenode.patch18
-rw-r--r--net-irc/bip/files/bip.vim5
-rw-r--r--net-irc/bip/metadata.xml23
7 files changed, 290 insertions, 0 deletions
diff --git a/net-irc/bip/Manifest b/net-irc/bip/Manifest
new file mode 100644
index 000000000000..bf166b4541ce
--- /dev/null
+++ b/net-irc/bip/Manifest
@@ -0,0 +1 @@
+DIST bip-0.8.8.tar.gz 220232 SHA256 7ca3fb96f5ee6b76eb398d7ea45344ea24855344ced11632241a33353bba05d7 SHA512 acd62a61379290088320567b299b9d2e236c24aea7c83c4bfb7dedba9727868fb931d7e2eb663c9041794c26583bcc923072049cb42eef0d13702f284bae2b34 WHIRLPOOL b2e5f7a1328832fce7b3c7eb706ec87e7eb023043e714dbc554126730d2e9dc37af2d127e15ef024fff1e95b9dd22351cd48b3b115b58b9fd9ecbdd92f20cda1
diff --git a/net-irc/bip/bip-0.8.8-r1.ebuild b/net-irc/bip/bip-0.8.8-r1.ebuild
new file mode 100644
index 000000000000..86fc9b03ca32
--- /dev/null
+++ b/net-irc/bip/bip-0.8.8-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils autotools
+
+DESCRIPTION="Multiuser IRC proxy with SSL support"
+HOMEPAGE="http://bip.milkypond.org/"
+SRC_URI="ftp://ftp.duckcorp.org/bip/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug freenode noctcp ssl vim-syntax oidentd"
+
+DEPEND="sys-devel/flex
+ virtual/yacc
+ ssl? ( dev-libs/openssl )"
+
+RDEPEND="${DEPEND}
+ vim-syntax? (
+ || ( app-editors/vim app-editors/gvim ) )
+ oidentd? ( >=net-misc/oidentd-2.0 )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-configure.patch" || die
+ epatch "${FILESDIR}/${PN}-CVE-2012-0806.patch" || die
+
+ eautoreconf
+
+ if use noctcp; then
+ sed -i -e '/irc_privmsg_check_ctcp(server, line);/s:^://:' src/irc.c || die
+ fi
+
+ if use freenode; then
+ epatch "${FILESDIR}/${PN}-freenode.patch" || die
+ fi
+}
+
+src_configure() {
+ econf \
+ $(use_with ssl openssl) \
+ $(use_enable debug) \
+ $(use_enable oidentd)
+}
+
+src_compile() {
+ # Parallel make fails.
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ dobin src/bip src/bipmkpw || die "dobin failed"
+
+ dodoc AUTHORS ChangeLog README NEWS TODO || die "dodoc failed"
+ newdoc samples/bip.conf bip.conf.sample || die "newdoc failed"
+ doman bip.1 bip.conf.5 bipmkpw.1 || die "doman failed"
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins samples/bip.vim || die "doins failed"
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${FILESDIR}"/bip.vim || die "doins failed"
+ fi
+}
+
+pkg_postinst() {
+ elog 'The default configuration file is "~/.bip/bip.conf"'
+ elog "You can find a sample configuration file in"
+ elog "/usr/share/doc/${PF}/bip.conf.sample"
+}
diff --git a/net-irc/bip/files/bip-0.8.8-configure.patch b/net-irc/bip/files/bip-0.8.8-configure.patch
new file mode 100644
index 000000000000..592bdc664561
--- /dev/null
+++ b/net-irc/bip/files/bip-0.8.8-configure.patch
@@ -0,0 +1,50 @@
+commit 559fa7ed44238e811ac0c11321ed021c35cba2be
+Author: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr>
+Date: Wed Sep 14 06:30:09 2011 +0200
+
+ don't override user var. Thanks to Alex Legler
+
+ Based on gentoo-x86/net-irc/bip/files/bip-configure.patch
+ See http://www.gnu.org/software/autoconf/manual/automake.html#User-Variables
+ If user doesn't specify CFLAGS, default value is "-Wall -Wextra -g -O2".
+
+diff --git a/Makefile.am b/Makefile.am
+index c2dae4d..f17c314 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,13 +13,8 @@ src_bip_SOURCES = src/conf.y src/lex.l \
+ src_bipmkpw_SOURCES = src/bipmkpw.c src/md5.c src/util.c
+ AM_YFLAGS= -d
+ BUILT_SOURCES = src/conf.c src/conf.h src/lex.c
+-if DEBUG
+- AM_CFLAGS+=-Wall -g
+- AM_LDFLAGS+=-g
+-else
+- AM_CFLAGS+=-Wall
+-endif
+
++AM_CFLAGS=-Wall -Wextra
+
+ dist_man_MANS = bip.1 bip.conf.5 bipmkpw.1
+
+diff --git a/configure.ac b/configure.ac
+index 005e697..5740a39 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,16 +44,12 @@ AC_ARG_ENABLE([pie], AS_HELP_STRING([--disable-pie], [Do not build a position in
+
+ AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes)
+ AS_IF([test "x$enable_debug" = "xyes"], [
+- CFLAGS="-O0 -g -W -Wall"
+- LDFLAGS="-g"
+ AC_CHECK_FUNC(backtrace_symbols_fd, [
+ AC_DEFINE(HAVE_BACKTRACE, [], [Use glibc backtrace on fatal()])
+ LDFLAGS="-rdynamic $LDFLAGS"
+ backtrace="(with backtrace)"
+ ])
+ ], [
+- CFLAGS="-O2 -g -W -Wall"
+- LDFLAGS="-g"
+ enable_debug=no
+ ])
+
diff --git a/net-irc/bip/files/bip-CVE-2012-0806.patch b/net-irc/bip/files/bip-CVE-2012-0806.patch
new file mode 100644
index 000000000000..6ea26aead2bb
--- /dev/null
+++ b/net-irc/bip/files/bip-CVE-2012-0806.patch
@@ -0,0 +1,121 @@
+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 (;;) {
+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);
+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/net-irc/bip/files/bip-freenode.patch b/net-irc/bip/files/bip-freenode.patch
new file mode 100644
index 000000000000..437da08f438d
--- /dev/null
+++ b/net-irc/bip/files/bip-freenode.patch
@@ -0,0 +1,18 @@
+Freenode's ircd-seven uses a custom banlist type for mutes (+q).
+This patch makes bip handle +q the same way as +q.
+Without it, a user wouldn't get the banlist replies for mutes.
+
+diff --git a/src/irc.c b/src/irc.c
+index 556bf97..a5cc039 100644
+--- a/src/irc.c
++++ b/src/irc.c
+@@ -944,7 +947,8 @@ static int irc_cli_mode(struct link_client *ic, struct line *line)
+
+ /* This is a wild guess and that sucks. */
+ if (!irc_line_elem_equals(line, 0, "MODE") ||
+- strchr(irc_line_elem(line, 2), 'b') == NULL)
++ (strchr(irc_line_elem(line, 2), 'b') == NULL &&
++ strchr(irc_line_elem(line, 2), 'q') == NULL))
+ return OK_COPY;
+
+ ++ic->who_count;
diff --git a/net-irc/bip/files/bip.vim b/net-irc/bip/files/bip.vim
new file mode 100644
index 000000000000..b99ad1b088e4
--- /dev/null
+++ b/net-irc/bip/files/bip.vim
@@ -0,0 +1,5 @@
+" Vim filetype detection file for bip config files
+"
+" $Id$
+
+au BufNewFile,BufRead bip.conf set filetype=bip
diff --git a/net-irc/bip/metadata.xml b/net-irc/bip/metadata.xml
new file mode 100644
index 000000000000..29b526cee87b
--- /dev/null
+++ b/net-irc/bip/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Bip is an IRC proxy, which means it keeps connected to your preferred
+ IRC servers, can store the logs for you, and even send them back to your IRC
+ client(s) upon connection. You may want to use bip to keep your logfiles (in a
+ unique format and on a unique computer) whatever your client is, when you
+ connect from multiple workstations, or when you simply want to have a playback
+ of what was said while you were away.
+ </longdescription>
+ <use>
+ <flag name="freenode">Enables freenode-specific functionality.
+ Currently that is only support for mute lists (MODE #channel +q).</flag>
+ <flag name="noctcp">Disable the automatic CTCP VERSION reply which is often
+ exploited by malicious people to cause a DoS (reconnect due to flooding).
+ </flag>
+ <flag name="oidentd">Enable oidentd support</flag>
+ </use>
+</pkgmetadata>