r20727 - in /trunk/libdevice-cdio-perl/debian: ./ patches/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Jun 5 21:55:15 UTC 2008


Author: gregoa
Date: Thu Jun  5 21:55:15 2008
New Revision: 20727

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20727
Log:
Change patch system from dpatch to quilt.

Added:
    trunk/libdevice-cdio-perl/debian/patches/01_invalid_cflags.patch
    trunk/libdevice-cdio-perl/debian/patches/02_wrong_function_name.patch
    trunk/libdevice-cdio-perl/debian/patches/03_version_information_in_swig.patch
    trunk/libdevice-cdio-perl/debian/patches/04_wrong_handling_of_output_parameters.patch
    trunk/libdevice-cdio-perl/debian/patches/05_buffer_overflows_in_perliso9660.patch
    trunk/libdevice-cdio-perl/debian/patches/06_module_build.patch
    trunk/libdevice-cdio-perl/debian/patches/07_pod-coverage.patch
    trunk/libdevice-cdio-perl/debian/patches/series
Removed:
    trunk/libdevice-cdio-perl/debian/patches/00list
    trunk/libdevice-cdio-perl/debian/patches/01_invalid_cflags.dpatch
    trunk/libdevice-cdio-perl/debian/patches/02_wrong_function_name.dpatch
    trunk/libdevice-cdio-perl/debian/patches/03_version_information_in_swig.dpatch
    trunk/libdevice-cdio-perl/debian/patches/04_wrong_handling_of_output_parameters.dpatch
    trunk/libdevice-cdio-perl/debian/patches/05_buffer_overflows_in_perliso9660.dpatch
    trunk/libdevice-cdio-perl/debian/patches/06_module_build.dpatch
    trunk/libdevice-cdio-perl/debian/patches/07_pod-coverage.dpatch
Modified:
    trunk/libdevice-cdio-perl/debian/changelog
    trunk/libdevice-cdio-perl/debian/control
    trunk/libdevice-cdio-perl/debian/rules

Modified: trunk/libdevice-cdio-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/changelog?rev=20727&op=diff
==============================================================================
--- trunk/libdevice-cdio-perl/debian/changelog (original)
+++ trunk/libdevice-cdio-perl/debian/changelog Thu Jun  5 21:55:15 2008
@@ -1,3 +1,9 @@
+libdevice-cdio-perl (0.2.4-5) UNRELEASED; urgency=low
+
+  * Change patch system from dpatch to quilt.
+
+ -- gregor herrmann <gregoa at debian.org>  Thu, 05 Jun 2008 23:51:03 +0200
+
 libdevice-cdio-perl (0.2.4-4) unstable; urgency=medium
 
   [ Frank Lichtenheld ]

Modified: trunk/libdevice-cdio-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/control?rev=20727&op=diff
==============================================================================
--- trunk/libdevice-cdio-perl/debian/control (original)
+++ trunk/libdevice-cdio-perl/debian/control Thu Jun  5 21:55:15 2008
@@ -1,7 +1,7 @@
 Source: libdevice-cdio-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 6), dpatch, swig, libmodule-build-perl, perl (>= 5.8.8-7), libversion-perl, libextutils-pkgconfig-perl, libcdio-dev, libiso9660-dev, libtest-pod-coverage-perl, libtest-pod-perl
+Build-Depends: debhelper (>= 6), quilt (>= 0.40), swig, libmodule-build-perl, perl (>= 5.8.8-7), libversion-perl, libextutils-pkgconfig-perl, libcdio-dev, libiso9660-dev, libtest-pod-coverage-perl, libtest-pod-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Martín Ferrari <martin.ferrari at gmail.com>
 Standards-Version: 3.7.3

