One, I don't use ejabberd as much, so not sure if I make that good
maintainer, though I will try and keep taking care of it.

Here's an update to 2.1.10 - a bugfix release:
http://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.1.10

Update is pretty straightforward, also regenerated diffs.

Installing ejabberdctl mode 555 instead of default 550 (from a
discussion in their channel debian changes the mode to 555 too), because
that prevents us from starting it from rc script running as !root

Also an attempt at adding rc script to it, but it requires more work -
it starts, but when trying to stop I get 
=ERROR REPORT==== 2012-01-22 20:35:03 ===
** Connection attempt from disallowed node 'ctl-27-ejabberd@denpu' **

I need to research that more, or would appreciate someone else doing
that.

As usual available at https://github.com/jasperla/openbsd-wip
-- 
viq

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/ejabberd/Makefile,v
retrieving revision 1.27
diff -u -d -r1.27 Makefile
--- Makefile    22 Nov 2011 17:11:07 -0000      1.27
+++ Makefile    22 Jan 2012 19:24:14 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=               jabber server written in Erlang
 
-V=                     2.1.9
+V=                     2.1.10
 DISTNAME=              ejabberd-$V
 
 CATEGORIES=            net
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/ejabberd/distinfo,v
retrieving revision 1.10
diff -u -d -r1.10 distinfo
--- distinfo    22 Nov 2011 17:11:07 -0000      1.10
+++ distinfo    22 Jan 2012 19:24:14 -0000
@@ -1,5 +1,5 @@
-MD5 (ejabberd-2.1.9.tar.gz) = KcoU6mL5BzYyLk5nIDMTUg==
-RMD160 (ejabberd-2.1.9.tar.gz) = amQxpUmZ9cpAJz/vKJrn/ZsolHY=
-SHA1 (ejabberd-2.1.9.tar.gz) = f6/0JS6yoQwEbx5qL8sR/U9QDqg=
-SHA256 (ejabberd-2.1.9.tar.gz) = +X8tqtSX2dmXlFW2fOMeLdvTo81jipey4ddqash1h4E=
-SIZE (ejabberd-2.1.9.tar.gz) = 1872544
+MD5 (ejabberd-2.1.10.tar.gz) = cPDheYMRTGKJPkO27y6dDA==
+RMD160 (ejabberd-2.1.10.tar.gz) = cGmu64f9B0mIvGLLTomPe5IKs8A=
+SHA1 (ejabberd-2.1.10.tar.gz) = wRZKoA9ERcxGTMV6mGzyYHMVY1s=
+SHA256 (ejabberd-2.1.10.tar.gz) = ncLliJ6Rmn1R8rlbg9qDURZjHbgVUKEVwC5xkJrZMr4=
+SIZE (ejabberd-2.1.10.tar.gz) = 1942456
Index: patches/patch-src_Makefile_in
===================================================================
RCS file: /cvs/ports/net/ejabberd/patches/patch-src_Makefile_in,v
retrieving revision 1.2
diff -u -d -r1.2 patch-src_Makefile_in
--- patches/patch-src_Makefile_in       13 Sep 2010 17:17:06 -0000      1.2
+++ patches/patch-src_Makefile_in       22 Jan 2012 19:24:14 -0000
@@ -1,9 +1,10 @@
 No need to install release notes.
+ejabberdctl mode 550 is annoying, and debian doesn't do that either
 
 $OpenBSD: patch-src_Makefile_in,v 1.2 2010/09/13 17:17:06 sebastia Exp $
---- src/Makefile.in.orig       Mon Aug  2 18:33:20 2010
-+++ src/Makefile.in    Wed Aug 18 00:36:10 2010
-@@ -118,7 +118,7 @@ MSGSDIR = $(PRIVDIR)/msgs
+--- src/Makefile.in.orig       Fri Dec 23 12:27:30 2011
++++ src/Makefile.in    Sun Jan 22 20:22:08 2012
+@@ -124,7 +124,7 @@ MSGSDIR = $(PRIVDIR)/msgs
  SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
  
  # /var/lock/ejabberdctl
@@ -12,7 +13,16 @@
  
  # /var/lib/ejabberd/.erlang.cookie
  COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
