commit: aa280b6373af57ead7b1044a5954695eb64c0fa9
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 30 19:09:43 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Apr 30 19:12:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa280b63
sys-fs/zfs: sync changes to rc ebuild
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs/zfs-2.1.0_rc4.ebuild | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/sys-fs/zfs/zfs-2.1.0_rc4.ebuild b/sys-fs/zfs/zfs-2.1.0_rc4.ebuild
index d4e6a719e7d..4292b09c839 100644
--- a/sys-fs/zfs/zfs-2.1.0_rc4.ebuild
+++ b/sys-fs/zfs/zfs-2.1.0_rc4.ebuild
@@ -31,16 +31,16 @@ fi
LICENSE="BSD-2 CDDL MIT"
# just libzfs soname major for now.
# possible candidates: libuutil, libzpool, libnvpair. Those do not provide
stable abi, but are considered.
+# see libsoversion_check() below as well
SLOT="0/5"
-IUSE="custom-cflags debug kernel-builtin libressl minimal nls pam python
+rootfs test-suite static-libs"
+IUSE="custom-cflags debug kernel-builtin minimal nls pam python +rootfs
test-suite static-libs"
DEPEND="
net-libs/libtirpc[static-libs?]
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
virtual/libudev[static-libs(-)?]
- libressl? ( dev-libs/libressl:0=[static-libs?] )
- !libressl? ( dev-libs/openssl:0=[static-libs?] )
+ dev-libs/openssl:0=[static-libs?]
!minimal? ( ${PYTHON_DEPS} )
pam? ( sys-libs/pam )
python? (
@@ -112,8 +112,33 @@ pkg_setup() {
fi
}
+libsoversion_check() {
+
+ local bugurl libzfs_sover
+
bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages"
+
+ libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info'
lib/libzfs/Makefile.am \
+ | grep -Eo '[0-9]+:[0-9]+:[0-9]+')"
+ libzfs_sover="${libzfs_sover%%:*}"
+
+ if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then
+ echo
+ eerror "BUG BUG BUG BUG BUG BUG BUG BUG"
+ eerror "ebuild subslot does not match libzfs soversion!"
+ eerror "libzfs soversion: ${libzfs_sover}"
+ eerror "ebuild value: $(ver_cut 2 ${SLOT})"
+ eerror "This is a bug in the ebuild, please use the following
URL to report it"
+ eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot"
+ echo
+ # we want to abort for releases, but just print a warning for
live ebuild
+ # to keep package installable
+ [[ ${PV} == "9999" ]] || die
+ fi
+}
+
src_prepare() {
default
+ libsoversion_check
if [[ ${PV} == "9999" ]]; then
eautoreconf