pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/39213: Update chat/mu-conference



>Number:         39213
>Category:       pkg
>Synopsis:       Update chat/mu-conference to 0.7.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 27 01:35:00 +0000 2008
>Originator:     Eric Schnoebelen
>Release:        NetBSD 4.99.55, NetBSD 4.0_STABLE
>Organization:
Central Iowa (Model) Railroad, Plano, TX, US
>Environment:
System: NetBSD tinker 4.99.55 NetBSD 4.99.55 (GENERIC) #5: Fri Mar 14 17:11:30 
CDT 2008 
eric%egsner.cirr.com@localhost:/work/eric/NetBSD-current/obj/amd64/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
(also tested/debugged on NetBSD/alpha 4.0_STABLE
>Description:
        chat/mu-conference-0.6.0 doesn't work with jabberd 2.1.23 (and probaly
        earlier editions.) 
>How-To-Repeat:
        Attempt to use mu-conference with a late model jabberd 2.x.
>Fix:
        I've updated the package to 0.7 in wip/mu-conference.

        Attached are the diffs between those revisions.

diff -buwr chat/mu-conference/Makefile wip/mu-conference/Makefile
--- chat/mu-conference/Makefile 2008-05-31 05:11:18.000000000 -0500
+++ wip/mu-conference/Makefile  2008-07-26 18:46:40.000000000 -0500
@@ -1,62 +1,61 @@
 # $NetBSD: Makefile,v 1.20 2008/05/26 02:13:16 joerg Exp $
 #
 
-DISTNAME=              mu-conference-0.6.0
-PKGREVISION=           6
+DISTNAME=              mu-conference_0.7
+PKGNAME=               ${DISTNAME:S/_/-/}
 CATEGORIES=            chat
-MASTER_SITES=          http://jabber.terrapin.com/JCR/ 
http://www.jabberstudio.org/projects/mu-conference/releases/download.php?file=
-DISTFILES=             ${DISTNAME}.tar.gz jcr-0.1.2.tar.gz
+MASTER_SITES=          http://download.gna.org/mu-conference/
 
-MAINTAINER=            abs%mono.org@localhost
-HOMEPAGE=              http://jabber.terrapin.com/JCR/
+MAINTAINER=            eric%cirr.com@localhost
+HOMEPAGE=              http://gna.org/projects/mu-conference/
 COMMENT=               Implementation of the JEP-0045 Multi-User Chat protocol
 
-DEPENDS+=              jabberd-[0-9]*:../../chat/jabberd2
-
 PKG_DESTDIR_SUPPORT=   user-destdir
 
-WRKSRC=                        ${WRKDIR}/jcr-0.1.2
-SUBWRKSRC=             ${WRKSRC}/${DISTNAME}/src
-XMLCONFIG=             ${WRKDIR}/${DISTNAME}/muc-jcr.xml
+WRKSRC=                        ${WRKDIR}/${DISTNAME}/src
 
-USE_TOOLS+=            gmake pax pkg-config
+USE_TOOLS+=            pkg-config
 
-PKG_SYSCONFSUBDIR=     jabberd
 RCD_SCRIPTS=           muc
 
+.include "../../wip/jabberd/transports.mk"
 .include "../../mk/bsd.prefs.mk"
 
-BUILD_DEFS+=           JABBERD_LOGDIR JABBERD_PIDDIR
-JABBERD_USER?=         jabberd
-PKG_USERS_VARS+=       JABBERD_USER
-
-FILES_SUBST+=          JABBERD_PIDDIR=${JABBERD_PIDDIR:Q}
-FILES_SUBST+=          JABBERD_USER=${JABBERD_USER:Q}
-
-EGDIR=                 ${PREFIX}/share/examples/jabberd
-CONF_FILES+=           ${EGDIR}/muc-jcr.xml ${PKG_SYSCONFDIR:Q}/muc-jcr.xml
-
-INSTALLATION_DIRS=     bin share/examples/jabberd
+BUILD_DEFS+=           JABBER_LOGDIR JABBER_PIDDIR
+PKG_USERS_VARS+=       JABBER_USER
 
