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-im/ejabberd/files
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-im/ejabberd/files')
-rw-r--r--net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch49
-rw-r--r--net-im/ejabberd/files/ejabberd-3.confd5
-rw-r--r--net-im/ejabberd/files/ejabberd-3.initd47
-rw-r--r--net-im/ejabberd/files/ejabberd.logrotate13
-rw-r--r--net-im/ejabberd/files/ejabberd.service17
-rw-r--r--net-im/ejabberd/files/ejabberd.tmpfiles.conf1
6 files changed, 132 insertions, 0 deletions
diff --git a/net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch
new file mode 100644
index 00000000000..0d2ccf32485
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch
@@ -0,0 +1,49 @@
+Set SHELL since the generic jabber user used on Gentoo for jabber servers
+doesn't have a valid shell set by default and fix EXEC_CMD otherwise it fails
+with "This account is currently not available" again due to jabber not having
+a valid shell.
+
+Also, workaround the assumption that jabber's $HOME is a directory when instead
+it defaults to /dev/null on Gentoo.
+
+--- ejabberd-15.03/ejabberdctl.template
++++ ejabberd-15.03/ejabberdctl.template
+@@ -15,6 +15,7 @@
+ IEX={{bindir}}/iex
+ EPMD={{bindir}}/epmd
+ INSTALLUSER={{installuser}}
++SHELL=/bin/sh
+
+ # Compatibility in ZSH
+ #setopt shwordsplit 2>/dev/null
+@@ -25,11 +26,11 @@
+ for GID in `id -G`; do
+ if [ $GID -eq 0 ] ; then
+ INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
+- if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
++ if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
+ mkdir -p "$INSTALLUSER_HOME"
+ chown "$INSTALLUSER" "$INSTALLUSER_HOME"
+ fi
+- EXEC_CMD="su $INSTALLUSER -c"
++ EXEC_CMD="su $INSTALLUSER -p -c"
+ fi
+ done
+ if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
+@@ -111,6 +112,7 @@
+ DATETIME=`date "+%Y%m%d-%H%M%S"`
+ ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
+ ERL_INETRC=$ETC_DIR/inetrc
++HOME=$SPOOL_DIR
+
+ # define erl parameters
+ ERL_OPTIONS=$(echo $ERL_OPTIONS | sed 's/ /\\ /g')
+@@ -167,6 +169,8 @@
+ export ERL_INETRC
+ export ERL_MAX_PORTS
+ export ERL_MAX_ETS_TABLES
++export HOME
++export SHELL
+
+ # start server
+ start()
diff --git a/net-im/ejabberd/files/ejabberd-3.confd b/net-im/ejabberd/files/ejabberd-3.confd
new file mode 100644
index 00000000000..b1e984e4d7a
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-3.confd
@@ -0,0 +1,5 @@
+# Please configure everything at /etc/jabber/ejabberdctl.cfg
+# Put here only command line arguments for ejabberdctl (if any are required)
+
+#EJABBERDCTL_OPTS=""
+
diff --git a/net-im/ejabberd/files/ejabberd-3.initd b/net-im/ejabberd/files/ejabberd-3.initd
new file mode 100644
index 00000000000..29a30da3610
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-3.initd
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use dns
+ need net
+ provide jabber-server
+}
+
+start() {
+ if ejabberdctl status >/dev/null 2>&1; then
+ ewarn "ejabberd is already started (manually?)."
+ return 0
+ fi
+ ebegin "Starting ejabberd"
+ /usr/sbin/ejabberdctl ${EJABBERDCTL_OPTS} start
+ eend $?
+}
+
+stop() {
+ ejabberdctl status >/dev/null 2>&1
+ if test $? = 3; then
+ ewarn "ejabberd is already stopped (manually?)."
+ return 0
+ fi
+ ebegin "Stopping ejabberd"
+ if /usr/sbin/ejabberdctl stop >/dev/null 2>&1; then
+ cnt=0
+ sleep 1
+ while ejabberdctl status >/dev/null 2>&1 || test $? = 1; do
+ echo -n .
+ cnt=`expr $cnt + 1`
+ if [ $cnt -ge 60 ] ; then
+ eend 1
+ break
+ fi
+ sleep 1
+ done
+ eend 0
+ else
+ eend 1
+ einfo "Please, run '/usr/sbin/ejabberdctl stop' to see what's going on."
+ fi
+ eend 0
+}
diff --git a/net-im/ejabberd/files/ejabberd.logrotate b/net-im/ejabberd/files/ejabberd.logrotate
new file mode 100644
index 00000000000..4f324729dba
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd.logrotate
@@ -0,0 +1,13 @@
+/var/log/jabber/*.log {
+ su jabber jabber
+ weekly
+ rotate 4
+ missingok
+ nocreate
+ sharedscripts
+ notifempty
+ compress
+ postrotate
+ /usr/sbin/ejabberdctl reopen-log > /dev/null 2>&1 || true
+ endscript
+}
diff --git a/net-im/ejabberd/files/ejabberd.service b/net-im/ejabberd/files/ejabberd.service
new file mode 100644
index 00000000000..0b792565b75
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=A distributed, fault-tolerant Jabber/XMPP server
+After=network.target
+
+[Service]
+Type=oneshot
+User=jabber
+LimitNOFILE=16000
+RestartSec=5
+ExecStart=/usr/sbin/ejabberdctl \
+ --config /etc/jabber/ejabberd.cfg --ctl-config /etc/jabber/ejabberdctl.cfg \
+ --logs "/var/log/jabber" --spool "/var/spool/jabber" start
+ExecStop=/usr/sbin/ejabberdctl stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/ejabberd/files/ejabberd.tmpfiles.conf b/net-im/ejabberd/files/ejabberd.tmpfiles.conf
new file mode 100644
index 00000000000..cf17b73b43a
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd.tmpfiles.conf
@@ -0,0 +1 @@
+d /var/lock/ejabberdctl 0750 jabber jabber