ports/90016: [PATCH] net-im/jabber-pymsn-transport: update to 0.10.2

Renato Botelho garga at FreeBSD.org
Tue Dec 6 09:30:18 UTC 2005


>Number:         90016
>Category:       ports
>Synopsis:       [PATCH] net-im/jabber-pymsn-transport: update to 0.10.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 06 09:30:01 GMT 2005
>Closed-Date:
>Last-Modified:
>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 at 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
+ at 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
+ at 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
- at 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
- at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list