Date: Mon, 12 Jul 2004 17:11:20 -0500 (CDT) From: Kirk Strauser <kirk@strauser.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Kirk Strauser <kirk@strauser.com> Subject: ports/68963: Update net/jabberd to 2.0.3 Message-ID: <20040712221120.71138BA32@kanga.honeypot.net> Resent-Message-ID: <200407122220.i6CMKSuj081359@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 68963 >Category: ports >Synopsis: Update net/jabberd to 2.0.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 12 22:20:28 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Kirk Strauser >Release: FreeBSD 5.2-CURRENT i386 >Organization: The Day Companies >Environment: System: FreeBSD kanga.honeypot.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Apr 8 15:37:48 CDT 2004 root@kanga.honeypot.net:/usr/obj/usr/src/sys/NEW_KANGA i386 >Description: This is an update of the net/jabberd port to version 2.0.3 (vendor string "2.0s3") which fixes some serious memory leaks and other significant bugs. This update also replaces the rc.d script with a new version that uses the rc.subr framework. I was able to successfully compile the port with all of the WITH_* knobs, but only have the means to test WITH_POSTGRESQL (which worked as expected). >How-To-Repeat: >Fix: --- jabberd.port begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # net/jabberd # net/jabberd/files # net/jabberd/files/patch-util.h # net/jabberd/files/jabberd.sh # net/jabberd/files/patch-configure # net/jabberd/Makefile # net/jabberd/distinfo # net/jabberd/pkg-deinstall # net/jabberd/pkg-descr # net/jabberd/pkg-install # net/jabberd/pkg-plist # echo c - net/jabberd mkdir -p net/jabberd > /dev/null 2>&1 echo c - net/jabberd/files mkdir -p net/jabberd/files > /dev/null 2>&1 echo x - net/jabberd/files/patch-util.h sed 's/^X//' >net/jabberd/files/patch-util.h << 'END-of-net/jabberd/files/patch-util.h' X--- util/util.h.orig Mon May 31 16:31:06 2004 X+++ util/util.h Mon Jul 12 10:29:58 2004 X@@ -30,6 +30,7 @@ X #include <time.h> X #include <errno.h> X #include <assert.h> X+#include <sys/socket.h> X X #ifdef HAVE_NETINET_IN_H X # include <netinet/in.h> END-of-net/jabberd/files/patch-util.h echo x - net/jabberd/files/jabberd.sh sed 's/^X//' >net/jabberd/files/jabberd.sh << 'END-of-net/jabberd/files/jabberd.sh' X#!/bin/sh X X# Start or stop jabberd X# $FreeBSD: $ X X# PROVIDE: jabberd X# REQUIRE: DAEMON X# BEFORE: LOGIN X# KEYWORD: FreeBSD shutdown X# Xprefix=/usr/local X X# Define these jabberd_* variables in one of these files: X# /etc/rc.conf X# /etc/rc.conf.local X# /etc/rc.conf.d/gkrellmd X# X# DO NOT CHANGE THESE DEFAULT VALUES HERE X# Xjabberd_chdir="/var/jabberd/pid" Xjabberd_enable="NO" Xjabberd_flags="" Xjabberd_user="jabber" X X. /etc/rc.subr X Xname="jabberd" Xrcvar=`set_rcvar` Xcommand="/usr/local/bin/jabberd" Xcommand_args="&" Xprocname="/usr/local/bin/router" X Xload_rc_config $name X Xpidfile="${jabberd_chdir}/router.pid" X Xcase "$1" in X stop) X echo "Stopping Jabber2" X killall -u ${jabberd_user} jabberd c2s resolver router s2s sm X for file in c2s resolver router s2s sm; do X rm -f ${jabberd_chdir}/$file.pid X done X ;; X *) X run_rc_command "$1" X ;; Xesac END-of-net/jabberd/files/jabberd.sh echo x - net/jabberd/files/patch-configure sed 's/^X//' >net/jabberd/files/patch-configure << 'END-of-net/jabberd/files/patch-configure' X--- configure.orig Mon Jul 12 10:15:17 2004 X+++ configure Mon Jul 12 10:15:26 2004 X@@ -20575,7 +20575,7 @@ X done X X if test "x-$ac_cv_header_db_h" = "x-yes" ; then X- for lib in db-4.2 db-4.1 db-4 db4 db ; do X+ for lib in db-4.2 db-4.1 db-4 db4 db41 ; do X if test "x-$have_db_version" != "x-yes" ; then X echo "$as_me:$LINENO: checking for db_create in -l$lib" >&5 X echo $ECHO_N "checking for db_create in -l$lib... $ECHO_C" >&6 END-of-net/jabberd/files/patch-configure echo x - net/jabberd/Makefile sed 's/^X//' >net/jabberd/Makefile << 'END-of-net/jabberd/Makefile' X# New ports collection makefile for: jabberd X# Date created: 29 December 2003 X# Whom: Dmitry Sivachenko <demon@FreeBSD.org> X# X# $FreeBSD: ports/net/jabberd/Makefile,v 1.15 2004/06/14 10:01:47 demon Exp $ X# X XPORTNAME= jabberd XPORTVERSION= 2.0.3 XCATEGORIES= net XMASTER_SITES= http://www.jabberstudio.org/files/jabberd2/ XDISTNAME= ${PORTNAME}-2.0s3 XDIST_SUBDIR= jabber X XMAINTAINER= demon@FreeBSD.org XCOMMENT= Online presence and instant messaging server X XGNU_CONFIGURE= yes XUSE_OPENSSL= yes XUSE_ICONV= yes XUSE_RC_SUBR= yes XCONFIGURE_ARGS= --localstatedir=/var \ X --enable-ssl \ X --with-extra-include-path=${LOCALBASE}/include:${LOCALBASE}/include/mysql \ X --with-extra-library-path=${LOCALBASE}/lib:${LOCALBASE}/lib/mysql X XCONFIGURE_ARGS+=--enable-fs X X.if !defined(WITHOUT_DEBUG) XCONFIGURE_ARGS+=--enable-debug X.endif X X.if defined(WITH_POSTGRESQL) XLIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7 XCONFIGURE_ARGS+=--enable-pgsql X.endif X X.if defined(WITH_MYSQL) XUSE_MYSQL= yes XCONFIGURE_ARGS+=--enable-mysql X.else XCONFIGURE_ARGS+=--disable-mysql X.endif X X.if defined(WITH_BDB) XLIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 XCONFIGURE_ARGS+=--enable-db X.endif X X.if defined(WITH_LDAP) XUSE_OPENLDAP= yes XCONFIGURE_ARGS+=--enable-ldap X.endif X X.if defined(WITH_PAM) XCONFIGURE_ARGS+=--enable-pam X.endif X XMAN8= c2s.8 jabberd.8 resolver.8 router.8 s2s.8 sm.8 X Xpre-everything:: X @${ECHO} X @${ECHO} "You can build Jabber with the following options:" X @${ECHO} "WITH_POSTGRESQL use PostgreSQL for storage and authentication" X @${ECHO} "WITH_BDB use Berkeley DB for storage and authentication" X @${ECHO} "WITH_MYSQL use MySQL for storage and authentication" X @${ECHO} "WITH_LDAP use LDAP for authentication" X @${ECHO} "WITH_PAM use PAM for authentication" X @${ECHO} X Xpre-install: X PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL X Xpost-install: X ${ECHO} "Installing ${PREFIX}/etc/rc.d/jabberd.sh startup file."; \ X ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh; \ X @${CHOWN} -R jabber:jabber ${PREFIX}/etc/jabberd X @${FIND} ${PREFIX}/etc/jabberd -type d | ${XARGS} ${CHMOD} 750 X @${FIND} ${PREFIX}/etc/jabberd -type f | ${XARGS} ${CHMOD} 660 X @${MKDIR} ${PREFIX}/share/jabberd X @${INSTALL_DATA} ${WRKSRC}/tools/db-setup.mysql ${PREFIX}/share/jabberd X @${INSTALL_DATA} ${WRKSRC}/tools/db-setup.pgsql ${PREFIX}/share/jabberd X X.include <bsd.port.mk> END-of-net/jabberd/Makefile echo x - net/jabberd/distinfo sed 's/^X//' >net/jabberd/distinfo << 'END-of-net/jabberd/distinfo' XMD5 (jabber/jabberd-2.0s3.tar.gz) = c15f8f07cb2ee499cd21c0b883b9f353 XSIZE (jabber/jabberd-2.0s3.tar.gz) = 705819 END-of-net/jabberd/distinfo echo x - net/jabberd/pkg-deinstall sed 's/^X//' >net/jabberd/pkg-deinstall << 'END-of-net/jabberd/pkg-deinstall' X#!/bin/sh X# $FreeBSD: ports/net/jabberd/pkg-deinstall,v 1.3 2004/01/01 13:21:15 demon Exp $ X# X Xif [ "$2" != "POST-DEINSTALL" ]; then X exit 0 Xfi X XUSER=jabber X Xif pw usershow "${USER}" 2>/dev/null 1>&2; then X echo "To delete Jabber user permanently, use 'pw userdel ${USER}'" Xfi X Xif pw groupshow "${USER}" 2>/dev/null 1>&2; then X echo "To delete Jabber group permanently, use 'pw groupdel ${USER}'" Xfi X Xecho "If you wish to delete jabber data files, remove '/var/jabberd' directory." X Xexit 0 END-of-net/jabberd/pkg-deinstall echo x - net/jabberd/pkg-descr sed 's/^X//' >net/jabberd/pkg-descr << 'END-of-net/jabberd/pkg-descr' XThe Jabber server (jabberd) is a daemon for Jabber clients to connect Xand communicate with. X XWWW: http://jabberd.jabberstudio.org/ END-of-net/jabberd/pkg-descr echo x - net/jabberd/pkg-install sed 's/^X//' >net/jabberd/pkg-install << 'END-of-net/jabberd/pkg-install' X#!/bin/sh X# $FreeBSD: ports/net/jabberd/pkg-install,v 1.3 2004/01/09 11:30:09 demon Exp $ X# X Xif [ "$2" != "PRE-INSTALL" ]; then X exit 0 Xfi X XUSER=jabber XGROUP=${USER} XUID=93 XGID=${UID} X Xif ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then X if pw groupadd ${GROUP} -g ${GID}; then X echo "Added group \"${GROUP}\"." X else X echo "Adding group \"${GROUP}\" failed..." X exit 1 X fi Xfi X Xif ! pw usershow "${USER}" 2>/dev/null 1>&2; then X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ X -s "/sbin/nologin" -d "/nonexistent" \ X -c "Jabber Daemon"; \ X then X echo "Added user \"${USER}\"." X else X echo "Adding user \"${USER}\" failed..." X exit 1 X fi Xfi X Xmkdir -m 750 /var/jabberd /var/jabberd/db /var/jabberd/pid /var/jabberd/log Xchown jabber:jabber /var/jabberd /var/jabberd/db /var/jabberd/pid /var/jabberd/log X Xexit 0 END-of-net/jabberd/pkg-install echo x - net/jabberd/pkg-plist sed 's/^X//' >net/jabberd/pkg-plist << 'END-of-net/jabberd/pkg-plist' Xbin/c2s Xbin/jabberd Xbin/resolver Xbin/router Xbin/s2s Xbin/sm X@unexec if cmp -s %D/etc/jabberd/c2s.xml %D/etc/jabberd/c2s.xml.dist; then rm -f %D/etc/jabberd/c2s.xml; fi Xetc/jabberd/c2s.xml.dist X@unexec if cmp -s %D/etc/jabberd/jabberd.cfg %D/etc/jabberd/jabberd.cfg.dist; then rm -f %D/etc/jabberd/jabberd.cfg; fi Xetc/jabberd/jabberd.cfg.dist X@unexec if cmp -s %D/etc/jabberd/resolver.xml %D/etc/jabberd/resolver.xml.dist; then rm -f %D/etc/jabberd/resolver.xml; fi Xetc/jabberd/resolver.xml.dist X@unexec if cmp -s %D/etc/jabberd/router-users.xml %D/etc/jabberd/router-users.xml.dist; then rm -f %D/etc/jabberd/router-users.xml; fi Xetc/jabberd/router-users.xml.dist X@unexec if cmp -s %D/etc/jabberd/router.xml %D/etc/jabberd/router.xml.dist; then rm -f %D/etc/jabberd/router.xml; fi Xetc/jabberd/router.xml.dist X@unexec if cmp -s %D/etc/jabberd/s2s.xml %D/etc/jabberd/s2s.xml.dist; then rm -f %D/etc/jabberd/s2s.xml; fi Xetc/jabberd/s2s.xml.dist X@unexec if cmp -s %D/etc/jabberd/sm.xml %D/etc/jabberd/sm.xml.dist; then rm -f %D/etc/jabberd/sm.xml; fi Xetc/jabberd/sm.xml.dist X@unexec if cmp -s %D/etc/jabberd/templates/roster.xml %D/etc/jabberd/templates/roster.xml.dist; then rm -f %D/etc/jabberd/templates/roster.xml; fi Xetc/jabberd/templates/roster.xml.dist X@unexec if cmp -s %D/etc/rc.d/jabberd.sh %D/etc/rc.d/jabberd.sh; then rm -f %D/etc/rc.d/jabberd.sh; fi Xetc/rc.d/jabberd.sh Xshare/jabberd/db-setup.mysql Xshare/jabberd/db-setup.pgsql X@dirrm share/jabberd X@dirrm etc/jabberd/templates X@dirrm etc/jabberd END-of-net/jabberd/pkg-plist exit --- jabberd.port ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040712221120.71138BA32>