commit:     2a546881a5bbe6d1ee9bc8a99b2e20b745f74a82
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 23 12:08:59 2025 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Thu Oct 23 12:12:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a546881

sys-libs/libnbd: add 1.22.5

Contains security fix, see:
  https://lists.libguestfs.org/archives/list/guestfs <AT> 
lists.libguestfs.org/thread/YZMBF3SJRWTRVT5L3KWSNHITFTRMQNTT/
... for details

Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 sys-libs/libnbd/Manifest             |   1 +
 sys-libs/libnbd/libnbd-1.22.5.ebuild | 110 +++++++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+)

diff --git a/sys-libs/libnbd/Manifest b/sys-libs/libnbd/Manifest
index 385a1cde3fb1..b47fb475669a 100644
--- a/sys-libs/libnbd/Manifest
+++ b/sys-libs/libnbd/Manifest
@@ -1,3 +1,4 @@
 DIST libnbd-1.18.1.tar.gz 1482736 BLAKE2B 
d3f0b2993fa1392df93b0bbc5d63805489ad1a82cf5bcc5eb5c3b5b7e7e6c40095471ab8fc964cc0e5c7a99affa7150f7be38cc16c42f27fc4cdc16bd0ca0359
 SHA512 
f4262666be55d580550e053355f14f80d352bf869ae7241e9fa032a9b5cd9e027eb89a536871c1206422413fc7ed745da7d612b3e1413f76ec17168705fbf12c
 DIST libnbd-1.22.2.tar.gz 1567641 BLAKE2B 
4758cdb2e85f4b82abf95502ab3a7d687df34ff89e74e69066e2f396218004d5e856a24114558b9cf1d843fc47d0f3499657e749e1837d357080eda63793c1e7
 SHA512 
5ece4cdc41cafefbe27ddaeafc2b6b390b0cf25f38f80c1b10ec2e17ee1dcda92964891faf4abca4c8aa5827c9eec6e0b38162871e8c72b2af8e769287cd603d
+DIST libnbd-1.22.5.tar.gz 1574844 BLAKE2B 
ab3bdea1774c9aadd2613ac56ada0d8797c75186ec0f84980231f0ad4bf3f71cf4a0f909f160b33b8719c3eee993cf6e7151dddb6a427eeedfa0e605f5e93804
 SHA512 
5440f1755a4724265336d59af37aaba9e8426821689d045ce307316772ceb3e8d7840838b2a2f378db014e6927f4627fc3f33a58b24519e515af6474d0669bf2
 DIST libnbd-1.23.4.tar.gz 1578765 BLAKE2B 
5760ef9270c37a3ec8391183951612ea30becd79df6e4fd33719eadf95c823080770f291abe23c02482bfacee7f4f7097baf343c2bbc6ae797a5eb29cb30f51b
 SHA512 
870615431885f6755808a33d287be57ec4b019199daf40a0643d5c6fe4d00d04424a82c55324106f07c96b4004896121654ab545a7c9e05c64728c2fa853f5d4

diff --git a/sys-libs/libnbd/libnbd-1.22.5.ebuild 
b/sys-libs/libnbd/libnbd-1.22.5.ebuild
new file mode 100644
index 000000000000..6ec427c07662
--- /dev/null
+++ b/sys-libs/libnbd/libnbd-1.22.5.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..14} )
+
+inherit autotools bash-completion-r1 dot-a python-single-r1
+
+MY_PV_1="$(ver_cut 1-2)"
+MY_PV_2="$(ver_cut 2)"
+[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development"
+
+DESCRIPTION="NBD client library in userspace"
+HOMEPAGE="https://gitlab.com/nbdkit/libnbd";
+SRC_URI="https://download.libguestfs.org/libnbd/${MY_PV_1}-${SD}/${P}.tar.gz";
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~sparc ~x86"
+IUSE="examples fuse gnutls go ocaml python test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+# libxml2 - URI support
+RDEPEND="
+       dev-libs/libxml2
+       examples? (     dev-libs/glib
+                       dev-libs/libev )
+       fuse? ( sys-fs/fuse:3 )
+       gnutls? ( net-libs/gnutls:= )
+       go? ( dev-lang/go )
+       ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
+       python? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+       ${RDEPEND}
+       ocaml? ( dev-ml/findlib )
+       test? ( sys-block/nbdkit[gnutls?]
+               net-libs/gnutls:=[tools]
+               ocaml? ( dev-ml/findlib[ocamlopt] )
+)
+"
+BDEPEND="dev-lang/perl"
+
+PATCHES=(
+       
"${FILESDIR}/${PN}-1.22.2-build-Remove-automagic-compiling-of-examples.patch"
+       
"${FILESDIR}/${PN}-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch"
+)
+
+pkg_setup() {
+       if use python; then
+               python_setup
+       fi
+}
+
+src_prepare() {
+       default
+
+       # Some tests require impossible to provide features, such as fuse.
+       # These are marked by requires_... in the functions.sh shell
+       # library.  Rather than listing these tests, let's list out the
+       # impossible to support features and make them skip.
+       cat <<-EOF >> tests/functions.sh.in || die
+               requires_fuse ()
+               {
+                       requires false
+               }
+       EOF
+
+       # Broken under sandbox.
+       cat <<-EOF > lib/test-fork-safe-execvpe.sh || die
+       #!/bin/sh
+       :
+       EOF
+
+       eautoreconf
+}
+
+src_configure() {
+       # /usr/lib64/ocaml/nbd/libmlnbd.a
+       # /usr/lib64/ocaml/stublibs/dllmlnbd.so
+       use ocaml && lto-guarantee-fat
+
+       local myeconfargs=(
+               $(use_enable examples)
+               $(use_enable fuse)
+               $(use_enable go golang)
+               $(use_enable ocaml)
+               $(use_enable python)
+               $(use_with gnutls)
+               --disable-rust
+               --disable-ublk # Not in portage
+               --with-libxml2
+       )
+
+       export bashcompdir="$(get_bashcompdir)"
+
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       default
+
+       use ocaml && strip-lto-bytecode
+
+       find "${ED}" -name '*.la' -delete || die
+       use python && python_optimize
+}

Reply via email to