1
0
Dominique Leuenberger 2023-04-30 14:07:33 +00:00 committed by Git OBS Bridge
commit 82f22c6042
3 changed files with 158 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Apr 28 21:20:40 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add python311-fixes.patch:
* Fix build when python3 is python 3.11+
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 11 19:28:44 UTC 2023 - Christophe Marin <christophe@krop.fr> Tue Apr 11 19:28:44 UTC 2023 - Christophe Marin <christophe@krop.fr>

View File

@ -60,6 +60,8 @@ Patch5: qtwebengine-python3.patch
Patch6: sandbox_futex_time64.patch Patch6: sandbox_futex_time64.patch
# PATCH-FIX-UPSTREAM -- gcc13 fixes # PATCH-FIX-UPSTREAM -- gcc13 fixes
Patch7: 0001-Fixes-for-building-with-GCC-13.patch Patch7: 0001-Fixes-for-building-with-GCC-13.patch
# PATCH-FIX-UPSTREAM -- python 3.11 fixes
Patch8: python311-fixes.patch
### Patch 50-99 are applied conditionally ### Patch 50-99 are applied conditionally
# PATCH-FIX-OPENSUSE -- allow building qtwebengine with ffmpeg5 # PATCH-FIX-OPENSUSE -- allow building qtwebengine with ffmpeg5
Patch50: qtwebengine-ffmpeg5.patch Patch50: qtwebengine-ffmpeg5.patch
@ -301,6 +303,7 @@ Examples for the libqt5-qtpdf module.
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
# Replace the whole catapult folder rather than picking individual changes # Replace the whole catapult folder rather than picking individual changes
pushd src/3rdparty/chromium/third_party pushd src/3rdparty/chromium/third_party

149
python311-fixes.patch Normal file
View File

@ -0,0 +1,149 @@
From f90f49df8db04dcb72f7ce0c4d0b2fe329bab00c Mon Sep 17 00:00:00 2001
From: Dan Harrington <harringtond@chromium.org>
Date: Fri, 04 Jun 2021 16:46:25 +0000
Subject: [PATCH] Migrate presubmit to python3
Fixed a couple warnings I found when running the unit
tests in python3.
Bug: 1212110
Change-Id: I3d1b5859b5c517ad5eea30cb816fad0389715f73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2934203
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#889331}
---
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/PRESUBMIT.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/metrics/ukm/PRESUBMIT.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/PRESUBMIT.py
@@ -8,6 +8,8 @@ See http://dev.chromium.org/developers/h
for more details on the presubmit API built into gcl.
"""
+USE_PYTHON3 = True
+
UKM_XML = 'ukm.xml'
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/gen_builders_test.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/metrics/ukm/gen_builders_test.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/gen_builders_test.py
@@ -25,8 +25,8 @@ class GenBuildersTest(unittest.TestCase)
def testGenerateCode(self):
relpath = '.'
- data = ukm_model.UKM_XML_TYPE.Parse(
- open('../../tools/metrics/ukm/ukm.xml').read())
+ with open('../../tools/metrics/ukm/ukm.xml') as f:
+ data = ukm_model.UKM_XML_TYPE.Parse(f.read())
event = data[ukm_model._EVENT_TYPE.tag][0]
metric = event[ukm_model._METRIC_TYPE.tag][0]
self.assertIsNotNone(event)
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py
@@ -39,15 +39,16 @@ _INDEX_TYPE = models.ObjectNodeType(
],
single_line=True)
-_STATISTICS_TYPE = models.ObjectNodeType(
+_STATISTICS_TYPE = models.ObjectNodeType(
'statistics',
attributes=[
- ('export', str, r'^(?i)(|true|false)$'),
+ ('export', str, r'(?i)^(|true|false)$'),
],
children=[
models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False),
- models.ChildType(
- _ENUMERATION_TYPE.tag, _ENUMERATION_TYPE, multiple=False),
+ models.ChildType(_ENUMERATION_TYPE.tag,
+ _ENUMERATION_TYPE,
+ multiple=False),
])
_HISTORY_TYPE = models.ObjectNodeType(
@@ -90,25 +91,34 @@ _METRIC_TYPE = models.ObjectNodeType(
_AGGREGATION_TYPE.tag, _AGGREGATION_TYPE, multiple=True),
])
-_EVENT_TYPE = models.ObjectNodeType(
- 'event',
- attributes=[
- ('name', str, r'^[A-Za-z0-9.]+$'),
- ('singular', str, r'^(?i)(|true|false)$'),
- ],
- alphabetization=[
- (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
- (_OWNER_TYPE.tag, _KEEP_ORDER),
- (_SUMMARY_TYPE.tag, _KEEP_ORDER),
- (_METRIC_TYPE.tag, _LOWERCASE_FN('name')),
- ],
- extra_newlines=(1, 1, 1),
- children=[
- models.ChildType(_OBSOLETE_TYPE.tag, _OBSOLETE_TYPE, multiple=False),
- models.ChildType(_OWNER_TYPE.tag, _OWNER_TYPE, multiple=True),
- models.ChildType(_SUMMARY_TYPE.tag, _SUMMARY_TYPE, multiple=False),
- models.ChildType(_METRIC_TYPE.tag, _METRIC_TYPE, multiple=True),
- ])
+_EVENT_TYPE = models.ObjectNodeType('event',
+ attributes=[
+ ('name', str, r'^[A-Za-z0-9.]+$'),
+ ('singular', str,
+ r'(?i)^(|true|false)$'),
+ ],
+ alphabetization=[
+ (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
+ (_OWNER_TYPE.tag, _KEEP_ORDER),
+ (_SUMMARY_TYPE.tag, _KEEP_ORDER),
+ (_METRIC_TYPE.tag,
+ _LOWERCASE_FN('name')),
+ ],
+ extra_newlines=(1, 1, 1),
+ children=[
+ models.ChildType(_OBSOLETE_TYPE.tag,
+ _OBSOLETE_TYPE,
+ multiple=False),
+ models.ChildType(_OWNER_TYPE.tag,
+ _OWNER_TYPE,
+ multiple=True),
+ models.ChildType(_SUMMARY_TYPE.tag,
+ _SUMMARY_TYPE,
+ multiple=False),
+ models.ChildType(_METRIC_TYPE.tag,
+ _METRIC_TYPE,
+ multiple=True),
+ ])
_UKM_CONFIGURATION_TYPE = models.ObjectNodeType(
'ukm-configuration',
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/PRESUBMIT_test_mocks.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/PRESUBMIT_test_mocks.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/PRESUBMIT_test_mocks.py
@@ -119,7 +119,7 @@ class MockInputApi(object):
def PresubmitLocalPath(self):
return self.presubmit_local_path
- def ReadFile(self, filename, mode='rU'):
+ def ReadFile(self, filename, mode='r'):
if hasattr(filename, 'AbsoluteLocalPath'):
filename = filename.AbsoluteLocalPath()
for file_ in self.files:
Index: qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/grit/grit/util.py
===================================================================
--- qtwebengine-everywhere-src-5.15.13.orig/src/3rdparty/chromium/tools/grit/grit/util.py
+++ qtwebengine-everywhere-src-5.15.13/src/3rdparty/chromium/tools/grit/grit/util.py
@@ -211,7 +211,7 @@ def ReadFile(filename, encoding):
mode = 'rb'
encoding = None
else:
- mode = 'rU'
+ mode = 'r'
with io.open(abs(filename), mode, encoding=encoding) as f:
return f.read()