added ksmtuned

master
Tamás Gérczei 3 years ago committed by layman
parent d5a2dc6221
commit 07670b7b7a
  1. 8
      sys-apps/ksmtuned/Manifest
  2. 12
      sys-apps/ksmtuned/files/001-sysconfdir.patch
  3. 1
      sys-apps/ksmtuned/files/Makefile.am
  4. 8
      sys-apps/ksmtuned/files/configure.ac
  5. 13
      sys-apps/ksmtuned/files/git-daemon
  6. 13
      sys-apps/ksmtuned/files/initd_ksm
  7. 10
      sys-apps/ksmtuned/files/initd_ksmtuned
  8. 2
      sys-apps/ksmtuned/files/src/Makefile.am
  9. 53
      sys-apps/ksmtuned/ksmtuned-9999.ebuild

@ -0,0 +1,8 @@
AUX 001-sysconfdir.patch 316 BLAKE2B f341b2fe874578c415e8984abde6e70e1a29279420a60e2177356911d07bc908ccc6197d90ad34f9dfff0158d0f61b5329f8f5db4b692ac0277c6bac792da033 SHA512 17fc57575fb28a737c180590489616626c60365336a29fe4b45e1dfba135ba202856d77b18e7723dcacd1eabbf7734a39c20418dae9dac4b5cba53a369b42647
AUX Makefile.am 14 BLAKE2B 1a2ba1d5eadcf4c4137fa9be774a2f9c225a7c908312e3c68f4072e475958d971ba7556fc633976ec739e3418d5c0c2a3884de4d54c26561eddc8d1f2bc4c096 SHA512 74b47467203f871fd1f5c6f15be1eddc5e25447bded3923999f73c21b8370f3882cb51275da93614d22f2d7a2dcba0ff6992bed42f467dc0b4af5b97c93876da
AUX configure.ac 109 BLAKE2B aee83361de54104337663ec342722c7b0b6b9f0afdc0c790858166690b9ff9120b267c26518c80dbabb3e9abf487331a9aaa0312a3df47c45263aeec468637ff SHA512 ac12abc98b5873bbb7e08292cece966bb9ee23b43c5f88041c97db90ef489dfd7257928a262c62801250959984cc19a41da5c57b171320f922e4dcb1acf34746
AUX git-daemon 366 BLAKE2B b62642c38877e51259fea640193687c72b70b60f0956e225e1ea0087f86b44ed1483b293d94e8145db8da97d63d8e82c67ed67e80bd1759928b30c6460661e5e SHA512 9fbe7ff2c3ce0d22461e9d1401759d0f0a62039006f449b8b2beece85dbf37bffc6e23025f41527ff87cebb852710f01e021b30a659c4e1d71ddcbd536873412
AUX initd_ksm 216 BLAKE2B a1534e5273939aec3c91f93e3fe85a03e41a13a22cd5122e1853c22f3bd34004d8a48e863979d5b3a6b81b8fa9bae90b1424efabf50dd5505d983b626964278b SHA512 ffbc162c3b6173fd6ff034aedfa47df1ce6231ee1ccd7e85f52dbc34ba5f671ef6bad71e25012ea635e6bf8782e21d98e7ca8f4a1e6a7aa1137542292583acaa
AUX initd_ksmtuned 212 BLAKE2B f1fe04073289266fff5586b5501b767f97cb5cec81dd35d853f71fb44144c5c4bfc3d6aafec2e4d03838252a1c7488ae6023bfaf9be484a0784ffdc9552650c6 SHA512 174957be46e316469dc3a4b1e28fd6fa1d69e5d954401831b17f4b23d6baa64b2c98c5940da9949455a3c5271296e9da2527b134701ea0a1dc98f87ea32dd3ea
AUX src/Makefile.am 48 BLAKE2B e6f4221456cc6956c294ee45d324211dc0d79113ed137dc918ab8a71a89cbd898d780aacc9ea07b8cbde3136db1d8c315c77062bed7764a446570e3364c21cac SHA512 b4248d00f97d7173250506c40fdff87acabb75d8b7be02671e0d5eb060a78db9305cb07e05cc2d502245911d40b1d6617cfebd74d552566443d0c7c60faf55fc
EBUILD ksmtuned-9999.ebuild 927 BLAKE2B a18f54d878499685cad801064d830952cc67da47e7217a140032ee123c1802fe9fd40a6ddbfa5d0446f4ceb79de39a710fc159464dffa99ce2e1e5feadce8c5b SHA512 807fe3fdad69cc2fb1c27aa795c7b4a65930b08a9c1f272386510dc530a59ece3b42bbb6f4393ce7ed4b5309fde263cde708e17af5ead0e8ea9ab3652d453299

@ -0,0 +1,12 @@
+++ src/ksmtuned.sh.in 2019-03-27 11:11:13.520784975 +0100
@@ -18,8 +18,8 @@
#
# needs testing and ironing. contact danken@redhat.com if something breaks.
-if [ -f @SYSCONFDIR@/ksmtuned.conf ]; then
- . @SYSCONFDIR@/ksmtuned.conf
+if [ -f /etc/ksmtuned.conf ]; then
+ . /etc/ksmtuned.conf
fi
debug() {

@ -0,0 +1,8 @@
AC_INIT([KSMCTL], 0.9999)
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT

@ -0,0 +1,13 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
pidfile="/var/run/git-daemon.pid"
command="/usr/bin/git"
command_args="daemon ${GITDAEMON_OPTS}"
command_user="${GIT_USER:-nobody}:${GIT_GROUP:-nobody}"
start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m"
depend() {
use logger
}

@ -0,0 +1,13 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
command="/usr/sbin/ksmctl"
start() {
${command} start
}
stop() {
${command} stop
}

@ -0,0 +1,10 @@
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
pidfile="/var/run/ksmtune.pid"
command="/usr/sbin/ksmtuned"
depend() {
need ksm
}

@ -0,0 +1,2 @@
bin_PROGRAMS = ksmctl
ksmctl_SOURCES = ksmctl.c

@ -0,0 +1,53 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit linux-info git-r3 autotools epatch
DESCRIPTION="Simple script to tune whether and with what vigor ksm searches for dup pages"
HOMEPAGE="https://github.com/ksmtuned/ksmtuned"
EGIT_REPO_URI="${HOMEPAGE}.git"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND=""
RDEPEND="${DEPEND}"
kernel_check() {
CONFIG_CHECK="KSM"
use kernel_linux && check_extra_config
}
src_prepare() {
cp ${FILESDIR}/*.{am,ac} ${S}
cp ${FILESDIR}/src/*.am ${S}/src
epatch "${FILESDIR}/001-sysconfdir.patch"
eautoreconf
}
src_configure() {
econf
}
src_compile() {
emake
}
src_install() {
dosbin src/ksmctl
newsbin src/ksmtuned.sh.in ksmtuned
newconfd data/sysconfig/ksm ksm
insinto /etc
doins data/ksmtuned.conf
newinitd ${FILESDIR}/initd_ksmtuned ksmtuned
newinitd ${FILESDIR}/initd_ksm ksm
#dodoc TODO
}