-post-extract:
-       @${MV} ${XMLCONFIG:Q} ${XMLCONFIG:Q}.in
+FILES_SUBST+=          JABBER_PIDDIR=${JABBER_PIDDIR:Q}
+FILES_SUBST+=          JABBER_USER=${JABBER_USER:Q}
 
-pre-configure:
-       @${SED} -e 's|\(<logdir>\)[^<]*|\1${JABBERD_LOGDIR}|g' \
-               -e 's|\(<pidfile>\).|\1${JABBERD_PIDDIR}|g' \
-               -e 's|\(<spool>\).|\1${JABBERD_SPOOLDIR}|g' \
-               ${XMLCONFIG:Q}.in > ${XMLCONFIG:Q}
+EGDIR=                 ${PREFIX}/${JABBER_EXDIR}
+CONF_FILES+=           ${EGDIR}/muc-default.xml ${PKG_SYSCONFDIR:Q}/muc.xml
 
-pre-build:
-       cd ${WRKDIR:Q} && pax -rw -pe ${DISTNAME:Q} ${WRKSRC:Q}
+DOCDIR=                        ${PREFIX}/share/doc/muc
+DOCFILES=              ChangeLog README FAQ TODO XEP0045_SUPPORT
 
-post-build:
-       ${CP} ${WRKSRC:Q}/src/main.c ${WRKSRC:Q}/src/jcomp.mk ${SUBWRKSRC:Q}
-       cd ${SUBWRKSRC:Q} && ${SETENV} ${MAKE_ENV} ${GMAKE} -f jcomp.mk
+INSTALLATION_DIRS=     bin ${JABBER_EXDIR} share/doc/muc
 
 do-install:
-       ${INSTALL_PROGRAM} ${SUBWRKSRC:Q}/mu-conference ${DESTDIR}${PREFIX}/bin
-       ${INSTALL_DATA} ${WRKSRC:Q}/${DISTNAME:Q}/muc-jcr.xml ${DESTDIR}${EGDIR}
+       ${INSTALL_PROGRAM} ${WRKSRC:Q}/mu-conference ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_DATA} ${WRKSRC:Q}/../muc-default.xml \
+                                               ${DESTDIR}${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC:Q}/../style.css \
+                                               ${DESTDIR}${EGDIR}
+.for f in ${DOCFILES}
+       ${INSTALL_DATA} ${WRKSRC:Q}/../${f} ${DESTDIR}${DOCDIR}
+.endfor
+
+
+# clean up path info
+SUBST_CLASSES+=                paths
+SUBST_MESSAGE.paths=   Localizing Paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     ../muc-default.xml
+SUBST_SED.paths+=      -e 's,@JABBER_SPOOLDIR@,${JABBER_SPOOLDIR},g'
+SUBST_SED.paths+=      -e 's,@JABBER_LOGDIR@,${JABBER_LOGDIR},g'
+SUBST_SED.paths+=      -e 's,@JABBER_PIDDIR@,${JABBER_PIDDIR},g'
 
+.include "../../devel/libidn/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -buwr chat/mu-conference/PLIST wip/mu-conference/PLIST
--- chat/mu-conference/PLIST    2005-05-02 15:33:58.000000000 -0500
+++ wip/mu-conference/PLIST     2008-06-27 22:24:05.000000000 -0500
@@ -1,4 +1,11 @@
 @comment $NetBSD: PLIST,v 1.2 2005/05/02 20:33:58 reed Exp $
 bin/mu-conference
-share/examples/jabberd/muc-jcr.xml
+share/doc/muc/ChangeLog
+share/doc/muc/FAQ
+share/doc/muc/README
+share/doc/muc/TODO
+share/doc/muc/XEP0045_SUPPORT
+share/examples/jabber/muc-default.xml
+share/examples/jabber/style.css
 share/examples/rc.d/muc
