diff options
author | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-04-13 02:00:32 +0200 |
---|---|---|
committer | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-04-13 02:00:32 +0200 |
commit | 8666fc400fcc02f79c9913020cafdba5cd7e352d (patch) | |
tree | 30f72ec4a7b86841a8dde1b196d1d433d41125dc /sys-apps | |
parent | sys-cluster/shuffile: new version (diff) | |
download | guru-8666fc400fcc02f79c9913020cafdba5cd7e352d.tar.gz guru-8666fc400fcc02f79c9913020cafdba5cd7e352d.tar.bz2 guru-8666fc400fcc02f79c9913020cafdba5cd7e352d.zip |
sys-apps/ryzen-stabilizator: new package
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/ryzen-stabilizator/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/ryzen-stabilizator/files/ryzen-stabilizator | 21 | ||||
-rw-r--r-- | sys-apps/ryzen-stabilizator/metadata.xml | 9 | ||||
-rw-r--r-- | sys-apps/ryzen-stabilizator/ryzen-stabilizator-0_pre20180309.ebuild | 46 |
4 files changed, 79 insertions, 0 deletions
diff --git a/sys-apps/ryzen-stabilizator/Manifest b/sys-apps/ryzen-stabilizator/Manifest new file mode 100644 index 000000000..9f2c1a3b5 --- /dev/null +++ b/sys-apps/ryzen-stabilizator/Manifest @@ -0,0 +1,3 @@ +DIST github.com-BurntSushi-toml-3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005.tar.gz 42084 BLAKE2B 09e4447d28ddb0824547d9aaa84c3c16acdc309faaf44434119e1851c40b3d3f67d0cb745691bf47a560084c93a9ce492c715833405061e5fc6114cd674b37a5 SHA512 bd14b162d4d33f62dac4abfe3bec908ea45dce88b9a0e5dd173e9f0576e29344c5136bc48e5c6602add41ddb71523e831c53107b47c4b36832c97e7b0a3d18f9 +DIST github.com-klauspost-cpuid-5a626f7029c910cc8329dae5405ee4f65034bce5.tar.gz 279424 BLAKE2B 8d9024fb05c5b8b4b4830d830a00a0121ca2688c21aa4d1895134f3be2c06ed87206c1873bcdc6eab47a72a4aff0fade3d3c8bd5e5f3bb96c42c14f7db7b7fc5 SHA512 af623c8356915b53e7d8221aa30dc634adfd72ce4ffdc6e86cf44e475163900404081e59a362aee16b00f5906121cb09f3ea745af9900bf1be78ef5c8087058b +DIST ryzen-stabilizator-0_pre20180309.tar.gz 9650 BLAKE2B 4de781750b449839546e5306c10c9c9078dcb6fb8c5497108bf78e67c6654f7e83b60cf6b9a5ab259c1bf33499d61a9011333fdb533bb74347c8711b0901f737 SHA512 f5690d24f52b309c2ba3b70aedde5db51705051d780014ec5db81ebbad0473f102321378d9d26c5c7f73e90c3fa6fb814dc3e19dbf3656ad93d29671bb81a046 diff --git a/sys-apps/ryzen-stabilizator/files/ryzen-stabilizator b/sys-apps/ryzen-stabilizator/files/ryzen-stabilizator new file mode 100644 index 000000000..389dc7b7d --- /dev/null +++ b/sys-apps/ryzen-stabilizator/files/ryzen-stabilizator @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/ryzen-stabilizator" + +depend() { + need localmount + after modules-load +} + +start() { + ebegin "Initializing ryzen" + ${command} --config=/etc/ryzen-stabilizator/settings.toml >/dev/null 2>&1 + eend $? +} + +stop() { + # Nothing to stop + return 0; +} diff --git a/sys-apps/ryzen-stabilizator/metadata.xml b/sys-apps/ryzen-stabilizator/metadata.xml new file mode 100644 index 000000000..f75b79e7a --- /dev/null +++ b/sys-apps/ryzen-stabilizator/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <longdescription lang="en">Simple Go program to enable/disable C6 C-state, processor boosting, address space layout randomization (ASLR) and the Power Supply Idle Control workaround on an AMD Ryzen processor, in order to help with the infamous "MCE-random-reboots-while-idle" issue.</longdescription> + <upstream> + <bugs-to>https://github.com/qrwteyrutiyoup/ryzen-stabilizator/issues</bugs-to> + <remote-id type="github">qrwteyrutiyoup/ryzen-stabilizator</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-apps/ryzen-stabilizator/ryzen-stabilizator-0_pre20180309.ebuild b/sys-apps/ryzen-stabilizator/ryzen-stabilizator-0_pre20180309.ebuild new file mode 100644 index 000000000..6641a9830 --- /dev/null +++ b/sys-apps/ryzen-stabilizator/ryzen-stabilizator-0_pre20180309.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGO_PN="github.com/qrwteyrutiyoup/ryzen-stabilizator" +EGIT_COMMIT="90a2f7adc94baa484cbf2590455fb1f4a25126d8" +EGO_VENDOR=( + "github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005" + "github.com/klauspost/cpuid 5a626f7029c910cc8329dae5405ee4f65034bce5" +) + +inherit golang-vcs-snapshot systemd + +DESCRIPTION="Small utility to control a few parameters on Ryzen" +HOMEPAGE="https://github.com/qrwteyrutiyoup/ryzen-stabilizator" + +LICENSE="Apache-2.0 MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +SRC_URI=" + https://github.com/qrwteyrutiyoup/ryzen-stabilizator/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI} +" + +src_compile() { + GOPATH="${S}" go build -v -o bin/ryzen-stabilizator "src/${EGO_PN}/main.go" || die +} + +src_install() { + mkdir -p etc/modules-load.d || die + echo msr > etc/modules-load.d/ryzen-stabilizator.conf + insinto /etc/modules-load.d + doins etc/modules-load.d/ryzen-stabilizator.conf + + insinto /etc/ryzen-stabilizator + doins "${S}/src/${EGO_PN}/contrib/settings.toml.sample" + + systemd_dounit "${S}/src/${EGO_PN}/contrib/systemd/"{ryzen-stabilizator@boot.service,ryzen-stabilizator@resume.service,ryzen-stabilizator.service,ryzen-stabilizator.target} + + doinitd "${FILESDIR}/ryzen-stabilizator" + + dodoc "${S}/src/${EGO_PN}/README.md" + dobin "${S}/bin/ryzen-stabilizator" +} |