-@@ -257,7 +257,6 @@ install: all
+@@ -202,7 +202,7 @@ install: all
+       #
+       # Administration script
+       [ -d $(SBINDIR) ] || install -d -m 755 $(SBINDIR)
+-      install -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
++      install -m 555 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
+       #
+       # Init script
+       sed -e "s*@ctlscriptpath@*$(SBINDIR)*" \
+@@ -264,7 +264,6 @@ install: all
        install -m 644 ../doc/dev.html $(DOCDIR)
        install -m 644 ../doc/guide.html $(DOCDIR)
        install -m 644 ../doc/*.png $(DOCDIR)
Index: patches/patch-src_ejabberd_cfg_example
===================================================================
RCS file: /cvs/ports/net/ejabberd/patches/patch-src_ejabberd_cfg_example,v
retrieving revision 1.4
diff -u -d -r1.4 patch-src_ejabberd_cfg_example
--- patches/patch-src_ejabberd_cfg_example      23 Dec 2010 22:54:39 -0000      
1.4
+++ patches/patch-src_ejabberd_cfg_example      22 Jan 2012 19:24:14 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_ejabberd_cfg_example,v 1.4 2010/12/23 22:54:39 jasper Exp $
---- src/ejabberd.cfg.example.orig      Fri Mar 12 11:40:41 2010
-+++ src/ejabberd.cfg.example   Sat Mar 13 12:41:08 2010
+--- src/ejabberd.cfg.example.orig      Fri Dec 23 12:27:30 2011
++++ src/ejabberd.cfg.example   Sun Jan 22 20:11:03 2012
 @@ -115,7 +115,7 @@
                        %% certificate, specify the full path to the
                        %% file and uncomment this line:
@@ -29,7 +29,7 @@
  
    {5269, ejabberd_s2s_in, [
                           {shaper, s2s_shaper},
-@@ -172,18 +172,18 @@
+@@ -173,18 +173,18 @@
  %% Allowed values are: false optional required required_trusted
  %% You must specify a certificate file.
  %%
Index: patches/patch-src_ejabberdctl_template
===================================================================
RCS file: /cvs/ports/net/ejabberd/patches/patch-src_ejabberdctl_template,v
retrieving revision 1.4
diff -u -d -r1.4 patch-src_ejabberdctl_template
--- patches/patch-src_ejabberdctl_template      13 Sep 2010 17:17:06 -0000      
1.4
+++ patches/patch-src_ejabberdctl_template      22 Jan 2012 19:24:14 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_ejabberdctl_template,v 1.4 2010/09/13 17:17:06 sebastia 
Exp $
---- src/ejabberdctl.template.orig      Mon Aug  2 18:33:20 2010
-+++ src/ejabberdctl.template   Wed Aug 18 00:30:24 2010
+--- src/ejabberdctl.template.orig      Fri Dec 23 12:27:30 2011
++++ src/ejabberdctl.template   Sun Jan 22 20:11:03 2012
 @@ -1,7 +1,7 @@
  #!/bin/sh
  
@@ -54,7 +54,7 @@
      fi
  done
  if [ "$ID" -eq "$EJID" ] ; then
-@@ -86,7 +86,7 @@ ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL
+@@ -88,7 +88,7 @@ ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL
  
  # define additional environment variables
  if [ "$EJABBERDDIR" = "" ]; then
@@ -63,16 +63,16 @@
  fi
  if [ "$EJABBERD_EBIN_PATH" = "" ]; then
      EJABBERD_EBIN_PATH=$EJABBERDDIR/ebin
-@@ -112,7 +112,7 @@ ERL_INETRC=$ETCDIR/inetrc
+@@ -114,7 +114,7 @@ ERL_INETRC=$ETCDIR/inetrc
  HOME=$SPOOLDIR
  
  # create the home dir with the proper user if doesn't exist, because it 
stores cookie file
 -[ -d $HOME ] || $EXEC_CMD "mkdir -p $HOME"
 +#[ -d $HOME ] || $EXEC_CMD "mkdir -p $HOME"
  
- # export global variables
- export EJABBERD_CONFIG_PATH
-@@ -237,7 +237,7 @@ ctl ()
+ # Change to a directory readable by INSTALLUSER to
+ # prevent "File operation error: eacces." messages
+@@ -244,7 +244,7 @@ ctl ()
      # using flock if available. Expects a linux-style
      # flock that can lock a file descriptor.
      MAXCONNID=100
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/ejabberd/pkg/PLIST,v
retrieving revision 1.10
diff -u -d -r1.10 PLIST
--- pkg/PLIST   22 Nov 2011 17:11:07 -0000      1.10
+++ pkg/PLIST   22 Jan 2012 19:24:14 -0000
@@ -49,6 +49,7 @@
 lib/ejabberd/ebin/ejabberd_piefxis.beam
 lib/ejabberd/ebin/ejabberd_rdbms.beam
 lib/ejabberd/ebin/ejabberd_receiver.beam
+lib/ejabberd/ebin/ejabberd_regexp.beam
 lib/ejabberd/ebin/ejabberd_router.beam
 lib/ejabberd/ebin/ejabberd_s2s.beam
 lib/ejabberd/ebin/ejabberd_s2s_in.beam
@@ -267,6 +268,7 @@
 share/examples/ejabberd/transport-configs/init-scripts/jit
 share/examples/ejabberd/transport-configs/init-scripts/msn-transport
 share/examples/ejabberd/transport-configs/init-scripts/yahoo-transport-2
+@rcscript ${RCDIR}/ejabberd
 @owner _ejabberd
 @group _ejabberd
 @sample /var/log/ejabberd/
Index: pkg/ejabberd.rc
===================================================================
RCS file: pkg/ejabberd.rc
diff -N pkg/ejabberd.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/ejabberd.rc     22 Jan 2012 19:24:14 -0000
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $OpenBSD: ejabberd.rc,v 1.3 2011/07/08 04:31:57 ajacoutot Exp $
+
+daemon="${TRUEPREFIX}/sbin/ejabberdctl"
+daemon_user="_ejabberd"
+daemon_flags="start"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_check() {
+       # return 1 is needed: ejabberdctl returns a higher error code on failure
+       ${TRUEPREFIX}/sbin/ejabberdctl status || return 1
+}
+
+rc_stop() {
+       ${TRUEPREFIX}/sbin/ejabberdctl stop
+}
+
+rc_cmd $1

Attachment: pgprtXzZmxxie.pgp
Description: PGP signature

Reply via email to