mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
sqlite3: don't install ABI-less library
Don't install the ABI-less library to support potential multiple ABIs
side by side.
Add a matching tests to check the soname and ensure the ABI-less library
is not installed.
Fixes: aebfd49 ("sqlite3: bump to 3.49.1")
Signed-off-by: George Sapkin <george@sapk.in>
This commit is contained in:
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=sqlite
|
PKG_NAME:=sqlite
|
||||||
PKG_VERSION:=3.51.0
|
PKG_VERSION:=3.51.0
|
||||||
PKG_SRC_VERSION:=3510000
|
PKG_SRC_VERSION:=3510000
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_SRC_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_SRC_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://www.sqlite.org/2025/
|
PKG_SOURCE_URL:=https://www.sqlite.org/2025/
|
||||||
@@ -137,7 +137,7 @@ endef
|
|||||||
|
|
||||||
define Package/libsqlite3/install
|
define Package/libsqlite3/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so* $(1)/usr/lib
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.{$(PKG_VERSION),$(ABI_VERSION)} $(1)/usr/lib
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/sqlite3-cli/install
|
define Package/sqlite3-cli/install
|
||||||
|
|||||||
@@ -2,6 +2,44 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
if [ "$1" = 'sqlite3-cli' ]; then
|
case "$PKG_NAME" in
|
||||||
|
libsqlite3)
|
||||||
|
apk add binutils
|
||||||
|
|
||||||
|
readelf_out=$(readelf --dynamic "/usr/lib/libsqlite3.so.$PKG_VERSION")
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "readelf failed for /usr/lib/libsqlite3.so.$PKG_VERSION" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
soname=$(echo "$readelf_out" \
|
||||||
|
| grep -F '(SONAME)' \
|
||||||
|
| sed -E 's/.*\[(.*)\]/\1/')
|
||||||
|
|
||||||
|
if [ -z "$soname" ]; then
|
||||||
|
echo "soname not found in /usr/lib/libsqlite3.so.$PKG_VERSION" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
link_target=$(readlink "/usr/lib/$soname")
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to read soname link /usr/lib/$soname" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
expected_target="libsqlite3.so.$PKG_VERSION"
|
||||||
|
if [ "$link_target" != "$expected_target" ]; then
|
||||||
|
echo "soname link /usr/lib/$soname points to '$link_target', expected '$expected_target'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f '/usr/lib/libsqlite3.so' ]; then
|
||||||
|
echo "/usr/lib/libsqlite3.so shouldn't be installed" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
sqlite3-cli)
|
||||||
sqlite3 -version | grep -F "$PKG_VERSION"
|
sqlite3 -version | grep -F "$PKG_VERSION"
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user