summaryrefslogtreecommitdiff
path: root/sys-apps/linux-misc-apps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/linux-misc-apps
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/linux-misc-apps')
-rw-r--r--sys-apps/linux-misc-apps/Manifest14
-rw-r--r--sys-apps/linux-misc-apps/files/freefall.confd6
-rw-r--r--sys-apps/linux-misc-apps/files/freefall.initd44
-rw-r--r--sys-apps/linux-misc-apps/files/hpfall.confd6
-rw-r--r--sys-apps/linux-misc-apps/files/hpfall.initd44
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild172
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild184
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild216
-rw-r--r--sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild183
-rw-r--r--sys-apps/linux-misc-apps/metadata.xml10
10 files changed, 879 insertions, 0 deletions
diff --git a/sys-apps/linux-misc-apps/Manifest b/sys-apps/linux-misc-apps/Manifest
new file mode 100644
index 000000000000..2eb92356e3f2
--- /dev/null
+++ b/sys-apps/linux-misc-apps/Manifest
@@ -0,0 +1,14 @@
+AUX freefall.confd 147 SHA256 3ed6f497dbb8f6b8a65f369b74d04a826a1b0463b344ce5d1b2000d97f4d5471 SHA512 556472ab75ab8d3ccbedc44902a34bdef433430aa86fe5d8a125b27101f81e9c7c77e5a1fdfa84aef35078046e4b27a33eeb17d1745871f9e1f41e0ef64b2ba9 WHIRLPOOL 74dd1f0f336da5bca45d40fdf083384e272c1197b3307a2840bb43937a365bea3bb78d972675dcd8fce67ca4ef1cfbc0150a81f25f8c637c40c858c1f18d9c42
+AUX freefall.initd 1111 SHA256 9959046202c21ca157aa542071925683d4b0836e9c5b29b92416eb513b1c44d2 SHA512 e4d4d724276d9b64b80b29be5c28b9efc15556dd31545c85e45253aec2305d37af4b60a0be3f2f279c76c27aba5a968053a9bab7d08f2d559277701fd84375f4 WHIRLPOOL d2c3d4d136ac73dc02cff02e75dacba65dd2745c3740879183803eb452ce9218548c4388b2ae03f70d9d2a1501586f7e5c7aa1b30a3a866afe8d031bf42c6cc5
+AUX hpfall.confd 144 SHA256 54e3e4fa314066b0e0e177a7d19e86ad594ca89a307c134d236691edfe6970f8 SHA512 995fae481f169a2e53e4985113d5581ec37690a0fa2b77ca4665ff2e26d1ec073edc12d4001d4ca144ba3e3ce57b269bd8016ea024844fa3bde145bc7e4945f6 WHIRLPOOL de56cb87ae12029a18ad4131ae8a1e256a63f39aea3aae9eadbd28bf77631b29480c229765bf91b8afba35f9c4d0eee0a90cb33e5420b9608abd1622d27aaba3
+AUX hpfall.initd 1098 SHA256 b092f6b50aa5c26b3cd4fcb1cc75561405acc2e7374e63ed5ae434dcaeee47a5 SHA512 64c716255d8ecc5828d7c54b4aef9406353e2d3a2f0965882342344c533bebf7826b4a76e58263b974dfc1162b49688e2009eeb5a467e4361ab8241d23a028d7 WHIRLPOOL e24587da0fa11f31b3b83bb72cbd48d1eee54018b22108018cbf02cd2243feff3aeee9ea49d6aaf1e75777ca6fc535f9b8309dbbcf35ac736bfd195c551e6381
+DIST linux-3.18.tar.xz 80934708 SHA256 becc413cc9e6d7f5cc52a3ce66d65c3725bc1d1cc1001f4ce6c32b69eb188cbd SHA512 2f0b72466e9bc538a675738aa416573d41bbbd7e3e2ffd5b5b127afde609ebc278cec5a3c37e73479607e957c13f1b4ed9782a3795e0dcc2cf8e550228594009 WHIRLPOOL 81634af631b7d30ccd1f4798f96f44d9aa0ba6609b73f2747eb6aebaf7a99487fb2dbd45767605186182533cb222bfd9236e8dd5e11a04fdb67c211e4e0a91d6
+DIST linux-3.6.tar.bz2 82296001 SHA256 88ae0a20fd39ecae79db0ce8f9397922fae33c8b06a54ed2c883c861126c9771 SHA512 cbaefc2c4c8ab2251c3345b7b2c88d55a49e3468d8b177b05dd6d96a802efa9a052b1a1ecab8b71298bac97f45259516d88253838332b4fdb4307780ebcddce9 WHIRLPOOL e17e3800951f0c3af21015d1a1c99698d0ef70815bd4f131dd60b30baef70d4c255988857533a9a7c058388c2febfcf02d12cde2a7ed46b24fa85aeb260c0251
+DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc
+EBUILD linux-misc-apps-3.18.ebuild 4978 SHA256 064e375630b7083662836bcda8475cd567b835cf20da9eedbda315da597d49fb SHA512 3467e5f785f114e4030d4826485a4c4510a94d7e211fe65c475235efe7046329036ce657b3fb535da80c8b81da4f41ae273b6a8035d1fdd4b3a2518b69b0daf5 WHIRLPOOL dd3104d385c4e44f09e30a839c5549f512ba39daa96788ce34fe276748622549b28d8d9a8a0a94474b16d9e33d71bd36d2b8a47115f4f840e3206d6cabf8acad
+EBUILD linux-misc-apps-3.6-r2.ebuild 5061 SHA256 a6ce1f957f6e865c596736e6ceb324323ea8f3d761329df218795fceabdc8cb3 SHA512 7d69ae7fbf372dd5b93010e5875216d0e430778dc4589ed930c108c2e7524719aa1fb830cb7af8a688ce30a1b24c285033528c307c75ca91dc8f20f98e955121 WHIRLPOOL 44b44537c7ed8035441747bf1ce459fb25e42e33fc845903594d1fb8e071631f2c947eefca9d425810591fc4743c543010641eef6d3cafa14f84ca2869916ed3
+EBUILD linux-misc-apps-4.4-r1.ebuild 6319 SHA256 9f200fbbba38af3cca587ffe12709c3d9a0df66add9323cd8a1921ee9d1e2a5a SHA512 9a4e12c44d0faa1910c4f7ad60fea624f2070e75baadf3fa675827331dd5a84c1bf3a9e57315baf9ed309b5ea2f7c73590fd1bc8173672f83c22372893c7fac7 WHIRLPOOL a2c12d4b34182f451db40a0ebcc030e3964dd5279b54f2a83144d30d42eee278f62e0398d7e140026f672a23d812222e4fe32c5d161ad72f3be0f3dad56fb14f
+EBUILD linux-misc-apps-4.4.ebuild 5477 SHA256 194520ce4dec23fa69f120881efb597e6d83998bff80004687267632a0a77ce1 SHA512 dc9992b78dcdbcbd2548ad3fa520588e7980a03af1e1743f2afe62ec4d643b810693b4d4254e7de18f17f049cd6947943825227ee21ddcbc4d17e3313aa0f4ff WHIRLPOOL bbe1f6d476b9892e6b0a78942707e0c44a5db85fec0092d82c762864d14f9b4e7db1eecc7b8e28f900f3d3dfc43a4c58487d4c084d2312f04b09d727724675a7
+MISC ChangeLog 3453 SHA256 949d38c46f8bd014bc008dfb214b207c1840d2fc51697e54c901614e41a3c46f SHA512 806a2fa02c515220d8a65fb5ef8c0355144cb1eef36897e84db2dd688e6bee2aea3fc20d12379ab35218c19260d1a70638ff36a92ea909d169ddf01375c36fbf WHIRLPOOL 6863dc0206fa117b332f8c65b6cb60d5dfae09dace2dcab7a19717b4195044f31a2a5b10fd8c0be1777f683977275cb0b210f9bd5874d18280e95d3574151edf
+MISC ChangeLog-2015 1665 SHA256 f4c71ec42992408bd8bf2178b4eb06221d3527471e94c8c034a028edb7549fec SHA512 4344ac73f65de3650dbd64343a90e8753075460d80dbc91fc724aacb9c377c3e7e8a114a1cdd3ff6fda872da439e6522d546dfe9ca8f981f40690d8e827598d0 WHIRLPOOL e6cd6ca29d6fc9d79d6b46be6cbad0d397b8472cd49fc521aac91eb9019087cb06fae221cf38df977db67ea5bc6984bafce6ad64a1c5ce60b2205150b172775f
+MISC metadata.xml 318 SHA256 eee43e162fd840b35759997b7b89e5657cd8dd97080b2542e9928b57f96dfea3 SHA512 c5b90254b92fd0bd40596718daed1e9b5fd2c0039a814932811e33fb6827eac660aadd324bd45117d60ca56148b2f8213a075be1b255d6e8c006e2702f76833d WHIRLPOOL e4350d4c822e533791e5c49f419101a4816199b55015eafd233cd9abef971431398e2dcfa96e41c3809d57d3f8a45f47879b65b45654f905190b2411bb598f77
diff --git a/sys-apps/linux-misc-apps/files/freefall.confd b/sys-apps/linux-misc-apps/files/freefall.confd
new file mode 100644
index 000000000000..c082615cbcac
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/freefall.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/freefall
+
+# The name of the disk device that hpfall should protect.
+# Usually this is 'sda' or 'hda' the primary master.
+
+DISK="sda"
diff --git a/sys-apps/linux-misc-apps/files/freefall.initd b/sys-apps/linux-misc-apps/files/freefall.initd
new file mode 100644
index 000000000000..d0c896e6293d
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/freefall.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 2012-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+checkconfig() {
+ if [ -z "$DISK" ] ; then
+ eerror "You need to setup DISK in /etc/conf.d/freefall first"
+ return 1
+ fi
+
+ if [ ! -b /dev/${DISK} ]; then
+ eerror "Could not find disk /dev/${DISK}!"
+ eerror "Adjust the DISK setting in /etc/conf.d/freefall"
+ return 1
+ fi
+
+ if [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then
+ eerror "No protect entry for ${DISK}!"
+ eerror "Kernel 2.6.28 and above is required"
+ return 1
+ fi
+
+ if [ ! -c /dev/freefall ]; then
+ ebegin "Loading hp_accel module"
+ modprobe hp_accel
+ eend $? || return 1
+ fi
+}
+
+start () {
+ checkconfig || return 1
+
+ ebegin "Starting active hard-drive protection daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/freefall /dev/${DISK}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping active hard-drive protection daemon"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/freefall
+ eend $?
+}
diff --git a/sys-apps/linux-misc-apps/files/hpfall.confd b/sys-apps/linux-misc-apps/files/hpfall.confd
new file mode 100644
index 000000000000..4f3451b0bff6
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/hpfall.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/hpfall
+
+# The name of the disk device that hpfall should protect.
+# Usually this is 'sda' or 'hda' the primary master.
+
+DISK="sda" \ No newline at end of file
diff --git a/sys-apps/linux-misc-apps/files/hpfall.initd b/sys-apps/linux-misc-apps/files/hpfall.initd
new file mode 100644
index 000000000000..8b4930612c4d
--- /dev/null
+++ b/sys-apps/linux-misc-apps/files/hpfall.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+checkconfig() {
+ if [ -z "$DISK" ] ; then
+ eerror "You need to setup DISK in /etc/conf.d/hpfall first"
+ return 1
+ fi
+
+ if [ ! -b /dev/${DISK} ]; then
+ eerror "Could not find disk /dev/${DISK}!"
+ eerror "Adjust the DISK setting in /etc/conf.d/hpfall"
+ return 1
+ fi
+
+ if [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then
+ eerror "No protect entry for ${DISK}!"
+ eerror "Kernel 2.6.28 and above is required"
+ return 1
+ fi
+
+ if [ ! -c /dev/freefall ]; then
+ ebegin "Loading hp_accel module"
+ modprobe hp_accel
+ eend $? || return 1
+ fi
+}
+
+start () {
+ checkconfig || return 1
+
+ ebegin "Starting active hard-drive protection daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/hpfall /dev/${DISK}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping active hard-drive protection daemon"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/hpfall
+ eend $?
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild
new file mode 100644
index 000000000000..df8e784f1a82
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-3.18.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ tcpd? ( sys-apps/tcp-wrappers )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/laptops/dslm.c
+ Documentation/laptops/freefall.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/lguest/lguest.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ Documentation/misc-devices/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/power/x86/turbostat:turbostat:../../../../turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The usbip utility is maintained separately at net-misc/usbip"
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find /etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild
new file mode 100644
index 000000000000..a2e70c995d37
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-3.6-r2.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info autotools flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.bz2
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.bz2
+ SRC_URI="mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.bz2
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# sysfsutils and glib for usbip - remove sysfsutils in 3.7 or 3.8
+RDEPEND="sys-apps/hwids
+ >=sys-fs/sysfsutils-2
+ >=dev-libs/glib-2.6
+ tcpd? ( sys-apps/tcp-wrappers )
+ !sys-power/pmtools
+ !net-misc/usbip"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/cgroups/cgroup_event_listener.c
+ Documentation/laptops/dslm.c
+ Documentation/laptops/hpfall.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/lguest/lguest.c
+ tools/vm/page-types.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+)
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ tools/firewire:nosy-dump
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ Documentation/misc-devices/mei:mei-amt-version
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ pushd drivers/staging/usbip/userspace >/dev/null &&
+ eautoreconf -i -f -v &&
+ popd >/dev/null || die "usbip"
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ cd drivers/staging/usbip/userspace && \
+ econf \
+ $(use_enable static-libs static) \
+ $(use tcpd || echo --without-tcp-wrappers) \
+ --with-usbids-dir=/usr/share/misc
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target=${t/*:}
+ einfo "Building $dir => $target"
+ emake -C $dir ARCH=${karch} $target
+ done
+
+ emake -C drivers/staging/usbip/userspace
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target=${t/*:}
+ einfo "Installing $dir => $target"
+ dosbin ${dir}/${target}
+ done
+
+ pushd drivers/staging/usbip/userspace >/dev/null \
+ || die "Missing usbip/userspace"
+ emake DESTDIR="${D}" install
+
+ newdoc README README.usbip
+ newdoc AUTHORS AUTHORS.usbip
+ dodoc ../usbip_protocol.txt
+ popd >/dev/null
+
+ newconfd "${FILESDIR}"/hpfall.confd hpfall
+ newinitd "${FILESDIR}"/hpfall.initd hpfall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild
new file mode 100644
index 000000000000..8e3a1d871517
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-4.4-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info autotools flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd usbip"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ >=sys-kernel/linux-headers-$(get_version_component_range 1-2)
+ usbip? (
+ !net-misc/usbip
+ tcpd? ( sys-apps/tcp-wrappers )
+ virtual/libudev
+ )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/laptops/dslm.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/laptop/freefall/freefall.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+ # Broken:
+ #tools/lguest/lguest.c # fails to compile
+ #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere
+ #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ Documentation/misc-devices/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/iio:generic_buffer
+ tools/iio:iio_event_monitor
+ tools/iio:lsiio
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ tools/thermal/tmon:tmon
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ pushd tools/usb/usbip/ >/dev/null &&
+ sed -i 's/-Werror[^ ]* //g' configure.ac &&
+ eautoreconf -i -f -v &&
+ popd >/dev/null || die "usbip"
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ if use usbip; then
+ pushd tools/usb/usbip/ || die
+ econf \
+ $(use_enable static-libs static) \
+ $(use tcpd || echo --without-tcp-wrappers) \
+ --with-usbids-dir=/usr/share/misc
+ popd
+ fi
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ append-cflags -I./tools/lib
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+
+ if use usbip; then
+ emake -C tools/usb/usbip
+ fi
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ if use usbip; then
+ pushd tools/usb/usbip/ >/dev/null || die "usbip"
+ emake DESTDIR="${D}" install
+ newdoc README README.usbip
+ newdoc AUTHORS AUTHORS.usbip
+ popd >/dev/null
+ dodoc drivers/usb/usbip/usbip_protocol.txt
+ fi
+
+ mv -f "${D}"/usr/sbin/{,iio_}generic_buffer
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The lguest utility no longer builds, and has been dropped."
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find /etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+ if use usbip; then
+ elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client"
+ elog "machine's kernel config and USBIP_HOST on the server."
+ fi
+}
diff --git a/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild
new file mode 100644
index 000000000000..3eadfb096a3f
--- /dev/null
+++ b/sys-apps/linux-misc-apps/linux-misc-apps-4.4.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator eutils toolchain-funcs linux-info flag-o-matic
+
+DESCRIPTION="Misc tools bundled with kernel sources"
+HOMEPAGE="https://kernel.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static-libs tcpd"
+
+MY_PV="${PV/_/-}"
+MY_PV="${MY_PV/-pre/-git}"
+
+LINUX_V=$(get_version_component_range 1-2)
+
+if [ ${PV/_rc} != ${PV} ]; then
+ LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1))
+ PATCH_VERSION=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV//_/-}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/testing/${LINUX_PATCH}
+ mirror://kernel/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}"
+elif [ $(get_version_component_count) == 4 ]; then
+ # stable-release series
+ LINUX_VER=$(get_version_component_range 1-3)
+ LINUX_PATCH=patch-${PV}.xz
+ SRC_URI="mirror://kernel/linux/kernel/v3.x/${LINUX_PATCH}"
+else
+ LINUX_VER=${PV}
+fi
+
+LINUX_SOURCES=linux-${LINUX_VER}.tar.xz
+SRC_URI="${SRC_URI} mirror://kernel/linux/kernel/v3.x/${LINUX_SOURCES}"
+
+# pmtools also provides turbostat
+# usbip available in seperate package now
+RDEPEND="sys-apps/hwids
+ >=dev-libs/glib-2.6
+ tcpd? ( sys-apps/tcp-wrappers )
+ !sys-power/pmtools"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/linux-${LINUX_VER}"
+
+# All of these are integrated with the kernel build system,
+# No make install, and ideally build with with the root Makefile
+TARGETS_SIMPLE=(
+ Documentation/accounting/getdelays.c
+ Documentation/laptops/dslm.c
+ Documentation/networking/timestamping/timestamping.c
+ Documentation/watchdog/src/watchdog-simple.c
+ tools/cgroup/cgroup_event_listener.c
+ tools/laptop/freefall/freefall.c
+ tools/vm/slabinfo.c
+ usr/gen_init_cpio.c
+ # Broken:
+ #tools/lguest/lguest.c # fails to compile
+ #tools/vm/page-types.c # page-types.c:(.text+0xe2b): undefined reference to `debugfs__mount', not defined anywhere
+ #tools/net/bpf_jit_disasm.c # /usr/include/x86_64-pc-linux-gnu/bfd.h:35:2: error: #error config.h must be included before this header
+)
+# tools/vm/page-types.c - broken, header path issue
+# tools/hv/hv_kvp_daemon.c - broken in 3.7 by missing linux/hyperv.h userspace
+# Documentation/networking/ifenslave.c - obsolete
+# Documentation/ptp/testptp.c - pending linux-headers-3.0
+
+# These have a broken make install, no DESTDIR
+TARGET_MAKE_SIMPLE=(
+ Documentation/misc-devices/mei:mei-amt-version
+ tools/firewire:nosy-dump
+ tools/iio:generic_buffer
+ tools/iio:iio_event_monitor
+ tools/iio:lsiio
+ tools/power/x86/turbostat:turbostat
+ tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy
+ tools/thermal/tmon:tmon
+)
+# tools/perf - covered by dev-utils/perf
+# tools/usb - testcases only
+# tools/virtio - testcaes only
+
+ #for _pattern in {Documentation,scripts,tools,usr,include,lib,"arch/*/include",Makefile,Kbuild,Kconfig}; do
+src_unpack() {
+ unpack ${LINUX_SOURCES}
+
+ MY_A=
+ for _AFILE in ${A}; do
+ [[ ${_AFILE} == ${LINUX_SOURCES} ]] && continue
+ [[ ${_AFILE} == ${LINUX_PATCH} ]] && continue
+ MY_A="${MY_A} ${_AFILE}"
+ done
+ [[ -n ${MY_A} ]] && unpack ${MY_A}
+}
+
+src_prepare() {
+ if [[ -n ${LINUX_PATCH} ]]; then
+ epatch "${DISTDIR}"/${LINUX_PATCH}
+ fi
+
+ sed -i \
+ -e '/^nosy-dump.*LDFLAGS/d' \
+ -e '/^nosy-dump.*CFLAGS/d' \
+ -e '/^nosy-dump.*CPPFLAGS/s,CPPFLAGS =,CPPFLAGS +=,g' \
+ "${S}"/tools/firewire/Makefile
+}
+
+kernel_asm_arch() {
+ a="${1:${ARCH}}"
+ case ${a} in
+ # Merged arches
+ x86|amd64) echo x86 ;;
+ ppc*) echo powerpc ;;
+ # Non-merged
+ alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+ *) die "TODO: Update the code for your asm-ARCH symlink" ;;
+ esac
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ local karch=$(kernel_asm_arch "${ARCH}")
+ # This is the minimal amount needed to start building host binaries.
+ #emake allmodconfig ARCH=${karch}
+ #emake prepare modules_prepare ARCH=${karch}
+ #touch Module.symvers
+
+ # Now we can start building
+ append-cflags -I./tools/lib
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Building $s => $bin"
+ emake -f /dev/null M=${dir} ARCH=${karch} ${s%.c}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Building $dir => $binfile (via emake $target)"
+ emake -C $dir ARCH=${karch} $target
+ done
+}
+
+src_install() {
+ into /usr
+ for s in ${TARGETS_SIMPLE[@]} ; do
+ dir=$(dirname $s) src=$(basename $s) bin=${src%.c}
+ einfo "Installing $s => $bin"
+ dosbin ${dir}/${bin}
+ done
+
+ for t in ${TARGET_MAKE_SIMPLE[@]} ; do
+ dir=${t/:*} target_binfile=${t#*:}
+ target=${target_binfile/:*} binfile=${target_binfile/*:}
+ [ -z "${binfile}" ] && binfile=$target
+ einfo "Installing $dir => $binfile"
+ dosbin ${dir}/${binfile}
+ done
+
+ mv -f "${D}"/usr/sbin/{,iio_}generic_buffer
+
+ newconfd "${FILESDIR}"/freefall.confd freefall
+ newinitd "${FILESDIR}"/freefall.initd freefall
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ echo
+ elog "The cpupower utility is maintained separately at sys-power/cpupower"
+ elog "The usbip utility is maintained separately at net-misc/usbip"
+ elog "The lguest utility no longer builds, and has been dropped."
+ elog "The hpfall tool has been renamed by upstream to freefall; update your config if needed"
+ if find /etc/runlevels/ -name hpfall ; then
+ ewarn "You must change hpfall to freefall in your runlevels!"
+ fi
+}
diff --git a/sys-apps/linux-misc-apps/metadata.xml b/sys-apps/linux-misc-apps/metadata.xml
new file mode 100644
index 000000000000..8ac62c3e7f2b
--- /dev/null
+++ b/sys-apps/linux-misc-apps/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name="usbip">Include USB/IP binaries to replace <pkg>net-misc/usbip</pkg></flag>
+</use>
+</pkgmetadata>