Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63472 - RFE: ejabberd ebuild
Summary: RFE: ejabberd ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Net-im project
URL: http://ejabberd.jabberstudio.org/
Whiteboard:
Keywords:
Depends on:
Blocks: 88283 88597
  Show dependency tree
 
Reported: 2004-09-09 13:37 UTC by Graeme Humphries
Modified: 2005-08-12 11:36 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ejabberd 07 ebuild (ejabberd-0.7.ebuild,361 bytes, text/plain)
2004-09-09 13:38 UTC, Graeme Humphries
Details
ejabberd-0.7.ebuild (ejabberd-0.7.ebuild,814 bytes, text/plain)
2004-09-19 16:46 UTC, Miles Lubin
Details
ejabberd-0.7.5.ebuild (ebuild-ejabberd-0.7.5.tar.bz2,1.69 KB, application/x-bzip2)
2004-10-19 14:00 UTC, spec-8472
Details
init.d start script (ejabberd,812 bytes, text/plain)
2005-02-01 17:34 UTC, Stefan de Konink
Details
net-im/ejabberd tarball (ejabberd.tar,20.00 KB, application/x-tar)
2005-03-25 07:38 UTC, Karl-Johan Karlsson
Details
second net-im/ejabberd tarball (ejabberd.tar,20.00 KB, application/x-tar)
2005-03-25 23:40 UTC, Karl-Johan Karlsson
Details
third (release candidate) net-im/ejabberd tarball (ejabberd.tar,20.00 KB, application/x-tar)
2005-04-02 09:40 UTC, Karl-Johan Karlsson
Details
ejabberd-0.7.5.ebuild (ejabberd-0.7.5.ebuild,2.43 KB, text/x-ebuild)
2005-04-06 00:03 UTC, Karl-Johan Karlsson
Details
files/ejabberd (ejabberd,355 bytes, application/octet-stream)
2005-04-06 00:04 UTC, Karl-Johan Karlsson
Details
files/ejabberdctl (ejabberdctl,199 bytes, application/octet-stream)
2005-04-06 00:05 UTC, Karl-Johan Karlsson
Details
files/ejabberd-0.7.5.initd (ejabberd-0.7.5.initd,1.24 KB, application/octet-stream)
2005-04-06 00:05 UTC, Karl-Johan Karlsson
Details
files/ejabberd-0.7.5.confd (ejabberd-0.7.5.confd,671 bytes, application/octet-stream)
2005-04-06 00:06 UTC, Karl-Johan Karlsson
Details
files/inetrc (inetrc,36 bytes, application/octet-stream)
2005-04-06 00:06 UTC, Karl-Johan Karlsson
Details
ejabberd-0.7.5.ebuild.diff (ejabberd-0.7.5.ebuild.diff,1.15 KB, patch)
2005-04-08 05:01 UTC, Gustavo Felisberto (RETIRED)
Details | Diff
fixes initial ebuild bugs (ejabberd-0.7.5.ebuild.diff,721 bytes, patch)
2005-04-16 03:25 UTC, Igor Golubev
Details | Diff
fixes startup script (ejabberd.diff,482 bytes, patch)
2005-04-16 05:34 UTC, Igor Golubev
Details | Diff
ebuild for new version ejabberd-0.9 (ejabberd-0.9.ebuild,3.03 KB, text/plain)
2005-04-21 05:54 UTC, Stian B. Barmen
Details
ejabberd-0.9.ebuild (ejabberd-0.9.ebuild,3.02 KB, text/plain)
2005-04-21 06:01 UTC, Stian B. Barmen
Details
new ejabberd-0.9.ebuild (ejabberd-0.9.ebuild,3.40 KB, text/plain)
2005-04-21 16:24 UTC, Igor Golubev
Details
Patch to add warning about web USE flah (ejabberd-0.9.ebuild.patch,461 bytes, patch)
2005-04-22 05:11 UTC, Stian B. Barmen
Details | Diff
ejabberd-0.9.1.ebuild - new ejabberd version (ejabberd-0.9.1.ebuild,3.60 KB, text/plain)
2005-06-01 04:09 UTC, Stian B. Barmen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Humphries 2004-09-09 13:37:17 UTC
ejabberd is an alternative jabber server written in Erlang that has a web configuration interface. It would be nice to have an ebuild, so I've started working on one, and I'll track the progress in this bug.
Comment 1 Graeme Humphries 2004-09-09 13:38:17 UTC
Created attachment 39268 [details]
ejabberd 07 ebuild

My preliminary ebuild. Install process has sandbox violations that I'd love to
have help ironing out.
Comment 2 Miles Lubin 2004-09-19 16:46:49 UTC
Created attachment 39970 [details]
ejabberd-0.7.ebuild

Cleaned up your ebuild a bit, here's what I have so far.
Still to be done: write out descriptions of USE flags web, mod_pubsub, mod_irc,
and mod_muc for profiles/use.local.decs, and make an init script.
I don't use/know anything about ejabberd, so it'd be best if someone who does
did those.
Comment 3 spec-8472 2004-10-19 14:00:02 UTC
Created attachment 42219 [details]
ejabberd-0.7.5.ebuild

New ebuild for new version (0.7.5) with init scripts.

Description of USE flags:
 * mod_pubsub - Enable built-in Publish-Subscribe service
 * mod_irc - Enable built-in IRC transport
 * mod_muc - Enable built-in Multi-User Chat service
 * web - Enable built-in web-based administration interface
Comment 4 Stefan de Konink 2005-02-01 17:34:51 UTC
Created attachment 50186 [details]
init.d start script

The init script supports starting in local domain only mode, should probably
become a option to select to use a FQDN and make it run with it.
I tried to run ejabberd as non-root, which didn't work for me yet. Depending on
your needs, 'use slapd' should be added, although this should be a future
config option as well.

This script doesn't support stopping... maybe someone can take a look at it to
generate a pid file of some sort.
Comment 5 Karl-Johan Karlsson 2005-03-25 07:38:10 UTC
Created attachment 54445 [details]
net-im/ejabberd tarball

