[libxml-treebuilder-perl] 01/01: Add upstream patch to fix local path resolution

Raphaël Hertzog hertzog at moszumanska.debian.org
Sun Dec 1 00:25:53 UTC 2013


This is an automated email from the git hooks/post-receive script.

hertzog pushed a commit to branch master
in repository libxml-treebuilder-perl.

commit a44c87f3e19ad60d0747a0bc987901c1bb2230bd
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Sat Nov 30 20:49:07 2013 +0100

    Add upstream patch to fix local path resolution
---
 debian/changelog                    |  7 ++++++
 debian/patches/local-entities.patch | 45 +++++++++++++++++++++++++++++++++++++
 debian/patches/series               |  1 +
 3 files changed, 53 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 55202da..61e881b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libxml-treebuilder-perl (5.1-2) unstable; urgency=low
+
+  * Team upload.
+  * Fix local path resolution for external entities. Closes: #728885
+
+ -- Raphaël Hertzog <hertzog at debian.org>  Sat, 30 Nov 2013 20:48:41 +0100
+
 libxml-treebuilder-perl (5.1-1) unstable; urgency=low
 
   * Import Upstream version 5.1
diff --git a/debian/patches/local-entities.patch b/debian/patches/local-entities.patch
new file mode 100644
index 0000000..4317c31
--- /dev/null
+++ b/debian/patches/local-entities.patch
@@ -0,0 +1,45 @@
+Description: Fix local path resolution for external entities
+Origin: upstream, https://github.com/jfearn/XML-TreeBuilder/commit/d81004996dae0f123a77af2c79576e7977559dc0
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=90464
+Bug-Debian: http://bugs.debian.org/728885
+Last-Update: 2013-12-01
+
+--- a/lib/XML/TreeBuilder.pm
++++ b/lib/XML/TreeBuilder.pm
+@@ -10,6 +10,7 @@ use Carp;
+ use IO::File;
+ use XML::Catalog v1.0.1;
+ use File::Basename;
++use File::Spec;
+ use vars qw(@ISA $VERSION);
+ 
+ $VERSION = '5.1';
+@@ -227,16 +228,19 @@ sub new {
+                         = fileparse($file);
+                     $base = $directories;
+                 }
+-                elsif ( $sysid =~ /^file:/ ) {
+-                    $sysid =~ s/^file:\/\///;
+-                    my ( $filename, $directories, $suffix )
+-                        = fileparse($sysid);
+-                    $base = $directories;
+-                }
+                 else {
+-                    my ( $filename, $directories, $suffix )
+-                        = fileparse($base);
+-                    $file = "$directories$sysid";
++                    $sysid =~ s/^file:\/\/// if ( $sysid =~ /^file:/ );
++
++                    if ( File::Spec->file_name_is_absolute($sysid) ) {
++                        my ( $filename, $directories, $suffix )
++                            = fileparse($sysid);
++                        $base = $directories;
++                    }
++                    else {
++                        my ( $filename, $directories, $suffix )
++                            = fileparse($base);
++                        $file = File::Spec->rel2abs( $sysid, $directories );
++                    }
+                 }
+                 my $fh = new IO::File( $file, "r" );
+                 croak "$!" unless $fh;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..26d8d12
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+local-entities.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libxml-treebuilder-perl.git



More information about the Pkg-perl-cvs-commits mailing list