From a6fd3626c599508427c1a7884e46790cb7fa299f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 28 Feb 2021 16:36:56 +0100 Subject: procps: update 3.3.16 -> 3.3.17 Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../procps/0001-w.c-correct-musl-builds.patch | 44 +++++++++ .../0002-proc-escape.c-add-missing-include.patch | 23 +++++ meta/recipes-extended/procps/procps_3.3.16.bb | 101 -------------------- meta/recipes-extended/procps/procps_3.3.17.bb | 103 +++++++++++++++++++++ 4 files changed, 170 insertions(+), 101 deletions(-) create mode 100644 meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch create mode 100644 meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch delete mode 100644 meta/recipes-extended/procps/procps_3.3.16.bb create mode 100644 meta/recipes-extended/procps/procps_3.3.17.bb diff --git a/meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch b/meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch new file mode 100644 index 0000000000..c92ad28e4f --- /dev/null +++ b/meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch @@ -0,0 +1,44 @@ +From 22f8d25567b8d64bdbab0fb0b4915b4362561d9b Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 24 Feb 2021 21:14:31 +0000 +Subject: [PATCH] w.c: correct musl builds + +No need to redefine UT_ stuff to something that does not exist. + +UT_ is already provided in musl but via utmp.h header, so include +it always. + +Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/126] +Signed-off-by: Alexander Kanavin +--- + w.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/w.c b/w.c +index 9d07ac9..d10639b 100644 +--- a/w.c ++++ b/w.c +@@ -57,9 +57,8 @@ + #include + #ifdef HAVE_UTMPX_H + # include +-#else +-# include + #endif ++#include + #include + + static int ignoreuser = 0; /* for '-u' */ +@@ -72,12 +71,6 @@ typedef struct utmpx utmp_t; + typedef struct utmp utmp_t; + #endif + +-#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE) +-# define UT_HOSTSIZE __UT_HOSTSIZE +-# define UT_LINESIZE __UT_LINESIZE +-# define UT_NAMESIZE __UT_NAMESIZE +-#endif +- + #ifdef W_SHOWFROM + # define FROM_STRING "on" + #else diff --git a/meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch b/meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch new file mode 100644 index 0000000000..5fa1ac9d78 --- /dev/null +++ b/meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch @@ -0,0 +1,23 @@ +From 4f964821398dff7ab21fec63da15e1e00b2e9277 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 24 Feb 2021 21:16:14 +0000 +Subject: [PATCH] proc/escape.c: add missing include + +Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/126] +Signed-off-by: Alexander Kanavin +--- + proc/escape.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/proc/escape.c b/proc/escape.c +index 2e8fb7d..e1f4612 100644 +--- a/proc/escape.c ++++ b/proc/escape.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include "procps.h" + #include "escape.h" + #include "readproc.h" diff --git a/meta/recipes-extended/procps/procps_3.3.16.bb b/meta/recipes-extended/procps/procps_3.3.16.bb deleted file mode 100644 index ef3ac86e97..0000000000 --- a/meta/recipes-extended/procps/procps_3.3.16.bb +++ /dev/null @@ -1,101 +0,0 @@ -SUMMARY = "System and process monitoring utilities" -DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ -the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." -HOMEPAGE = "https://gitlab.com/procps-ng/procps" -SECTION = "base" -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ - " - -DEPENDS = "ncurses" - -inherit autotools gettext pkgconfig update-alternatives - -SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https \ - file://sysctl.conf \ - " -SRCREV = "59c88e18f29000ceaf7e5f98181b07be443cf12f" - -S = "${WORKDIR}/git" - -# 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. -do_configure_prepend() { - ( cd ${S} && po/update-potfiles ) -} - -EXTRA_OECONF = "--enable-skill --disable-modern-top" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" - -do_install_append () { - install -d ${D}${base_bindir} - [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done - install -d ${D}${base_sbindir} - [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done - if [ "${base_sbindir}" != "${sbindir}" ]; then - rmdir ${D}${sbindir} - fi - - install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${sysconfdir}/sysctl.d - ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf - fi -} - -CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" - -bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" -base_bindir_progs += "kill pidof ps watch" -base_sbindir_progs += "sysctl" - -ALTERNATIVE_PRIORITY = "200" -ALTERNATIVE_PRIORITY[pidof] = "150" - -ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" - -ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" -ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" -ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" - -python __anonymous() { - for prog in d.getVar('base_bindir_progs').split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) - - for prog in d.getVar('base_sbindir_progs').split(): - d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) -} - -# 'ps' isn't suitable for use as a security tool so whitelist this CVE. -# https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3 -CVE_CHECK_WHITELIST += "CVE-2018-1121" - -PROCPS_PACKAGES = "${PN}-lib \ - ${PN}-ps \ - ${PN}-sysctl" - -PACKAGE_BEFORE_PN = "${PROCPS_PACKAGES}" -RDEPENDS_${PN} += "${PROCPS_PACKAGES}" - -RDEPENDS_${PN}-ps += "${PN}-lib" -RDEPENDS_${PN}-sysctl += "${PN}-lib" - -FILES_${PN}-lib = "${libdir}" -FILES_${PN}-ps = "${base_bindir}/ps.${BPN}" -FILES_${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d" - -ALTERNATIVE_${PN}_remove = "ps" -ALTERNATIVE_${PN}_remove = "sysctl" - -ALTERNATIVE_${PN}-ps = "ps" -ALTERNATIVE_TARGET[ps] = "${base_bindir}/ps" -ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" - -ALTERNATIVE_${PN}-sysctl = "sysctl" -ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" -ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" \ No newline at end of file diff --git a/meta/recipes-extended/procps/procps_3.3.17.bb b/meta/recipes-extended/procps/procps_3.3.17.bb new file mode 100644 index 0000000000..c74a901d9a --- /dev/null +++ b/meta/recipes-extended/procps/procps_3.3.17.bb @@ -0,0 +1,103 @@ +SUMMARY = "System and process monitoring utilities" +DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ +the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." +HOMEPAGE = "https://gitlab.com/procps-ng/procps" +SECTION = "base" +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ + " + +DEPENDS = "ncurses" + +inherit autotools gettext pkgconfig update-alternatives + +SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https \ + file://sysctl.conf \ + file://0001-w.c-correct-musl-builds.patch \ + file://0002-proc-escape.c-add-missing-include.patch \ + " +SRCREV = "19a508ea121c0c4ac6d0224575a036de745eaaf8" + +S = "${WORKDIR}/git" + +# 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. +do_configure_prepend() { + ( cd ${S} && po/update-potfiles ) +} + +EXTRA_OECONF = "--enable-skill --disable-modern-top" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" + +do_install_append () { + install -d ${D}${base_bindir} + [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done + install -d ${D}${base_sbindir} + [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done + if [ "${base_sbindir}" != "${sbindir}" ]; then + rmdir ${D}${sbindir} + fi + + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir}/sysctl.d + ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf + fi +} + +CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" + +bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime w" +base_bindir_progs += "kill pidof ps watch" +base_sbindir_progs += "sysctl" + +ALTERNATIVE_PRIORITY = "200" +ALTERNATIVE_PRIORITY[pidof] = "150" + +ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" + +ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" +ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" +ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" + +python __anonymous() { + for prog in d.getVar('base_bindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog)) + + for prog in d.getVar('base_sbindir_progs').split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir'), prog)) +} + +# 'ps' isn't suitable for use as a security tool so whitelist this CVE. +# https://bugzilla.redhat.com/show_bug.cgi?id=1575473#c3 +CVE_CHECK_WHITELIST += "CVE-2018-1121" + +PROCPS_PACKAGES = "${PN}-lib \ + ${PN}-ps \ + ${PN}-sysctl" + +PACKAGE_BEFORE_PN = "${PROCPS_PACKAGES}" +RDEPENDS_${PN} += "${PROCPS_PACKAGES}" + +RDEPENDS_${PN}-ps += "${PN}-lib" +RDEPENDS_${PN}-sysctl += "${PN}-lib" + +FILES_${PN}-lib = "${libdir}" +FILES_${PN}-ps = "${base_bindir}/ps.${BPN}" +FILES_${PN}-sysctl = "${base_sbindir}/sysctl.${BPN} ${sysconfdir}/sysctl.conf ${sysconfdir}/sysctl.d" + +ALTERNATIVE_${PN}_remove = "ps" +ALTERNATIVE_${PN}_remove = "sysctl" + +ALTERNATIVE_${PN}-ps = "ps" +ALTERNATIVE_TARGET[ps] = "${base_bindir}/ps" +ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" + +ALTERNATIVE_${PN}-sysctl = "sysctl" +ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" +ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" \ No newline at end of file -- cgit 1.2.3-korg