diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
| commit | bfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch) | |
| tree | 0d7a74b4463ee387f9cf9368ceb1b757f694f72a /sys-libs/libnbd | |
| parent | f716a9fe6455d39eef01e718aae68dae61c19704 (diff) | |
| download | baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip | |
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'sys-libs/libnbd')
12 files changed, 922 insertions, 0 deletions
diff --git a/sys-libs/libnbd/Manifest b/sys-libs/libnbd/Manifest new file mode 100644 index 000000000000..49eec71ae706 --- /dev/null +++ b/sys-libs/libnbd/Manifest @@ -0,0 +1,4 @@ +DIST libnbd-1.18.1.tar.gz 1482736 BLAKE2B d3f0b2993fa1392df93b0bbc5d63805489ad1a82cf5bcc5eb5c3b5b7e7e6c40095471ab8fc964cc0e5c7a99affa7150f7be38cc16c42f27fc4cdc16bd0ca0359 SHA512 f4262666be55d580550e053355f14f80d352bf869ae7241e9fa032a9b5cd9e027eb89a536871c1206422413fc7ed745da7d612b3e1413f76ec17168705fbf12c +DIST libnbd-1.22.5.tar.gz 1574844 BLAKE2B ab3bdea1774c9aadd2613ac56ada0d8797c75186ec0f84980231f0ad4bf3f71cf4a0f909f160b33b8719c3eee993cf6e7151dddb6a427eeedfa0e605f5e93804 SHA512 5440f1755a4724265336d59af37aaba9e8426821689d045ce307316772ceb3e8d7840838b2a2f378db014e6927f4627fc3f33a58b24519e515af6474d0669bf2 +DIST libnbd-1.23.9.tar.gz 1594098 BLAKE2B af1448d4e071600d3c2e74b77131c00f79a30ac279be2782dc94da91bab16cdd47657cf53522d1ffb022075a0da0b54fd19a4ec86a44e87bfc73fffd0d2a5b1b SHA512 0ff4fa3aea2e841fe22990055e073afa7262781d764c05830a14cec64142d5c859411d6cf593f95c12a0a47eb38b1cd6f4bf969af0e229ccc6dc7b44641ede49 +DIST libnbd-1.24.0.tar.gz 1621956 BLAKE2B c44ff4147a1166a3b165afdd6af85ab415e3d8d27dc27514f5a4cb814b8f6bd60d27a38e445bb4b2050338476daf2a1e691c02c93067c45383b45cfef4a8381f SHA512 db05b606a19b3efb6a53c05b5b7ea96571892b7540fff1f4df0c53d0f82e3817f724fd0aa665597b58a4613545b03d7df6e1ac8f3fa64c7f85e824ca2221f3ae diff --git a/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch b/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch new file mode 100644 index 000000000000..ef4988c62641 --- /dev/null +++ b/sys-libs/libnbd/files/libnbd-1.22.2-Makefile.am-Conditionally-compile-some-SUBDIRS.patch @@ -0,0 +1,79 @@ +From 2934e26841b88604ed1bf23e3728d7b69d018c72 Mon Sep 17 00:00:00 2001 +From: Christopher Byrne <salah.coronya@gmail.com> +Date: Sat, 14 Jun 2025 21:26:24 -0500 +Subject: [PATCH 2/2] Makefile.am: Conditionally compile some SUBDIRS + +Otherwise, the Makefile will try to compile them. The correct machinery +is in configure.ac, so just add the conditions to Makefile.am +--- + Makefile.am | 41 ++++++++++++++++++++++++++++++----------- + 1 file changed, 30 insertions(+), 11 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index f31e067..1d00ebd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -42,30 +42,49 @@ SUBDIRS = \ + common/utils \ + lib \ + docs \ +- examples \ + valgrind \ + . \ + tests \ +- python \ +- sh \ + info \ + copy \ + dump \ +- fuse \ +- ublk \ +- ocaml \ +- ocaml/examples \ +- ocaml/tests \ +- golang \ +- golang/examples \ +- rust \ + interop \ + fuzzing \ + bash-completion \ + $(NULL) + ++if HAVE_FUSE ++SUBDIRS += fuse ++endif ++ ++if HAVE_UBLK ++SUBDIRS += ublk ++endif ++ ++if HAVE_GOLANG ++SUBDIRS += golang ++endif ++ ++if HAVE_OCAML ++SUBDIRS += ocaml ocaml/tests ++endif ++ ++if HAVE_PYTHON ++SUBDIRS += python sh ++endif ++ ++if HAVE_RUST ++SUBDIRS += rust ++endif ++ + if BUILD_EXAMPLES + SUBDIRS += examples ++if HAVE_OCAML ++SUBDIRS += ocaml/examples ++endif ++if HAVE_GOLANG ++SUBDIRS += golang/examples ++endif + endif + + noinst_SCRIPTS = run +-- +2.49.0 + diff --git a/sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch b/sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch new file mode 100644 index 000000000000..6bd9cd09fea5 --- /dev/null +++ b/sys-libs/libnbd/files/libnbd-1.22.2-build-Remove-automagic-compiling-of-examples.patch @@ -0,0 +1,149 @@ +From 53e0ade7f46525e048cea7bd321cdf370800e18a Mon Sep 17 00:00:00 2001 +From: Christopher Byrne <salah.coronya@gmail.com> +Date: Sat, 14 Jun 2025 21:01:17 -0500 +Subject: [PATCH 1/2] build: Remove automagic compiling of examples + +--- + Makefile.am | 4 +++ + configure.ac | 93 +++++++++++++++++++++++++++++----------------------- + 2 files changed, 56 insertions(+), 41 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 129e393..f31e067 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -64,6 +64,10 @@ SUBDIRS = \ + bash-completion \ + $(NULL) + ++if BUILD_EXAMPLES ++SUBDIRS += examples ++endif ++ + noinst_SCRIPTS = run + + # Check no files are missing from EXTRA_DIST rules, and that all +diff --git a/configure.ac b/configure.ac +index 84ec09d..d27a605 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -308,57 +308,67 @@ AS_IF([test "$with_libxml2" != "no"],[ + ]) + AM_CONDITIONAL([HAVE_LIBXML2], [test "x$LIBXML2_LIBS" != "x"]) + ++dnl Examples ++AC_ARG_ENABLE([examples], ++ [AS_HELP_STRING([--disable-examples], ++ [disable building of glib and libev examples @<:@default=check@:>@])], ++ [], ++ [with_examples=check]) ++ ++AS_IF([test "$enable_examples" != "no"],[ + dnl glib2 main loop for examples that interoperate with the glib main loop. +-PKG_CHECK_MODULES([GLIB], [glib-2.0], [ +- printf "glib2 version is "; $PKG_CONFIG --modversion glib-2.0 +- AC_SUBST([GLIB_CFLAGS]) +- AC_SUBST([GLIB_LIBS]) +-],[ +- AC_MSG_WARN([glib2 not found, some examples will not be compiled]) +-]) +-AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"]) ++ PKG_CHECK_MODULES([GLIB], [glib-2.0], [ ++ printf "glib2 version is "; $PKG_CONFIG --modversion glib-2.0 ++ AC_SUBST([GLIB_CFLAGS]) ++ AC_SUBST([GLIB_LIBS]) ++ ], [ ++ AC_MSG_WARN([glib2 not found, some examples will not be compiled]) ++ ]) + + dnl libev support for examples that interoperate with libev event loop. +-PKG_CHECK_MODULES([LIBEV], [libev], [ +- printf "libev version is "; $PKG_CONFIG --modversion libev +- AC_SUBST([LIBEV_CFLAGS]) +- AC_SUBST([LIBEV_LIBS]) +-],[ +- dnl no pkg-config for libev, searching manually: +- AC_CHECK_HEADERS([ev.h], [ +- AC_CHECK_LIB([ev], [ev_time], [ +- AC_SUBST([LIBEV_LIBS], ["-lev"]) +- ], +- [ +- AC_MSG_WARN([libev not found, some examples will not be compiled]) +- ]) +- ],[ +- AC_MSG_WARN([ev.h not found, some examples will not be compiled]) ++ PKG_CHECK_MODULES([LIBEV], [libev], [ ++ printf "libev version is "; $PKG_CONFIG --modversion libev ++ AC_SUBST([LIBEV_CFLAGS]) ++ AC_SUBST([LIBEV_LIBS]) ++ ],[ ++dnl no pkg-config for libev, searching manually: ++ AC_CHECK_HEADERS([ev.h], [ ++ AC_CHECK_LIB([ev], [ev_time], [ ++ AC_SUBST([LIBEV_LIBS], ["-lev"]) ++ ], ++ [ ++ AC_MSG_WARN([libev not found, some examples will not be compiled]) ++ ]) ++ ],[ ++ AC_MSG_WARN([ev.h not found, some examples will not be compiled]) ++ ]) + ]) +-]) + +-AS_IF([test "x$LIBEV_LIBS" != "x"], [ +- old_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2" +- AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules]) +- AC_COMPILE_IFELSE([ +- AC_LANG_PROGRAM([ +- #include <ev.h> +- +- static void cb (struct ev_loop *l, ev_timer *t, int e) { } +- static ev_timer timer; ++ AS_IF([test "x$LIBEV_LIBS" != "x"], [ ++ old_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2" ++ AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules]) ++ AC_COMPILE_IFELSE([ ++ AC_LANG_PROGRAM([ ++ #include <ev.h> ++ ++ static void cb (struct ev_loop *l, ev_timer *t, int e) { } ++ static ev_timer timer; ++ ], [ ++ ev_timer_init (&timer, cb, 0, .1); ++ ]) + ], [ +- ev_timer_init (&timer, cb, 0, .1); ++ AC_MSG_RESULT([yes]) ++ ], [ ++ AC_MSG_RESULT([no]) ++ LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing" + ]) +- ], [ +- AC_MSG_RESULT([yes]) +- ], [ +- AC_MSG_RESULT([no]) +- LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing" ++ CFLAGS="$old_CFLAGS" + ]) +- CFLAGS="$old_CFLAGS" + ]) ++AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"]) + AM_CONDITIONAL([HAVE_LIBEV], [test "x$LIBEV_LIBS" != "x"]) ++AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" != "xno" ]) + + dnl FUSE 3 is optional to build the nbdfuse program. + AC_ARG_ENABLE([fuse], +@@ -378,6 +388,7 @@ AS_IF([test "x$enable_fuse" != "xno"],[ + ]) + AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" != "xno"]) + ++ + dnl libublksrv is optional to build the nbdublk program. + AC_ARG_ENABLE([ublk], + AS_HELP_STRING([--disable-ublk], [disable ublk (nbdublk) support]), +-- +2.49.0 + diff --git a/sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch b/sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch new file mode 100644 index 000000000000..e4f53b1d3b93 --- /dev/null +++ b/sys-libs/libnbd/files/libnbd-1.22.5-which-hunt.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 6c7cae8a..d938f140 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -432,7 +432,7 @@ HEADING([Checking for bash]) + dnl Bash must be at least version 4. If it is too old, fail hard + dnl with a good diagnostic. Note macOS ships an ancient version + dnl of bash (https://gitlab.com/nbdkit/nbdkit/-/issues/21) +-bash=`which bash` ++bash=$(command -v bash) + AC_MSG_CHECKING([for the major version of $bash]) + bash_major=`bash -c 'echo ${BASH_VERSINFO:-0}'` + AC_MSG_RESULT([$bash_major]) diff --git a/sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch b/sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch new file mode 100644 index 000000000000..52ff73660406 --- /dev/null +++ b/sys-libs/libnbd/files/libnbd-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch @@ -0,0 +1,66 @@ +diff --git a/Makefile.am b/Makefile.am +index d587a092..18df2ad1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -42,31 +42,50 @@ SUBDIRS = \ + common/utils \ + lib \ + docs \ +- examples \ + valgrind \ + . \ + tests \ +- python \ +- sh \ + info \ + copy \ + dump \ +- fuse \ + misc \ +- ublk \ +- ocaml \ +- ocaml/examples \ +- ocaml/tests \ +- golang \ +- golang/examples \ +- rust \ + interop \ + fuzzing \ + bash-completion \ + $(NULL) + ++if HAVE_FUSE ++SUBDIRS += fuse ++endif ++ ++if HAVE_UBLK ++SUBDIRS += ublk ++endif ++ ++if HAVE_GOLANG ++SUBDIRS += golang ++endif ++ ++if HAVE_OCAML ++SUBDIRS += ocaml ocaml/tests ++endif ++ ++if HAVE_PYTHON ++SUBDIRS += python sh ++endif ++ ++if HAVE_RUST ++SUBDIRS += rust ++endif ++ + if BUILD_EXAMPLES + SUBDIRS += examples ++if HAVE_OCAML ++SUBDIRS += ocaml/examples ++endif ++if HAVE_GOLANG ++SUBDIRS += golang/examples ++endif + endif + + noinst_SCRIPTS = run diff --git a/sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch b/sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch new file mode 100644 index 000000000000..05f1cdfe52b5 --- /dev/null +++ b/sys-libs/libnbd/files/libnbd-1.24.0-build-Remove-automagic-compiling-of-examples.patch @@ -0,0 +1,136 @@ +diff --git a/Makefile.am b/Makefile.am +index 32213efa..d587a092 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -65,6 +65,10 @@ SUBDIRS = \ + bash-completion \ + $(NULL) + ++if BUILD_EXAMPLES ++SUBDIRS += examples ++endif ++ + noinst_SCRIPTS = run + + # Check no files are missing from EXTRA_DIST rules, and that all +diff --git a/configure.ac b/configure.ac +index 6c7cae8a..920625d6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -327,57 +327,67 @@ AS_IF([test "$with_libxml2" != "no"],[ + ]) + AM_CONDITIONAL([HAVE_LIBXML2], [test "x$LIBXML2_LIBS" != "x"]) + ++dnl Examples ++AC_ARG_ENABLE([examples], ++ [AS_HELP_STRING([--disable-examples], ++ [disable building of glib and libev examples @<:@default=check@:>@])], ++ [], ++ [with_examples=check]) ++ ++AS_IF([test "$enable_examples" != "no"],[ + dnl glib2 main loop for examples that interoperate with the glib main loop. +-PKG_CHECK_MODULES([GLIB], [glib-2.0], [ +- PRINT_PKG_VERSION([glib-2.0]) +- AC_SUBST([GLIB_CFLAGS]) +- AC_SUBST([GLIB_LIBS]) +-],[ +- AC_MSG_WARN([glib2 not found, some examples will not be compiled]) +-]) +-AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"]) ++ PKG_CHECK_MODULES([GLIB], [glib-2.0], [ ++ PRINT_PKG_VERSION([glib-2.0]) ++ AC_SUBST([GLIB_CFLAGS]) ++ AC_SUBST([GLIB_LIBS]) ++ ], [ ++ AC_MSG_WARN([glib2 not found, some examples will not be compiled]) ++ ]) + + dnl libev support for examples that interoperate with libev event loop. +-PKG_CHECK_MODULES([LIBEV], [libev], [ +- PRINT_PKG_VERSION(libev) +- AC_SUBST([LIBEV_CFLAGS]) +- AC_SUBST([LIBEV_LIBS]) +-],[ +- dnl no pkg-config for libev, searching manually: +- AC_CHECK_HEADERS([ev.h], [ +- AC_CHECK_LIB([ev], [ev_time], [ +- AC_SUBST([LIBEV_LIBS], ["-lev"]) +- ], +- [ +- AC_MSG_WARN([libev not found, some examples will not be compiled]) +- ]) +- ],[ +- AC_MSG_WARN([ev.h not found, some examples will not be compiled]) ++ PKG_CHECK_MODULES([LIBEV], [libev], [ ++ PRINT_PKG_VERSION(libev) ++ AC_SUBST([LIBEV_CFLAGS]) ++ AC_SUBST([LIBEV_LIBS]) ++ ],[ ++dnl no pkg-config for libev, searching manually: ++ AC_CHECK_HEADERS([ev.h], [ ++ AC_CHECK_LIB([ev], [ev_time], [ ++ AC_SUBST([LIBEV_LIBS], ["-lev"]) ++ ], ++ [ ++ AC_MSG_WARN([libev not found, some examples will not be compiled]) ++ ]) ++ ],[ ++ AC_MSG_WARN([ev.h not found, some examples will not be compiled]) ++ ]) + ]) +-]) + +-AS_IF([test "x$LIBEV_LIBS" != "x"], [ +- old_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2" +- AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules]) +- AC_COMPILE_IFELSE([ +- AC_LANG_PROGRAM([ +- #include <ev.h> +- +- static void cb (struct ev_loop *l, ev_timer *t, int e) { } +- static ev_timer timer; ++ AS_IF([test "x$LIBEV_LIBS" != "x"], [ ++ old_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS $LIBEV_CFLAGS -Werror=strict-aliasing -O2" ++ AC_MSG_CHECKING([if the compiler is new enough for good aliasing rules]) ++ AC_COMPILE_IFELSE([ ++ AC_LANG_PROGRAM([ ++ #include <ev.h> ++ ++ static void cb (struct ev_loop *l, ev_timer *t, int e) { } ++ static ev_timer timer; ++ ], [ ++ ev_timer_init (&timer, cb, 0, .1); ++ ]) + ], [ +- ev_timer_init (&timer, cb, 0, .1); ++ AC_MSG_RESULT([yes]) ++ ], [ ++ AC_MSG_RESULT([no]) ++ LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing" + ]) +- ], [ +- AC_MSG_RESULT([yes]) +- ], [ +- AC_MSG_RESULT([no]) +- LIBEV_CFLAGS="$LIBEV_CFLAGS -Wno-strict-aliasing" ++ CFLAGS="$old_CFLAGS" + ]) +- CFLAGS="$old_CFLAGS" + ]) ++AM_CONDITIONAL([HAVE_GLIB], [test "x$GLIB_LIBS" != "x"]) + AM_CONDITIONAL([HAVE_LIBEV], [test "x$LIBEV_LIBS" != "x"]) ++AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" != "xno" ]) + + dnl FUSE 3 is optional to build the nbdfuse program. + AC_ARG_ENABLE([fuse], +@@ -397,6 +407,7 @@ AS_IF([test "x$enable_fuse" != "xno"],[ + ]) + AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" != "xno"]) + ++ + dnl libublksrv is optional to build the nbdublk program. + AC_ARG_ENABLE([ublk], + AS_HELP_STRING([--disable-ublk], [disable ublk (nbdublk) support]), diff --git a/sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch b/sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch new file mode 100644 index 000000000000..817d099b1764 --- /dev/null +++ b/sys-libs/libnbd/files/libnbd-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch @@ -0,0 +1,25 @@ +diff --git a/configure.ac b/configure.ac +index 6c7cae8a..dafcf606 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -275,8 +275,6 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[ + [tls_priority=$withval], + [tls_priority=NORMAL]) + AC_MSG_RESULT([$tls_priority]) +- AC_DEFINE_UNQUOTED([TLS_PRIORITY],["$tls_priority"], +- [Default TLS session priority string]) + + # Check for working <gnutls/socket.h>. This is only needed for + # gnutls 3.7.9 and no other version (unfortunately used by Debian +@@ -299,6 +297,11 @@ AS_IF([test "$GNUTLS_LIBS" != ""],[ + LIBS="$old_LIBS" + ]) + ++dnl Define unconditionally because TLS_PRIORITY must be defined to ++dnl compile, even if GNUTLS support isn't enabled ++AC_DEFINE_UNQUOTED([TLS_PRIORITY],["$tls_priority"], ++ [Default TLS session priority string]) ++ + dnl certtool (part of GnuTLS) for testing TLS with certificates. + dnl macOS has its own program called certtool and packages the + dnl GnuTLS tool as "gnutls-certtool". diff --git a/sys-libs/libnbd/libnbd-1.18.1-r3.ebuild b/sys-libs/libnbd/libnbd-1.18.1-r3.ebuild new file mode 100644 index 000000000000..4179d5348ff8 --- /dev/null +++ b/sys-libs/libnbd/libnbd-1.18.1-r3.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +inherit bash-completion-r1 python-single-r1 + +DESCRIPTION="NBD client library in userspace" +HOMEPAGE="https://gitlab.com/nbdkit/libnbd" +SRC_URI="https://download.libguestfs.org/libnbd/$(ver_cut 1-2)-stable/${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="amd64 ~ppc64 ~sparc ~x86" +IUSE="fuse gnutls go ocaml python test" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# libxml2 - URI support +RDEPEND=" + dev-libs/libxml2:= + fuse? ( sys-fs/fuse:3= ) + gnutls? ( net-libs/gnutls:= ) + python? ( ${PYTHON_DEPS} ) + go? ( dev-lang/go ) + ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] ) +" +DEPEND=" + ${RDEPEND} + test? ( + sys-block/nbd[gnutls?] + sys-block/nbdkit[gnutls?] + ) +" +BDEPEND="dev-lang/perl" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +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 +} + +src_configure() { + local myeconfargs=( + $(use_enable fuse) + $(use_enable go golang) + $(use_enable ocaml) + $(use_enable python) + $(use_with gnutls) + --disable-rust # TODO(arsen): security bump takes priority + --with-libxml2 + ) + + export bashcompdir="$(get_bashcompdir)" + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die + use python && python_optimize +} diff --git a/sys-libs/libnbd/libnbd-1.22.5-r1.ebuild b/sys-libs/libnbd/libnbd-1.22.5-r1.ebuild new file mode 100644 index 000000000000..f14ca40be95c --- /dev/null +++ b/sys-libs/libnbd/libnbd-1.22.5-r1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..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" + "${FILESDIR}/${PN}-1.22.5-which-hunt.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 fuse || bashcomp_alias nbdsh nbdfuse + bashcomp_alias nbdsh nbdublk + + use ocaml && strip-lto-bytecode + + find "${ED}" -name '*.la' -delete || die + use python && python_optimize +} diff --git a/sys-libs/libnbd/libnbd-1.23.9-r1.ebuild b/sys-libs/libnbd/libnbd-1.23.9-r1.ebuild new file mode 100644 index 000000000000..3ba76c14ef85 --- /dev/null +++ b/sys-libs/libnbd/libnbd-1.23.9-r1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..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 ~loong 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" + "${FILESDIR}/${PN}-1.22.5-which-hunt.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 fuse || bashcomp_alias nbdsh nbdfuse + bashcomp_alias nbdsh nbdublk + + use ocaml && strip-lto-bytecode + + find "${ED}" -name '*.la' -delete || die + use python && python_optimize +} diff --git a/sys-libs/libnbd/libnbd-1.24.0-r1.ebuild b/sys-libs/libnbd/libnbd-1.24.0-r1.ebuild new file mode 100644 index 000000000000..3c2ace600c8a --- /dev/null +++ b/sys-libs/libnbd/libnbd-1.24.0-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{13..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 ~arm64 ~loong ~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.24.0-build-Remove-automagic-compiling-of-examples.patch" + "${FILESDIR}/${PN}-1.24.0-Makefile.am-Conditionally-compile-some-SUBDIRS.patch" + "${FILESDIR}/${PN}-1.24.0-build-define-TLS_PRIORITY-unconditionally.patch" + "${FILESDIR}/${PN}-1.22.5-which-hunt.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) + --with-bash-completions + --disable-rust + --disable-ublk # Not in portage + --with-libxml2 + ) + + export bashcompdir="$(get_bashcompdir)" + + BASH_COMPLETION_CFLAGS=" " BASH_COMPLETION_LIBS=" "\ + econf "${myeconfargs[@]}" +} + +src_install() { + default + + use fuse || bashcomp_alias nbdsh nbdfuse + bashcomp_alias nbdsh nbdublk + use python || bashcomp_alias nbdsh nbddiscard nbdzero + + use ocaml && strip-lto-bytecode + + find "${ED}" -name '*.la' -delete || die + use python && python_optimize +} diff --git a/sys-libs/libnbd/metadata.xml b/sys-libs/libnbd/metadata.xml new file mode 100644 index 000000000000..67433ebdc158 --- /dev/null +++ b/sys-libs/libnbd/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>arsen@gentoo.org</email> + <name>Arsen Arsenović</name> + </maintainer> + <upstream> + <remote-id type="gitlab">nbdkit/libnbd</remote-id> + </upstream> + <use> + <flag name="fuse"> + Install the <pkg>sys-fs/fuse</pkg> powered nbdfuse. + </flag> + <flag name="go"> + Build bindings for <pkg>dev-lang/go</pkg> + </flag> + </use> +</pkgmetadata> |
