mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 2/2] psmisc: more finegrained tool instalation control
@ 2022-09-14 15:10 Ladislav Michl
  2022-09-28 14:29 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Ladislav Michl @ 2022-09-14 15:10 UTC (permalink / raw)
  To: ptxdist

From: Ladislav Michl <ladis@linux-mips.org>
Date: Tue, 13 Sep 2022 11:08:59 +0200

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 rules/psmisc.in   | 42 ++++++++++++++++++++++++++++++++++++------
 rules/psmisc.make | 20 +++++++++++++-------
 2 files changed, 49 insertions(+), 13 deletions(-)

diff --git a/rules/psmisc.in b/rules/psmisc.in
index 1c3a61414..3d3c7a802 100644
--- a/rules/psmisc.in
+++ b/rules/psmisc.in
@@ -1,18 +1,48 @@
 ## SECTION=shell_and_console
 
-config PSMISC
+menuconfig PSMISC
 	tristate
-	depends on ( !BUSYBOX_FUSER && !BUSYBOX_KILLALL && !BUSYBOX_PSTREE ) || ALLYES
 	select NCURSES
-	prompt "psmisc"
+	prompt "psmisc                        "
 	help
 	  utilities that use the proc file system
 
-comment "BusyBox' fuser is selected! (psmisc)"
+if PSMISC
+
+config PSMISC_FUSER
+	bool
+	prompt "fuser"
+	depends on !BUSYBOX_FUSER || ALLYES
+
+comment "BusyBox' fuser is selected!"
 	depends on BUSYBOX_FUSER
 
-comment "BusyBox' killall is selected! (psmisc)"
+config PSMISC_KILLALL
+	bool
+	prompt "killall"
+	depends on !BUSYBOX_KILLALL || ALLYES
+
+comment "BusyBox' killall is selected!"
 	depends on BUSYBOX_KILLALL
 
-comment "BusyBox' pstree is selected! (psmisc)"
+config PSMISC_PEEKFD
+	bool
+	prompt "peekfd"
+
+config PSMISC_PRTSTAT
+	bool
+	prompt "prtstat"
+
+config PSMISC_PSLOG
+	bool
+	prompt "pslog"
+
+config PSMISC_PSTREE
+	bool
+	prompt "pstree"
+	depends on !BUSYBOX_PSTREE || ALLYES
+
+comment "BusyBox' pstree is selected!"
 	depends on BUSYBOX_PSTREE
+
+endif
diff --git a/rules/psmisc.make b/rules/psmisc.make
index 66541c615..fdb479877 100644
--- a/rules/psmisc.make
+++ b/rules/psmisc.make
@@ -44,6 +44,16 @@ PSMISC_CONF_OPT		:= \
 # Target-Install
 # ----------------------------------------------------------------------------
 
+PSMISC_BIN-y				:=
+PSMISC_BIN-$(PTXCONF_PSMISC_FUSER)	+= fuser
+PSMISC_BIN-$(PTXCONF_PSMISC_KILLALL)	+= killall
+ifndef PTXCONF_ARCH_ARM64
+PSMISC_BIN-$(PTXCONF_PSMISC_PEEKFD)	+= peekfd
+endif
+PSMISC_BIN-$(PTXCONF_PSMISC_PRTSTAT)	+= prtstat
+PSMISC_BIN-$(PTXCONF_PSMISC_PSLOG)	+= pslog
+PSMISC_BIN-$(PTXCONF_PSMISC_PSTREE)	+= pstree
+
 $(STATEDIR)/psmisc.targetinstall:
 	@$(call targetinfo)
 
@@ -53,13 +63,9 @@ $(STATEDIR)/psmisc.targetinstall:
 	@$(call install_fixup, psmisc,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
 	@$(call install_fixup, psmisc,DESCRIPTION,missing)
 
-	@$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/fuser)
-	@$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/killall)
-ifndef PTXCONF_ARCH_ARM64
-	@$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/peekfd)
-endif
-	@$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/prtstat)
-	@$(call install_copy, psmisc, 0, 0, 0755, -, /usr/bin/pstree)
+	@$(foreach tool, $(PSMISC_BIN-y), \
+		$(call install_copy, psmisc, 0, 0, 0755, -, \
+		/usr/bin/$(tool));)
 
 	@$(call install_finish, psmisc)
 
-- 
2.32.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-28 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 15:10 [ptxdist] [PATCH 2/2] psmisc: more finegrained tool instalation control Ladislav Michl
2022-09-28 14:29 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox