diff options
Diffstat (limited to 'poky/meta/recipes-extended/psmisc')
4 files changed, 148 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/psmisc/psmisc.inc b/poky/meta/recipes-extended/psmisc/psmisc.inc new file mode 100644 index 000000000..82ef94770 --- /dev/null +++ b/poky/meta/recipes-extended/psmisc/psmisc.inc @@ -0,0 +1,57 @@ +SUMMARY = "Utilities for managing processes on your system" +HOMEPAGE = "http://psmisc.sf.net/" +DESCRIPTION = "The psmisc package contains utilities for managing processes on your \ +system: pstree, killall and fuser. The pstree command displays a tree \ +structure of all of the running processes on your system. The killall \ +command sends a specified signal (SIGTERM if nothing is specified) to \ +processes identified by name. The fuser command identifies the PIDs \ +of processes that are using specified files or filesystems." +SECTION = "base" +DEPENDS = "ncurses virtual/libintl" +LICENSE = "GPLv2" + +SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz" + +S = "${WORKDIR}/psmisc-${PV}" + +inherit autotools gettext + +# Upstream has a custom autogen.sh which invokes po/update-potfiles as they +# don't ship a po/POTFILES.in (which is silly). Without that file gettext +# doesn't believe po/ is a gettext directory and won't generate po/Makefile. +EXTRA_AUTORECONF_remove = "--exclude=autopoint" +do_configure_prepend() { + ( cd ${S} && po/update-potfiles ) +} + + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc" +PACKAGES += "psmisc-extras" + +FILES_${PN} = "" +RDEPENDS_${PN} = "fuser killall pstree" + +FILES_fuser = "${bindir}/fuser.${BPN}" +FILES_fuser-doc = "${mandir}/man1/fuser*" + +FILES_killall = "${bindir}/killall.${BPN}" +FILES_killall-doc = "${mandir}/man1/killall*" + +FILES_pstree = "${bindir}/pstree" +FILES_pstree-doc = "${mandir}/man1/pstree*" + +FILES_psmisc-extras = "${bindir}" +FILES_psmisc-extras-doc = "${mandir}" + +inherit update-alternatives + +ALTERNATIVE_PRIORITY = "90" + +ALTERNATIVE_killall = "killall" + +ALTERNATIVE_fuser = "fuser" diff --git a/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch b/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch new file mode 100644 index 000000000..4d44495fd --- /dev/null +++ b/poky/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch @@ -0,0 +1,30 @@ +From 285877b7761d74736aca2687ed9bef2f78b82c33 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 2 Nov 2017 16:21:22 +0200 +Subject: [PATCH] Makefile.am: create src directory before attempting to write + there + +Otherwise out of tree builds will fail. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 9f61ab4..b4ced7f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -79,7 +79,7 @@ EXTRA_DIST = src/signames.c README.md + CLEANFILES = src/signames.h + + src/signames.h: src/signames.c Makefile +- export LC_ALL=C ; \ ++ export LC_ALL=C ; mkdir -p src ; \ + @CPP@ -dM $< |\ + tr -s '\t ' ' ' | sort -n -k 3 | sed \ + 's:#define SIG\([A-Z][A-Z]*[0-9]*\) \([0-9][0-9]*\).*$\:{\ \2,"\1" },:p;d' | \ +-- +2.14.2 + diff --git a/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch new file mode 100644 index 000000000..b57a006bc --- /dev/null +++ b/poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch @@ -0,0 +1,51 @@ +From 5dc872bb2fba6421cb8e1ee578f7bd4aaed55f61 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Mar 2016 15:46:14 +0000 +Subject: [PATCH] Use UINTPTR_MAX instead of __WORDSIZE + +Do not include sys/user.h since it conflicts with +pt_regs struct from kernel APIs in asm/ptrace.h + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/peekfd.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/peekfd.c b/src/peekfd.c +index cba2130..0d39878 100644 +--- a/src/peekfd.c ++++ b/src/peekfd.c +@@ -30,8 +30,11 @@ + #include <asm/ptrace.h> + #include <byteswap.h> + #include <endian.h> ++#ifdef __GLIBC__ + #include <sys/user.h> ++#endif + #include <stdlib.h> ++#include <stdint.h> + #include <getopt.h> + #include <ctype.h> + +@@ -228,11 +231,11 @@ int main(int argc, char **argv) + if (WIFSTOPPED(status)) { + #ifdef PPC + struct pt_regs regs; +- regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R0, 0); +- regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R3, 0); +- regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R4, 0); +- regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R5, 0); +- regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_ORIG_R3, 0); ++ regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R0, 0); ++ regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R3, 0); ++ regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R4, 0); ++ regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R5, 0); ++ regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_ORIG_R3, 0); + #elif defined(ARM) + struct pt_regs regs; + ptrace(PTRACE_GETREGS, pid, 0, ®s); +-- +1.9.1 + diff --git a/poky/meta/recipes-extended/psmisc/psmisc_23.0.bb b/poky/meta/recipes-extended/psmisc/psmisc_23.0.bb new file mode 100644 index 000000000..2b07f4974 --- /dev/null +++ b/poky/meta/recipes-extended/psmisc/psmisc_23.0.bb @@ -0,0 +1,10 @@ +require psmisc.inc +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" + +SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \ + file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \ + file://0001-Makefile.am-create-src-directory-before-attempting-t.patch \ + " +SRCREV = "67b1da268f4c0ce6859980e3dfcfaec5b2448e80" +S = "${WORKDIR}/git" |