Gentoo Archives: gentoo-commits

From: gerion <gerion.entrup@×××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/gerislay:master commit in: sys-power/lenovo-throttling-fix/, sys-power/lenovo-throttling-fix/files/
Date: Mon, 15 Oct 2018 12:08:49
Message-Id: 1539605285.407f9a1036054c174827db8121e5ed0451706683.gerion@gentoo
1 commit: 407f9a1036054c174827db8121e5ed0451706683
2 Author: Gerion Entrup <gerion.entrup <AT> flump <DOT> de>
3 AuthorDate: Mon Oct 15 12:08:05 2018 +0000
4 Commit: gerion <gerion.entrup <AT> flump <DOT> de>
5 CommitDate: Mon Oct 15 12:08:05 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/user/gerislay.git/commit/?id=407f9a10
7
8 add sys-power/lenovo-throttling-fix
9
10 Should work for openrc and systemd. Systemd is untested.
11
12 sys-power/lenovo-throttling-fix/Manifest | 3 ++
13 .../lenovo-throttling-fix/files/fix-systemd.patch | 13 ++++++
14 .../files/lenovo-throttling-fix | 9 +++++
15 .../lenovo-throttling-fix-9999.ebuild | 46 ++++++++++++++++++++++
16 4 files changed, 71 insertions(+)
17
18 diff --git a/sys-power/lenovo-throttling-fix/Manifest b/sys-power/lenovo-throttling-fix/Manifest
19 new file mode 100644
20 index 0000000..5f988bc
21 --- /dev/null
22 +++ b/sys-power/lenovo-throttling-fix/Manifest
23 @@ -0,0 +1,3 @@
24 +AUX fix-systemd.patch 403 BLAKE2B e1d0e1a36a4f7f1027cdfdf0a1d68a442380a6ed9b509f5bd0199caea6faafde0ca83f67228c7191742a39f88ecb4433097eb57468aaff011914703938374398 SHA512 19952d6db350da0bcdca3c832a61f64217dfdaec4192644fa27384ac5e0ec89ef7b9611ca2312e5e1cd889b8be812aa885603ae6ecabe6e86973d29df86799f4
25 +AUX lenovo-throttling-fix 321 BLAKE2B 3c84c817b6ec15f3b55a9f6e80ba5f4d64bbd5ce4a377d79d7df76da867d94a0fa608fabd929901525cfa49d3d4cb7431e695041ea7549e0c77839079aaee87c SHA512 16a88c7acda83151212fa15c37ea26ef68b084cca6cc4cb734de145e155f69581738716a19eb43dd5ce50e94b92e1bfee0eac743774714825d2dd86fe88af723
26 +EBUILD lenovo-throttling-fix-9999.ebuild 857 BLAKE2B 852eeda08fbdb58e1d7ea2ae75fea1c46902f72943a49d51c0f1d24c6f2f665e284d7234f1fed537d6a1aaa3d32efdac5f871b6c22cd852fb820462b91df9026 SHA512 6d73b4c78ae768b27498e7c5d59eb07de950ef1ab8375c188a228f60066d9c449e2dc82bf50fba60a2ee86c420c3456d7e3823e4924a38c609faf8a79b098e47
27
28 diff --git a/sys-power/lenovo-throttling-fix/files/fix-systemd.patch b/sys-power/lenovo-throttling-fix/files/fix-systemd.patch
29 new file mode 100644
30 index 0000000..40e162c
31 --- /dev/null
32 +++ b/sys-power/lenovo-throttling-fix/files/fix-systemd.patch
33 @@ -0,0 +1,13 @@
34 +diff --git a/systemd/lenovo_fix.service b/systemd/lenovo_fix.service
35 +index d88205c..34bd01a 100644
36 +--- a/systemd/lenovo_fix.service
37 ++++ b/systemd/lenovo_fix.service
38 +@@ -3,7 +3,7 @@ Description=Stop Intel throttling
39 +
40 + [Service]
41 + Type=simple
42 +-ExecStart=/opt/lenovo_fix/venv/bin/python3 /opt/lenovo_fix/lenovo_fix.py
43 ++ExecStart=/opt/lenovo_fix/lenovo_fix.py
44 + StandardOutput=syslog
45 + StandardError=syslog
46 +
47
48 diff --git a/sys-power/lenovo-throttling-fix/files/lenovo-throttling-fix b/sys-power/lenovo-throttling-fix/files/lenovo-throttling-fix
49 new file mode 100755
50 index 0000000..4ca0247
51 --- /dev/null
52 +++ b/sys-power/lenovo-throttling-fix/files/lenovo-throttling-fix
53 @@ -0,0 +1,9 @@
54 +#!/sbin/openrc-run
55 +# Copyright 1999-2018 Gentoo Foundation
56 +# Distributed under the terms of the GNU General Public License v2
57 +
58 +name="lenovo-throttling-fix daemon"
59 +description="Workaround for Intel throttling issues in Linux."
60 +pidfile="/run/${RC_SVCNAME}.pid"
61 +command=/opt/lenovo_fix/lenovo_fix.py
62 +command_background=true
63
64 diff --git a/sys-power/lenovo-throttling-fix/lenovo-throttling-fix-9999.ebuild b/sys-power/lenovo-throttling-fix/lenovo-throttling-fix-9999.ebuild
65 new file mode 100644
66 index 0000000..01d24ca
67 --- /dev/null
68 +++ b/sys-power/lenovo-throttling-fix/lenovo-throttling-fix-9999.ebuild
69 @@ -0,0 +1,46 @@
70 +# Copyright 1999-2018 Gentoo Foundation
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +PYTHON_COMPAT=( python3_{4,5,6,7} )
75 +
76 +inherit git-r3 distutils-r1 systemd
77 +
78 +DESCRIPTION="Workaround for Intel throttling issues in Linux."
79 +HOMEPAGE="https://github.com/erpalma/lenovo-throttling-fix.git"
80 +EGIT_REPO_URI="https://github.com/erpalma/lenovo-throttling-fix.git"
81 +
82 +LICENSE="MIT"
83 +SLOT="0"
84 +KEYWORDS=""
85 +IUSE=""
86 +
87 +DEPEND=">=dev-python/dbus-python-1.2.8
88 + dev-python/pygobject:3"
89 +RDEPEND="${DEPEND}"
90 +BDEPEND=""
91 +
92 +PATCHES="${FILESDIR}/fix-systemd.patch"
93 +
94 +src_configure() {
95 + return
96 +}
97 +
98 +src_compile() {
99 + return
100 +}
101 +
102 +src_install()
103 +{
104 + doinitd ${FILESDIR}/lenovo-throttling-fix
105 + systemd_dounit systemd/lenovo_fix.service
106 +
107 + exeinto /opt/lenovo_fix
108 + doexe lenovo_fix.py
109 +
110 + insinto /opt/lenovo_fix
111 + doins mmio.py
112 +
113 + insinto /etc
114 + doins etc/lenovo_fix.conf
115 +}