summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-07-08 16:53:40 +0200
committerLars Wendler <polynomial-c@gentoo.org>2020-07-08 17:07:50 +0200
commitf312bbbf871b5557a3bdc46f58e628ad4d8a3255 (patch)
treeb4c5580a7f0dde15be589427f1d8f4e58012af05 /x11-apps/radeon-profile-daemon
parentnet-libs/xrootd-ceph: bump to 5.0.0 (diff)
downloadgentoo-f312bbbf871b5557a3bdc46f58e628ad4d8a3255.tar.gz
gentoo-f312bbbf871b5557a3bdc46f58e628ad4d8a3255.tar.bz2
gentoo-f312bbbf871b5557a3bdc46f58e628ad4d8a3255.zip
x11-apps/radeon-profile-daemon: Revbump to improve socket permissions
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'x11-apps/radeon-profile-daemon')
-rw-r--r--x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-run_subdir.patch33
-rw-r--r--x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch26
-rw-r--r--x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r119
-rw-r--r--x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r215
-rw-r--r--x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603-r1.ebuild (renamed from x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603.ebuild)7
5 files changed, 52 insertions, 48 deletions
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-run_subdir.patch b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-run_subdir.patch
new file mode 100644
index 000000000000..24bc134fdf92
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-run_subdir.patch
@@ -0,0 +1,33 @@
+From 8aad288652cb7dc9c60eadd85d945ac43a712663 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 8 Jul 2020 16:08:24 +0200
+Subject: [PATCH] Move radeon-profile-daemon-server socket file into its own
+ subdir under /run
+
+The rationale here is that QT has no methods to run chown on some
+files but we do not want the socket being world readable. So instead of
+writing lenghty C++-code using chown, we simply move the socket file into a
+subdir which we can put our preferred permissions on during startup of the
+daemon.
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ radeon-profile-daemon/rpdthread.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/radeon-profile-daemon/rpdthread.h b/radeon-profile-daemon/rpdthread.h
+index 280fada..f05d031 100644
+--- a/radeon-profile-daemon/rpdthread.h
++++ b/radeon-profile-daemon/rpdthread.h
+@@ -31,7 +31,7 @@
+ #define SIGNAL_ALIVE '7'
+
+ const QString appVersion = "20190603";
+-const QString serverSocketPath = "/run/radeon-profile-daemon-server";
++const QString serverSocketPath = "/run/radeon-profile-daemon/radeon-profile-daemon-server";
+
+ class rpdThread : public QThread
+ {
+--
+2.27.0
+
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch
deleted file mode 100644
index 951e7d12e28f..000000000000
--- a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon-20190603-secure_socket.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 47ddfbb7b85c3e99eb0d132078c989c0dfa2ea9b Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Thu, 13 Jun 2019 15:58:44 +0200
-Subject: [PATCH] Don't make the socket world writable
-
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- radeon-profile-daemon/rpdthread.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/radeon-profile-daemon/rpdthread.cpp b/radeon-profile-daemon/rpdthread.cpp
-index 8785efa..94a0d6f 100644
---- a/radeon-profile-daemon/rpdthread.cpp
-+++ b/radeon-profile-daemon/rpdthread.cpp
-@@ -47,7 +47,7 @@ void rpdThread::createServer()
-
- QLocalServer::removeServer(serverSocketPath);
- daemonServer.listen(serverSocketPath);
-- QFile::setPermissions(serverSocketPath, QFile(serverSocketPath).permissions() | QFile::WriteOther | QFile::ReadOther);
-+ QFile::setPermissions(serverSocketPath, QFile(serverSocketPath).permissions() | QFile::WriteGroup | QFile::ReadGroup);
- }
-
- void rpdThread::closeConnection()
---
-2.22.0
-
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r1 b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r1
deleted file mode 100644
index 813ab9515aeb..000000000000
--- a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r1
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-description="Daemon for radeon-profile GUI"
-
-command="/usr/sbin/radeon-profile-daemon"
-command_background="true"
-pidfile="/run/${SVCNAME}.pid"
-
-radeon_socket="/run/radeon-profile-daemon-server"
-
-start_post() {
- if ewaitfile 10 ${radeon_socket} ; then
- chgrp video ${radeon_socket}
- else
- eerror "Failed to find socket file ${radeon_socket}"
- fi
-}
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r2 b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r2
new file mode 100644
index 000000000000..28ed19d4e846
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd-r2
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Daemon for radeon-profile GUI"
+
+command="/usr/sbin/radeon-profile-daemon"
+command_background="true"
+pidfile="/run/${SVCNAME}/${SVCNAME}.pid"
+
+radeon_socket="/run/${SVCNAME}/${SVCNAME}-server"
+
+start_pre() {
+ checkpath -q -d -o root:video -m 0750 /run/${SVCNAME}
+}
diff --git a/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603.ebuild b/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603-r1.ebuild
index 77f7239752b9..dc4d37cb3a89 100644
--- a/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603.ebuild
+++ b/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -20,6 +20,7 @@ SLOT="0"
IUSE=""
RDEPEND="
+ !<x11-apps/radeon-profile-20200504-r1
dev-qt/qtcore:5
dev-qt/qtnetwork:5
"
@@ -28,7 +29,7 @@ DEPEND="${RDEPEND}"
S="${WORKDIR}/${P}/${PN}"
PATCHES=(
- "${FILESDIR}/${PN}-20190603-secure_socket.patch"
+ "${FILESDIR}/${PN}-20190603-run_subdir.patch"
)
src_prepare() {
@@ -51,7 +52,7 @@ src_configure() {
src_install() {
emake INSTALL_ROOT="${D}" install
- newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN}
}
pkg_postinst() {