From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 11 16:40:16 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65EDB16A405 for ; Sun, 11 Mar 2007 16:40:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5F213C469 for ; Sun, 11 Mar 2007 16:40:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2BGeGGE056308 for ; Sun, 11 Mar 2007 16:40:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2BGeGj1056307; Sun, 11 Mar 2007 16:40:16 GMT (envelope-from gnats) Resent-Date: Sun, 11 Mar 2007 16:40:16 GMT Resent-Message-Id: <200703111640.l2BGeGj1056307@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Matuska Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 806CE16A410 for ; Sun, 11 Mar 2007 16:32:48 +0000 (UTC) (envelope-from rebum@mail.vx.sk) Received: from mail.vx.sk (neo.vx.sk [88.198.35.14]) by mx1.freebsd.org (Postfix) with ESMTP id AD62213C4B9 for ; Sun, 11 Mar 2007 16:32:47 +0000 (UTC) (envelope-from rebum@mail.vx.sk) Received: from localhost (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id B48053F46B for ; Sun, 11 Mar 2007 17:32:46 +0100 (CET) Received: from mail.vx.sk ([127.0.0.1]) by localhost (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id s0-uKRPs09Wd for ; Sun, 11 Mar 2007 17:32:43 +0100 (CET) Received: by mail.vx.sk (Postfix, from userid 1001) id 464393F468; Sun, 11 Mar 2007 17:32:43 +0100 (CET) Message-Id: <20070311163243.464393F468@mail.vx.sk> Date: Sun, 11 Mar 2007 17:32:43 +0100 (CET) From: Martin Matuska To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/110195: [PATCH] net-im/jabber-pymsn X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2007 16:40:16 -0000 >Number: 110195 >Category: ports >Synopsis: [PATCH] net-im/jabber-pymsn >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: Sun Mar 11 16:40:15 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Martin Matuska >Release: FreeBSD 6.2-RELEASE >Organization: >Environment: FreeBSD 6.2-RELEASE i386 and amd64 >Description: This patch adds the following: - support and documentation for use with jabberd-1.6.0 from net-im/jabber - support for other and external servers (if running the transport only) >How-To-Repeat: >Fix: diff -Nbur net-im/jabber-pymsn.orig/Makefile net-im/jabber-pymsn/Makefile --- net-im/jabber-pymsn.orig/Makefile Mon Jan 15 13:03:27 2007 +++ net-im/jabber-pymsn/Makefile Sun Mar 11 17:30:55 2007 @@ -6,6 +6,7 @@ PORTNAME= pymsn DISTVERSION= 0.11.2 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-im MASTER_SITES= http://delx.cjb.net/pymsnt/tarballs/ \ @@ -22,7 +23,9 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenSSL/__init__.py:${PORTSDIR}/security/py-openssl \ ${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging -OPTIONS= EJABBERD "Use transport with ejabberd" off \ +OPTIONS= JABBER "Use with jabberd14 (net-im/jabber)" off \ + JABBERD "Use with jabberd 2.x (net-im/jabberd)" off \ + EJABBERD "Use with ejabberd (net-im/ejabberd)" off \ TWISTED1 "Use old py-twisted 1.x" off NO_BUILD= yes @@ -30,23 +33,48 @@ USE_RC_SUBR= jabber-pymsn-transport.sh LOCAL_PYTHON= ${PYTHON_CMD} -SUB_FILES= pkg-message +SUB_FILES= pkg-message README.jabberd14 README.jabberd2 README.external SUB_LIST= PYTHON_CMD=${LOCAL_PYTHON} INST_DIR= ${PREFIX}/lib/jabber/${PORTNAME} -PORTDOCS= COPYING README +PORTDOCS= COPYING README README.jabberd14 README.jabberd2 README.external .include -.if defined(WITH_EJABBERD) +.if (defined(WITH_JABBERD) && (defined(WITH_JABBER) || defined(WITH_EJABBERD))) || \ + defined(WITH_JABBER) && defined(WITH_EJABBERD) +IGNORE= options WITH_JABBER, WITH_JABBERD and WITH_EJABBERD are mutually exclusive +.endif + +.if defined(WITH_JABBER) +JABBER_REQUIRE?= jabber +JABBER_USER?= jabber +JABBER_PIDDIR?= /var/run/jabberd +JABBER_SPOOLDIR?= /var/spool/jabberd +RUN_DEPENDS+= jabberd14:${PORTSDIR}/net-im/jabber +.elif defined(WITH_JABBERD) +JABBER_REQUIRE?= jabberd +JABBER_USER?= jabber +JABBER_PIDDIR?= /var/jabberd/pid +JABBER_SPOOLDIR?= /var/spool/jabber +RUN_DEPENDS+= jabberd:${PORTSDIR}/net-im/jabberd +.elif defined(WITH_EJABBERD) +JABBER_REQUIRE?= ejabberd JABBER_USER?= ejabberd -SUB_LIST+= JABBER_REQUIRE=ejabberd +JABBER_PIDDIR?= /var/jabberd/pid +JABBER_SPOOLDIR?= /var/spool/jabber +RUN_DEPENDS+= ejabberd:${PORTSDIR}/net-im/ejabberd .else -JABBER_USER?= jabber -SUB_LIST+= JABBER_REQUIRE=jabberd +JABBER_REQUIRE?= DAEMON +JABBER_USER?= nobody +JABBER_PIDDIR?= /var/run/pymsn +JABBER_SPOOLDIR?= /var/spool/pymsn .endif +SUB_LIST+= JABBER_REQUIRE="${JABBER_REQUIRE}" JABBER_PIDDIR="${JABBER_PIDDIR}" \ + JABBER_SPOOLDIR="${JABBER_SPOOLDIR}" + .if defined(WITH_TWISTED1) RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted .else @@ -61,13 +89,13 @@ @${FIND} ${WRKSRC}/ -type d \( -name CVS -or -name .svn \) | ${XARGS} ${RM} -rf post-patch: - @${REINPLACE_CMD} -i "" -e '/spooldir/s|/path/to/data|/var/spool/jabber|' \ - -e 's|PyMSNt.pid|/var/jabberd/pid/PyMSNt.pid|' \ + @${REINPLACE_CMD} -i "" -e '/spooldir/s|/path/to/data|${JABBER_SPOOLDIR}|' \ + -e 's|PyMSNt.pid|${JABBER_PIDDIR}/PyMSNt.pid|' \ ${WRKSRC}/config-example.xml @${REINPLACE_CMD} -i "" 's|../config.xml|${PREFIX}/etc/jabber-pymsn.xml|g' \ ${WRKSRC}/src/xmlconfig.py - @${REINPLACE_CMD} -i "" -e 's|spooldir = ""|spooldir = "/var/spool/jabber"|g' \ - -e 's|pid = ""|pid = "/var/jabberd/pid/PyMSNt.pid"|g' \ + @${REINPLACE_CMD} -i "" -e 's|spooldir = ""|spooldir = "${JABBER_SPOOLDIR}"|g' \ + -e 's|pid = ""|pid = "${JABBER_PIDDIR}/PyMSNt.pid"|g' \ ${WRKSRC}/src/config.py @${REINPLACE_CMD} -i "" 's|"config.xml"|"${PREFIX}/etc/jabber-pymsn.xml"|' \ ${WRKSRC}/src/main.py @@ -88,6 +116,9 @@ @[ -f ${PREFIX}/etc/jabber-pymsn.xml ] || ${CP} -v ${EXAMPLESDIR}/etc/jabber-pymsn.xml ${PREFIX}/etc/jabber-pymsn.xml .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} +.for FILE in README.jabberd14 README.jabberd2 README.external + ${CP} ${WRKDIR}/${FILE} ${WRKSRC}/${FILE} +.endfor .for portdoc in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${portdoc} ${DOCSDIR}/ .endfor diff -Nbur net-im/jabber-pymsn.orig/files/README.external.in net-im/jabber-pymsn/files/README.external.in --- net-im/jabber-pymsn.orig/files/README.external.in Thu Jan 1 01:00:00 1970 +++ net-im/jabber-pymsn/files/README.external.in Sun Mar 11 17:19:22 2007 @@ -0,0 +1,14 @@ +# PyMSN-t and external jabber servers on FreeBSD +# README by Martin Matuska + +If you did not select WITH_JABBER, WITH_JABBERD or WITH_EJABBERD, you may want +to use another or external jabber server. To run the transport locally, you may +need to create the pid and spool directories manually. + +Default pahts of the current installation are: +%%JABBER_PIDDIR%% +%%JABBER_SPOOLDIR%% + +You should make these paths writable for the service user. +Default service user for this installation: +%%JABBER_USER%% \ No newline at end of file diff -Nbur net-im/jabber-pymsn.orig/files/README.jabberd14.in net-im/jabber-pymsn/files/README.jabberd14.in --- net-im/jabber-pymsn.orig/files/README.jabberd14.in Thu Jan 1 01:00:00 1970 +++ net-im/jabber-pymsn/files/README.jabberd14.in Sun Mar 11 16:58:03 2007 @@ -0,0 +1,39 @@ +# PyMSN-t and jabberd14 (net-im/jabber) on FreeBSD +# README by Martin Matuska + +The sample configuration file for jabberd14 may be located in: +%%TARGETDIR%%/etc/jabber.xml.sample + +Please make all necessary changes to your configuration file which may be: +%%TARGETDIR%%/etc/jabber.xml + +NOTE: if you want this service to be accessible from other servers, + change any 'msn.localhost' listed below to a fully qualified domain name! + Please make sure that your directives are _NOT_ in an XML comment: there + are many multi-line comments. + +To activate the MSN transport for your Jabber server, +add the following to your configuration file and adjust to your settings +(around line 921 in the sample configuration file): +------------------------------------------------------------------------------- + + + + 127.0.0.1 + 5347 + password + + + +------------------------------------------------------------------------------- +Add this section to the browse area of the jsm to advertise it to +your users (around line 382 of the sample config): +------------------------------------------------------------------------------- + + + jabber:iq:gateway + jabber:iq:register + + +------------------------------------------------------------------------------- +Be sure to restart your server after reconfiguring. diff -Nbur net-im/jabber-pymsn.orig/files/README.jabberd2.in net-im/jabber-pymsn/files/README.jabberd2.in --- net-im/jabber-pymsn.orig/files/README.jabberd2.in Thu Jan 1 01:00:00 1970 +++ net-im/jabber-pymsn/files/README.jabberd2.in Sun Mar 11 17:11:05 2007 @@ -0,0 +1,11 @@ +# PyMSN-t and jabberd2 (net-im/jabberd) on FreeBSD +# README by Martin Matuska + +The configuration for jabberd2 is located in: +%%TARGETDIR%%/etc/jabberd + +If you are using Jabberd2 then you shouldn't have to do much configuration. +Make sure the 'mainServer' setting is the IP or DNS of your Jabber server, and +leave the 'port' setting alone. Double-check that the secret for legacy +components in router.xml (for Jabberd2) is the same as the secret setting in +config.py. That should be all. You don't even need to restart Jabberd2. diff -Nbur net-im/jabber-pymsn.orig/files/jabber-pymsn-transport.sh.in net-im/jabber-pymsn/files/jabber-pymsn-transport.sh.in --- net-im/jabber-pymsn.orig/files/jabber-pymsn-transport.sh.in Wed Apr 26 13:42:13 2006 +++ net-im/jabber-pymsn/files/jabber-pymsn-transport.sh.in Sun Mar 11 15:02:06 2007 @@ -21,7 +21,7 @@ : ${jabber_pymsn_enable="NO"} : ${jabber_pymsn_dir="%%PREFIX%%/lib/jabber/pymsn"} -: ${jabber_pymsn_piddir="/var/jabberd/pid"} +: ${jabber_pymsn_piddir="%%JABBER_PIDDIR%%"} : ${jabber_pymsn_user="%%JABBER_USER%%"} pidfile="${jabber_pymsn_piddir}/PyMSNt.pid" diff -Nbur net-im/jabber-pymsn.orig/files/pkg-message.in net-im/jabber-pymsn/files/pkg-message.in --- net-im/jabber-pymsn.orig/files/pkg-message.in Sat Mar 19 01:27:52 2005 +++ net-im/jabber-pymsn/files/pkg-message.in Sun Mar 11 17:16:36 2007 @@ -11,12 +11,11 @@ * You can also turn on debugging options, and customise some of the text that is sent to the users in this file. -If you are using Jabberd2 then you shouldn't have to do much configuration. -Make sure the 'mainServer' setting is the IP or DNS of your Jabber server, and -leave the 'port' setting alone. Double-check that the secret for legacy -components in router.xml (for Jabberd2) is the same as the secret setting in -config.py. That should be all. You don't even need to restart Jabberd2. +Please read instructions for different jabber daemons you desire to use: +- jabberd14 (net-im/jabber): %%DOCSDIR%%/README.jabberd14 +- jabberd2 (net-im/jabberd): %%DOCSDIR%%/README.jabberd2 -If you are using Jabberd1.4.x, it's a bit more complicated. Follow the setup -instructions at http://msn-transport.jabberstudio.org/docs/server.html. +If you did not select WITH_JABBER, WITH_JABBERD or WITH_EJABBERD, you may want +to use another or an external jabber server. Please read instructions from: +%%DOCSDIR%%/README.external ****************************************************************************** >Release-Note: >Audit-Trail: >Unformatted: