Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "System and process monitoring utilities" |
| 2 | DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ |
| 3 | the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." |
| 4 | HOMEPAGE = "https://gitlab.com/procps-ng/procps" |
| 5 | SECTION = "base" |
| 6 | LICENSE = "GPLv2+ & LGPLv2+" |
Brad Bishop | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame] | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
| 8 | file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ |
| 9 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | |
| 11 | DEPENDS = "ncurses" |
| 12 | |
| 13 | inherit autotools gettext pkgconfig update-alternatives |
| 14 | |
| 15 | SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \ |
| 16 | file://sysctl.conf \ |
| 17 | file://0001-Fix-out-of-tree-builds.patch \ |
| 18 | " |
| 19 | |
| 20 | SRC_URI[md5sum] = "2b0717a7cb474b3d6dfdeedfbad2eccc" |
| 21 | SRC_URI[sha256sum] = "10bd744ffcb3de2d591d2f6acf1a54a7ba070fdcc432a855931a5057149f0465" |
| 22 | |
| 23 | S = "${WORKDIR}/procps-ng-${PV}" |
| 24 | |
| 25 | EXTRA_OECONF = "--enable-skill --disable-modern-top" |
| 26 | |
| 27 | do_install_append () { |
| 28 | install -d ${D}${base_bindir} |
| 29 | [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done |
| 30 | install -d ${D}${base_sbindir} |
| 31 | [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done |
| 32 | if [ "${base_sbindir}" != "${sbindir}" ]; then |
| 33 | rmdir ${D}${sbindir} |
| 34 | fi |
| 35 | |
| 36 | install -d ${D}${sysconfdir} |
| 37 | install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf |
| 38 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 39 | install -d ${D}${sysconfdir}/sysctl.d |
| 40 | ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf |
| 41 | fi |
| 42 | } |
| 43 | |
| 44 | CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" |
| 45 | |
| 46 | bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" |
| 47 | base_bindir_progs += "kill pidof ps watch" |
| 48 | base_sbindir_progs += "sysctl" |
| 49 | |
| 50 | ALTERNATIVE_PRIORITY = "200" |
| 51 | ALTERNATIVE_PRIORITY[pidof] = "150" |
| 52 | |
| 53 | ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" |
| 54 | |
| 55 | ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" |
| 56 | ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" |
| 57 | ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" |
| 58 | |
| 59 | python __anonymous() { |
| 60 | for prog in d.getVar('base_bindir_progs').split(): |
| 61 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) |
| 62 | |
| 63 | for prog in d.getVar('base_sbindir_progs').split(): |
| 64 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) |
| 65 | } |
| 66 | |
Brad Bishop | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame] | 67 | # 'ps' isn't suitable for use as a security tool so whitelist this CVE. |
| 68 | # https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3 |
| 69 | CVE_CHECK_WHITELIST += "CVE-2018-1121" |