commit d844f5b54bb270b0f7edc5d49c2078db142489d8
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Mon Aug 20 00:02:53 2018 +0100
setuid user-session, more python2 hacks
chromium-67.0.3396.99-py2-bootstrap.patch | 21 +++++++++++++++++++++
chromium-freeworld.spec | 5 ++++-
2 files changed, 25 insertions(+), 1 deletion(-)
---
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-freeworld.spec b/chromium-freeworld.spec
index b0a1c8d..9fe0c6d 100644
--- a/chromium-freeworld.spec
+++ b/chromium-freeworld.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:
@@ -782,6 +783,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 +1251,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 +1397,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