From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 523B613835B for ; Fri, 30 Apr 2021 19:12:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A6364E0877; Fri, 30 Apr 2021 19:12:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5D9F7E0849 for ; Fri, 30 Apr 2021 19:12:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 774EE340D24 for ; Fri, 30 Apr 2021 19:12:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1690272E for ; Fri, 30 Apr 2021 19:12:18 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1619809925.357fcdc0bb7ce13203fb9c55bfe8241475582f88.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/zfs/zfs-9999.ebuild X-VCS-Directories: sys-fs/zfs/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 357fcdc0bb7ce13203fb9c55bfe8241475582f88 X-VCS-Branch: master Date: Fri, 30 Apr 2021 19:12:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f2a46a82-f5e7-40ab-a6ba-dbf8525f2666 X-Archives-Hash: 89b99ed93b34dee5c6a8d786d1f6245b commit: 357fcdc0bb7ce13203fb9c55bfe8241475582f88 Author: Georgy Yakovlev gentoo org> AuthorDate: Fri Apr 30 19:06:46 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Fri Apr 30 19:12:05 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=357fcdc0 sys-fs/zfs: add soversion check function to live ebuild Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev gentoo.org> sys-fs/zfs/zfs-9999.ebuild | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index aefa5901450..4292b09c839 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -31,6 +31,7 @@ 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 minimal nls pam python +rootfs test-suite static-libs" @@ -111,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