public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-apps/radeon-profile-daemon/files/, x11-apps/radeon-profile-daemon/
@ 2019-04-20 13:08 Lars Wendler
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Wendler @ 2019-04-20 13:08 UTC (permalink / raw
  To: gentoo-commits

commit:     2889250af852e491b4718ccc552a435205ca54f5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 20 13:06:36 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Apr 20 13:08:44 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2889250a

x11-apps/radeon-profile-daemon: Initial commit

Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 x11-apps/radeon-profile-daemon/Manifest            |  1 +
 .../files/radeon-profile-daemon.initd              |  9 +++++
 x11-apps/radeon-profile-daemon/metadata.xml        | 11 ++++++
 .../radeon-profile-daemon-20190309.ebuild          | 40 ++++++++++++++++++++++
 .../radeon-profile-daemon-99999999.ebuild          | 40 ++++++++++++++++++++++
 5 files changed, 101 insertions(+)

diff --git a/x11-apps/radeon-profile-daemon/Manifest b/x11-apps/radeon-profile-daemon/Manifest
new file mode 100644
index 00000000000..636a758f2f6
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/Manifest
@@ -0,0 +1 @@
+DIST radeon-profile-daemon-20190309.tar.gz 12178 BLAKE2B 931ce4bb123456e349a68c8fe0b18150ff988a83a5e58cf451f68025240a8b4c802e03a567ef41684e91442bf21c02cc00d31ef6c82a67ca7eb7587754c6f32e SHA512 f2bb6f7dc0bf322e5c43c5ca1f99501a4fd3f4532cc9c1686b5cfbc58bdd423e81c25d3ae03fcae9dc15dc92d8ad089b2357b27b0ff399de7ac27213e00b2f37

diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd
new file mode 100644
index 00000000000..e4e7afb04c5
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd
@@ -0,0 +1,9 @@
+#!/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"

diff --git a/x11-apps/radeon-profile-daemon/metadata.xml b/x11-apps/radeon-profile-daemon/metadata.xml
new file mode 100644
index 00000000000..1b9303f07e9
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>polynomial-c@gentoo.org</email>
+    <name>Lars Wendler</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">marazmista/radeon-profile-daemon</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190309.ebuild b/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190309.ebuild
new file mode 100644
index 00000000000..052a3ef3b33
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190309.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit qmake-utils systemd
+
+DESCRIPTION="Daemon for radeon-profile GUI"
+HOMEPAGE="https://github.com/marazmista/radeon-profile-daemon"
+if [[ "${PV}" == 99999999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/marazmista/radeon-profile-daemon.git"
+else
+	SRC_URI="https://github.com/marazmista/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE=""
+
+S="${WORKDIR}/${P}/${PN}"
+
+src_prepare() {
+	default
+	sed \
+		-e '/^bin\.path/s@/bin@/sbin@' \
+		-e "/^service\.path/s@=.*\$@= $(systemd_get_systemunitdir)@" \
+		-i radeon-profile-daemon.pro || die
+}
+
+src_configure() {
+	eqmake5
+}
+
+src_install() {
+	emake INSTALL_ROOT="${D}" install
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+}

diff --git a/x11-apps/radeon-profile-daemon/radeon-profile-daemon-99999999.ebuild b/x11-apps/radeon-profile-daemon/radeon-profile-daemon-99999999.ebuild
new file mode 100644
index 00000000000..052a3ef3b33
--- /dev/null
+++ b/x11-apps/radeon-profile-daemon/radeon-profile-daemon-99999999.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit qmake-utils systemd
+
+DESCRIPTION="Daemon for radeon-profile GUI"
+HOMEPAGE="https://github.com/marazmista/radeon-profile-daemon"
+if [[ "${PV}" == 99999999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/marazmista/radeon-profile-daemon.git"
+else
+	SRC_URI="https://github.com/marazmista/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+fi
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE=""
+
+S="${WORKDIR}/${P}/${PN}"
+
+src_prepare() {
+	default
+	sed \
+		-e '/^bin\.path/s@/bin@/sbin@' \
+		-e "/^service\.path/s@=.*\$@= $(systemd_get_systemunitdir)@" \
+		-i radeon-profile-daemon.pro || die
+}
+
+src_configure() {
+	eqmake5
+}
+
+src_install() {
+	emake INSTALL_ROOT="${D}" install
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-apps/radeon-profile-daemon/files/, x11-apps/radeon-profile-daemon/
@ 2020-07-08 15:07 Lars Wendler
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Wendler @ 2020-07-08 15:07 UTC (permalink / raw
  To: gentoo-commits

commit:     f312bbbf871b5557a3bdc46f58e628ad4d8a3255
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  8 14:53:40 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jul  8 15:07:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f312bbbf

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 <AT> gentoo.org>

 ...radeon-profile-daemon-20190603-run_subdir.patch | 33 ++++++++++++++++++++++
 ...eon-profile-daemon-20190603-secure_socket.patch | 26 -----------------
 .../files/radeon-profile-daemon.initd-r1           | 19 -------------
 .../files/radeon-profile-daemon.initd-r2           | 15 ++++++++++
 ...ld => radeon-profile-daemon-20190603-r1.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 00000000000..24bc134fdf9
--- /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 951e7d12e28..00000000000
--- 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 813ab9515ae..00000000000
--- 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 00000000000..28ed19d4e84
--- /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
similarity index 86%
rename from x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603.ebuild
rename to x11-apps/radeon-profile-daemon/radeon-profile-daemon-20190603-r1.ebuild
index 77f7239752b..dc4d37cb3a8 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() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-08 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-20 13:08 [gentoo-commits] repo/gentoo:master commit in: x11-apps/radeon-profile-daemon/files/, x11-apps/radeon-profile-daemon/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2020-07-08 15:07 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox