Skip to content
Permalink
Browse files

treewide: revise library packaging

- Annotate versionless libraries (such as libubox, libuci etc.) with a fixed
  ABI_VERSION resembling the source date of the last incompatible change
- Annotate packages shipping versioned library objects with ABI_VERSION
- Stop shipping unversioned library symlinks for packages with ABI_VERSION

Ref: https://openwrt.org/docs/guide-developer/package-policies#shared_libraries
Ref: https://github.com/KanjiMonster/maintainer-tools/blob/master/check-abi-versions.pl
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  • Loading branch information...
jow- committed Jan 22, 2019
1 parent 6055879 commit 0e70f69a35fd79be781c859c12487b626e243e96
Showing with 126 additions and 86 deletions.
  1. +5 −4 package/libs/elfutils/Makefile
  2. +3 −2 package/libs/gettext-full/Makefile
  3. +2 −1 package/libs/gmp/Makefile
  4. +3 −2 package/libs/libbsd/Makefile
  5. +3 −2 package/libs/libconfig/Makefile
  6. +2 −1 package/libs/libevent2/Makefile
  7. +5 −3 package/libs/libiconv-full/Makefile
  8. +2 −1 package/libs/libjson-c/Makefile
  9. +2 −1 package/libs/libmnl/Makefile
  10. +2 −1 package/libs/libnetfilter-conntrack/Makefile
  11. +2 −1 package/libs/libnetfilter-cthelper/Makefile
  12. +2 −1 package/libs/libnetfilter-cttimeout/Makefile
  13. +2 −1 package/libs/libnetfilter-log/Makefile
  14. +2 −1 package/libs/libnetfilter-queue/Makefile
  15. +2 −1 package/libs/libnfnetlink/Makefile
  16. +2 −1 package/libs/libnftnl/Makefile
  17. +6 −9 package/libs/libnl/Makefile
  18. +3 −2 package/libs/libpcap/Makefile
  19. +2 −1 package/libs/libroxml/Makefile
  20. +2 −1 package/libs/libtool/Makefile
  21. +3 −2 package/libs/libunwind/Makefile
  22. +2 −1 package/libs/libusb-compat/Makefile
  23. +3 −2 package/libs/libusb/Makefile
  24. +3 −2 package/libs/lzo/Makefile
  25. +2 −2 package/libs/mbedtls/Makefile
  26. +2 −1 package/libs/nettle/Makefile
  27. +3 −2 package/libs/nghttp2/Makefile
  28. +2 −1 package/libs/popt/Makefile
  29. +3 −2 package/libs/sysfsutils/Makefile
  30. +3 −0 package/libs/toolchain/Makefile
  31. +3 −3 package/libs/wolfssl/Makefile
  32. +2 −1 package/network/utils/curl/Makefile
  33. +3 −2 package/network/utils/dante/Makefile
  34. +3 −2 package/network/utils/ipset/Makefile
  35. +5 −5 package/network/utils/iptables/Makefile
  36. +2 −1 package/network/utils/wireless-tools/Makefile
  37. +2 −1 package/system/uci/Makefile
  38. +2 −1 package/utils/bzip2/Makefile
  39. +6 −3 package/utils/e2fsprogs/Makefile
  40. +3 −2 package/utils/f2fs-tools/Makefile
  41. +2 −1 package/utils/fuse/Makefile
  42. +2 −1 package/utils/lua/Makefile
  43. +11 −11 package/utils/util-linux/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=elfutils
PKG_VERSION:=0.175
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
@@ -33,6 +33,7 @@ define Package/elfutils/Default
CATEGORY:=Libraries
TITLE:=ELF manipulation libraries
URL:=https://fedorahosted.org/elfutils/
ABI_VERSION:=1
endef

define Package/libasm
@@ -79,17 +80,17 @@ endef

define Package/libasm/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libasm*.so.* $(1)/usr/lib/
endef

define Package/libdw/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdw*.so.* $(1)/usr/lib/
endef

define Package/libelf1/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelf*.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libasm))
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=gettext-full
PKG_VERSION:=0.19.8.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/gettext
@@ -34,6 +34,7 @@ define Package/libintl-full
CATEGORY:=Libraries
TITLE:=GNU Internationalization library
URL:=http://www.gnu.org/software/gettext/
ABI_VERSION:=8
endef

TARGET_CFLAGS += $(FPIC)
@@ -94,7 +95,7 @@ endef

define Package/libintl-full/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/
endef

$(eval $(call HostBuild))
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=gmp
PKG_VERSION:=6.1.2
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
PKG_SOURCE_URL:=@GNU/gmp/
@@ -30,6 +30,7 @@ define Package/libgmp
CATEGORY:=Libraries
TITLE:=GNU multiprecision arithmetic library
URL:=http://gmplib.org/
ABI_VERSION:=10
endef

define Package/libgmp/description
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libbsd
PKG_VERSION:=0.8.7
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31
@@ -19,6 +19,7 @@ define Package/libbsd
SECTION:=libs
CATEGORY:=Libraries
TITLE:=common BSD library
ABI_VERSION:=0
endef

define Package/libbsd/description
@@ -36,7 +37,7 @@ endef

define Package/libbsd/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbsd.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libbsd.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libbsd))
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libconfig
PKG_VERSION:=1.7.2
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://hyperrealm.github.io/libconfig/dist/
@@ -28,6 +28,7 @@ define Package/libconfig
CATEGORY:=Libraries
TITLE:=Configuration File Library
URL:=http://www.hyperrealm.com/libconfig/
ABI_VERSION:=11
endef