Added: trunk/libdevice-cdio-perl/debian/patches/01_invalid_cflags.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/01_invalid_cflags.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/01_invalid_cflags.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/01_invalid_cflags.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,18 @@
+Author: Martín Ferrari <martin.ferrari at gmail.com>
+Description: Some string splitting is generating a empty
+array element that's passed to exec, so cc interprets it as a
+parameter and it fails.
+(Patch sent to http://rt.cpan.org/Public/Bug/Display.html?id=28132)
+--- libdevice-cdio-perl.orig/Build.PL
++++ libdevice-cdio-perl/Build.PL
+@@ -319,6 +319,10 @@
+     $ldflags .= " -bundle -flat_namespace";
+ }
+ 
++$ccflags =~ s/^\s+//;
++$ccflags =~ s/\s+$//;
++$ldflags =~ s/^\s+//;
++$ldflags =~ s/\s+$//;
+ my $class = Module::Build->subclass( code => $code );
+ 
+ my $builder = $class->new( 

Added: trunk/libdevice-cdio-perl/debian/patches/02_wrong_function_name.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/02_wrong_function_name.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/02_wrong_function_name.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/02_wrong_function_name.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,16 @@
+Author: Martín Ferrari <martin.ferrari at gmail.com>
+Description: This is surely a mistake in libcdio, as the name in not coherent with
+the rest of the API. Nevertheless, this wasn't working as it was.
+--- libdevice-cdio-perl.orig/perliso9660.swg
++++ libdevice-cdio-perl/perliso9660.swg
+@@ -564,8 +564,8 @@
+ 
+    Returns stat_t of entry if we found lsn, or NULL otherwise.
+  */
+-%rename iso9660_find_ifs_lsn ifs_find_lsn;
+-IsoStat_t *iso9660_find_ifs_lsn(const iso9660_t *p_iso, lsn_t i_lsn);
++%rename iso9660_ifs_find_lsn ifs_find_lsn;
++IsoStat_t *iso9660_ifs_find_lsn(const iso9660_t *p_iso, lsn_t i_lsn);
+ #endif
+ 
+ 

Added: trunk/libdevice-cdio-perl/debian/patches/03_version_information_in_swig.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/03_version_information_in_swig.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/03_version_information_in_swig.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/03_version_information_in_swig.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,55 @@
+Author: Martín Ferrari <martin.ferrari at gmail.com>
+Description: The conditional compilation based on the lib's version wasn't working.
+--- libdevice-cdio-perl.orig/device.swg
++++ libdevice-cdio-perl/device.swg
+@@ -20,6 +20,7 @@
+ /* See <cdio/device.h> for more extensive documentation. */
+ 
+ %include "device_const.swg"
++%include <cdio/version.h>
+ 
+ /* Set up to allow functions to return device lists of type "char
+    *". We'll use a typedef so we can make sure to isolate this. I
+--- libdevice-cdio-perl.orig/perliso9660.swg
++++ libdevice-cdio-perl/perliso9660.swg
+@@ -35,6 +35,7 @@
+ #include <time.h>
+ #include <cdio/iso9660.h>
+ #include <cdio/version.h>
++%include <cdio/version.h>
+ 
+ /* Various libcdio constants and typedefs */
+ %include "types.swg"
+@@ -60,7 +61,7 @@
+ %constant long int RECORD               = ISO_RECORD;
+ 
+ /* When version 0.77 comes out, require it and fix this fix this. */
+-#if 0
++#if LIBCDIO_VERSION_NUM >= 77
+ %constant long int PROTECTION           = ISO_PROTECTION;
+ #else 
+ %constant long int PROTECTION           = 16;
+--- libdevice-cdio-perl.orig/Build.PL
++++ libdevice-cdio-perl/Build.PL
+@@ -98,11 +98,12 @@
+     } else {
+ 	@swig_flags = ();
+     }
++    my @include_dirs = map {"-I$_"} (@{$p->{include_dirs}});
+ 
+     my $blib_lib = File::Spec->catfile($self->blib, 'lib');
+ 
+     # print "+++swig -o $c_file -outdir $blib_lib -perl $file\n";
+-    $self->do_system(@swig, '-o', $c_file, '-outdir', $blib_lib,
++    $self->do_system(@swig, @include_dirs, '-o', $c_file, '-outdir', $blib_lib,
+ 		     '-perl', @swig_flags, $file)
+ 	or die "error building $c_file file from '$file'";
+     
+@@ -335,6 +336,7 @@
+     extra_linker_flags  => $ldflags,
+     extra_compiler_flags=> $ccflags,
+     swig_flags          => $swig_flags,
++    include_dirs        => [ '/usr/include' ],
+     swig_installed      => $swig_installed,
+     license             => 'gpl',
+     requires => {

Added: trunk/libdevice-cdio-perl/debian/patches/04_wrong_handling_of_output_parameters.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/04_wrong_handling_of_output_parameters.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/04_wrong_handling_of_output_parameters.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/04_wrong_handling_of_output_parameters.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,113 @@
+Author: Martín Ferrari <martin.ferrari at gmail.com>
+Description: The return parameters handling was incorrect and resulted in weird
+behaviour. But it somehow passed the tests.
+--- libdevice-cdio-perl.orig/lib/Device/Cdio/ISO9660/FS.pm
++++ libdevice-cdio-perl/lib/Device/Cdio/ISO9660/FS.pm
+@@ -132,9 +132,6 @@
+ 
+     my @values = perliso9660::fs_find_lsn($self->{cd}, $lsn);
+ 
+-    # Remove the two input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     return Device::Cdio::ISO9660::stat_array_to_href(@values);
+ }
+ 
+@@ -195,9 +192,6 @@
+ 
+     my @values = perliso9660::fs_readdir($self->{cd}, $dirname);
+ 
+-    # Remove the two input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     my @result = ();
+     while (@values) {
+ 	push @result, Device::Cdio::ISO9660::stat_array_to_href(@values);
+@@ -310,9 +304,6 @@
+ 	@values = perliso9660::fs_stat($self->{cd}, $path);
+     }
+ 
+-    # Remove the input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     return undef if !@values;
+     return Device::Cdio::ISO9660::stat_array_to_href(@values);
+ }
+--- libdevice-cdio-perl.orig/lib/Device/Cdio/ISO9660/IFS.pm
++++ libdevice-cdio-perl/lib/Device/Cdio/ISO9660/IFS.pm
+@@ -489,9 +489,6 @@
+ 
+     my @values = perliso9660::ifs_readdir($self->{iso9660}, $dirname);
+ 
+-    # Remove the two input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     my @result = ();
+     while (@values) {
+ 	push @result, Device::Cdio::ISO9660::stat_array_to_href(@values);
+@@ -625,9 +622,6 @@
+ 	@values = perliso9660::ifs_stat($self->{iso9660}, $path);
+     }
+ 
+-    # Remove the input parameters
+-    splice(@values, 0, 2) if @values > 2;
+-
+     return undef if !@values;
+     return Device::Cdio::ISO9660::stat_array_to_href(@values);
+ }
+--- libdevice-cdio-perl.orig/perliso9660.swg
++++ libdevice-cdio-perl/perliso9660.swg
+@@ -116,12 +116,11 @@
+ 
+  PPCODE:
+     /* Have perl compute the length of the string using strlen() */
+-    XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
+-    XPUSHs(sv_2mortal(newSViv(p_statbuf->type)));
+-    argvi += 7;
++    %append_output(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->lsn)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->size)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->secsize)));
++    %append_output(sv_2mortal(newSViv(p_statbuf->type)));
+     free (p_statbuf);
+  out: ;
+ }
+@@ -130,30 +129,23 @@
+     // $1 is of type IsoStatList_t
+     CdioList_t *p_entlist   = result;
+     CdioListNode_t *p_entnode;
+-    unsigned int num = 0;
+ 
+     if (!result) goto out;
+ 
+  PPCODE:
+-    /* Figure out how many items in the array */
+-    _CDIO_LIST_FOREACH (p_entnode, p_entlist) {
+-      num +=5;
+-    }
+-
+     /* For each element in the array of strings, create a new
+      * mortalscalar, and stuff it into the above array. */
+     _CDIO_LIST_FOREACH (p_entnode, p_entlist) {
+       iso9660_stat_t *p_statbuf = 
+ 	(iso9660_stat_t *) _cdio_list_node_data (p_entnode);
+       /* Have perl compute the length of the string using strlen() */
+-      XPUSHs(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->lsn)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->size)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->secsize)));
+-      XPUSHs(sv_2mortal(newSViv(p_statbuf->type)));
++      %append_output(sv_2mortal(newSVpv(p_statbuf->filename, 0)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->lsn)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->size)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->secsize)));
++      %append_output(sv_2mortal(newSViv(p_statbuf->type)));
+     }
+     _cdio_list_free (p_entlist, true);
+-    argvi += num + 2;
+  out: ;
+ }
+ 