+@dirrm share/doc/muc
diff -buwr chat/mu-conference/distinfo wip/mu-conference/distinfo
--- chat/mu-conference/distinfo 2005-02-23 09:59:12.000000000 -0600
+++ wip/mu-conference/distinfo  2008-07-26 18:56:11.000000000 -0500
@@ -1,10 +1,7 @@
 $NetBSD: distinfo,v 1.3 2005/02/23 15:59:12 agc Exp $
 
-SHA1 (mu-conference-0.6.0.tar.gz) = cc81619378a86c6c449c4122586c353102d4876e
-RMD160 (mu-conference-0.6.0.tar.gz) = 58b9bf9354a67dda3b8f5569dfb15f47d9509f14
-Size (mu-conference-0.6.0.tar.gz) = 56272 bytes
-SHA1 (jcr-0.1.2.tar.gz) = 057c4e2fb13148a105c8631cea211bdb9c28115b
-RMD160 (jcr-0.1.2.tar.gz) = 0436aa4aae26d4e87641133e409af3fb10116ec5
-Size (jcr-0.1.2.tar.gz) = 147439 bytes
-SHA1 (patch-aa) = 51cafdb9f8f8696788b82e506c297a0d8545f8eb
-SHA1 (patch-ab) = 9cd1511636302e71106199fc08497a300b03bc28
+SHA1 (mu-conference_0.7.tar.gz) = eb8e21f708587a02042f425a814db6fff6e0ba7e
+RMD160 (mu-conference_0.7.tar.gz) = 82a02434414ec3eb925959401b5c847912088e6b
+Size (mu-conference_0.7.tar.gz) = 112381 bytes
+SHA1 (patch-aa) = 2db01e45740e75a192b9f69f55c51107e2c09be6
+SHA1 (patch-ab) = e616b750127c68d7d64cc5294d83c0fc28a54c3e
diff -buwr chat/mu-conference/files/muc.sh wip/mu-conference/files/muc.sh
--- chat/mu-conference/files/muc.sh     2007-08-21 10:30:32.000000000 -0500
+++ wip/mu-conference/files/muc.sh      2008-06-27 22:34:47.000000000 -0500
@@ -12,18 +12,18 @@
 name="muc"
 rcvar=$name
 command="@PREFIX@/bin/mu-conference"
-required_files="@PKG_SYSCONFDIR@/${name}-jcr.xml"
+required_files="@PKG_SYSCONFDIR@/${name}.xml"
 extra_commands="reload"
-muc_user="@JABBERD_USER@"
+muc_user="@JABBER_USER@"
 command_args="-c ${required_files} > /dev/null 2>&1 &"
-pidfile="@JABBERD_PIDDIR@/`basename ${command}`.pid"
+pidfile="@JABBER_PIDDIR@/`basename ${command}`.pid"
 stop_postcmd="remove_pidfile"
 start_precmd="ensure_piddir"
 
 ensure_piddir()
 {
-       mkdir -p @JABBERD_PIDDIR@
-       chown @JABBERD_USER@ @JABBERD_PIDDIR@
+       mkdir -p @JABBER_PIDDIR@
+       chown @JABBER_USER@ @JABBER_PIDDIR@
 }
 
 remove_pidfile()
diff -buwr chat/mu-conference/patches/patch-aa 
wip/mu-conference/patches/patch-aa
--- chat/mu-conference/patches/patch-aa 2004-07-22 13:02:10.000000000 -0500
+++ wip/mu-conference/patches/patch-aa  2008-06-24 23:27:59.000000000 -0500
@@ -1,37 +1,48 @@
-$NetBSD: patch-aa,v 1.1 2004/07/22 18:02:10 kristerw Exp $
+$NetBSD$
 
