diff --git a/0001-tests-test-ocaml-debug-hexdump.sh-Fix-test-that-plug.patch b/0001-tests-test-ocaml-debug-hexdump.sh-Fix-test-that-plug.patch new file mode 100644 index 0000000..ab06e22 --- /dev/null +++ b/0001-tests-test-ocaml-debug-hexdump.sh-Fix-test-that-plug.patch @@ -0,0 +1,31 @@ +From 4076ff58512ee98928b1bdb13274466b175e1a97 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 2 Jan 2026 11:59:11 +0000 +Subject: [PATCH] tests/test-ocaml-debug-hexdump.sh: Fix test that plugin was + built + +This is supposed to check that the test plugin was built and skip if +not. However because the 'requires' function call was missing, it +actually failed the test if not built. + +Fixes: commit ec3be5030656a9126abbb0bceeb5a1ecf6898c6a +--- + tests/test-ocaml-debug-hexdump.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test-ocaml-debug-hexdump.sh b/tests/test-ocaml-debug-hexdump.sh +index 5cc71375..3954225e 100755 +--- a/tests/test-ocaml-debug-hexdump.sh ++++ b/tests/test-ocaml-debug-hexdump.sh +@@ -36,7 +36,7 @@ set -x + set -u + + plugin=$abs_top_srcdir/tests/test-ocaml-debug-hexdump-plugin.$SOEXT +-test -x "$plugin" ++requires test -x "$plugin" + + requires_run + requires_nbdsh_uri +-- +2.52.0 + diff --git a/gating.yaml b/gating.yaml index 648918d..2c7ed80 100755 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-9 + - rhel-* decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/nbdkit.fc b/nbdkit.fc new file mode 100644 index 0000000..4877736 --- /dev/null +++ b/nbdkit.fc @@ -0,0 +1,3 @@ +/usr/sbin/nbdkit -- gen_context(system_u:object_r:nbdkit_exec_t,s0) + +/usr/lib/systemd/system/nbdkit.* gen_context(system_u:object_r:nbdkit_unit_file_t,s0) diff --git a/nbdkit.if b/nbdkit.if new file mode 100644 index 0000000..315fead --- /dev/null +++ b/nbdkit.if @@ -0,0 +1,207 @@ +## policy for nbdkit + +######################################## +## +## Execute nbdkit_exec_t in the nbdkit domain. +## +## +## +## Domain allowed to transition. +## +## +# +interface(`nbdkit_domtrans',` + gen_require(` + type nbdkit_t, nbdkit_exec_t; + ') + + corecmd_search_bin($1) + domtrans_pattern($1, nbdkit_exec_t, nbdkit_t) +') + +###################################### +## +## Execute nbdkit in the caller domain. +## +## +## +## Domain allowed access. +## +## +# +interface(`nbdkit_exec',` + gen_require(` + type nbdkit_exec_t; + ') + + corecmd_search_bin($1) + can_exec($1, nbdkit_exec_t) +') + +######################################## +## +## Execute nbdkit in the nbdkit domain, and +## allow the specified role the nbdkit domain. +## +## +## +## Domain allowed to transition +## +## +## +## +## The role to be allowed the nbdkit domain. +## +## +# +interface(`nbdkit_run',` + gen_require(` + type nbdkit_t; + attribute_role nbdkit_roles; + ') + + nbdkit_domtrans($1) + roleattribute $2 nbdkit_roles; +') + +######################################## +## +## Role access for nbdkit +## +## +## +## Role allowed access +## +## +## +## +## User domain for the role +## +## +# +interface(`nbdkit_role',` + gen_require(` + type nbdkit_t; + attribute_role nbdkit_roles; + ') + + roleattribute $1 nbdkit_roles; + + nbdkit_domtrans($2) + + ps_process_pattern($2, nbdkit_t) + allow $2 nbdkit_t:process { signull signal sigkill }; +') + +######################################## +## +## Allow attempts to connect to nbdkit +## with a unix stream socket. +## +## +## +## Domain to not audit. +## +## +# +interface(`nbdkit_stream_connect',` + gen_require(` + type nbdkit_t; + ') + + allow $1 nbdkit_t:unix_stream_socket connectto; +') + +######################################## +## +## Allow nbdkit_exec_t to be an entrypoint +## of the specified domain +## +## +## +## Domain allowed access. +## +## +## +# +interface(`nbdkit_entrypoint',` + gen_require(` + type nbdkit_exec_t; + ') + allow $1 nbdkit_exec_t:file entrypoint; +') + +# ---------------------------------------------------------------------- +# RWMJ: See: +# https://issues.redhat.com/browse/RHEL-5174?focusedId=23387259&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-23387259 +# Remove this when virt.if gets updated. + +######################################## +# +# Interface compatibility blocks +# +# The following definitions ensure compatibility with distribution policy +# versions that do not contain given interfaces (epel, or older Fedora +# releases). +# Each block tests for existence of given interface and defines it if needed. +# + +######################################## +## +## Read and write to svirt_image dirs. +## +## +## +## Domain allowed access. +## +## +# +ifndef(`virt_rw_svirt_image_dirs',` + interface(`virt_rw_svirt_image_dirs',` + gen_require(` + type svirt_image_t; + ') + + allow $1 svirt_image_t:dir rw_dir_perms; + ') +') + +######################################## +## +## Create svirt_image sock_files. +## +## +## +## Domain allowed access. +## +## +# +ifndef(`virt_create_svirt_image_sock_files',` + interface(`virt_create_svirt_image_sock_files',` + gen_require(` + type svirt_image_t; + ') + + allow $1 svirt_image_t:sock_file create_sock_file_perms; + ') +') + +######################################## +## +## Read and write virtlogd pipes. +## +## +## +## Domain allowed access. +## +## +# +ifndef(`virtlogd_rw_pipes',` + interface(`virtlogd_rw_pipes',` + gen_require(` + type virtlogd_t; + ') + + allow $1 virtlogd_t:fifo_file rw_fifo_file_perms; + ') +') diff --git a/nbdkit.spec b/nbdkit.spec index 4aa227e..c306b50 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -1,4 +1,3 @@ -%undefine _package_note_flags %global _hardened_build 1 %ifarch %{kernel_arches} @@ -22,6 +21,20 @@ %global have_ocaml 1 %endif +# libblkio was broken on i686: https://bugzilla.redhat.com/2229372 +# but somehow "fixed itself", keep an eye on it. +%global have_blkio 1 + +# Enable mingw subpackage on Fedora only. +%if 0%{?fedora} +%global have_mingw 1 +%endif + +# Enable nbdkit-selinux package. +%global with_selinux 1 +%global modulename nbdkit +%global selinuxtype targeted + # Architectures where we run the complete test suite including # the libguestfs tests. # @@ -34,29 +47,18 @@ # it as a bug and add it to this list. %global broken_test_arches NONE -%if 0%{?rhel} == 7 -# On RHEL 7, nothing in the virt stack is shipped on aarch64 and -# libguestfs was not shipped on POWER (fixed in 7.5). We could in -# theory make all of this work by having lots more conditionals, but -# for now limit this package to x86_64 on RHEL. -ExclusiveArch: x86_64 -%endif - # If we should verify tarball signature with GPGv2. %global verify_tarball_signature 1 -# If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} - # The source directory. -%global source_directory 1.32-stable +%global source_directory 1.47-development Name: nbdkit -Version: 1.32.1 +Version: 1.47.1 Release: 1%{?dist} Summary: NBD server -License: BSD +License: BSD-3-Clause URL: https://gitlab.com/nbdkit/nbdkit %if 0%{?rhel} >= 8 @@ -79,31 +81,61 @@ Source3: copy-patches.sh Source4: nbdkit.attr Source5: nbdkit-find-provides -BuildRequires: make -%if 0%{patches_touch_autotools} -BuildRequires: autoconf, automake, libtool -%endif +# For nbdkit-selinux package: +Source6: %{modulename}.te +Source7: %{modulename}.if +Source8: %{modulename}.fc +# Fix for broken test, upstream in nbdkit >= 1.47.2 +Patch: 0001-tests-test-ocaml-debug-hexdump.sh-Fix-test-that-plug.patch + +# For applying the patches: +BuildRequires: git + +# For rebuilding autoconf cruft: +BuildRequires: autoconf, automake, libtool + +BuildRequires: make +BuildRequires: libxcrypt-devel BuildRequires: gcc, gcc-c++ BuildRequires: %{_bindir}/pod2man -BuildRequires: gnutls-devel -BuildRequires: libselinux-devel +BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(libselinux) %if !0%{?rhel} && 0%{?have_libguestfs} -BuildRequires: libguestfs-devel +BuildRequires: pkgconfig(libguestfs) %endif -BuildRequires: libvirt-devel -BuildRequires: xz-devel -BuildRequires: zlib-devel -BuildRequires: libzstd-devel -BuildRequires: libcurl-devel -BuildRequires: libnbd-devel >= 1.3.11 -BuildRequires: libssh-devel -BuildRequires: e2fsprogs, e2fsprogs-devel +BuildRequires: pkgconfig(libvirt) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) +%if !0%{?rhel} +BuildRequires: pkgconfig(zlib-ng) +%endif +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libnbd) +%if !0%{?rhel} +# We require libnfs >= 6, but the internal version is >= 16 +BuildRequires: pkgconfig(libnfs) >= 16 +%endif +BuildRequires: pkgconfig(libssh) +BuildRequires: e2fsprogs +BuildRequires: pkgconfig(ext2fs) +BuildRequires: pkgconfig(com_err) %if !0%{?rhel} BuildRequires: xorriso -BuildRequires: rb_libtorrent-devel +BuildRequires: pkgconfig(libtorrent-rasterbar) +%endif +%if 0%{?have_blkio} +BuildRequires: pkgconfig(blkio) +%endif +%if !0%{?rhel} +BuildRequires: pkgconfig(OpenCL) %endif BuildRequires: bash-completion +%if 0%{?fedora} || 0%{?rhel} >= 11 +BuildRequires: bash-completion-devel +%endif BuildRequires: perl-devel BuildRequires: perl(ExtUtils::Embed) %if 0%{?rhel} == 8 @@ -119,46 +151,77 @@ BuildRequires: python3-boto3 BuildRequires: ocaml >= 4.03 BuildRequires: ocaml-ocamldoc %endif -BuildRequires: ruby-devel -BuildRequires: tcl-devel -BuildRequires: lua-devel +BuildRequires: pkgconfig(tcl) +BuildRequires: pkgconfig(lua) %endif %if 0%{verify_tarball_signature} BuildRequires: gnupg2 %endif # Only for running the test suite: -BuildRequires: %{_bindir}/bc -BuildRequires: %{_bindir}/certtool -BuildRequires: %{_bindir}/cut +BuildRequires: /usr/bin/bc +BuildRequires: /usr/bin/certtool +BuildRequires: /usr/bin/cut BuildRequires: expect -BuildRequires: %{_bindir}/hexdump -BuildRequires: %{_sbindir}/ip +BuildRequires: glibc-utils +BuildRequires: /usr/bin/hexdump +BuildRequires: /usr/sbin/ip BuildRequires: jq -BuildRequires: %{_bindir}/nbdcopy -BuildRequires: %{_bindir}/nbdinfo -BuildRequires: %{_bindir}/nbdsh -BuildRequires: %{_bindir}/qemu-img -BuildRequires: %{_bindir}/qemu-io -BuildRequires: %{_bindir}/qemu-nbd -BuildRequires: %{_sbindir}/sfdisk %if !0%{?rhel} -BuildRequires: %{_bindir}/socat +BuildRequires: /usr/bin/lzip %endif -BuildRequires: %{_sbindir}/ss -BuildRequires: %{_bindir}/stat +BuildRequires: /usr/bin/nbdcopy +BuildRequires: /usr/bin/nbdinfo +BuildRequires: /usr/bin/nbdsh +%ifnarch %{ix86} +BuildRequires: /usr/bin/qemu-img +BuildRequires: /usr/bin/qemu-io +BuildRequires: /usr/bin/qemu-nbd +%endif +BuildRequires: /usr/sbin/sfdisk +%if !0%{?rhel} +BuildRequires: /usr/bin/socat +%endif +BuildRequires: /usr/sbin/ss +BuildRequires: /usr/bin/stat # This package has RPM rules that create the automatic Provides: for # nbdkit plugins and filters. This means nbdkit build depends on # itself, but it's a simple noarch package so easy to install. BuildRequires: nbdkit-srpm-macros >= 1.30.0 +%if 0%{?have_mingw} +BuildRequires: mingw32-filesystem +BuildRequires: mingw64-filesystem +BuildRequires: mingw32-gcc +BuildRequires: mingw64-gcc +BuildRequires: mingw32-gcc-c++ +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw32-dlfcn +BuildRequires: mingw64-dlfcn +BuildRequires: mingw32-gnutls +BuildRequires: mingw64-gnutls +BuildRequires: mingw32-winpthreads +BuildRequires: mingw64-winpthreads +BuildRequires: mingw32-xz +BuildRequires: mingw64-xz +BuildRequires: mingw32-zlib +BuildRequires: mingw64-zlib +%endif + # nbdkit is a metapackage pulling the server and a useful subset # of the plugins and filters. Requires: nbdkit-server%{?_isa} = %{version}-%{release} Requires: nbdkit-basic-plugins%{?_isa} = %{version}-%{release} Requires: nbdkit-basic-filters%{?_isa} = %{version}-%{release} +%if 0%{?with_selinux} +# This ensures that the nbdkit-selinux package and all its +# dependencies are not pulled into containers and other systems that +# do not use SELinux. +Requires: (%{name}-selinux if selinux-policy-%{selinuxtype}) +%endif + %description NBD is a protocol for accessing block devices (hard disks and @@ -182,6 +245,8 @@ The key features are: * Filters can be stacked in front of plugins to transform the output. +* Server can run standalone or can be invoked from other programs. + '%{name}' is a meta-package which pulls in the core server and a useful subset of plugins and filters with minimal dependencies. @@ -193,7 +258,6 @@ reading the nbdkit(1) and nbdkit-plugin(3) manual pages. %package server Summary: The %{name} server -License: BSD %description server This package contains the %{name} server with only the null plugin @@ -204,14 +268,13 @@ the metapackage "nbdkit". %package basic-plugins Summary: Basic plugins for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description basic-plugins This package contains plugins for %{name} which only depend on simple -C libraries: glibc, gnutls, libzstd. Other plugins for nbdkit with -more complex dependencies are packaged separately. +C libraries: glibc, gnutls, zlib and zstd. Other plugins for nbdkit +with more complex dependencies are packaged separately. nbdkit-data-plugin Serve small amounts of data from the command line. @@ -227,7 +290,7 @@ nbdkit-info-plugin Serve client and server information. nbdkit-memory-plugin A virtual memory plugin. -nbdkit-ondemand-plugin Create filesystems on demand. +nbdkit-ones-plugin Fill disk with repeated 0xff or other bytes. nbdkit-pattern-plugin Fixed test pattern. @@ -246,7 +309,6 @@ nbdkit-zero-plugin Zero-length plugin for testing. %package example-plugins Summary: Example plugins for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %if !0%{?rhel} # example4 is written in Perl. @@ -260,13 +322,23 @@ This package contains example plugins for %{name}. # The plugins below have non-trivial dependencies are so are # packaged separately. +%if 0%{?have_blkio} +%package blkio-plugin +Summary: libblkio NVMe, vhost-user, vDPA, VFIO plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description blkio-plugin +This package contains libblkio (NVMe, vhost-user, vDPA, VFIO) support +for %{name}. +%endif + + %if !0%{?rhel} %package cc-plugin Summary: Write small inline C plugins and scripts for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: gcc -Requires: %{_bindir}/cat +Requires: /usr/bin/cat %description cc-plugin This package contains support for writing inline C plugins and scripts @@ -278,7 +350,6 @@ in C, install %{name}-devel for that. %if !0%{?rhel} %package cdi-plugin Summary: Containerized Data Import plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: jq Requires: podman @@ -290,17 +361,31 @@ This package contains Containerized Data Import support for %{name}. %package curl-plugin Summary: HTTP/FTP (cURL) plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description curl-plugin This package contains cURL (HTTP/FTP) support for %{name}. +%if !0%{?rhel} +# In theory this is noarch, but because plugins are placed in _libdir +# which varies across architectures, RPM does not allow this. +%package gcs-plugin +Summary: Gooogle Cloud Storage plugin %{name} +Requires: %{name}-python-plugin%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# XXX Should not need to add this. +Requires: python3-google-cloud-storage + +%description gcs-plugin +This package lets you open disk images stored in Google +Cloud Storage using %{name}. +%endif + + %if !0%{?rhel} && 0%{?have_libguestfs} %package guestfs-plugin Summary: libguestfs plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description guestfs-plugin @@ -311,7 +396,6 @@ This package is a libguestfs plugin for %{name}. %if !0%{?rhel} %package iso-plugin Summary: Virtual ISO 9660 plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: xorriso @@ -323,7 +407,6 @@ This package is a virtual ISO 9660 (CD-ROM) plugin for %{name}. %if !0%{?rhel} %package libvirt-plugin Summary: Libvirt plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description libvirt-plugin @@ -335,7 +418,6 @@ virDomainBlockPeek API. %package linuxdisk-plugin Summary: Virtual Linux disk plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} # for mke2fs Requires: e2fsprogs @@ -347,7 +429,6 @@ This package is a virtual Linux disk plugin for %{name}. %if !0%{?rhel} %package lua-plugin Summary: Lua plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description lua-plugin @@ -357,7 +438,6 @@ This package lets you write Lua plugins for %{name}. %package nbd-plugin Summary: NBD proxy / forward plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description nbd-plugin @@ -365,10 +445,19 @@ This package lets you forward NBD connections from %{name} to another NBD server. +%if !0%{?rhel} +%package nfs-plugin +Summary: NFS (Network File Server) plugin for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description nfs-plugin +This package contains Network File Server (NFS) support for %{name}. +%endif + + %if !0%{?rhel} && 0%{?have_ocaml} %package ocaml-plugin Summary: OCaml plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description ocaml-plugin @@ -380,7 +469,6 @@ To compile OCaml plugins you will also need to install %package ocaml-plugin-devel Summary: OCaml development environment for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: %{name}-ocaml-plugin%{?_isa} = %{version}-%{release} @@ -389,10 +477,24 @@ This package lets you write OCaml plugins for %{name}. %endif +%package ondemand-plugin +Summary: Create filesystems on demand for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} +# For mkfs and mke2fs (defaults). +Requires: util-linux, e2fsprogs +# For other filesystems. +Suggests: xfsprogs +%if !0%{?rhel} +Suggests: ntfsprogs, dosfstools +%endif + +%description ondemand-plugin +This package is a plugin to create filesystems on demand for %{name}. + + %if !0%{?rhel} %package perl-plugin Summary: Perl plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description perl-plugin @@ -402,31 +504,19 @@ This package lets you write Perl plugins for %{name}. %package python-plugin Summary: Python 3 plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description python-plugin This package lets you write Python 3 plugins for %{name}. -%if !0%{?rhel} -%package ruby-plugin -Summary: Ruby plugin for %{name} -License: BSD -Requires: %{name}-server%{?_isa} = %{version}-%{release} - -%description ruby-plugin -This package lets you write Ruby plugins for %{name}. -%endif - - %if !0%{?rhel} # In theory this is noarch, but because plugins are placed in _libdir # which varies across architectures, RPM does not allow this. %package S3-plugin Summary: Amazon S3 and Ceph plugin for %{name} -License: BSD -Requires: %{name}-python-plugin >= 1.22 +Requires: %{name}-python-plugin%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} # XXX Should not need to add this. Requires: python3-boto3 @@ -438,7 +528,6 @@ or Ceph using %{name}. %package ssh-plugin Summary: SSH plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description ssh-plugin @@ -448,7 +537,6 @@ This package contains SSH support for %{name}. %if !0%{?rhel} %package tcl-plugin Summary: Tcl plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description tcl-plugin @@ -458,7 +546,6 @@ This package lets you write Tcl plugins for %{name}. %package tmpdisk-plugin Summary: Remote temporary filesystem disk plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} # For mkfs and mke2fs (defaults). Requires: util-linux, e2fsprogs @@ -475,7 +562,6 @@ This package is a remote temporary filesystem disk plugin for %{name}. %if !0%{?rhel} %package torrent-plugin Summary: BitTorrent plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description torrent-plugin @@ -486,10 +572,9 @@ This package is a BitTorrent plugin for %{name}. %ifarch x86_64 %package vddk-plugin Summary: VMware VDDK plugin for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} # https://bugzilla.redhat.com/show_bug.cgi?id=1931818 -Requires: libxcrypt-compat +Requires: libxcrypt-compat%{?_isa} %description vddk-plugin This package is a plugin for %{name} which connects to @@ -497,15 +582,25 @@ VMware VDDK for accessing VMware disks and servers. %endif +%if !0%{?rhel} +%package vram-plugin +Summary: use GPU Video RAM as a network block device +Requires: %{name}-server%{?_isa} = %{version}-%{release} +Recommends: %{_bindir}/clinfo + +%description vram-plugin +This package contains GPU Video RAM support for %{name}. +%endif + + %package basic-filters Summary: Basic filters for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description basic-filters This package contains filters for %{name} which only depend on simple -C libraries: glibc, gnutls. Other filters for nbdkit with more -complex dependencies are packaged separately. +C libraries: glibc, gnutls, zlib and zstd. Other filters for nbdkit +with more complex dependencies are packaged separately. nbdkit-blocksize-filter Adjust block size of requests sent to plugins. @@ -513,10 +608,10 @@ nbdkit-blocksize-policy-filter Set block size constraints and policy. nbdkit-cache-filter Server-side cache. -nbdkit-cacheextents-filter Cache extents. - nbdkit-checkwrite-filter Check writes match contents of plugin. +nbdkit-count-filter Count bytes read, written, zeroed and trimmed. + nbdkit-cow-filter Copy-on-write overlay for read-only plugins. nbdkit-ddrescue-filter Filter for serving from ddrescue dump. @@ -525,6 +620,8 @@ nbdkit-delay-filter Inject read and write delays. nbdkit-error-filter Inject errors. +nbdkit-evil-filter Add random data corruption to reads. + nbdkit-exitlast-filter Exit on last client connection. nbdkit-exitwhen-filter Exit gracefully when an event occurs. @@ -535,6 +632,10 @@ nbdkit-extentlist-filter Place extent list over a plugin. nbdkit-fua-filter Modify flush behaviour in plugins. +nbdkit-gzip-filter Decompress a .gz file + +nbdkit-indexed-gzip-filter Access .gz contents efficiently. + nbdkit-ip-filter Filter clients by IP address. nbdkit-limit-filter Limit nr clients that can connect concurrently. @@ -543,6 +644,8 @@ nbdkit-log-filter Log all transactions to a file. nbdkit-luks-filter Read and write LUKS-encrypted disks. +nbdkit-map-filter Remap disk blocks. + nbdkit-multi-conn-filter Enable, emulate or disable multi-conn. nbdkit-nocache-filter Disable cache requests in the underlying plugin. @@ -557,33 +660,54 @@ nbdkit-nozero-filter Adjust handling of zero requests by plugins. nbdkit-offset-filter Serve an offset and range. +nbdkit-openonce-filter Open the underlying plugin once. + nbdkit-partition-filter Serve a single partition. nbdkit-pause-filter Pause NBD requests. nbdkit-protect-filter Write-protect parts of a plugin. +%if !0%{?rhel} +nbdkit-qcow2dec-filter Decode qcow2 files. + +%endif nbdkit-rate-filter Limit bandwidth by connection or server. nbdkit-readahead-filter Prefetch data when reading sequentially. +nbdkit-readonly-filter Switch a plugin between read-only and writable. + nbdkit-retry-filter Reopen connection on error. nbdkit-retry-request-filter Retry single requests on error. +nbdkit-rotational-filter Set if a plugin is rotational or not. + nbdkit-scan-filter Prefetch data ahead of sequential reads. +nbdkit-spinning-filter Add seek delays to simulate a spinning hard disk. + nbdkit-swab-filter Filter for swapping byte order. +nbdkit-time-limit-filter Set an overall time limit for each connection. + nbdkit-tls-fallback-filter TLS protection filter. nbdkit-truncate-filter Truncate, expand, round up or round down size. +%package bzip2-filter +Summary: BZip2 filter for %{name} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description bzip2-filter +This package is a bzip2 filter for %{name}. + + %if !0%{?rhel} %package ext2-filter Summary: ext2, ext3 and ext4 filesystem support for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description ext2-filter @@ -592,18 +716,8 @@ This package contains ext2, ext3 and ext4 filesystem support for %endif -%package gzip-filter -Summary: GZip filter for %{name} -License: BSD -Requires: %{name}-server%{?_isa} = %{version}-%{release} - -%description gzip-filter -This package is a gzip filter for %{name}. - - %package stats-filter Summary: Statistics filter for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} %description stats-filter @@ -612,27 +726,23 @@ Display statistics about operations. %package tar-filter Summary: Tar archive filter for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: tar -Obsoletes: %{name}-tar-plugin < 1.23.9-3 %description tar-filter This package is a tar archive filter for %{name}. %package xz-filter -Summary: XZ filter for %{name} -License: BSD +Summary: XZ and lzip filters for %{name} Requires: %{name}-server%{?_isa} = %{version}-%{release} %description xz-filter -This package is the xz filter for %{name}. +This package contains the xz and lzip filters for %{name}. %package devel Summary: Development files and documentation for %{name} -License: BSD Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: pkgconfig @@ -644,7 +754,6 @@ plugins for %{name}. %package srpm-macros Summary: RPM Provides rules for %{name} plugins and filters -License: BSD BuildArch: noarch %description srpm-macros @@ -654,7 +763,6 @@ for %{name} plugins and filters found in the plugins directory. %package bash-completion Summary: Bash tab-completion for %{name} -License: BSD BuildArch: noarch Requires: bash-completion >= 2.0 Requires: %{name}-server = %{version}-%{release} @@ -664,51 +772,142 @@ Install this package if you want intelligent bash tab-completion for %{name}. +%if 0%{?with_selinux} +%package selinux +Summary: %{name} SELinux policy +BuildArch: noarch +Requires: selinux-policy-%{selinuxtype} +Requires(post):selinux-policy-%{selinuxtype} +BuildRequires: selinux-policy-devel +%{?selinux_requires} + +%description selinux +%{name} SELinux policy module. +%endif + + +%if 0%{?have_mingw} +%package -n mingw32-%{name} +Summary: nbdkit binary, plugins, filters, development files for Windows +BuildArch: noarch +Requires: mingw32-filesystem +Requires: pkgconfig + +%description -n mingw32-%{name} +NBD is a protocol for accessing block devices (hard disks and +disk-like things) over the network. + +nbdkit is a toolkit for creating NBD servers. + +This package contains the nbdkit binary, plugins, filters and +development kit for 32 bit versions of Windows. + + +%package -n mingw64-%{name} +Summary: nbdkit binary, plugins, filters, development files for Windows +BuildArch: noarch +Requires: mingw64-filesystem +Requires: pkgconfig + +%description -n mingw64-%{name} +NBD is a protocol for accessing block devices (hard disks and +disk-like things) over the network. + +nbdkit is a toolkit for creating NBD servers. + +This package contains the nbdkit binary, plugins, filters and +development kit for 64 bit versions of Windows. + + +%{?mingw_debug_package} +%endif + + %prep %if 0%{verify_tarball_signature} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %endif -%autosetup -p1 -%if 0%{patches_touch_autotools} +%autosetup -p1 -S git autoreconf -i -%endif %build +mkdir build_native +pushd build_native +%global _configure ../configure + # Golang bindings are not enabled in the build since they don't # need to be. Most people would use them by copying the upstream # package into their vendor/ directory. export PYTHON=%{__python3} %configure \ - --with-extra='%{name}-%{version}-%{release}' \ --disable-static \ + --with-extra='%{name}-%{version}-%{release}' \ + --with-tls-priority=@NBDKIT,SYSTEM \ + --with-bash-completions \ + --with-curl \ + --with-gnutls \ + --with-liblzma \ + --with-libnbd \ + --with-manpages \ + --with-selinux \ + --with-ssh \ + --with-zlib \ +%if !0%{?rhel} + --with-zlib-ng \ +%else + --without-zlib-ng \ +%endif + --enable-linuxdisk \ + --enable-python \ --disable-golang \ --disable-rust \ + --disable-valgrind \ %if !0%{?rhel} && 0%{?have_ocaml} --enable-ocaml \ %else --disable-ocaml \ %endif -%if 0%{?rhel} +%if !0%{?rhel} + --enable-lua \ + --enable-perl \ + --enable-tcl \ + --enable-torrent \ + --enable-vram \ + --with-ext2 \ + --with-iso \ + --with-libvirt \ +%else --disable-lua \ --disable-perl \ - --disable-ruby \ --disable-tcl \ + --disable-torrent \ + --disable-vram \ --without-ext2 \ --without-iso \ --without-libvirt \ %endif +%if 0%{?have_blkio} + --with-libblkio \ +%else + --without-libblkio \ +%endif +%ifarch x86_64 + --enable-vddk \ +%else + --disable-vddk \ +%endif %if !0%{?rhel} && 0%{?have_libguestfs} --with-libguestfs \ %else --without-libguestfs \ %endif -%ifarch %{complete_test_arches} +%ifarch !0%{?rhel} && 0%{?have_libguestfs} && %{complete_test_arches} --enable-libguestfs-tests \ %else --disable-libguestfs-tests \ %endif - --with-tls-priority=@NBDKIT,SYSTEM + %{nil} # Verify that it picked the correct version of Python # to avoid RHBZ#1404631 happening again silently. @@ -716,8 +915,61 @@ grep '^PYTHON_VERSION = 3' Makefile %make_build +%if 0%{?with_selinux} +# SELinux policy (originally from selinux-policy-contrib) +# this policy module will override the production module +mkdir selinux +cp -p %{SOURCE6} selinux/ +cp -p %{SOURCE7} selinux/ +cp -p %{SOURCE8} selinux/ + +make -f %{_datadir}/selinux/devel/Makefile %{modulename}.pp +bzip2 -9 %{modulename}.pp +%endif + +popd + +%if 0%{?have_mingw} +%mingw_configure \ + --disable-static \ + --enable-shared \ + --with-extra='%{name}-%{version}-%{release}' \ + --with-tls-priority=@NBDKIT,SYSTEM \ + --disable-golang \ + --disable-libguestfs-tests \ + --disable-linuxdisk \ + --disable-lua \ + --disable-ocaml \ + --disable-perl \ + --disable-python \ + --disable-rust \ + --disable-tcl \ + --disable-torrent \ + --disable-valgrind \ + --disable-vddk \ + --disable-vram \ + --without-bash-completions \ + --without-curl \ + --without-ext2 \ + --with-gnutls \ + --without-iso \ + --without-libblkio \ + --without-libguestfs \ + --without-libnbd \ + --without-libvirt \ + --with-liblzma \ + --without-manpages \ + --without-selinux \ + --without-ssh \ + --with-zlib \ + %{nil} + +%mingw_make %{?_smp_mflags} +%endif + %install +pushd build_native %make_install # Delete libtool crap. @@ -728,13 +980,17 @@ find $RPM_BUILD_ROOT -name '*.la' -delete rm -f $RPM_BUILD_ROOT%{_mandir}/man3/nbdkit-rust-plugin.3* %if 0%{?rhel} -# In RHEL, remove some plugins we cannot --disable. -for f in cc cdi torrent; do +# In RHEL, remove some plugins and filters we cannot --disable. +for f in cc cdi ; do rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-$f-plugin.so rm -f $RPM_BUILD_ROOT%{_mandir}/man?/nbdkit-$f-plugin.* done -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-S3-plugin -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-S3-plugin.1* +for f in gcs S3 ; do + rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-$f-plugin + rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-$f-plugin.1* +done +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/filters/nbdkit-qcow2dec-filter.so +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-qcow2dec-filter.1* %endif # Install RPM dependency generator. @@ -742,9 +998,34 @@ mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/ install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_rpmconfigdir}/fileattrs/ install -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_rpmconfigdir}/ +%if 0%{?with_selinux} +install -D -m 0644 %{modulename}.pp.bz2 $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 +install -D -p -m 0644 selinux/%{modulename}.if $RPM_BUILD_ROOT%{_datadir}/selinux/devel/include/distributed/%{modulename}.if +%endif +popd + +%if 0%{?have_mingw} +%mingw_make_install + +# Remove .la files +rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.la + +# The .def files aren't interesting for other binaries +rm -f $RPM_BUILD_ROOT%{mingw32_bindir}/*.def +rm -f $RPM_BUILD_ROOT%{mingw64_bindir}/*.def + +# Remove man pages which duplicate stuff in Fedora already. +rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} +rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} + +%mingw_debug_install_post +%endif + %check %ifnarch %{broken_test_arches} +pushd build_native function skip_test () { for f in "$@"; do @@ -789,6 +1070,7 @@ export LIBGUESTFS_TRACE=1 cat tests/test-suite.log exit 1 } +popd %endif @@ -797,6 +1079,26 @@ export LIBGUESTFS_TRACE=1 %endif +%if 0%{?with_selinux} +# SELinux contexts are saved so that only affected files can be +# relabeled after the policy module installation +%pre selinux +%selinux_relabel_pre -s %{selinuxtype} + +%post selinux +%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.bz2 + +%postun selinux +if [ $1 -eq 0 ]; then + %selinux_modules_uninstall -s %{selinuxtype} %{modulename} +fi + +%posttrans selinux +%selinux_relabel_post -s %{selinuxtype} +# if with_selinux +%endif + + %files # metapackage so empty @@ -831,7 +1133,7 @@ export LIBGUESTFS_TRACE=1 %{_libdir}/%{name}/plugins/nbdkit-full-plugin.so %{_libdir}/%{name}/plugins/nbdkit-info-plugin.so %{_libdir}/%{name}/plugins/nbdkit-memory-plugin.so -%{_libdir}/%{name}/plugins/nbdkit-ondemand-plugin.so +%{_libdir}/%{name}/plugins/nbdkit-ones-plugin.so %{_libdir}/%{name}/plugins/nbdkit-partitioning-plugin.so %{_libdir}/%{name}/plugins/nbdkit-pattern-plugin.so %{_libdir}/%{name}/plugins/nbdkit-random-plugin.so @@ -846,7 +1148,7 @@ export LIBGUESTFS_TRACE=1 %{_mandir}/man1/nbdkit-full-plugin.1* %{_mandir}/man1/nbdkit-info-plugin.1* %{_mandir}/man1/nbdkit-memory-plugin.1* -%{_mandir}/man1/nbdkit-ondemand-plugin.1* +%{_mandir}/man1/nbdkit-ones-plugin.1* %{_mandir}/man1/nbdkit-partitioning-plugin.1* %{_mandir}/man1/nbdkit-pattern-plugin.1* %{_mandir}/man1/nbdkit-random-plugin.1* @@ -866,6 +1168,15 @@ export LIBGUESTFS_TRACE=1 %{_mandir}/man1/nbdkit-example*-plugin.1* +%if 0%{?have_blkio} +%files blkio-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-blkio-plugin.so +%{_mandir}/man1/nbdkit-blkio-plugin.1* +%endif + + %if !0%{?rhel} %files cc-plugin %doc README.md @@ -891,6 +1202,15 @@ export LIBGUESTFS_TRACE=1 %{_mandir}/man1/nbdkit-curl-plugin.1* +%if !0%{?rhel} +%files gcs-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-gcs-plugin +%{_mandir}/man1/nbdkit-gcs-plugin.1* +%endif + + %if !0%{?rhel} && 0%{?have_libguestfs} %files guestfs-plugin %doc README.md @@ -941,6 +1261,15 @@ export LIBGUESTFS_TRACE=1 %{_mandir}/man1/nbdkit-nbd-plugin.1* +%if !0%{?rhel} +%files nfs-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-nfs-plugin.so +%{_mandir}/man1/nbdkit-nfs-plugin.1* +%endif + + %if !0%{?rhel} && 0%{?have_ocaml} %files ocaml-plugin %doc README.md @@ -955,6 +1284,13 @@ export LIBGUESTFS_TRACE=1 %endif +%files ondemand-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-ondemand-plugin.so +%{_mandir}/man1/nbdkit-ondemand-plugin.1* + + %if !0%{?rhel} %files perl-plugin %doc README.md @@ -971,15 +1307,6 @@ export LIBGUESTFS_TRACE=1 %{_mandir}/man3/nbdkit-python-plugin.3* -%if !0%{?rhel} -%files ruby-plugin -%doc README.md -%license LICENSE -%{_libdir}/%{name}/plugins/nbdkit-ruby-plugin.so -%{_mandir}/man3/nbdkit-ruby-plugin.3* -%endif - - %if !0%{?rhel} %files S3-plugin %doc README.md @@ -1030,27 +1357,40 @@ export LIBGUESTFS_TRACE=1 %endif +%if !0%{?rhel} +%files vram-plugin +%doc README.md +%license LICENSE +%{_libdir}/%{name}/plugins/nbdkit-vram-plugin.so +%{_mandir}/man1/nbdkit-vram-plugin.1* +%endif + + %files basic-filters %doc README.md %license LICENSE %{_libdir}/%{name}/filters/nbdkit-blocksize-filter.so %{_libdir}/%{name}/filters/nbdkit-blocksize-policy-filter.so %{_libdir}/%{name}/filters/nbdkit-cache-filter.so -%{_libdir}/%{name}/filters/nbdkit-cacheextents-filter.so %{_libdir}/%{name}/filters/nbdkit-checkwrite-filter.so +%{_libdir}/%{name}/filters/nbdkit-count-filter.so %{_libdir}/%{name}/filters/nbdkit-cow-filter.so %{_libdir}/%{name}/filters/nbdkit-ddrescue-filter.so %{_libdir}/%{name}/filters/nbdkit-delay-filter.so %{_libdir}/%{name}/filters/nbdkit-error-filter.so +%{_libdir}/%{name}/filters/nbdkit-evil-filter.so %{_libdir}/%{name}/filters/nbdkit-exitlast-filter.so %{_libdir}/%{name}/filters/nbdkit-exitwhen-filter.so %{_libdir}/%{name}/filters/nbdkit-exportname-filter.so %{_libdir}/%{name}/filters/nbdkit-extentlist-filter.so %{_libdir}/%{name}/filters/nbdkit-fua-filter.so +%{_libdir}/%{name}/filters/nbdkit-gzip-filter.so +%{_libdir}/%{name}/filters/nbdkit-indexed-gzip-filter.so %{_libdir}/%{name}/filters/nbdkit-ip-filter.so %{_libdir}/%{name}/filters/nbdkit-limit-filter.so %{_libdir}/%{name}/filters/nbdkit-log-filter.so %{_libdir}/%{name}/filters/nbdkit-luks-filter.so +%{_libdir}/%{name}/filters/nbdkit-map-filter.so %{_libdir}/%{name}/filters/nbdkit-multi-conn-filter.so %{_libdir}/%{name}/filters/nbdkit-nocache-filter.so %{_libdir}/%{name}/filters/nbdkit-noextents-filter.so @@ -1058,35 +1398,47 @@ export LIBGUESTFS_TRACE=1 %{_libdir}/%{name}/filters/nbdkit-noparallel-filter.so %{_libdir}/%{name}/filters/nbdkit-nozero-filter.so %{_libdir}/%{name}/filters/nbdkit-offset-filter.so +%{_libdir}/%{name}/filters/nbdkit-openonce-filter.so %{_libdir}/%{name}/filters/nbdkit-partition-filter.so %{_libdir}/%{name}/filters/nbdkit-pause-filter.so %{_libdir}/%{name}/filters/nbdkit-protect-filter.so +%if !0%{?rhel} +%{_libdir}/%{name}/filters/nbdkit-qcow2dec-filter.so +%endif %{_libdir}/%{name}/filters/nbdkit-rate-filter.so %{_libdir}/%{name}/filters/nbdkit-readahead-filter.so +%{_libdir}/%{name}/filters/nbdkit-readonly-filter.so %{_libdir}/%{name}/filters/nbdkit-retry-filter.so %{_libdir}/%{name}/filters/nbdkit-retry-request-filter.so +%{_libdir}/%{name}/filters/nbdkit-rotational-filter.so %{_libdir}/%{name}/filters/nbdkit-scan-filter.so +%{_libdir}/%{name}/filters/nbdkit-spinning-filter.so %{_libdir}/%{name}/filters/nbdkit-swab-filter.so +%{_libdir}/%{name}/filters/nbdkit-time-limit-filter.so %{_libdir}/%{name}/filters/nbdkit-tls-fallback-filter.so %{_libdir}/%{name}/filters/nbdkit-truncate-filter.so %{_mandir}/man1/nbdkit-blocksize-filter.1* %{_mandir}/man1/nbdkit-blocksize-policy-filter.1* %{_mandir}/man1/nbdkit-cache-filter.1* -%{_mandir}/man1/nbdkit-cacheextents-filter.1* %{_mandir}/man1/nbdkit-checkwrite-filter.1* +%{_mandir}/man1/nbdkit-count-filter.1* %{_mandir}/man1/nbdkit-cow-filter.1* %{_mandir}/man1/nbdkit-ddrescue-filter.1* %{_mandir}/man1/nbdkit-delay-filter.1* %{_mandir}/man1/nbdkit-error-filter.1* +%{_mandir}/man1/nbdkit-evil-filter.1* %{_mandir}/man1/nbdkit-exitlast-filter.1* %{_mandir}/man1/nbdkit-exitwhen-filter.1* %{_mandir}/man1/nbdkit-exportname-filter.1* %{_mandir}/man1/nbdkit-extentlist-filter.1* %{_mandir}/man1/nbdkit-fua-filter.1* +%{_mandir}/man1/nbdkit-gzip-filter.1* +%{_mandir}/man1/nbdkit-indexed-gzip-filter.1* %{_mandir}/man1/nbdkit-ip-filter.1* %{_mandir}/man1/nbdkit-limit-filter.1* %{_mandir}/man1/nbdkit-log-filter.1* %{_mandir}/man1/nbdkit-luks-filter.1* +%{_mandir}/man1/nbdkit-map-filter.1* %{_mandir}/man1/nbdkit-multi-conn-filter.1* %{_mandir}/man1/nbdkit-nocache-filter.1* %{_mandir}/man1/nbdkit-noextents-filter.1* @@ -1094,19 +1446,34 @@ export LIBGUESTFS_TRACE=1 %{_mandir}/man1/nbdkit-noparallel-filter.1* %{_mandir}/man1/nbdkit-nozero-filter.1* %{_mandir}/man1/nbdkit-offset-filter.1* +%{_mandir}/man1/nbdkit-openonce-filter.1* %{_mandir}/man1/nbdkit-partition-filter.1* %{_mandir}/man1/nbdkit-pause-filter.1* %{_mandir}/man1/nbdkit-protect-filter.1* +%if !0%{?rhel} +%{_mandir}/man1/nbdkit-qcow2dec-filter.1* +%endif %{_mandir}/man1/nbdkit-rate-filter.1* %{_mandir}/man1/nbdkit-readahead-filter.1* +%{_mandir}/man1/nbdkit-readonly-filter.1* %{_mandir}/man1/nbdkit-retry-filter.1* %{_mandir}/man1/nbdkit-retry-request-filter.1* +%{_mandir}/man1/nbdkit-rotational-filter.1* %{_mandir}/man1/nbdkit-scan-filter.1* +%{_mandir}/man1/nbdkit-spinning-filter.1* %{_mandir}/man1/nbdkit-swab-filter.1* +%{_mandir}/man1/nbdkit-time-limit-filter.1* %{_mandir}/man1/nbdkit-tls-fallback-filter.1* %{_mandir}/man1/nbdkit-truncate-filter.1* +%files bzip2-filter +%doc README.md +%license LICENSE +%{_libdir}/%{name}/filters/nbdkit-bzip2-filter.so +%{_mandir}/man1/nbdkit-bzip2-filter.1* + + %if !0%{?rhel} %files ext2-filter %doc README.md @@ -1116,13 +1483,6 @@ export LIBGUESTFS_TRACE=1 %endif -%files gzip-filter -%doc README.md -%license LICENSE -%{_libdir}/%{name}/filters/nbdkit-gzip-filter.so -%{_mandir}/man1/nbdkit-gzip-filter.1* - - %files stats-filter %doc README.md %license LICENSE @@ -1140,17 +1500,19 @@ export LIBGUESTFS_TRACE=1 %files xz-filter %doc README.md %license LICENSE +%{_libdir}/%{name}/filters/nbdkit-lzip-filter.so %{_libdir}/%{name}/filters/nbdkit-xz-filter.so +%{_mandir}/man1/nbdkit-lzip-filter.1* %{_mandir}/man1/nbdkit-xz-filter.1* %files devel -%doc BENCHMARKING OTHER_PLUGINS README.md SECURITY TODO +%doc BENCHMARKING OTHER_PLUGINS README.md SECURITY.md TODO.md %license LICENSE # Include the source of the example plugins in the documentation. %doc plugins/example*/*.c %if !0%{?rhel} -%doc plugins/example4/nbdkit-example4-plugin +%doc build_native/plugins/example4/nbdkit-example4-plugin %doc plugins/lua/example.lua %endif %if !0%{?rhel} && 0%{?have_ocaml} @@ -1160,10 +1522,7 @@ export LIBGUESTFS_TRACE=1 %doc plugins/perl/example.pl %endif %doc plugins/python/examples/*.py -%if !0%{?rhel} -%doc plugins/ruby/example.rb -%endif -%doc plugins/sh/example.sh +%doc plugins/sh/examples/*.sh %if !0%{?rhel} %doc plugins/tcl/example.tcl %endif @@ -1174,7 +1533,9 @@ export LIBGUESTFS_TRACE=1 %{_includedir}/nbd-protocol.h %{_mandir}/man3/nbdkit-filter.3* %{_mandir}/man3/nbdkit-plugin.3* +%{_mandir}/man3/nbdkit_*.3* %{_mandir}/man1/nbdkit-release-notes-1.*.1* +%{_mandir}/man3/nbdkit-tracing.3* %{_libdir}/pkgconfig/nbdkit.pc @@ -1186,11 +1547,499 @@ export LIBGUESTFS_TRACE=1 %files bash-completion %license LICENSE +%if 0%{?fedora} || 0%{?rhel} >= 11 +%dir %{bash_completions_dir} +%{bash_completions_dir}/nbdkit +%else %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/nbdkit +%endif + + +%if 0%{?with_selinux} +%files selinux +%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.* +%{_datadir}/selinux/devel/include/distributed/%{modulename}.if +%ghost %verify(not md5 size mode mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} +%endif + + +%if 0%{?have_mingw} +%files -n mingw32-%{name} +%license LICENSE +%{mingw32_sbindir}/nbdkit.exe +%{mingw32_libdir}/%{name}/ +%{mingw32_libdir}/libnbdkit.a +%{mingw32_libdir}/pkgconfig/%{name}.pc +%{mingw32_includedir}/*.h + + +%files -n mingw64-%{name} +%license LICENSE +%{mingw64_sbindir}/nbdkit.exe +%{mingw64_libdir}/%{name}/ +%{mingw64_libdir}/libnbdkit.a +%{mingw64_libdir}/pkgconfig/%{name}.pc +%{mingw64_includedir}/*.h +%endif %changelog +* Fri Jan 02 2026 Richard W.M. Jones - 1.47.1-1 +- New upstream development version 1.47.1 + +* Sat Dec 20 2025 Richard W.M. Jones - 1.46.0-1 +- New upstream stable version 1.46.0 + +* Thu Dec 18 2025 Richard W.M. Jones - 1.45.17-1 +- New upstream version 1.45.17 + +* Mon Dec 15 2025 Richard W.M. Jones - 1.45.16-1 +- New upstream version 1.45.16 + +* Tue Dec 02 2025 Richard W.M. Jones - 1.45.15-1 +- New upstream version 1.45.15 + +* Fri Nov 14 2025 Richard W.M. Jones - 1.45.13-1 +- New upstream version 1.45.13 + +* Mon Oct 27 2025 Richard W.M. Jones - 1.45.12-1 +- New upstream version 1.45.12 +- Add new nbdkit-vram-plugin + +* Mon Oct 20 2025 Richard W.M. Jones - 1.45.11-1 +- New upstream version 1.45.11 + +* Thu Oct 16 2025 Richard W.M. Jones - 1.45.10-1 +- New upstream version 1.45.10 +- Remove OCaml 5.4.0 fix, which is included upstream. + +* Wed Oct 15 2025 Richard W.M. Jones - 1.45.9-2 +- OCaml 5.4.0 rebuild + +* Fri Oct 3 2025 Richard W.M. Jones - 1.45.9-1 +- New upstream version 1.45.9 +- Reenable the tests on all arches, since we can now handle missing qemu-img + +* Thu Oct 2 2025 Daniel P. Berrangé - 1.45.8-2 +- Stop using QEMU for tests on 32-bit + +* Sat Sep 13 2025 Richard W.M. Jones - 1.45.8-1 +- New upstream version 1.45.8 + +* Tue Aug 26 2025 Richard W.M. Jones - 1.45.7-1 +- New upstream version 1.45.7 + +* Sat Aug 23 2025 Richard W.M. Jones - 1.45.6-1 +- New upstream version 1.45.6 + +* Wed Aug 20 2025 Richard W.M. Jones - 1.45.5-1 +- New upstream version 1.45.5 +- Remove obsolete Obsoletes now this is Fedora 43+. +- Add new nbdkit-indexed-gzip-filter. + +* Mon Aug 11 2025 Richard W.M. Jones - 1.45.4-1 +- New upstream version 1.45.4 + +* Tue Jul 29 2025 Richard W.M. Jones - 1.45.3-1 +- New upstream version 1.45.3 + +* Wed Jul 23 2025 Richard W.M. Jones - 1.45.2-1 +- New upstream version 1.45.2 +- New map filter. + +* Fri Jul 11 2025 Jerry James - 1.45.1-5 +- Rebuild to fix OCaml dependencies + +* Wed Jul 09 2025 Jitka Plesnikova - 1.45.1-4 +- Perl 5.42 re-rebuild updated packages + +* Wed Jul 09 2025 Richard W.M. Jones - 1.45.1-3 +- Remove cacheextents filter (deprecated & removed upstream) + +* Wed Jul 09 2025 Jitka Plesnikova - 1.45.1-2 +- Perl 5.42 re-rebuild updated packages + +* Tue Jul 08 2025 Richard W.M. Jones - 1.45.1-1 +- New upstream development branch 1.45.1 +- New nbdkit-count-filter. + +* Mon Jul 07 2025 Jitka Plesnikova - 1.44.1-2 +- Perl 5.42 rebuild + +* Sat Jul 05 2025 Richard W.M. Jones - 1.44.1-1 +- New upstream stable branch version 1.44.1 +- Contains data integrity fix: "server: Fix .zero fallback path" + +* Tue Jul 01 2025 Richard W.M. Jones - 1.44.0-1 +- New upstream stable branch version 1.44.0 + +* Mon Jun 23 2025 Richard W.M. Jones - 1.43.13-1 +- New upstream development branch version 1.43.13 + +* Sat Jun 14 2025 Richard W.M. Jones - 1.43.12-1 +- New upstream development branch version 1.43.12 + +* Fri Jun 06 2025 Python Maint - 1.43.11-2 +- Rebuilt for Python 3.14 + +* Thu Jun 05 2025 Richard W.M. Jones - 1.43.11-1 +- New upstream development branch version 1.43.11 + +* Mon Jun 02 2025 Richard W.M. Jones - 1.43.10-1 +- New upstream development branch version 1.43.10 + +* Sat May 17 2025 Richard W.M. Jones - 1.43.9-1 +- New upstream development branch version 1.43.9 +- New nbdkit-openonce-filter + +* Mon May 12 2025 Richard W.M. Jones - 1.43.8-1 +- New upstream development branch version 1.43.8 + +* Fri May 09 2025 Richard W.M. Jones - 1.43.7-1 +- New upstream development branch version 1.43.7 + +* Thu May 01 2025 Richard W.M. Jones - 1.43.6-1 +- New upstream development branch version 1.43.6 + +* Thu Apr 10 2025 Richard W.M. Jones - 1.43.5-1 +- New upstream development branch version 1.43.5 +- New subpackage nbdkit-nfs-plugin + +* Wed Apr 02 2025 Richard W.M. Jones - 1.43.4-1 +- New upstream development branch version 1.43.4 + +* Mon Mar 31 2025 Richard W.M. Jones - 1.43.3-1 +- New upstream development branch version 1.43.3 + +* Thu Mar 27 2025 Richard W.M. Jones - 1.43.2-1 +- New upstream development branch version 1.43.2 + +* Wed Mar 26 2025 Tim Landscheidt - 1.43.1-2 +- Fix description for nbdkit-selinux + +* Thu Mar 13 2025 Richard W.M. Jones - 1.43.1-1 +- New upstream development branch version 1.43.1 + +* Mon Mar 03 2025 Richard W.M. Jones - 1.42.1-1 +- New upstream stable branch version 1.42.1 + +* Fri Feb 28 2025 Björn Esser - 1.42.0-3 +- Change Requires: libxcrypt-compat to be archful + +* Mon Feb 24 2025 Richard W.M. Jones - 1.42.0-2 +- Reenable tests + +* Tue Feb 11 2025 Richard W.M. Jones - 1.42.0-1 +- New upstream stable branch version 1.42.0 + +* Sat Feb 01 2025 Björn Esser - 1.41.9-5 +- Add explicit BR: libxcrypt-devel + +* Fri Jan 17 2025 Fedora Release Engineering - 1.41.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 1.41.9-3 +- Rebuilt for the bin-sbin merge (2nd attempt) + +* Thu Jan 9 2025 Jerry James - 1.41.9-2 +- OCaml 5.3.0 rebuild for Fedora 42 + +* Wed Jan 08 2025 Richard W.M. Jones - 1.41.9-1 +- New upstream development branch version 1.41.9 + +* Mon Oct 14 2024 Richard W.M. Jones - 1.41.8-1 +- New upstream development branch version 1.41.8 + +* Fri Oct 04 2024 Richard W.M. Jones - 1.41.7-1 +- New upstream development branch version 1.41.7 + +* Wed Sep 25 2024 Richard W.M. Jones - 1.41.6-1 +- New upstream development branch version 1.41.6 + +* Tue Sep 24 2024 Yaakov Selkowitz - 1.41.5-2 +- Avoid lzip dependency on RHEL + +* Sun Sep 22 2024 Richard W.M. Jones - 1.41.5-1 +- New upstream development branch version 1.41.5 +- Add lzip filter to the existing nbdkit-xz-filter package +- Reenable MC in mingw build + +* Fri Sep 13 2024 Richard W.M. Jones - 1.41.4-1 +- New upstream development branch version 1.41.4 + +* Thu Sep 12 2024 Richard W.M. Jones - 1.41.3-1 +- New upstream development branch version 1.41.3 +- New nbdkit-time-limit-filter + +* Sun Sep 08 2024 Richard W.M. Jones - 1.41.2-1 +- New upstream development branch version 1.41.2 + +* Sat Aug 24 2024 Richard W.M. Jones - 1.41.1-1 +- New upstream development branch version 1.41.1 + +* Mon Jul 29 2024 Richard W.M. Jones - 1.40.1-1 +- New upstream stable branch version 1.40.1 + +* Sun Jul 21 2024 Richard W.M. Jones - 1.40.0-1 +- New upstream stable branch version 1.40.0 + +* Thu Jul 18 2024 Fedora Release Engineering - 1.39.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sun Jul 14 2024 Richard W.M. Jones - 1.39.10-2 +- New upstream development version 1.39.10 +- Combine nbdkit-gzip-filter with basic filters + +* Sat Jul 13 2024 Zbigniew Jędrzejewski-Szmek - 1.39.9-2 +- Rebuilt for the bin-sbin merge (again) + +* Tue Jul 09 2024 Richard W.M. Jones - 1.39.9-1 +- New upstream development version 1.39.9 + +* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 1.39.8-2 +- Rebuilt for the bin-sbin merge + +* Thu Jun 27 2024 Richard W.M. Jones - 1.39.8-1 +- New upstream development version 1.39.8 + +* Wed Jun 19 2024 Richard W.M. Jones - 1.39.7-6 +- OCaml 5.2.0 ppc64le fix + +* Wed Jun 12 2024 Jitka Plesnikova - 1.39.7-5 +- Perl 5.40 rebuild + +* Sat Jun 08 2024 Python Maint - 1.39.7-4 +- Rebuilt for Python 3.13 + +* Wed May 29 2024 Richard W.M. Jones - 1.39.7-3 +- OCaml 5.2.0 for Fedora 41 + +* Tue May 28 2024 Richard W.M. Jones - 1.39.7-2 +- New upstream development version 1.39.7 +- Add nbdkit-bzip2-filter subpackage. +- Prefer BR pkgconfig(foo) instead of BR foo-devel. + +* Fri May 17 2024 Adam Williamson - 1.39.6-2 +- Rebuild with fixed SELinux macros + +* Thu May 16 2024 Richard W.M. Jones - 1.39.6-1 +- New upstream development version 1.39.6 + +* Tue May 7 2024 Richard W.M. Jones - 1.39.5-1 +- New upstream development version 1.39.5 + +* Sat Apr 20 2024 Richard W.M. Jones - 1.39.4-1 +- New upstream development version 1.39.4 +- Remove the Ruby plugin. + +* Thu Apr 11 2024 Richard W.M. Jones - 1.39.3-1 +- New upstream development version 1.39.3 + +* Tue Apr 9 2024 Richard W.M. Jones - 1.39.2-1 +- New upstream development version 1.39.2 +- Add new nbdkit_*.3 man pages (plugin developer documentation) + +* Sun Apr 7 2024 Richard W.M. Jones - 1.39.1-1 +- New upstream development version 1.39.1 +- New filters: rotational, spinning + +* Thu Apr 4 2024 Richard W.M. Jones - 1.38.0-1 +- New stable branch version 1.38.0 +- Rebuild autoconf cruft unconditionally. + +* Mon Mar 25 2024 Richard W.M. Jones - 1.37.13-2 +- Use %%{bash_completions_dir} macro + +* Mon Mar 18 2024 Richard W.M. Jones - 1.37.13-1 +- New upstream development version 1.37.13 + +* Fri Mar 15 2024 Richard W.M. Jones - 1.37.12-1 +- New upstream development version 1.37.12 + +* Mon Mar 11 2024 Richard W.M. Jones - 1.37.11-1 +- New upstream development version 1.37.11 + +* Mon Mar 04 2024 Richard W.M. Jones - 1.37.10-1 +- New upstream development version 1.37.10 + +* Thu Feb 22 2024 Richard W.M. Jones - 1.37.9-1 +- New upstream development version 1.37.9 + +* Sat Feb 17 2024 Richard W.M. Jones - 1.37.8-1 +- New upstream development version 1.37.8 + +* Wed Feb 14 2024 Richard W.M. Jones - 1.37.7-2 +- Fix gcs & S3 plugin requirements + +* Sun Feb 11 2024 Richard W.M. Jones - 1.37.7-1 +- New upstream development version 1.37.7 +- New nbdkit-gcs-plugin for Google Cloud Storage + +* Thu Feb 01 2024 Richard W.M. Jones - 1.37.6-1 +- New upstream development version 1.37.6 + +* Tue Jan 23 2024 Richard W.M. Jones - 1.37.5-3 +- Add mingw{32,64}-nbdkit subpackages + +* Sun Jan 21 2024 Fedora Release Engineering - 1.37.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 16 2024 Richard W.M. Jones - 1.37.5-1 +- New upstream development version 1.37.5 + +* Wed Jan 03 2024 Mamoru TASAKA - 1.37.4-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 + +* Tue Dec 19 2023 Richard W.M. Jones - 1.37.4-1 +- New upstream development version 1.37.4 + +* Mon Dec 18 2023 Richard W.M. Jones - 1.37.3-4 +- OCaml 5.1.1 + s390x code gen fix for Fedora 40 + +* Thu Dec 14 2023 Richard W.M. Jones - 1.37.3-3 +- OCaml 5.1.1 rebuild for Fedora 40 + +* Mon Dec 04 2023 Richard W.M. Jones - 1.37.3-2 +- Add upstream fix for GCC 14 + +* Sun Nov 26 2023 Richard W.M. Jones - 1.37.3-1 +- New upstream development version 1.37.3 + +* Tue Nov 07 2023 Richard W.M. Jones - 1.37.2-1 +- New upstream development version 1.37.2 +- New nbdkit-readonly-filter. + +* Wed Nov 01 2023 Richard W.M. Jones - 1.37.1-2 +- Add experimental SELinux support (RHEL-5174) + +* Mon Oct 23 2023 Richard W.M. Jones - 1.37.1-1 +- New upstream development version 1.37.1 + +* Fri Oct 06 2023 Richard W.M. Jones - 1.36.0-3 +- OCaml 5.1 rebuild for Fedora 40 + +* Wed Sep 27 2023 Richard W.M. Jones - 1.36.0-2 +- New upstream stable version 1.36.0 +- Enable blkio support again on Fedora i686. + +* Mon Sep 11 2023 Richard W.M. Jones - 1.35.13-1 +- New upstream development version 1.35.13 + +* Fri Sep 08 2023 Richard W.M. Jones - 1.35.12-1 +- New upstream development version 1.35.12 + +* Wed Aug 30 2023 Richard W.M. Jones - 1.35.11-2 +- New upstream development version 1.35.11 + +* Sat Aug 12 2023 Richard W.M. Jones - 1.35.10-1 +- New upstream development version 1.35.10 +- Use zlib-ng on Fedora but not RHEL. + +* Sat Aug 05 2023 Richard W.M. Jones - 1.35.9-1 +- New upstream development version 1.35.9 +- Disable libblkio on i686 (RHBZ#2229372) + +* Tue Aug 01 2023 Richard W.M. Jones - 1.35.8-1 +- New upstream development version 1.35.8 + +* Sun Jul 23 2023 Richard W.M. Jones - 1.35.7-2 +- New upstream development version 1.35.7 +- New nbdkit-qcow2dec-filter. + +* Thu Jul 20 2023 Fedora Release Engineering - 1.35.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 14 2023 Richard W.M. Jones - 1.35.6-1 +- New upstream development version 1.35.6 + +* Thu Jul 13 2023 Jitka Plesnikova - 1.35.5-6 +- Perl 5.38 re-rebuild updated packages + +* Wed Jul 12 2023 Richard W.M. Jones - 1.35.5-5 +- OCaml 5.0 rebuild for Fedora 39 + +* Tue Jul 11 2023 Jitka Plesnikova - 1.35.5-4 +- Perl 5.38 rebuild + +* Mon Jul 10 2023 Jerry James - 1.35.5-3 +- OCaml 5.0.0 rebuild + +* Tue Jul 04 2023 Python Maint - 1.35.5-2 +- Rebuilt for Python 3.12 + +* Mon Jun 12 2023 Richard W.M. Jones - 1.35.5-1 +- New upstream development version 1.35.5 + +* Mon Jun 05 2023 Richard W.M. Jones - 1.35.4-2 +- Migrated to SPDX license + +* Sun May 28 2023 Richard W.M. Jones - 1.35.4-1 +- New upstream development version 1.35.4 + +* Thu May 18 2023 Richard W.M. Jones - 1.35.3-1 +- New upstream development version 1.35.3 +- New plugin: ones +- New filter: evil + +* Wed May 10 2023 Richard W.M. Jones - 1.35.2-1 +- New upstream development version 1.35.2 + +* Sat Apr 29 2023 Richard W.M. Jones - 1.35.1-1 +- New upstream development version 1.35.1 + +* Tue Apr 18 2023 Richard W.M. Jones - 1.34.1-1 +- New upstream stable version 1.34.1 + +* Fri Apr 14 2023 Richard W.M. Jones - 1.34.0-1 +- New upstream stable version 1.34.0 + +* Thu Apr 13 2023 Richard W.M. Jones - 1.33.12-1 +- New upstream development version 1.33.12 + +* Thu Mar 09 2023 Richard W.M. Jones - 1.33.11-1 +- New upstream development version 1.33.11 + +* Tue Feb 28 2023 Richard W.M. Jones - 1.33.10-1 +- New upstream development version 1.33.10 + +* Sat Feb 25 2023 Richard W.M. Jones - 1.33.9-1 +- New upstream development version 1.33.9 + +* Tue Feb 07 2023 Richard W.M. Jones - 1.33.8-1 +- New upstream development version 1.33.8 + +* Tue Jan 24 2023 Richard W.M. Jones - 1.33.7-3 +- Rebuild OCaml packages for F38 + +* Thu Jan 19 2023 Fedora Release Engineering - 1.33.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jan 14 2023 Richard W.M. Jones - 1.33.7-1 +- New upstream development version 1.33.7 + +* Wed Jan 11 2023 Richard W.M. Jones - 1.33.6-1 +- New upstream development version 1.33.6 +- New plugin: nbdkit-blkio-plugin + +* Wed Jan 04 2023 Mamoru TASAKA - 1.33.5-2 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 + +* Tue Jan 03 2023 Richard W.M. Jones - 1.33.5-1 +- New upstream development version 1.33.5 + +* Sat Dec 03 2022 Richard W.M. Jones - 1.33.4-1 +- New upstream development version 1.33.4 + +* Fri Nov 18 2022 Richard W.M. Jones - 1.33.3-1 +- New upstream development version 1.33.3 + +* Tue Oct 11 2022 Richard W.M. Jones - 1.33.2-1 +- New upstream development version 1.33.2 + +* Thu Aug 18 2022 Richard W.M. Jones - 1.33.1-1 +- New upstream development version 1.33.1 + * Thu Aug 11 2022 Richard W.M. Jones - 1.32.1-1 - New upstream stable version 1.32.1 diff --git a/nbdkit.te b/nbdkit.te new file mode 100644 index 0000000..dbc518e --- /dev/null +++ b/nbdkit.te @@ -0,0 +1,100 @@ +policy_module(nbdkit, 1.0.0) + +######################################## +# +# Declarations +# + +gen_require(` + type unconfined_t; +') + +type nbdkit_t; +type nbdkit_exec_t; +application_domain(nbdkit_t, nbdkit_exec_t) +mcs_constrained(nbdkit_t) +role system_r types nbdkit_t; + +type nbdkit_home_t; +userdom_user_home_content(nbdkit_home_t) + +type nbdkit_tmp_t; +files_tmp_file(nbdkit_tmp_t) + +type nbdkit_unit_file_t; +systemd_unit_file(nbdkit_unit_file_t) + +permissive nbdkit_t; + +######################################## +# +# nbdkit local policy +# +allow nbdkit_t self:capability { setgid setuid }; +allow nbdkit_t self:fifo_file rw_fifo_file_perms; +allow nbdkit_t self:netlink_route_socket rw_netlink_socket_perms; +allow nbdkit_t self:process { fork setsockcreate signal_perms }; +allow nbdkit_t self:tcp_socket create_stream_socket_perms; +allow nbdkit_t self:udp_socket create_socket_perms; + +manage_dirs_pattern(nbdkit_t, nbdkit_tmp_t, nbdkit_tmp_t) +manage_files_pattern(nbdkit_t, nbdkit_tmp_t, nbdkit_tmp_t) +userdom_user_tmp_filetrans(nbdkit_t, nbdkit_tmp_t, { dir file }) + +manage_dirs_pattern(nbdkit_t, nbdkit_home_t, nbdkit_home_t) +manage_files_pattern(nbdkit_t, nbdkit_home_t, nbdkit_home_t) +userdom_user_home_dir_filetrans(nbdkit_t, nbdkit_home_t, { dir file }) + +corenet_tcp_connect_http_port(nbdkit_t) +corenet_tcp_connect_ssh_port(nbdkit_t) +corenet_tcp_connect_tftp_port(nbdkit_t) +corenet_tcp_bind_generic_port(nbdkit_t) +corenet_tcp_bind_generic_node(nbdkit_t) + +domain_use_interactive_fds(nbdkit_t) + +files_read_etc_files(nbdkit_t) + +init_abstract_socket_activation(nbdkit_t) +init_ioctl_stream_sockets(nbdkit_t) +init_rw_stream_sockets(nbdkit_t) + +optional_policy(` + auth_use_nsswitch(nbdkit_t) +') + +optional_policy(` + logging_send_syslog_msg(nbdkit_t) +') + +optional_policy(` + miscfiles_read_localization(nbdkit_t) + miscfiles_read_generic_certs(nbdkit_t) +') + +optional_policy(` + sysnet_dns_name_resolve(nbdkit_t) + sysnet_read_config(nbdkit_t) +') + +optional_policy(` + userdom_read_user_home_content_files(nbdkit_t) + userdom_use_inherited_user_ptys(nbdkit_t) +') + +optional_policy(` + virt_create_svirt_image_sock_files(nbdkit_t) + virt_read_qemu_pid_files(nbdkit_t) + virtlogd_rw_pipes(nbdkit_t) + virt_rw_svirt_image(nbdkit_t) + virt_rw_svirt_image_dirs(nbdkit_t) + virt_search_lib(nbdkit_t) + virt_stream_connect_svirt(nbdkit_t) +') + + +# FIXME: It would be nice to allow libvirt to transition nbdkit_exec_t to +# nbdkit_t when libvirtd was started manually from the commandline (i.e. in +# unconfined_t), but we don't want this transition to happen automatically +# when starting directly from the shell. I'm not sure how to achieve this... +#nbdkit_domtrans(unconfined_t, nbdkit_exec_t, nbdkit_t) diff --git a/sources b/sources index 9b62daa..f8f8acc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (nbdkit-1.32.1.tar.gz) = 01d4d653803491efa687c148ed01347c18856a4b1914c327960901a150fe6e33966c799365722b389e0501fdcfab3f29d4d988d55261f39913ab0f394ae61fee -SHA512 (nbdkit-1.32.1.tar.gz.sig) = 9357efd34e8e39238063d4ed26a15d95388fa1e1ff781b6dc1bc863f5e4fc00319be68040f18de9aca000800ee3f14de288c1889a6aea431536837ff551d0a12 +SHA512 (nbdkit-1.47.1.tar.gz) = 0c9d1da067bf1f7b6ba38dad33e86dff1fe893ff2e4a349dfcd6b259295fd00670e6af6c195e130d8a847520a78a730003315e60afda8eb94758e2195bd1a775 +SHA512 (nbdkit-1.47.1.tar.gz.sig) = 131d9bc191155186408ef7a577f9d2a2cc1fd1b53cbda755d19ff8de1341479a517fab79cc87f04a1bca5518046c24a8647cb4949d5c4d6fdca19ca968604c16