Fix compilation failure by python3.10 and wayland 1.20
This commit is contained in:
parent
f953257f11
commit
caa9723fef
28
0001-fix-wl_proxy_marshal_flags.patch
Normal file
28
0001-fix-wl_proxy_marshal_flags.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 49d1846b55bcd4b54a8b8eb2b4ae0b29be0b36a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: bzg1107 <preloyalwhite@163.com>
|
||||||
|
Date: Tue, 11 Jan 2022 17:36:03 +0800
|
||||||
|
Subject: [PATCH] fix wl_proxy_marshal_flags
|
||||||
|
|
||||||
|
---
|
||||||
|
widget/gtk/mozwayland/mozwayland.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c
|
||||||
|
index 5cea1c5..bbf97a5 100644
|
||||||
|
--- a/widget/gtk/mozwayland/mozwayland.c
|
||||||
|
+++ b/widget/gtk/mozwayland/mozwayland.c
|
||||||
|
@@ -41,6 +41,11 @@ MOZ_EXPORT void wl_proxy_marshal(struct wl_proxy* p, uint32_t opcode, ...) {}
|
||||||
|
MOZ_EXPORT void wl_proxy_marshal_array(struct wl_proxy* p, uint32_t opcode,
|
||||||
|
union wl_argument* args) {}
|
||||||
|
|
||||||
|
+MOZ_EXPORT struct wl_proxy *wl_proxy_marshal_flags(struct wl_proxy* proxy, uint32_t opcode,
|
||||||
|
+ const struct wl_interface *interface, uint32_t version, uint32_t flags, ...) {
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
MOZ_EXPORT struct wl_proxy* wl_proxy_create(
|
||||||
|
struct wl_proxy* factory, const struct wl_interface* interface) {
|
||||||
|
return NULL;
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
200
0002-fix-from-collections-import-Iterable.patch
Normal file
200
0002-fix-from-collections-import-Iterable.patch
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
diff --git a/python/mach/mach/config.py b/python/mach/mach/config.py
|
||||||
|
index 7210eca..edb4d2e 100644
|
||||||
|
--- a/python/mach/mach/config.py
|
||||||
|
+++ b/python/mach/mach/config.py
|
||||||
|
@@ -144,7 +144,7 @@ def reraise_attribute_error(func):
|
||||||
|
return _
|
||||||
|
|
||||||
|
|
||||||
|
-class ConfigSettings(collections.Mapping):
|
||||||
|
+class ConfigSettings(collections.abc.Mapping):
|
||||||
|
"""Interface for configuration settings.
|
||||||
|
|
||||||
|
This is the main interface to the configuration.
|
||||||
|
@@ -190,7 +190,7 @@ class ConfigSettings(collections.Mapping):
|
||||||
|
will result in exceptions being raised.
|
||||||
|
"""
|
||||||
|
|
||||||
|
- class ConfigSection(collections.MutableMapping, object):
|
||||||
|
+ class ConfigSection(collections.abc.MutableMapping, object):
|
||||||
|
"""Represents an individual config section."""
|
||||||
|
def __init__(self, config, name, settings):
|
||||||
|
object.__setattr__(self, '_config', config)
|
||||||
|
diff --git a/python/mach/mach/decorators.py b/python/mach/mach/decorators.py
|
||||||
|
index f69a75b..afc1797 100644
|
||||||
|
--- a/python/mach/mach/decorators.py
|
||||||
|
+++ b/python/mach/mach/decorators.py
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
-import collections
|
||||||
|
+import collections.abc
|
||||||
|
import inspect
|
||||||
|
import sys
|
||||||
|
|
||||||
|
@@ -159,7 +159,7 @@ def CommandProvider(cls):
|
||||||
|
'Conditions argument must take a list ' + \
|
||||||
|
'of functions. Found %s instead.'
|
||||||
|
|
||||||
|
- if not isinstance(command.conditions, collections.Iterable):
|
||||||
|
+ if not isinstance(command.conditions, collections.abc.Iterable):
|
||||||
|
msg = msg % (command.name, type(command.conditions))
|
||||||
|
raise MachError(msg)
|
||||||
|
|
||||||
|
diff --git a/python/mach/mach/main.py b/python/mach/mach/main.py
|
||||||
|
index 95f492f..5b8d205 100644
|
||||||
|
--- a/python/mach/mach/main.py
|
||||||
|
+++ b/python/mach/mach/main.py
|
||||||
|
@@ -16,7 +16,7 @@ import os
|
||||||
|
import sys
|
||||||
|
import traceback
|
||||||
|
import uuid
|
||||||
|
-from collections import Iterable
|
||||||
|
+from collections.abc import Iterable
|
||||||
|
|
||||||
|
from mach.sentry import register_sentry, report_exception
|
||||||
|
from six import string_types
|
||||||
|
diff --git a/python/mozbuild/mozbuild/backend/configenvironment.py b/python/mozbuild/mozbuild/backend/configenvironment.py
|
||||||
|
index 20d1a9f..898cabb 100644
|
||||||
|
--- a/python/mozbuild/mozbuild/backend/configenvironment.py
|
||||||
|
+++ b/python/mozbuild/mozbuild/backend/configenvironment.py
|
||||||
|
@@ -9,7 +9,8 @@ import six
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
|
||||||
|
-from collections import Iterable, OrderedDict
|
||||||
|
+from collections.abc import Iterable
|
||||||
|
+from collections import OrderedDict
|
||||||
|
from types import ModuleType
|
||||||
|
|
||||||
|
import mozpack.path as mozpath
|
||||||
|
diff --git a/python/mozbuild/mozbuild/makeutil.py b/python/mozbuild/mozbuild/makeutil.py
|
||||||
|
index 4da1a3b..4ce5684 100644
|
||||||
|
--- a/python/mozbuild/mozbuild/makeutil.py
|
||||||
|
+++ b/python/mozbuild/mozbuild/makeutil.py
|
||||||
|
@@ -7,7 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import six
|
||||||
|
-from collections import Iterable
|
||||||
|
+from collections.abc import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
class Makefile(object):
|
||||||
|
diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
|
||||||
|
index 044cf64..98ed3ef 100644
|
||||||
|
--- a/python/mozbuild/mozbuild/util.py
|
||||||
|
+++ b/python/mozbuild/mozbuild/util.py
|
||||||
|
@@ -782,7 +782,7 @@ class HierarchicalStringList(object):
|
||||||
|
self._strings = StrictOrderingOnAppendList()
|
||||||
|
self._children = {}
|
||||||
|
|
||||||
|
- class StringListAdaptor(collections.Sequence):
|
||||||
|
+ class StringListAdaptor(collections.abc.Sequence):
|
||||||
|
def __init__(self, hsl):
|
||||||
|
self._hsl = hsl
|
||||||
|
|
||||||
|
diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py
|
||||||
|
index 9b57b2f..9bcca5b 100644
|
||||||
|
--- a/testing/mozbase/manifestparser/manifestparser/filters.py
|
||||||
|
+++ b/testing/mozbase/manifestparser/manifestparser/filters.py
|
||||||
|
@@ -12,7 +12,8 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
|
import itertools
|
||||||
|
import os
|
||||||
|
-from collections import defaultdict, MutableSequence
|
||||||
|
+from collections.abc import MutableSequence
|
||||||
|
+from collections import defaultdict
|
||||||
|
|
||||||
|
import six
|
||||||
|
from six import string_types
|
||||||
|
diff --git a/testing/mozbase/versioninfo.py b/testing/mozbase/versioninfo.py
|
||||||
|
index 91d1a04..8c16800 100755
|
||||||
|
--- a/testing/mozbase/versioninfo.py
|
||||||
|
+++ b/testing/mozbase/versioninfo.py
|
||||||
|
@@ -11,7 +11,7 @@ from commit messages.
|
||||||
|
|
||||||
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
|
-from collections import Iterable
|
||||||
|
+from collections.abc import Iterable
|
||||||
|
from distutils.version import StrictVersion
|
||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
diff --git a/third_party/python/gyp/pylib/gyp/common.py b/third_party/python/gyp/pylib/gyp/common.py
|
||||||
|
index b268d22..4f9cb0e 100644
|
||||||
|
--- a/third_party/python/gyp/pylib/gyp/common.py
|
||||||
|
+++ b/third_party/python/gyp/pylib/gyp/common.py
|
||||||
|
@@ -494,7 +494,7 @@ def uniquer(seq, idfun=None):
|
||||||
|
|
||||||
|
|
||||||
|
# Based on http://code.activestate.com/recipes/576694/.
|
||||||
|
-class OrderedSet(collections.MutableSet):
|
||||||
|
+class OrderedSet(collections.abc.MutableSet):
|
||||||
|
def __init__(self, iterable=None):
|
||||||
|
self.end = end = []
|
||||||
|
end += [None, end, end] # sentinel node for doubly linked list
|
||||||
|
diff --git a/third_party/python/gyp/pylib/gyp/msvs_emulation.py b/third_party/python/gyp/pylib/gyp/msvs_emulation.py
|
||||||
|
index 63d40e6..43fbbbb 100644
|
||||||
|
--- a/third_party/python/gyp/pylib/gyp/msvs_emulation.py
|
||||||
|
+++ b/third_party/python/gyp/pylib/gyp/msvs_emulation.py
|
||||||
|
@@ -91,7 +91,7 @@ def _AddPrefix(element, prefix):
|
||||||
|
"""Add |prefix| to |element| or each subelement if element is iterable."""
|
||||||
|
if element is None:
|
||||||
|
return element
|
||||||
|
- if (isinstance(element, collections.Iterable) and
|
||||||
|
+ if (isinstance(element, collections.abc.Iterable) and
|
||||||
|
not isinstance(element, basestring)):
|
||||||
|
return [prefix + e for e in element]
|
||||||
|
else:
|
||||||
|
@@ -104,7 +104,7 @@ def _DoRemapping(element, map):
|
||||||
|
if map is not None and element is not None:
|
||||||
|
if not callable(map):
|
||||||
|
map = map.get # Assume it's a dict, otherwise a callable to do the remap.
|
||||||
|
- if (isinstance(element, collections.Iterable) and
|
||||||
|
+ if (isinstance(element, collections.abc.Iterable) and
|
||||||
|
not isinstance(element, basestring)):
|
||||||
|
element = filter(None, [map(elem) for elem in element])
|
||||||
|
else:
|
||||||
|
@@ -117,7 +117,7 @@ def _AppendOrReturn(append, element):
|
||||||
|
then add |element| to it, adding each item in |element| if it's a list or
|
||||||
|
tuple."""
|
||||||
|
if append is not None and element is not None:
|
||||||
|
- if (isinstance(element, collections.Iterable) and
|
||||||
|
+ if (isinstance(element, collections.abc.Iterable) and
|
||||||
|
not isinstance(element, basestring)):
|
||||||
|
append.extend(element)
|
||||||
|
else:
|
||||||
|
diff --git a/third_party/python/virtualenv/virtualenv.py b/third_party/python/virtualenv/virtualenv.py
|
||||||
|
index 9eaedaf..3ef431c 100755
|
||||||
|
--- a/third_party/python/virtualenv/virtualenv.py
|
||||||
|
+++ b/third_party/python/virtualenv/virtualenv.py
|
||||||
|
@@ -1804,7 +1804,7 @@ def fix_local_scheme(home_dir, symlink=True):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
# noinspection PyProtectedMember
|
||||||
|
- if sysconfig._get_default_scheme() == "posix_local":
|
||||||
|
+ if sysconfig.get_default_scheme() == "posix_local":
|
||||||
|
local_path = os.path.join(home_dir, "local")
|
||||||
|
if not os.path.exists(local_path):
|
||||||
|
os.mkdir(local_path)
|
||||||
|
diff --git a/third_party/python/voluptuous/voluptuous/schema_builder.py b/third_party/python/voluptuous/voluptuous/schema_builder.py
|
||||||
|
index 8d7a81a..92b60ac 100644
|
||||||
|
--- a/third_party/python/voluptuous/voluptuous/schema_builder.py
|
||||||
|
+++ b/third_party/python/voluptuous/voluptuous/schema_builder.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-import collections
|
||||||
|
+import collections.abc
|
||||||
|
import inspect
|
||||||
|
import re
|
||||||
|
from functools import wraps
|
||||||
|
@@ -280,7 +280,7 @@ class Schema(object):
|
||||||
|
return schema.__voluptuous_compile__(self)
|
||||||
|
if isinstance(schema, Object):
|
||||||
|
return self._compile_object(schema)
|
||||||
|
- if isinstance(schema, collections.Mapping):
|
||||||
|
+ if isinstance(schema, collections.abc.Mapping):
|
||||||
|
return self._compile_dict(schema)
|
||||||
|
elif isinstance(schema, list):
|
||||||
|
return self._compile_list(schema)
|
||||||
@ -88,7 +88,7 @@
|
|||||||
Summary: Mozilla Firefox Web browser
|
Summary: Mozilla Firefox Web browser
|
||||||
Name: firefox
|
Name: firefox
|
||||||
Version: 79.0
|
Version: 79.0
|
||||||
Release: 11
|
Release: 12
|
||||||
URL: https://www.mozilla.org/firefox/
|
URL: https://www.mozilla.org/firefox/
|
||||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||||
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
|
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
|
||||||
@ -186,6 +186,8 @@ Patch641: Bug-1680166-GCC-is-smarter-than-clang-so-ignore-the-warning
|
|||||||
Patch642: firefox-glibc-dynstack.patch
|
Patch642: firefox-glibc-dynstack.patch
|
||||||
Patch643: firefox-crashreporter-build.patch
|
Patch643: firefox-crashreporter-build.patch
|
||||||
Patch644: Deny-clone3-to-force-glibc-fallback.patch
|
Patch644: Deny-clone3-to-force-glibc-fallback.patch
|
||||||
|
Patch645: 0001-fix-wl_proxy_marshal_flags.patch
|
||||||
|
Patch646: 0002-fix-from-collections-import-Iterable.patch
|
||||||
|
|
||||||
%if %{?system_nss}
|
%if %{?system_nss}
|
||||||
BuildRequires: pkgconfig(nspr) >= %{nspr_version} pkgconfig(nss) >= %{nss_version}
|
BuildRequires: pkgconfig(nspr) >= %{nspr_version} pkgconfig(nss) >= %{nss_version}
|
||||||
@ -365,6 +367,8 @@ tar -xf %{SOURCE3}
|
|||||||
%patch642 -p1
|
%patch642 -p1
|
||||||
%patch643 -p1
|
%patch643 -p1
|
||||||
%patch644 -p1
|
%patch644 -p1
|
||||||
|
%patch645 -p1
|
||||||
|
%patch646 -p1
|
||||||
|
|
||||||
%{__rm} -f .mozconfig
|
%{__rm} -f .mozconfig
|
||||||
%{__cp} %{SOURCE10} .mozconfig
|
%{__cp} %{SOURCE10} .mozconfig
|
||||||
@ -807,6 +811,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 6 2022 liyanan <liyanan32@h-partners.com> - 79.0-12
|
||||||
|
- Fix compilation failure by python3.10 and wayland 1.20
|
||||||
|
|
||||||
* Thu Oct 14 2021 zhangweiguo <zhangweiguo2@huawei.com> - 79.0-11
|
* Thu Oct 14 2021 zhangweiguo <zhangweiguo2@huawei.com> - 79.0-11
|
||||||
- Set RUSTFLAGS:debuginfo to 1
|
- Set RUSTFLAGS:debuginfo to 1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user