From shaun@inerd.com  Tue Apr 18 14:42:34 2006
Return-Path: <shaun@inerd.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 647D616A402
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Apr 2006 14:42:34 +0000 (UTC)
	(envelope-from shaun@inerd.com)
Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124])
	by mx1.FreeBSD.org (Postfix) with SMTP id 7E77E43D80
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Apr 2006 14:42:07 +0000 (GMT)
	(envelope-from shaun@inerd.com)
Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03])
	by dione.picobyte.net (Postfix) with ESMTP
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Apr 2006 15:42:04 +0100 (BST)
Message-Id: <1145371324.46960@charon.picobyte.net>
Date: Tue, 18 Apr 2006 15:42:04 +0100
From: Shaun Amott <shaun@inerd.com>
Reply-To: Shaun Amott <shaun@inerd.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         96001
>Category:       ports
>Synopsis:       [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 18 14:50:10 GMT 2006
>Closed-Date:    Tue Apr 25 17:52:01 GMT 2006
>Last-Modified:  Tue Apr 25 17:52:01 GMT 2006
>Originator:     Shaun Amott
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:

>Description:

- Fix ejabberd's rc script

  This is a tweaked version of the patch in ports/94163 (which can be closed,
  after this is applied)

  I believe this also fixes the problem reported in ports/91555, but the
  submitter hasn't replied yet.

- Pick another UID/GID as per ports/86197

  This pair should be reserved in the Porter's Handbook list. I have done a
  fairly thorough check of the ports tree and there doesn't appear to be
  anything else using the new UID/GID (544/544).

>How-To-Repeat:

>Fix:

--- ejabberd.diff begins here ---
diff -urN ejabberd.orig/Makefile ejabberd/Makefile
--- ejabberd.orig/Makefile	Sat Apr 15 21:31:54 2006
+++ ejabberd/Makefile	Tue Apr 18 15:13:55 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	ejabberd
 PORTVERSION=	1.0.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net-im
 MASTER_SITES=	http://www.jabber.ru/files/ejabberd/ \
 		http://www.process-one.net/en/projects/ejabberd/download/${PORTVERSION}/
diff -urN ejabberd.orig/files/ejabberd.sh.in ejabberd/files/ejabberd.sh.in
--- ejabberd.orig/files/ejabberd.sh.in	Sat Jan  7 06:29:54 2006
+++ ejabberd/files/ejabberd.sh.in	Tue Apr 18 15:12:10 2006
@@ -43,12 +43,7 @@
 ejabberd_start()
 {
     echo -n "Starting $name: "
-    if ejabberd_status; then
-	echo " already running."
-	exit 1
-    else
-	su $EJABBERDUSER -c "$EJABBERD -noshell -detached"
-    fi
+    su $EJABBERDUSER -c "$EJABBERD -s -noshell -detached"
     echo "$name."
 }
 
@@ -59,8 +54,8 @@
 	cnt=0
         while ejabberd_status; do
             cnt=`expr $cnt + 1`
-            if [ $cnt -gt 60 ]; then
-                echo -n " failed "
+            if [ $cnt -gt 6 ]; then
+                killall -u ejabberd -kill
                 break
             fi
             sleep 1
diff -urN ejabberd.orig/pkg-install ejabberd/pkg-install
--- ejabberd.orig/pkg-install	Sun Aug 28 16:51:47 2005
+++ ejabberd/pkg-install	Tue Apr 18 14:57:01 2006
@@ -6,7 +6,7 @@
 
 USER=ejabberd
 GROUP=${USER}
-UID=522
+UID=544
 GID=${UID}
 USERS_HOME="/var/spool/ejabberd"
 
--- ejabberd.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: garga 
Responsible-Changed-When: Mon Apr 24 10:50:08 UTC 2006 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96001 
State-Changed-From-To: open->feedback 
State-Changed-By: garga 
State-Changed-When: Mon Apr 24 10:50:38 UTC 2006 
State-Changed-Why:  
Ask about to use jabber user 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96001 

From: Renato Botelho <garga@FreeBSD.org>
To: bug-followup@FreeBSD.org,  shaun@inerd.com
Cc:  
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID,
 fix rc.d script
Date: Mon, 24 Apr 2006 07:46:23 -0300

 Hello,
 
 Don't you think a good idea to use jabber user? Like proposed on PR
 86197?
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

From: Shaun Amott <shaun@inerd.com>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
Date: Mon, 24 Apr 2006 15:59:22 +0100

 On Mon, Apr 24, 2006 at 07:46:23AM -0300, Renato Botelho wrote:
 > 
 > Don't you think a good idea to use jabber user? Like proposed on PR
 > 86197?
 > 
 
 Well, I considered this, but I thought it would be best to have two
 separate users. I was in fact running ejabberd and jabberd2 on the same
 machine at one point. Also, the 'killall -u' I added to the rc script
 might not be safe when using a shared username.
 
 I will leave the decision up to you - I am happy either way.
 
 -- 
 Shaun Amott [ PGP: 0x6B387A9A ]
     Scientia Est Potentia.

From: Renato Botelho <garga@FreeBSD.org>
To: Shaun Amott <shaun@inerd.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID,
 fix rc.d script
Date: Mon, 24 Apr 2006 12:34:49 -0300

 Em 24/4/2006 11:59 Shaun Amott escreveu:
 > On Mon, Apr 24, 2006 at 07:46:23AM -0300, Renato Botelho wrote:
 >> Don't you think a good idea to use jabber user? Like proposed on PR
 >> 86197?
 >>
 > 
 > Well, I considered this, but I thought it would be best to have two
 > separate users. I was in fact running ejabberd and jabberd2 on the same
 > machine at one point. Also, the 'killall -u' I added to the rc script
 > might not be safe when using a shared username.
 
 It makes sense, but just one more question. Isn't there another way
 to stop this instead a `killall -u USER`?
 
 Another point, applied rc.d script patch here, and after stop, it
 leaves one proccess running on the box:
 
 /usr/local/lib/erlang/erts-5.4.12/bin/epmd -daemon
 
 Is it correct?
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

From: Shaun Amott <shaun@inerd.com>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
Date: Mon, 24 Apr 2006 18:49:01 +0100

 On Mon, Apr 24, 2006 at 12:34:49PM -0300, Renato Botelho wrote:
 > 
 > Em 24/4/2006 11:59 Shaun Amott escreveu:
 > > On Mon, Apr 24, 2006 at 07:46:23AM -0300, Renato Botelho wrote:
 > >> Don't you think a good idea to use jabber user? Like proposed on PR
 > >> 86197?
 > >>
 > > 
 > > Well, I considered this, but I thought it would be best to have two
 > > separate users. I was in fact running ejabberd and jabberd2 on the same
 > > machine at one point. Also, the 'killall -u' I added to the rc script
 > > might not be safe when using a shared username.
 > 
 > It makes sense, but just one more question. Isn't there another way
 > to stop this instead a `killall -u USER`?
 > 
 
 I'm not sure if ejabberd/erlang records the PIDs anywhere, and I think
 different processes are spawned depending on ejabberd.cfg. Also, epmd
 and ssl_esock are just erlang modules, not necessarily running ejabberd.
 I can't think of any other way, besides using killall.
 
 > Another point, applied rc.d script patch here, and after stop, it
 > leaves one proccess running on the box:
 > 
 > /usr/local/lib/erlang/erts-5.4.12/bin/epmd -daemon
 > 
 > Is it correct?
 > 
 
 No, epmd needs to be stopped too, as far as I know.
 
 There seems to be a problem elsewhere, because ejabberdctl is not
 returning the correct status of ejabberd.
 
 Perhaps ejabberd_stop() in the rc.d script should be changed to this
 instead:
 
 ejabberd_stop()
 {
     echo -n "Stopping $name: "
     if su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` stop"; then
         sleep 2
         killall -u ejabberd -kill
     else
         echo -n " failed "
     fi
     echo "$name."
 }
 
 
 -- 
 Shaun Amott [ PGP: 0x6B387A9A ]
     Scientia Est Potentia.

From: Renato Botelho <garga@FreeBSD.org>
To: Shaun Amott <shaun@inerd.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID,
 fix rc.d script
Date: Mon, 24 Apr 2006 16:18:13 -0300

 Em 24/4/2006 14:49 Shaun Amott escreveu:
 > On Mon, Apr 24, 2006 at 12:34:49PM -0300, Renato Botelho wrote:
 >> Em 24/4/2006 11:59 Shaun Amott escreveu:
 >>> On Mon, Apr 24, 2006 at 07:46:23AM -0300, Renato Botelho wrote:
 >>>> Don't you think a good idea to use jabber user? Like proposed on PR
 >>>> 86197?
 >>>>
 >>> Well, I considered this, but I thought it would be best to have two
 >>> separate users. I was in fact running ejabberd and jabberd2 on the same
 >>> machine at one point. Also, the 'killall -u' I added to the rc script
 >>> might not be safe when using a shared username.
 >> It makes sense, but just one more question. Isn't there another way
 >> to stop this instead a `killall -u USER`?
 >>
 > 
 > I'm not sure if ejabberd/erlang records the PIDs anywhere, and I think
 > different processes are spawned depending on ejabberd.cfg. Also, epmd
 > and ssl_esock are just erlang modules, not necessarily running ejabberd.
 > I can't think of any other way, besides using killall.
 > 
 >> Another point, applied rc.d script patch here, and after stop, it
 >> leaves one proccess running on the box:
 >>
 >> /usr/local/lib/erlang/erts-5.4.12/bin/epmd -daemon
 >>
 >> Is it correct?
 >>
 > 
 > No, epmd needs to be stopped too, as far as I know.
 > 
 > There seems to be a problem elsewhere, because ejabberdctl is not
 > returning the correct status of ejabberd.
 > 
 > Perhaps ejabberd_stop() in the rc.d script should be changed to this
 > instead:
 > 
 > ejabberd_stop()
 > {
 >     echo -n "Stopping $name: "
 >     if su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` stop"; then
 >         sleep 2
 >         killall -u ejabberd -kill
 >     else
 >         echo -n " failed "
 >     fi
 >     echo "$name."
 > }
 
 Worked fine here. Could you please just prepare a text to add in
 ports/UPDATING notifying users about change ejabberd user and group?
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

From: Shaun Amott <shaun@inerd.com>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
Date: Mon, 24 Apr 2006 22:59:50 +0100

 On Mon, Apr 24, 2006 at 04:18:13PM -0300, Renato Botelho wrote:
 > 
 > Worked fine here. Could you please just prepare a text to add in
 > ports/UPDATING notifying users about change ejabberd user and group?
 > 
 
 20060424:
   AFFECTS: Users of net-im/ejabberd
   AUTHOR: shaun@inerd.com
 
   ejabberd's UID and GID have changed. Users are advised to check all
   configuration files and data in /var/spool/ejabberd to ensure
   everything has the correct owner/group.
 
 -- 
 Shaun Amott [ PGP: 0x6B387A9A ]
     Scientia Est Potentia.

From: Renato Botelho <garga@FreeBSD.org>
To: shaun@inerd.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
Date: Tue, 25 Apr 2006 08:15:42 -0300

 Since I'm here, I made a patch to update ejabberd to 1.1.0. Could you ate a
 look and tell me if you approve this?
 
 Thanks
 
 ----------------- ejabberd.diff starts here -------------------
 Index: Makefile
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/Makefile,v
 retrieving revision 1.15
 diff -u -r1.15 Makefile
 --- Makefile	15 Apr 2006 06:51:44 -0000	1.15
 +++ Makefile	25 Apr 2006 11:13:50 -0000
 @@ -6,11 +6,9 @@
  #
  
  PORTNAME=	ejabberd
 -PORTVERSION=	1.0.0
 -PORTREVISION=	2
 +PORTVERSION=	1.1.0
  CATEGORIES=	net-im
 -MASTER_SITES=	http://www.jabber.ru/files/ejabberd/ \
 -		http://www.process-one.net/en/projects/ejabberd/download/${PORTVERSION}/
 +MASTER_SITES=	http://www.process-one.net/en/projects/ejabberd/download/${PORTVERSION}/
  
  MAINTAINER=	shaun@inerd.com
  COMMENT=	Free and Open Source distributed fault-tolerant Jabber server
 Index: distinfo
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/distinfo,v
 retrieving revision 1.7
 diff -u -r1.7 distinfo
 --- distinfo	7 Jan 2006 07:39:50 -0000	1.7
 +++ distinfo	25 Apr 2006 11:13:50 -0000
 @@ -1,3 +1,3 @@
 -MD5 (ejabberd-1.0.0.tar.gz) = bc0bfdad2e5e48e42fcc5d09384be74f
 -SHA256 (ejabberd-1.0.0.tar.gz) = 5893fe92665fde5ad7af97c8974d39c07a3b36483be35b1f5b6d3f4ec3b6cbb4
 -SIZE (ejabberd-1.0.0.tar.gz) = 726315
 +MD5 (ejabberd-1.1.0.tar.gz) = abd310557da32e520c4a3d4f3c97aab1
 +SHA256 (ejabberd-1.1.0.tar.gz) = 4c317323eb826ad92fae3b349ea340a931c006cc01f1d8db0cbe19ed324b2593
 +SIZE (ejabberd-1.1.0.tar.gz) = 801984
 Index: pkg-install
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/pkg-install,v
 retrieving revision 1.3
 diff -u -r1.3 pkg-install
 --- pkg-install	28 Aug 2005 15:51:47 -0000	1.3
 +++ pkg-install	25 Apr 2006 11:13:50 -0000
 @@ -6,7 +6,7 @@
  
  USER=ejabberd
  GROUP=${USER}
 -UID=522
 +UID=544
  GID=${UID}
  USERS_HOME="/var/spool/ejabberd"
  
 Index: pkg-plist
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/pkg-plist,v
 retrieving revision 1.7
 diff -u -r1.7 pkg-plist
 --- pkg-plist	7 Jan 2006 07:39:50 -0000	1.7
 +++ pkg-plist	25 Apr 2006 11:13:50 -0000
 @@ -11,6 +11,7 @@
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_app.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_auth.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_auth_anonymous.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_auth_external.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_auth_internal.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_auth_ldap.beam
 @@ -33,12 +34,16 @@
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_sm.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_sup.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_tmp_sup.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_update.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_web.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_web_admin.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/%%PORTNAME%%_zlib.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/ELDAPv3.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/XmppAddr.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/acl.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/adhoc.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/cyrsasl.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/cyrsasl_anonymous.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/cyrsasl_digest.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/cyrsasl_plain.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/ejd2odbc.beam
 @@ -50,6 +55,7 @@
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/idna.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/jd2ejd.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/jlib.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_adhoc.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_announce.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_configure.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_configure2.beam
 @@ -60,6 +66,7 @@
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_last.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_last_odbc.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_muc.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_muc_log.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_muc_room.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_offline.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/mod_offline_odbc.beam
 @@ -85,6 +92,7 @@
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/translate.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/xml.beam
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/ebin/xml_stream.beam
 +lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/lib/%%PORTNAME%%_zlib_drv.so
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/lib/expat_erl.so
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/lib/iconv_erl.so
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/lib/stringprep_drv.so
 @@ -100,14 +108,15 @@
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/msgs/sv.msg
  lib/erlang/lib/%%PORTNAME%%-%%PORTVERSION%%/priv/msgs/uk.msg
  %%PORTDOCS%%%%DOCSDIR%%/Makefile
 -%%PORTDOCS%%%%DOCSDIR%%/dev.html
  %%PORTDOCS%%%%DOCSDIR%%/dev.tex
  %%PORTDOCS%%%%DOCSDIR%%/disco.png
  %%PORTDOCS%%%%DOCSDIR%%/discorus.png
  %%PORTDOCS%%%%DOCSDIR%%/features.tex
 +%%PORTDOCS%%%%DOCSDIR%%/features2.tex
  %%PORTDOCS%%%%DOCSDIR%%/flow.dot
  %%PORTDOCS%%%%DOCSDIR%%/guide.html
  %%PORTDOCS%%%%DOCSDIR%%/guide.tex
 +%%PORTDOCS%%%%DOCSDIR%%/guide.tex.flc
  %%PORTDOCS%%%%DOCSDIR%%/hevea.sty
  %%PORTDOCS%%%%DOCSDIR%%/introduction.tex
  %%PORTDOCS%%%%DOCSDIR%%/logo.png
 @@ -115,6 +124,7 @@
  %%PORTDOCS%%%%DOCSDIR%%/release_notes_0.9.1.txt
  %%PORTDOCS%%%%DOCSDIR%%/release_notes_0.9.8.txt
  %%PORTDOCS%%%%DOCSDIR%%/release_notes_0.9.txt
 +%%PORTDOCS%%%%DOCSDIR%%/release_notes_1.0.0.txt
  %%PORTDOCS%%%%DOCSDIR%%/version.tex
  %%PORTDOCS%%%%DOCSDIR%%/webadmmain.png
  %%PORTDOCS%%%%DOCSDIR%%/webadmmainru.png
 Index: files/ejabberd.sh.in
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/files/ejabberd.sh.in,v
 retrieving revision 1.2
 diff -u -r1.2 ejabberd.sh.in
 --- files/ejabberd.sh.in	7 Jan 2006 06:29:54 -0000	1.2
 +++ files/ejabberd.sh.in	25 Apr 2006 11:13:50 -0000
 @@ -43,12 +43,7 @@
  ejabberd_start()
  {
      echo -n "Starting $name: "
 -    if ejabberd_status; then
 -	echo " already running."
 -	exit 1
 -    else
 -	su $EJABBERDUSER -c "$EJABBERD -noshell -detached"
 -    fi
 +    su $EJABBERDUSER -c "$EJABBERD -s -noshell -detached"
      echo "$name."
  }
  
 @@ -56,16 +51,8 @@
  {
      echo -n "Stopping $name: "
      if su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` stop"; then
 -	cnt=0
 -        while ejabberd_status; do
 -            cnt=`expr $cnt + 1`
 -            if [ $cnt -gt 60 ]; then
 -                echo -n " failed "
 -                break
 -            fi
 -            sleep 1
 -            echo -n "."
 -        done
 +        sleep 2
 +        killall -u ejabberd -kill
      else
          echo -n " failed "
      fi
 Index: files/patch-src-Makefile.in
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/files/patch-src-Makefile.in,v
 retrieving revision 1.2
 diff -u -r1.2 patch-src-Makefile.in
 --- files/patch-src-Makefile.in	28 Aug 2005 15:51:48 -0000	1.2
 +++ files/patch-src-Makefile.in	25 Apr 2006 11:13:50 -0000
 @@ -1,24 +1,27 @@
 ---- Makefile.in.orig	Tue May 24 01:52:43 2005
 -+++ Makefile.in	Wed Jul 13 11:09:49 2005
 -@@ -17,14 +17,14 @@
 - SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @eldap@ @web@ stringprep @tls@ @odbc@
 - ERLSHLIBS = expat_erl.so
 +--- Makefile.in.orig	Sat Apr  1 13:06:36 2006
 ++++ Makefile.in	Tue Apr 25 07:43:19 2006
 +@@ -32,15 +32,15 @@
 + SOURCES = $(wildcard *.erl)
 + BEAMS = $(SOURCES:.erl=.beam)
   
 --DESTDIR =
 +-DESTDIR = 
 +-
 +-EJABBERDDIR = $(DESTDIR)@prefix@/var/lib/ejabberd
  +DESTDIR = @prefix@
 - 
 --EJABBERDDIR = $(DESTDIR)/var/lib/ejabberd
 ++  
  +EJABBERDDIR = $(DESTDIR)/lib/erlang/lib/ejabberd-$(PORTVERSION)
   BEAMDIR = $(EJABBERDDIR)/ebin
   PRIVDIR = $(EJABBERDDIR)/priv
   SODIR = $(PRIVDIR)/lib
   MSGSDIR = $(PRIVDIR)/msgs
 --LOGDIR = $(DESTDIR)/var/log/ejabberd
 +-LOGDIR = $(DESTDIR)@prefix@/var/log/ejabberd
 +-ETCDIR = $(DESTDIR)@prefix@/etc/ejabberd
  +LOGDIR = /var/log/ejabberd
 - ETCDIR = $(DESTDIR)/etc/ejabberd
 ++ETCDIR = $(DESTDIR)/etc/ejabberd
 + 
 + ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
   
 - all: $(ERLSHLIBS) compile-beam all-recursive
 -@@ -60,7 +60,7 @@
 +@@ -82,7 +82,7 @@
   	install -d $(MSGSDIR)
   	install -m 644 msgs/*.msg $(MSGSDIR)
   	install -d $(ETCDIR)
 Index: files/patch-src::configure
 ===================================================================
 RCS file: /home/pcvs/ports/net-im/ejabberd/files/patch-src::configure,v
 retrieving revision 1.1
 diff -u -r1.1 patch-src::configure
 --- files/patch-src::configure	19 Aug 2004 10:11:13 -0000	1.1
 +++ files/patch-src::configure	25 Apr 2006 11:13:50 -0000
 @@ -1,10 +1,10 @@
 ---- configure.orig	Sat Jul  3 14:58:07 2004
 -+++ configure	Sat Jul  3 15:01:49 2004
 -@@ -2180,7 +2180,7 @@
 +--- configure.orig	Sun Apr 23 16:06:17 2006
 ++++ configure	Tue Apr 25 07:15:42 2006
 +@@ -2471,7 +2471,7 @@
   fi
   
   
 --   if test "z$ERLC" == "z" || test "z$ERL" == "z"; then
 +-   if test "z$ERLC" = "z" || test "z$ERL" = "z"; then
  +   if test -z "$ERLC" || test -z "$ERL"; then
      		{ { echo "$as_me:$LINENO: error: erlang not found" >&5
   echo "$as_me: error: erlang not found" >&2;}
 ----------------- ejabberd.diff ends here -------------------
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
 
 The Army needs leaders the way a foot needs a big toe.
 		-- Bill Murray

From: Shaun Amott <shaun@inerd.com>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/96001: [MAINTAINER] net-im/ejabberd - select new UID/GID, fix rc.d script
Date: Tue, 25 Apr 2006 17:49:57 +0100

 On Tue, Apr 25, 2006 at 08:15:42AM -0300, Renato Botelho wrote:
 > 
 > Since I'm here, I made a patch to update ejabberd to 1.1.0. Could you ate a
 > look and tell me if you approve this?
 > 
 
 Tested and approved... with one minor adjustment:
 
   @dirrm etc/%%PORTNAME%%
 
 in pkg-plist should be:
 
   @dirrmtry etc/%%PORTNAME%%
 
 Thanks!
 
 -- 
 Shaun Amott [ PGP: 0x6B387A9A ]
     Scientia Est Potentia.
State-Changed-From-To: feedback->closed 
State-Changed-By: garga 
State-Changed-When: Tue Apr 25 17:51:38 UTC 2006 
State-Changed-Why:  
Committed, and registered uid and gid on Porters Handbook 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96001 
>Unformatted:
