[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#595740: unblock: libdate-calc-perl/6.0-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock libdate-calc-perl/6.0-2.  It fixes a bug regarding the
use of arguments that are not strings at the C level.

I don't think the bug itself is really RC, but given that it can break
software that worked with older versions the initial severity of
important seems appropriate.

Regards,
Ansgar

PS: Please CC: debian-perl@lists.debian.org in replies.

[1] <http://bugs.debian.org/558272>
Index: debian/control
===================================================================
--- debian/control	(.../6.0-1)	(revision 62355)
+++ debian/control	(.../6.0-2)	(revision 62355)
@@ -4,9 +4,10 @@ Priority: optional
 Uploaders: Christian Hammers <ch@debian.org>, Martín Ferrari <tincho@debian.org>,
  Damyan Ivanov <dmn@debian.org>, Salvatore Bonaccorso <salvatore.bonaccorso@gmail.com>
 Build-Depends: debhelper (>= 7.0.50~), libcarp-clan-perl,
- libbit-vector-perl (>= 7.0)
+ libbit-vector-perl (>= 7.0), perl (>= 5.10.1) | libtest-simple-perl (>= 0.88),
+ libtest-exception-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
-Standards-Version: 3.8.3
+Standards-Version: 3.9.1
 Homepage: http://search.cpan.org/dist/Date-Calc/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdate-calc-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdate-calc-perl/
Index: debian/source/format
===================================================================
--- debian/source/format	(.../6.0-1)	(revision 0)
+++ debian/source/format	(.../6.0-2)	(revision 62355)
@@ -0,0 +1 @@
+3.0 (quilt)
Index: debian/changelog
===================================================================
--- debian/changelog	(.../6.0-1)	(revision 62355)
+++ debian/changelog	(.../6.0-2)	(revision 62355)
@@ -1,3 +1,18 @@
+libdate-calc-perl (6.0-2) unstable; urgency=low
+
+  * Team Upload.
+  * Use SvPV to stringify the SV in case it is not already a string.
+    (Closes: #558272)
+    + new patch: SvPV.patch
+    + Add build-dep on perl (>= 5.10.1) | libtest-simple-perl (>= 0.88) and
+      libtest-exception-perl for included test.
+  * Use source format 3.0 (quilt).
+  * debian/copyright: Formatting changes for current DEP-5 proposal;
+    refer to /usr/share/common-licenses/GPL-1.
+  * Bump Standards-Version to 3.9.1.
+
+ -- Ansgar Burchardt <ansgar@43-1.org>  Thu, 26 Aug 2010 17:18:17 +0900
+
 libdate-calc-perl (6.0-1) unstable; urgency=low
 
   * New upstream release
Index: debian/patches/series
===================================================================
--- debian/patches/series	(.../6.0-1)	(revision 0)
+++ debian/patches/series	(.../6.0-2)	(revision 62355)
@@ -0,0 +1,2 @@
+SvPV.patch
+spelling.patch
Index: debian/patches/spelling.patch
===================================================================
--- debian/patches/spelling.patch	(.../6.0-1)	(revision 0)
+++ debian/patches/spelling.patch	(.../6.0-2)	(revision 62355)
@@ -0,0 +1,27 @@
+From: Ansgar Burchardt <ansgar@43-1.org>
+Date: Thu, 26 Aug 2010 17:15:34 +0900
+Origin: vendor
+Subject: Fix spelling errors in documentation
+
+--- libdate-calc-perl.orig/Calendar.pod
++++ libdate-calc-perl/Calendar.pod
+@@ -398,7 +398,7 @@
+ which your profile contains "half" holidays, or when you add
+ or subtract fractions of a day.
+ 
+-Sometimes it is not possible to accomodate the requested number
++Sometimes it is not possible to accommodate the requested number
+ of work days, and a rest remains.
+ 
+ This rest can currently only assume the value "0.0" (zero),
+--- libdate-calc-perl.orig/lib/Date/Calendar/Year.pod
++++ libdate-calc-perl/lib/Date/Calendar/Year.pod
+@@ -345,7 +345,7 @@
+ can be queried with the "labels()" and "search()" methods,
+ and appears when printing a calendar, for instance.
+ 
+-The character ":" (mnemonic: divided into two halfs) specifies
++The character ":" (mnemonic: divided into two halves) specifies
+ that the date in question is only a "half" holiday, i.e., you
+ only get half a day off instead of a full day. Some companies
+ have this sort of thing. C<:-)>
Index: debian/patches/SvPV.patch
===================================================================
--- debian/patches/SvPV.patch	(.../6.0-1)	(revision 0)
+++ debian/patches/SvPV.patch	(.../6.0-2)	(revision 62355)
@@ -0,0 +1,104 @@
+From: Ansgar Burchardt <ansgar@43-1.org>
+Date: Thu, 26 Aug 2010 17:08:56 +0900
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/558272
+Bug: https://rt.cpan.org/Ticket/Display.html?id=60233
+Subject: Use SvPV to strigify the SV in case it is not already a string
+
+--- libdate-calc-perl.orig/Calc.xs
++++ libdate-calc-perl/Calc.xs
+@@ -51,9 +51,7 @@
+ 
+ 
+ #define DATECALC_STRING(ref,var,len) \
+-    ( ref && !(SvROK(ref)) && SvPOK(ref) && \
+-    (var = (charptr)SvPV(ref,PL_na)) && \
+-    ((len = (N_int)SvCUR(ref)) | 1) )
++    ( ref && (var = (charptr)SvPV(ref,len)) )
+ 
+ #define DATECALC_SCALAR(ref,typ,var) \
+     ( ref && !(SvROK(ref)) && ((var = (typ)SvIV(ref)) | 1) )
+@@ -1268,7 +1266,7 @@
+ PPCODE:
+ {
+     charptr string;
+-    N_int   length;
++    STRLEN  length;
+     Z_int   lang;
+ 
+     if ((items == 1) or (items == 2))
+@@ -1295,7 +1293,7 @@
+ PPCODE:
+ {
+     charptr string;
+-    N_int   length;
++    STRLEN  length;
+     Z_int   lang;
+ 
+     if ((items == 1) or (items == 2))
+@@ -1333,7 +1331,7 @@
+ PPCODE:
+ {
+     charptr string;
+-    N_int   length;
++    STRLEN  length;
+     Z_int   lang;
+     Z_int   year;
+     Z_int   month;
+@@ -1369,7 +1367,7 @@
+ PPCODE:
+ {
+     charptr string;
+-    N_int   length;
++    STRLEN  length;
+     Z_int   lang;
+     Z_int   year;
+     Z_int   month;
+@@ -1780,8 +1778,8 @@
+ {
+     charptr string;
+     charptr buffer;
+-    N_int length;
+-    N_int index;
++    STRLEN length;
++    STRLEN index;
+ 
+     if ( DATECALC_STRING(scalar,string,length) )
+     {
+@@ -1808,8 +1806,8 @@
+ {
+     charptr string;
+     charptr buffer;
+-    N_int length;
+-    N_int index;
++    STRLEN length;
++    STRLEN index;
+ 
+     if ( DATECALC_STRING(scalar,string,length) )
+     {
+--- /dev/null
++++ libdate-calc-perl/t/debian-558272.t
+@@ -0,0 +1,23 @@
++#! /usr/bin/perl
++
++use strict;
++use warnings;
++
++use Test::More 0.88;
++use Test::Exception;
++
++use_ok("Date::Calc");
++
++my $string = "Oct";
++$string =~ /(.*)/;
++lives_and { is Date::Calc::Decode_Month($1), 10 } 'Decode_Month($1) works';
++
++{
++  package
++    Foo;
++  use overload '""' => sub { "Nov" };
++}
++my $foo = bless {}, 'Foo';
++lives_and { is Date::Calc::Decode_Month($foo), 11 } 'Decode_Month() works with overload';
++
++done_testing();
Index: debian/copyright
===================================================================
--- debian/copyright	(.../6.0-1)	(revision 62355)
+++ debian/copyright	(.../6.0-2)	(revision 62355)
@@ -1,13 +1,11 @@
-Format-Specification:
-    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Steffen Beyer <STBEY@cpan.org>
-Upstream-Source: http://search.cpan.org/dist/Date-Calc/
-Upstream-Name: Date-Calc
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Steffen Beyer <STBEY@cpan.org>
+Source: http://search.cpan.org/dist/Date-Calc/
+Name: Date-Calc
 
 Files: *
 Copyright: 1995-2009, Steffen Beyer <STBEY@cpan.org>
-License-Alias: Perl
-License: GPL-1+ | Artistic
+License: Artistic or GPL-1+
 
 Files: DateCalc.c, DateCalc.h, Toolbox.h
 Copyright: 1993-2009, Steffen Beyer <sb@engelschall.com>
@@ -16,7 +14,7 @@ License: LGPL-2+
 Files: debian/*
 Copyright: 2009, Jonathan Yu <jawnsy@cpan.org>
  1998-2009, various members of the Debian Perl Group, cf. debian/changelog
-License: GPL-1+ | Artistic
+License: Artistic or GPL-1+
 
 License: Artistic
     This program is free software; you can redistribute it and/or modify
@@ -29,8 +27,8 @@ License: GPL-1+
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 1, or (at your option)
     any later version.
-    On Debian GNU/Linux systems, the complete text of the GNU General
-    Public License can be found in `/usr/share/common-licenses/GPL'
+    On Debian GNU/Linux systems, the complete text of version 1 of the GNU
+    General Public License can be found in `/usr/share/common-licenses/GPL-1'.
 
 License: LGPL-2+
     This library is free software; you can redistribute it and/or modify

Reply to: