Compare commits

..

No commits in common. "c8-stream-3.8" and "stream-python27-2.7-rhel-8.9.0" have entirely different histories.

7 changed files with 214 additions and 165 deletions

View File

@ -1 +0,0 @@
efbe83434843c1963a9e56f36a9afa74a38c60a8 SOURCES/5.4.1.tar.gz

5
.gitignore vendored
View File

@ -1 +1,4 @@
SOURCES/5.4.1.tar.gz
PyYAML-3.09.tar.gz
/PyYAML-3.10.tar.gz
/PyYAML-3.11.tar.gz
/PyYAML-3.12.tar.gz

View File

@ -0,0 +1,35 @@
# HG changeset patch
# User Kirill Simonov <xi@resolvent.net>
# 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:

View File

@ -1,34 +1,29 @@
# RHEL8: disable building python2 in the python39 module
%bcond_with python2
Name: PyYAML
Version: 5.4.1
Release: 1%{?dist}
%global uversion %{version}
Summary: YAML parser and emitter for Python
License: MIT
URL: https://github.com/yaml/pyyaml
Source0: https://github.com/yaml/pyyaml/archive/%{uversion}.tar.gz
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
BuildRequires: gcc
BuildRequires: libyaml-devel
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without python3
%else
%bcond_with python3
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-Cython
Name: PyYAML
Version: 3.12
Release: 16%{?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
BuildRequires: gcc
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-Cython
BuildRequires: libyaml-devel
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-Cython
%endif
%global _description\
YAML is a data serialization format designed for human readability and\
@ -41,38 +36,43 @@ supports standard YAML tags and provides Python-specific tags that\
allow to represent an arbitrary Python object.\
\
PyYAML is applicable for a broad range of tasks from complex\
configuration files to object serialization and persistence.
configuration files to object serialization and persistance.
%description %_description
%if %{with python2}
%package -n python2-pyyaml
Summary: %summary
Provides: python-yaml = %{version}-%{release}
Provides: python-yaml%{?_isa} = %{version}-%{release}
Provides: python2-yaml = %{version}-%{release}
Provides: python2-yaml%{?_isa} = %{version}-%{release}
Provides: PyYAML = %{version}-%{release}
Provides: PyYAML%{?_isa} = %{version}-%{release}
%{?python_provide:%python_provide python2-pyyaml}
Obsoletes: PyYAML < %{version}-%{release}
%description -n python2-pyyaml %_description
%if %{with python3}
%package -n python3-PyYAML
Summary: YAML parser and emitter for Python
Group: Development/Libraries
Provides: python3-yaml = %{version}-%{release}
Provides: python3-yaml%{?_isa} = %{version}-%{release}
%description -n python3-PyYAML
YAML is a data serialization format designed for human readability and
interaction with scripting languages. PyYAML is a YAML parser and
emitter for Python.
PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
support, capable extension API, and sensible error messages. PyYAML
supports standard YAML tags and provides Python-specific tags that
allow to represent an arbitrary Python object.
PyYAML is applicable for a broad range of tasks from complex
configuration files to object serialization and persistance.
%endif
%package -n python%{python3_pkgversion}-pyyaml
Summary: %summary
Provides: python%{python3_pkgversion}-yaml = %{version}-%{release}
Provides: python%{python3_pkgversion}-yaml%{?_isa} = %{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-pyyaml}
Provides: python%{python3_pkgversion}-PyYAML = %{version}-%{release}
Provides: python%{python3_pkgversion}-PyYAML%{?_isa} = %{version}-%{release}
%description -n python%{python3_pkgversion}-pyyaml %_description
%prep
%setup -q -n pyyaml-%{uversion}
%setup -q -n %{name}-%{version}
chmod a-x examples/yaml-highlight/yaml_hl.py
# remove pre-generated file
@ -80,145 +80,78 @@ rm -rf ext/_yaml.c
%build
%py3_build
# regenerate ext/_yaml.c
CFLAGS="${RPM_OPT_FLAGS}" %{__python2} setup.py --with-libyaml build_ext
%if %{with python2}
# py2_build reuses Cython output from py3_build
%py2_build
%if %{with python3}
rm -rf %{py3dir}
# ext/_yaml.c is needed
cp -a . %{py3dir}
pushd %{py3dir}
CFLAGS="${RPM_OPT_FLAGS}" %{__python3} setup.py --with-libyaml build
popd
%endif
CFLAGS="${RPM_OPT_FLAGS}" %{__python2} setup.py --with-libyaml build
%install
%if %{with python2}
%py2_install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
%if %{with python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
%endif
%py3_install
%check
%if %{with python2}
%{__python2} setup.py test
%endif
%if %{with python3}
pushd %{py3dir}
%{__python3} setup.py test
%if %{with python2}
%files -n python2-pyyaml
%license LICENSE
%doc CHANGES README examples
%{python2_sitearch}/*
popd
%endif
%files -n python%{python3_pkgversion}-pyyaml
%files -n python2-pyyaml
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc CHANGES README examples
%doc CHANGES PKG-INFO README examples
%{python2_sitearch}/*
%if %{with python3}
%files -n python3-PyYAML
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc CHANGES PKG-INFO README examples
%{python3_sitearch}/*
%endif
%changelog
* Tue Mar 23 2021 Tomas Orsava <torsava@redhat.com> - 5.4.1-1
- Rebase to version 5.4.1 to fix CVE-2020-14343
- Resolves: rhbz#1860466
* Wed Apr 03 2019 Tomas Orsava <torsava@redhat.com> - 3.12-16
- Bumping due to problems with modular RPM upgrade path
- Resolves: rhbz#1695587
* Mon Jan 18 2021 Tomas Orsava <torsava@redhat.com> - 5.3.1-6
- Add PyYAML to the python39 module in RHEL8
- Resolves: rhbz#1877430
* Tue Oct 09 2018 Lumír Balhar <lbalhar@redhat.com> - 3.12-15
- Remove unversioned provides
- Resolves: rhbz#1628242
* Mon Nov 23 2020 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-5
- Disable Python 2 build on RHEL 9+
* Fri Oct 05 2018 Lumír Balhar <lbalhar@redhat.com> - 3.12-14
- Remove unversioned provides
- Resolves: rhbz#1628242
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 3.12-13
- Fix unversioned requires/buildrequires
- Resolves: rhbz#1628242
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 5.3.1-3
- Rebuilt for Python 3.9
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 3.12-12
- Switch python3 coditions to bcond
* Mon May 18 2020 John Eckersberg <eck@redhat.com> - 5.3.1-2
- Fix fedora conditional macro (rhbz#1836656)
* Thu Mar 19 2020 John Eckersberg <eck@redhat.com> - 5.3.1-1
- New upstream release 5.3.1 (rhbz#1814882)
- Fixes CVE-2020-1747 (rhbz#1807367,1809011)
* Tue Mar 10 2020 Kalev Lember <klember@redhat.com> - 5.3-4
- Add back PyYAML provides on F31 and older
* Mon Mar 2 2020 John Eckersberg <eck@redhat.com> - 5.3-3
- Fix python2 on Fedora < 32 (rhbz#1808812)
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jan 6 2020 John Eckersberg <eck@redhat.com> - 5.3-1
- New upstream release 5.3
* Tue Dec 3 2019 John Eckersberg <eck@redhat.com> - 5.2-1
- New upstream release 5.2
* Fri Nov 22 2019 John Eckersberg <eck@redhat.com> - 5.1.2-4
- Build without python2 by default (rhbz#1775075)
* Thu Sep 19 2019 Miro Hrončok <mhroncok@redhat.com> - 5.1.2-3
- Stop providing PyYAML from python2-pyyaml, Python now means Python 3
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 5.1.2-2
- Rebuilt for Python 3.8
* Wed Jul 31 2019 John Eckersberg <eck@redhat.com> - 5.1.2-1
- New upstream release 5.1.2
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 15 2019 Petr Viktorin <pviktori@redhat.com> - 5.1.1-2
- Remove build dependency on python2-Cython
* Fri Jun 7 2019 John Eckersberg <eck@redhat.com> - 5.1.1-1
- New upstream release 5.1.1 (rhbz#1718110)
* Wed Mar 13 2019 John Eckersberg <eck@redhat.com> - 5.1-1
- New upstream release 5.1 (rhbz#1688414)
- Fixes CVE-2017-18342 (rhbz#1595744)
* Fri Mar 8 2019 John Eckersberg <eck@redhat.com> - 5.1-0.1.b6
- New upstream beta release 5.1b6 (rhbz#1686643)
* Thu Feb 28 2019 John Eckersberg <eck@redhat.com> - 5.1-0.1.b3
- New upstream beta release 5.1b3 (rhbz#1683884)
* Mon Feb 25 2019 John Eckersberg <eck@redhat.com> - 5.1-0.1.b1
- New upstream beta release 5.1b1 (rhbz#1680457)
- Typo fix (rhbz#1680463)
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-0.2.b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 John Eckersberg <eck@redhat.com> - 4.2-0.1.b4
- New upstream beta release 4.2b4
- Replaces 4.1 which was retracted upstream
See https://mail.python.org/pipermail/python-announce-list/2018-June/011977.html
- Add BuildRequires for gcc
See https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
* Thu Jul 12 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1-5
- Rename python3-PyYAML to python3-pyyaml
- Modernize spec
- Fix python2 invocation
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1-3
- Rebuilt for Python 3.7
* Mon Jul 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1-2
- Rebuilt for Python 3.7
* Wed Jun 27 2018 John Eckersberg <eck@redhat.com> - 4.1-1
- New upstream release 4.1
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.12-11
- Rebuilt for Python 3.7
* Mon Jun 25 2018 Tomas Orsava <torsava@redhat.com> - 3.12-11
- Use python2 macros instead of unversioned python macros
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -0,0 +1,73 @@
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 <jcristau@debian.org>
Add to the pyyaml package by Scott Kitterman <scott@kitterman.com>
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 = <CParser>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 = <CEmitter>data
if emitter.dump_unicode == 0:

5
rpminspect.yaml Normal file
View File

@ -0,0 +1,5 @@
# In a modular build rpminspect confuses the python2-libs for a
# subpackage of pyyaml. Ignore this check.
rpmdeps:
ignore:
requires: ^libpython[0-9]+\.[0-9]+\.so.*\(\)\(.*\)$

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (PyYAML-3.12.tar.gz) = e16d8b7f4f026b6a95b11fb59c54ec5f114f6f516294eaa95e718abdf5d37c17a9c4b5e0a0a61fca04e801792d9b7fb801087cf849ff22b9581f6af204b1883a