Added: trunk/libdevice-cdio-perl/debian/patches/05_buffer_overflows_in_perliso9660.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/05_buffer_overflows_in_perliso9660.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/05_buffer_overflows_in_perliso9660.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/05_buffer_overflows_in_perliso9660.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,22 @@
+Author: Martín Ferrari <martin.ferrari at gmail.com>
+Description: There are a coupĺe of offbyone errors that lead to buffer overflows
+--- libdevice-cdio-perl.orig/perliso9660.swg
++++ libdevice-cdio-perl/perliso9660.swg
+@@ -445,7 +445,7 @@
+ %inline %{
+ char *
+ name_translate(const char *psz_oldname) {
+-  char *psz_newname=calloc(sizeof(char), strlen(psz_oldname));
++  char *psz_newname=calloc(sizeof(char), strlen(psz_oldname)+1);
+   iso9660_name_translate(psz_oldname, psz_newname);
+   return psz_newname;
+ }
+@@ -470,7 +470,7 @@
+ %inline %{
+ char * 
+ name_translate_ext(const char *psz_oldname, uint8_t i_joliet_level) {
+-  char *psz_newname=calloc(sizeof(char), strlen(psz_oldname));
++  char *psz_newname=calloc(sizeof(char), strlen(psz_oldname)+1);
+   iso9660_name_translate_ext(psz_oldname, psz_newname, i_joliet_level);
+   return psz_newname;
+ }

Added: trunk/libdevice-cdio-perl/debian/patches/06_module_build.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/06_module_build.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/06_module_build.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/06_module_build.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,61 @@
+Author: <gregor+debian at comodo.priv.at>
+Description: Fix Build.PL to work with newer Module::Build which doesn't use
+%Config automatically anymore.
+--- libdevice-cdio-perl.orig/Build.PL
++++ libdevice-cdio-perl/Build.PL
+@@ -40,7 +40,7 @@
+ 
+ sub process_swig {
+   my ($self, $main_swig_file, $deps_ref) = @_;
+-  my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
++  my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
+ 
+   # File name. e.g, perlcdio.swg -> perlcdio_wrap.c
+   (my $file_base = $main_swig_file) =~ s/\.[^.]+$//;
+@@ -82,7 +82,7 @@
+ # Invoke swig with -perl -outdir and other options.
+ sub compile_swig {
+     my ($self, $file, $c_file) = @_;
+-    my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
++    my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
+     
+     # File name, minus the suffix
+     (my $file_base = $file) =~ s/\.[^.]+$//;
+@@ -124,7 +124,7 @@
+ # Also we modified the die to report the full file name.
+ sub link_c {
+   my ($self, $to, $file_base, $obj_file) = @_;
+-  my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
++  my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
+ 
+   my $lib_file = File::Spec->catfile($to, File::Basename::basename("$file_base.$cf->{dlext}"));
+ 
+@@ -149,7 +149,7 @@
+ 
+ sub compile_c {
+   my ($self, $file) = @_;
+-  my ($cf, $p) = ($self->{config}, $self->{properties}); # For convenience
++  my ($cf, $p) = ($self->{config}->{values}, $self->{properties}); # For convenience
+   
+   # File name, minus the suffix
+   (my $file_base = $file) =~ s/\.[^.]+$//;
+@@ -356,4 +356,19 @@
+ 			   );
+ 
+ $builder->add_build_element('swig');
++my @confvars = (
++	"dlext",
++	"lddlflags",
++	"shrpenv",
++	"ld",
++	"obj_ext",
++	"installarchlib",
++	"cccdlflags",
++	"ccflags",
++	"optimize",
++	"cc",
++);
++foreach my $confvar(@confvars) {
++	$builder->config($confvar, $Config{$confvar});
++}
+ $builder->create_build_script();

Added: trunk/libdevice-cdio-perl/debian/patches/07_pod-coverage.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/07_pod-coverage.patch?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/07_pod-coverage.patch (added)
+++ trunk/libdevice-cdio-perl/debian/patches/07_pod-coverage.patch Thu Jun  5 21:55:15 2008
@@ -1,0 +1,24 @@
+Author: <gregor+debian at comodo.priv.at>
+Description: Only test pod coverage for modules in lib/Device.
+Seems to have been the author's intention, and closes #456845
+--- libdevice-cdio-perl.orig/t/01.pod-coverage.t
++++ libdevice-cdio-perl/t/01.pod-coverage.t
+@@ -11,7 +11,7 @@
+ eval "use Test::Pod::Coverage 1.04";
+ plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+ 
+-all_pod_coverage_ok();
++# all_pod_coverage_ok();
+ 
+ # Don't know how to get this from perlcdio ignored.
+ #all_pod_coverage_ok(
+@@ -19,3 +19,9 @@
+ #		    { also_private => [ qr/this$/ ] },
+ #		    "perlcdio, 'this' routine"
+ #		    );
++
++my @modules = all_modules('blib/lib/Device');
++plan tests => $#modules + 1;
++foreach (@modules) {
++    pod_coverage_ok($_);
++}

Added: trunk/libdevice-cdio-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/patches/series?rev=20727&op=file
==============================================================================
--- trunk/libdevice-cdio-perl/debian/patches/series (added)
+++ trunk/libdevice-cdio-perl/debian/patches/series Thu Jun  5 21:55:15 2008
@@ -1,0 +1,7 @@
+01_invalid_cflags.patch
+02_wrong_function_name.patch
+03_version_information_in_swig.patch
+04_wrong_handling_of_output_parameters.patch
+05_buffer_overflows_in_perliso9660.patch
+06_module_build.patch
+07_pod-coverage.patch

Modified: trunk/libdevice-cdio-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevice-cdio-perl/debian/rules?rev=20727&op=diff
==============================================================================
--- trunk/libdevice-cdio-perl/debian/rules (original)
+++ trunk/libdevice-cdio-perl/debian/rules Thu Jun  5 21:55:15 2008
@@ -7,7 +7,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-include /usr/share/dpatch/dpatch.make
+include /usr/share/quilt/quilt.make
 
 # If set to a true value then MakeMaker's prompt function will
 # always return the default without waiting for user input.
@@ -31,7 +31,7 @@
 endif
 
 build: build-stamp
-build-stamp: patch-stamp
+build-stamp: $(QUILT_STAMPFN)
 	# remove files that will be regenerated by SWIG (and fail because of
 	# permissions in the original tarball)
 	rm -f $(CURDIR)/perlcdio_wrap.c $(CURDIR)/perliso9660_wrap.c \




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