diff --git a/0001-Parse-a-field-s-enum-correctly.patch b/0001-Parse-a-field-s-enum-correctly.patch new file mode 100644 index 0000000000000000000000000000000000000000..9aed5062529d2403af754b31b1e45fa43906c7d7 --- /dev/null +++ b/0001-Parse-a-field-s-enum-correctly.patch @@ -0,0 +1,49 @@ +From 2b3559c10c18eb63e61efdc8a030765d624a0fba Mon Sep 17 00:00:00 2001 +From: Uli Schlachter +Date: Sat, 21 Mar 2020 11:12:52 +0100 +Subject: [PATCH] Parse a field's "enum=" correctly + +In xv.xml, there is something like this: + + + [...] + + + + 16 + + [...] + + +When parsing this, the Field instance for "guid" ended up with .enum == +"ImageOrder". This is because the loop that parses complex type did not +unset a variable across iterations, meaning that the last "enum" +property "stuck" and was also used for all following fields. + +Fix this by simply moving the initialisation of the "enum" variable +inside of the loop. + +Signed-off-by: Uli Schlachter +--- + xcbgen/xtypes.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py +index 3afc812..e47189d 100644 +--- a/xcbgen/xtypes.py ++++ b/xcbgen/xtypes.py +@@ -528,10 +528,10 @@ class ComplexType(Type): + def resolve(self, module): + if self.resolved: + return +- enum = None + + # Resolve all of our field datatypes. + for child in list(self.elt): ++ enum = None + if child.tag == 'pad': + field_name = 'pad' + str(module.pads) + fkey = 'CARD8' +-- +2.39.0.windows.2 + diff --git a/0002-xcbgen-Use-math.gcd-for-Python-3.5.patch b/0002-xcbgen-Use-math.gcd-for-Python-3.5.patch new file mode 100644 index 0000000000000000000000000000000000000000..6a459be17522e4eb63c43bfd2fe55e21aa61b876 --- /dev/null +++ b/0002-xcbgen-Use-math.gcd-for-Python-3.5.patch @@ -0,0 +1,38 @@ +From 426ae35bee1fa0fdb8b5120b1dcd20cee6e34512 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Mon, 1 Jun 2020 12:24:16 +0200 +Subject: [PATCH] xcbgen: Use math.gcd() for Python >= 3.5. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +fractions.gcd() has been deprecated since Python 3.5, and +was finally dropped in Python 3.9. It is recommended to +use math.gcd() instead. + +Signed-off-by: Björn Esser +--- + xcbgen/align.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/xcbgen/align.py b/xcbgen/align.py +index d4c12ee..5c4f517 100644 +--- a/xcbgen/align.py ++++ b/xcbgen/align.py +@@ -2,7 +2,12 @@ + This module contains helper classes for alignment arithmetic and checks + ''' + +-from fractions import gcd ++from sys import version_info ++ ++if version_info[:2] >= (3, 5): ++ from math import gcd ++else: ++ from fractions import gcd + + class Alignment(object): + +-- +2.39.0.windows.2 + diff --git a/xcb-proto-1.13.tar.bz2 b/xcb-proto-1.13.tar.bz2 deleted file mode 100644 index 4e9742347460318f40fcbe485b818e572301e2f1..0000000000000000000000000000000000000000 Binary files a/xcb-proto-1.13.tar.bz2 and /dev/null differ diff --git a/xcb-proto-1.14.tar.gz b/xcb-proto-1.14.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f19dc9d2f7ee601d8d24eb104b1a2da25521a4f2 Binary files /dev/null and b/xcb-proto-1.14.tar.gz differ diff --git a/xcb-proto.spec b/xcb-proto.spec index d2289428055b6c9b64928ea895fc2c56b3d4b9dd..99d9f1c7da2b06ddc1e3097c1d82d24ec2e1e88b 100644 --- a/xcb-proto.spec +++ b/xcb-proto.spec @@ -1,11 +1,13 @@ %define debug_package %{nil} Name: xcb-proto -Version: 1.13 -Release: 6 +Version: 1.14 +Release: 4 Summary: XCB protocol descriptions License: MIT -URL: https://xcb.freedesktop.org/ -Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2 +URL: https://gitlab.freedesktop.org/xorg/proto/xcbproto/ +Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.gz +Patch01: 0001-Parse-a-field-s-enum-correctly.patch +Patch02: 0002-xcbgen-Use-math.gcd-for-Python-3.5.patch BuildArch: noarch BuildRequires: python3-devel @@ -28,7 +30,7 @@ export PYTHON="python3" %make_install %files -%doc COPYING NEWS README TODO doc/xml-xcb.txt +%doc COPYING NEWS README.md TODO doc/xml-xcb.txt %{_datadir}/pkgconfig/xcb-proto.pc %dir %{_datadir}/xcb/ %{_datadir}/xcb/*.xsd @@ -36,5 +38,17 @@ export PYTHON="python3" %{python3_sitelib}/xcbgen %changelog -* Thu Nov 28 2019 yangjian - 1.13-6 -- Package init +* Fri Oct 20 2023 zhangliangpengkun - 1.14-4 +- xcbgen: Use math.gcd() for Python >= 3.5. + +* Thu Oct 12 2023 zhangliangpengkun - 1.14-3 +- Parse a field's "enum=" correctly + +* Fri Jan 6 2023 yangbo - 1.14-2 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Modify spec URL + +* Fri Aug 28 2020 zhanzhimin - 1.14-1 +- update package to 1.14