From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 19 Sep 2022 12:59:03 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oaEUR-009Wb5-QL for lore@lore.pengutronix.de; Mon, 19 Sep 2022 12:59:03 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oaEUQ-0003V4-IX; Mon, 19 Sep 2022 12:59:02 +0200 Received: from h1.cmg2.smtp.forpsi.com ([81.2.195.188]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYU2T-0003e0-BB for ptxdist@pengutronix.de; Wed, 14 Sep 2022 17:10:59 +0200 Received: from lenoch ([91.218.190.200]) by cmgsmtp with ESMTPSA id YU2RoL9gFhqm5YU2SobcX7; Wed, 14 Sep 2022 17:10:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triops.cz; s=f2019; t=1663168256; bh=gVxPALe6BA3hDQOwdEDMl3b5tyHvEbcBwCWN2pjO9wc=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=XrtOKBrujc4ebYWW0vmU6sQUXwbQQy1fKKxYtW30ZjgIR0YYY3LkttL3zAlT5m9Fp XaCOdZ1krsN61Xy8BfXNb6dcfjRJvTNfJVGydNzjrQt5sjIefE76aFHojrPFW9vpIk Nu41VUD4a3S7LvORmQqrleol6mmeYAqJG2j00UkZcIzUu/6iIBgTmY+Umg2jZy3E3m qev1AzLKT5dFlhHu599U6sMVLcNfufTIr43Ofxnxy7LU2TAbAncGk5SQWhILdwXUdF xTFdS1A7Bb0+79H6WQmPOtYZsG5YjcGTsMi30e7QmLa3gS88KSDSRLntgVI092FvaV hF9RTaSl9SlLw== Date: Wed, 14 Sep 2022 17:10:55 +0200 From: Ladislav Michl To: ptxdist@pengutronix.de Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CMAE-Envelope: MS4wfFoCMa8t/TtxdcUfs+3ECgtX2z9BlQJhT+HygUa8qNGdMr0J1aOsq7UNRr5mLwyi0xCy8PjODF5Nr6av7AtYUSDsnPVVD1Nrg9hR6Xte6bCHhY+63/j5 /ixLZ/T+9Gx2w5Ee/tKwtGzUWmGceo441MsVz+ffLVJ7/Gnebyl9uirh X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 X-Mailman-Approved-At: Mon, 19 Sep 2022 12:58:19 +0200 Subject: [ptxdist] [PATCH 2/2] psmisc: more finegrained tool instalation control X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false From: Ladislav Michl Date: Tue, 13 Sep 2022 11:08:59 +0200 Signed-off-by: Ladislav Michl --- 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 ") @$(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