# # spec file for package perl-CBOR-XS # # Copyright (c) 2017 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 # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-CBOR-XS Version: 1.7 Release: 1.13 %define cpan_name CBOR-XS Summary: Concise Binary Object Representation (CBOR, RFC7049) License: CHECK(GPL-1.0+ or Artistic-1.0) Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/CBOR-XS/ Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Canary::Stability) BuildRequires: perl(Types::Serialiser) BuildRequires: perl(common::sense) Requires: perl(Types::Serialiser) Requires: perl(common::sense) %{perl_requires} %description This module converts Perl data structures to the Concise Binary Object Representation (CBOR) and vice versa. CBOR is a fast binary serialisation format that aims to use an (almost) superset of the JSON data model, i.e. when you can represent something useful in JSON, you should be able to represent it in CBOR. In short, CBOR is a faster and quite compact binary alternative to JSON, with the added ability of supporting serialisation of Perl objects. (JSON often compresses better than CBOR though, so if you plan to compress the data later and speed is less important you might want to compare both formats first). To give you a general idea about speed, with texts in the megabyte range, 'CBOR::XS' usually encodes roughly twice as fast as Storable or JSON::XS and decodes about 15%-30% faster than those. The shorter the data, the worse Storable performs in comparison. Regarding compactness, 'CBOR::XS'-encoded data structures are usually about 20% smaller than the same data encoded as (compact) JSON or Storable. In addition to the core CBOR data format, this module implements a number of extensions, to support cyclic and shared data structures (see 'allow_sharing' and 'allow_cycles'), string deduplication (see 'pack_strings') and scalar references (always enabled). The primary goal of this module is to be _correct_ and the secondary goal is to be _fast_. To reach the latter goal it was written in C. See MAPPING, below, on how CBOR::XS maps perl values to CBOR values and vice versa. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README %license COPYING %changelog * Wed Jun 28 2017 coolo@suse.com - updated to 1.7 see /usr/share/doc/packages/perl-CBOR-XS/Changes 1.7 Tue Jun 27 04:02:23 CEST 2017 - SECURITY FIX: fix two bugs found by american fuzzy lop, upgrade is advised if you accept data from untrusted sources. - an out-of bound sharedref or stringref index could cause an out of bounds access - might be exploitable. - a decoding error during indefinite array or hash decoding could cause an endless loop. * Thu Dec 8 2016 coolo@suse.com - updated to 1.6 see /usr/share/doc/packages/perl-CBOR-XS/Changes * Thu Jun 2 2016 coolo@suse.com - initial package 1.5 * created by cpanspec 1.78.08