commit:     ebeb57ae19319675794d976c9935b9989b248442
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  8 08:58:25 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Sep  8 08:59:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebeb57ae

sys-apps/tuned: remove 'sysctl' hardcoded path

Gentoo-Bug: 590914

Package-Manager: portage-2.3.0

 sys-apps/tuned/files/tuned-2.7.1-sysctl.patch | 11 ++++++
 sys-apps/tuned/tuned-2.7.1-r1.ebuild          | 51 +++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

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 00000000..8e2a70f
--- /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 00000000..6a2d718
--- /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}"
+}

Reply via email to