From 9ac5ac81ab2241b7c13c01e8801e0e7d95ebb4eb Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Thu, 20 Jun 2019 13:25:59 +0000 Subject: [PATCH] treewide: avoid deref symlinks when installing .so This change is inspired by commit openwrt/openwrt@38b22b1e ("nghttp2: deduplicate files in libnghttp2") The packages in this commit are identified with the following command grep -rin -E 'INSTALL_(DATA|BIN)' | grep -F '.so' | grep -F '*' Some of them do not have symlinks and are not affected, but the change is still applied for consideration of best practices just in case Signed-off-by: Yousong Zhou --- libs/libfstrm/Makefile | 4 ++-- libs/libnetconf2/Makefile | 4 ++-- libs/libre2/Makefile | 4 ++-- libs/libtins/Makefile | 6 +++--- libs/libuhttpd/Makefile | 6 +++--- multimedia/crtmpserver/Makefile | 4 ++-- net/gnunet-secushare/Makefile | 8 ++++---- net/gnunet/Makefile | 6 +++--- net/lora-gateway-hal/Makefile | 6 +++--- net/pagekitec/Makefile | 4 ++-- net/prosody/Makefile | 6 +++--- sound/mocp/Makefile | 4 ++-- utils/i2c-tools/Makefile | 4 ++-- utils/lvm2/Makefile | 4 ++-- utils/oath-toolkit/Makefile | 4 ++-- utils/procps-ng/Makefile | 4 ++-- 16 files changed, 39 insertions(+), 39 deletions(-) diff --git a/libs/libfstrm/Makefile b/libs/libfstrm/Makefile index 3c0eefb2e..d4fcc5f90 100644 --- a/libs/libfstrm/Makefile +++ b/libs/libfstrm/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libfstrm PKG_VERSION:=0.5.0 -PKG_RELEASE=2 +PKG_RELEASE:=3 PKG_SOURCE:=fstrm-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://dl.farsightsecurity.com/dist/fstrm/ @@ -55,7 +55,7 @@ endef define Package/libfstrm/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfstrm.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libfstrm)) diff --git a/libs/libnetconf2/Makefile b/libs/libnetconf2/Makefile index 25f10ea5a..6763ec84b 100644 --- a/libs/libnetconf2/Makefile +++ b/libs/libnetconf2/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnetconf2 PKG_VERSION:=0.12-r1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=BSD-3-Clause PKG_MAINTAINER:=Mislav Novakovic @@ -51,7 +51,7 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetconf2.so* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/include/libnetconf2 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/include/libnetconf2/* $(1)/usr/include/libnetconf2/ diff --git a/libs/libre2/Makefile b/libs/libre2/Makefile index fe88d251f..538e43d1c 100644 --- a/libs/libre2/Makefile +++ b/libs/libre2/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=re2 PKG_VERSION:=2019-06-01 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/google/re2/tar.gz/$(PKG_VERSION)? @@ -57,7 +57,7 @@ endef define Package/re2/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libre2.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,re2)) diff --git a/libs/libtins/Makefile b/libs/libtins/Makefile index 8abc6aa46..66e482bf9 100644 --- a/libs/libtins/Makefile +++ b/libs/libtins/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libtins PKG_VERSION:=4.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:= Steven Hessing @@ -48,8 +48,8 @@ libtins is a high-level, multiplatform C++ network packet sniffing and crafting endef define Package/libtins/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtins.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libtins)) diff --git a/libs/libuhttpd/Makefile b/libs/libuhttpd/Makefile index 1d719b980..12b1d7dc4 100644 --- a/libs/libuhttpd/Makefile +++ b/libs/libuhttpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libuhttpd PKG_VERSION:=2.2.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) @@ -71,8 +71,8 @@ endif define Package/libuhttpd/default/install $(INSTALL_DIR) $(1)/usr/lib/ $(1)/usr/lib/lua/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuhttpd.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lua/uhttpd.so* $(1)/usr/lib/lua/ endef Package/libuhttpd-nossl/install = $(Package/libuhttpd/default/install) diff --git a/multimedia/crtmpserver/Makefile b/multimedia/crtmpserver/Makefile index e6ffcec4c..0a19c1def 100644 --- a/multimedia/crtmpserver/Makefile +++ b/multimedia/crtmpserver/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=crtmpserver PKG_SOURCE_DATE:=2015-10-04 PKG_SOURCE_VERSION:=b866fffca37c3b967a8878499cd2b91aa2587f34 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/shiretu/crtmpserver/tar.gz/$(PKG_SOURCE_VERSION)? @@ -80,7 +80,7 @@ define Package/crtmpserver/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/lib/crtmpserver - $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/ + $(CP) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/ $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \ $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \ $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \ diff --git a/net/gnunet-secushare/Makefile b/net/gnunet-secushare/Makefile index ae98cb7c5..cf327488b 100644 --- a/net/gnunet-secushare/Makefile +++ b/net/gnunet-secushare/Makefile @@ -5,7 +5,7 @@ PKG_NAME:=gnunet-secushare PKG_SOURCE_VERSION:=81939cb93670efcee8e99884d10d2676b02edba9 PKG_SOURCE_DATE:=20190228 PKG_MIRROR_HASH:=64a0fb7ad6a515559360de71df85dde152f55a60585668f15114bc1f55cf2742 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=https://gnunet.org/git/gnunet-secushare.git PKG_SOURCE_PROTO:=git PKG_LICENSE:=GPL-3.0 @@ -82,21 +82,21 @@ endef define Package/gnunet-secushare-mysql/install $(INSTALL_DIR) $(1)/usr/lib/gnunet - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_mysql.so* $(1)/usr/lib/gnunet/ $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/gnunet-secushare-mysql.defaults $(1)/etc/uci-defaults/gnunet-secushare-mysql endef define Package/gnunet-secushare-pgsql/install $(INSTALL_DIR) $(1)/usr/lib/gnunet - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_postgres.so* $(1)/usr/lib/gnunet/ $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/gnunet-secushare-pgsql.defaults $(1)/etc/uci-defaults/gnunet-secushare-pgsql endef define Package/gnunet-secushare-sqlite/install $(INSTALL_DIR) $(1)/usr/lib/gnunet - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_psycstore_sqlite.so* $(1)/usr/lib/gnunet/ $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/gnunet-secushare-sqlite.defaults $(1)/etc/uci-defaults/gnunet-secushare-sqlite endef diff --git a/net/gnunet/Makefile b/net/gnunet/Makefile index 28ff6faae..b59107538 100644 --- a/net/gnunet/Makefile +++ b/net/gnunet/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnunet PKG_VERSION:=0.11.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/gnunet PKG_HASH:=98e0355ff0627bf88112b3b92a7522e98c0ae6071fc45efda5a33daed28199b3 @@ -99,7 +99,7 @@ define BuildComponent ( if [ "$(PLUGIN_$(1))" ]; then \ $(INSTALL_DIR) $$(1)/usr/lib/gnunet ; \ for plug in $(PLUGIN_$(1)); do \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \ done \ fi ) @@ -144,7 +144,7 @@ define Package/gnunet/install done ) ( for plug in ats_proportional ats2_simple block_dht block_regex block_revocation transport_unix; do \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \ done ) ( for lex in daemon-topology helper-nat-client \ diff --git a/net/lora-gateway-hal/Makefile b/net/lora-gateway-hal/Makefile index d71d18165..80e802b17 100644 --- a/net/lora-gateway-hal/Makefile +++ b/net/lora-gateway-hal/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lora-gateway-hal PKG_VERSION:=5.0.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://codeload.github.com/Lora-net/lora_gateway/tar.gz/v$(PKG_VERSION)? PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -64,7 +64,7 @@ define Build/InstallDev $(CP) $(PKG_BUILD_DIR)/libloragw/inc/loragw_* $(1)/usr/include/libloragw $(CP) $(PKG_BUILD_DIR)/libloragw/config.h $(1)/usr/include/libloragw $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so* $(1)/usr/lib/ $(LN) libloragw.so.0 $(1)/usr/lib/libloragw.so $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_BUILD_DIR)/loragw.pc $(1)/usr/lib/pkgconfig/ @@ -72,7 +72,7 @@ endef define Package/libloragw/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/libloragw/libloragw.so.* $(1)/usr/lib/ endef define Package/libloragw-tests/install diff --git a/net/pagekitec/Makefile b/net/pagekitec/Makefile index 5cb0fcb43..58a62b79c 100644 --- a/net/pagekitec/Makefile +++ b/net/pagekitec/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pagekitec PKG_REV:=0.91.171102 PKG_VERSION:=$(PKG_REV)C -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=Apache-2.0 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -92,7 +92,7 @@ endef define Package/libpagekite/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib endef define Package/pagekitec/install diff --git a/net/prosody/Makefile b/net/prosody/Makefile index c5c0d8913..1720af76d 100644 --- a/net/prosody/Makefile +++ b/net/prosody/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=prosody PKG_VERSION:=0.11.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://prosody.im/downloads/source @@ -104,10 +104,10 @@ define Package/prosody/install $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/websocket/*.lua $(1)/usr/lib/prosody/net/websocket/ $(INSTALL_DIR) $(1)/usr/lib/prosody/util $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/ $(INSTALL_DIR) $(1)/usr/lib/prosody/util/sasl $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.lua $(1)/usr/lib/prosody/util/sasl/ - #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/ + #$(CP) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/ endef define Package/prosody/postinst diff --git a/sound/mocp/Makefile b/sound/mocp/Makefile index 8860ce195..eec46f951 100644 --- a/sound/mocp/Makefile +++ b/sound/mocp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=moc PKG_VERSION:=2.5.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://ftp.daper.net/pub/soft/moc/stable/ @@ -62,7 +62,7 @@ define Package/moc/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mocp $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/lib/moc/decoder_plugins - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins + $(CP) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins endef $(eval $(call BuildPackage,moc)) diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile index 3e8a2b3d7..58c5ff86d 100644 --- a/utils/i2c-tools/Makefile +++ b/utils/i2c-tools/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=i2c-tools PKG_VERSION:=4.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/utils/i2c-tools @@ -114,7 +114,7 @@ PYTHON3_PKG_SETUP_DIR:=py-smbus define Package/libi2c/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/lib/libi2c.so* $(1)/usr/lib/ endef define Package/i2c-tools/install diff --git a/utils/lvm2/Makefile b/utils/lvm2/Makefile index 7395c95a5..f14fd0b68 100644 --- a/utils/lvm2/Makefile +++ b/utils/lvm2/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=LVM2 PKG_VERSION:=2.03.02 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2 @@ -76,7 +76,7 @@ endef define Package/libdevmapper/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib endef define Package/lvm2/install diff --git a/utils/oath-toolkit/Makefile b/utils/oath-toolkit/Makefile index 6ab25ce5e..84117757d 100644 --- a/utils/oath-toolkit/Makefile +++ b/utils/oath-toolkit/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=oath-toolkit PKG_VERSION:=2.6.2 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=oath-toolkit-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SAVANNAH/oath-toolkit @@ -48,7 +48,7 @@ define Package/oath-toolkit/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oathtool $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,oath-toolkit)) diff --git a/utils/procps-ng/Makefile b/utils/procps-ng/Makefile index 3f3892825..e813f63fb 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.15 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/procps-ng @@ -91,7 +91,7 @@ MAKE_FLAGS += \ define Package/procps-ng/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/ endef define BuildPlugin