From garga@data.galle.com.br  Tue Dec  6 09:25:14 2005
Return-Path: <garga@data.galle.com.br>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4CE7916A420
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Dec 2005 09:25:14 +0000 (GMT)
	(envelope-from garga@data.galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4453B43D72
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 Dec 2005 09:25:13 +0000 (GMT)
	(envelope-from garga@data.galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by data.galle.com.br (8.13.4/8.13.4) with ESMTP id jB69PBX8020523;
	Tue, 6 Dec 2005 07:25:11 -0200 (BRDT)
	(envelope-from garga@data.galle.com.br)
Received: (from garga@localhost)
	by data.galle.com.br (8.13.4/8.13.3/Submit) id jB69P41t020519;
	Tue, 6 Dec 2005 07:25:04 -0200 (BRDT)
	(envelope-from garga)
Message-Id: <200512060925.jB69P41t020519@data.galle.com.br>
Date: Tue, 6 Dec 2005 07:25:04 -0200 (BRDT)
From: Renato Botelho <garga@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: martijn@pacno.net
Subject: [PATCH] net-im/jabber-pymsn-transport: update to 0.10.2
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         90016
>Category:       ports
>Synopsis:       [PATCH] net-im/jabber-pymsn-transport: update to 0.10.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 06 09:30:01 GMT 2005
>Closed-Date:    Tue Dec 06 15:06:06 GMT 2005
>Last-Modified:  Tue Dec 06 15:06:06 GMT 2005
>Originator:     Renato Botelho
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD data.galle.com.br 6.0-STABLE FreeBSD 6.0-STABLE #6: Fri Nov  4 15:09:42 BRDT
>Description:
- Update to 0.10.2
- Add SHA256 hash
- Sort pkg-plist

Added file(s):
- files/patch-config-example.xml
- files/patch-src_config.py
- files/patch-src_main.py
- files/patch-src_utils.py

Port maintainer (martijn@pacno.net) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- jabber-pymsn-transport-0.10.2.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net-im/jabber-pymsn/Makefile,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile
--- Makefile	9 Nov 2005 07:48:12 -0000	1.5
+++ Makefile	6 Dec 2005 09:24:00 -0000
@@ -5,7 +5,7 @@
 # $FreeBSD: ports/net-im/jabber-pymsn/Makefile,v 1.5 2005/11/09 07:48:12 pav Exp $
 
 PORTNAME=	pymsn
-PORTVERSION=	0.10
+PORTVERSION=	0.10.2
 CATEGORIES=	net-im
 MASTER_SITES=	http://msn-transport.jabberstudio.org/tarballs/
 PKGNAMEPREFIX=	jabber-
@@ -32,16 +32,19 @@
 PORTDOCS=	COPYING README TODO
 
 post-extract:
-	@${FIND} ${WRKSRC}/ -type d -name CVS |xargs ${RM} -rf
+	@${FIND} ${WRKSRC}/ -type d \( -name CVS -or -name .svn \) | ${XARGS} ${RM} -rf
 
 post-patch:
-	@${REINPLACE_CMD} -e '/spooldir/s|/path/to/data|/var/spool/jabber|' \
-		-e '/pid/s|PyMSNt.pid|/var/jabberd/pid/${PORTNAME}.pid|' \
-		-e '/<debugOn>/s|<debugOn>|<!--<debugOn>-->|' \
+	@${REINPLACE_CMD} -i "" '/spooldir/s|/path/to/data|/var/spool/jabber|' \
 		${WRKSRC}/config-example.xml
-	@${REINPLACE_CMD} -e 's|../config.xml|${PREFIX}/etc/jabber-pymsn.xml|g' \
+	@${REINPLACE_CMD} -i "" 's|../config.xml|${PREFIX}/etc/jabber-pymsn.xml|g' \
 		${WRKSRC}/src/xmlconfig.py
-	@${RM} ${WRKSRC}/src/xmlconfig.py.bak
+	@${REINPLACE_CMD} -i "" 's|src/legacy|legacy|g' \
+		${WRKSRC}/src/legacy/glue.py \
+		${WRKSRC}/src/legacy/legacylist.py
+	@${REINPLACE_CMD} -i "" 's|%%PREFIX%%|${PREFIX}|g' \
+		${WRKSRC}/src/config.py
+	@${RM} -f ${WRKSRC}/src/*.orig
 	@${ECHO} '#!${PYTHON_CMD}' > ${WRKSRC}/src/main.py.new
 	@${CAT} ${WRKSRC}/src/main.py >> ${WRKSRC}/src/main.py.new
 	@${MV} ${WRKSRC}/src/main.py.new ${WRKSRC}/src/main.py
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/net-im/jabber-pymsn/distinfo,v
retrieving revision 1.4
diff -u -u -r1.4 distinfo
--- distinfo	17 Oct 2005 09:43:29 -0000	1.4
+++ distinfo	6 Dec 2005 09:24:00 -0000
@@ -1,2 +1,3 @@
-MD5 (jabber/pymsnt-0.10.tar.gz) = dc2ec5aacb754b6541b7b20668c3d2b4
-SIZE (jabber/pymsnt-0.10.tar.gz) = 123185
+MD5 (jabber/pymsnt-0.10.2.tar.gz) = 31f6c2b9a744e6291ab53cb57d97a109
+SHA256 (jabber/pymsnt-0.10.2.tar.gz) = e988fe454a96dc4b59f532ad7ab615fea0981402c5834bb90310dd34d2f22548
+SIZE (jabber/pymsnt-0.10.2.tar.gz) = 253552
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/net-im/jabber-pymsn/pkg-plist,v
retrieving revision 1.3
diff -u -u -r1.3 pkg-plist
--- pkg-plist	17 Oct 2005 09:43:29 -0000	1.3
+++ pkg-plist	6 Dec 2005 09:24:00 -0000
@@ -1,45 +1,47 @@
 @unexec if cmp -s %D/%%EXAMPLESDIR%%/etc/jabber-pymsn.xml %D/etc/jabber-pymsn.xml; then rm -f %D/etc/jabber-pymsn.xml; fi
 %%EXAMPLESDIR%%/etc/jabber-pymsn.xml
 @exec [ -f %D/etc/jabber-pymsn.xml ] || cp %B/%f %D/etc/jabber-pymsn.xml
+lib/jabber/pymsn/avatar.py
+lib/jabber/pymsn/baseproto/__init__.py
+lib/jabber/pymsn/baseproto/glue.py
+@unexec if cmp -s %D/lib/jabber/pymsn/config.py.sample %D/lib/jabber/pymsn/config.py; then rm -f %D/lib/jabber/pymsn/config.py; fi
+lib/jabber/pymsn/config.py.sample
+@exec [ -f %D/lib/jabber/pymsn/config.py ] || cp %B/%f %D/lib/jabber/pymsn/config.py
+lib/jabber/pymsn/contact.py
+lib/jabber/pymsn/debug.py
+lib/jabber/pymsn/disco.py
+lib/jabber/pymsn/groupchat.py
+lib/jabber/pymsn/housekeep.py
+lib/jabber/pymsn/jabw.py
+lib/jabber/pymsn/lang.py
+lib/jabber/pymsn/legacy/__init__.py
+lib/jabber/pymsn/legacy/defaultAvatar.png
+lib/jabber/pymsn/legacy/defaultJabberAvatar.png
+lib/jabber/pymsn/legacy/glue.py
+lib/jabber/pymsn/legacy/legacylist.py
+lib/jabber/pymsn/legacy/msnw.py
+lib/jabber/pymsn/main.py
+lib/jabber/pymsn/misciq.py
+lib/jabber/pymsn/msnp11chl.py
+lib/jabber/pymsn/msnp2p.py
+lib/jabber/pymsn/register.py
+lib/jabber/pymsn/session.py
+lib/jabber/pymsn/tlib/__init__.py
+lib/jabber/pymsn/tlib/domish.py
 lib/jabber/pymsn/tlib/jabber/__init__.py
 lib/jabber/pymsn/tlib/jabber/client.py
 lib/jabber/pymsn/tlib/jabber/component.py
 lib/jabber/pymsn/tlib/jabber/jid.py
 lib/jabber/pymsn/tlib/jabber/jstrports.py
 lib/jabber/pymsn/tlib/jabber/xmpp_stringprep.py
-lib/jabber/pymsn/tlib/domish.py
-lib/jabber/pymsn/tlib/__init__.py
 lib/jabber/pymsn/tlib/msn.py
 lib/jabber/pymsn/tlib/msnp11chl.py
 lib/jabber/pymsn/tlib/msnp2p.py
 lib/jabber/pymsn/tlib/proxy.py
 lib/jabber/pymsn/tlib/xmlstream.py
-lib/jabber/pymsn/baseproto/__init__.py
-lib/jabber/pymsn/baseproto/glue.py
-lib/jabber/pymsn/legacy/__init__.py
-lib/jabber/pymsn/legacy/defaultAvatar.png
-lib/jabber/pymsn/legacy/defaultJabberAvatar.png
-lib/jabber/pymsn/legacy/glue.py
-lib/jabber/pymsn/legacy/legacylist.py
-lib/jabber/pymsn/legacy/msnw.py
-lib/jabber/pymsn/avatar.py
-lib/jabber/pymsn/contact.py
-lib/jabber/pymsn/housekeep.py
-lib/jabber/pymsn/xmlconfig.py
-@unexec if cmp -s %D/lib/jabber/pymsn/config.py.sample %D/lib/jabber/pymsn/config.py; then rm -f %D/lib/jabber/pymsn/config.py; fi
-lib/jabber/pymsn/config.py.sample
-@exec [ -f %D/lib/jabber/pymsn/config.py ] || cp %B/%f %D/lib/jabber/pymsn/config.py
-lib/jabber/pymsn/register.py
-lib/jabber/pymsn/misciq.py
-lib/jabber/pymsn/main.py
 lib/jabber/pymsn/utils.py
-lib/jabber/pymsn/lang.py
-lib/jabber/pymsn/jabw.py
-lib/jabber/pymsn/groupchat.py
-lib/jabber/pymsn/disco.py
-lib/jabber/pymsn/debug.py
 lib/jabber/pymsn/xdb.py
-lib/jabber/pymsn/session.py
+lib/jabber/pymsn/xmlconfig.py
 @dirrm lib/jabber/pymsn/tlib/jabber
 @dirrm lib/jabber/pymsn/tlib
 @dirrm lib/jabber/pymsn/legacy
Index: files/jabber-pymsn-transport.sh.in
===================================================================
RCS file: /home/pcvs/ports/net-im/jabber-pymsn/files/jabber-pymsn-transport.sh.in,v
retrieving revision 1.1
diff -u -u -r1.1 jabber-pymsn-transport.sh.in
--- files/jabber-pymsn-transport.sh.in	19 Mar 2005 00:27:52 -0000	1.1
+++ files/jabber-pymsn-transport.sh.in	6 Dec 2005 09:24:00 -0000
@@ -18,7 +18,6 @@
 jabber_pymsn_piddir=${jabberd_pymsn_piddir-"/var/jabberd/pid"}
 jabber_pymsn_enable=${jabberd_pymsn_enable-"NO"}
 
-
 . %%RC_SUBR%%
 
 name="jabber_pymsn"
@@ -26,8 +25,8 @@
 command_interpreter="%%PYTHON_CMD%%"
 command="${jabber_pymsn_dir}/main.py"
 command_args="&"
+jabber_pymsn_chdir=${jabber_pymsn_dir}
 
-#procname="${PYTHON} ${jabber_pymsn_dir}/main.py"
 pidfile="${jabber_pymsn_piddir}/pymsn.pid"
 
 load_rc_config $name
Index: files/patch-config-example.xml
===================================================================
RCS file: files/patch-config-example.xml
diff -N files/patch-config-example.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-config-example.xml	6 Dec 2005 09:24:00 -0000
@@ -0,0 +1,11 @@
+--- config-example.xml.orig	Tue Dec  6 07:11:29 2005
++++ config-example.xml	Tue Dec  6 07:12:36 2005
+@@ -12,6 +12,8 @@
+ Do not include the jid of the transport -->
+ <!-- <spooldir>/path/to/data</spooldir> -->
+ 
++<!-- The location of the PID file (if relative, relative to the PyMSNt dir) -->
++<pid>/var/jabberd/pid/pymsn.pid</pid>
+ 
+ <!-- The IP address of the main Jabber server to connect to -->
+ <mainServer>127.0.0.1</mainServer>
Index: files/patch-src_config.py
===================================================================
RCS file: files/patch-src_config.py
diff -N files/patch-src_config.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src_config.py	6 Dec 2005 09:24:00 -0000
@@ -0,0 +1,17 @@
+--- src/config.py.orig	Mon Dec  5 16:43:57 2005
++++ src/config.py	Mon Dec  5 16:45:18 2005
+@@ -1,11 +1,12 @@
+ # This file contains the default settings for various options.
+ # Please edit config.xml instead of this file
+ 
+-configFile = "config.xml"
++configFile = "%%PREFIX%%/etc/jabber-pymsn.xml"
+ 
+ jid = "msn"
+ compjid = ""
+-spooldir = ""
++spooldir = "/tmp/jabber-pymsn"
++pid = "/var/jabberd/pid/pymsn.pid"
+ 
+ mainServer = "127.0.0.1"
+ mainServerJID = ""
Index: files/patch-src_main.py
===================================================================
RCS file: files/patch-src_main.py
diff -N files/patch-src_main.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src_main.py	6 Dec 2005 09:24:00 -0000
@@ -0,0 +1,28 @@
+--- src/main.py.orig	Mon Dec  5 16:39:23 2005
++++ src/main.py	Mon Dec  5 16:41:07 2005
+@@ -233,6 +233,17 @@
+ 
+ class App:
+ 	def __init__(self):
++		# Check that there isn't already a PID file
++		if(os.path.isfile(utils.doPath(config.pid))):
++			print "PID file exists at that location. Please check for running PyMSNt and try again."
++			sys.exit(1)
++
++		# Create a PID file
++		pid = str(os.getpid())
++		pf = file(utils.doPath(config.pid),'w')
++		pf.write("%s\n" % pid);
++		pf.close()
++
+ 		jid = config.jid
+ 		if config.compjid: jid = config.compjid
+ 		self.c = component.buildServiceManager(jid, config.secret, "tcp:%s:%s" % (config.mainServer, config.port))
+@@ -248,6 +259,7 @@
+ 	
+ 	def shuttingDown(self):
+ 		self.transportSvc.removeMe()
++		os.remove(utils.doPath(config.pid))
+ 		# Keep the transport running for another 3 seconds
+ 		def cb(ignored=None):
+ 			pass
Index: files/patch-src_utils.py
===================================================================
RCS file: files/patch-src_utils.py
diff -N files/patch-src_utils.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src_utils.py	6 Dec 2005 09:24:00 -0000
@@ -0,0 +1,12 @@
+--- src/utils.py.orig	Mon Dec  5 16:41:53 2005
++++ src/utils.py	Mon Dec  5 16:42:18 2005
+@@ -180,4 +180,8 @@
+ 	def flush(self):
+ 		self.lst = []
+ 
+-
++def doPath(path):
++	if(path and path[0] == "/"):
++		return path
++	else:
++		return "../" + path
--- jabber-pymsn-transport-0.10.2.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: garga 
Responsible-Changed-When: Tue Dec 6 09:30:51 GMT 2005 
Responsible-Changed-Why:  
it's mine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90016 
State-Changed-From-To: open->feedback 
State-Changed-By: garga 
State-Changed-When: Tue Dec 6 14:00:15 GMT 2005 
State-Changed-Why:  
Ask for maintainer approval. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90016 

From: Renato Botelho <garga@FreeBSD.org>
To: martijn@pacno.net
Cc: bug-followup@FreeBSD.org,  garga@freebsd.org
Subject: Re: ports/90016: [PATCH] net-im/jabber-pymsn-transport: update to
 0.10.2
Date: Tue, 06 Dec 2005 12:01:56 -0200

 Dear maintainer of FreeBSD port net/jabber-pymsn, please take a look at:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/90016
 
 Do you approve this patch?
 
 Thanks
 -- 
 Renato Botelho <garga @ FreeBSD.org>
                <freebsd @ galle.com.br>
 GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

From: martijn <martijn@pacno.net>
To: Renato Botelho <garga@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/90016: [PATCH] net-im/jabber-pymsn-transport: update to 0.10.2
Date: Tue, 6 Dec 2005 15:36:48 +0100

 Once upon a Tue, Dec 06 2005, Renato Botelho hit keys in the following order:
 > Dear maintainer of FreeBSD port net/jabber-pymsn, please take a look at:
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/90016
 > 
 > Do you approve this patch?
 
 Looks good, but i haven't got the time to test it. I trust you you did that
 already, so commit it if you want....
 
 I don't have a jabber server running at the moment... Will do in the near
 future, so i will be more actively maintaining this port.
 
 Thanks for the patch.
 
 martijn.
State-Changed-From-To: feedback->closed 
State-Changed-By: garga 
State-Changed-When: Tue Dec 6 15:06:05 GMT 2005 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90016 
>Unformatted:
