diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /sys-apps/linux-misc-apps | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'sys-apps/linux-misc-apps')
| -rw-r--r-- | sys-apps/linux-misc-apps/Manifest | 2 | ||||
| -rw-r--r-- | sys-apps/linux-misc-apps/files/freefall.confd | 6 | ||||
| -rw-r--r-- | sys-apps/linux-misc-apps/files/freefall.initd | 44 | ||||
| -rw-r--r-- | sys-apps/linux-misc-apps/linux-misc-apps-5.8-r1.ebuild | 229 | ||||
| -rw-r--r-- | sys-apps/linux-misc-apps/linux-misc-apps-6.16.ebuild | 233 | ||||
| -rw-r--r-- | sys-apps/linux-misc-apps/metadata.xml | 12 |
6 files changed, 526 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..ab105a993507 --- /dev/null +++ b/sys-apps/linux-misc-apps/Manifest @@ -0,0 +1,2 @@ +DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556 +DIST linux-6.16.tar.xz 152620004 BLAKE2B 87bc4da7e89cc8265aebffea7ec6c09f711be24fee87cb1c03a264c03fd5a538d66aa806640835aa5103926e612cdfbc52d7c861d7f7065f1a8bb11d893b0921 SHA512 55a00f89ad6db6db2e26ff5dc5cfc96bbf6654e5bd5d17d2a3b944a47640367e54139716d230923187bebc6cb7756edc9511a620fb8abc6f32c50a658a734784 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/linux-misc-apps-5.8-r1.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-5.8-r1.ebuild new file mode 100644 index 000000000000..d89ebc89f32a --- /dev/null +++ b/sys-apps/linux-misc-apps/linux-misc-apps-5.8-r1.ebuild @@ -0,0 +1,229 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic linux-info toolchain-funcs + +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=$(ver_cut 1-2) + +_get_version_component_count() { + local cnt=( $(ver_rs 1- ' ') ) + echo ${#cnt[@]} || die +} + +if [ ${PV/_rc} != ${PV} ]; then + LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV//_/-}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/testing/${LINUX_PATCH} + https://www.kernel.org/pub/linux/kernel/v3.x/testing/v${PATCH_VERSION}/${LINUX_PATCH}" +elif [ $(_get_version_component_count) == 4 ]; then + # stable-release series + LINUX_VER=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_PATCH}" +else + LINUX_VER=${PV} +fi + +LINUX_SOURCES=linux-${LINUX_VER}.tar.xz +SRC_URI="${SRC_URI} https://www.kernel.org/pub/linux/kernel/v3.x/${LINUX_SOURCES}" + +# pmtools also provides turbostat +# usbip available in seperate package now +RDEPEND="sys-apps/hwdata + >=dev-libs/glib-2.6 + >=sys-kernel/linux-headers-${LINUX_V} + 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=( + samples/watchdog/watchdog-simple.c + tools/accounting/getdelays.c + tools/cgroup/cgroup_event_listener.c + tools/laptop/freefall/freefall.c + tools/testing/selftests/net/timestamping.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=( + samples/mei:mei-amt-version + tools/firewire:nosy-dump + tools/iio:iio_event_monitor + tools/iio:iio_generic_buffer + tools/iio:lsiio + tools/laptop/dslm:dslm + 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 + eapply "${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 + + eapply_user +} + +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() { + append-cflags -fcommon + 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/hwdata + 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 Documentation/usb/usbip_protocol.rst + find "${D}" -name 'libusbip*.la' -delete || die + fi + + # At one point upstream it was moved, but be generic to detect if it's + # happened already + if [[ -f "${D}"/usr/sbin/generic_buffer ]] && \ + [[ ! -f "${D}"/usr/sbin/iio_generic_buffer ]]; then + mv -f "${D}"/usr/sbin/{,iio_}generic_buffer || die + fi + + newconfd "${FILESDIR}"/freefall.confd freefall + newinitd "${FILESDIR}"/freefall.initd freefall +} + +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 "${ROOT}"/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-6.16.ebuild b/sys-apps/linux-misc-apps/linux-misc-apps-6.16.ebuild new file mode 100644 index 000000000000..df14d2d290b0 --- /dev/null +++ b/sys-apps/linux-misc-apps/linux-misc-apps-6.16.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic linux-info + +MY_PV="${PV/_/-}" +MY_PV="${MY_PV/-pre/-git}" +LINUX_V=$(ver_cut 1-2) + +DESCRIPTION="Misc tools bundled with kernel sources" +HOMEPAGE="https://kernel.org/" + +_get_version_component_count() { + local cnt=( $(ver_rs 1- ' ') ) + echo ${#cnt[@]} || die +} + +if [[ ${PV/_rc} != ${PV} ]]; then + LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV//_/-}.xz + SRC_URI=" + https://www.kernel.org/pub/linux/kernel/v${PV%%.*}.x/testing/${LINUX_PATCH} + https://www.kernel.org/pub/linux/kernel/v${PV%%.*}.x/testing/v${PATCH_VERSION}/${LINUX_PATCH} + " +elif [[ $(_get_version_component_count) == 4 ]]; then + # stable-release series + LINUX_VER=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${PV%%.*}.x/${LINUX_PATCH}" +else + LINUX_VER=${PV} +fi + +LINUX_SOURCES=linux-${LINUX_VER}.tar.xz +SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${PV%%.*}.x/${LINUX_SOURCES}" +S="${WORKDIR}/linux-${LINUX_VER}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="static-libs tcpd usbip" + +# pmtools also provides turbostat +# usbip available in seperate package now +RDEPEND=" + !sys-power/pmtools + >=dev-libs/glib-2.6 + sys-apps/hwdata + >=sys-kernel/linux-headers-${LINUX_V} + usbip? ( + !net-misc/usbip + virtual/libudev + tcpd? ( sys-apps/tcp-wrappers ) + ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +# All of these are integrated with the kernel build system, +# No make install, and ideally build with with the root Makefile +TARGETS_SIMPLE=( + samples/watchdog/watchdog-simple.c + tools/testing/selftests/net/timestamping.c + usr/gen_init_cpio.c + + # Broken: + #tools/accounting/getdelays.c + #tools/cgroup/cgroup_event_listener.c + #tools/laptop/freefall/freefall.c + #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/vm/slabinfo.c + #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=( + samples/mei:mei-amt-version + tools/firewire:nosy-dump + tools/iio:iio_event_monitor + tools/iio:iio_generic_buffer + tools/iio:lsiio + tools/laptop/dslm:dslm + 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} + + local MY_A _AFILE + 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 + eapply "${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 + + eapply_user +} + +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() { + append-cflags -fcommon + 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/hwdata + 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 Documentation/usb/usbip_protocol.rst + find "${D}" -name 'libusbip*.la' -delete || die + fi + + # At one point upstream it was moved, but be generic to detect if it's + # happened already + if [[ -f "${D}"/usr/sbin/generic_buffer ]] && \ + [[ ! -f "${D}"/usr/sbin/iio_generic_buffer ]]; then + mv -f "${D}"/usr/sbin/{,iio_}generic_buffer || die + fi + + #newconfd "${FILESDIR}"/freefall.confd freefall + #newinitd "${FILESDIR}"/freefall.initd freefall +} + +pkg_postinst() { + 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 "${ROOT}"/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/metadata.xml b/sys-apps/linux-misc-apps/metadata.xml new file mode 100644 index 000000000000..6b6a7e561f14 --- /dev/null +++ b/sys-apps/linux-misc-apps/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/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> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
