Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Dec 2009 17:31:34 +0100
From:      Bernhard Froehlich <decke@bluelife.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        rafan@FreeBSD.org
Subject:   ports/141778: [PATCH] devel/p5-SVN-Web: correctly fix assertion (*path != '/')
Message-ID:  <20091219173134.45331e3d@bluelife.at>
Resent-Message-ID: <200912191630.nBJGU7kl065013@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         141778
>Category:       ports
>Synopsis:       [PATCH] devel/p5-SVN-Web: correctly fix assertion (*path != '/')
>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:   Sat Dec 19 16:30:06 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Bernhard Froehlich
>Release:        FreeBSD 8.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD chii.bluelife.at 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009
>Description:
The port already includes a patch against an subversion > 1.5.x assertion which
does not work. I continuously get:

[Tue Nov 10 09:45:00 2009] [error] [client 67.218.116.166] svn: In file
'subversion/libsvn_ra/deprecated.c' line 289: assertion failed (*path != '/')
[Tue Nov 10 10:28:45 2009] [error] [client 66.249.71.85] svn: In file 
'subversion/libsvn_ra/deprecated.c' line 289: assertion failed (*path != '/')

But there is a different patch attached on the CPAN Bug# 37388 [1] that works for
me for a few weeks now and solves that problem.

[1] http://rt.cpan.org/Public/Bug/Display.html?id=37388 

Added file(s):
- files/patch-2basic.t

Port maintainer (rafan@FreeBSD.org) is cc'd.

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

