Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2004 00:00:34 -0800 (PST)
From:      "Andrew A. Khlebutin" <andreyh@perm.ru>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   ports/61693: net/jabber port update to 1.4.3 version
Message-ID:  <200401220800.i0M80YR5036674@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/61693; it has been noted by GNATS.

From: "Andrew A. Khlebutin" <andreyh@perm.ru>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Pav Lucistnik <pav@oook.cz>
Subject: ports/61693: net/jabber port update to 1.4.3 version
Date: Thu, 22 Jan 2004 12:52:23 +0500

 diff -ruN jabber.orig/Makefile jabber/Makefile
 --- jabber.orig/Makefile        Fri Mar  7 11:07:47 2003
 +++ jabber/Makefile     Wed Jan 21 16:54:59 2004
 @@ -2,14 +2,13 @@
  # Date created:                        5 February 2001
  # Whom:                                joe
  #
 -# $FreeBSD: ports/net/jabber/Makefile,v 1.17 2003/03/07 06:07:47 ade Exp $
 +# $FreeBSD$
  #
  
 -PORTNAME=      jabber
 -PORTVERSION=   1.4.2
 +PORTNAME=      jabberd
 +PORTVERSION=   1.4.3
  CATEGORIES=    net
 -MASTER_SITES=  http://jabberd.jabberstudio.org/downloads/ \
 -               http://download.jabber.org/dists/1.4/final/
 +MASTER_SITES=  http://jabberd.jabberstudio.org/1.4/dist/
  DISTNAME=      ${PORTNAME}-${PORTVERSION}
  DIST_SUBDIR=   jabber
  
 @@ -21,6 +20,8 @@
  USE_OPENSSL=   yes
  USE_PERL5=     yes
  
 +LIB_DEPENDS=    pth.20:${PORTSDIR}/devel/pth
 +
  CONFIGURE_ARGS+=       --enable-ssl
  
  rc=${PREFIX}/etc/rc.d
 @@ -37,6 +38,13 @@
  
  post-install:
         @PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 -       ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${rc}
 +       ${INSTALL_DATA} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh-dist
 +       @if [ ! -f ${PREFIX}/etc/rc.d/jabberd.sh ]; then \
 +               ${ECHO} "Installing ${PREFIX}/etc/rc.d/jabberd.sh startup file."; \
 +               ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh; \
 +       fi
 +       @${CHOWN} -R jabber:jabber ${PREFIX}/etc/jabberd
 +       @${FIND} ${PREFIX}/etc/jabberd -type d | ${XARGS} ${CHMOD} 750
 +       @${FIND} ${PREFIX}/etc/jabberd -type f | ${XARGS} ${CHMOD} 660
  
  .include <bsd.port.mk>
 diff -ruN jabber.orig/distinfo jabber/distinfo
 --- jabber.orig/distinfo        Thu Apr 18 22:12:04 2002
 +++ jabber/distinfo     Wed Jan 21 09:44:06 2004
 @@ -1 +1 @@
 -MD5 (jabber/jabber-1.4.2.tar.gz) = 10780dbdb93926ea5bb360e1186b939c
 +MD5 (jabber/jabberd-1.4.3.tar.gz) = a3e964d6fa07b5d850302ae0512f94c6
 diff -ruN jabber.orig/files/jabberd.sh jabber/files/jabberd.sh
 --- jabber.orig/files/jabberd.sh        Sat Apr 27 00:52:12 2002
 +++ jabber/files/jabberd.sh     Wed Jan 21 21:53:08 2004
 @@ -6,22 +6,29 @@
  fi
  
  USER="jabber"
 -RUNDIR="/var/tmp"
 -HOSTNAME=`/bin/hostname`
 -
 -test -x ${PREFIX}/sbin/jabberd || exit 1
 +RUNDIR="/var/jabberd/pid"
  
  export PATH=/sbin:/bin:/usr/bin:${PREFIX}/bin:${PREFIX}/sbin
  umask 077
  
 -echo -n " jabberd "
  cd ${RUNDIR} || exit
  
 +test -x ${PREFIX}/sbin/jabberd || exit 1
 +
  case ${1:-start} in
  start)
 -    su -f -m ${USER} -c "jabberd -B -h ${HOSTNAME} -c ${PREFIX}/etc/jabber.xml" ;;
 +    su -f -m ${USER} -c "jabberd -B -H ${RUNDIR} -c ${PREFIX}/etc/jabberd/jabber.xml" &
 +    echo -n ' jabberd'
 +    ;;
  
  stop)
 -    killall -SIGKILL -u ${USER} jabberd;
 -    rm -f ${RUNDIR}/jabber.pid;
 +    kill -SIGKILL `cat ${RUNDIR}/jabberd.pid`;
 +    rm -f ${RUNDIR}/jabberd.pid;
 +    echo -n ' jabberd'
 +    ;;
 +*)
 +    echo "Usage: `basename $0` {start|stop}" >&2
 +    ;;
  esac
 +
 +exit 0
 diff -ruN jabber.orig/files/patch-aa jabber/files/patch-aa
 --- jabber.orig/files/patch-aa  Thu Apr 18 22:12:04 2002
 +++ jabber/files/patch-aa       Wed Jan 21 11:56:14 2004
 @@ -1,57 +1,11 @@
 ---- configure.orig     Mon Feb 11 11:14:06 2002
 -+++ configure  Sun Apr 14 18:38:40 2002
 -@@ -32,7 +32,8 @@
 - LDFLAGS="$LDFLAGS"
 - LIBS="$LIBS"
 - XLDFLAGS="$XLDFLAGS "
 --JHOME=`pwd`
 -+JHOME="`cat .prefix-freebsd`/lib/jabber"
 -+WRKSRC="`cat .wrksrc-freebsd`"
 - 
 - ##
 - # Print a cool header
 -@@ -76,31 +77,19 @@
 - ##
 - # Pth check
 - ##
 --printf "Getting pth settings..."
 --PTH_CFLAGS=`pth-config --cflags`
 --PTH_LDFLAGS=`pth-config --ldflags`
 --PTH_LIBS=`pth-config --libs`
 --PTH_LIBDIR=`pth-config --libdir`
 --if [ -n "$PTH_CFLAGS" ]; then
 --    CFLAGS="$CFLAGS $PTH_CFLAGS";
 --    LDFLAGS="$LDFLAGS $PTH_LDFLAGS";
 --    LIBS="$LIBS $PTH_LIBS";
 --    SLIBS="$SLIBS $PTH_LIBDIR/libpth.a";
 --    printf "         Done.\n";
 --else
 --    if [ -d "jabberd/pth-1.4.0" ]; then
 --        opwd=`pwd`
 --        cd jabberd/pth-1.4.0;
 --        ./configure || (printf "Error Configuring pth"; exit 1);
 --        cd $opwd;
 --        PSUBDIR="pth-1.4.0";
 --        PTHP=`pwd`"/jabberd/pth-1.4.0";
 --        PLINK="$PTHP/pth_*.o";
 --        CFLAGS="$CFLAGS -I`pwd`/jabberd/pth-1.4.0";
 --    else
 --        printf "          Error.\n\n No version of PTH is available on this system\nhttp://www.gnu.org/software/pth/";
 --    fi
 --fi
 -+echo "Using jabber's internal copy of pth 1.4.0 because 1.4.1 is incompatible"
 -+opwd=`pwd`
 -+cd jabberd/pth-1.4.0;
 -+echo "Configuring jabber pth-1.4.0..."
 -+./configure || (echo "Error Configuring pth"; exit 1);
 -+echo "Building pth-1.4.0..."
 -+gmake
 -+cd $opwd;
 -+PSUBDIR="pth-1.4.0";
 -+PTHP="`pwd`/jabberd/pth-1.4.0";
 -+PLINK="$PTHP/pth_*.o";
 -+CFLAGS="$CFLAGS -I${PTHP}";
 -+LDFLAGS="$LDFLAGS -L${PTHP}";
 - 
 - 
 +--- jsm/modules/mod_auth_crypt.c.orig  Tue Oct 28 00:16:50 2003
 ++++ jsm/modules/mod_auth_crypt.c       Tue Jan 20 23:46:25 2004
 +@@ -28,7 +28,7 @@
 +  * 
 +  * --------------------------------------------------------------------------*/
 + #include "jsm.h"
 +-#include "crypt.h"
 ++#include "unistd.h"
   
 + #define HASH_CRYPT 1
 + #define HASH_SHA1  2
 diff -ruN jabber.orig/files/patch-ab jabber/files/patch-ab
 --- jabber.orig/files/patch-ab  Thu Apr 18 22:12:04 2002
 +++ jabber/files/patch-ab       Wed Jan 21 17:10:48 2004
 @@ -1,26 +1,27 @@
 ---- Makefile.orig      Sat Jan 20 21:32:48 2001
 -+++ Makefile   Sun Apr 14 23:30:36 2002
 -@@ -4,6 +4,10 @@
 - include platform-settings
 +--- Makefile.orig      Mon Nov  3 16:52:42 2003
 ++++ Makefile   Wed Jan 21 16:47:31 2004
 +@@ -21,6 +21,13 @@
 + 
 + endif
   
 - SUBDIRS=pthsock xdb_file dnsrv jsm dialback jabberd
  +INSTALL_DATA=`cat .install_data-freebsd`
  +INSTALL_DIR=install -d
  +INSTALL_PROGRAM=`cat .install_program-freebsd`
  +INSTALL_SCRIPT=`cat .install_data-freebsd`
 - 
 ++LIBDIR=${PREFIX}/lib/jabber
 ++INCDIR=${PREFIX}/include/jabber
 ++
   all: all-recursive
   
 -@@ -13,8 +17,29 @@
 - 
 + clean: clean-recursive
 +@@ -30,7 +37,25 @@
   single: single-recursive
   
 -+LIBDIR=${PREFIX}/lib/jabber
 -+INCDIR=${PREFIX}/include/jabber
   install:
  -      printf "\n\nNo actual make install, you just run it out of the directory!\n"
  +      ${INSTALL_PROGRAM} jabberd/jabberd ${PREFIX}/sbin
 -+      ${INSTALL_DATA} jabber.xml ${PREFIX}/etc/jabber.xml.sample
 ++      ${INSTALL_DIR} ${PREFIX}/etc/jabberd
 ++      ${INSTALL_DATA} jabber.xml ${PREFIX}/etc/jabberd/jabber.xml.dist
  +      ${INSTALL_DIR} ${LIBDIR}/jsm
  +      ${INSTALL_DATA} jsm/jsm.so ${LIBDIR}/jsm
  +      ${INSTALL_DIR} ${LIBDIR}/xdb_file
 @@ -37,8 +38,6 @@
  +      ${INSTALL_DIR} ${INCDIR}/lib
  +      ${INSTALL_DATA} jabberd/lib/lib.h ${INCDIR}/lib
  +      ${INSTALL_DATA} jabberd/lib/xmlparse.h ${INCDIR}/lib
 -+      ${INSTALL_DATA} jabberd/pth-1.4.0/pth.h ${INCDIR}
 -+      
   
   all-local:
   
 diff -ruN jabber.orig/files/patch-ac jabber/files/patch-ac
 --- jabber.orig/files/patch-ac  Tue Feb 13 00:44:38 2001
 +++ jabber/files/patch-ac       Wed Jan 21 22:15:30 2004
 @@ -1,11 +1,131 @@
 ---- jabber.xml.orig    Sat Feb  3 22:46:56 2001
 -+++ jabber.xml Sun Feb 11 01:19:01 2001
 -@@ -576,7 +576,7 @@
 +--- jabber.xml.orig    Thu Nov 13 23:53:46 2003
 ++++ jabber.xml Wed Jan 21 22:14:58 2004
 +@@ -295,21 +295,21 @@
 +     -->
 + 
 +     <load main="jsm">
 +-      <jsm>./jsm/jsm.so</jsm>
 +-      <mod_echo>./jsm/jsm.so</mod_echo>
 +-      <mod_roster>./jsm/jsm.so</mod_roster>
 +-      <mod_time>./jsm/jsm.so</mod_time>
 +-      <mod_vcard>./jsm/jsm.so</mod_vcard>
 +-      <mod_last>./jsm/jsm.so</mod_last>
 +-      <mod_version>./jsm/jsm.so</mod_version>
 +-      <mod_announce>./jsm/jsm.so</mod_announce>
 +-      <mod_agents>./jsm/jsm.so</mod_agents>
 +-      <mod_browse>./jsm/jsm.so</mod_browse>
 +-      <mod_disco>./jsm/jsm.so</mod_disco>
 +-      <mod_admin>./jsm/jsm.so</mod_admin>
 +-      <mod_filter>./jsm/jsm.so</mod_filter>
 +-      <mod_offline>./jsm/jsm.so</mod_offline>
 +-      <mod_presence>./jsm/jsm.so</mod_presence>
 ++      <jsm>/usr/local/lib/jabber/jsm/jsm.so</jsm>
 ++      <mod_echo>/usr/local/lib/jabber/jsm/jsm.so</mod_echo>
 ++      <mod_roster>/usr/local/lib/jabber/jsm/jsm.so</mod_roster>
 ++      <mod_time>/usr/local/lib/jabber/jsm/jsm.so</mod_time>
 ++      <mod_vcard>/usr/local/lib/jabber/jsm/jsm.so</mod_vcard>
 ++      <mod_last>/usr/local/lib/jabber/jsm/jsm.so</mod_last>
 ++      <mod_version>/usr/local/lib/jabber/jsm/jsm.so</mod_version>
 ++      <mod_announce>/usr/local/lib/jabber/jsm/jsm.so</mod_announce>
 ++      <mod_agents>/usr/local/lib/jabber/jsm/jsm.so</mod_agents>
 ++      <mod_browse>/usr/local/lib/jabber/jsm/jsm.so</mod_browse>
 ++      <mod_disco>/usr/local/lib/jabber/jsm/jsm.so</mod_disco>
 ++      <mod_admin>/usr/local/lib/jabber/jsm/jsm.so</mod_admin>
 ++      <mod_filter>/usr/local/lib/jabber/jsm/jsm.so</mod_filter>
 ++      <mod_offline>/usr/local/lib/jabber/jsm/jsm.so</mod_offline>
 ++      <mod_presence>/usr/local/lib/jabber/jsm/jsm.so</mod_presence>
 + 
 +       <!--
 +       Authentication
 +@@ -325,19 +325,19 @@
 +       -->
 +       <!-- mod_auth_digest: Password in clear text in storage,
 +            encrypted/hashed on the wire -->
 +-      <mod_auth_digest>./jsm/jsm.so</mod_auth_digest>
 ++      <mod_auth_digest>/usr/local/lib/jabber/jsm/jsm.so</mod_auth_digest>
 +       <!-- mod_auth_plain: Password in clear text in storage
 +            and on the wire. Disable this if you do not use clients
 +            that need plaintext auth -->
 +-      <mod_auth_plain>./jsm/jsm.so</mod_auth_plain>
 ++      <mod_auth_plain>/usr/local/lib/jabber/jsm/jsm.so</mod_auth_plain>
 +       <!-- mod_auth_crypt: Password encrypted/hashed in storage,
 +            clear text on the wire. Disabled as this only makes
 +            sense when used exclusively and with SSL mandatory
 +       <mod_auth_crypt>./jsm/jsm.so</mod_auth_crypt> -->
 + 
 +-      <mod_log>./jsm/jsm.so</mod_log>
 +-      <mod_register>./jsm/jsm.so</mod_register>
 +-      <mod_xml>./jsm/jsm.so</mod_xml>
 ++      <mod_log>/usr/local/lib/jabber/jsm/jsm.so</mod_log>
 ++      <mod_register>/usr/local/lib/jabber/jsm/jsm.so</mod_register>
 ++      <mod_xml>/usr/local/lib/jabber/jsm/jsm.so</mod_xml>
 +     </load>
 + 
 +   </service>
 +@@ -353,10 +353,10 @@
 +   <xdb id="xdb">
 +     <host/>
 +     <load>
 +-      <xdb_file>./xdb_file/xdb_file.so</xdb_file>
 ++      <xdb_file>/usr/local/lib/jabber/xdb_file/xdb_file.so</xdb_file>
 +     </load>
 +     <xdb_file xmlns="jabber:config:xdb_file">
 +-      <spool><jabberd:cmdline flag='s'>./spool</jabberd:cmdline></spool>
 ++      <spool><jabberd:cmdline flag='s'>/var/jabberd/spool</jabberd:cmdline></spool>
 +     </xdb_file>
 +   </xdb>
 + 
 +@@ -387,7 +387,7 @@
 + 
 +   <service id="c2s">
 +     <load>
 +-      <pthsock_client>./pthsock/pthsock_client.so</pthsock_client>
 ++      <pthsock_client>/usr/local/lib/jabber/pthsock/pthsock_client.so</pthsock_client>
 +     </load>
 +     <pthcsock xmlns='jabber:config:pth-csock'>
 +       <authtime/>
 +@@ -430,7 +430,7 @@
 +     <host/>
 +     <logtype/>
 +     <format>%d: [%t] (%h): %s</format>
 +-    <file>error.log</file>
 ++    <file>/var/jabberd/log/error.log</file>
 +     <stderr/>
 +   </log>
 + 
 +@@ -443,7 +443,7 @@
 +     <host/>
 +     <logtype>record</logtype>
 +     <format>%d %h %s</format>
 +-    <file>record.log</file>
 ++    <file>/var/jabberd/log/record.log</file>
 +   </log>
 + 
 +   <!-- The following two services are for handling server-to-server traffic. -->
 +@@ -453,7 +453,7 @@
 +   <service id="dnsrv">
 +     <host/>
 +     <load>
 +-      <dnsrv>./dnsrv/dnsrv.so</dnsrv>
 ++      <dnsrv>/usr/local/lib/jabber/dnsrv/dnsrv.so</dnsrv>
 +     </load>
 +     <dnsrv xmlns="jabber:config:dnsrv">
 +       <resend service="_xmpp-server._tcp">s2s</resend> <!-- for supporting XMPP compliant SRV records -->
 +@@ -473,7 +473,7 @@
 + 
 +   <service id="s2s">
 +     <load>
 +-      <dialback>./dialback/dialback.so</dialback>
 ++      <dialback>/usr/local/lib/jabber/dialback/dialback.so</dialback>
 +     </load>
 +     <dialback xmlns='jabber:config:dialback'>
 +       <legacy/>
 +@@ -668,7 +668,7 @@
     <!--
     This specifies the file to store the pid of the process in.
     -->
  -  <pidfile>./jabber.pid</pidfile>
 -+  <pidfile>/var/tmp/jabber.pid</pidfile>
 ++  <pidfile>/var/jabberd/pid/jabberd.pid</pidfile>
   
   
   </jabber>
 diff -ruN jabber.orig/files/patch-ad jabber/files/patch-ad
 --- jabber.orig/files/patch-ad  Tue Feb 13 00:44:39 2001
 +++ jabber/files/patch-ad       Thu Jan  1 05:00:00 1970
 @@ -1,50 +0,0 @@
 ---- jabber.xml.orig    Sun Feb 11 17:24:48 2001
 -+++ jabber.xml Sun Feb 11 17:26:23 2001
 -@@ -41,6 +41,10 @@
 -     Multiple <host/> entries are allowed - each one is for a 
 -     separate virtual server. Note that each host entry must 
 -     be on one line, the server doesn't like it otherwise! :)
 -+
 -+    Currently on FreeBSD jabberd is started with the -h option
 -+    from /usr/local/etc/rc.d/jabberd.sh.  You'll need to modify
 -+    this before changing below.
 -     -->
 - 
 -     <host><jabberd:cmdline flag="h">localhost</jabberd:cmdline></host>
 -@@ -193,7 +197,9 @@
 -       entry for <host/> above.
 -       -->
 - 
 -+      <!--
 -       <update><jabberd:cmdline flag="h">localhost</jabberd:cmdline></update>
 -+      -->
 - 
 -       <!--
 -       This enables the server to automatically update the 
 -@@ -298,7 +304,7 @@
 -       <xdb_file>./xdb_file/xdb_file.so</xdb_file>
 -     </load>
 -     <xdb_file xmlns="jabber:config:xdb_file">
 --      <spool><jabberd:cmdline flag='s'>./spool</jabberd:cmdline></spool>
 -+      <spool><jabberd:cmdline flag='s'>/var/spool/jabber</jabberd:cmdline></spool>
 -     </xdb_file>
 -   </xdb>
 - 
 -@@ -357,7 +363,7 @@
 -     <host/>
 -     <logtype/>
 -     <format>%d: [%t] (%h): %s</format>
 --    <file>error.log</file>
 -+    <file>/var/log/jabber.error</file>
 -     <stderr/>
 -   </log>
 - 
 -@@ -370,7 +376,7 @@
 -     <host/>
 -     <logtype>record</logtype>
 -     <format>%d %h %s</format>
 --    <file>record.log</file>
 -+    <file>/var/log/jabber.record</file>
 -   </log>
 - 
 -   <!-- The following two services are for handling server-to-server traffic. -->
 diff -ruN jabber.orig/pkg-deinstall jabber/pkg-deinstall
 --- jabber.orig/pkg-deinstall   Sat Apr 27 00:52:12 2002
 +++ jabber/pkg-deinstall        Fri Jan  2 07:29:54 2004
 @@ -1,71 +1,21 @@
 -#! /bin/sh
 +#!/bin/sh
 +# $FreeBSD: ports/net/jabberd/pkg-deinstall,v 1.3 2004/01/01 13:21:15 demon Exp $
 +#
  
 -ask() {
 -    local question default answer
 -
 -    question=$1
 -    default=$2
 -    if [ -z "${PACKAGE_BUILDING}" ]; then
 -       read -p "${question} [${default}]? " answer
 -    fi
 -    if [ x${answer} = x ]; then
 -       answer=${default}
 -    fi
 -    echo ${answer}
 -}
 -
 -yesno() {
 -    local dflt question answer
 -
 -    question=$1
 -    dflt=$2
 -    while :; do
 -       answer=$(ask "${question}" "${dflt}")
 -       case "${answer}" in
 -       [Yy]*)          return 0;;
 -       [Nn]*)          return 1;;
 -       esac
 -       echo "Please answer yes or no."
 -    done
 -}
 -
 -delete_account() {
 -    local u g home
 -
 -    u=$1
 -    g=$2
 -    if yesno "Do you want me to remove group \"${g}\"" y; then
 -       pw groupdel -n ${g}
 -       echo "Done."
 -    fi
 -    if yesno "Do you want me to remove user \"${u}\"" y; then
 -       eval home=~${u}
 -       pw userdel -n ${u}
 -       echo "Done."
 -       if [ -d "${home}" ]; then
 -           echo "Please remember to remove the home directory \"${home}\" as"
 -           echo "well as the mirrored files."
 -       fi
 -    fi
 -}
 -
 -if [ x$2 != xDEINSTALL ]; then
 -    exit
 +if [ "$2" != "POST-DEINSTALL" ]; then
 +    exit 0
  fi
  
 -export PATH=/bin:/usr/bin:/usr/sbin
 -
  USER=jabber
 -GROUP=jabber
  
 -if ps -axc | grep -q jabberd; then
 -    if yesno "There are some jabberd processes running.  Shall I kill them" y
 -    then
 -       killall -SIGKILL -u ${USER} jabberd
 -       sleep 2
 -    else
 -       echo "OK ... I hope you know what you are doing."
 -    fi
 +if pw usershow "${USER}" 2>/dev/null 1>&2; then
 +       echo "To delete Jabber user permanently, use 'pw userdel ${USER}'"
  fi
  
 -delete_account ${USER} ${GROUP}
 +if pw groupshow "${USER}" 2>/dev/null 1>&2; then
 +       echo "To delete Jabber group permanently, use 'pw groupdel ${USER}'"
 +fi
 +
 +echo "If you wish to delete jabber data files, remove '/var/jabberd' directory."
 +
 +exit 0
 diff -ruN jabber.orig/pkg-descr jabber/pkg-descr
 --- jabber.orig/pkg-descr       Fri Oct 17 22:38:38 2003
 +++ jabber/pkg-descr    Wed Jan 21 21:46:40 2004
 @@ -1,7 +1,7 @@
  The Jabber server (jabberd) is a daemon for Jabber clients to connect
  and communicate with.
  
 -After editing $PREFIX/etc/jabber.xml, the server can be started by
 +After editing $PREFIX/etc/jabberd/jabber.xml, the server can be started by
  rc.d script.
  
  Complete information about configuration can be found in the Jabber Server
 diff -ruN jabber.orig/pkg-install jabber/pkg-install
 --- jabber.orig/pkg-install     Sat Apr 27 00:52:12 2002
 +++ jabber/pkg-install  Sat Jan 10 07:29:57 2004
 @@ -1,151 +1,38 @@
 -#! /bin/sh
 -
 -chmods_done=" "
 -
 -ask() {
 -    local question default answer
 -
 -    question=$1
 -    default=$2
 -    if [ -z "${PACKAGE_BUILDING}" ]; then
 -       read -p "${question} [${default}]? " answer
 -    fi
 -    if [ x${answer} = x ]; then
 -       answer=${default}
 -    fi
 -    echo ${answer}
 -}
 -
 -yesno() {
 -    local dflt question answer
 -
 -    question=$1
 -    dflt=$2
 -    while :; do
 -       answer=$(ask "${question}" "${dflt}")
 -       case "${answer}" in
 -       [Yy]*)          return 0;;
 -       [Nn]*)          return 1;;
 -       esac
 -       echo "Please answer yes or no."
 -    done
 -}
 -
 -make_account() {
 -    local u g gcos homeopt home
 -
 -    u=$1
 -    g=$2
 -    gcos=$3
 -    homeopt=${4:+"-d $4"}
 -
 -    if pw group show "${g}" >/dev/null 2>&1; then
 -       echo "You already have a group \"${g}\", so I will use it."
 -    else
 -       echo "You need a group \"${g}\"."
 -       if which -s pw && yesno "Would you like me to create it" y; then
 -           pw groupadd ${g} || exit
 -           echo "Done."
 -       else
 -           echo "Please create it, and try again."
 -           if ! grep -q "^${u}:" /etc/passwd; then
 -               echo "While you're at it, please create a user \"${u}\" too,"
 -               echo "with a default group of \"${g}\"."
 -           fi
 -           exit 1
 -       fi
 -    fi
 -    
 -    if pw user show "${u}" >/dev/null 2>&1; then
 -       echo "You already have a user \"${u}\", so I will use it."
 -    else
 -       echo "You need a user \"${u}\"."
 -       if which -s pw && yesno "Would you like me to create it" y; then
 -           pw useradd ${u} -g ${g} -h - ${homeopt} \
 -               -s /nonexistent -c "${gcos}" || exit
 -           echo "Done."
 +#!/bin/sh
 +# $FreeBSD: ports/net/jabberd/pkg-install,v 1.3 2004/01/09 11:30:09 demon Exp $
 +#
 +
 +if [ "$2" != "PRE-INSTALL" ]; then
 +    exit 0
 +fi
 +
 +USER=jabber
 +GROUP=${USER}
 +UID=93
 +GID=${UID}
 +
 +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
 +       if pw groupadd ${GROUP} -g ${GID}; then
 +               echo "Added group \"${GROUP}\"."
         else
 -           echo "Please create it, and try again."
 -           exit 1
 +               echo "Adding group \"${GROUP}\" failed..."
 +               exit 1
         fi
 -    fi
 +fi
  
 -    if [ x"$homeopt" = x ]; then
 -       eval home=~${u}
 -       if [ ! -d "${home}" ]; then
 -           if yesno \
 -               "Would you like me to create ${u}'s home directory (${home})" y
 -           then
 -               (umask 77 && \
 -                   mkdir -p ${home}) || exit
 -               chown -R ${u}:${g} ${home} || exit
 -           else
 -               echo "Please create it, and try again."
 +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
 +       if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
 +               -s "/sbin/nologin" -d "/nonexistent" \
 +               -c "Jabber Daemon"; \
 +       then
 +               echo "Added user \"${USER}\"."
 +       else
 +               echo "Adding user \"${USER}\" failed..."
                 exit 1
 -           fi
         fi
 -    fi
 -}
 -
 -case $2 in
 +fi
  
 -POST-INSTALL)
 -    if which -s pw && which -s lockf; then
 -       :
 -    else
 -       cat <<EOF
 -
 -This system looks like a pre-2.2 version of FreeBSD.  I see that it
 -is missing the "lockf" and/or "pw" utilities.  I need these utilities.
 -Please get them and install them, and try again.  You can get the
 -sources from:
 -
 -  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.bin/lockf.tar.gz
 -  ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
 -
 -EOF
 -       exit 1
 -    fi
 -
 -    user=jabber
 -    group=jabber
 -    spooldir="/var/spool/jabber"
 -    etcdir=${PREFIX:-$PKG_PREFIX}/etc
 -
 -    echo ""
 -    make_account ${user} ${group} "Jabber Daemon" "/nonexistent"
 -
 -    if [ ! -d ${spooldir} ]; then
 -       echo "Creating \"${spooldir}\"."
 -       mkdir -p ${spooldir}
 -    fi
 -
 -    echo "Fixing ownerships and modes in \"${spooldir}\"."
 -    chown -R ${user}:${group} ${spooldir}
 -    chmod -R go= ${spooldir}
 -
 -    if [ ! -f ${etcdir}/jabber.xml ]; then
 -       echo "Creating \"${etcdir}/jabber.xml\"."
 -       cp -p ${etcdir}/jabber.xml.sample ${etcdir}/jabber.xml
 -    fi
 -
 -    echo "Fixing config files ownerships and modes."
 -    chown root:${group} ${etcdir}/jabber.xml ${etcdir}/jabber.xml.sample
 -    chmod 640 ${etcdir}/jabber.xml ${etcdir}/jabber.xml.sample
 -
 -    if [ ! -f /var/log/jabber.error ]; then
 -       echo "Creating \"/var/log/jabber.error\"."
 -       cp /dev/null /var/log/jabber.error
 -    fi
 -
 -    if [ ! -f /var/log/jabber.record ]; then
 -       echo "Creating \"/var/log/jabber.record\"."
 -       cp /dev/null /var/log/jabber.record
 -    fi
 -
 -    echo "Fixing log files ownerships and modes."
 -    chown ${user}:${group} /var/log/jabber.error /var/log/jabber.record
 -    chmod 640 /var/log/jabber.error /var/log/jabber.record
 +mkdir -m 750 /var/jabberd /var/jabberd/db /var/jabberd/pid /var/jabberd/log
 +chown jabber:jabber /var/jabberd /var/jabberd/db /var/jabberd/pid /var/jabberd/log
  
 -    ;;
 -esac
 +exit 0
 diff -ruN jabber.orig/pkg-plist jabber/pkg-plist
 --- jabber.orig/pkg-plist       Sat Apr 27 00:52:12 2002
 +++ jabber/pkg-plist    Wed Jan 21 17:10:32 2004
 @@ -1,12 +1,11 @@
  sbin/jabberd
 -@unexec if cmp -s %D/etc/jabber.xml.sample %D/etc/jabber.xml; then rm -f %D/etc/jabber.xml; fi
 -etc/jabber.xml.sample
 +@unexec if cmp -s %D/etc/jabber.xml.dist %D/etc/jabber.xml; then rm -f %D/etc/jabber.xml; fi
 +etc/jabberd/jabber.xml.dist
  etc/rc.d/jabberd.sh
  include/jabber/lib/lib.h
  include/jabber/lib/xmlparse.h
  include/jabber/platform-settings
  include/jabber/jabberd.h
 -include/jabber/pth.h
  lib/jabber/dialback/dialback.so
  lib/jabber/dnsrv/dnsrv.so
  lib/jabber/jsm/jsm.so
 @@ -20,4 +19,3 @@
  @dirrm lib/jabber/pthsock
  @dirrm lib/jabber/xdb_file
  @dirrm lib/jabber
 -@unexec rmdir /var/spool/jabber 2>/dev/null || true
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401220800.i0M80YR5036674>