From 63e54bb80d88a4a7d5fac9b834e53a81b8edf77e Mon Sep 17 00:00:00 2001 From: vs Date: Wed, 23 Jun 2004 13:02:45 +0000 Subject: Update to 1.4.3 PR: ports/66307 Submitted by: c0decafe.net Approved by: maintainer timeout --- net-im/jabber/Makefile | 30 ++-- net-im/jabber/distinfo | 4 +- net-im/jabber/files/jabberd.sh | 2 +- net-im/jabber/files/patch-Makefile | 43 +++++ net-im/jabber/files/patch-aa | 57 ------ net-im/jabber/files/patch-ab | 44 ----- net-im/jabber/files/patch-ac | 11 -- net-im/jabber/files/patch-ad | 50 ------ net-im/jabber/files/patch-configure | 9 + net-im/jabber/files/patch-jabber.xml | 49 +++++ .../files/patch-jsm-modules-mod_auth_crypt.c | 11 ++ net-im/jabber/pkg-deinstall | 76 ++------ net-im/jabber/pkg-install | 197 ++++++--------------- net-im/jabber/pkg-plist | 1 - net/jabber/Makefile | 30 ++-- net/jabber/distinfo | 4 +- net/jabber/files/jabberd.sh | 2 +- net/jabber/files/patch-Makefile | 43 +++++ net/jabber/files/patch-aa | 57 ------ net/jabber/files/patch-ab | 44 ----- net/jabber/files/patch-ac | 11 -- net/jabber/files/patch-ad | 50 ------ net/jabber/files/patch-configure | 9 + net/jabber/files/patch-jabber.xml | 49 +++++ .../files/patch-jsm-modules-mod_auth_crypt.c | 11 ++ net/jabber/pkg-deinstall | 76 ++------ net/jabber/pkg-install | 197 ++++++--------------- net/jabber/pkg-plist | 1 - 28 files changed, 386 insertions(+), 782 deletions(-) create mode 100644 net-im/jabber/files/patch-Makefile delete mode 100644 net-im/jabber/files/patch-aa delete mode 100644 net-im/jabber/files/patch-ab delete mode 100644 net-im/jabber/files/patch-ac delete mode 100644 net-im/jabber/files/patch-ad create mode 100644 net-im/jabber/files/patch-configure create mode 100644 net-im/jabber/files/patch-jabber.xml create mode 100644 net-im/jabber/files/patch-jsm-modules-mod_auth_crypt.c create mode 100644 net/jabber/files/patch-Makefile delete mode 100644 net/jabber/files/patch-aa delete mode 100644 net/jabber/files/patch-ab delete mode 100644 net/jabber/files/patch-ac delete mode 100644 net/jabber/files/patch-ad create mode 100644 net/jabber/files/patch-configure create mode 100644 net/jabber/files/patch-jabber.xml create mode 100644 net/jabber/files/patch-jsm-modules-mod_auth_crypt.c diff --git a/net-im/jabber/Makefile b/net-im/jabber/Makefile index abae78c09ccd..6068f21e389c 100644 --- a/net-im/jabber/Makefile +++ b/net-im/jabber/Makefile @@ -6,38 +6,38 @@ # PORTNAME= jabber -PORTVERSION= 1.4.2 -PORTREVISION= 1 +PORTVERSION= 1.4.3 CATEGORIES= net -MASTER_SITES= http://jabberd.jabberstudio.org/downloads/ \ - http://download.jabber.org/dists/1.4/final/ -DISTNAME= ${PORTNAME}-${PORTVERSION} +MASTER_SITES= http://jabberd.jabberstudio.org/1.4/dist/ +DISTNAME= ${PORTNAME}d-${PORTVERSION} DIST_SUBDIR= jabber MAINTAINER= seanc@FreeBSD.org COMMENT= Online presence and instant messaging server +LIB_DEPENDS= pth.20:${PORTSDIR}/devel/pth + GNU_CONFIGURE= yes USE_GMAKE= yes USE_OPENSSL= yes -USE_PERL5= yes CONFIGURE_ARGS+= --enable-ssl - -rc=${PREFIX}/etc/rc.d +.if defined(WITH_IPV6) +CONFIGURE_ARGS+= --enable-ipv6 +.endif #JABDIR= ${PORTNAME}-${PORTVERSION} # Save this data for use later: jabber doesn't have an install target # or a sane set of defaults. post-patch: - @echo "${WRKSRC}" > ${WRKSRC}/.wrksrc-freebsd - @echo "${PREFIX}" > ${WRKSRC}/.prefix-freebsd - @echo "${INSTALL_DATA}" > ${WRKSRC}/.install_data-freebsd - @echo "${INSTALL_SCRIPT}" > ${WRKSRC}/.install_script-freebsd - @echo "${INSTALL_PROGRAM}" > ${WRKSRC}/.install_program-freebsd + ${ECHO} "${WRKSRC}" > ${WRKSRC}/.wrksrc-freebsd + ${ECHO} "${PREFIX}" > ${WRKSRC}/.prefix-freebsd + ${ECHO} "${INSTALL_DATA}" > ${WRKSRC}/.install_data-freebsd + ${ECHO} "${INSTALL_SCRIPT}" > ${WRKSRC}/.install_script-freebsd + ${ECHO} "${INSTALL_PROGRAM}" > ${WRKSRC}/.install_program-freebsd post-install: - @PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${rc} + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + ${INSTALL_DATA} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/ .include diff --git a/net-im/jabber/distinfo b/net-im/jabber/distinfo index ab9a48722523..2dd9ec7c1caf 100644 --- a/net-im/jabber/distinfo +++ b/net-im/jabber/distinfo @@ -1,2 +1,2 @@ -MD5 (jabber/jabber-1.4.2.tar.gz) = 10780dbdb93926ea5bb360e1186b939c -SIZE (jabber/jabber-1.4.2.tar.gz) = 690217 +MD5 (jabber/jabberd-1.4.3.tar.gz) = a3e964d6fa07b5d850302ae0512f94c6 +SIZE (jabber/jabberd-1.4.3.tar.gz) = 258016 diff --git a/net-im/jabber/files/jabberd.sh b/net-im/jabber/files/jabberd.sh index d6aa960fb6f6..2ad8b7ea99c7 100644 --- a/net-im/jabber/files/jabberd.sh +++ b/net-im/jabber/files/jabberd.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then echo "$0: Cannot determine the PREFIX" >&2 diff --git a/net-im/jabber/files/patch-Makefile b/net-im/jabber/files/patch-Makefile new file mode 100644 index 000000000000..ce467316fcdd --- /dev/null +++ b/net-im/jabber/files/patch-Makefile @@ -0,0 +1,43 @@ +--- Makefile.orig Sat Jan 20 21:32:48 2001 ++++ Makefile Sun Apr 14 23:30:36 2002 +@@ -4,6 +4,10 @@ + include platform-settings + + 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` + + all: all-recursive + +@@ -13,8 +17,28 @@ + + 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} ${LIBDIR}/jsm ++ ${INSTALL_DATA} jsm/jsm.so ${LIBDIR}/jsm ++ ${INSTALL_DIR} ${LIBDIR}/xdb_file ++ ${INSTALL_DATA} xdb_file/xdb_file.so ${LIBDIR}/xdb_file ++ ${INSTALL_DIR} ${LIBDIR}/pthsock ++ ${INSTALL_DATA} pthsock/pthsock_client.so ${LIBDIR}/pthsock ++ ${INSTALL_DIR} ${LIBDIR}/dnsrv ++ ${INSTALL_DATA} dnsrv/dnsrv.so ${LIBDIR}/dnsrv ++ ${INSTALL_DIR} ${LIBDIR}/dialback ++ ${INSTALL_DATA} dialback/dialback.so ${LIBDIR}/dialback ++ ${INSTALL_DIR} ${INCDIR} ++ ${INSTALL_DATA} platform-settings ${INCDIR} ++ ${INSTALL_DATA} jabberd/jabberd.h ${INCDIR} ++ ${INSTALL_DIR} ${INCDIR}/lib ++ ${INSTALL_DATA} jabberd/lib/lib.h ${INCDIR}/lib ++ ${INSTALL_DATA} jabberd/lib/xmlparse.h ${INCDIR}/lib ++ + + all-local: + diff --git a/net-im/jabber/files/patch-aa b/net-im/jabber/files/patch-aa deleted file mode 100644 index 80239a100c69..000000000000 --- a/net-im/jabber/files/patch-aa +++ /dev/null @@ -1,57 +0,0 @@ ---- 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}"; - - - diff --git a/net-im/jabber/files/patch-ab b/net-im/jabber/files/patch-ab deleted file mode 100644 index 589e6646ceee..000000000000 --- a/net-im/jabber/files/patch-ab +++ /dev/null @@ -1,44 +0,0 @@ ---- Makefile.orig Sat Jan 20 21:32:48 2001 -+++ Makefile Sun Apr 14 23:30:36 2002 -@@ -4,6 +4,10 @@ - include platform-settings - - 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` - - all: all-recursive - -@@ -13,8 +17,29 @@ - - 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} ${LIBDIR}/jsm -+ ${INSTALL_DATA} jsm/jsm.so ${LIBDIR}/jsm -+ ${INSTALL_DIR} ${LIBDIR}/xdb_file -+ ${INSTALL_DATA} xdb_file/xdb_file.so ${LIBDIR}/xdb_file -+ ${INSTALL_DIR} ${LIBDIR}/pthsock -+ ${INSTALL_DATA} pthsock/pthsock_client.so ${LIBDIR}/pthsock -+ ${INSTALL_DIR} ${LIBDIR}/dnsrv -+ ${INSTALL_DATA} dnsrv/dnsrv.so ${LIBDIR}/dnsrv -+ ${INSTALL_DIR} ${LIBDIR}/dialback -+ ${INSTALL_DATA} dialback/dialback.so ${LIBDIR}/dialback -+ ${INSTALL_DIR} ${INCDIR} -+ ${INSTALL_DATA} platform-settings ${INCDIR} -+ ${INSTALL_DATA} jabberd/jabberd.h ${INCDIR} -+ ${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 --git a/net-im/jabber/files/patch-ac b/net-im/jabber/files/patch-ac deleted file mode 100644 index 45e15e08afaa..000000000000 --- a/net-im/jabber/files/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ ---- jabber.xml.orig Sat Feb 3 22:46:56 2001 -+++ jabber.xml Sun Feb 11 01:19:01 2001 -@@ -576,7 +576,7 @@ - -- ./jabber.pid -+ /var/tmp/jabber.pid - - - diff --git a/net-im/jabber/files/patch-ad b/net-im/jabber/files/patch-ad deleted file mode 100644 index 63266c9a12eb..000000000000 --- a/net-im/jabber/files/patch-ad +++ /dev/null @@ -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 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. - --> - - localhost -@@ -193,7 +197,9 @@ - entry for above. - --> - -+ - - diff --git a/net-im/jabber/files/patch-configure b/net-im/jabber/files/patch-configure new file mode 100644 index 000000000000..07f6c8b3c757 --- /dev/null +++ b/net-im/jabber/files/patch-configure @@ -0,0 +1,9 @@ +--- 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`" diff --git a/net-im/jabber/files/patch-jabber.xml b/net-im/jabber/files/patch-jabber.xml new file mode 100644 index 000000000000..378893a1aea6 --- /dev/null +++ b/net-im/jabber/files/patch-jabber.xml @@ -0,0 +1,49 @@ +--- jabber.xml.orig Thu Nov 13 22:53:46 2003 ++++ jabber.xml Thu May 6 04:19:22 2004 +@@ -49,6 +49,10 @@ + separate virtual server. Note that each host entry must + be on one line, the server doesn't like it otherwise! :) + Use lowercase for the hostname. ++ ++ Currently on FreeBSD jabberd is started with the -h option ++ from /usr/local/etc/rc.d/jabberd.sh. You'll need to modify ++ it before the below applies. + --> + + localhost +@@ -356,7 +360,7 @@ + ./xdb_file/xdb_file.so + + +- ./spool ++ /var/spool/jabber + + + +@@ -430,7 +434,7 @@ + + + %d: [%t] (%h): %s +- error.log ++ /var/log/jabber.error + + + +@@ -443,7 +447,7 @@ + + record + %d %h %s +- record.log ++ /var/log/jabber.record + + + +@@ -668,7 +672,7 @@ + +- ./jabber.pid ++ /var/tmp/jabber.pid + + + diff --git a/net-im/jabber/files/patch-jsm-modules-mod_auth_crypt.c b/net-im/jabber/files/patch-jsm-modules-mod_auth_crypt.c new file mode 100644 index 000000000000..bc7d2121959e --- /dev/null +++ b/net-im/jabber/files/patch-jsm-modules-mod_auth_crypt.c @@ -0,0 +1,11 @@ +--- jsm/modules/mod_auth_crypt.c.orig Thu May 6 00:00:20 2004 ++++ jsm/modules/mod_auth_crypt.c Thu May 6 00:00:01 2004 +@@ -28,7 +28,7 @@ + * + * --------------------------------------------------------------------------*/ + #include "jsm.h" +-#include "crypt.h" ++#include + + #define HASH_CRYPT 1 + #define HASH_SHA1 2 diff --git a/net-im/jabber/pkg-deinstall b/net-im/jabber/pkg-deinstall index 7c67ecc0cca6..b886ee3b5b00 100644 --- a/net-im/jabber/pkg-deinstall +++ b/net-im/jabber/pkg-deinstall @@ -1,71 +1,19 @@ -#! /bin/sh +#!/bin/sh -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/spool/jabber' directory." + +exit 0 diff --git a/net-im/jabber/pkg-install b/net-im/jabber/pkg-install index 7714ddb1d21a..926e79391c4c 100644 --- a/net-im/jabber/pkg-install +++ b/net-im/jabber/pkg-install @@ -1,151 +1,56 @@ -#! /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." +#!/bin/sh + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +USER=jabber +GROUP=${USER} +UID=93 +GID=${UID} +SPOOLDIR="/var/spool/jabber" +ETCDIR=${PREFIX:-$PKG_PREFIX}/etc + +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." - 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 + echo "Adding group \"${GROUP}\" failed..." + 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." +fi + +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 "Please create it, and try again." - exit 1 - 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." + echo "Adding user \"${USER}\" failed..." exit 1 - fi fi - fi -} - -case $2 in - -POST-INSTALL) - if which -s pw && which -s lockf; then - : - else - cat < ${WRKSRC}/.wrksrc-freebsd - @echo "${PREFIX}" > ${WRKSRC}/.prefix-freebsd - @echo "${INSTALL_DATA}" > ${WRKSRC}/.install_data-freebsd - @echo "${INSTALL_SCRIPT}" > ${WRKSRC}/.install_script-freebsd - @echo "${INSTALL_PROGRAM}" > ${WRKSRC}/.install_program-freebsd + ${ECHO} "${WRKSRC}" > ${WRKSRC}/.wrksrc-freebsd + ${ECHO} "${PREFIX}" > ${WRKSRC}/.prefix-freebsd + ${ECHO} "${INSTALL_DATA}" > ${WRKSRC}/.install_data-freebsd + ${ECHO} "${INSTALL_SCRIPT}" > ${WRKSRC}/.install_script-freebsd + ${ECHO} "${INSTALL_PROGRAM}" > ${WRKSRC}/.install_program-freebsd post-install: - @PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${rc} + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + ${INSTALL_DATA} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/ .include diff --git a/net/jabber/distinfo b/net/jabber/distinfo index ab9a48722523..2dd9ec7c1caf 100644 --- a/net/jabber/distinfo +++ b/net/jabber/distinfo @@ -1,2 +1,2 @@ -MD5 (jabber/jabber-1.4.2.tar.gz) = 10780dbdb93926ea5bb360e1186b939c -SIZE (jabber/jabber-1.4.2.tar.gz) = 690217 +MD5 (jabber/jabberd-1.4.3.tar.gz) = a3e964d6fa07b5d850302ae0512f94c6 +SIZE (jabber/jabberd-1.4.3.tar.gz) = 258016 diff --git a/net/jabber/files/jabberd.sh b/net/jabber/files/jabberd.sh index d6aa960fb6f6..2ad8b7ea99c7 100644 --- a/net/jabber/files/jabberd.sh +++ b/net/jabber/files/jabberd.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then echo "$0: Cannot determine the PREFIX" >&2 diff --git a/net/jabber/files/patch-Makefile b/net/jabber/files/patch-Makefile new file mode 100644 index 000000000000..ce467316fcdd --- /dev/null +++ b/net/jabber/files/patch-Makefile @@ -0,0 +1,43 @@ +--- Makefile.orig Sat Jan 20 21:32:48 2001 ++++ Makefile Sun Apr 14 23:30:36 2002 +@@ -4,6 +4,10 @@ + include platform-settings + + 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` + + all: all-recursive + +@@ -13,8 +17,28 @@ + + 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} ${LIBDIR}/jsm ++ ${INSTALL_DATA} jsm/jsm.so ${LIBDIR}/jsm ++ ${INSTALL_DIR} ${LIBDIR}/xdb_file ++ ${INSTALL_DATA} xdb_file/xdb_file.so ${LIBDIR}/xdb_file ++ ${INSTALL_DIR} ${LIBDIR}/pthsock ++ ${INSTALL_DATA} pthsock/pthsock_client.so ${LIBDIR}/pthsock ++ ${INSTALL_DIR} ${LIBDIR}/dnsrv ++ ${INSTALL_DATA} dnsrv/dnsrv.so ${LIBDIR}/dnsrv ++ ${INSTALL_DIR} ${LIBDIR}/dialback ++ ${INSTALL_DATA} dialback/dialback.so ${LIBDIR}/dialback ++ ${INSTALL_DIR} ${INCDIR} ++ ${INSTALL_DATA} platform-settings ${INCDIR} ++ ${INSTALL_DATA} jabberd/jabberd.h ${INCDIR} ++ ${INSTALL_DIR} ${INCDIR}/lib ++ ${INSTALL_DATA} jabberd/lib/lib.h ${INCDIR}/lib ++ ${INSTALL_DATA} jabberd/lib/xmlparse.h ${INCDIR}/lib ++ + + all-local: + diff --git a/net/jabber/files/patch-aa b/net/jabber/files/patch-aa deleted file mode 100644 index 80239a100c69..000000000000 --- a/net/jabber/files/patch-aa +++ /dev/null @@ -1,57 +0,0 @@ ---- 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}"; - - - diff --git a/net/jabber/files/patch-ab b/net/jabber/files/patch-ab deleted file mode 100644 index 589e6646ceee..000000000000 --- a/net/jabber/files/patch-ab +++ /dev/null @@ -1,44 +0,0 @@ ---- Makefile.orig Sat Jan 20 21:32:48 2001 -+++ Makefile Sun Apr 14 23:30:36 2002 -@@ -4,6 +4,10 @@ - include platform-settings - - 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` - - all: all-recursive - -@@ -13,8 +17,29 @@ - - 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} ${LIBDIR}/jsm -+ ${INSTALL_DATA} jsm/jsm.so ${LIBDIR}/jsm -+ ${INSTALL_DIR} ${LIBDIR}/xdb_file -+ ${INSTALL_DATA} xdb_file/xdb_file.so ${LIBDIR}/xdb_file -+ ${INSTALL_DIR} ${LIBDIR}/pthsock -+ ${INSTALL_DATA} pthsock/pthsock_client.so ${LIBDIR}/pthsock -+ ${INSTALL_DIR} ${LIBDIR}/dnsrv -+ ${INSTALL_DATA} dnsrv/dnsrv.so ${LIBDIR}/dnsrv -+ ${INSTALL_DIR} ${LIBDIR}/dialback -+ ${INSTALL_DATA} dialback/dialback.so ${LIBDIR}/dialback -+ ${INSTALL_DIR} ${INCDIR} -+ ${INSTALL_DATA} platform-settings ${INCDIR} -+ ${INSTALL_DATA} jabberd/jabberd.h ${INCDIR} -+ ${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 --git a/net/jabber/files/patch-ac b/net/jabber/files/patch-ac deleted file mode 100644 index 45e15e08afaa..000000000000 --- a/net/jabber/files/patch-ac +++ /dev/null @@ -1,11 +0,0 @@ ---- jabber.xml.orig Sat Feb 3 22:46:56 2001 -+++ jabber.xml Sun Feb 11 01:19:01 2001 -@@ -576,7 +576,7 @@ - -- ./jabber.pid -+ /var/tmp/jabber.pid - - - diff --git a/net/jabber/files/patch-ad b/net/jabber/files/patch-ad deleted file mode 100644 index 63266c9a12eb..000000000000 --- a/net/jabber/files/patch-ad +++ /dev/null @@ -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 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. - --> - - localhost -@@ -193,7 +197,9 @@ - entry for above. - --> - -+ - - diff --git a/net/jabber/files/patch-configure b/net/jabber/files/patch-configure new file mode 100644 index 000000000000..07f6c8b3c757 --- /dev/null +++ b/net/jabber/files/patch-configure @@ -0,0 +1,9 @@ +--- 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`" diff --git a/net/jabber/files/patch-jabber.xml b/net/jabber/files/patch-jabber.xml new file mode 100644 index 000000000000..378893a1aea6 --- /dev/null +++ b/net/jabber/files/patch-jabber.xml @@ -0,0 +1,49 @@ +--- jabber.xml.orig Thu Nov 13 22:53:46 2003 ++++ jabber.xml Thu May 6 04:19:22 2004 +@@ -49,6 +49,10 @@ + separate virtual server. Note that each host entry must + be on one line, the server doesn't like it otherwise! :) + Use lowercase for the hostname. ++ ++ Currently on FreeBSD jabberd is started with the -h option ++ from /usr/local/etc/rc.d/jabberd.sh. You'll need to modify ++ it before the below applies. + --> + + localhost +@@ -356,7 +360,7 @@ + ./xdb_file/xdb_file.so + + +- ./spool ++ /var/spool/jabber + + + +@@ -430,7 +434,7 @@ + + + %d: [%t] (%h): %s +- error.log ++ /var/log/jabber.error + + + +@@ -443,7 +447,7 @@ + + record + %d %h %s +- record.log ++ /var/log/jabber.record + + + +@@ -668,7 +672,7 @@ + +- ./jabber.pid ++ /var/tmp/jabber.pid + + + diff --git a/net/jabber/files/patch-jsm-modules-mod_auth_crypt.c b/net/jabber/files/patch-jsm-modules-mod_auth_crypt.c new file mode 100644 index 000000000000..bc7d2121959e --- /dev/null +++ b/net/jabber/files/patch-jsm-modules-mod_auth_crypt.c @@ -0,0 +1,11 @@ +--- jsm/modules/mod_auth_crypt.c.orig Thu May 6 00:00:20 2004 ++++ jsm/modules/mod_auth_crypt.c Thu May 6 00:00:01 2004 +@@ -28,7 +28,7 @@ + * + * --------------------------------------------------------------------------*/ + #include "jsm.h" +-#include "crypt.h" ++#include + + #define HASH_CRYPT 1 + #define HASH_SHA1 2 diff --git a/net/jabber/pkg-deinstall b/net/jabber/pkg-deinstall index 7c67ecc0cca6..b886ee3b5b00 100644 --- a/net/jabber/pkg-deinstall +++ b/net/jabber/pkg-deinstall @@ -1,71 +1,19 @@ -#! /bin/sh +#!/bin/sh -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/spool/jabber' directory." + +exit 0 diff --git a/net/jabber/pkg-install b/net/jabber/pkg-install index 7714ddb1d21a..926e79391c4c 100644 --- a/net/jabber/pkg-install +++ b/net/jabber/pkg-install @@ -1,151 +1,56 @@ -#! /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." +#!/bin/sh + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +USER=jabber +GROUP=${USER} +UID=93 +GID=${UID} +SPOOLDIR="/var/spool/jabber" +ETCDIR=${PREFIX:-$PKG_PREFIX}/etc + +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." - 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 + echo "Adding group \"${GROUP}\" failed..." + 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." +fi + +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 "Please create it, and try again." - exit 1 - 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." + echo "Adding user \"${USER}\" failed..." exit 1 - fi fi - fi -} - -case $2 in - -POST-INSTALL) - if which -s pw && which -s lockf; then - : - else - cat <