define Package/libconfig/description
@@ -53,7 +54,7 @@ endef

define Package/libconfig/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,libconfig))
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libevent2
PKG_VERSION:=2.1.8
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
PKG_SOURCE_URL:=https://github.com/libevent/libevent/releases/download/release-$(PKG_VERSION)-stable
@@ -31,6 +31,7 @@ define Package/libevent2/Default
CATEGORY:=Libraries
TITLE:=Event notification
URL:=http://libevent.org
ABI_VERSION:=6
endef

define Package/libevent2/Default/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libiconv-full
PKG_VERSION:=1.11.1
PKG_RELEASE:=3
PKG_RELEASE:=4

PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>

@@ -34,13 +34,15 @@ define Package/libiconv-full
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
ABI_VERSION:=2
endef

define Package/libcharset
$(call Package/libiconv-full/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= library
ABI_VERSION:=1
endef

define Package/iconv
@@ -77,12 +79,12 @@ endef

define Package/libcharset/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharset.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharset.so.* $(1)/usr/lib/
endef

define Package/libiconv-full/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so.* $(1)/usr/lib/
endef

define Package/iconv/install
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=json-c
PKG_VERSION:=0.12.1
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
@@ -38,6 +38,7 @@ define Package/libjson-c
CATEGORY:=Libraries
TITLE:=javascript object notation
URL:=https://json-c.github.io/json-c/
ABI_VERSION:=2
endef

define Package/libjson-c/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libmnl
PKG_VERSION:=1.0.4
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
@@ -30,6 +30,7 @@ define Package/libmnl
CATEGORY:=Libraries
TITLE:=Minimalistic user-space library for Netlink
URL:=http://www.netfilter.org/projects/libmnl/
ABI_VERSION:=0
endef

define Package/libmnl/description
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libnetfilter_conntrack
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.netfilter.org/libnetfilter_conntrack
@@ -31,6 +31,7 @@ define Package/libnetfilter-conntrack
DEPENDS:=+libnfnetlink +kmod-nf-conntrack-netlink +libmnl
TITLE:=API to the in-kernel connection tracking state table
URL:=http://www.netfilter.org/projects/libnetfilter_conntrack/
ABI_VERSION:=3
endef

define Package/libnetfilter-conntrack/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnetfilter_cthelper
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
@@ -30,6 +30,7 @@ define Package/libnetfilter-cthelper
DEPENDS:=+libmnl
TITLE:=API to the in-kernel connection tracking helper infrastructure
URL:=http://www.netfilter.org/projects/libnetfilter_cthelper/
ABI_VERSION:=0
endef

define Package/libnetfilter-cthelper/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnetfilter_cttimeout
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
@@ -30,6 +30,7 @@ define Package/libnetfilter-cttimeout
DEPENDS:=+libmnl
TITLE:=API to the in-kernel connection tracking timeout infrastructure
URL:=http://www.netfilter.org/projects/libnetfilter_cttimeout/
ABI_VERSION:=1
endef

define Package/libnetfilter-cttimeout/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnetfilter_log
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
@@ -31,6 +31,7 @@ define Package/libnetfilter-log
DEPENDS:=+libnfnetlink +kmod-nfnetlink-log +libmnl
TITLE:=API to receive to-be-logged packets from the kernel nfnetlink_log subsystem
URL:=http://www.netfilter.org/projects/libnetfilter_log/
ABI_VERSION:=1
endef

define Package/libnetfilter-log/description
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libnetfilter_queue
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://git.netfilter.org/libnetfilter_queue
@@ -29,6 +29,7 @@ define Package/libnetfilter-queue
DEPENDS:=+libmnl +libnfnetlink
TITLE:=API to the in-kernel connection tracking queue infrastructure
URL:=http://www.netfilter.org/projects/libnetfilter_queue/
ABI_VERSION:=1
endef

define Package/libnetfilter-queue/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnfnetlink
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
@@ -30,6 +30,7 @@ define Package/libnfnetlink
CATEGORY:=Libraries
TITLE:=A low-level library for netfilter related kernel/userspace communication
URL:=http://netfilter.org/projects/libnfnetlink/
ABI_VERSION:=0
endef

define Package/libnfnetlink/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnftnl
PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
@@ -31,6 +31,7 @@ define Package/libnftnl
DEPENDS:=+libmnl
TITLE:=Low-level netlink library for the nf_tables subsystem
URL:=http://www.netfilter.org/projects/libnftnl
ABI_VERSION:=7
endef

define Package/libnftnl/description
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libnl
PKG_VERSION:=3.4.0
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl3_4_0
@@ -25,6 +25,7 @@ define Package/libnl/default
SECTION:=libs
CATEGORY:=Libraries
URL:=http://www.infradead.org/~tgr/libnl/
ABI_VERSION:=200
endef

define Package/libnl-core
@@ -98,26 +99,22 @@ endef

define Package/libnl-core/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so.* $(1)/usr/lib/
endef

define Package/libnl-genl/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so.* $(1)/usr/lib/
endef

define Package/libnl-route/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so.* $(1)/usr/lib/
endef

define Package/libnl-nf/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so.* $(1)/usr/lib/
endef

define Package/libnl/install

0 comments on commit 0e70f69

Please sign in to comment.
You can’t perform that action at this time.