treewide: avoid deref symlinks when installing .so
authorYousong Zhou <yszhou4tech@gmail.com>
Thu, 20 Jun 2019 13:25:59 +0000 (13:25 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 21 Jun 2019 01:52:32 +0000 (09:52 +0800)
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 <yszhou4tech@gmail.com>
16 files changed:
libs/libfstrm/Makefile
libs/libnetconf2/Makefile
libs/libre2/Makefile
libs/libtins/Makefile
libs/libuhttpd/Makefile
multimedia/crtmpserver/Makefile
net/gnunet-secushare/Makefile
net/gnunet/Makefile
net/lora-gateway-hal/Makefile
net/pagekitec/Makefile
net/prosody/Makefile
sound/mocp/Makefile
utils/i2c-tools/Makefile
utils/lvm2/Makefile
utils/oath-toolkit/Makefile
utils/procps-ng/Makefile

index 3c0eefb2ef205583e098116854f9942d9356044a..d4fcc5f90ccb964d146963aa2fe59d769c46d9e8 100644 (file)
@@ -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))
index 25f10ea5aa506d3403173ee3fd8fea067b65baf9..6763ec84ba076f27f1368b4bf8529c2846127cb8 100644 (file)
@@ -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 <mislav.novakovic@sartura.hr>
@@ -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/
index fe88d251fb845bbbffb33efa7f8bdb02c98ed606..538e43d1cbd57e7978e17aed989bf278dbedc68a 100644 (file)
@@ -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))
index 8abc6aa46cc4dccb8cc1dacb48b39b9fb3a5e1ca..66e482bf97b237bcea35c5f322d169f824d30df2 100644 (file)
@@ -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 <steven.hessing@gmail.com>
 
@@ -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))
index 1d719b98049e6e10cc63bbcfeaf744b57d1c9fba..12b1d7dc44cf703705f85d9f6136b9774491c613 100644 (file)
@@ -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)
index e6ffcec4ce70baefad22e65db285a61519b77146..0a19c1def346bf7f134c88ddda8be9c718b1464f 100644 (file)
@@ -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 \
index ae98cb7c5ab0c01ea3e262a3d445e0e2d397eb72..cf327488b58341d9e3aa34747baa6963d532d0f8 100644 (file)
@@ -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
index 28ff6faaedc12e4a8ad9fefdc68f8f017ddf18e0..b5910753852c889bbd51ee00439a0565a6935eb7 100644 (file)
@@ -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 \
index d71d181656a1f9f3170709e06262993344acf6b3..80e802b17b4d0fad1b5559c4d623730089300e39 100644 (file)
@@ -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
index 5cb0fcb432221ffaa4b8e06f39a2498caf941bda..58a62b79cc24f02d7723f45c4178fabff650efcd 100644 (file)
@@ -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
index c5c0d89138d91f7d35c06eb5e7941186c17aee09..1720af76d3e10fbe6ec86618226b8db3765a6bfd 100644 (file)
@@ -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
index 8860ce19528d8674bd60415227f4c036c9e78ff4..eec46f9511c53514b07289c0ef2645d996993382 100644 (file)
@@ -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))
index 3e8a2b3d7eaca40eff1557b0e9f3db9dc65a55fb..58c5ff86d5e6a1e7fa849804caa7b5bd4ffa1149 100644 (file)
@@ -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
index 7395c95a502035bed75854b7992f6c997c09294d..f14fd0b689e109de5adfd33c1f9c0f0afdf8dc76 100644 (file)
@@ -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
index 6ab25ce5ecf67f3e02cc9c736bf2ae93f91798b6..84117757d61c8907a9359528d7b36b6d06a8c654 100644 (file)
@@ -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))
index 3f389282598a11079f3ac6a6221213ed1c7409b4..e813f63fb807be70381c66f4955baf03a2413fda 100644 (file)
@@ -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