Bug 170124 - net/spread: perl extension included in spread-src is broken
Summary: net/spread: perl extension included in spread-src is broken
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-25 00:20 UTC by marcellocoutinho
Modified: 2012-08-25 19:50 UTC (History)
0 users

See Also:


Attachments
spread.shar (27.52 KB, application/x-shar)
2012-07-25 22:57 UTC, marcellocoutinho
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcellocoutinho 2012-07-25 00:20:02 UTC
spread.pm module return errors after package install

Invalid version format (non-numeric data) at /usr/pbi/proxy_mod_security-amd64/lib/perl5/5.14.2/mach/DynaLoader.pm line 213.
Compilation failed in require at ./httpd-guardian.pl line 101.
BEGIN failed--compilation aborted at ./httpd-guardian.pl line 101.

Fix: 

I'm not that good on port patches but if port's can download latest module version from cpan http://search.cpan.org/CPAN/authors/id/J/JE/JESUS/Spread-3.17.4.4.tar.gz
extract it on work/spread-src-3.17.4/perl/Spread to replace old version
remove current patch file rm -f files/patch-perl__Spread__Spread.pm

it will compile and run correctly.
How-To-Repeat: just install spread port and test the module on perl 


cat /root/teste.pl 
#####################
#!/usr/bin/perl

use Spread;
#####################
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-07-27 18:29:51 UTC
State Changed
From-To: open->feedback

to which port does this PR apply? 


Comment 2 Mark Linimon freebsd_committer freebsd_triage 2012-07-27 18:29:51 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs
Comment 3 marcellocoutinho 2012-07-27 18:58:48 UTC
it applies to net/spread
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-07-27 22:18:52 UTC
State Changed
From-To: feedback->open

feedback received.
Comment 5 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-07-28 17:08:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-apache

Over to maintainer.
Comment 6 Olli Hauer freebsd_committer freebsd_triage 2012-08-25 18:47:35 UTC
Responsible Changed
From-To: freebsd-apache->ohauer

I'll take it
Comment 7 dfilter service freebsd_committer freebsd_triage 2012-08-25 19:44:48 UTC
Author: ohauer
Date: Sat Aug 25 18:44:32 2012
New Revision: 303152
URL: http://svn.freebsd.org/changeset/ports/303152

Log:
  - update included Spread.pm to the latest version
    http://search.cpan.org/CPAN/authors/id/J/JE/JESUS/Spread-3.17.4.4.tar.gz
  
  - assign the port from apache@ tp ports@ (port is not apache related)
  
  PR:		ports/170124
  Submitted by:	Marcello Coutinho <marcellocoutinho@gmail.com>

Modified:
  head/net/spread/Makefile
  head/net/spread/files/patch-perl__Spread__Spread.pm

Modified: head/net/spread/Makefile
==============================================================================
--- head/net/spread/Makefile	Sat Aug 25 17:52:08 2012	(r303151)
+++ head/net/spread/Makefile	Sat Aug 25 18:44:32 2012	(r303152)
@@ -7,12 +7,12 @@
 
 PORTNAME=	spread
 PORTVERSION=	3.17.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net perl5
 MASTER_SITES=	http://www.edu-linux.org/down/
 DISTNAME=	${PORTNAME}-src-${PORTVERSION}
 
-MAINTAINER=	apache@FreeBSD.org
+MAINTAINER=	ports@FreeBSD.org
 COMMENT=	The Spread Group Communication System, a network toolkit
 
 MAKE_JOBS_UNSAFE=	yes

