Disable nbdublk in RHEL

This commit is contained in:
Richard W.M. Jones 2023-03-09 13:09:07 +00:00
parent 74cbbf9efd
commit 886812b61b

View File

@ -46,9 +46,11 @@ BuildRequires: libxml2-devel
# For nbdfuse. # For nbdfuse.
BuildRequires: fuse3, fuse3-devel BuildRequires: fuse3, fuse3-devel
%if !0%{?rhel}
# For nbdublk # For nbdublk
BuildRequires: liburing-devel >= 2.2 BuildRequires: liburing-devel >= 2.2
BuildRequires: ubdsrv-devel >= 1.0-3.rc6 BuildRequires: ubdsrv-devel >= 1.0-3.rc6
%endif
# For the Python 3 bindings. # For the Python 3 bindings.
BuildRequires: python3-devel BuildRequires: python3-devel
@ -168,6 +170,7 @@ Recommends: fuse3
This package contains FUSE support for %{name}. This package contains FUSE support for %{name}.
%if !0%{?rhel}
%package -n nbdublk %package -n nbdublk
Summary: Userspace NBD block device Summary: Userspace NBD block device
License: LGPLv2+ License: LGPLv2+
@ -179,6 +182,7 @@ Recommends: %{_sbindir}/ublk
%description -n nbdublk %description -n nbdublk
This package contains a userspace NBD block device This package contains a userspace NBD block device
based on %{name}. based on %{name}.
%endif
%package bash-completion %package bash-completion
@ -227,6 +231,11 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
# Delete the golang man page since we're not distributing the bindings. # Delete the golang man page since we're not distributing the bindings.
rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3* rm $RPM_BUILD_ROOT%{_mandir}/man3/libnbd-golang.3*
%if 0%{?rhel}
# Delete nbdublk on RHEL.
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/nbdublk
%endif
%check %check
function skip_test () function skip_test ()
@ -330,9 +339,11 @@ make %{?_smp_mflags} check || {
%{_mandir}/man1/nbdfuse.1* %{_mandir}/man1/nbdfuse.1*
%if !0%{?rhel}
%files -n nbdublk %files -n nbdublk
%{_bindir}/nbdublk %{_bindir}/nbdublk
%{_mandir}/man1/nbdublk.1* %{_mandir}/man1/nbdublk.1*
%endif
%files bash-completion %files bash-completion
@ -342,7 +353,9 @@ make %{?_smp_mflags} check || {
%{_datadir}/bash-completion/completions/nbdfuse %{_datadir}/bash-completion/completions/nbdfuse
%{_datadir}/bash-completion/completions/nbdinfo %{_datadir}/bash-completion/completions/nbdinfo
%{_datadir}/bash-completion/completions/nbdsh %{_datadir}/bash-completion/completions/nbdsh
%if !0%{?rhel}
%{_datadir}/bash-completion/completions/nbdublk %{_datadir}/bash-completion/completions/nbdublk
%endif
%changelog %changelog