Compare commits

..

42 commits

Author SHA1 Message Date
Richard W.M. Jones
bbdd157e2a New upstream version 1.10.3.
(cherry picked from commit d99c935aaa)
2019-01-30 19:57:46 +00:00
Richard W.M. Jones
450e6a1746 New upstream version 1.10.2.
(cherry picked from commit 471f880fe0)
2019-01-28 14:23:37 +00:00
Richard W.M. Jones
4b3e48d1fd Skip some tests on Fedora 28 with old qemu-io. 2019-01-26 12:56:33 +00:00
Richard W.M. Jones
db1b509d0b Merge branch 'f29' into f28 2019-01-26 11:54:39 +00:00
Richard W.M. Jones
4f96ab3c63 New upstream version 1.10.1. 2019-01-26 11:44:19 +00:00
Richard W.M. Jones
12f8665dd9 New upstream version 1.10.0.
Add: nbdkit-full-plugin.
Add: nbdkit-xz-filter.
Add: nbdkit-loop(1) man page.
Remove misguided LDFLAGS hack which removed server hardening.
  https://bugzilla.redhat.com/show_bug.cgi?id=1624149#c6
2019-01-18 15:40:00 +00:00
Richard W.M. Jones
9b5201c40f New upstream version 1.8.3. 2019-01-07 10:12:40 +00:00
Richard W.M. Jones
3619f43b96 New upstream version 1.8.2.
Fix low priority security issue with TLS:
  https://www.redhat.com/archives/libguestfs/2018-December/msg00047.html
2018-12-04 10:31:05 +00:00
Richard W.M. Jones
f00f703ad9 New upstream version 1.4.4.
Fix low priority security issue with TLS:
  https://www.redhat.com/archives/libguestfs/2018-December/msg00047.html
2018-12-04 10:29:34 +00:00
Richard W.M. Jones
78cf7a5bf2 New upstream version 1.8.1. 2018-11-18 10:35:12 +00:00
Richard W.M. Jones
fe95877cec Rebase to new stable version 1.8.0. 2018-11-12 21:08:22 +00:00
Richard W.M. Jones
445543b141 nbdkit metapackage should depend on versioned -server subpackage etc.
Fixes commit b772c3dfae.

(cherry picked from commit bc6a311564)
2018-11-06 21:37:48 +00:00
Richard W.M. Jones
8d3bd5336c New upstream version 1.6.3. 2018-11-06 19:45:05 +00:00
Richard W.M. Jones
0d304537b0 New upstream version 1.6.2. 2018-09-18 23:43:42 +01:00
Richard W.M. Jones
dd850f548b New upstream version 1.6.1. 2018-09-08 10:47:13 +01:00
Richard W.M. Jones
7d41ebdfad New upstream version 1.4.3. 2018-08-19 11:23:54 +01:00
Richard W.M. Jones
559f31a603 Make nbdkit-plugin-tar require nbdkit-plugin-perl.
The tar plugin is written in Perl and so won't work unless the Perl
plugin is also installed.

This dependency should be generated automatically, but for now we add
it manually.

(cherry picked from commit eb867f6953)
2018-08-06 20:50:12 +01:00
Richard W.M. Jones
43bacc08c3 New upstream version 1.4.2. 2018-08-01 18:17:47 +01:00
Richard W.M. Jones
2037933f88 New upstream version 1.4.1.
Small refactorings in the spec file.
2018-07-20 14:58:35 +01:00
Richard W.M. Jones
d1bd233f4a Small refactorings in the spec file.
(cherry picked from commit 948daff1f0)
2018-07-20 14:57:37 +01:00
Richard W.M. Jones
31886771ce Remove patches which are now upstream.
Fixes commit 442c62b8e5.
2018-07-06 12:49:40 +01:00
Richard W.M. Jones
7c4f31f5c3 Reorder basic-filters %description alphabetically.
(cherry picked from commit f07a27aa88)
2018-07-06 12:48:42 +01:00
Richard W.M. Jones
442c62b8e5 New upstream version 1.4.0.
Add support for Tcl plugins.
New plugins: ext2, random, tcl, zero.
New filters: blocksize, fua, log, nozero.
New bash tab completion subpackage.
2018-07-06 12:48:07 +01:00
Richard W.M. Jones
6856676bd4 Add generic patches_touch_autotools mechanism for running autoreconf.
(cherry picked from commit 64dbc29874)
2018-07-01 16:38:43 +01:00
Richard W.M. Jones
cb86460bd2 Add more upstream patches since 1.2.4 was released. 2018-07-01 16:34:57 +01:00
Richard W.M. Jones
9f07358d79 Fix use of autosetup / autopatch macros.
See: http://rpm.org/user_doc/autosetup.html
(cherry picked from commit 3d5206894f)
2018-06-14 13:52:01 +01:00
Richard W.M. Jones
a09f2340e1 Fix Source URLs.
Correct the URLs for 1.2-stable branch.
2018-06-12 14:14:08 +01:00
Richard W.M. Jones
95070b5f76 Forgot to update Release field in previous commit. 2018-06-12 14:06:55 +01:00
Richard W.M. Jones
3130f5ec4b Add all upstream patches since 1.2.4 was released. 2018-06-12 13:58:54 +01:00
Richard W.M. Jones
fffade3981 Disable complete test suite on aarch64.
It was taking longer than a day to run the test suite on aarch64,
although it didn't seem to be hanging or failing, just being very very
slow.

