From 0542a0ecae5d15b69ffe7f0ff808f93e5999b804 Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Sun, 14 Jun 2020 17:05:49 +0800 Subject: [PATCH 1/3] procps-ng: move procps-ng-w to /usr/bin procps-ng-w was installed to /bin, which should be an accident. Signed-off-by: Huangbin Zhan --- utils/procps-ng/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/procps-ng/Makefile b/utils/procps-ng/Makefile index d6192da4f..719264652 100644 --- a/utils/procps-ng/Makefile +++ b/utils/procps-ng/Makefile @@ -38,7 +38,7 @@ PROCPS_APPLETS := \ # busybox alternatives which is also other distributions like debian and centos # are doing PROCPS_APPLETS_DIR_bin:=kill ps watch -procps-applets-dir=$(if $(findstring $(1),$(PROCPS_APPLETS_DIR_bin)),/bin,/usr/bin) +procps-applets-dir=$(if $(filter $(PROCPS_APPLETS_DIR_bin),$(1)),/bin,/usr/bin) define Package/procps-ng/Default SECTION:=utils From 7106e83d688ff8cfe25347042e28ce2eaf1f3d38 Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Tue, 27 Oct 2020 06:07:08 +0800 Subject: [PATCH 2/3] procps-ng: fix alternatives of procps-ng-sysctl align with busybox sysctl Signed-off-by: Huangbin Zhan --- utils/procps-ng/Makefile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/utils/procps-ng/Makefile b/utils/procps-ng/Makefile index 719264652..d9af76212 100644 --- a/utils/procps-ng/Makefile +++ b/utils/procps-ng/Makefile @@ -30,15 +30,19 @@ CONFIGURE_ARGS += --enable-skill # most of these have alternatives provided by busybox applets PROCPS_APPLETS := \ free kill pgrep pkill pmap ps pwdx skill slabtop \ - snice tload top uptime vmstat w watch + snice sysctl tload top uptime vmstat w watch # procps-ng will be configured with "--bindir=/usr/bin --sbindir=/usr/sbin" and # as such executables will be installed there by default, but some of them need # to reside in locations such as /bin and /sbin to be in accordance with # busybox alternatives which is also other distributions like debian and centos # are doing -PROCPS_APPLETS_DIR_bin:=kill ps watch -procps-applets-dir=$(if $(filter $(PROCPS_APPLETS_DIR_bin),$(1)),/bin,/usr/bin) +PROCPS_APPLETS_SRC_DIR_SBIN:=sysctl +procps-applets-src-dir=$(if $(filter $(PROCPS_APPLETS_SRC_DIR_SBIN),$(1)),/usr/sbin,/usr/bin) + +PROCPS_APPLETS_DIR_BIN:=kill ps watch +PROCPS_APPLETS_DIR_SBIN:=sysctl +procps-applets-dir=$(if $(filter $(PROCPS_APPLETS_DIR_BIN),$(1)),/bin,$(if $(filter $(PROCPS_APPLETS_DIR_SBIN),$(1)),/sbin,/usr/bin)) define Package/procps-ng/Default SECTION:=utils @@ -81,7 +85,6 @@ define GenPlugin endef $(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) -$(eval $(call GenPlugin,procps-ng-sysctl,sysctl,/usr/sbin)) MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -93,20 +96,14 @@ define Package/procps-ng/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/ endef -define Package/procps-ng-sysctl/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sysctl $(1)/usr/sbin -endef - define BuildPlugin define Package/$(1)/install - $(INSTALL_DIR) $$(1)$(3) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)$(3)/$(1) + $(INSTALL_DIR) $$(1)$(4) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(3)/$(2) $$(1)$(4)/$(1) endef $$(eval $$(call BuildPackage,$(1))) endef -$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) -$(eval $(call BuildPackage,procps-ng-sysctl)) +$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-src-dir,$(a)),$(call procps-applets-dir,$(a))))) $(eval $(call BuildPackage,procps-ng)) From 29fb098471a30bb59986968d99a50f18cbac4b0a Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Tue, 27 Oct 2020 21:52:01 +0800 Subject: [PATCH 3/3] procps-ng: move binaries to /usr/libexec Signed-off-by: Huangbin Zhan --- utils/procps-ng/Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/utils/procps-ng/Makefile b/utils/procps-ng/Makefile index d9af76212..32f614256 100644 --- a/utils/procps-ng/Makefile +++ b/utils/procps-ng/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procps-ng PKG_VERSION:=3.3.16 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/procps-ng @@ -72,19 +72,19 @@ define Package/procps-ng/description endef define GenPlugin - define Package/$(1) + define Package/procps-ng-$(1) $(call Package/procps-ng/Default) DEPENDS:=procps-ng - TITLE:=Applet $(2) from the procps-ng package - ALTERNATIVES:=200:$(3)/$(2):$(3)/$(1) + TITLE:=Applet $(1) from the procps-ng package + ALTERNATIVES:=200:$(2)/$(1):/usr/libexec/$(1)-procps-ng endef - define Package/$(1)/description - Installs the applet $(2). + define Package/procps-ng-$(1)/description + Installs the applet $(1). endef endef -$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) +$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,$(a),$(call procps-applets-dir,$(a))))) MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -97,13 +97,13 @@ define Package/procps-ng/install endef define BuildPlugin - define Package/$(1)/install - $(INSTALL_DIR) $$(1)$(4) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(3)/$(2) $$(1)$(4)/$(1) + define Package/procps-ng-$(1)/install + $(INSTALL_DIR) $$(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(2)/$(1) $$(1)/usr/libexec/$(1)-procps-ng endef - $$(eval $$(call BuildPackage,$(1))) + $$(eval $$(call BuildPackage,procps-ng-$(1))) endef -$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-src-dir,$(a)),$(call procps-applets-dir,$(a))))) +$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,$(a),$(call procps-applets-src-dir,$(a))))) $(eval $(call BuildPackage,procps-ng))