---- src/main.c.orig    Thu Jul 22 19:54:54 2004
-+++ src/main.c Thu Jul 22 19:55:36 2004
-@@ -34,12 +34,12 @@
-   struct stat st;
-   char *config_file = NULL;
-   pool p;
--  jcr = (jcr_instance)malloc(sizeof(_jcr_instance));
- 
-   GThread       *dthread; /* the packet delivery thread */
-   GMainLoop     *gmain;   /* the receive packet event loop */
- 
- 
-+  jcr = (jcr_instance)malloc(sizeof(_jcr_instance));
-   fprintf(stderr, "%s -- %s\n%s\n\n", _JCOMP_NAME, _JCOMP_VERS, _JCOMP_COPY);
- 
-   while ((c = getopt(argc, argv, "Bsd:c:")) != EOF)
-@@ -119,6 +119,7 @@
- 
- 
-   if (inBackground == 1) {
-+    int fdlimit, fd;
-     if ((pid = fork()) == -1) {
-       fprintf(stderr, "%s: Could not start in background\n", JDBG);
-       exit(1);
-@@ -128,8 +129,8 @@
- 
-     /* in child process .... process and terminal housekeeping */
-     setsid();
--    int fdlimit = sysconf(_SC_OPEN_MAX);
--    int fd = 0;
-+    fdlimit = sysconf(_SC_OPEN_MAX);
-+    fd = 0;
-     while (fd < fdlimit)
-       close(fd++);
-     open("/dev/null",O_RDWR);
+--- Makefile.orig      2007-06-08 15:19:48.000000000 -0500
++++ Makefile
+@@ -1,8 +1,14 @@
+ 
+ CC:=gcc
++
++# MYSQL_CFLAGS:= -DHAVE_MYSQL
++# MYSQL_LIBS:=$(shell mysql_config --libs)
++# MYSQL_OBJS:= mysql.o
++
++
+ CFLAGS:=$(CFLAGS) -O2 -Wall -I../../lib -I../include `pkg-config --cflags 
glib-2.0` -D_JCOMP -D_REENTRANT -DLIBIDN
+ #CFLAGS:=$(CFLAGS) -O2 -Wall -I../../lib -I../include `pkg-config --cflags 
glib-2.0` -D_JCOMP -D_REENTRANT -DLIBIDN -DHAVE_MYSQL
+-LIBS:=$(LIBS) -ljcomp -lm `pkg-config --libs glib-2.0` `pkg-config --libs 
gthread-2.0` -lexpat -lidn `mysql_config --libs`
++LIBS:=$(LIBS) -ljcomp -lm `pkg-config --libs glib-2.0` `pkg-config --libs 
gthread-2.0` -lexpat -lidn $(MYSQL_LIBS)
+ LDFLAGS:=-L.
+ 
+ # Debug/Experimental
+@@ -11,7 +17,7 @@ LDFLAGS:=-L.
+ #LIBS:=$(LIBS) -lmemusage
+ #LIBS:=$(LIBS) -lmcheck
+ 
+-conference_OBJECTS=libjcomp.a conference.o conference_room.o 
conference_user.o utils.o xdata.o admin.o roles.o xdb.o hash.o iq.o main.o 
mysql.o 
++conference_OBJECTS=libjcomp.a conference.o conference_room.o 
conference_user.o utils.o xdata.o admin.o roles.o xdb.o hash.o iq.o main.o 
$(MYSQL_OBJS)
+ 
+ all: mu-conference
+ 
+@@ -19,8 +25,8 @@ mu-conference: $(conference_OBJECTS)
+       $(CC) $(CFLAGS) $(MCFLAGS) -o mu-conference $(conference_OBJECTS) 
$(LDFLAGS) $(LIBS)
+ 
+ libjcomp.a:
+-      cd jabberd ; make 
+-      cd jcomp ; make lib
++      cd jabberd ; $(MAKE) 
++      cd jcomp ; $(MAKE) lib
+ 
+ static: $(conference_OBJECTS)
+ 
+@@ -28,5 +34,5 @@ single: $(conference_OBJECTS)
+ 
+ clean:
+       rm -f $(conference_OBJECTS) mu-conference *~
+-      cd jcomp ; make clean
+-      cd jabberd ; make clean
++      cd jcomp ; $(MAKE) clean
++      cd jabberd ; $(MAKE) clean
diff -buwr chat/mu-conference/patches/patch-ab 
wip/mu-conference/patches/patch-ab
--- chat/mu-conference/patches/patch-ab 2004-07-22 13:02:10.000000000 -0500
+++ wip/mu-conference/patches/patch-ab  2008-07-26 18:56:08.000000000 -0500
@@ -1,44 +1,21 @@
-$NetBSD: patch-ab,v 1.1 2004/07/22 18:02:10 kristerw Exp $
+$NetBSD$
 
---- jcomp/jcr_elements.c.orig  Thu Jul 22 19:49:51 2004
-+++ jcomp/jcr_elements.c       Thu Jul 22 19:51:32 2004
-@@ -32,6 +32,8 @@
-     if (strncasecmp(name, "stream:stream", 13) == 0) {
-       char *pass = xmlnode_get_data(xmlnode_get_tag(jcr->config,"secret"));
-       int i = 0;
-+      char hashbuf[41];
-+      xmlnode cur;
-       if (attrib == NULL) return;
-       while (attrib[i] != '\0') {
-         if (strncasecmp(attrib[i], "id", 2) == 0)
-@@ -39,12 +41,11 @@
-         i += 2;
-       }
-       p = pool_new();
--      char hashbuf[41];
-       //    log_debug(JDBG, "%s = '%s'", attrib[i], attrib[i+1]);
-       shahash_r(spools(p, attrib[i + 1], pass, p), hashbuf);
+--- ../muc-default.xml.orig    2007-06-08 15:19:49.000000000 -0500
++++ ../muc-default.xml
+@@ -12,12 +12,12 @@
+   <name>conference.localhost</name> <!-- the jid of your component -->
+   <host>conference.localhost</host> <!-- this should be the same as above -->
+   <ip>localhost</ip> <!-- adress of the jabber server -->
+-  <port>7009</port>  <!-- port used to connect the service to the jabber 
server -->
++  <port>5347</port>  <!-- port used to connect the service to the jabber 
server -->
+   <secret>secret</secret> <!-- secret shared with the jabber server -->
  
-       /* Build a handshake packet */
--      xmlnode cur = xmlnode_new_tag("handshake");
-+      cur = xmlnode_new_tag("handshake");
-       xmlnode_insert_cdata(cur, hashbuf, -1);
+-  <spool>./spool/chat.localhost</spool> <!-- directory containing the rooms 
data -->
+-  <logdir>./syslogs</logdir> <!-- directory containing the debug log (the 
file is called mu-conference.log) -->
+-  <pidfile>./mu-conference.pid</pidfile> <!-- file that will contain the PID 
of the process -->
++  <spool>@JABBER_SPOOLDIR@/muc</spool> <!-- directory containing the rooms 
data -->
++  <logdir>@JABBER_LOGDIR@</logdir> <!-- directory containing the debug log 
(the file is called mu-conference.log) -->
++  <pidfile>@JABBER_PIDDIR@/mu-conference.pid</pidfile> <!-- file that will 
contain the PID of the process -->
  
-       /* Transmit handshake */
-@@ -91,6 +92,7 @@
-     if (jcr->current == NULL) {
-       g_io_channel_close(jcr->gio);
-     } else {
-+      xmlnode parent;
-       if (strncasecmp(name, "stream:error", 12) == 0) {
-         log_warn(JDBG, "%s", xmlnode2str(jcr->current));
-         g_io_channel_write_chars(jcr->gio, "</stream:stream>", 15, &bytes, 
NULL);
-@@ -100,7 +102,7 @@
-         break;
-       }
+   <!--   <logstderr/> --> <!-- uncomment to also send log to stderr -->
  
--      xmlnode parent = xmlnode_get_parent(jcr->current);
-+      parent = xmlnode_get_parent(jcr->current);
-       if (parent == NULL) {
-         x = xmlnode_dup(jcr->current);
-         to = jid_new(x->p, xmlnode_get_attrib(x, "to"));



Home | Main Index | Thread Index | Old Index