summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/chrome-remote-desktop/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/chrome-remote-desktop/files')
-rw-r--r--net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch18
-rw-r--r--net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch20
-rw-r--r--net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d10
-rwxr-xr-xnet-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc73
4 files changed, 121 insertions, 0 deletions
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch
new file mode 100644
index 000000000000..39e9d27e9d3a
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/541708
+
+just use `sudo` for everything
+
+--- a/opt/google/chrome-remote-desktop/chrome-remote-desktop
++++ b/opt/google/chrome-remote-desktop/chrome-remote-desktop
+@@ -1092,10 +1092,7 @@
+ except KeyError:
+ logging.info("Group '%s' not found." % CHROME_REMOTING_GROUP_NAME)
+
+- if os.getenv("DISPLAY"):
+- sudo_command = "gksudo --description \"Chrome Remote Desktop\""
+- else:
+- sudo_command = "sudo"
++ sudo_command = "sudo"
+ command = ("sudo -k && exec %(sudo)s -- sh -c "
+ "\"groupadd -f %(group)s && gpasswd --add %(user)s %(group)s\"" %
+ { 'group': CHROME_REMOTING_GROUP_NAME,
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch
new file mode 100644
index 000000000000..d303e5e753f9
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/541708
+
+just use `sudo` for everything
+
+--- a/opt/google/chrome-remote-desktop/chrome-remote-desktop
++++ b/opt/google/chrome-remote-desktop/chrome-remote-desktop
+@@ -1092,12 +1092,7 @@
+ logging.info("Group '%s' not found." % CHROME_REMOTING_GROUP_NAME)
+
+ command = [SCRIPT_PATH, '--add-user-as-root', user]
+- if os.getenv("DISPLAY"):
+- # TODO(rickyz): Add a Polkit policy that includes a more friendly message
+- # about what this command does.
+- command = ["/usr/bin/pkexec"] + command
+- else:
+- command = ["/usr/bin/sudo", "-k", "--"] + command
++ command = ["/usr/bin/sudo", "-k", "--"] + command
+
+ # Run with an empty environment out of paranoia, though if an attacker
+ # controls the environment this script is run under, we're already screwed
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d
new file mode 100644
index 000000000000..9830f2cbda37
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d
@@ -0,0 +1,10 @@
+# /etc/conf.d/chrome-remote-desktop: config file for /etc/init.d/chrome-remote-desktop
+
+# List of users to start Chrome Remote Desktop for.
+CHROME_REMOTING_USERS=''
+
+# Default resolutions to make available to the session.
+#CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES='1600x1200,3840x1600'
+
+# Directory to use for storing log files.
+#CHROME_REMOTE_DESKTOP_LOG_DIR='/var/log'
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc
new file mode 100755
index 000000000000..4cd148d9506b
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc
@@ -0,0 +1,73 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="checkconfig reload"
+
+CRD=/opt/google/chrome-remote-desktop/chrome-remote-desktop
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ local ret=0
+ if [ -z "${CHROME_REMOTING_USERS}" ] ; then
+ eerror "You must set CHROME_REMOTING_USERS in /etc/conf.d/${SVCNAME} first"
+ ret=1
+ else
+ local user
+ for user in ${CHROME_REMOTING_USERS} ; do
+ if ! id "${user}" >/dev/null ; then
+ eerror "Invalid user found in CHROME_REMOTING_USERS: ${user}"
+ ret=1
+ fi
+ done
+ fi
+ return ${ret}
+}
+
+for_users() {
+ local user ret msg log
+ msg=$1; shift
+
+ set -- -- "$@"
+ [ "${CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES+set}" = "set" ] \
+ && set -- -e CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES="${CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES}" "$@"
+ : ${CHROME_REMOTE_DESKTOP_LOG_DIR:=/var/log}
+
+ for user in ${CHROME_REMOTING_USERS} ; do
+ ebegin "${msg} ${SVCNAME} for ${user}"
+
+ log="${CHROME_REMOTE_DESKTOP_LOG_DIR}/${SVCNAME}.${user}.log"
+ checkpath -f -m 0600 -o "${user}" "${log}"
+
+ # We need to background the app as it won't fork until the network
+ # (including DNS) is available.
+ start-stop-daemon \
+ -b \
+ -u "${user}" \
+ -x "${CRD}" \
+ -e "CHROME_REMOTE_DESKTOP_LOG_FILE=${log}" \
+ "$@"
+ eend $?
+ : $(( ret += $? ))
+ done
+
+ return ${ret}
+}
+
+start() {
+ checkconfig || return
+ for_users Starting --start
+}
+
+stop() {
+ for_users Stopping --stop
+}
+
+reload() {
+ for_users Reloading --reload
+}