From df10e58a9c7c5ef88eae23c03e497d2f9ca9cedd Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Fri, 12 Jun 2020 20:35:04 +0800 Subject: [PATCH 1/3] coreutils: move alternatives to /usr/libexec Signed-off-by: Huangbin Zhan --- utils/coreutils/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/coreutils/Makefile b/utils/coreutils/Makefile index 62cb51fad..157a2496f 100644 --- a/utils/coreutils/Makefile +++ b/utils/coreutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coreutils PKG_VERSION:=8.32 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/coreutils @@ -56,9 +56,9 @@ DIR_OTHERS := \ base32 b2sum basenc csplit dir dircolors fmt join numfmt pathchk pinky \ pr ptx sha224sum sha384sum stdbuf tsort vdir -$(eval $(foreach a,$(DIR_BIN),ALTS_$(a):=300:/bin/$(a):/usr/bin/gnu-$(a)$(newline))) -$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/bin/gnu-$(a)$(newline))) -$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/bin/gnu-$(a)$(newline))) +$(eval $(foreach a,$(DIR_BIN),ALTS_$(a):=300:/bin/$(a):/usr/libexec/$(a)-coreutils$(newline))) +$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/libexec/$(a)-coreutils$(newline))) +$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/libexec/$(a)-coreutils$(newline))) DEPENDS_sort = +libpthread DEPENDS_timeout = +librt @@ -137,8 +137,8 @@ endef define BuildPlugin define Package/$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/$(if $(ALTS_$(2)),gnu-$(2),$(2)) + $(INSTALL_DIR) $$(1)/usr/$(if $(ALTS_$(2)),libexec,bin) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/$(if $(ALTS_$(2)),libexec/$(2)-coreutils,bin/$(2)) $(foreach f,$(FILES_$(2)), $(INSTALL_DIR) $$(1)/$(dir $(f)) $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f) From 75c4617bcf9723956a9eddf63e391b35f9342282 Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Thu, 8 Oct 2020 20:22:51 +0800 Subject: [PATCH 2/3] treewide: move binary of alternatives to libexec, rename as suggested Signed-off-by: Huangbin Zhan --- devel/diffutils/Makefile | 12 ++++++------ net/bridge-utils/Makefile | 6 +++--- net/openssh/Makefile | 13 ++++++------- net/wget/Makefile | 14 +++++++------- utils/findutils/Makefile | 10 +++++----- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/devel/diffutils/Makefile b/devel/diffutils/Makefile index 65a41f8eb..ec8897710 100644 --- a/devel/diffutils/Makefile +++ b/devel/diffutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=diffutils PKG_VERSION:=3.7 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/diffutils @@ -31,9 +31,8 @@ define Package/diffutils TITLE:=diffutils URL:=http://www.gnu.org/software/diffutils/ ALTERNATIVES:=\ - 200:/usr/bin/cmp:/usr/bin/gnu-cmp \ - 200:/usr/bin/diff:/usr/bin/gnu-diff \ - + 200:/usr/bin/cmp:/usr/libexec/cmp-gnu \ + 200:/usr/bin/diff:/usr/libexec/diff-gnu endef define Package/diffutils/description @@ -48,8 +47,9 @@ CONFIGURE_VARS += \ define Package/diffutils/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3} $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/diff $(1)/usr/bin/gnu-diff - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmp $(1)/usr/bin/gnu-cmp + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/diff $(1)/usr/libexec/diff-gnu + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmp $(1)/usr/libexec/cmp-gnu endef $(eval $(call BuildPackage,diffutils)) diff --git a/net/bridge-utils/Makefile b/net/bridge-utils/Makefile index b5511cd41..dc837c9bb 100644 --- a/net/bridge-utils/Makefile +++ b/net/bridge-utils/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=bridge-utils PKG_VERSION:=1.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/shemminger/bridge-utils @@ -31,7 +31,7 @@ define Package/bridge CATEGORY:=Base system TITLE:=Ethernet bridging configuration utility URL:=http://www.linuxfromscratch.org/blfs/view/svn/basicnet/bridge-utils.html - ALTERNATIVES:=300:/usr/sbin/brctl:/usr/libexec/bridge-utils-brctl + ALTERNATIVES:=300:/usr/sbin/brctl:/usr/libexec/brctl-bridge-utils endef define Package/bridge/description @@ -44,7 +44,7 @@ CONFIGURE_ARGS += \ define Package/bridge/install $(INSTALL_DIR) $(1)/usr/libexec - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/brctl $(1)/usr/libexec/bridge-utils-brctl + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/brctl $(1)/usr/libexec/brctl-bridge-utils endef $(eval $(call BuildPackage,bridge)) diff --git a/net/openssh/Makefile b/net/openssh/Makefile index c93ae2794..1782b02f6 100644 --- a/net/openssh/Makefile +++ b/net/openssh/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssh PKG_VERSION:=8.4p1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ @@ -49,9 +49,8 @@ define Package/openssh-client $(call Package/openssh/Default) TITLE+= client ALTERNATIVES:=\ - 200:/usr/bin/ssh:/usr/bin/openssh-ssh \ - 200:/usr/bin/scp:/usr/bin/openssh-scp \ - + 200:/usr/bin/ssh:/usr/libexec/ssh-openssh \ + 200:/usr/bin/scp:/usr/libexec/scp-openssh endef define Package/openssh-client/description @@ -197,9 +196,9 @@ define Package/openssh-client/install $(INSTALL_DIR) $(1)/etc/ssh chmod 0700 $(1)/etc/ssh $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/openssh-ssh - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/openssh-scp + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/libexec/ssh-openssh + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/libexec/scp-openssh endef define Package/openssh-client-utils/install diff --git a/net/wget/Makefile b/net/wget/Makefile index ffad46109..fd1a2164b 100644 --- a/net/wget/Makefile +++ b/net/wget/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wget PKG_VERSION:=1.20.3 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) @@ -47,7 +47,7 @@ $(call Package/wget/Default) TITLE+= (with SSL support) VARIANT:=ssl PROVIDES+=wget-ssl - ALTERNATIVES:=300:/usr/bin/wget:/usr/bin/wget-ssl + ALTERNATIVES:=300:/usr/bin/wget:/usr/libexec/wget-ssl endef define Package/wget/description @@ -60,7 +60,7 @@ $(call Package/wget/Default) TITLE+= (without SSL support) VARIANT:=nossl PROVIDES+=wget - ALTERNATIVES:=300:/usr/bin/wget:/usr/bin/wget-nossl + ALTERNATIVES:=300:/usr/bin/wget:/usr/libexec/wget-nossl endef define Package/wget-nossl/description @@ -95,13 +95,13 @@ ifeq ($(BUILD_VARIANT),nossl) endif define Package/wget/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/libexec/wget-ssl endef define Package/wget-nossl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/libexec/wget-nossl endef $(eval $(call BuildPackage,wget)) diff --git a/utils/findutils/Makefile b/utils/findutils/Makefile index 25c46ce27..0a5821d90 100644 --- a/utils/findutils/Makefile +++ b/utils/findutils/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=findutils PKG_VERSION:=4.7.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) @@ -49,13 +49,13 @@ endef define Package/findutils-find $(call Package/findutils/Default) TITLE+= - find utility - ALTERNATIVES:=300:/usr/bin/find:/usr/libexec/findutils-find + ALTERNATIVES:=300:/usr/bin/find:/usr/libexec/find-findutils endef define Package/findutils-xargs $(call Package/findutils/Default) TITLE+= - xargs utility - ALTERNATIVES:=300:/usr/bin/xargs:/usr/libexec/findutils-xargs + ALTERNATIVES:=300:/usr/bin/xargs:/usr/libexec/xargs-findutils endef define Package/findutils-locate @@ -74,12 +74,12 @@ endef define Package/findutils-find/install $(INSTALL_DIR) $(1)/usr/libexec - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/find $(1)/usr/libexec/findutils-find + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/find $(1)/usr/libexec/find-findutils endef define Package/findutils-xargs/install $(INSTALL_DIR) $(1)/usr/libexec - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xargs $(1)/usr/libexec/findutils-xargs + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xargs $(1)/usr/libexec/xargs-findutils endef define Package/findutils-locate/install From fc02216ab2a96fdf6a5375d2ffbd5e5be25f7b6a Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Sat, 21 Nov 2020 16:59:59 +0800 Subject: [PATCH 3/3] xz: move alternatives to /usr/libexec Signed-off-by: Huangbin Zhan --- utils/xz/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/xz/Makefile b/utils/xz/Makefile index ca3e2c5ff..5fb7f83fc 100644 --- a/utils/xz/Makefile +++ b/utils/xz/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xz PKG_VERSION:=5.2.5 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/lzmautils @@ -56,7 +56,7 @@ define BuildSubPackage $(call Package/xz/Default) DEPENDS:=xz-utils $(2) TITLE:=$(1) utility from XZ Utils - $(if $(3),ALTERNATIVES:=$(foreach f,$(1) $(3),300:/usr/bin/$(f):/usr/bin/lzmautils-$(1))) + $(if $(3),ALTERNATIVES:=$(foreach f,$(1) $(3),300:/usr/bin/$(f):/usr/libexec/$(1)-lzmautils)) endef define Package/$(1)/description @@ -64,8 +64,8 @@ define BuildSubPackage endef define Package/$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/$(if $(3),lzmautils-$(1)) + $(INSTALL_DIR) $$(1)$(if $(3),/usr/libexec,/usr/bin) + $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)$(if $(3),/usr/libexec/$(1)-lzmautils,/usr/bin/$(1)) endef $$(eval $$(call BuildPackage,$(1)))