Here's a new candidate package with ebuild, init scripts and control scripts.
Improvement over earlier suggestions is running the daemon as a non-root user,
proper control in the init.d script (start, stop, restart, reload), and
actually finding the source package - Jabberstudio doesn't seem to be rebuilt
yet since their well-publicised break-in, but we can grab the source from the
Debian mirrors (see <URL:http://packages.qa.debian.org/e/ejabberd.html>).

Clustering probably doesn't work, but I don't have enough hardware to test
that. I've only set KEYWORDS to ~amd64, since that's what I've tested it on,
but I see no reason why it shouldn't work on everything that dev-lang/erlang
works on.

Possible improvements: include a logrotate script, edit the example
configuration file according to USE flags.
Comment 6 Karl-Johan Karlsson 2005-03-25 10:39:23 UTC
The package in #5 is now tested on an UltraSPARC II as well. Please add ~sparc to KEYWORDS if it is accepted.
Comment 7 Karl-Johan Karlsson 2005-03-25 23:40:14 UTC
Created attachment 54500 [details]
second net-im/ejabberd tarball

Add ~sparc to KEYWORDS.
Re-define $opts in the init.d script to make "reload" work.
Remove unnecessary sourcing of the conf.d file.
Convert spaces to tabs.

Todo: Why is the standard restart function called, instead of my own,
regardless of how I set $opts?
Comment 8 Karl-Johan Karlsson 2005-03-26 11:02:06 UTC
Would there be any point to introducing a new virtual, "jabber-server"? <URL:http://www.jabber.org/software/components.shtml> lists some external components that can be installed alongside any Jabber server supporting JEP-0114, which seems to include at least jabberd 1 and 2 and ejabberd.
Comment 9 Karl-Johan Karlsson 2005-04-02 09:40:26 UTC
Created attachment 55113 [details]
third (release candidate) net-im/ejabberd tarball

Work around a bug in /sbin/runscript.sh to get the right restart function
called.
Provide a virtual package "virtual/jabber-server" (new) and service
"jabber-server" (already provided by jabberd). (I am working on an ebuild for
PyICQ-t that depends on this)
Tested on x86, so added ~x86 to keywords.
Use dodir instead of mkdir to create install directories.
Set home directory of ejabberd user to /var/run/ejabberd.

I don't think there are any obvious bugs or missing features anymore, so I
consider this a release candidate. Please add it as net-im/ejabberd.
Comment 10 Gustavo Felisberto (RETIRED) gentoo-dev 2005-04-05 16:57:17 UTC
Karl: Please provide the files separated and not in a tgz, also jabberd installs a file: /usr/doc/jabberd-1.4.3-r4/README.Gentoo.gz with a quick setup guide, can you write such a file for ejabberd?

Also if you have some pointers for pages with info on migrating a jabberd to ejabber server those would be nice.
Comment 11 Karl-Johan Karlsson 2005-04-06 00:03:24 UTC
Created attachment 55438 [details]
ejabberd-0.7.5.ebuild

Two changes from the one in the last tarball:
Use dohtml instead of dodoc to install HTML documentation.
Point the user to /usr/share/doc/${P}/html/guide.html for configuration
instructions.

I've tried finding information about how to migrate from jabberd 1.4 to
ejabberd, but can't find anything right now except that the ejabberd site
claims it is possible.
Comment 12 Karl-Johan Karlsson 2005-04-06 00:04:21 UTC
Created attachment 55439 [details]
files/ejabberd

Wrapper script for starting ejabberd.
Comment 13 Karl-Johan Karlsson 2005-04-06 00:05:18 UTC
Created attachment 55440 [details]
files/ejabberdctl

Wrapper script for running ejabberdctl.
Comment 14 Karl-Johan Karlsson 2005-04-06 00:05:44 UTC
Created attachment 55441 [details]
files/ejabberd-0.7.5.initd

init.d script.
Comment 15 Karl-Johan Karlsson 2005-04-06 00:06:13 UTC
Created attachment 55442 [details]
files/ejabberd-0.7.5.confd

conf.d file.
Comment 16 Karl-Johan Karlsson 2005-04-06 00:06:54 UTC
Created attachment 55443 [details]
files/inetrc

Configuration file that enables SRV lookups.
Comment 17 Gustavo Felisberto (RETIRED) gentoo-dev 2005-04-08 04:41:54 UTC
When building ejabberd i get ALOT of warnings about unused variables, is that normal?
Comment 18 Albert Holm 2005-04-08 04:48:49 UTC
Unfortunately that seems to be an upstream problem. Fortunately they are only warnings.
Comment 19 Gustavo Felisberto (RETIRED) gentoo-dev 2005-04-08 05:01:31 UTC
Created attachment 55656 [details, diff]
ejabberd-0.7.5.ebuild.diff

These are some cosmetic changes to the ebuild, namely use of fowners and not
chmod, a new SRC_URI and the users created, the group now is jabber (as the
other transports/servers) just a diferent user (but could probably be the
same).
Comment 20 Karl-Johan Karlsson 2005-04-08 09:23:59 UTC
I agree with your changes, except for one - why do you call the user "ejabber"? Either "ejabberd" (like the program) or "jabber" (like the protocol) is logical, but "ejabber" makes no sense.
Comment 21 Gustavo Felisberto (RETIRED) gentoo-dev 2005-04-08 13:28:14 UTC
I changed to ejabberd user and not the jabber that jabberd uses because of the diferent homes. It is in portage now. Lets see how it goes. I still have not tested it. erlang took some 3 hours or more to build on my server.
Comment 22 Karl-Johan Karlsson 2005-04-08 13:47:46 UTC
I forgot to mention that you need to change the group in the start() function of the init.d script as well. Now, it tries to run the server as ejabberd:ejabberd.
Comment 23 Max Loparev 2005-04-15 12:12:40 UTC
1. /var/log/ejabberd owned by root.root after install so ejabberd can't put logs in it

2. the most natural place for ejabberd beams and other binary parts is /usr/lib/erlang/lib/ejabberd-$version/beam
/usr/lib/erlang/lib/ejabberd-$version/ebin 
cause it is erlangs module
Comment 24 Igor Golubev 2005-04-16 03:25:03 UTC
Created attachment 56433 [details, diff]
fixes initial ebuild bugs

fixed ownership info for /var/run/ejabberd and /var/log/ejabberd
fixed permissions for /var/spool/ejabberd, which was world-readable
self-cert.sh now goes to /etc/ejabberd, as it was supposed by default
Comment 25 Igor Golubev 2005-04-16 05:34:15 UTC
Created attachment 56444 [details, diff]
fixes startup script

"log_path" parameter belongs to "-ejabberd", not to "-kernel". Otherwise there
will be no ejabberd.log in the system.
Comment 26 Max Loparev 2005-04-16 12:43:32 UTC
#! /bin/sh

umask 77
PEM1=`/bin/mktemp /tmp/openssl.XXXXXX`
PEM2=`/bin/mktemp /tmp/openssl.XXXXXX`
/usr/bin/openssl req -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2
cat $PEM1 >  $@
echo ""    >> $@ 
cat $PEM2 >> $@
rm $PEM1 $PEM2

this script generates self signed cert without asking for password which is not used anywhere
Comment 27 Igor Golubev 2005-04-16 14:08:27 UTC
Another variant of the script from previous comment:

#!/bin/sh
umask 77
PEM1=/tmp/pem1.$$
PEM2=/tmp/pem2.$$
trap "rm -f $PEM1 $PEM2" 0 1 2 3 15
/usr/bin/openssl req -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2
cat $PEM1 $PEM2 >
Comment 28 Igor Golubev 2005-04-16 14:08:27 UTC
Another variant of the script from previous comment:

#!/bin/sh
umask 77
PEM1=/tmp/pem1.$$
PEM2=/tmp/pem2.$$
trap "rm -f $PEM1 $PEM2" 0 1 2 3 15
/usr/bin/openssl req -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2
cat $PEM1 $PEM2 > $@
Comment 29 Stian B. Barmen 2005-04-21 05:54:38 UTC
Created attachment 56826 [details]
ebuild for new version ejabberd-0.9

I did some changes in the script. The .config could not find erlang so I needed
to add that to $myconf, plus I added an einfo if the user has the web use flag
turned off. I am somewhat unsure how smart it is to use all this useflags when
the default is off, many users will get problems I am afraid. 

The config and init files are the same, just copied them to -0.9 names from the
0.7.5 ones. 

This has been tested on three machines, all compiled and installed correctly.
Comment 30 Stian B. Barmen 2005-04-21 05:56:40 UTC
I forget, I also needed to alter the:

S=${WORKDIR}/${PN}/src

The old one used {P} but the tar dir did not include version number any more. :)
Comment 31 Stian B. Barmen 2005-04-21 05:57:29 UTC
Comment on attachment 56826 [details]
ebuild for new version ejabberd-0.9

