summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2016-09-08 16:58:25 +0800
committerYixun Lan <dlan@gentoo.org>2016-09-08 16:59:34 +0800
commitebeb57ae19319675794d976c9935b9989b248442 (patch)
treedf2360819e2c01e242a1bb2687d67c5a840ce40d
parentdev-libs/oniguruma: EAPI 5 bump. (diff)
downloadgentoo-ebeb57ae19319675794d976c9935b9989b248442.tar.gz
gentoo-ebeb57ae19319675794d976c9935b9989b248442.tar.bz2
gentoo-ebeb57ae19319675794d976c9935b9989b248442.zip
sys-apps/tuned: remove 'sysctl' hardcoded path
Gentoo-Bug: 590914 Package-Manager: portage-2.3.0
-rw-r--r--sys-apps/tuned/files/tuned-2.7.1-sysctl.patch11
-rw-r--r--sys-apps/tuned/tuned-2.7.1-r1.ebuild51
2 files changed, 62 insertions, 0 deletions
diff --git a/sys-apps/tuned/files/tuned-2.7.1-sysctl.patch b/sys-apps/tuned/files/tuned-2.7.1-sysctl.patch
new file mode 100644
index 000000000000..8e2a70fc377d
--- /dev/null
+++ b/sys-apps/tuned/files/tuned-2.7.1-sysctl.patch
@@ -0,0 +1,11 @@
+--- a/tuned/plugins/plugin_sysctl.py
++++ b/tuned/plugins/plugin_sysctl.py
+@@ -67,7 +67,7 @@
+ self._write_sysctl(option, value)
+
+ def _execute_sysctl(self, arguments):
+- execute = ["/sbin/sysctl"] + arguments
++ execute = ["sysctl"] + arguments
+ log.debug("executing %s" % execute)
+ return self._cmd.execute(execute)
+
diff --git a/sys-apps/tuned/tuned-2.7.1-r1.ebuild b/sys-apps/tuned/tuned-2.7.1-r1.ebuild
new file mode 100644
index 000000000000..6a2d71851dee
--- /dev/null
+++ b/sys-apps/tuned/tuned-2.7.1-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 systemd
+
+DESCRIPTION="Daemon for monitoring and adaptive tuning of system devices"
+HOMEPAGE="https://fedorahosted.org/tuned/"
+SRC_URI="https://fedorahosted.org/releases/t/u/tuned/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-python/configobj[${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pyudev[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/dbus
+ sys-apps/ethtool
+ sys-power/powertop
+ sys-process/procps
+ dev-util/systemtap
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sysctl.patch
+
+ sed -i \
+ -e "/\$(DESTDIR)\/run\/tuned/d" \
+ Makefile ||die
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/tuned.initd tuned
+
+ python_fix_shebang "${ED}"
+}