diff options
-rw-r--r-- | chromium/chromium/chromium-python-3.12.patch | 138 | ||||
-rw-r--r-- | chromium/chromium/chromium.spec | 14 |
2 files changed, 149 insertions, 3 deletions
diff --git a/chromium/chromium/chromium-python-3.12.patch b/chromium/chromium/chromium-python-3.12.patch new file mode 100644 index 0000000..5837ae5 --- /dev/null +++ b/chromium/chromium/chromium-python-3.12.patch @@ -0,0 +1,138 @@ +diff -up chromium-115.0.5790.102/base/write_build_date_header.py.me chromium-115.0.5790.102/base/write_build_date_header.py +--- chromium-115.0.5790.102/base/write_build_date_header.py.me 2023-07-22 14:23:42.620679397 +0200 ++++ chromium-115.0.5790.102/base/write_build_date_header.py 2023-07-22 15:24:46.833310310 +0200 +@@ -17,7 +17,7 @@ def main(): + args = argument_parser.parse_args() + + date_val = int(args.timestamp) +- date = datetime.datetime.utcfromtimestamp(date_val) ++ date = datetime.datetime.fromtimestamp(date_val, datetime.timezone.utc) + output = ('// Generated by //base/write_build_date_header.py\n' + '#ifndef BASE_GENERATED_BUILD_DATE_TIMESTAMP \n' + f'#define BASE_GENERATED_BUILD_DATE_TIMESTAMP {date_val}' +diff -up chromium-115.0.5790.102/build/write_buildflag_header.py.me chromium-115.0.5790.102/build/write_buildflag_header.py +--- chromium-115.0.5790.102/build/write_buildflag_header.py.me 2023-07-22 14:16:14.196975451 +0200 ++++ chromium-115.0.5790.102/build/write_buildflag_header.py 2023-07-22 14:20:24.977239994 +0200 +@@ -44,7 +44,7 @@ def GetOptions(): + header_guard = cmdline_options.output.upper() + if header_guard[0].isdigit(): + header_guard = '_' + header_guard +- header_guard = re.sub('[^\w]', '_', header_guard) ++ header_guard = re.sub(r'[^\w]', '_', header_guard) + header_guard += '_' + + # The actual output file is inside the gen dir. +diff -up chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py +--- chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me 2023-07-22 14:47:34.230764210 +0200 ++++ chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py 2023-07-22 15:11:50.360983383 +0200 +@@ -9,7 +9,8 @@ + """ + from __future__ import print_function + import abc +-import imp ++import types ++import importlib + import optparse + import os + import re +@@ -40,6 +41,12 @@ class GoogleProtobufModuleImporter: + return filepath + return None + ++ def load_source(name: str, path: str) -> types.ModuleType: ++ spec = importlib.util.spec_from_file_location(name, path) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) ++ return module ++ + def _module_exists(self, fullname): + return self._fullname_to_filepath(fullname) is not None + +@@ -68,7 +75,7 @@ class GoogleProtobufModuleImporter: + raise ImportError(fullname) + + filepath = self._fullname_to_filepath(fullname) +- return imp.load_source(fullname, filepath) ++ return load_source(fullname, filepath) + + class BinaryProtoGenerator: + +diff -up chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py +--- chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me 2023-07-22 15:17:19.114258801 +0200 ++++ chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py 2023-07-22 15:17:43.368200491 +0200 +@@ -32,7 +32,7 @@ def FilterLine(filename, line, output): + return + + if line.startswith("goog.provide"): +- match = re.match("goog.provide\('([^']+)'\);", line) ++ match = re.match(r"goog.provide\('([^']+)'\);", line) + if not match: + print("Invalid goog.provide line in %s:\n%s" % (filename, line)) + sys.exit(1) +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me 2023-07-22 15:12:41.850895179 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py 2023-07-22 15:12:55.844871207 +0200 +@@ -18,7 +18,7 @@ class HTMLGenerationController(object): + + def GetHTMLForInlineStylesheet(self, contents): + if self.current_module is None: +- if re.search('url\(.+\)', contents): ++ if re.search(r'url\(.+\)', contents): + raise Exception( + 'Default HTMLGenerationController cannot handle inline style urls') + return contents +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me 2023-07-22 15:14:06.923717910 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py 2023-07-22 15:18:03.704150614 +0200 +@@ -4,4 +4,4 @@ + + + def EscapeJSIfNeeded(js): +- return js.replace('</script>', '<\/script>') ++ return js.replace(r'</script>', r'<\/script>') +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me 2023-07-22 15:14:30.105662532 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py 2023-07-22 15:14:57.977595950 +0200 +@@ -293,6 +293,6 @@ class HTMLModuleParser(): + html = '' + else: + if html.find('< /script>') != -1: +- raise Exception('Escape script tags with <\/script>') ++ raise Exception(r'Escape script tags with <\/script>') + + return HTMLModuleParserResults(html) +diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py +--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me 2023-07-22 15:13:12.316842990 +0200 ++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py 2023-07-22 15:13:49.684759091 +0200 +@@ -60,7 +60,7 @@ class ParsedStyleSheet(object): + return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8')) + + # I'm assuming we only have url()'s associated with images +- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)', ++ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)', + InlineUrl, self.contents) + + def AppendDirectlyDependentFilenamesTo(self, dependent_filenames): +@@ -72,7 +72,7 @@ class ParsedStyleSheet(object): + raise Exception('@imports are not supported') + + matches = re.findall( +- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)', ++ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)', + self.contents) + + def resolve_url(url): +diff -up chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py +--- chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me 2023-07-22 15:11:56.826972306 +0200 ++++ chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py 2023-07-22 15:12:37.550902545 +0200 +@@ -119,8 +119,8 @@ class _PreprocessingLoader(jinja2.BaseLo + source = self.preprocess(f.read()) + return source, path, lambda: mtime == os.path.getmtime(path) + +- blockstart = re.compile('{%-?\s*(if|elif|else|for|block|macro)[^}]*%}') +- blockend = re.compile('{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}') ++ blockstart = re.compile(r'{%-?\s*(if|elif|else|for|block|macro)[^}]*%}') ++ blockend = re.compile(r'{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}') + + def preprocess(self, source): + lines = source.split('\n') diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec index 0ee000d..056ce65 100644 --- a/chromium/chromium/chromium.spec +++ b/chromium/chromium/chromium.spec @@ -71,7 +71,7 @@ %bcond_with fedora_compilation_flags Name: chromium -Version: 118.0.5993.70 +Version: 118.0.5993.88 Release: 100%{?dist} Summary: A WebKit (Blink) powered web browser @@ -138,6 +138,10 @@ Patch30: chromium-use-system-zstd.patch Patch31: chromium-material_color_utilities-cmath.patch Patch32: chromium-partition_root-gcc-12.patch +# Pull patches from Fedora +# https://src.fedoraproject.org/rpms/chromium/c/820d621e374d616e +Patch40: chromium-python-3.12.patch + # I don't have time to test whether it work on other architectures ExclusiveArch: x86_64 @@ -163,6 +167,8 @@ BuildRequires: pkgconfig(libffi), pkgconfig(nss), pkgconfig(libexif) BuildRequires: pkgconfig(xtst), pkgconfig(xscrnsaver), pkgconfig(xshmfence) BuildRequires: pkgconfig(dbus-1), pkgconfig(libudev), pkgconfig(libevdev) BuildRequires: pkgconfig(libva), pkgconfig(gnome-keyring-1) +# remove_bundled_libraries.py --do-remove +BuildRequires: python3-six # replace_gn_files.py --system-libraries BuildRequires: flac-devel %if %{with system_freetype} @@ -289,7 +295,6 @@ find -type f -exec \ third_party/catapult/third_party/beautifulsoup4-4.9.3 \ third_party/catapult/third_party/html5lib-1.1 \ third_party/catapult/third_party/polymer \ - third_party/catapult/third_party/six \ third_party/catapult/tracing/third_party/d3 \ third_party/catapult/tracing/third_party/gl-matrix \ third_party/catapult/tracing/third_party/jpeg-js \ @@ -456,7 +461,6 @@ find -type f -exec \ third_party/selenium-atoms \ third_party/shell-encryption \ third_party/simplejson \ - third_party/six \ third_party/skia \ third_party/skia/include/third_party/vulkan \ third_party/skia/third_party/vulkan \ @@ -775,6 +779,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Oct 20 2023 - Ting-Wei Lan <lantw44@gmail.com> - 118.0.5993.88-100 +- Update to 118.0.5993.88 +- Unbundle six to fix Python 3.12 issues on Fedora 39 + * Wed Oct 18 2023 - Ting-Wei Lan <lantw44@gmail.com> - 118.0.5993.70-100 - Update to 118.0.5993.70 |