(cherry picked from commit 622aabfee2)
2018-06-11 13:20:24 +01:00
Richard W.M. Jones
2f7d85fd85 Add upstream patch to fix tests when guestfish not available.
(cherry picked from commit 322c5a6b36)
2018-06-09 15:00:39 +01:00
Richard W.M. Jones
451663e6ac Enable tarball signing.
(cherry picked from commit 70cec0a451)
2018-06-09 14:41:01 +01:00
Richard W.M. Jones
cd71d8d33a New stable version 1.2.4.
Remove upstream patches.
2018-06-09 14:37:24 +01:00
Richard W.M. Jones
ee3fd0e5ef I hate automake, updates previous commit.
(cherry picked from commit 8c8e65fbc9)
2018-06-06 21:24:47 +01:00
Richard W.M. Jones
78e81666e0 BR automake unconditionally because we touch tests/Makefile.am in a patch.
(cherry picked from commit c7e1810498)
2018-06-06 21:24:44 +01:00
Richard W.M. Jones
2b58f2e7f5 Exclude HAVE_GUESTFISH code on incomplete test arches.
(cherry picked from commit e04cb2ed89)
2018-06-06 21:24:40 +01:00
Richard W.M. Jones
75e47a783b Add patch to fix the xz plugin test with recent guestfish.
(cherry picked from commit ba2c1c3cd1)
2018-06-06 21:24:36 +01:00
Richard W.M. Jones
c739c90a4a Add patch to work around libvirt problem with relative socket paths.
(cherry picked from commit 4bcef61e81)
2018-06-06 21:24:27 +01:00
Richard W.M. Jones
7622c61a59 New stable version 1.2.3. 2018-06-06 13:19:05 +01:00
Richard W.M. Jones
055d5bb77c New stable version 1.2.2. 2018-04-21 22:15:48 +01:00
Richard W.M. Jones
cda8370501 New stable version 1.2.1. 2018-04-09 19:29:44 +01:00
Richard W.M. Jones
06eb82a75f Move to stable branch version 1.2.0. 2018-04-06 13:25:43 +01:00
14 changed files with 471 additions and 2814 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
/clog
/nbdkit-*.tar.gz
/nbdkit-*.tar.gz.sig
/*~

View file

@ -1,31 +0,0 @@
From 4076ff58512ee98928b1bdb13274466b175e1a97 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
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

View file

@ -1,55 +0,0 @@
#!/bin/bash -
set -e
# Maintainer script to copy patches from the git repo to the current
# directory. Use it like this:
# ./copy-patches.sh
rhel_version=8.3
# Check we're in the right directory.
if [ ! -f nbdkit.spec ]; then
echo "$0: run this from the directory containing 'nbdkit.spec'"
exit 1
fi
git_checkout=$HOME/d/nbdkit-rhel-$rhel_version
if [ ! -d $git_checkout ]; then
echo "$0: $git_checkout does not exist"
echo "This script is only for use by the maintainer when preparing a"
echo "nbdkit release on RHEL."
exit 1
fi
# Get the base version of nbdkit.
version=`grep '^Version:' nbdkit.spec | awk '{print $2}'`
tag="v$version"
# Remove any existing patches.
git rm -f [0-9]*.patch ||:
rm -f [0-9]*.patch
# Get the patches.
(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N $tag)
mv $git_checkout/[0-9]*.patch .
# Remove any not to be applied.
rm -f *NOT-FOR-RPM*.patch
# Add the patches.
git add [0-9]*.patch
# Print out the patch lines.
echo
echo "--- Copy the following text into nbdkit.spec file"
echo
echo "# Patches."
for f in [0-9]*.patch; do
n=`echo $f | awk -F- '{print $1}'`
echo "Patch$n: $f"
done
echo
echo "--- End of text"

View file

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

Binary file not shown.

View file

@ -1,23 +0,0 @@
#!/bin/bash -
# Generate RPM provides automatically for nbdkit packages and filters.
# Copyright (C) 2009-2022 Red Hat Inc.
# To test:
# find /usr/lib64/nbdkit/plugins | ./nbdkit-find-provides VER REL
# find /usr/lib64/nbdkit/filters | ./nbdkit-find-provides VER REL
ver="$1"
rel="$2"
function process_file
{
if [[ $1 =~ /plugins/nbdkit-.*-plugin ]] ||
[[ $1 =~ /filters/nbdkit-.*-filter ]]; then
echo "Provides:" "$(basename $1 .so)" "=" "$ver-$rel"
fi
}
while read line; do
process_file "$line"
done

View file

@ -1,3 +0,0 @@
%__nbdkit_provides %{_rpmconfigdir}/nbdkit-find-provides %{version} %{release}
%__nbdkit_path %{_libdir}/nbdkit/(plugins|filters)/nbdkit-.*-(plugin|filter)(\.so)?$
%__nbdkit_flags exeonly

View file

@ -1,3 +0,0 @@
/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)

207
nbdkit.if
View file

@ -1,207 +0,0 @@
## <summary>policy for nbdkit</summary>
########################################
## <summary>
## Execute nbdkit_exec_t in the nbdkit domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`nbdkit_domtrans',`
gen_require(`
type nbdkit_t, nbdkit_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, nbdkit_exec_t, nbdkit_t)
')
######################################
## <summary>
## Execute nbdkit in the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`nbdkit_exec',`
gen_require(`
type nbdkit_exec_t;
')
corecmd_search_bin($1)
can_exec($1, nbdkit_exec_t)
')
########################################
## <summary>
## Execute nbdkit in the nbdkit domain, and
## allow the specified role the nbdkit domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition
## </summary>
## </param>
## <param name="role">
## <summary>
## The role to be allowed the nbdkit domain.
## </summary>
## </param>
#
interface(`nbdkit_run',`
gen_require(`
type nbdkit_t;
attribute_role nbdkit_roles;
')
nbdkit_domtrans($1)
roleattribute $2 nbdkit_roles;
')
########################################
## <summary>
## Role access for nbdkit
## </summary>
## <param name="role">
## <summary>
## Role allowed access
## </summary>
## </param>
## <param name="domain">
## <summary>
## User domain for the role
## </summary>
## </param>
#
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 };
')
########################################
## <summary>
## Allow attempts to connect to nbdkit
## with a unix stream socket.
## </summary>
## <param name="domain">
## <summary>
## Domain to not audit.
## </summary>
## </param>
#
interface(`nbdkit_stream_connect',`
gen_require(`
type nbdkit_t;
')
allow $1 nbdkit_t:unix_stream_socket connectto;
')
########################################
## <summary>
## Allow nbdkit_exec_t to be an entrypoint
## of the specified domain
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
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.
#
########################################
## <summary>
## Read and write to svirt_image dirs.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
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;
')
')
########################################
## <summary>
## Create svirt_image sock_files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
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;
')
')
########################################
## <summary>
## Read and write virtlogd pipes.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
ifndef(`virtlogd_rw_pipes',`
interface(`virtlogd_rw_pipes',`
gen_require(`
type virtlogd_t;
')
allow $1 virtlogd_t:fifo_file rw_fifo_file_perms;
')
')

File diff suppressed because it is too large Load diff

100
nbdkit.te
View file

@ -1,100 +0,0 @@
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)

View file

@ -1,2 +1,2 @@
SHA512 (nbdkit-1.47.1.tar.gz) = 0c9d1da067bf1f7b6ba38dad33e86dff1fe893ff2e4a349dfcd6b259295fd00670e6af6c195e130d8a847520a78a730003315e60afda8eb94758e2195bd1a775
SHA512 (nbdkit-1.47.1.tar.gz.sig) = 131d9bc191155186408ef7a577f9d2a2cc1fd1b53cbda755d19ff8de1341479a517fab79cc87f04a1bca5518046c24a8647cb4949d5c4d6fdca19ca968604c16
SHA512 (nbdkit-1.10.3.tar.gz) = 8faed51b89c020ed480eb8c1e16ac628471cd62638a2a0ac993bf16f286ad9938532bf73c2d780a7dd0f13cabe38c3ccd2e2647ef88b7163287e02ceb1cc1b41
SHA512 (nbdkit-1.10.3.tar.gz.sig) = fb4929454b43fb08367972f9a46892e36300f38dc3e02597b2f5e32c91ef626d2f5a4999a8c489077e78e8cdfa73c0ee95ffa3fa47c8689f5838ca97df8b7d59

View file

@ -1,6 +0,0 @@
#!/bin/bash -
set -e
set -x
# Run nbdkit and check that nbdinfo can connect back to it.
nbdkit -U - memory 1G --run 'nbdinfo "$uri"'

View file

@ -1,12 +0,0 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- libnbd
- nbdkit
tests:
- simple:
dir: .
run: ./basic-test.sh