mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
committed by
Yixun Lan
parent
8dc620d689
commit
85ef6cd085
1
sys-power/throttled/Manifest
Normal file
1
sys-power/throttled/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST throttled-0.10.0.gh.tar.gz 22191 BLAKE2B c301ee070ff462acd613c90525209eb5237c57e7171bf25133535f9c9a50d226b919065d8f6999f95b45f7f0d4c30e63abb5e04ec768d76b3c82dd19f092a693 SHA512 b89c467295bfc592d7b3ce0c4a41fedf436acf8067f8ef63d8596b92343ed8e04d371d065a9e35fdddba40772f12255c30960c2c46f0cbd5093bfc5e72fb4e18
|
||||
5
sys-power/throttled/files/throttled.initd
Normal file
5
sys-power/throttled/files/throttled.initd
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/sbin/openrc-run
|
||||
command="/usr/bin/throttled"
|
||||
pidfile="/run/throttled.pid"
|
||||
description="Stop Intel throttling"
|
||||
command_background="yes"
|
||||
11
sys-power/throttled/files/throttled.service
Normal file
11
sys-power/throttled/files/throttled.service
Normal file
@@ -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
|
||||
19
sys-power/throttled/metadata.xml
Normal file
19
sys-power/throttled/metadata.xml
Normal file
@@ -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>
|
||||
43
sys-power/throttled/throttled-0.10.0.ebuild
Normal file
43
sys-power/throttled/throttled-0.10.0.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user