diff options
author | Violet Purcell <vimproved@inventati.org> | 2023-10-08 14:23:08 -0400 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2023-10-09 06:22:41 +0000 |
commit | 85ef6cd085ca1f1fe78ae73cdebae3640ca78f53 (patch) | |
tree | 8c06063aca768d4ce2bcee13ee9fa14725e28d30 /sys-power/throttled | |
parent | app-text/djvu: Stabilize 3.5.28-r4 ppc64, #915455 (diff) | |
download | gentoo-85ef6cd085ca1f1fe78ae73cdebae3640ca78f53.tar.gz gentoo-85ef6cd085ca1f1fe78ae73cdebae3640ca78f53.tar.bz2 gentoo-85ef6cd085ca1f1fe78ae73cdebae3640ca78f53.zip |
sys-power/throttled: new package, add 0.10.0
add kernel config check, but only make it as a warning
rename openrc script file to throttled.initd
Closes: https://github.com/gentoo/gentoo/pull/33252/
Signed-off-by: Violet Purcell <vimproved@inventati.org>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'sys-power/throttled')
-rw-r--r-- | sys-power/throttled/Manifest | 1 | ||||
-rw-r--r-- | sys-power/throttled/files/throttled.initd | 5 | ||||
-rw-r--r-- | sys-power/throttled/files/throttled.service | 11 | ||||
-rw-r--r-- | sys-power/throttled/metadata.xml | 19 | ||||
-rw-r--r-- | sys-power/throttled/throttled-0.10.0.ebuild | 43 |
5 files changed, 79 insertions, 0 deletions
diff --git a/sys-power/throttled/Manifest b/sys-power/throttled/Manifest new file mode 100644 index 000000000000..67d1fc89509a --- /dev/null +++ b/sys-power/throttled/Manifest @@ -0,0 +1 @@ +DIST throttled-0.10.0.gh.tar.gz 22191 BLAKE2B c301ee070ff462acd613c90525209eb5237c57e7171bf25133535f9c9a50d226b919065d8f6999f95b45f7f0d4c30e63abb5e04ec768d76b3c82dd19f092a693 SHA512 b89c467295bfc592d7b3ce0c4a41fedf436acf8067f8ef63d8596b92343ed8e04d371d065a9e35fdddba40772f12255c30960c2c46f0cbd5093bfc5e72fb4e18 diff --git a/sys-power/throttled/files/throttled.initd b/sys-power/throttled/files/throttled.initd new file mode 100644 index 000000000000..efe8b6a7e151 --- /dev/null +++ b/sys-power/throttled/files/throttled.initd @@ -0,0 +1,5 @@ +#!/sbin/openrc-run +command="/usr/bin/throttled" +pidfile="/run/throttled.pid" +description="Stop Intel throttling" +command_background="yes" diff --git a/sys-power/throttled/files/throttled.service b/sys-power/throttled/files/throttled.service new file mode 100644 index 000000000000..5b7decc435b0 --- /dev/null +++ b/sys-power/throttled/files/throttled.service @@ -0,0 +1,11 @@ +[Unit] +Description=Stop Intel throttling + +[Service] +Type=simple +ExecStart=/usr/bin/throttled +# Setting PYTHONUNBUFFERED is necessary to see the output of this service in the journal +Environment=PYTHONUNBUFFERED=1 + +[Install] +WantedBy=multi-user.target diff --git a/sys-power/throttled/metadata.xml b/sys-power/throttled/metadata.xml new file mode 100644 index 000000000000..b7efde349add --- /dev/null +++ b/sys-power/throttled/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>vimproved@inventati.org</email> + <name>Violet Purcell</name> + </maintainer> + <maintainer type="person" proxied="proxy"> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">erpalma/throttled</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-power/throttled/throttled-0.10.0.ebuild b/sys-power/throttled/throttled-0.10.0.ebuild new file mode 100644 index 000000000000..9b1a5e143ffa --- /dev/null +++ b/sys-power/throttled/throttled-0.10.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit linux-info python-single-r1 systemd + +DESCRIPTION="Daemon to work around throttling issues on some Intel laptops" +HOMEPAGE="https://github.com/erpalma/throttled" +SRC_URI="https://github.com/erpalma/throttled/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="test" + +CONFIG_CHECK="~X86_MSR ~DEVMEM" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/pygobject[${PYTHON_USEDEP}] + ') + sys-apps/pciutils +" + +pkg_setup() { + linux-info_pkg_setup + python-single-r1_pkg_setup +} + +src_install() { + default + python_newscript throttled.py throttled + python_domodule mmio.py + newinitd "${FILESDIR}/throttled.initd" throttled + systemd_dounit "${FILESDIR}/throttled.service" + insinto /etc + doins etc/throttled.conf +} |