From 00c98a1ea33b1adf42c2f79b0476822c689f34c8 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Wed, 27 Jun 2018 09:29:35 -0400 Subject: [PATCH] New upstream release 4.1 --- .gitignore | 2 + PyYAML-CVE-2014-9130.patch | 35 ------------------ PyYAML.spec | 19 ++++++---- debian-big-endian-fix.patch | 73 ------------------------------------- sources | 2 +- 5 files changed, 15 insertions(+), 116 deletions(-) delete mode 100644 PyYAML-CVE-2014-9130.patch delete mode 100644 debian-big-endian-fix.patch diff --git a/.gitignore b/.gitignore index 02a416a..ac383af 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ PyYAML-3.09.tar.gz /PyYAML-3.10.tar.gz /PyYAML-3.11.tar.gz /PyYAML-3.12.tar.gz +/PyYAML-4.1.tar.gz +/pyyaml-4.1.tar.gz diff --git a/PyYAML-CVE-2014-9130.patch b/PyYAML-CVE-2014-9130.patch deleted file mode 100644 index c47a9b5..0000000 --- a/PyYAML-CVE-2014-9130.patch +++ /dev/null @@ -1,35 +0,0 @@ -# HG changeset patch -# User Kirill Simonov -# Date 1417197216 21600 -# Node ID ddf211a41bb231c365fece5599b7e484e6dc33fc -# Parent 263dff6f9664ccdc532283ba5c7b282c0e436a7b -Removed invalid simple key assertion. - -diff --git a/lib/yaml/scanner.py b/lib/yaml/scanner.py ---- a/lib/yaml/scanner.py -+++ b/lib/yaml/scanner.py -@@ -297,10 +297,6 @@ - # Check if a simple key is required at the current position. - required = not self.flow_level and self.indent == self.column - -- # A simple key is required only if it is the first token in the current -- # line. Therefore it is always allowed. -- assert self.allow_simple_key or not required -- - # The next token might be a simple key. Let's save it's number and - # position. - if self.allow_simple_key: -diff --git a/lib3/yaml/scanner.py b/lib3/yaml/scanner.py ---- a/lib3/yaml/scanner.py -+++ b/lib3/yaml/scanner.py -@@ -297,10 +297,6 @@ - # Check if a simple key is required at the current position. - required = not self.flow_level and self.indent == self.column - -- # A simple key is required only if it is the first token in the current -- # line. Therefore it is always allowed. -- assert self.allow_simple_key or not required -- - # The next token might be a simple key. Let's save it's number and - # position. - if self.allow_simple_key: diff --git a/PyYAML.spec b/PyYAML.spec index 0f3bc32..16e1fec 100644 --- a/PyYAML.spec +++ b/PyYAML.spec @@ -1,3 +1,5 @@ +%global _name pyyaml + %if 0%{?fedora} || 0%{?rhel} >= 8 %global with_python3 1 %else @@ -5,14 +7,14 @@ %endif Name: PyYAML -Version: 3.12 -Release: 11%{?dist} +Version: 4.1 +Release: 1%{?dist} Summary: YAML parser and emitter for Python Group: Development/Libraries License: MIT -URL: http://pyyaml.org/ -Source0: http://pyyaml.org/download/pyyaml/%{name}-%{version}.tar.gz +URL: https://github.com/yaml/pyyaml +Source0: https://github.com/yaml/pyyaml/archive/%{_name}-%{version}.tar.gz BuildRequires: python2-devel, python2-setuptools, libyaml-devel BuildRequires: Cython BuildRequires: libyaml-devel @@ -74,7 +76,7 @@ configuration files to object serialization and persistance. %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{_name}-%{version} chmod a-x examples/yaml-highlight/yaml_hl.py # remove pre-generated file @@ -120,19 +122,22 @@ popd %files -n python2-pyyaml %{!?_licensedir:%global license %%doc} %license LICENSE -%doc CHANGES PKG-INFO README examples +%doc CHANGES README examples %{python_sitearch}/* %if 0%{?with_python3} %files -n python3-PyYAML %{!?_licensedir:%global license %%doc} %license LICENSE -%doc CHANGES PKG-INFO README examples +%doc CHANGES README examples %{python3_sitearch}/* %endif %changelog +* Wed Jun 27 2018 John Eckersberg - 4.1-1 +- New upstream release 4.1 + * Fri Jun 15 2018 Miro HronĨok - 3.12-11 - Rebuilt for Python 3.7 diff --git a/debian-big-endian-fix.patch b/debian-big-endian-fix.patch deleted file mode 100644 index 7991005..0000000 --- a/debian-big-endian-fix.patch +++ /dev/null @@ -1,73 +0,0 @@ -pyyaml FTBFS on the s390x buildd. It seems this is due to using int -where the libyaml API uses size_t. I tested the attached patch in -zelenka.d.o's sid chroot, and at least the python2 build/test worked (it -failed with the same error as the buildd pre-patching). -Patch by Julien Cristau -Add to the pyyaml package by Scott Kitterman -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676536 - -Index: pyyaml-3.10/ext/_yaml.pxd -=================================================================== ---- pyyaml-3.10.orig/ext/_yaml.pxd 2011-05-29 23:31:01.000000000 -0400 -+++ pyyaml-3.10/ext/_yaml.pxd 2012-06-08 16:33:54.309407701 -0400 -@@ -86,15 +86,15 @@ - YAML_MAPPING_END_EVENT - - ctypedef int yaml_read_handler_t(void *data, char *buffer, -- int size, int *size_read) except 0 -+ size_t size, size_t *size_read) except 0 - - ctypedef int yaml_write_handler_t(void *data, char *buffer, -- int size) except 0 -+ size_t size) except 0 - - ctypedef struct yaml_mark_t: -- int index -- int line -- int column -+ size_t index -+ size_t line -+ size_t column - ctypedef struct yaml_version_directive_t: - int major - int minor -@@ -113,7 +113,7 @@ - char *suffix - ctypedef struct _yaml_token_scalar_data_t: - char *value -- int length -+ size_t length - yaml_scalar_style_t style - ctypedef struct _yaml_token_version_directive_data_t: - int major -@@ -152,7 +152,7 @@ - char *anchor - char *tag - char *value -- int length -+ size_t length - int plain_implicit - int quoted_implicit - yaml_scalar_style_t style -Index: pyyaml-3.10/ext/_yaml.pyx -=================================================================== ---- pyyaml-3.10.orig/ext/_yaml.pyx 2011-05-29 23:31:01.000000000 -0400 -+++ pyyaml-3.10/ext/_yaml.pyx 2012-06-08 16:33:54.313409701 -0400 -@@ -905,7 +905,7 @@ - raise error - return 1 - --cdef int input_handler(void *data, char *buffer, int size, int *read) except 0: -+cdef int input_handler(void *data, char *buffer, size_t size, size_t *read) except 0: - cdef CParser parser - parser = data - if parser.stream_cache is None: -@@ -1515,7 +1515,7 @@ - self.ascend_resolver() - return 1 - --cdef int output_handler(void *data, char *buffer, int size) except 0: -+cdef int output_handler(void *data, char *buffer, size_t size) except 0: - cdef CEmitter emitter - emitter = data - if emitter.dump_unicode == 0: diff --git a/sources b/sources index a74856a..314a53a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4c129761b661d181ebf7ff4eb2d79950 PyYAML-3.12.tar.gz +SHA512 (pyyaml-4.1.tar.gz) = 3eb30d0d2f7e300dda98ad8378fa2ec4488071d165a7649d21ac32e1b3efeee14ee00ba86a32ba2db0c491866480f18480dec3e552ab7df82115bd9669833119