Skip to content

Commit

Permalink
treewide: revise library packaging
Browse files Browse the repository at this point in the history
- 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 24, 2019
1 parent 6055879 commit 0e70f69
Show file tree
Hide file tree
Showing 43 changed files with 126 additions and 86 deletions.
9 changes: 5 additions & 4 deletions package/libs/elfutils/Makefile
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand Down
5 changes: 3 additions & 2 deletions package/libs/gettext-full/Makefile
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion package/libs/gmp/Makefile
Expand Up @@ -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/
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions package/libs/libbsd/Makefile
Expand Up @@ -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
Expand All @@ -19,6 +19,7 @@ define Package/libbsd
SECTION:=libs
CATEGORY:=Libraries
TITLE:=common BSD library
ABI_VERSION:=0
endef

define Package/libbsd/description
Expand All @@ -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))
Expand Down
5 changes: 3 additions & 2 deletions package/libs/libconfig/Makefile
Expand Up @@ -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/
Expand All @@ -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
Expand All @@ -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))
3 changes: 2 additions & 1 deletion package/libs/libevent2/Makefile
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions package/libs/libiconv-full/Makefile
Expand Up @@ -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>

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libjson-c/Makefile
Expand Up @@ -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/
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libmnl/Makefile
Expand Up @@ -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:= \
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnetfilter-conntrack/Makefile
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnetfilter-cthelper/Makefile
Expand Up @@ -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:= \
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnetfilter-cttimeout/Makefile
Expand Up @@ -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:= \
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnetfilter-log/Makefile
Expand Up @@ -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:= \
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnetfilter-queue/Makefile
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnfnetlink/Makefile
Expand Up @@ -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:= \
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package/libs/libnftnl/Makefile
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 6 additions & 9 deletions package/libs/libnl/Makefile
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e70f69

Please sign in to comment.