]> code.ossystems Code Review - openembedded-core.git/commitdiff
procps: split ps and sysctl into individual packages
authorSinan Kaya <okaya@kernel.org>
Wed, 16 Dec 2020 22:25:41 +0000 (22:25 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Jan 2021 17:43:05 +0000 (17:43 +0000)
Move the ps and sysctl tools into its own package. Useful for
size constrained systems that only want the ps and/or sysctl tools.

Signed-off-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/procps/procps_3.3.16.bb

index 2810ebd285a8e8ea74b103f188eb3b57953ceaf6..ef3ac86e97c59632f013aa0639c5ae9bfca722e8 100644 (file)
@@ -74,3 +74,28 @@ python __anonymous() {
 # '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