diff options
Diffstat (limited to 'net/nbdkit')
| -rw-r--r-- | net/nbdkit/Makefile | 85 | ||||
| -rw-r--r-- | net/nbdkit/distinfo | 6 | ||||
| -rw-r--r-- | net/nbdkit/files/nbdkit.in | 136 | ||||
| -rw-r--r-- | net/nbdkit/files/patch-configure | 56 | ||||
| -rw-r--r-- | net/nbdkit/pkg-plist | 107 |
5 files changed, 288 insertions, 102 deletions
diff --git a/net/nbdkit/Makefile b/net/nbdkit/Makefile index 7a95fab02998..d6fe1b73312f 100644 --- a/net/nbdkit/Makefile +++ b/net/nbdkit/Makefile @@ -1,71 +1,74 @@ PORTNAME= nbdkit -PORTVERSION= 1.20.4 -PORTREVISION= 2 +PORTVERSION= 1.44.4 CATEGORIES= net # XXX Although nbdkit uses github for its homepage, the release tarballs served # by github haven't been through autoconf. So we must download the sources # from libguestfs.org instead. MASTER_SITES= http://download.libguestfs.org/${PORTNAME}/${PORTVERSION:R}-stable/ -MAINTAINER= asomers@FreeBSD.org +MAINTAINER= dtxdf@FreeBSD.org COMMENT= Network Block Device server toolkit with stable ABI and permissive license -WWW= https://github.com/libguestfs/nbdkit +WWW= https://gitlab.com/nbdkit/nbdkit LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= bash:shells/bash \ - bash-completion>0:shells/bash-completion +BUILD_DEPENDS= bash-completion>0:shells/bash-completion \ + bash:shells/bash USES= compiler:c11 cpe gmake libtool pkgconfig CPE_VENDOR= nbdkit_project +USE_LDCONFIG= yes +USE_RC_SUBR= ${PORTNAME} -GNU_CONFIGURE= yes +GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share -INSTALL_TARGET= install-strip -TEST_TARGET= check - # Rust consumers will download the Rust plugin from crates.io CONFIGURE_ARGS+= --disable-rust # These libraries does not exist on ports -CONFIGURE_ARGS+= --without-libnbd -CONFIGURE_ARGS+= --without-libguestfs +CONFIGURE_ARGS+= --without-libguestfs \ + --without-libnbd # We could theoretically build these other plugins, if anybody cares to. -CONFIGURE_ARGS+= --disable-ocaml -CONFIGURE_ARGS+= --disable-tcl -CONFIGURE_ARGS+= --disable-lua -CONFIGURE_ARGS+= --disable-golang -CONFIGURE_ARGS+= --disable-vddk -CONFIGURE_ARGS+= --without-ext2 -CONFIGURE_ARGS+= --without-iso -CONFIGURE_ARGS+= --without-linuxdisk -USE_LDCONFIG= yes +CONFIGURE_ARGS+= --disable-golang \ + --disable-linuxdisk \ + --disable-lua \ + --disable-ocaml \ + --disable-tcl \ + --disable-vddk \ + --without-ext2 \ + --without-iso + +INSTALL_TARGET= install-strip +TEST_TARGET= check -OPTIONS_DEFINE= CURL GNUTLS LIBVIRT LZMA MANPAGES PERL PYTHON RUBY SSH ZLIB -GNUTLS_BUILD_DEPENDS= gnutls>0:security/gnutls -GNUTLS_RUN_DEPENDS= gnutls>0:security/gnutls +OPTIONS_DEFINE= CURL GNUTLS LIBVIRT LZMA MANPAGES PERL PYTHON RUBY SSH ZLIB \ + ZSTD OPTIONS_DEFAULT= GNUTLS MANPAGES OPTIONS_SUB= yes -CURL_BUILD_DEPENDS+= curl:ftp/curl -CURL_CONFIGURE_WITH= curl -CURL_RUN_DEPENDS+= curl:ftp/curl -LIBVIRT_CONFIGURE_WITH= libvirt -LIBVIRT_LIB_DEPENDS= libvirt.so:devel/libvirt -LZMA_CONFIGURE_WITH= liblzma -LZMA_LIB_DEPENDS= liblzma.so:archivers/lzmalib -MANPAGES_USE+= perl5=build -MANPAGES_USES+= perl5 -PERL_CONFIGURE_ENABLE= perl -PERL_USE+= perl5 +CURL_BUILD_DEPENDS+= curl:ftp/curl +CURL_RUN_DEPENDS+= curl:ftp/curl +CURL_CONFIGURE_WITH= curl +GNUTLS_BUILD_DEPENDS= gnutls>0:security/gnutls +GNUTLS_RUN_DEPENDS= gnutls>0:security/gnutls +LIBVIRT_LIB_DEPENDS= libvirt.so:devel/libvirt +LIBVIRT_CONFIGURE_WITH= libvirt +LZMA_LIB_DEPENDS= liblzma.so:archivers/lzmalib +LZMA_CONFIGURE_WITH= liblzma +MANPAGES_USES+= perl5 +MANPAGES_USE+= PERL5=build +PERL_USE+= perl5 +PERL_CONFIGURE_ENABLE= perl +PYTHON_USES+= python PYTHON_CONFIGURE_ENABLE= python -PYTHON_USES+= python -RUBY_CONFIGURE_ENABLE= ruby -RUBY_USE+= ruby -SSH_CONFIGURE_WITH= ssh -SSH_LIB_DEPENDS= libssh.so:security/libssh -ZLIB_CONFIGURE_WITH= zlib +RUBY_USE+= ruby +RUBY_CONFIGURE_ENABLE= ruby +SSH_LIB_DEPENDS= libssh.so:security/libssh +SSH_CONFIGURE_WITH= ssh +ZLIB_CONFIGURE_WITH= zlib +ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd +ZSTD_CONFIGURE_WITH= libzstd .include <bsd.port.mk> diff --git a/net/nbdkit/distinfo b/net/nbdkit/distinfo index 5b6fe6bd891d..bfeb3cec6b8c 100644 --- a/net/nbdkit/distinfo +++ b/net/nbdkit/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1592693228 -SHA256 (nbdkit-1.20.4.tar.gz) = 16c7612cf95ea3908bccfe163d71a58dc3bb4d8b018e0bf86833ed9f7858b48b -SIZE (nbdkit-1.20.4.tar.gz) = 1790677 +TIMESTAMP = 1761865788 +SHA256 (nbdkit-1.44.4.tar.gz) = 281d83daf954e04c739a5f29d10e5440de69e9009654a2935aee7cbf3aebca91 +SIZE (nbdkit-1.44.4.tar.gz) = 2659658 diff --git a/net/nbdkit/files/nbdkit.in b/net/nbdkit/files/nbdkit.in new file mode 100644 index 000000000000..3adcbb0e772f --- /dev/null +++ b/net/nbdkit/files/nbdkit.in @@ -0,0 +1,136 @@ +#!/bin/sh + +# PROVIDE: nbdkit +# REQUIRE: NETWORKING +# +# Configuration settings for nbdkit in /etc/rc.conf: +# +# nbdkit_enable (bool): Enable nbdkit. (default=NO) +# nbdkit_flags (str): Arguments used by all profiles. +# nbdkit_profiles (list): Profiles. +# nbdkit_<profile>_flags (str): Per profile arguments. + +. /etc/rc.subr + +name="nbdkit" +desc="Network Block Device server toolkit with stable ABI and permissive license" +rcvar="${name}_enable" +start_precmd="nbdkit_prestart" +start_cmd="nbdkit_start" +stop_cmd="nbdkit_stop" +restart_cmd="nbdkit_restart" +status_cmd="nbdkit_status" +nbdkit_bin="%%PREFIX%%/sbin/${name}" +sig_stop=SIGTERM +pid_directory="/var/run/${name}" + +load_rc_config $name + +: ${nbdkit_enable:="NO"} + +nbdkit_check_pidfile() +{ + local profile + profile="$1" + + local pidfile + pidfile="${pid_directory}/${profile}.pid" + + local rc_pid + rc_pid=$(check_pidfile "${pidfile}" "${nbdkit_bin}") + + echo "${rc_pid}" +} + +nbdkit_prestart() +{ + if [ ! -d "${pid_directory}" ]; then + mkdir -p -- "${pid_directory}" + fi +} + +nbdkit_start() +{ + local profile + profile="$1" + + local rc_pid + rc_pid=$(nbdkit_check_pidfile "${profile}") + + if [ -n "${rc_pid}" ]; then + echo 1>&2 "nbdkit profile '${profile}' already running? (pid=${rc_pid})" + return 1 + fi + + startmsg "Starting nbdkit profile '${profile}'." + + local flags + + eval flags="\${nbdkit_${profile}_flags}" + + local pidfile + pidfile="${pid_directory}/${profile}.pid" + + eval "${nbdkit_bin}" --pidfile "${pidfile}" ${nbdkit_flags} ${flags} +} + +nbdkit_stop() +{ + local profile + profile="$1" + + local rc_pid + rc_pid=$(nbdkit_check_pidfile "${profile}") + + local pidfile + pidfile="${pid_directory}/${profile}.pid" + + if [ -z "${rc_pid}" ]; then + echo 1>&2 "nbdkit profile '${profile}' not running? (check ${pidfile})" + return 1 + fi + + echo "Stopping nbdkit profile '${profile}'." + + kill -${sig_stop} "${rc_pid}" + wait_for_pids "${rc_pid}" +} + +nbdkit_restart() +{ + nbdkit_stop "$1" + nbdkit_start "$1" +} + +nbdkit_status() +{ + local profile + profile="$1" + + local rc_pid + rc_pid=$(nbdkit_check_pidfile "${profile}") + + if [ -n "${rc_pid}" ]; then + echo "nbdkit profile '${profile}' is running as pid ${rc_pid}" + else + echo "nbdkit profile '${profile}' is not running." + fi +} + +cmd="$1" + +if [ $# -gt 0 ]; then + shift +fi + +if [ -n "$1" ]; then + nbdkit_profiles="$1" +fi + +if [ -z "${nbdkit_profiles}" ]; then + warn "No profiles are configured, configure one to make this rc script useful!" +fi + +for profile in ${nbdkit_profiles}; do + run_rc_command "${cmd}" "${profile}" +done diff --git a/net/nbdkit/files/patch-configure b/net/nbdkit/files/patch-configure deleted file mode 100644 index 15d66aa2d192..000000000000 --- a/net/nbdkit/files/patch-configure +++ /dev/null @@ -1,56 +0,0 @@ ---- configure.orig 2020-05-02 09:04:50 UTC -+++ configure -@@ -911,6 +911,7 @@ enable_largefile - enable_gcc_warnings - with_iconv - with_tls_priority -+with_linuxdisk - enable_valgrind - enable_libfuzzer - enable_plugins -@@ -1645,6 +1646,7 @@ Optional Packages: - compiler's sysroot if not specified). - --without-iconv don't try to link against iconv [default=check] - --with-tls-priority default TLS session priority string [default=NORMAL] -+ --without-linuxdisk disable linuxdisk plugin [default=check] - --without-curl disable curl plugin [default=check] - --without-ssh disable ssh plugin [default=check] - --without-iso disable iso plugin [default=check] -@@ -18598,20 +18600,32 @@ done - - fi - -+ -+# Check whether --with-linuxdisk was given. -+if test "${with_linuxdisk+set}" = set; then : -+ withval=$with_linuxdisk; -+else -+ with_linuxdisk=check -+fi -+ - mke2fs_with_d=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mke2fs supporting the -d option" >&5 -+if test "$with_linuxdisk" != "no"; then : -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mke2fs supporting the -d option" >&5 - $as_echo_n "checking for mke2fs supporting the -d option... " >&6; } --if mke2fs -V >/dev/null 2>&1; then : -+ if mke2fs -V >/dev/null 2>&1; then : - -- if LANG=C mke2fs -d 2>&1 | grep -sq "option requires an argument"; then : -+ if LANG=C mke2fs -d 2>&1 | grep -sq "option requires an argument"; then : - -- mke2fs_with_d=yes -+ mke2fs_with_d=yes - - fi - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mke2fs_with_d" >&5 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mke2fs_with_d" >&5 - $as_echo "$mke2fs_with_d" >&6; } -+ -+fi - if test "x$mke2fs_with_d" = "xyes"; then - HAVE_MKE2FS_WITH_D_TRUE= - HAVE_MKE2FS_WITH_D_FALSE='#' diff --git a/net/nbdkit/pkg-plist b/net/nbdkit/pkg-plist index c379f3ab37c4..0a4abbe09224 100644 --- a/net/nbdkit/pkg-plist +++ b/net/nbdkit/pkg-plist @@ -51,10 +51,35 @@ lib/nbdkit/plugins/nbdkit-random-plugin.so lib/nbdkit/plugins/nbdkit-sh-plugin.so lib/nbdkit/plugins/nbdkit-split-plugin.so %%SSH%%lib/nbdkit/plugins/nbdkit-ssh-plugin.so -lib/nbdkit/plugins/nbdkit-streaming-plugin.so %%PERL%%lib/nbdkit/plugins/nbdkit-tar-plugin lib/nbdkit/plugins/nbdkit-tmpdisk-plugin.so lib/nbdkit/plugins/nbdkit-zero-plugin.so +lib/nbdkit/filters/nbdkit-blocksize-policy-filter.so +lib/nbdkit/filters/nbdkit-checkwrite-filter.so +lib/nbdkit/filters/nbdkit-ddrescue-filter.so +lib/nbdkit/filters/nbdkit-evil-filter.so +lib/nbdkit/filters/nbdkit-exitwhen-filter.so +lib/nbdkit/filters/nbdkit-exportname-filter.so +lib/nbdkit/filters/nbdkit-luks-filter.so +lib/nbdkit/filters/nbdkit-multi-conn-filter.so +lib/nbdkit/filters/nbdkit-openonce-filter.so +lib/nbdkit/filters/nbdkit-pause-filter.so +lib/nbdkit/filters/nbdkit-protect-filter.so +lib/nbdkit/filters/nbdkit-qcow2dec-filter.so +lib/nbdkit/filters/nbdkit-readonly-filter.so +lib/nbdkit/filters/nbdkit-retry-request-filter.so +lib/nbdkit/filters/nbdkit-rotational-filter.so +lib/nbdkit/filters/nbdkit-scan-filter.so +lib/nbdkit/filters/nbdkit-spinning-filter.so +lib/nbdkit/filters/nbdkit-swab-filter.so +lib/nbdkit/filters/nbdkit-tar-filter.so +lib/nbdkit/filters/nbdkit-time-limit-filter.so +lib/nbdkit/filters/nbdkit-tls-fallback-filter.so +lib/nbdkit/plugins/nbdkit-cc-plugin.so +lib/nbdkit/plugins/nbdkit-cdi-plugin.so +lib/nbdkit/plugins/nbdkit-ondemand-plugin.so +lib/nbdkit/plugins/nbdkit-ones-plugin.so +lib/nbdkit/plugins/nbdkit-sparse-random-plugin.so libdata/pkgconfig/nbdkit.pc sbin/nbdkit share/bash-completion/completions/nbdkit @@ -116,7 +141,6 @@ share/bash-completion/completions/nbdkit %%MANPAGES%%share/man/man1/nbdkit-split-plugin.1.gz %%MANPAGES%%%%SSH%%share/man/man1/nbdkit-ssh-plugin.1.gz %%MANPAGES%%share/man/man1/nbdkit-stats-filter.1.gz -%%MANPAGES%%share/man/man1/nbdkit-streaming-plugin.1.gz %%MANPAGES%%%%PERL%%share/man/man1/nbdkit-tar-plugin.1.gz %%MANPAGES%%share/man/man1/nbdkit-tls.1.gz %%MANPAGES%%share/man/man1/nbdkit-tmpdisk-plugin.1.gz @@ -129,3 +153,82 @@ share/bash-completion/completions/nbdkit %%MANPAGES%%share/man/man3/nbdkit-plugin.3.gz %%MANPAGES%%%%PYTHON%%share/man/man3/nbdkit-python-plugin.3.gz %%MANPAGES%%share/man/man3/nbdkit-sh-plugin.3.gz +%%MANPAGES%%share/man/man1/nbdkit-blocksize-policy-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-cdi-plugin.1.gz +%%MANPAGES%%share/man/man1/nbdkit-checkwrite-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-client.1.gz +%%MANPAGES%%share/man/man1/nbdkit-ddrescue-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-evil-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-exitwhen-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-exportname-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-luks-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-multi-conn-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-ondemand-plugin.1.gz +%%MANPAGES%%share/man/man1/nbdkit-ones-plugin.1.gz +%%MANPAGES%%share/man/man1/nbdkit-openonce-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-pause-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-protect-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-qcow2dec-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-readonly-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.22.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.24.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.26.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.28.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.30.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.32.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.34.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.36.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.38.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.40.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.42.1.gz +%%MANPAGES%%share/man/man1/nbdkit-release-notes-1.44.1.gz +%%MANPAGES%%share/man/man1/nbdkit-retry-request-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-rotational-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-scan-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-sparse-random-plugin.1.gz +%%MANPAGES%%share/man/man1/nbdkit-spinning-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-swab-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-tar-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-time-limit-filter.1.gz +%%MANPAGES%%share/man/man1/nbdkit-tls-fallback-filter.1.gz +%%MANPAGES%%share/man/man3/nbdkit-cc-plugin.3.gz +%%MANPAGES%%share/man/man3/nbdkit-tracing.3.gz +%%MANPAGES%%share/man/man3/nbdkit_absolute_path.3.gz +%%MANPAGES%%share/man/man3/nbdkit_debug.3.gz +%%MANPAGES%%share/man/man3/nbdkit_disconnect.3.gz +%%MANPAGES%%share/man/man3/nbdkit_error.3.gz +%%MANPAGES%%share/man/man3/nbdkit_export_name.3.gz +%%MANPAGES%%share/man/man3/nbdkit_is_tls.3.gz +%%MANPAGES%%share/man/man3/nbdkit_nanosleep.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_bool.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_delay.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_int.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_int16_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_int32_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_int64_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_int8_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_probability.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_size.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_uint16_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_uint32_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_uint64_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_uint8_t.3.gz +%%MANPAGES%%share/man/man3/nbdkit_parse_unsigned.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_gid.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_name.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_pid.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_security_context.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_tls_dn.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_tls_issuer_dn.3.gz +%%MANPAGES%%share/man/man3/nbdkit_peer_uid.3.gz +%%MANPAGES%%share/man/man3/nbdkit_printf_intern.3.gz +%%MANPAGES%%share/man/man3/nbdkit_read_password.3.gz +%%MANPAGES%%share/man/man3/nbdkit_realpath.3.gz +%%MANPAGES%%share/man/man3/nbdkit_set_error.3.gz +%%MANPAGES%%share/man/man3/nbdkit_shutdown.3.gz +%%MANPAGES%%share/man/man3/nbdkit_stdio_safe.3.gz +%%MANPAGES%%share/man/man3/nbdkit_strdup_intern.3.gz +%%MANPAGES%%share/man/man3/nbdkit_strndup_intern.3.gz +%%MANPAGES%%share/man/man3/nbdkit_vdebug.3.gz +%%MANPAGES%%share/man/man3/nbdkit_verror.3.gz +%%MANPAGES%%share/man/man3/nbdkit_vprintf_intern.3.gz |
