Github messages for voidlinux
 help / color / mirror / Atom feed
From: dawidpotocki <dawidpotocki@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: throttled-0.7
Date: Mon, 11 May 2020 12:44:00 +0200	[thread overview]
Message-ID: <20200511104400.F-msiT6U9AR1yo-F8fd0G1gS8aS-d6FRur2riEeKqSE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21833@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

There is an updated pull request by dawidpotocki against master on the void-packages repository

https://github.com/dawidpotocki/void-packages throttled
https://github.com/void-linux/void-packages/pull/21833

New package: throttled-0.7
Throttled is a program to fix throttling issues (https://old.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/) on some Intel laptops like

* Lenovo ThinkPad T480, T480s, X1C5, X1C6, T580, L480, T470, X280, Anniversary Edition 25, E590 w/ RX 550X, P43s, E480, E580
* Dell XPS 9365, 9370, Latitude 7390 2-in-1
* Microsoft Surface Book 2

A patch file from https://github.com/void-linux/void-packages/pull/21833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-throttled-21833.patch --]
[-- Type: text/x-diff, Size: 2579 bytes --]

From 1f0bc442973a0cde62dc847575a80a31e31c7976 Mon Sep 17 00:00:00 2001
From: Dawid Potocki <dawid@dawidpotocki.com>
Date: Mon, 11 May 2020 22:22:13 +1200
Subject: [PATCH] New package: throttled-0.7

---
 srcpkgs/throttled/files/lenovo_fix/run   |  2 ++
 srcpkgs/throttled/patches/setup.py.patch | 14 ++++++++++++
 srcpkgs/throttled/template               | 28 ++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100755 srcpkgs/throttled/files/lenovo_fix/run
 create mode 100644 srcpkgs/throttled/patches/setup.py.patch
 create mode 100644 srcpkgs/throttled/template

diff --git a/srcpkgs/throttled/files/lenovo_fix/run b/srcpkgs/throttled/files/lenovo_fix/run
new file mode 100755
index 00000000000..023a31de07b
--- /dev/null
+++ b/srcpkgs/throttled/files/lenovo_fix/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+PYTHONUNBUFFERED=1 exec python3 @PATH@/lenovo_fix/lenovo_fix.py
diff --git a/srcpkgs/throttled/patches/setup.py.patch b/srcpkgs/throttled/patches/setup.py.patch
new file mode 100644
index 00000000000..a98a5db78d1
--- /dev/null
+++ b/srcpkgs/throttled/patches/setup.py.patch
@@ -0,0 +1,14 @@
+--- /dev/null
++++ setup.py
+@@ -0,0 +1,11 @@
++from setuptools import setup
++
++setup(
++    name='lenovo_fix',
++    version='@VERSION@',
++    description='Workaround for Intel throttling issues in Linux',
++    author='Francesco Palmarini',
++    author_email='palmarini@unive.it',
++    url='https://github.com/erpalma/throttled',
++    license='MIT',
++)
diff --git a/srcpkgs/throttled/template b/srcpkgs/throttled/template
new file mode 100644
index 00000000000..4e8587b2a6a
--- /dev/null
+++ b/srcpkgs/throttled/template
@@ -0,0 +1,28 @@
+# Template file for 'throttled'
+pkgname=throttled
+version=0.7
+revision=1
+wrksrc=throttled-${version}
+build_style=python3-module
+conf_files="/etc/lenovo_fix.conf"
+makedepends="python3-setuptools"
+depends="python3-dbus python3-gobject"
+short_desc="Workaround for Intel throttling issues in Linux"
+maintainer="Dawid Potocki <dawid@dawidpotocki.com>"
+license="MIT"
+homepage="https://github.com/erpalma/throttled"
+distfiles="https://github.com/erpalma/throttled/archive/v${version}.tar.gz"
+checksum=64f139b3fd6f13381105f30ed4598faa69e59bfd613d26dfde29f46578b0b2a1
+
+pre_build() {
+	sed -i "s/@VERSION@/${version}/" setup.py
+}
+
+post_install() {
+	vinstall mmio.py 644 ${py3_sitelib}/lenovo_fix mmio.py
+	vinstall lenovo_fix.py 644 ${py3_sitelib}/lenovo_fix lenovo_fix.py
+	vconf etc/lenovo_fix.conf
+	vsv lenovo_fix
+	sed -i "s|@PATH@|${py3_sitelib}|" ${DESTDIR}/etc/sv/lenovo_fix/run
+	vlicense LICENSE
+}

  parent reply	other threads:[~2020-05-11 10:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 10:33 [PR PATCH] " dawidpotocki
2020-05-11 10:39 ` [PR PATCH] [Updated] " dawidpotocki
2020-05-11 10:44 ` dawidpotocki [this message]
2020-05-11 10:58 ` dawidpotocki
2020-08-05 14:03 ` dawidpotocki
2021-07-20 19:48 ` [PR REVIEW] " ericonr
2021-07-20 19:48 ` ericonr
2021-07-20 19:48 ` ericonr
2021-07-20 19:48 ` ericonr
2021-07-21 10:59 ` [PR PATCH] [Closed]: " dawidpotocki
2021-07-21 10:59 ` dawidpotocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200511104400.F-msiT6U9AR1yo-F8fd0G1gS8aS-d6FRur2riEeKqSE@z \
    --to=dawidpotocki@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).