summaryrefslogtreecommitdiff
path: root/net-im/jabberd/files
Side-by-side diff
Diffstat (limited to 'net-im/jabberd/files') (more/less context) (ignore whitespace changes)
-rw-r--r--net-im/jabberd/files/digest-jabberd-1.4.4-r33
-rw-r--r--net-im/jabberd/files/digest-jabberd-2.0.11-r13
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-crypt.patch11
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-genhash.c-rev1253.patch11
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch16
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-openssl-0.9.8.patch11
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-str.c-rev1103.patch11
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-xdb_file.c-rev1107.patch13
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4-xdb_sql.c-rev1211.patch24
-rw-r--r--net-im/jabberd/files/jabberd-1.4.4.init29
-rw-r--r--net-im/jabberd/files/jabberd-2.0.11-configure.in.patch13
-rw-r--r--net-im/jabberd/files/jabberd-2.0.11.init80
12 files changed, 225 insertions, 0 deletions
diff --git a/net-im/jabberd/files/digest-jabberd-1.4.4-r3 b/net-im/jabberd/files/digest-jabberd-1.4.4-r3
new file mode 100644
index 0000000..612cb5d
--- a/dev/null
+++ b/net-im/jabberd/files/digest-jabberd-1.4.4-r3
@@ -0,0 +1,3 @@
+MD5 395f814a6627436ba7bd235509adcbc7 jabberd-1.4.4.tar.gz 613479
+RMD160 3273d0711fb6f0f6b95749d8bdb1ac5004aed074 jabberd-1.4.4.tar.gz 613479
+SHA256 72e23766e737588ed8d77ca7565a8f4b2bba73967c02e9b7ee4d2122d198a0af jabberd-1.4.4.tar.gz 613479
diff --git a/net-im/jabberd/files/digest-jabberd-2.0.11-r1 b/net-im/jabberd/files/digest-jabberd-2.0.11-r1
new file mode 100644
index 0000000..351198e
--- a/dev/null
+++ b/net-im/jabberd/files/digest-jabberd-2.0.11-r1
@@ -0,0 +1,3 @@
+MD5 67d1663ed97a5ba707d5d145b1d19c55 jabberd-2.0s11.tar.gz 777466
+RMD160 7e89790abb5ff4e84a0a38ac5afbc0c365d60b3d jabberd-2.0s11.tar.gz 777466
+SHA256 0ef0f668f5d86b8c22ce0ae2366bff0be9d4c961d6f48b7b849ebe749bdb213a jabberd-2.0s11.tar.gz 777466
diff --git a/net-im/jabberd/files/jabberd-1.4.4-crypt.patch b/net-im/jabberd/files/jabberd-1.4.4-crypt.patch
new file mode 100644
index 0000000..257fe45
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-crypt.patch
@@ -0,0 +1,11 @@
+diff -ru jabberd-1.4.4.vanilla/jsm/Makefile.am jabberd-1.4.4/jsm/Makefile.am
+--- jabberd-1.4.4.vanilla/jsm/Makefile.am 2006-10-03 14:07:22.000000000 +0200
++++ jabberd-1.4.4/jsm/Makefile.am 2006-10-03 14:27:12.000000000 +0200
+@@ -7,6 +7,6 @@
+
+ libjabberdsm_la_SOURCES = authreg.c deliver.c jsm.c modules.c offline.c server.c sessions.c users.c util.c
+ libjabberdsm_la_LIBADD = $(top_builddir)/jsm/modules/libjabberdsmmods.la $(top_builddir)/jabberd/libjabberd.la
+-libjabberdsm_la_LDFLAGS = @LDFLAGS@ -module
++libjabberdsm_la_LDFLAGS = -lcrypt @LDFLAGS@ -module
+
+ INCLUDES = -I../jabberd -I../jabberd/lib
diff --git a/net-im/jabberd/files/jabberd-1.4.4-genhash.c-rev1253.patch b/net-im/jabberd/files/jabberd-1.4.4-genhash.c-rev1253.patch
new file mode 100644
index 0000000..edb85bb
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-genhash.c-rev1253.patch
@@ -0,0 +1,11 @@
+--- jabberd/lib/genhash.c 2006/06/07 09:17:30 1252
++++ jabberd/lib/genhash.c 2006/06/23 09:24:18 1253
+@@ -148,7 +148,7 @@
+ xht h = (xht)tbl;
+
+ for(i = 0; i < h->prime; i++)
+- for(n = &h->zen[i]; n != NULL; n = n->next)
++ for(n = h->zen[i]; n != NULL; n = n->next)
+ if(n->key != NULL && n->val != NULL)
+ (*func)(user_data, n->key, n->val);
+
diff --git a/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch b/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch
new file mode 100644
index 0000000..338369c
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-mio-bug-rev1291.patch
@@ -0,0 +1,16 @@
+--- jabberd/mio.c 2006/08/10 14:54:02 1290
++++ jabberd/mio.c 2006/09/02 05:35:46 1291
+@@ -469,6 +469,13 @@
+ return NULL;
+ }
+
++ /* do not accept a higher fd than FD_SET, or FD_CLR can handle */
++ if (fd >= FD_SETSIZE) {
++ log_warn(NULL, "could not accept incoming connection, maximum number of connections reached (%i)", FD_SETSIZE);
++ close(fd);
++ return NULL;
++ }
++
+ log_debug2(ZONE, LOGT_IO, "_mio_accept(%X) accepted fd #%d", m, fd);
+
+ /* access and rate checks */
diff --git a/net-im/jabberd/files/jabberd-1.4.4-openssl-0.9.8.patch b/net-im/jabberd/files/jabberd-1.4.4-openssl-0.9.8.patch
new file mode 100644
index 0000000..12df5df
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-openssl-0.9.8.patch
@@ -0,0 +1,11 @@
+diff -Nru --exclude=tags jabberd-1.4.4/jabberd/mio_ssl.c jabberd-1.4.4.fixed/jabberd/mio_ssl.c
+--- jabberd-1.4.4/jabberd/mio_ssl.c 2005-04-16 00:07:23.000000000 +0200
++++ jabberd-1.4.4.fixed/jabberd/mio_ssl.c 2006-09-12 18:23:35.000000000 +0200
+@@ -103,6 +103,7 @@
+
+ log_debug2(ZONE, LOGT_INIT|LOGT_CONFIG, "Handling configuration using: %s", xmlnode2str(x));
+ /* Generic SSL Inits */
++ SSL_library_init();
+ OpenSSL_add_all_algorithms();
+ SSL_load_error_strings();
+
diff --git a/net-im/jabberd/files/jabberd-1.4.4-str.c-rev1103.patch b/net-im/jabberd/files/jabberd-1.4.4-str.c-rev1103.patch
new file mode 100644
index 0000000..4500a55
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-str.c-rev1103.patch
@@ -0,0 +1,11 @@
+--- jabberd/lib/str.c 2005/04/12 11:43:15 1094
++++ jabberd/lib/str.c 2005/04/16 19:54:24 1103
+@@ -417,7 +417,7 @@
+ static char buff[64];
+ int i;
+
+- i = snprintf(buff,63,"%s:%d",file,line);
++ i = snprintf(buff, sizeof(buff), "%s:%d", file, line);
+ buff[i] = '\0';
+
+ return buff;
diff --git a/net-im/jabberd/files/jabberd-1.4.4-xdb_file.c-rev1107.patch b/net-im/jabberd/files/jabberd-1.4.4-xdb_file.c-rev1107.patch
new file mode 100644
index 0000000..a664349
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-xdb_file.c-rev1107.patch
@@ -0,0 +1,13 @@
+--- xdb_file/xdb_file.c 2005/07/08 22:36:46 1106
++++ xdb_file/xdb_file.c 2005/07/11 14:23:27 1107
+@@ -153,8 +153,8 @@
+
+ /* generate a hash over the filename */
+ bzero(hashedfilename, sizeof(hashedfilename));
+- bzero(digit01, sizeof(digit01));
+- bzero(digit23, sizeof(digit23));
++ bzero(digit01, sizeof(char[3]));
++ bzero(digit23, sizeof(char[3]));
+ crc32_r(filename, hashedfilename);
+ log_debug2(ZONE, LOGT_STORAGE, "hash of %s is %s", filename, hashedfilename);
+ memcpy(digit01, hashedfilename+1, 2);
diff --git a/net-im/jabberd/files/jabberd-1.4.4-xdb_sql.c-rev1211.patch b/net-im/jabberd/files/jabberd-1.4.4-xdb_sql.c-rev1211.patch
new file mode 100644
index 0000000..75f0a01
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4-xdb_sql.c-rev1211.patch
@@ -0,0 +1,24 @@
+--- xdb_sql/xdb_sql.c 2006/03/15 22:16:37 1210
++++ xdb_sql/xdb_sql.c 2006/04/25 22:01:39 1211
+@@ -269,10 +269,18 @@
+ ret = mysql_query(xq->mysql, query);
+
+ /* failed and we need to reconnect? */
+- if (ret == CR_SERVER_LOST || ret == CR_SERVER_GONE_ERROR) {
+- xdb_sql_mysql_connect(i, xq);
++ if (ret) {
++ unsigned int query_errno = mysql_errno(xq->mysql);
++ if (query_errno == CR_SERVER_LOST || query_errno == CR_SERVER_GONE_ERROR) {
++ log_debug2(ZONE, LOGT_STORAGE, "connection lost, trying to reconnect to MySQL server");
++ xdb_sql_mysql_connect(i, xq);
+
+- ret = mysql_query(xq->mysql, query);
++ ret = mysql_query(xq->mysql, query);
++
++ if (ret == 0) {
++ log_notice(i->id, "connection to MySQL server %s:%i had been lost, and has been reestablished", xq->mysql_host , xq->mysql_port);
++ }
++ }
+ }
+
+ /* still an error? log and return */
diff --git a/net-im/jabberd/files/jabberd-1.4.4.init b/net-im/jabberd/files/jabberd-1.4.4.init
new file mode 100644
index 0000000..a25ac84
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-1.4.4.init
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabberd-1.4.4.init,v 1.1 2006/09/27 22:31:36 nelchael Exp $
+
+depend() {
+
+ need net
+ provide jabber-server
+
+}
+
+start() {
+
+ ebegin "Starting Jabber Server"
+ start-stop-daemon --start \
+ -c jabber:jabber \
+ -x /usr/bin/jabberd -- -B -c /etc/jabber/jabberd.xml
+ eend $?
+
+}
+
+stop() {
+
+ ebegin "Stopping Jabber Server"
+ start-stop-daemon --stop -x /usr/bin/jabberd
+ eend $?
+
+}
diff --git a/net-im/jabberd/files/jabberd-2.0.11-configure.in.patch b/net-im/jabberd/files/jabberd-2.0.11-configure.in.patch
new file mode 100644
index 0000000..64a6697
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-2.0.11-configure.in.patch
@@ -0,0 +1,13 @@
+diff -Nru jabberd-2.0s11.vanilla/configure.in jabberd-2.0s11/configure.in
+--- jabberd-2.0s11.vanilla/configure.in 2006-10-04 23:14:07.000000000 +0200
++++ jabberd-2.0s11/configure.in 2006-10-04 23:19:58.000000000 +0200
+@@ -758,9 +758,6 @@
+ dnl finishing up
+ dnl
+
+-dnl put our config in its own subdir
+-sysconfdir="$sysconfdir/jabberd"
+-
+ dnl done!
+ AC_OUTPUT(Makefile \
+ etc/Makefile \
diff --git a/net-im/jabberd/files/jabberd-2.0.11.init b/net-im/jabberd/files/jabberd-2.0.11.init
new file mode 100644
index 0000000..fee8d2e
--- a/dev/null
+++ b/net-im/jabberd/files/jabberd-2.0.11.init
@@ -0,0 +1,80 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabberd-2.0.11.init,v 1.3 2007/01/09 10:38:59 nelchael Exp $
+
+depend() {
+ need net
+ use mysql postgresql slapd
+ provide jabber-server
+}
+
+function stopJabberServices() {
+
+ eindent
+ for pidfile in /var/run/jabber/*.pid; do
+ if [[ -f "${pidfile}" ]]; then
+ service=$(basename ${pidfile/.pid/})
+ ebegin "Stopping ${service}"
+ start-stop-daemon \
+ --stop \
+ --pidfile ${pidfile}
+ eend $?
+ fi
+ done
+ eoutdent
+
+}
+
+start() {
+
+ einfo "Starting Jabber Server ..."
+ local services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}')
+ local tempPidHack=/var/run/jabber/start_stop_daemon.pid
+ eindent
+ for service in ${services}; do
+
+ cfgfile=${service/*:/}
+ service=${service/:*/}
+ if [[ ! -f "${cfgfile}" ]]; then
+ if [[ -f "/etc/jabber/${service}.xml" ]]; then
+ cfgfile="/etc/jabber/${service}.xml"
+ else
+ eerror "Can't find: ${cfgfile} or default /etc/jabber/${service}.xml"
+ stopJabberServices
+ return 1
+ fi
+ fi
+
+ executable=/usr/bin/${service}
+
+ if [[ ! -f "${executable}" ]]; then
+ eerror "Can't find executable: ${executable}"
+ stopJabberServices
+ return 1
+ fi
+
+ rm -f ${tempPidHack} &> /dev/null
+ ebegin "Starting ${service} (${cfgfile})"
+ start-stop-daemon \
+ --background \
+ --start \
+ --chuid jabber:jabber \
+ --exec /usr/bin/${service} \
+ --pid ${tempPidHack} \
+ --make-pidfile \
+ -- -c ${cfgfile}
+ eend $?
+ rm -f ${tempPidHack} &> /dev/null
+
+ done
+ eoutdent
+
+}
+
+stop() {
+
+ einfo "Stopping Jabber Server"
+ stopJabberServices
+
+}