--- p5-SVN-Web-0.53_6.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/Makefile /usr/ports/devel/p5-SVN-Web/Makefile
--- /usr/ports/devel/p5-SVN-Web.orig/Makefile	2009-07-22 18:26:38.000000000 +0200
+++ /usr/ports/devel/p5-SVN-Web/Makefile	2009-11-10 11:02:24.000000000 +0100
@@ -7,7 +7,7 @@
 
 PORTNAME=	SVN-Web
 PORTVERSION=	0.53
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	devel perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/files/patch-2basic.t /usr/ports/devel/p5-SVN-Web/files/patch-2basic.t
--- /usr/ports/devel/p5-SVN-Web.orig/files/patch-2basic.t	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/devel/p5-SVN-Web/files/patch-2basic.t	2009-11-10 11:01:14.000000000 +0100
@@ -0,0 +1,12 @@
+--- t/2basic.t	Sun Apr 29 23:22:51 2007
++++ t/2basic.t	Mon Dec 15 03:09:45 2008
+@@ -61,6 +61,9 @@
+     # a ':'.  This catches template bugs with too many slashes.
+     unlike($mech->uri(), qr{(?<!:)//}, 'URI does not contain "//"');
+ 
++    diag('skip static files checks in local tests: '.$mech->uri), return
++        if $mech->uri->path eq '/' or $mech->uri->path =~ m{/css/};
++
+     $mech->content_unlike(qr'An error occured', '  and content was correct');
+     if($can_tidy 
+        and ($mech->uri() !~ m{ (?:
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/files/patch-Diff.pm /usr/ports/devel/p5-SVN-Web/files/patch-Diff.pm
--- /usr/ports/devel/p5-SVN-Web.orig/files/patch-Diff.pm	2009-04-21 15:53:33.000000000 +0200
+++ /usr/ports/devel/p5-SVN-Web/files/patch-Diff.pm	2009-11-10 10:59:08.000000000 +0100
@@ -1,28 +1,21 @@
---- lib/SVN/Web/Diff.pm.orig	2007-04-30 03:22:51.000000000 +0800
-+++ lib/SVN/Web/Diff.pm	2009-04-21 18:06:59.000000000 +0800
-@@ -188,8 +188,11 @@
+--- lib/SVN/Web/Diff.pm	Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/Diff.pm	Mon Dec 15 02:30:36 2008
+@@ -188,8 +188,8 @@
  
      my $mime = $self->{cgi}->param('mime') || 'text/html';
  
 -    my %types = ( $rev1 => $ra->check_path($path, $rev1),
 -		  $rev2 => $ra->check_path($path, $rev2) );
-+    my $path_getlog = $path;
-+    if ($path_getlog eq "/") {$path_getlog = "";}
-+    $path_getlog =~ s/^\///;
-+    my %types = ( $rev1 => $ra->check_path($path_getlog, $rev1),
-+                  $rev2 => $ra->check_path($path_getlog, $rev2) );
++    my %types = ( $rev1 => $ra->check_path($self->rpath, $rev1),
++		  $rev2 => $ra->check_path($self->rpath, $rev2) );
  
      SVN::Web::X->throw(error => '(cannot diff nodes of different types: %1 %2 %3)',
  		       vars  => [$path, $rev1, $rev2])
-@@ -299,7 +302,10 @@
+@@ -299,7 +299,7 @@
  
      my $ra   = $self->{repos}{ra};
  
 -    if($ra->check_path($path, $rev) == $SVN::Node::none) {
-+    my $path_getlog = $path;
-+    if ($path_getlog eq "/") {$path_getlog = "";}
-+    $path_getlog =~ s/^\///;
-+    if($ra->check_path($path_getlog, $rev) == $SVN::Node::none) {
++    if($ra->check_path($self->rpath($path), $rev) == $SVN::Node::none) {
  	SVN::Web::X->throw(
  	    error => '(path %1 does not exist in revision %2)',
-             vars  => [$path, $rev],
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/files/patch-Log.pm /usr/ports/devel/p5-SVN-Web/files/patch-Log.pm
--- /usr/ports/devel/p5-SVN-Web.orig/files/patch-Log.pm	2008-07-20 12:33:02.000000000 +0200
+++ /usr/ports/devel/p5-SVN-Web/files/patch-Log.pm	2009-11-10 10:59:32.000000000 +0100
@@ -1,22 +1,20 @@
---- lib/SVN/Web/Log.pm.org	2008-07-17 11:23:59.000000000 +0900
-+++ lib/SVN/Web/Log.pm	2008-07-17 11:27:14.000000000 +0900
-@@ -214,7 +214,10 @@
+--- lib/SVN/Web/Log.pm	Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/Log.pm	Mon Dec 15 02:32:02 2008
+@@ -214,7 +215,7 @@
  	# entries then we're on the last page.
  	#
  	# If we're not on the last page then pop off the extra log entry
 -	$ra->get_log([$path], $rev, 1, $limit + 1, 1, 1,
-+	my $path_getlog = $path;
-+	if ($path_getlog eq "/") {$path_getlog = "";}
-+	$path_getlog =~ s/^\///;
-+	$ra->get_log([$path_getlog], $rev, 1, $limit + 1, 1, 1,
++	$ra->get_log([$self->rpath], $rev, 1, $limit + 1, 1, 1,
  		     sub { $self->_log(@_) });
  
  	$at_oldest = @{ $self->{REVS} } <= $limit;
-@@ -222,6 +225,7 @@
+@@ -222,7 +223,7 @@
  	pop @{ $self->{REVS} } unless $at_oldest;
      } else {
  	# We must be displaying to the oldest rev, so no paging required
-+	if($path eq "/") {$path = "";}
- 	$ra->get_log([$path], $rev, 1, $limit, 1, 1,
+-	$ra->get_log([$path], $rev, 1, $limit, 1, 1,
++	$ra->get_log([$self->rpath], $rev, 1, $limit, 1, 1,
  		     sub { $self->_log(@_) });
  
+ 	$at_oldest = 1;
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/files/patch-Revision.pm /usr/ports/devel/p5-SVN-Web/files/patch-Revision.pm
--- /usr/ports/devel/p5-SVN-Web.orig/files/patch-Revision.pm	2008-07-20 12:33:02.000000000 +0200
+++ /usr/ports/devel/p5-SVN-Web/files/patch-Revision.pm	2009-11-10 10:59:51.000000000 +0100
@@ -1,5 +1,5 @@
---- lib/SVN/Web/Revision.pm.org	2008-07-17 11:24:07.000000000 +0900
-+++ lib/SVN/Web/Revision.pm	2008-07-17 11:24:50.000000000 +0900
+--- lib/SVN/Web/Revision.pm	Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/Revision.pm	Sun Dec 14 00:25:26 2008
 @@ -211,7 +211,7 @@
          )
          if $rev > $yrev;
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/files/patch-View.pm /usr/ports/devel/p5-SVN-Web/files/patch-View.pm
--- /usr/ports/devel/p5-SVN-Web.orig/files/patch-View.pm	2008-07-20 12:33:02.000000000 +0200
+++ /usr/ports/devel/p5-SVN-Web/files/patch-View.pm	2009-11-10 11:00:17.000000000 +0100
@@ -1,14 +1,11 @@
---- lib/SVN/Web/View.pm.org	2008-07-17 11:24:12.000000000 +0900
-+++ lib/SVN/Web/View.pm	2008-07-17 11:24:53.000000000 +0900
-@@ -134,7 +134,10 @@
+--- lib/SVN/Web/View.pm	Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/View.pm	Mon Dec 15 02:29:44 2008
+@@ -134,7 +134,7 @@
      my $rev = $act_rev;
  
      # Get the log for this revision of the file
 -    $ra->get_log([$path], $rev, $rev, 1, 1, 1,
-+    my $path_getlog = $path;
-+    if ($path_getlog eq "/") {$path_getlog = "";}
-+    $path_getlog =~ s/^\///;
-+    $ra->get_log([$path_getlog], $rev, $rev, 1, 1, 1,
++    $ra->get_log([$self->rpath], $rev, $rev, 1, 1, 1,
          sub { $self->{REV} = $self->_log(@_) });
  
      # Get the text for this revision of the file
diff -ruN --exclude=CVS /usr/ports/devel/p5-SVN-Web.orig/files/patch-action.pm /usr/ports/devel/p5-SVN-Web/files/patch-action.pm
--- /usr/ports/devel/p5-SVN-Web.orig/files/patch-action.pm	2008-07-20 12:33:02.000000000 +0200
+++ /usr/ports/devel/p5-SVN-Web/files/patch-action.pm	2009-11-10 11:00:51.000000000 +0100
@@ -1,14 +1,24 @@
---- lib/SVN/Web/action.pm.org	2008-07-17 11:24:18.000000000 +0900
-+++ lib/SVN/Web/action.pm	2008-07-17 11:24:57.000000000 +0900
-@@ -241,7 +241,10 @@
+--- lib/SVN/Web/action.pm	Sun Apr 29 23:22:51 2007
++++ lib/SVN/Web/action.pm	Mon Dec 15 02:27:15 2008
+@@ -241,7 +241,7 @@
      my $ra  = $self->{repos}{ra};
  
      my @log_result;
 -    $ra->get_log([$path], $rev, 1, 1, 0, 1,
-+    my $path_getlog = $path;
-+    if ($path_getlog eq "/") {$path_getlog = "";}
-+    $path_getlog =~ s/^\///;
-+    $ra->get_log([$path_getlog], $rev, 1, 1, 0, 1,
++    $ra->get_log([$self->rpath($path)], $rev, 1, 1, 0, 1,
                   sub { @log_result = @_; });
  
      return @log_result if wantarray();
+@@ -371,5 +371,12 @@
+ See L<http://www.perl.com/perl/misc/Artistic.html>;
+ 
+ =cut
++
++sub rpath {
++    my ($self,$p) = @_;
++    my $path = $p || $self->{path};
++    $path =~ s{^/}{} if $path;
++    return $path;
++}
+ 
+ 1;
--- p5-SVN-Web-0.53_6.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091219173134.45331e3d>