commit 7048e95ab61cd1430de6842df0f967fa38f3bd35
Author: Tom Callaway <spot(a)fedoraproject.org>
Date: Tue Jul 24 17:01:35 2018 -0400
setuid user-session, more python2 hacks
chromium-67.0.3396.99-py2-bootstrap.patch | 21 +++++++++++++++++++++
chromium.spec | 9 ++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/chromium-67.0.3396.99-py2-bootstrap.patch
b/chromium-67.0.3396.99-py2-bootstrap.patch
new file mode 100644
index 0000000..a6c2435
--- /dev/null
+++ b/chromium-67.0.3396.99-py2-bootstrap.patch
@@ -0,0 +1,21 @@
+diff -up chromium-67.0.3396.99/tools/gn/bootstrap/bootstrap.py.py2
chromium-67.0.3396.99/tools/gn/bootstrap/bootstrap.py
+--- chromium-67.0.3396.99/tools/gn/bootstrap/bootstrap.py.py2 2018-07-24
16:58:53.372022183 -0400
++++ chromium-67.0.3396.99/tools/gn/bootstrap/bootstrap.py 2018-07-24 17:00:03.200279816
-0400
+@@ -983,7 +983,7 @@ def build_gn_with_gn(temp_gn, build_dir,
+ gn_gen_args = options.gn_gen_args or ''
+ if not options.debug:
+ gn_gen_args += ' is_debug=false'
+- cmd = [temp_gn, 'gen', build_dir, '--args=%s' % gn_gen_args,
++ cmd = [temp_gn, 'gen', '--script-executable=/usr/bin/python2',
build_dir, '--args=%s' % gn_gen_args,
+ "--root="+SRC_ROOT
+ ]
+ check_call(cmd)
+@@ -997,7 +997,7 @@ def build_gn_with_gn(temp_gn, build_dir,
+ # build.ninja currently refers back to gn from the temporary directory.
+ # Regenerate the build files using the gn we just built so that the reference
+ # gets updated to "./gn".
+- cmd = [os.path.join(build_dir, 'gn'), 'gen', build_dir,
++ cmd = [os.path.join(build_dir, 'gn'), 'gen',
'--script-executable=/usr/bin/python2', build_dir,
+ '--args=%s' % gn_gen_args]
+ check_call(cmd)
+
diff --git a/chromium.spec b/chromium.spec
index 5142e88..80bbe66 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -261,6 +261,7 @@
Patch100: chromium-67.0.3396.62-epel7-use-old-python-exec-syntax.patch
Patch101: chromium-67.0.3396.87-fedora-user-agent.patch
# Try to fix version.py for Rawhide
Patch102: chromium-67.0.3396.99-py3fix.patch
+Patch103: chromium-67.0.3396.99-py2-bootstrap.patch
# Use chromium-latest.py to generate clean tarball from released build tarballs, found
here:
@@ -677,11 +678,7 @@ Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: xorg-x11-server-Xvfb
-%if 0%{?rhel} == 7
-Requires: python-psutil
-%else
Requires: python2-psutil
-%endif
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{version}-%{release}
%endif
@@ -782,6 +779,7 @@ udev.
%endif
%patch101 -p1 -b .fedora-user-agent
%patch102 -p1 -b .py3fix
+%patch103 -p1 -b .py2
# Change shebang in all relevant files in this directory and all subdirectories
@@ -1249,7 +1247,7 @@ if python2 -c 'import google ; print google.__path__' 2>
/dev/null ; then \
fi
tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "$CHROMIUM_CORE_GN_DEFINES
$CHROMIUM_BROWSER_GN_DEFINES"
-%{target}/gn gen --args="$CHROMIUM_CORE_GN_DEFINES
$CHROMIUM_BROWSER_GN_DEFINES" %{target}
+%{target}/gn --script-executable=/usr/bin/python2 gen
--args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{target}
%if %{freeworld}
# do not need to do headless gen
@@ -1395,6 +1393,7 @@ cp -a remoting_locales %{buildroot}%{crd_path}/
cp -a remoting_me2me_host %{buildroot}%{crd_path}/chrome-remote-desktop-host
cp -a remoting_start_host %{buildroot}%{crd_path}/start-host
cp -a remoting_user_session %{buildroot}%{crd_path}/user-session
+chmod +s %{buildroot}%{crd_path}/user-session
# chromium
mkdir -p %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts