drop support of python2

epel8
Than Ngo 2 years ago
parent 3cd5befbda
commit 3d21a3491a

@ -1,33 +0,0 @@
diff -up chromium-71.0.3578.98/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 chromium-71.0.3578.98/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
--- chromium-71.0.3578.98/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 2018-12-12 17:02:58.000000000 -0500
+++ chromium-71.0.3578.98/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2018-12-14 11:48:22.150229631 -0500
@@ -58,7 +58,7 @@ def _MinifyJS(input_js):
with tempfile.NamedTemporaryFile() as _:
args = [
- 'python',
+ 'python2',
rjsmin_path
]
p = subprocess.Popen(args,
@@ -177,7 +177,7 @@ def _MinifyCSS(css_text):
os.path.join(py_vulcanize_path, 'third_party', 'rcssmin', 'rcssmin.py'))
with tempfile.NamedTemporaryFile() as _:
- rcssmin_args = ['python', rcssmin_path]
+ rcssmin_args = ['python2', rcssmin_path]
p = subprocess.Popen(rcssmin_args,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
diff -up chromium-71.0.3578.98/tools/gn/bootstrap/bootstrap.py.py2 chromium-71.0.3578.98/tools/gn/bootstrap/bootstrap.py
--- chromium-71.0.3578.98/tools/gn/bootstrap/bootstrap.py.py2 2018-12-14 11:48:22.155229522 -0500
+++ chromium-71.0.3578.98/tools/gn/bootstrap/bootstrap.py 2018-12-14 11:49:31.043728244 -0500
@@ -93,7 +93,7 @@ def main(argv):
if not options.debug:
gn_gen_args += ' is_debug=false'
subprocess.check_call([
- gn_path, 'gen', out_dir,
+ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python2',
'--args=%s' % gn_gen_args, "--root=" + SRC_ROOT
])

@ -1,14 +0,0 @@
diff -up chromium-75.0.3770.80/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc.va1compat chromium-75.0.3770.80/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
--- chromium-75.0.3770.80/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc.va1compat 2019-06-05 11:35:57.274466969 -0400
+++ chromium-75.0.3770.80/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc 2019-06-05 11:36:17.201067326 -0400
@@ -39,6 +39,10 @@ enum VAJDADecoderFailure {
VAJDA_DECODER_FAILURES_MAX,
};
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 VA_FOURCC('I', '4', '2', '0')
+#endif
+
static void ReportToVAJDADecoderFailureUMA(VAJDADecoderFailure failure) {
UMA_HISTOGRAM_ENUMERATION("Media.VAJDA.DecoderFailure", failure,
VAJDA_DECODER_FAILURES_MAX + 1);

@ -1,14 +0,0 @@
diff -up chromium-91.0.4472.77/build/config/compiler/BUILD.gn.aarch-cxxflags chromium-91.0.4472.77/build/config/compiler/BUILD.gn
--- chromium-91.0.4472.77/build/config/compiler/BUILD.gn.aarch-cxxflags 2021-06-02 12:58:21.998750145 -0400
+++ chromium-91.0.4472.77/build/config/compiler/BUILD.gn 2021-06-02 12:59:29.762092189 -0400
@@ -1511,6 +1511,10 @@ config("default_warnings") {
cflags += [ "-Wno-psabi" ]
}
+ if (current_cpu == "arm64" && !is_clang) {
+ cflags_cc += [ "-flax-vector-conversions" ]
+ }
+
if (!is_clang) {
cflags_cc += [
# See comment for -Wno-c++11-narrowing.

@ -33,9 +33,6 @@
# This doesn't work and it doesn't even build as of Chromium 83
%global build_remoting 1
# This is finally possible with Chromium 93
%global build_with_python3 1
# set nodejs_version
%global nodejs_version v16.17.0
@ -52,15 +49,11 @@
%global toolset gcc-toolset
%endif
%if 0%{?build_with_python3}
%if 0%{?rhel} == 7
%global chromium_pybin /usr/bin/python3
%else
%global chromium_pybin %{__python3}
%endif
%else
%global chromium_pybin %{__python2}
%endif
# We'd like to always have this on...
%global use_vaapi 1
@ -246,11 +239,7 @@ Patch7: chromium-71.0.3578.98-widevine-r3.patch
Patch8: chromium-100.0.4896.60-widevine-other-locations.patch
# Tell bootstrap.py to always use the version of Python we specify
%if 0%{?build_with_python3}
Patch11: chromium-93.0.4577.63-py3-bootstrap.patch
%else
Patch11: chromium-92.0.4515.107-py2-bootstrap.patch
%endif
# Add "Fedora" to the user agent string
Patch12: chromium-101.0.4951.41-fedora-user-agent.patch
@ -589,7 +578,7 @@ BuildRequires: libxslt-devel
BuildRequires: libxshmfence-devel
# Same here, it seems.
# BuildRequires: libyuv-devel
# BuildRequires: libyuv-devel
BuildRequires: mesa-libGL-devel
%if %{bundleopus}
@ -607,15 +596,10 @@ BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gtk+-2.0)
%endif
%if %{build_with_python3}
BuildRequires: python3-devel
BuildRequires: python3-zipp
%else
BuildRequires: python2-devel
BuildRequires: python-zipp
%endif
BuildRequires: python3-simplejson
%if 0%{?build_with_python3}
%if 0%{?bundlepylibs}
# Using bundled bits, do nothing.
%else
@ -626,32 +610,10 @@ BuildRequires: python3-markupsafe
BuildRequires: python3-ply
%else
BuildRequires: python-beautifulsoup4
BuildRequires: python-BeautifulSoup
BuildRequires: python-html5lib
BuildRequires: python-markupsafe
BuildRequires: python-ply
%endif
BuildRequires: python3-simplejson
%endif
%else
%if 0%{?bundlepylibs}
# Using bundled bits, do nothing.
%else
%if 0%{?fedora}
BuildRequires: python2-beautifulsoup4
BuildRequires: python2-beautifulsoup
BuildRequires: python2-html5lib
BuildRequires: python2-markupsafe
BuildRequires: python2-ply
%else
BuildRequires: python-beautifulsoup4
BuildRequires: python-BeautifulSoup
BuildRequires: python-html5lib
BuildRequires: python-markupsafe
BuildRequires: python-ply
%endif
BuildRequires: python2-simplejson
%endif
%endif
%if 0%{?bundlere2}
@ -911,11 +873,7 @@ Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: xorg-x11-server-Xvfb
%if 0%{?build_with_python3}
Requires: python3-psutil
%else
Requires: python2-psutil
%endif
Requires: chromium-common%{_isa} = %{version}-%{release}
Summary: Remote desktop support for google-chrome & chromium
@ -955,10 +913,7 @@ udev.
%patch6 -p1 -b .nounrar
%patch7 -p1 -b .widevine-hack
%patch8 -p1 -b .widevine-other-locations
%if 0%{?build_with_python3}
%patch11 -p1 -b .py3
%endif
# Short term fixes (usually gcc and backports)
%patch51 -p1 -b .gcc-remoting-constexpr
@ -975,7 +930,6 @@ udev.
%patch61 -p1 -b .system-minizip
%endif
# %%patch62 -p1 -b .update-wayland-client-core
%patch65 -p1 -b .java-only-allowed
%patch67 -p1 -b .remoting-cstring
%patch68 -p1 -b .i686-textrels
@ -1040,11 +994,7 @@ udev.
# Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works
%if 0%{?build_with_python3}
find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} +
%else
find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
%endif
# Unpack fonts
pushd third_party/test_fonts
@ -1161,10 +1111,6 @@ sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/d
sed -i 's|-g2|-g0|g' build/config/compiler/BUILD.gn
%build
# utf8 issue on epel7
# Internal parsing error 'ascii' codec can't decode byte 0xe2 in position 474: ordinal not in range(128)
export LANG=C.UTF-8
# Turning the buildsystem up to 11.
ulimit -n 4096
@ -1189,6 +1135,8 @@ export READELF="eu-readelf"
# enable toolset on el7
%if 0%{?rhel} == 7
# utf8 issue on epel7, Internal parsing error 'ascii' codec can't decode byte 0xe2 in position 474: ordinal not in range(128)
export LANG=en_US.UTF-8
%if 0%{?clang}
. /opt/rh/llvm-toolset-%{llvm_toolset_version}/enable
%else
@ -1363,13 +1311,8 @@ build/linux/unbundle/replace_gn_files.py --system-libraries \
flac
# Check that there is no system 'google' module, shadowing bundled ones:
%if 0%{?build_with_python3}
if python3 -c 'import google ; print google.__path__' 2> /dev/null ; then \
echo "Python 3 'google' module is defined, this will shadow modules of this build"; \
%else
if python2 -c 'import google ; print google.__path__' 2> /dev/null ; then \
echo "Python 2 'google' module is defined, this will shadow modules of this build"; \
%endif
exit 1 ; \
fi

Loading…
Cancel
Save