Hello community,
here is the log from the commit of package perl-Text-BibTeX for openSUSE:Factory checked in at 2016-06-12 18:51:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Text-BibTeX (Old)
and /work/SRC/openSUSE:Factory/.perl-Text-BibTeX.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Text-BibTeX"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Text-BibTeX/perl-Text-BibTeX.changes 2014-09-20 15:49:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Text-BibTeX.new/perl-Text-BibTeX.changes 2016-06-12 18:51:43.000000000 +0200
@@ -1,0 +2,17 @@
+Tue May 31 11:15:03 UTC 2016 - pjanouch@suse.de
+
+- updated to 0.72
+ see /usr/share/doc/packages/perl-Text-BibTeX/Changes
+
+ 0.72 2016-04-19
+ * Added clone() method to Text::BibTeX::Entry
+
+ 0.71 2015-05-28
+ * Fix segmentation fault when btparse fails parsing a long
+ entry. Thanks to Dale Evans.
+ * Stop using UNIVERSAL (5.21.3 requirement).
+ Thanks to Jitka Plesnikova
+
+- removed perl-Text-BibTeX-libdir.patch since it's been upstreamed
+
+-------------------------------------------------------------------
Old:
----
Text-BibTeX-0.70.tar.gz
perl-Text-BibTeX-libdir.patch
New:
----
Text-BibTeX-0.72.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Text-BibTeX.spec ++++++
--- /var/tmp/diff_new_pack.HFjEPo/_old 2016-06-12 18:51:44.000000000 +0200
+++ /var/tmp/diff_new_pack.HFjEPo/_new 2016-06-12 18:51:44.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Text-BibTeX
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,26 +16,27 @@
#
+%define cpan_name Text-BibTeX
Name: perl-Text-BibTeX
-Version: 0.70
+Version: 0.72
Release: 0
-%define cpan_name Text-BibTeX
Summary: Interface to read and parse BibTeX files
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Text-BibTeX/
-Source: http://www.cpan.org/authors/id/A/AM/AMBS/%{cpan_name}-%{version}.tar.gz
-Patch: Text-BibTeX-rpmlint.patch
-Patch1: perl-Text-BibTeX-libdir.patch
+Source0: http://www.cpan.org/authors/id/A/AM/AMBS/%{cpan_name}-%{version}.tar.gz
+Patch0: Text-BibTeX-rpmlint.patch
Patch2: perl-Text-BibTeX-uninit.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Capture::Tiny) >= 0.06
BuildRequires: perl(Config::AutoConf) >= 0.16
BuildRequires: perl(ExtUtils::CBuilder) >= 0.27
BuildRequires: perl(ExtUtils::LibBuilder) >= 0.02
-BuildRequires: perl(Module::Build) >= 0.36
+BuildRequires: perl(Module::Build) >= 0.360300
+BuildRequires: perl(Scalar::Util) >= 1.42
+Requires: perl(Scalar::Util) >= 1.42
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
%description
@@ -62,15 +63,14 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-%patch
-%patch1
+%patch0
%patch2 -p1
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
export CFLAGS='%{optflags}'
export CC=gcc
-%{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
+perl Build.PL installdirs=vendor optimize="%{optflags}"
./Build build flags=%{?_smp_mflags}
%check
++++++ Text-BibTeX-0.70.tar.gz -> Text-BibTeX-0.72.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/Build.PL new/Text-BibTeX-0.72/Build.PL
--- old/Text-BibTeX-0.70/Build.PL 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/Build.PL 2016-04-20 17:05:41.000000000 +0200
@@ -27,6 +27,9 @@
'Config::AutoConf' => '0.16',
'ExtUtils::LibBuilder' => '0.02',
},
+ requires => {
+ 'Scalar::Util' => '1.42',
+ },
build_requires => {
'File::Copy' => '0',
'Config::AutoConf' => '0.16',
@@ -79,7 +82,7 @@
unlink catfile($libdir, $target);
}
} else {
- if ($Config{archname} =~ /^x86_64/) {
+ if ($Config{archname} =~ /^x86_64|^ppc64|^s390x|^aarch64/) {
$libdir =~ s/\bbin\b/lib64/;
if (!-d $libdir) {
my $test = $libdir;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/Changes new/Text-BibTeX-0.72/Changes
--- old/Text-BibTeX-0.70/Changes 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/Changes 2016-04-20 17:05:41.000000000 +0200
@@ -1,5 +1,14 @@
Revision history for Perl module Text::BibTeX
+0.72 2016-04-19
+ * Added clone() method to Text::BibTeX::Entry
+
+0.71 2015-05-28
+ * Fix segmentation fault when btparse fails parsing a long
+ entry. Thanks to Dale Evans.
+ * Stop using UNIVERSAL (5.21.3 requirement).
+ Thanks to Jitka Plesnikova
+
0.70 2014-09-01
* Added metadata for metacpan.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/META.json new/Text-BibTeX-0.72/META.json
--- old/Text-BibTeX-0.70/META.json 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/META.json 2016-04-20 17:05:41.000000000 +0200
@@ -5,7 +5,7 @@
"Greg Ward "
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.421",
+ "generated_by" : "Module::Build version 0.4216",
"license" : [
"perl_5"
],
@@ -31,12 +31,17 @@
"ExtUtils::LibBuilder" : "0.02",
"Module::Build" : "0.36"
}
+ },
+ "runtime" : {
+ "requires" : {
+ "Scalar::Util" : "1.42"
+ }
}
},
"provides" : {
"Text::BibTeX" : {
"file" : "lib/Text/BibTeX.pm",
- "version" : "0.70"
+ "version" : "0.72"
},
"Text::BibTeX::BibEntry" : {
"file" : "lib/Text/BibTeX/Bib.pm",
@@ -96,5 +101,6 @@
"url" : "http://github.com/ambs/Text-BibTeX"
}
},
- "version" : "0.70"
+ "version" : "0.72",
+ "x_serialization_backend" : "JSON::PP version 2.27300"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/META.yml new/Text-BibTeX-0.72/META.yml
--- old/Text-BibTeX-0.70/META.yml 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/META.yml 2016-04-20 17:05:41.000000000 +0200
@@ -15,7 +15,7 @@
ExtUtils::LibBuilder: '0.02'
Module::Build: '0.36'
dynamic_config: 1
-generated_by: 'Module::Build version 0.421, CPAN::Meta::Converter version 2.142060'
+generated_by: 'Module::Build version 0.4216, CPAN::Meta::Converter version 2.150005'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,7 +24,7 @@
provides:
Text::BibTeX:
file: lib/Text/BibTeX.pm
- version: '0.70'
+ version: '0.72'
Text::BibTeX::BibEntry:
file: lib/Text/BibTeX/Bib.pm
version: '0.1'
@@ -61,7 +61,10 @@
Text::BibTeX::Value:
file: lib/Text/BibTeX/Value.pm
version: '0.1'
+requires:
+ Scalar::Util: '1.42'
resources:
license: http://dev.perl.org/licenses/
repository: http://github.com/ambs/Text-BibTeX
-version: '0.70'
+version: '0.72'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/btparse/pccts/err.h new/Text-BibTeX-0.72/btparse/pccts/err.h
--- old/Text-BibTeX-0.70/btparse/pccts/err.h 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/btparse/pccts/err.h 2016-04-20 17:05:41.000000000 +0200
@@ -129,10 +129,10 @@
#endif
{
#ifdef LL_K
- static char text[LL_K*ZZLEXBUFSIZE+1];
+ static char text[LL_K*ZZLEXBUFSIZE+1+1]; // allocate an extra byte for strncat() to drop a trailing NULL
SetWordType *f[LL_K];
#else
- static char text[ZZLEXBUFSIZE+1];
+ static char text[ZZLEXBUFSIZE+1+1]; // allocate an extra byte for strncat() to drop a trailing NULL
SetWordType *f[1];
#endif
SetWordType **miss_set;
@@ -164,7 +164,7 @@
int freeSpace = (ZZLEXBUFSIZE+1) - strlen(text);
#endif
if ( i>1 ) strcat(text, " ");
- strncat(text, LATEXT(i), freeSpace);
+ strncat(text, LATEXT(i), freeSpace); // strncat(a,b,n) will actually write n+1 bytes because of the terminating NULL, unlike strlcpy (non-standard OpenBSD function) which writes exactly n. this may end up dropping a character, but this is debug output from a failure case, so it doesn't matter much.
if ( !zzset_el((unsigned)LA(i), f[i-1]) ) break;
}
miss_set = va_arg(ap, SetWordType **);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/lib/Text/BibTeX/Entry.pm new/Text-BibTeX-0.72/lib/Text/BibTeX/Entry.pm
--- old/Text-BibTeX-0.70/lib/Text/BibTeX/Entry.pm 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/lib/Text/BibTeX/Entry.pm 2016-04-20 17:05:40.000000000 +0200
@@ -86,6 +86,7 @@
$entry->warn ($entry_warning);
# or:
$entry->warn ($field_warning, $field);
+ $entry->clone;
=head1 DESCRIPTION
@@ -212,6 +213,42 @@
$self;
}
+=item clone
+
+Clone a Text::BibTeX::Entry object, returning the clone. This re-uses the reference to any
+Text::BibTeX::Structure or Text::BibTeX::File but copies everything else,
+so that the clone can be modified apart from the original.
+
+=cut
+
+sub clone
+{
+ my $self = shift;
+ my $clone = {};
+ # Use the same structure object - won't be changed
+ if ($self->{structure}) {
+ $clone->{structure} = $self->{structure};
+ }
+ # Use the same file object - won't be changed
+ if ($self->{file}) {
+ $clone->{file} = $self->{file}
+ }
+ # These might be changed so make copies
+ $clone->{type} = $self->{type};
+ $clone->{key} = $self->{key};
+ $clone->{status} = $self->{status};
+ $clone->{metatype} = $self->{metatype};
+ $clone->{fields} = [ map {$_} @{$self->{fields}} ];
+ while (my ($k, $v) = each %{$self->{values}}) {
+ $clone->{values}{$k} = $v;
+ }
+ while (my ($k, $v) = each %{$self->{lines}}) {
+ $clone->{lines}{$k} = $v;
+ }
+ bless $clone, ref($self);
+ return $clone;
+}
+
=item read (BIBFILE)
Reads and parses an entry from BIBFILE, which must be a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/lib/Text/BibTeX/Value.pm new/Text-BibTeX-0.72/lib/Text/BibTeX/Value.pm
--- old/Text-BibTeX-0.70/lib/Text/BibTeX/Value.pm 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/lib/Text/BibTeX/Value.pm 2016-04-20 17:05:40.000000000 +0200
@@ -18,7 +18,7 @@
package Text::BibTeX::Value;
use strict;
-use UNIVERSAL 'isa';
+use Scalar::Util 'blessed';
use Carp;
use vars qw'$VERSION';
@@ -206,7 +206,7 @@
if ref $sval eq 'ARRAY' && @$sval == 2;
croak "simple value is neither a two-element array ref " .
"nor a Text::BibTeX::SimpleValue object"
- unless isa ($sval, 'Text::BibTeX::SimpleValue');
+ unless blessed($sval) && $sval->isa('Text::BibTeX::SimpleValue');
push (@$self, $sval);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/lib/Text/BibTeX.pm new/Text-BibTeX-0.72/lib/Text/BibTeX.pm
--- old/Text-BibTeX-0.70/lib/Text/BibTeX.pm 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/lib/Text/BibTeX.pm 2016-04-20 17:05:39.000000000 +0200
@@ -24,7 +24,7 @@
require Exporter;
require DynaLoader;
-our $VERSION='0.70';
+our $VERSION='0.72';
@ISA = qw(Exporter DynaLoader);
%EXPORT_TAGS = (nodetypes => [qw(BTAST_STRING BTAST_MACRO BTAST_NUMBER)],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/t/output.t new/Text-BibTeX-0.72/t/output.t
--- old/Text-BibTeX-0.70/t/output.t 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/t/output.t 2016-04-20 17:05:41.000000000 +0200
@@ -3,7 +3,7 @@
use warnings;
use IO::Handle;
-use Test::More tests => 16;
+use Test::More tests => 20;
use vars qw($DEBUG);
@@ -34,7 +34,7 @@
$new_text = $entry->print_s;
like $new_text => qr/^\@article\{homer97,\s*$/m;
-like $new_text => qr/^\s*author\s*=\s*{H{\\"o}mer Simpson \\"und Ned Flanders},\s*$/m;
+like $new_text => qr/^\s*author\s*=\s*\{H\{\\"o\}mer Simpson \\"und Ned Flanders\},\s*$/m;
like $new_text => qr/^\s*title\s*=\s*[{"]Territorial[^}"]*Suburbia[}"],\s*$/m;
like $new_text => qr/^\s*journal\s*=\s*[{"]Journal[^\}]*Studies[}"],\s*$/m;
like $new_text => qr/^\s*year\s*=\s*[{"]1997[}"],\s*$/m;
@@ -81,3 +81,9 @@
is $new_text => $contents[1];
is $new_text => $contents[2];
+my $clone = $entry->clone;
+is ref($clone) => 'Text::BibTeX::Entry';
+is $clone->get('title') => 'Territorial Imperatives in Modern Suburbia';
+$clone->set('title', 'Changed title');
+is $clone->get('title') => 'Changed title';
+is $entry->get('title') => 'Territorial Imperatives in Modern Suburbia';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-BibTeX-0.70/xscode/btxs_support.c new/Text-BibTeX-0.72/xscode/btxs_support.c
--- old/Text-BibTeX-0.70/xscode/btxs_support.c 2014-09-01 22:12:14.000000000 +0200
+++ new/Text-BibTeX-0.72/xscode/btxs_support.c 2016-04-20 17:05:39.000000000 +0200
@@ -264,7 +264,7 @@
{
HV * lines; /* line numbers of entry and its fields */
AST * item,
- * prev_item;
+ * prev_item = NULL;
int last_line;
char * value;
SV * sv_value;
@@ -282,11 +282,13 @@
item = NULL;
while (item = bt_next_value (top, item, NULL, NULL))
prev_item = item;
- last_line = prev_item->line;
- hv_store (lines, "STOP", 4, newSViv (last_line), 0);
+ if (prev_item) {
+ last_line = prev_item->line;
+ hv_store (lines, "STOP", 4, newSViv (last_line), 0);
- /* Store the line number hash in the entry hash */
- hv_store (entry, "lines", 5, newRV ((SV *) lines), 0);
+ /* Store the line number hash in the entry hash */
+ hv_store (entry, "lines", 5, newRV ((SV *) lines), 0);
+ }
/* And get the value of the entry as a single string (fully processed) */