># Copyright 1999-2005 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-0.7.5.ebuild,v 1.3 2005/04/16 14:00:58 humpback Exp $
>
>inherit eutils
>
>DESCRIPTION="The Erlang Jabber Daemon"
>HOMEPAGE="http://ejabberd.jabber.ru/"
>#Mirror from jabberstudio is a pain
>SRC_URI="http://www.process-one.net/en/projects/ejabberd/download/0.9/${P}.tar.gz"
>LICENSE="GPL-2"
>SLOT="0"
>KEYWORDS="~x86 ~amd64 ~sparc"
>IUSE="ldap ssl mod_pubsub mod_irc mod_muc web"
>
>DEPEND=">=dev-libs/expat-1.95
>		>=dev-lang/erlang-8b
>		ssl? ( >=dev-libs/openssl-0.9.6 )"
>PROVIDE="virtual/jabber-server"
>
>S=${WORKDIR}/${PN}/src
>
>src_compile() {
>	local myconf
>
>	use ldap || myconf="--disable-eldap"
>	use ssl || myconf="${myconf} --disable-tls"
>	use mod_pubsub || myconf="${myconf} --disable-mod_pubsub"
>	use mod_irc || myconf="${myconf} --disable-mod_irc"
>	use mod_muc || myconf="${myconf} --disable-mod_muc"
>	use web || myconf="${myconf} --disable-web"
>
>	# The ./config could not find erlang itself,
>	# so we help it a little.
>	myconf="${myconf} --with-erlang=/usr/bin"
>
>	echo $S
>	econf ${myconf} || die
>
>	emake || die "emake failed"
>}
>
>src_install() {
>	enewgroup jabber
>	enewuser ejabberd -1 /bin/false /var/run/ejabberd jabber
>
>	make DESTDIR=${D} install || die "install failed"
>
>	# This configuration file contains configurations for all modules,
>	# including ones that were potentially not built due to USE flags,
>	# so we'll have to move it out of the way so it isn't accidentally
>	# used.
>	mv ${D}/etc/ejabberd/ejabberd.cfg ${D}/etc/ejabberd/ejabberd.cfg.example
>
>	# Database
>	dodir /var/spool/ejabberd
>	fowners ejabberd:jabber /var/spool/ejabberd
>	fperms 700 /var/spool/ejabberd
>
>	# Home
>	dodir /var/run/ejabberd
>	fowners ejabberd:jabber /var/run/ejabberd
>
>	# Logs
>	dodir /var/log/ejabberd
>	fowners ejabberd:jabber /var/log/ejabberd
>
>	cd ..
>	dodoc doc/*.tex
>	dohtml doc/*.html
>	dohtml doc/*.png
>
>	dobin ${FILESDIR}/ejabberdctl
>	dobin ${FILESDIR}/ejabberd
>
>	exeinto /etc/init.d
>	newexe ${FILESDIR}/{P}.initd ejabberd
>	if use ssl ; then
>		exeinto /etc/ejabberd
>		doexe ${FILESDIR}/self-cert.sh
>	fi
>
>	insinto /etc/conf.d
>	newins ${FILESDIR}/{P}.confd ejabberd
>
>	# This file is required to make ejabberd use SRV records for
>	# server-to-server connections, according to
>	# <URL:http://lists.jabber.ru/pipermail/ejabberd/2005-March/000829.html>
>	insinto /etc/ejabberd
>	doins ${FILESDIR}/inetrc
>}
>
>pkg_postinst() {
>	if [ ! -e /etc/ejabberd/ejabberd.cfg ]
>	then
>		einfo "A sample configuration file has been installed in /etc/ejabberd/ejabberd.cfg.example."
>		einfo "Please copy it to /etc/ejabberd/ejabberd.cfg and edit it according to your needs."
>		einfo "For configuration instructions, please see /usr/share/doc/${P}/html/guide.html"
>	fi
>	if use ssl ; then
>		einfo "A script to generate a ssl key has been installed in"
>		einfo "/etc/ejabberd/self-cert.sh . Use it and change the config file to"
>		einfo "point to the full path"
>	fi
>	if use !web ; then
>		einfo "The web use flag is off, this will disable the web admin interface."
>	fi
>}
Comment 32 Stian B. Barmen 2005-04-21 05:57:54 UTC
Comment on attachment 56826 [details]
ebuild for new version ejabberd-0.9

># Copyright 1999-2005 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-0.7.5.ebuild,v 1.3 2005/04/16 14:00:58 humpback Exp $
>
>inherit eutils
>
>DESCRIPTION="The Erlang Jabber Daemon"
>HOMEPAGE="http://ejabberd.jabber.ru/"
>#Mirror from jabberstudio is a pain
>SRC_URI="http://www.process-one.net/en/projects/ejabberd/download/0.9/${P}.tar.gz"
>LICENSE="GPL-2"
>SLOT="0"
>KEYWORDS="~x86 ~amd64 ~sparc"
>IUSE="ldap ssl mod_pubsub mod_irc mod_muc web"
>
>DEPEND=">=dev-libs/expat-1.95
>		>=dev-lang/erlang-8b
>		ssl? ( >=dev-libs/openssl-0.9.6 )"
>PROVIDE="virtual/jabber-server"
>
>S=${WORKDIR}/${PN}/src
>
>src_compile() {
>	local myconf
>
>	use ldap || myconf="--disable-eldap"
>	use ssl || myconf="${myconf} --disable-tls"
>	use mod_pubsub || myconf="${myconf} --disable-mod_pubsub"
>	use mod_irc || myconf="${myconf} --disable-mod_irc"
>	use mod_muc || myconf="${myconf} --disable-mod_muc"
>	use web || myconf="${myconf} --disable-web"
>
>	# The ./config could not find erlang itself,
>	# so we help it a little.
>	myconf="${myconf} --with-erlang=/usr/bin"
>
>	echo $S
>	econf ${myconf} || die
>
>	emake || die "emake failed"
>}
>
>src_install() {
>	enewgroup jabber
>	enewuser ejabberd -1 /bin/false /var/run/ejabberd jabber
>
>	make DESTDIR=${D} install || die "install failed"
>
>	# This configuration file contains configurations for all modules,
>	# including ones that were potentially not built due to USE flags,
>	# so we'll have to move it out of the way so it isn't accidentally
>	# used.
>	mv ${D}/etc/ejabberd/ejabberd.cfg ${D}/etc/ejabberd/ejabberd.cfg.example
>
>	# Database
>	dodir /var/spool/ejabberd
>	fowners ejabberd:jabber /var/spool/ejabberd
>	fperms 700 /var/spool/ejabberd
>
>	# Home
>	dodir /var/run/ejabberd
>	fowners ejabberd:jabber /var/run/ejabberd
>
>	# Logs
>	dodir /var/log/ejabberd
>	fowners ejabberd:jabber /var/log/ejabberd
>
>	cd ..
>	dodoc doc/*.tex
>	dohtml doc/*.html
>	dohtml doc/*.png
>
>	dobin ${FILESDIR}/ejabberdctl
>	dobin ${FILESDIR}/ejabberd
>
>	exeinto /etc/init.d
>	newexe ${FILESDIR}/{P}.initd ejabberd
>	if use ssl ; then
>		exeinto /etc/ejabberd
>		doexe ${FILESDIR}/self-cert.sh
>	fi
>
>	insinto /etc/conf.d
>	newins ${FILESDIR}/{P}.confd ejabberd
>
>	# This file is required to make ejabberd use SRV records for
>	# server-to-server connections, according to
>	# <URL:http://lists.jabber.ru/pipermail/ejabberd/2005-March/000829.html>
>	insinto /etc/ejabberd
>	doins ${FILESDIR}/inetrc
>}
>
>pkg_postinst() {
>	if [ ! -e /etc/ejabberd/ejabberd.cfg ]
>	then
>		einfo "A sample configuration file has been installed in /etc/ejabberd/ejabberd.cfg.example."
>		einfo "Please copy it to /etc/ejabberd/ejabberd.cfg and edit it according to your needs."
>		einfo "For configuration instructions, please see /usr/share/doc/${P}/html/guide.html"
>	fi
>	if use ssl ; then
>		einfo "A script to generate a ssl key has been installed in"
>		einfo "/etc/ejabberd/self-cert.sh . Use it and change the config file to"
>		einfo "point to the full path"
>	fi
>	if use !web ; then
>		einfo "The web use flag is off, this will disable the web admin interface."
>	fi
>}
Comment 33 Stian B. Barmen 2005-04-21 06:01:25 UTC
Created attachment 56827 [details]
ejabberd-0.9.ebuild

Fixed a typo (in the Provide line there was a trailig r). 

Sorry about the two submits of the script into the comment. I thought I could
edit my attachment directly, but this was not the case. 

Again, very, very sorry!!
Comment 34 Igor Golubev 2005-04-21 16:24:49 UTC
Created attachment 56880 [details]
new ejabberd-0.9.ebuild

more sofisticated ebuild
Comment 35 Stian B. Barmen 2005-04-22 03:46:45 UTC
Comment on attachment 56827 [details]
ejabberd-0.9.ebuild

The new one is better, though, I might suggest a warning about the web and mod
use flags.
Comment 36 Igor Golubev 2005-04-22 04:01:48 UTC
Stian, I haven't seen your ebuild while I was working on mine. Really. Why not to implement your suggestions as a patch?
Comment 37 Stian B. Barmen 2005-04-22 05:11:46 UTC
Created attachment 56913 [details, diff]
Patch to add warning about web USE flah

Here it is, just print a nice warning about the use flag if it is off. This is
probably not intentionally turned off.
Comment 38 trejkaz 2005-04-27 02:42:27 UTC
I just discovered that the latest ebuild doesn't mark /var/run/ejabberd as a directory to be kept.  So if you have no files in that directory, it will be autodeleted by portage, and ejabberd will crash on startup.
Comment 39 trejkaz 2005-04-27 05:52:39 UTC
Also you need this:

exec env HOME=/var/run/ejabberd

At the front of /usr/bin/ejabberd as well as /usr/bin/ejabberdctl, otherwise ejabberdctl won't work at all.  The two need to be looking at the same home directory to pick up the .erlang.cookie file.

Now I just need to figure out why /etc/init.d/ejabberd start doesn't actually start the server, and I'm set. :-)
Comment 40 Stian B. Barmen 2005-04-27 06:39:14 UTC
do a "cat /usr/bin/ejabberd" and check that all of the dirs mentioned there has ejabberd:jabber rights (ownership) and that all the files exists.
Comment 41 trejkaz 2005-04-27 15:11:17 UTC
Aha.  The cookie file was the culprit. :-)

Though it would be good if a failure to start up would make the init script not think it started successfully, at least now it works.
Comment 42 Josu López Fernández 2005-04-28 07:46:22 UTC
I was having the same error of Trejkaz Xaoza. I checked the permissions of the the directorys and files and there are ok, I started the server but it fails to connect. Finally, I have changed the /etc/init.d/ejabberd script. I have commented the lines 24 and 25 and I have added this line below:
"start-stop-daemon --start --quiet --exec /bin/su - ejabberd -- -c "/usr/bin/ejabberd -noshell -detached""
Know it works fine for me.
Comment 43 Mark 2005-05-06 05:20:10 UTC
I cant seem to start ejabberd after it has been installed. /etc/init.d/ejabberd stop

=======================
 * Stopping eJabberd ...
Can't stop node ejabberd@localhost: nodedown   
=========================


Also trying to connect to http://127.0.0.1:5280/admin just results in the error "document returned no data"

There is nothing strange in the logs. In fact /var/log/ejabberd/ejabberd.log seems to show that the service is happily responding to connections.

Comment 44 Mark 2005-05-06 05:47:56 UTC
after installing ejabberd I get the following error when trying to su

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory


is this somehow related to ejaberd?
Comment 45 Mark 2005-05-07 11:04:38 UTC
ok  i tried to upgrade to 0.90. The ebuild seems to not install ejabberdctl or the startup script in the init directory.I copy over the script and ejabberd control from the files directory unser portage into the relevant places but ejabberd just crashes horribly on start up. 

I will add output later when I am back at the dev server.
Comment 46 trejkaz 2005-05-07 22:19:05 UTC
I got a lot of crashes on startup because the ebuild I had at the time didn't create all the directories, or created them with the wrong permissions.  Perhaps that's the same problem.
Comment 47 Vadigo 2005-05-31 01:09:41 UTC
erlang R9C can't load message translation file if it isn't ended by symbol "line
feed" (0x0a). 
Need to replace >=dev-lang/erlang-8b with >=dev-lang/erlang-10.2.0.
See http://ejabberd.jabber.ru/node/244 for details.
Comment 48 Stian B. Barmen 2005-06-01 04:09:33 UTC
Created attachment 60352 [details]
ejabberd-0.9.1.ebuild - new ejabberd version

This replaces the 0.9.0 ebuild. Has been tested on two machines and seems to
work for me. (biggest change is the erlang 10.2.0 dependency, it does not work
with R9 series, but supposedly R8 works says Aleksey, the developer).
Comment 49 Max Loparev 2005-06-05 03:23:48 UTC
we need to add cd $HOME in ejabberd before erl, if we want elr_crush.dump could
be created in some cases.
Comment 50 Makurin Roman 2005-06-09 15:02:31 UTC
I`ve got a problem with restart function in current ejabberd init script. It 
simply doesn`t work for me :( . But If I remove it and use standart restart 
(stop - start) it work for me. Also we need to cd /var/rub/ejabberd before 
start  
Comment 51 Karl-Johan Karlsson 2005-07-01 13:55:01 UTC
I have upgraded both my eJabberd servers to version 0.9.1 using the ebuild in 
comment #47 with the addition in comment #48, and they have been running fine 
for a few weeks. I still think automatic certificate generation is the Wrong 
Thing to do, but I guess I won't be changing anyone's mind about that right here 
and now.

So, I propose we (or, rather, someone with CVS commit access) do the following:

1) Add 0.9.1 from comment #47 with the addition from comment #48 to Portage. It 
works and is in production.

2) Remove the hard mask on net-im/ejabberd. People are obviously using it and I 
haven't seem any overwhelming storm of complaints, so I see no reason for it to 
be more heavily masked than ~ARCH.

3) Close this bug as RESOLVED, FIXED. The initial request was resolved several 
months ago, and new issues in new bugs make for a neat and tidy Bugzilla. And 
there are transports (PyICQ-t and PyMSN-t) that are waiting for this bug to be 
closed so they can depend on virtual/jabber-server.

Someone with too much free time should also start doing:

4) Go through all other Jabber-related programs in Portage and change their 
dependencies, both in ebuilds and init scripts, to the new virtuals.
Comment 52 Albert Holm 2005-07-02 04:10:43 UTC
I could not emerge the ebuild in comment #47 when I had userpriv and usersandbox 
or sandbox in FEATURES. Successful emerge when both sandbox features were 
removed. Similar problem with erlang-10.2.0, removing usersandbox made it 
emerge.
Comment 53 Albert Holm 2005-07-02 04:43:41 UTC
I should also mention that the sandbox log for ejabberd contains this when I 
fail:
access_wr: /usr/lib/erlang/lib/appmon-2.1.3/ebin
access_wr: /usr/lib/erlang/lib/asn1-1.4.4.3/ebin
access_wr: /usr/lib/erlang/lib/compiler-4.3/ebin
access_wr: /usr/lib/erlang/lib/cosEvent-2.1/ebin
access_wr: /usr/lib/erlang/lib/cosEventDomain-1.1/ebin
access_wr: /usr/lib/erlang/lib/cosFileTransfer-1.1.2/ebin
access_wr: /usr/lib/erlang/lib/cosNotification-1.1.1/ebin
access_wr: /usr/lib/erlang/lib/cosProperty-1.1.1/ebin
access_wr: /usr/lib/erlang/lib/cosTime-1.1/ebin
access_wr: /usr/lib/erlang/lib/cosTransactions-1.2/ebin
access_wr: /usr/lib/erlang/lib/crypto-1.2.1/ebin
access_wr: /usr/lib/erlang/lib/debugger-2.3/ebin
access_wr: /usr/lib/erlang/lib/edoc-0.1/ebin
access_wr: /usr/lib/erlang/lib/erl_interface-3.5
access_wr: /usr/lib/erlang/lib/et-1.0/ebin
access_wr: /usr/lib/erlang/lib/gs-1.5.3/ebin
access_wr: /usr/lib/erlang/lib/hipe-2.1.0/ebin
access_wr: /usr/lib/erlang/lib/ic-4.2.7/ebin
access_wr: /usr/lib/erlang/lib/inets-4.0/ebin
access_wr: /usr/lib/erlang/lib/kernel-2.10/ebin
access_wr: /usr/lib/erlang/lib/megaco-2.1.5/ebin
access_wr: /usr/lib/erlang/lib/mnemosyne-1.2.5/ebin
access_wr: /usr/lib/erlang/lib/mnesia-4.2/ebin
access_wr: /usr/lib/erlang/lib/mnesia_session-1.1.5/ebin
access_wr: /usr/lib/erlang/lib/observer-0.9.6/ebin
access_wr: /usr/lib/erlang/lib/orber-3.5.3/ebin
access_wr: /usr/lib/erlang/lib/os_mon-1.7/ebin
access_wr: /usr/lib/erlang/lib/otp_mibs-1.0.3/ebin
access_wr: /usr/lib/erlang/lib/parsetools-1.3/ebin
access_wr: /usr/lib/erlang/lib/pman-2.5/ebin
access_wr: /usr/lib/erlang/lib/runtime_tools-1.5/ebin
access_wr: /usr/lib/erlang/lib/sasl-2.0/ebin
access_wr: /usr/lib/erlang/lib/snmp-4.0/ebin
access_wr: /usr/lib/erlang/lib/ssl-3.0.4/ebin
access_wr: /usr/lib/erlang/lib/stdlib-1.13/ebin
access_wr: /usr/lib/erlang/lib/syntax_tools-0.1/ebin
access_wr: /usr/lib/erlang/lib/toolbar-1.2/ebin
access_wr: /usr/lib/erlang/lib/tools-2.4/ebin
access_wr: /usr/lib/erlang/lib/tv-2.1/ebin
access_wr: /usr/lib/erlang/lib/webtool-0.8.2/ebin
access_wr: /usr/lib/erlang/lib/xmerl-1.0/ebin
access_wr: /usr/lib/erlang/lib/kernel-2.10/ebin
access_wr: /usr/lib/erlang/lib/stdlib-1.13/ebin
access_wr: /usr/lib/erlang/lib/appmon-2.1.3/ebin
access_wr: /usr/lib/erlang/lib/asn1-1.4.4.3/ebin
access_wr: /usr/lib/erlang/lib/compiler-4.3/ebin
access_wr: /usr/lib/erlang/lib/cosEvent-2.1/ebin
access_wr: /usr/lib/erlang/lib/cosEventDomain-1.1/ebin
access_wr: /usr/lib/erlang/lib/cosFileTransfer-1.1.2/ebin
access_wr: /usr/lib/erlang/lib/cosNotification-1.1.1/ebin
access_wr: /usr/lib/erlang/lib/cosProperty-1.1.1/ebin
access_wr: /usr/lib/erlang/lib/cosTime-1.1/ebin
access_wr: /usr/lib/erlang/lib/cosTransactions-1.2/ebin
access_wr: /usr/lib/erlang/lib/crypto-1.2.1/ebin
access_wr: /usr/lib/erlang/lib/debugger-2.3/ebin
access_wr: /usr/lib/erlang/lib/edoc-0.1/ebin
access_wr: /usr/lib/erlang/lib/erl_interface-3.5
access_wr: /usr/lib/erlang/lib/et-1.0/ebin
access_wr: /usr/lib/erlang/lib/gs-1.5.3/ebin
access_wr: /usr/lib/erlang/lib/hipe-2.1.0/ebin
access_wr: /usr/lib/erlang/lib/ic-4.2.7/ebin
access_wr: /usr/lib/erlang/lib/inets-4.0/ebin
access_wr: /usr/lib/erlang/lib/kernel-2.10/ebin
access_wr: /usr/lib/erlang/lib/megaco-2.1.5/ebin
access_wr: /usr/lib/erlang/lib/mnemosyne-1.2.5/ebin
access_wr: /usr/lib/erlang/lib/mnesia-4.2/ebin
access_wr: /usr/lib/erlang/lib/mnesia_session-1.1.5/ebin
access_wr: /usr/lib/erlang/lib/observer-0.9.6/ebin
access_wr: /usr/lib/erlang/lib/orber-3.5.3/ebin
access_wr: /usr/lib/erlang/lib/os_mon-1.7/ebin
access_wr: /usr/lib/erlang/lib/otp_mibs-1.0.3/ebin
access_wr: /usr/lib/erlang/lib/parsetools-1.3/ebin
access_wr: /usr/lib/erlang/lib/pman-2.5/ebin
access_wr: /usr/lib/erlang/lib/runtime_tools-1.5/ebin
access_wr: /usr/lib/erlang/lib/sasl-2.0/ebin
access_wr: /usr/lib/erlang/lib/snmp-4.0/ebin
access_wr: /usr/lib/erlang/lib/ssl-3.0.4/ebin
access_wr: /usr/lib/erlang/lib/stdlib-1.13/ebin
access_wr: /usr/lib/erlang/lib/syntax_tools-0.1/ebin
access_wr: /usr/lib/erlang/lib/toolbar-1.2/ebin
access_wr: /usr/lib/erlang/lib/tools-2.4/ebin
access_wr: /usr/lib/erlang/lib/tv-2.1/ebin
access_wr: /usr/lib/erlang/lib/webtool-0.8.2/ebin
access_wr: /usr/lib/erlang/lib/xmerl-1.0/ebin
access_wr: /usr/lib/erlang/lib/kernel-2.10/ebin
access_wr: /usr/lib/erlang/lib/stdlib-1.13/ebin
access_wr: /usr/lib/erlang/lib/appmon-2.1.3/ebin
access_wr: /usr/lib/erlang/lib/asn1-1.4.4.3/ebin
access_wr: /usr/lib/erlang/lib/compiler-4.3/ebin
access_wr: /usr/lib/erlang/lib/cosEvent-2.1/ebin
access_wr: /usr/lib/erlang/lib/cosEventDomain-1.1/ebin
access_wr: /usr/lib/erlang/lib/cosFileTransfer-1.1.2/ebin
access_wr: /usr/lib/erlang/lib/cosNotification-1.1.1/ebin
access_wr: /usr/lib/erlang/lib/cosProperty-1.1.1/ebin
access_wr: /usr/lib/erlang/lib/cosTime-1.1/ebin
access_wr: /usr/lib/erlang/lib/cosTransactions-1.2/ebin
access_wr: /usr/lib/erlang/lib/crypto-1.2.1/ebin
access_wr: /usr/lib/erlang/lib/debugger-2.3/ebin
access_wr: /usr/lib/erlang/lib/edoc-0.1/ebin
access_wr: /usr/lib/erlang/lib/erl_interface-3.5
access_wr: /usr/lib/erlang/lib/et-1.0/ebin
access_wr: /usr/lib/erlang/lib/gs-1.5.3/ebin
access_wr: /usr/lib/erlang/lib/hipe-2.1.0/ebin
access_wr: /usr/lib/erlang/lib/ic-4.2.7/ebin
access_wr: /usr/lib/erlang/lib/inets-4.0/ebin
access_wr: /usr/lib/erlang/lib/kernel-2.10/ebin
access_wr: /usr/lib/erlang/lib/megaco-2.1.5/ebin
access_wr: /usr/lib/erlang/lib/mnemosyne-1.2.5/ebin
access_wr: /usr/lib/erlang/lib/mnesia-4.2/ebin
access_wr: /usr/lib/erlang/lib/mnesia_session-1.1.5/ebin
access_wr: /usr/lib/erlang/lib/observer-0.9.6/ebin
access_wr: /usr/lib/erlang/lib/orber-3.5.3/ebin
access_wr: /usr/lib/erlang/lib/os_mon-1.7/ebin
access_wr: /usr/lib/erlang/lib/otp_mibs-1.0.3/ebin
access_wr: /usr/lib/erlang/lib/parsetools-1.3/ebin
access_wr: /usr/lib/erlang/lib/pman-2.5/ebin
access_wr: /usr/lib/erlang/lib/runtime_tools-1.5/ebin
access_wr: /usr/lib/erlang/lib/sasl-2.0/ebin
access_wr: /usr/lib/erlang/lib/snmp-4.0/ebin
access_wr: /usr/lib/erlang/lib/ssl-3.0.4/ebin
access_wr: /usr/lib/erlang/lib/stdlib-1.13/ebin
access_wr: /usr/lib/erlang/lib/syntax_tools-0.1/ebin
access_wr: /usr/lib/erlang/lib/toolbar-1.2/ebin
access_wr: /usr/lib/erlang/lib/tools-2.4/ebin
access_wr: /usr/lib/erlang/lib/tv-2.1/ebin
access_wr: /usr/lib/erlang/lib/webtool-0.8.2/ebin
access_wr: /usr/lib/erlang/lib/xmerl-1.0/ebin
access_wr: /usr/lib/erlang/lib/kernel-2.10/ebin
access_wr: /usr/lib/erlang/lib/stdlib-1.13/ebin
Comment 54 Albert Holm 2005-07-03 07:43:07 UTC
Comment #52 is probably erlang and not ejabberd, see bug #97707. 
Comment 55 haeske 2005-07-22 21:53:31 UTC
Hi, I am new to Jabber in general and also ejabber. I am looking for an  
I.M.-Server, so I tried to install ejabber. Ok, the compilation works fine  
(after unmasken that stuff). But then I wanted to start ejabbern, and then I  
recognized that their is no init-script. I am not familiar with building  
ebuilds, so I would appreciate if someone could add it to the ebuild. So I  
started ejabberd like it is writen in the documentation. But it failed: 
  
=PROGRESS REPORT==== 23-Jul-2005::05:24:54 ===  
          supervisor: {local,ssl_sup}  
             started: [{pid,<0.108.0>},  
                       {name,ssl_broker_sup},  
                       {mfa,{ssl_broker_sup,start_link,[]}},  
                       {restart_type,permanent},  
                       {shutdown,2000},  
                       {child_type,supervisor}]  
  
=PROGRESS REPORT==== 23-Jul-2005::05:24:54 ===  
         application: ssl  
          started_at: 'ejabberd@aussenposten.haeske.selfhost.de'  
  
=ERROR REPORT==== 23-Jul-2005::05:24:55 ===  
E(<0.39.0>:ejabberd_config:58): Can't load config file "ejabberd.cfg": enoent  
  
=CRASH REPORT==== 23-Jul-2005::05:24:55 ===  
  crasher:  
    pid: <0.38.0>  
    registered_name: []  
    error_info: "invalid return value from ejabberd_app:start(normal,[]) ->  
{'EXIT',\"no such file or directory\"}"  
    initial_call: {application_master,init,  
                                     [<0.5.0>,  
                                      <0.37.0>,  
                                      {appl_data,  
                                          ejabberd,  
                                          [ejabberd,  
                                           ejabberd_sup,  
                                           ejabberd_auth,  
                                           ejabberd_router,  
                                           ejabberd_sm,  
                                           ejabberd_s2s,  
                                           ejabberd_local,  
                                           ejabberd_listeners,  
                                           ejabberd_iq_sup,  
                                           ejabberd_service_sup,  
                                           ejabberd_s2s_out_sup,  
                                           ejabberd_s2s_in_sup,  
                                           ejabberd_c2s_sup,  
                                           ejabberd_mod_roster,  
                                           ejabberd_mod_echo,  
                                           ejabberd_mod_pubsub,  
                                           ejabberd_mod_irc,  
                                           ejabberd_mod_muc,  
                                           ejabberd_offline,  
                                           random_generator],  
                                          undefined,  
                                          {ejabberd_app,[]},  
                                          [acl,  
                                           configure,  
                                           cyrsasl,  
                                           cyrsasl_digest,  
                                           cyrsasl_plain,  
                                           ejabberd,  
                                           ejabberd_app,  
                                           ejabberd_auth,  
                                           ejabberd_c2s,  
                                           ejabberd_config,  
                                           ejabberd_listener,  
                                           ejabberd_logger_h,  
                                           ejabberd_local,  
                                           ejabberd_router,  
                                           ejabberd_s2s,  
                                           ejabberd_s2s_in,  
                                           ejabberd_s2s_out,  
                                           ejabberd_service,  
                                           ejabberd_sm,  
                                           ejabberd_sup,  
                                           ejabberd_tmp_sup,  
                                           gen_iq_handler,  
                                           gen_mod,  
                                           jd2ejd,  
                                           jlib,  
                                           mod_configure,  
                                           mod_disco,  
                                           mod_echo,  
                                           mod_last,  
                                           mod_offline,  
                                           mod_private,  
                                           mod_register,  
                                           mod_roster,  
                                           mod_stats,  
                                           mod_time,  
                                           mod_vcard,  
                                           mod_version,  
                                           randoms,  
                                           sha,  
                                           shaper,  
                                           translate,  
                                           xml,  
                                           xml_stream],  
                                          [],  
                                          infinity,  
                                          infinity},  
                                      normal]}  
    ancestors: [<0.37.0>]  
    messages: [{'EXIT',<0.39.0>,normal}]  
    links: [<0.37.0>,<0.5.0>]  
    dictionary: []  
    trap_exit: true  
    status: running  
    heap_size: 987  
    stack_size: 21  
    reductions: 96  
  neighbours:  
  
=INFO REPORT==== 23-Jul-2005::05:24:55 ===  
    application: ejabberd  
    exited: "invalid return value from ejabberd_app:start(normal,[]) ->  
{'EXIT',\"no such file or directory\"}"  
    type: temporary  
  
I hope this error-print can help you.  
 
Ciao 
 
PS. The machine was completly fresh. 
Comment 56 Gustavo Felisberto (RETIRED) gentoo-dev 2005-07-25 18:13:01 UTC
(In reply to comment #54)
>  But then I wanted to start ejabbern, and then I  
> recognized that their is no init-script. I am not familiar with building  
> ebuilds, so I would appreciate if someone could add it to the ebuild. So I  
> started ejabberd like it is writen in the documentation. But it failed: 
> 

There is an init script :)
Comment 57 Makurin Roman 2005-08-03 04:30:39 UTC
The new version of ejabberd 0.9.8 has ben released :-)
Comment 58 Karl-Johan Karlsson 2005-08-03 13:05:21 UTC
I'm still waiting for net-im/jabber-base, as mentioned in bug 98452. Until then, 
I'd like to reiterate my requests from comment #50 that 0.9.1 be added to ~arch, 
the hard mask removed and this bug closed as resolved. We can then create a new 
bug for 0.9.8, which will depend on bug 98452. Bugzilla will be neat and tidy, 
and all will be well in the land.
Comment 59 Stian B. Barmen 2005-08-08 00:27:44 UTC
Started a new bug for the 0.9.8 version. 

http://bugs.gentoo.org/show_bug.cgi?id=101708

There is some sandbox issues so a little help resolving these would be nice,
other than that everything seems to work nicely. :)
Comment 60 Jakub Moc (RETIRED) gentoo-dev 2005-08-08 01:04:45 UTC
This bug should be CLOSED. 

Version bump request for ejabberd-0.9.8 is in Bug 101708, if you have issues
with the version in portage, try that one and post feedback there. This is a
mess leading to nowhere. 

Comment 61 Albert Holm 2005-08-08 02:38:46 UTC
I don't think this bug should be closed before the hard mask is resolved. The 
bug is untouched in portage for almost four months and untouched in package.mask 
for four months now and it has worked all that time.

Comment #57 describes how to proceed.
Comment 62 Gustavo Felisberto (RETIRED) gentoo-dev 2005-08-12 11:36:30 UTC
I'm returning from summer holidays, but still have alot of stuff from real life
pending. I'll be removing the mask on ejabberd and closing this one as noted in
comment 57.