diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-im/jabberd2/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-im/jabberd2/files')
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.1.pamd | 6 | ||||
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.2.init | 96 | ||||
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.2.logrotate | 8 | ||||
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch | 21 | ||||
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.4-websocket.patch | 31 | ||||
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.5.0.init | 90 |
6 files changed, 252 insertions, 0 deletions
diff --git a/net-im/jabberd2/files/jabberd2-2.3.1.pamd b/net-im/jabberd2/files/jabberd2-2.3.1.pamd new file mode 100644 index 000000000000..2c5a5347ad6a --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.1.pamd @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth required pam_nologin.so +auth include system-auth +account include system-auth +session include system-auth diff --git a/net-im/jabberd2/files/jabberd2-2.3.2.init b/net-im/jabberd2/files/jabberd2-2.3.2.init new file mode 100644 index 000000000000..4ef8aaea2c24 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.2.init @@ -0,0 +1,96 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="reload" + +depend() { + need net + use mysql postgresql slapd + provide jabber-server +} + +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_pre() { + checkpath -d -o jabber /var/run/jabber +} + +start() { + + einfo "Starting Jabber Server ..." + local services executable cfgfile pidfile + services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}') + eindent + for service in ${services}; do + + cfgfile=$(echo ${service} | cut -d ':' -f 2) + service=$(echo ${service} | cut -d ':' -f 1) + 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 + + ebegin "Starting ${service} (${cfgfile})" + pidfile="$(grep -v ^# ${cfgfile} | grep '<pidfile>' | sed 's#<.\?pidfile>##g')" + start-stop-daemon \ + --background \ + --start \ + --user jabber:jabber \ + --exec /usr/bin/${service} \ + --pid ${pidfile} \ + -- -c ${cfgfile} + eend $? + + done + eoutdent + +} + +reload() { + eindent + for pidfile in /var/run/jabber/*.pid; do + if [ -f "${pidfile}" ]; then + service=$(basename ${pidfile} .pid) + ebegin "Reloading ${service}" + kill -HUP $(cat ${pidfile}) + eend $? + fi + done + eoutdent +} + +stop() { + + einfo "Stopping Jabber Server" + stopJabberServices + +} diff --git a/net-im/jabberd2/files/jabberd2-2.3.2.logrotate b/net-im/jabberd2/files/jabberd2-2.3.2.logrotate new file mode 100644 index 000000000000..fcec0f7a1d59 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.2.logrotate @@ -0,0 +1,8 @@ +/var/log/jabber/c2s.log /var/log/jabber/s2s.log /var/log/jabber/sm.log /var/log/jabber/router.log { + su jabber jabber + sharedscripts + missingok + postrotate + /etc/init.d/jabberd reload + endscript +} diff --git a/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch b/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch new file mode 100644 index 000000000000..d320b9d1f349 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch @@ -0,0 +1,21 @@ +Re-allow the use of O3/Os, since it seems to have been an old compiler +bug. + +See https://github.com/jabberd2/jabberd2/issues/34 + +--- a/configure.ac ++++ b/configure.ac +@@ -23,13 +23,6 @@ + LIBS="$LIBS $lt_cv_dlopen_libs" + fi + +-# check for optimisation level +-AC_MSG_CHECKING([CFLAGS optimization level]) +-[if echo $CFLAGS | grep '.*-O[3s].*' >/dev/null 2>&1; then] +- AC_MSG_ERROR([maximum allowed optimization level is -O2]) +-fi +-AC_MSG_RESULT([fine]) +- + # extra paths + AC_ARG_WITH([extra_include_path], AC_HELP_STRING([--with-extra-include-path], + [use additional include paths]), diff --git a/net-im/jabberd2/files/jabberd2-2.3.4-websocket.patch b/net-im/jabberd2/files/jabberd2-2.3.4-websocket.patch new file mode 100644 index 000000000000..a6f932ccb481 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.4-websocket.patch @@ -0,0 +1,31 @@ +From b861b9c72adc732cbdfbac4eb8a4205126227f6b Mon Sep 17 00:00:00 2001 +From: Tomasz Sterna <tomek@xiaoka.com> +Date: Fri, 30 Oct 2015 12:40:32 +0100 +Subject: [PATCH] Enable USE_WEBSOCKET check in SX plugins + +--- + sx/plugins.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sx/plugins.h b/sx/plugins.h +index b5d3934..65dae93 100644 +--- a/sx/plugins.h ++++ b/sx/plugins.h +@@ -159,7 +159,7 @@ typedef struct _sx_compress_conn_st { + JABBERD2_API int sx_ack_init(sx_env_t env, sx_plugin_t p, va_list args); + + /* websocket wrapper plugin */ +-//#ifdef USE_WEBSOCKET ++#ifdef USE_WEBSOCKET + #include <http_parser.h> + #include <util/util.h> + +@@ -183,7 +183,7 @@ typedef struct _sx_websocket_conn_st { + xht headers; + void *frame; + } *_sx_websocket_conn_t; +-//#endif ++#endif + + #ifdef __cplusplus + } diff --git a/net-im/jabberd2/files/jabberd2-2.5.0.init b/net-im/jabberd2/files/jabberd2-2.5.0.init new file mode 100644 index 000000000000..a5579f7b6c0c --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.5.0.init @@ -0,0 +1,90 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="reload" + +depend() { + need net + use mysql postgresql slapd + provide jabber-server +} + +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_pre() { + checkpath -d -o jabber /var/run/jabber +} + +start() { + einfo "Starting Jabber Server ..." + local services executable cfgfile pidfile + services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}') + eindent + for service in ${services}; do + + cfgfile=$(echo ${service} | cut -d ':' -f 2) + service=$(echo ${service} | cut -d ':' -f 1) + 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/$(echo ${service} | cut -d '.' -f 1)" + + if [ ! -f "${executable}" ]; then + eerror "Can't find executable: ${executable}" + stopJabberServices + return 1 + fi + + ebegin "Starting ${service} (${cfgfile})" + pidfile="$(grep -v ^# ${cfgfile} | grep '<pidfile>' | sed 's#<.\?pidfile>##g')" + start-stop-daemon \ + --background \ + --start \ + --user jabber:jabber \ + --exec ${executable} \ + --pid ${pidfile} \ + -- -c ${cfgfile} + eend $? + + done + eoutdent +} + +reload() { + eindent + for pidfile in /var/run/jabber/*.pid; do + if [ -f "${pidfile}" ]; then + service=$(basename ${pidfile} .pid) + ebegin "Reloading ${service}" + kill -HUP $(cat ${pidfile}) + eend $? + fi + done + eoutdent +} + +stop() { + einfo "Stopping Jabber Server" + stopJabberServices +} |