diff options
author | 2015-03-03 05:34:08 +0000 | |
---|---|---|
committer | 2015-03-03 05:34:08 +0000 | |
commit | feb02e8ca85ca22be02b42d74473c568b7c6841d (patch) | |
tree | b5e1373bf3694053871ac22b88b613396e543a6c /net-misc | |
parent | add arm64 support, tested on A53 board (diff) | |
download | gentoo-2-feb02e8ca85ca22be02b42d74473c568b7c6841d.tar.gz gentoo-2-feb02e8ca85ca22be02b42d74473c568b7c6841d.tar.bz2 gentoo-2-feb02e8ca85ca22be02b42d74473c568b7c6841d.zip |
Avoid using gksu and always use sudo #541708 by Kelly Price.
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'net-misc')
3 files changed, 132 insertions, 1 deletions
diff --git a/net-misc/chrome-remote-desktop/ChangeLog b/net-misc/chrome-remote-desktop/ChangeLog index 07dde69d247d..3f0f70c39024 100644 --- a/net-misc/chrome-remote-desktop/ChangeLog +++ b/net-misc/chrome-remote-desktop/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/chrome-remote-desktop # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/chrome-remote-desktop/ChangeLog,v 1.2 2015/02/27 08:05:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrome-remote-desktop/ChangeLog,v 1.3 2015/03/03 05:34:08 vapier Exp $ + +*chrome-remote-desktop-41.0.2272.41-r1 (03 Mar 2015) + + 03 Mar 2015; Mike Frysinger <vapier@gentoo.org> + +chrome-remote-desktop-41.0.2272.41-r1.ebuild, + +files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch: + Avoid using gksu and always use sudo #541708 by Kelly Price. *chrome-remote-desktop-41.0.2272.41 (27 Feb 2015) diff --git a/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild b/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild new file mode 100644 index 000000000000..039dd6ef16e9 --- /dev/null +++ b/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild,v 1.1 2015/03/03 05:34:08 vapier Exp $ + +# Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/ +# Fetch the Release file: +# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release +# Which gives you the Packages file: +# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages +# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages +# And finally gives you the file name: +# pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb +# +# Use curl to find the answer: +# curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages | grep ^Filename + +EAPI="4" + +inherit unpacker + +DESCRIPTION="access remote computers via Chrome!" +PLUGIN_URL="https://chrome.google.com/remotedesktop" +HOMEPAGE="https://support.google.com/chrome/answer/1649523 ${PLUGIN_URL}" +BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}" +SRC_URI="amd64? ( ${BASE_URI}_amd64.deb ) + x86? ( ${BASE_URI}_i386.deb )" + +LICENSE="google-chrome" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="" + +# All the libs this package links against. +RDEPEND="app-admin/sudo + dev-lang/python + >=dev-libs/expat-2 + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + dev-python/psutil + gnome-base/gconf:2 + media-libs/fontconfig + media-libs/freetype:2 + sys-devel/gcc + sys-libs/glibc + sys-libs/pam + x11-libs/cairo + x11-libs/gtk+:2 + x11-libs/libX11 + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXrandr + x11-libs/libXtst + x11-libs/pango" +# Settings we just need at runtime. +RDEPEND+=" + x11-base/xorg-server[xvfb]" +DEPEND="" + +S=${WORKDIR} + +QA_PREBUILT="/opt/google/chrome-remote-desktop/*" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-41.0.2272.41-always-sudo.patch #541708 +} + +src_install() { + insinto /etc + doins -r etc/opt + + insinto /opt + doins -r opt/google + chmod a+rx "${ED}"/opt/google/${PN}/* || die + + dodir /etc/pam.d + dosym system-remote-login /etc/pam.d/${PN} + + dodoc usr/share/doc/${PN}/changelog* + + newinitd "${FILESDIR}"/${PN}.rc ${PN} + newconfd "${FILESDIR}"/${PN}.conf.d ${PN} +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "Two ways to launch the server:" + elog "(1) access an existing desktop" + elog " (a) install the Chrome plugin on the server & client:" + elog " ${PLUGIN_URL}" + elog " (b) on the server, run the Chrome plugin & enable remote access" + elog " (c) on the client, connect to the server" + elog "(2) headless system" + elog " (a) install the Chrome plugin on the client:" + elog " ${PLUGIN_URL}" + elog " (b) visit https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/chromoting+https://www.googleapis.com/auth/googletalk+https://www.googleapis.com/auth/userinfo.email&access_type=offline&redirect_uri=https://chromoting-auth.googleplex.com/auth&approval_prompt=force&client_id=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.apps.googleusercontent.com&hl=en&from_login=1&as=-760f476eeaec11b8&pli=1&authuser=0" + elog " (c) run the command mentioned on the server" + elog " (d) on the client, connect to the server" + elog + elog "Configuration settings you might want to be aware of:" + elog " ~/.${PN}-session - shell script to start your session" + elog " /etc/init.d/${PN} - script to auto-restart server" + fi +} 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, |