Modified: head/net/spread/files/patch-perl__Spread__Spread.pm
==============================================================================
--- head/net/spread/files/patch-perl__Spread__Spread.pm	Sat Aug 25 17:52:08 2012	(r303151)
+++ head/net/spread/files/patch-perl__Spread__Spread.pm	Sat Aug 25 18:44:32 2012	(r303152)
@@ -1,13 +1,124 @@
---- perl/Spread/Spread.pm	Mon Dec  8 21:12:18 2003
-+++ perl/Spread/Spread.pm	Mon Dec  8 21:15:44 2003
-@@ -177,8 +177,8 @@
+# This patch updates the included perl module to the latest version.
+# Original Spread.pm plus included test script can be found here:
+# http://search.cpan.org/CPAN/authors/id/J/JE/JESUS/Spread-3.17.4.4.tar.gz
+===========================================================================
+--- ./perl/Spread/Spread.pm.orig	2002-09-26 15:54:46.000000000 +0200
++++ ./perl/Spread/Spread.pm	2012-08-25 20:16:53.000000000 +0200
+@@ -1,9 +1,8 @@
+ # Filename: Spread.pm
+ # Author:   Theo Schlossnagle <jesus@cnds.jhu.edu>
+ # Created:  12th October 1999
+-# Version:  1.03152
+ #
+-# Copyright (c) 1999-2001 Theo Schlossnagle. All rights reserved.
++# Copyright (c) 1999-2006,2008 Theo Schlossnagle. All rights reserved.
+ #   This program is free software; you can redistribute it and/or
+ #   modify it under the same terms as Perl itself.
+ #
+@@ -20,7 +19,7 @@
+ use strict;
+ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
+ 
+-$VERSION = "3.17.0-1.04" ;
++$VERSION = "3.17.4.4" ;
+ 
+ *SP_connect = \&Spread::connect;
+ *SP_disconnect = \&Spread::disconnect;
+@@ -52,7 +51,8 @@
+ 			     CAUSED_BY_LEAVE
+ 			     CAUSED_BY_DISCONNECT
+ 			     CAUSED_BY_NETWORK
+-			     MEMBERSHIP_MESS) ],
++			     MEMBERSHIP_MESS
++			     REJECT_MESS) ],
+ 		ERROR => [ qw($sperrno
+ 			      ACCEPT_SESSION
+ 			      ILLEGAL_GROUP
+@@ -71,7 +71,7 @@
+ 			      REJECT_QUOTA
+ 			      REJECT_VERSION) ],
+ 		SP => [ qw(SP_connect
+-			   SP_disconnecct
++			   SP_disconnect
+ 			   SP_join
+ 			   SP_leave
+ 			   SP_receive
+@@ -101,6 +101,7 @@
+ 	     CAUSED_BY_DISCONNECT
+ 	     CAUSED_BY_NETWORK
+ 	     MEMBERSHIP_MESS
++	     REJECT_MESS
+ 	     
+ 	     ACCEPT_SESSION
+ 	     ILLEGAL_GROUP
+@@ -120,7 +121,7 @@
+ 	     REJECT_VERSION
+ 	     
+ 	     SP_connect
+-	     SP_disconnecct
++	     SP_disconnect
+ 	     SP_join
+ 	     SP_leave
+ 	     SP_receive
+@@ -165,8 +166,6 @@
+ 1;
+ __END__
+ 
+-# Below is the stub of documentation for your module. You better edit it!
+-
+ =head1 NAME
+ 
+ Spread - Perl extension for the Spread group communication system
+@@ -176,15 +175,21 @@
+   use Spread;
  
    # Connect
-   my($mailbox, $private_group) = Spread::connect(
--	spread_name => '4444@host.domain.com',
--	private_name => 'mrcool',
-+	{ spread_name => '4803@host.domain.com',
-+	private_name => 'mrcool', }
- 	);
+-  my($mailbox, $private_group) = Spread::connect(
++  my($mbox, $private_group) = Spread::connect( {
+ 	spread_name => '4444@host.domain.com',
+ 	private_name => 'mrcool',
+-	);
++	} );
++
++  # If you don't give a private name, you'll get a unique name from the spread daemon.
++  my($mailbox, $private_group) = Spread::connect(
++    spread_name => '4444@host.domain.com',
++  );
++
  
    # Join and leave groups
+   my(@group_to_join) = ( 'GroupA', 'GroupB', 'GroupC' );
+   my(@joined_groups) = grep( Spread::join($mbox, $_), @group_to_join );
+-  print "Spread::join -- $sperrorno"
++  print "Spread::join -- $sperrno"
+   	unless (Spread::leave($mbox, 'GroupC'));
+ 
+   # Multicast to group(s)
+@@ -204,7 +209,7 @@
+ 
+   # Disconnect
+   if(Spread::disconnect($mbox)) { print "Successful disconnect\n"; }
+-  else { print "Spread::disconnect -- $sperrorno\n"; }
++  else { print "Spread::disconnect -- $sperrno\n"; }
+ 
+ =head1 DESCRIPTION
+ 
+@@ -213,8 +218,8 @@
+ See man pages for SP_connect, SP_join, SP_multicast, SP_receive,
+ SP_poll, SP_error, SP_leave, SP_disconnect.
+ 
+-$sperror holds either the integer spread error or a descriptive string
+-depending on the context in which $sperror is used.
++$sperrno holds either the integer spread error or a descriptive string
++depending on the context in which $sperrno is used.
+ 
+ =head1 Exported constants
+ 
+@@ -268,6 +273,7 @@
+   REGULAR_MESS
+   REG_MEMB_MESS
+   REJECT_ILLEGAL_NAME
++  REJECT_MESS
+   REJECT_NOT_UNIQUE
+   REJECT_NO_NAME
+   REJECT_QUOTA
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Olli Hauer freebsd_committer freebsd_triage 2012-08-25 19:45:11 UTC
State Changed
From-To: open->closed

Committed, 

Please takinging a diff is really not hard, 

cp -Rp port port.orig 
- patching the port + cleanup  
diff -Nru port.orig/ port/ > port.diff 

At last the hint with replacing the Spread.pm was the solution. 
(After decode64 your patch, extract the shar and wonder what is included. 
A patch or a full port ... ? )