!2 nbdkit: Fixed format for spec file

Merge pull request !2 from gnaygnil/master
This commit is contained in:
openeuler-ci-bot 2020-04-03 14:01:46 +08:00 committed by Gitee
commit cf7c15da6e
3 changed files with 180 additions and 451 deletions

View File

@ -1,36 +0,0 @@
# nbdkit
#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,39 +0,0 @@
# nbdkit
#### 介绍
{**以下是码云平台说明,您可以替换此简介**
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,57 +1,26 @@
%global _hardened_build 1 %global _hardened_build 1
%ifarch aarch64 x86_64
%global have_libguestfs 1
%endif
%global complete_test_arches x86_64 %global complete_test_arches x86_64
%if 0%{?rhel} != 7
%global have_python3 1
%endif
%ifnarch riscv64
%global have_libvirt 1
%endif
%global verify_tarball_signature 1
%global patches_touch_autotools %{nil} %global patches_touch_autotools %{nil}
Name: nbdkit Name: nbdkit
Version: 1.6.2 Version: 1.6.2
Release: 2 Release: 3
Summary: NBD server Summary: NBD server
License: BSD License: BSD
URL: https://github.com/libguestfs/nbdkit URL: https://github.com/libguestfs/nbdkit
Source0: http://libguestfs.org/download/nbdkit/1.6-stable/%{name}-%{version}.tar.gz Source0: http://libguestfs.org/download/nbdkit/1.6-stable/nbdkit-%{version}.tar.gz
%if 0%{verify_tarball_signature} Source1: http://libguestfs.org/download/nbdkit/1.6-stable/nbdkit-%{version}.tar.gz.sig
Source1: http://libguestfs.org/download/nbdkit/1.6-stable/%{name}-%{version}.tar.gz.sig
Source2: libguestfs.keyring Source2: libguestfs.keyring
%endif
%if 0%{patches_touch_autotools} %if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool BuildRequires: autoconf, automake, libtool
%endif %endif
%if 0%{?rhel} == 7
ExclusiveArch: x86_64
%endif
%ifnarch %{complete_test_arches} %ifnarch %{complete_test_arches}
BuildRequires: autoconf, automake, libtool BuildRequires: autoconf, automake, libtool
%endif %endif
BuildRequires: /usr/bin/pod2man gnutls-devel libselinux-devel BuildRequires: gnutls gnutls-devel libselinux-devel python3-devel gnupg2 lua-devel socat iproute
%if 0%{?have_libguestfs} BuildRequires: libguestfs-devel libvirt-devel xz-devel zlib-devel libcurl-devel e2fsprogs-devel
BuildRequires: libguestfs-devel BuildRequires: bash-completion perl-devel perl(ExtUtils::Embed) python2-devel ocaml >= 4.02.2
%endif BuildRequires: ruby-devel tcl-devel perl-podlators qemu-img
%if 0%{?have_libvirt}
BuildRequires: libvirt-devel
%endif
BuildRequires: xz-devel zlib-devel libcurl-devel e2fsprogs-devel
BuildRequires: bash-completion perl-devel perl(ExtUtils::Embed) python2-devel
%if 0%{?have_python3}
BuildRequires: python3-devel
%endif
BuildRequires: ocaml >= 4.02.2 ruby-devel tcl-devel lua-devel
%if 0%{verify_tarball_signature}
BuildRequires: gnupg2
%endif
BuildRequires: /usr/bin/certtool /usr/bin/qemu-img
BuildRequires: /usr/bin/socat /usr/sbin/ss
Requires: nbdkit-server nbdkit-basic-plugins nbdkit-basic-filters Requires: nbdkit-server nbdkit-basic-plugins nbdkit-basic-filters
%description %description
@ -64,31 +33,27 @@ The key features are:
Allows you to export "unconventional" block devices easily. Allows you to export "unconventional" block devices easily.
* Liberal license (BSD) allows nbdkit to be linked to proprietary * Liberal license (BSD) allows nbdkit to be linked to proprietary
braries or included in proprietary code. braries or included in proprietary code.
In Fedora, '%{name}' is a meta-package which pulls in the core server In Fedora, 'nbdkit' is a meta-package which pulls in the core server
and a useful subset of plugins and filters. and a useful subset of plugins and filters.
If you want just the server, install '%{name}-server'. If you want just the server, install 'nbdkit-server'.
To develop plugins, install the '%{name}-devel' package and start by To develop plugins, install the 'nbdkit-devel' package and start by
reading the nbdkit(1) and nbdkit-plugin(3) manual pages. reading the nbdkit(1) and nbdkit-plugin(3) manual pages.
%package server %package server
Summary: The %{name} server Summary: The nbdkit server
License: BSD License: BSD
%description server %description server
This package contains the %{name} server with no plugins or filters. This package contains the nbdkit server with no plugins or filters.
%package basic-plugins %package basic-plugins
Summary: Basic plugins for %{name} Summary: Basic plugins for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Obsoletes: %{name}-plugin-file < 1.1.19-1 Obsoletes: nbdkit-plugin-file < 1.1.19-1 nbdkit-plugin-nbd < 1.1.19-1 nbdkit-plugin-streaming < 1.1.19-1
Obsoletes: %{name}-plugin-nbd < 1.1.19-1
Obsoletes: %{name}-plugin-streaming < 1.1.19-1
%description basic-plugins %description basic-plugins
This package contains some basic plugins for %{name} which have only This package contains some basic plugins for nbdkit which have only
trivial dependencies. trivial dependencies.
* nbdkit-data-plugin * nbdkit-data-plugin
Serve small files directly from the command line. Serve small files directly from the command line.
@ -117,162 +82,138 @@ trivial dependencies.
* nbdkit-zero-plugin * nbdkit-zero-plugin
Zero-length plugin for testing. Zero-length plugin for testing.
%package plugins %package plugins
Summary: Plugins set Summary: Plugins set
License: BSD License: BSD
Provides: %{name}-example-plugins Provides: nbdkit-example-plugins nbdkit-curl-plugin nbdkit-plugin-curl = %{version}-%{release}
Obsoletes: %{name}-example-plugins %{name}-plugin-examples < 1.1.19-1 Provides: nbdkit-ext2-plugin nbdkit-plugin-ext2 = %{version}-%{release}
Provides: %{name}-curl-plugin %{name}-plugin-curl = %{version}-%{release} Provides: nbdkit-gzip-plugin nbdkit-plugin-gzip = %{version}-%{release}
Obsoletes: %{name}-curl-plugin %{name}-plugin-curl <= %{version}-%{release} Provides: nbdkit-lua-plugin nbdkit-plugin-lua = %{version}-%{release}
Provides: %{name}-ext2-plugin %{name}-plugin-ext2 = %{version}-%{release} Provides: nbdkit-ruby-plugin nbdkit-plugin-ruby = %{version}-%{release}
Obsoletes: %{name}-ext2-plugin %{name}-plugin-ext2 <= %{version}-%{release} Provides: nbdkit-tar-plugin nbdkit-plugin-tar = %{version}-%{release}
Provides: %{name}-gzip-plugin %{name}-plugin-gzip = %{version}-%{release} Provides: nbdkit-tcl-plugin nbdkit-plugin-tcl = %{version}-%{release}
Obsoletes: %{name}-gzip-plugin %{name}-plugin-gzip <= %{version}-%{release} Provides: nbdkit-xz-plugin nbdkit-plugin-xz = %{version}-%{release}
Provides: %{name}-lua-plugin %{name}-plugin-lua = %{version}-%{release} Obsoletes: nbdkit-example-plugins nbdkit-plugin-examples < 1.1.19-1
Obsoletes: %{name}-lua-plugin %{name}-plugin-lua <= %{version}-%{release} Obsoletes: nbdkit-curl-plugin nbdkit-plugin-curl <= %{version}-%{release}
Provides: %{name}-ruby-plugin %{name}-plugin-ruby = %{version}-%{release} Obsoletes: nbdkit-ext2-plugin nbdkit-plugin-ext2 <= %{version}-%{release}
Obsoletes: %{name}-ruby-plugin %{name}-plugin-ruby <= %{version}-%{release} Obsoletes: nbdkit-gzip-plugin nbdkit-plugin-gzip <= %{version}-%{release}
Provides: %{name}-tar-plugin %{name}-plugin-tar = %{version}-%{release} Obsoletes: nbdkit-lua-plugin nbdkit-plugin-lua <= %{version}-%{release}
Obsoletes: %{name}-tar-plugin %{name}-plugin-tar <= %{version}-%{release} Obsoletes: nbdkit-ruby-plugin nbdkit-plugin-ruby <= %{version}-%{release}
Provides: %{name}-tcl-plugin %{name}-plugin-tcl = %{version}-%{release} Obsoletes: nbdkit-tar-plugin nbdkit-plugin-tar <= %{version}-%{release}
Obsoletes: %{name}-tcl-plugin %{name}-plugin-tcl <= %{version}-%{release} Obsoletes: nbdkit-tcl-plugin nbdkit-plugin-tcl <= %{version}-%{release}
Provides: %{name}-xz-plugin %{name}-plugin-xz = %{version}-%{release} Obsoletes: nbdkit-xz-plugin nbdkit-plugin-xz <= %{version}-%{release}
Obsoletes: %{name}-xz-plugin %{name}-plugin-xz <= %{version}-%{release} Requires: nbdkit-server = %{version}-%{release} nbdkit-perl-plugin
Requires: %{name}-server%{?_isa} = %{version}-%{release}
Requires: %{name}-perl-plugin
%description plugins %description plugins
This package contains a set of plugins for %{name}. This package contains a set of plugins for nbdkit.
%if 0%{?have_libguestfs}
%package guestfs-plugin %package guestfs-plugin
Summary: libguestfs plugin for %{name} Summary: libguestfs plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Provides: %{name}-plugin-guestfs = %{version}-%{release} Provides: nbdkit-plugin-guestfs = %{version}-%{release}
Obsoletes: %{name}-plugin-guestfs <= %{version}-%{release} Obsoletes: nbdkit-plugin-guestfs <= %{version}-%{release}
%description guestfs-plugin %description guestfs-plugin
This package is a libguestfs plugin for %{name}. This package is a libguestfs plugin for nbdkit.
%endif
%if 0%{?have_libvirt}
%package libvirt-plugin %package libvirt-plugin
Summary: Libvirt plugin for %{name} Summary: Libvirt plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Provides: %{name}-plugin-libvirt = %{version}-%{release} Provides: nbdkit-plugin-libvirt = %{version}-%{release}
Obsoletes: %{name}-plugin-libvirt <= %{version}-%{release} Obsoletes: nbdkit-plugin-libvirt <= %{version}-%{release}
%description libvirt-plugin %description libvirt-plugin
This package is a libvirt plugin for %{name}. It lets you access This package is a libvirt plugin for nbdkit. It lets you access
libvirt guest disks readonly. It is implemented using the libvirt libvirt guest disks readonly. It is implemented using the libvirt
virDomainBlockPeek API. virDomainBlockPeek API.
%endif
%package ocaml-plugin %package ocaml-plugin
Summary: OCaml plugin for %{name} Summary: OCaml plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Provides: %{name}-plugin-ocaml = %{version}-%{release} Provides: nbdkit-plugin-ocaml = %{version}-%{release}
Obsoletes: %{name}-plugin-ocaml <= %{version}-%{release} Obsoletes: nbdkit-plugin-ocaml <= %{version}-%{release}
%description ocaml-plugin %description ocaml-plugin
This package lets you run OCaml plugins for %{name}. This package lets you run OCaml plugins for nbdkit.
To compile OCaml plugins you will also need to install To compile OCaml plugins you will also need to install
%{name}-ocaml-plugin-devel. nbdkit-ocaml-plugin-devel.
%package ocaml-plugin-devel %package ocaml-plugin-devel
Summary: OCaml development environment for %{name} Summary: OCaml development environment for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release} nbdkit-ocaml-plugin = %{version}-%{release}
Requires: %{name}-ocaml-plugin%{?_isa} = %{version}-%{release} Provides: nbdkit-plugin-ocaml-devel = %{version}-%{release}
Provides: %{name}-plugin-ocaml-devel = %{version}-%{release} Obsoletes: nbdkit-plugin-ocaml-devel <= %{version}-%{release}
Obsoletes: %{name}-plugin-ocaml-devel <= %{version}-%{release}
%description ocaml-plugin-devel %description ocaml-plugin-devel
This package lets you write OCaml plugins for %{name}. This package lets you write OCaml plugins for nbdkit.
%package perl-plugin %package perl-plugin
Summary: Perl plugin for %{name} Summary: Perl plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Provides: %{name}-plugin-perl = %{version}-%{release} Provides: nbdkit-plugin-perl = %{version}-%{release}
Obsoletes: %{name}-plugin-perl <= %{version}-%{release} Obsoletes: nbdkit-plugin-perl <= %{version}-%{release}
%description perl-plugin %description perl-plugin
This package lets you write Perl plugins for %{name}. This package lets you write Perl plugins for nbdkit.
%package python-plugin-common %package python-plugin-common
Summary: Python 2 and 3 plugin common files for %{name} Summary: Python 2 and 3 plugin common files for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Provides: %{name}-plugin-python-common = %{version}-%{release} Provides: nbdkit-plugin-python-common = %{version}-%{release}
Obsoletes: %{name}-plugin-python-common <= %{version}-%{release} Obsoletes: nbdkit-plugin-python-common <= %{version}-%{release}
%description python-plugin-common %description python-plugin-common
This package contains common files shared between Python 2 This package contains common files shared between Python 2
and Python 3 %{name} plugins. and Python 3 nbdkit plugins.
You should not install this package directly. Instead install You should not install this package directly. Instead install
either %{name}-python2-plugin or %{name}-python3-plugin. either nbdkit-python2-plugin or nbdkit-python3-plugin.
%package python2-plugin %package python2-plugin
Summary: Python 2 plugin for %{name} Summary: Python 2 plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release} nbdkit-python-plugin-common = %{version}-%{release}
Requires: %{name}-python-plugin-common = %{version}-%{release} Provides: nbdkit-plugin-python = %{version}-%{release} nbdkit-plugin-python2 = %{version}-%{release}
Provides: %{name}-plugin-python = %{version}-%{release} Obsoletes: nbdkit-plugin-python <= %{version}-%{release} nbdkit-plugin-python2 <= %{version}-%{release}
Provides: %{name}-plugin-python2 = %{version}-%{release}
Obsoletes: %{name}-plugin-python <= %{version}-%{release}
Obsoletes: %{name}-plugin-python2 <= %{version}-%{release}
%description python2-plugin %description python2-plugin
This package lets you write Python 2 plugins for %{name}. This package lets you write Python 2 plugins for nbdkit.
%if 0%{?have_python3}
%package python3-plugin %package python3-plugin
Summary: Python 3 plugin for %{name} Summary: Python 3 plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release} nbdkit-python-plugin-common = %{version}-%{release}
Requires: %{name}-python-plugin-common = %{version}-%{release} Provides: nbdkit-plugin-python3 = %{version}-%{release}
Provides: %{name}-plugin-python3 = %{version}-%{release} Obsoletes: nbdkit-plugin-python3 <= %{version}-%{release}
Obsoletes: %{name}-plugin-python3 <= %{version}-%{release}
%description python3-plugin %description python3-plugin
This package lets you write Python 3 plugins for %{name}. This package lets you write Python 3 plugins for nbdkit.
%endif
%ifarch x86_64 %ifarch x86_64
%package vddk-plugin %package vddk-plugin
Summary: VMware VDDK plugin for %{name} Summary: VMware VDDK plugin for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
Provides: %{name}-plugin-vddk = %{version}-%{release} Provides: nbdkit-plugin-vddk = %{version}-%{release}
Obsoletes: %{name}-plugin-vddk <= %{version}-%{release} Obsoletes: nbdkit-plugin-vddk <= %{version}-%{release}
%description vddk-plugin %description vddk-plugin
This package is a plugin for %{name} which connects to This package is a plugin for nbdkit which connects to
VMware VDDK for accessing VMware disks and servers. VMware VDDK for accessing VMware disks and servers.
%endif %endif
%package basic-filters %package basic-filters
Summary: Basic filters for %{name} Summary: Basic filters for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release}
%description basic-filters %description basic-filters
This package contains some basic filters for %{name} which have only This package contains some basic filters for nbdkit which have only
trivial dependencies. trivial dependencies.
* nbdkit-blocksize-filter * nbdkit-blocksize-filter
Adjust block size of requests sent to plugins. Adjust block size of requests sent to plugins.
@ -298,43 +239,35 @@ trivial dependencies.
Truncate, expand, round up or round down a plugin size. Truncate, expand, round up or round down a plugin size.
%package devel %package devel
Summary: Development files and documentation for %{name} Summary: Development files and documentation for nbdkit
License: BSD License: BSD
Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: nbdkit-server = %{version}-%{release} pkgconfig
Requires: pkgconfig
%description devel %description devel
This package contains development files and documentation This package contains development files and documentation
for %{name}. Install this package if you want to develop for nbdkit. Install this package if you want to develop
plugins for %{name}. plugins for nbdkit.
%package bash-completion %package bash-completion
Summary: Bash tab-completion for %{name} Summary: Bash tab-completion for nbdkit
BuildArch: noarch BuildArch: noarch
Requires: bash-completion >= 2.0 Requires: bash-completion >= 2.0 nbdkit-server = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
%description bash-completion %description bash-completion
Install this package if you want intelligent bash tab-completion Install this package if you want intelligent bash tab-completion
for %{name}. for nbdkit.
%package help %package help
Summary: Documents for %{name} Summary: Documents for nbdkit
Buildarch: noarch Buildarch: noarch
Requires: man info Requires: man info
%description help %description help
Man pages and other related documents for %{name} Man pages and other related documents for nbdkit
%prep %prep
%if 0%{verify_tarball_signature}
tmphome="$(mktemp -d)" tmphome="$(mktemp -d)"
gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%endif
%autosetup -p1 %autosetup -p1
%if 0%{patches_touch_autotools} %if 0%{patches_touch_autotools}
autoreconf -i autoreconf -i
@ -346,53 +279,24 @@ sed -i -e '/^if HAVE_GUESTFISH/,/^endif HAVE_GUESTFISH/d' tests/Makefile.am
autoreconf -i autoreconf -i
%endif %endif
%build %build
export LDFLAGS="$LDFLAGS -Wl,-z,now" export LDFLAGS="$LDFLAGS -Wl,-z,now"
copy="$(mktemp -d)" copy="$(mktemp -d)"
cp -a . "$copy" cp -a . "$copy"
mv "$copy" python3 mv "$copy" python3
%configure --disable-static --with-libguestfs --with-libvirt --with-tls-priority=@NBDKIT,SYSTEM
%make_build
%configure \
--disable-static \
%if 0%{?have_libguestfs}
--with-libguestfs \
%else
--without-libguestfs \
%endif
%if 0%{?have_libvirt}
--with-libvirt \
%else
--without-libvirt \
%endif
--with-tls-priority=@NBDKIT,SYSTEM
make %{?_smp_mflags}
%if 0%{?have_python3}
pushd python3 pushd python3
export PYTHON=%{_bindir}/python3 export PYTHON=%{_bindir}/python3
%configure \ %configure --disable-static --disable-lua --disable-perl --disable-ocaml --disable-ruby --disable-tcl \
--disable-static \ --without-curl --without-ext2 --without-libvirt --without-liblzma --without-zlib
--disable-lua \
--disable-perl \
--disable-ocaml \
--disable-ruby \
--disable-tcl \
--without-curl \
--without-ext2 \
--without-libvirt \
--without-liblzma \
--without-zlib
grep '^PYTHON_VERSION = 3' Makefile grep '^PYTHON_VERSION = 3' Makefile
make %{?_smp_mflags} %make_build
unset PYTHON unset PYTHON
popd popd
%endif
%install %install
%if 0%{?have_python3}
pushd python3 pushd python3
%make_install %make_install
popd popd
@ -400,8 +304,6 @@ popd
pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/ pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/
mv nbdkit-python-plugin.so nbdkit-python3-plugin.so mv nbdkit-python-plugin.so nbdkit-python3-plugin.so
popd popd
%endif
%make_install %make_install
pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/ pushd $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/
@ -411,26 +313,21 @@ popd
find $RPM_BUILD_ROOT -name '*.la' -delete find $RPM_BUILD_ROOT -name '*.la' -delete
%ifnarch %{ix86} x86_64 %ifnarch x86_64
rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/nbdkit-vddk-plugin.so rm $RPM_BUILD_ROOT%{_libdir}/nbdkit/plugins/nbdkit-vddk-plugin.so
rm $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-vddk-plugin.1* rm $RPM_BUILD_ROOT%{_mandir}/man1/nbdkit-vddk-plugin.1*
%endif %endif
%check %check
mkdir -p $HOME/.cache/libvirt mkdir -p $HOME/.cache/libvirt
export LIBGUESTFS_DEBUG=1 export LIBGUESTFS_DEBUG=1
export LIBGUESTFS_TRACE=1 export LIBGUESTFS_TRACE=1
make check -j1 || { make check -j1 || {
cat tests/test-suite.log cat tests/test-suite.log
exit 1 exit 1
} }
%ifarch %{complete_test_arches} %ifarch %{complete_test_arches}
%if 0%{?have_libguestfs}
%if 0%{?have_python3}
pushd python3 pushd python3
make check -j1 -C tests TESTS=test-python || { make check -j1 -C tests TESTS=test-python || {
cat tests/test-suite.log cat tests/test-suite.log
@ -438,129 +335,74 @@ make check -j1 -C tests TESTS=test-python || {
} }
popd popd
%endif %endif
%endif
%endif
%ldconfig_scriptlets plugin-ocaml %post ocaml-plugin -p /sbin/ldconfig
%postun ocaml-plugin -p /sbin/ldconfig
%files %files
%files server %files server
%doc README %doc README LICENSE
%license LICENSE
%{_sbindir}/nbdkit %{_sbindir}/nbdkit
%dir %{_libdir}/%{name} %dir %{_libdir}/nbdkit/{plugins,filters}
%dir %{_libdir}/%{name}/plugins
%dir %{_libdir}/%{name}/filters
%files basic-plugins %files basic-plugins
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/plugins/{nbdkit-data-plugin.so,nbdkit-file-plugin.so,nbdkit-memory-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-data-plugin.so %{_libdir}/nbdkit/plugins/{nbdkit-nbd-plugin.so,nbdkit-null-plugin.so,nbdkit-pattern-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-file-plugin.so %{_libdir}/nbdkit/plugins/{nbdkit-random-plugin.so,nbdkit-split-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-memory-plugin.so %{_libdir}/nbdkit/plugins/{nbdkit-streaming-plugin.so,nbdkit-zero-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-nbd-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-null-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-pattern-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-random-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-split-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-streaming-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-zero-plugin.so
%files plugins %files plugins
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/plugins/{nbdkit-example*-plugin.so,nbdkit-example4-plugin,nbdkit-curl-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-example*-plugin.so %{_libdir}/nbdkit/plugins/{nbdkit-ext2-plugin.so,nbdkit-gzip-plugin.so,nbdkit-lua-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-example4-plugin %{_libdir}/nbdkit/plugins/{nbdkit-ruby-plugin.so,nbdkit-tar-plugin,nbdkit-tcl-plugin.so,nbdkit-xz-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-curl-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-ext2-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-gzip-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-lua-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-ruby-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-tar-plugin
%{_libdir}/%{name}/plugins/nbdkit-tcl-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-xz-plugin.so
%if 0%{?have_libguestfs}
%files guestfs-plugin %files guestfs-plugin
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/plugins/nbdkit-guestfs-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-guestfs-plugin.so
%{_mandir}/man1/nbdkit-guestfs-plugin.1*
%endif
%if 0%{?have_libvirt}
%files libvirt-plugin %files libvirt-plugin
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/plugins/nbdkit-libvirt-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-libvirt-plugin.so
%{_mandir}/man1/nbdkit-libvirt-plugin.1*
%endif
%files ocaml-plugin %files ocaml-plugin
%doc README %doc README LICENSE
%license LICENSE
%{_libdir}/libnbdkitocaml.so.* %{_libdir}/libnbdkitocaml.so.*
%files ocaml-plugin-devel %files ocaml-plugin-devel
%{_libdir}/libnbdkitocaml.so %{_libdir}/libnbdkitocaml.so
%{_libdir}/ocaml/NBDKit.* %{_libdir}/ocaml/NBDKit.*
%files perl-plugin %files perl-plugin
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/plugins/nbdkit-perl-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-perl-plugin.so
%files python-plugin-common %files python-plugin-common
%doc README %doc README LICENSE
%license LICENSE
%files python2-plugin %files python2-plugin
%{_libdir}/%{name}/plugins/nbdkit-python-plugin.so %{_libdir}/nbdkit/plugins/{nbdkit-python-plugin.so,nbdkit-python2-plugin.so}
%{_libdir}/%{name}/plugins/nbdkit-python2-plugin.so
%if 0%{?have_python3}
%files python3-plugin %files python3-plugin
%{_libdir}/%{name}/plugins/nbdkit-python3-plugin.so %{_libdir}/nbdkit/plugins/nbdkit-python3-plugin.so
%endif
%ifarch x86_64 %ifarch x86_64
%files vddk-plugin %files vddk-plugin
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/plugins/nbdkit-vddk-plugin.so
%{_libdir}/%{name}/plugins/nbdkit-vddk-plugin.so
%{_mandir}/man1/nbdkit-vddk-plugin.1*
%endif %endif
%files basic-filters %files basic-filters
%doc README %doc README LICENSE
%license LICENSE %{_libdir}/nbdkit/filters/{nbdkit-blocksize-filter.so,nbdkit-cache-filter.so,nbdkit-cow-filter.so}
%{_libdir}/%{name}/filters/nbdkit-blocksize-filter.so %{_libdir}/nbdkit/filters/{nbdkit-delay-filter.so,nbdkit-error-filter.so,nbdkit-fua-filter.so}
%{_libdir}/%{name}/filters/nbdkit-cache-filter.so %{_libdir}/nbdkit/filters/{nbdkit-log-filter.so,nbdkit-nozero-filter.so,nbdkit-offset-filter.so}
%{_libdir}/%{name}/filters/nbdkit-cow-filter.so %{_libdir}/nbdkit/filters/{nbdkit-partition-filter.so,nbdkit-truncate-filter.so}
%{_libdir}/%{name}/filters/nbdkit-delay-filter.so
%{_libdir}/%{name}/filters/nbdkit-error-filter.so
%{_libdir}/%{name}/filters/nbdkit-fua-filter.so
%{_libdir}/%{name}/filters/nbdkit-log-filter.so
%{_libdir}/%{name}/filters/nbdkit-nozero-filter.so
%{_libdir}/%{name}/filters/nbdkit-offset-filter.so
%{_libdir}/%{name}/filters/nbdkit-partition-filter.so
%{_libdir}/%{name}/filters/nbdkit-truncate-filter.so
%files devel %files devel
%doc OTHER_PLUGINS README TODO %doc OTHER_PLUGINS README TODO LICENSE
%license LICENSE
%doc plugins/example*/*.c %doc plugins/example*/*.c
%doc plugins/example4/nbdkit-example4-plugin %doc plugins/example4/nbdkit-example4-plugin
%doc plugins/lua/example.lua %doc plugins/lua/example.lua
@ -573,56 +415,18 @@ popd
%{_includedir}/nbdkit-plugin.h %{_includedir}/nbdkit-plugin.h
%{_libdir}/pkgconfig/nbdkit.pc %{_libdir}/pkgconfig/nbdkit.pc
%files bash-completion %files bash-completion
%license LICENSE %doc LICENSE
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/nbdkit %{_datadir}/bash-completion/completions/nbdkit
%files help %files help
%{_mandir}/man1/nbdkit.1* %{_mandir}/man1/nbdkit*.1*
%{_mandir}/man1/nbdkit-captive.1* %{_mandir}/man3/nbdkit-*.3*
%{_mandir}/man1/nbdkit-probing.1*
%{_mandir}/man1/nbdkit-protocol.1*
%{_mandir}/man1/nbdkit-service.1*
%{_mandir}/man1/nbdkit-tls.1*
%{_mandir}/man1/nbdkit-data-plugin.1*
%{_mandir}/man1/nbdkit-file-plugin.1*
%{_mandir}/man1/nbdkit-memory-plugin.1*
%{_mandir}/man1/nbdkit-nbd-plugin.1*
%{_mandir}/man1/nbdkit-null-plugin.1*
%{_mandir}/man1/nbdkit-pattern-plugin.1*
%{_mandir}/man1/nbdkit-random-plugin.1*
%{_mandir}/man1/nbdkit-split-plugin.1*
%{_mandir}/man1/nbdkit-streaming-plugin.1*
%{_mandir}/man1/nbdkit-zero-plugin.1*
%{_mandir}/man1/nbdkit-example*-plugin.1*
%{_mandir}/man1/nbdkit-curl-plugin.1*
%{_mandir}/man1/nbdkit-ext2-plugin.1*
%{_mandir}/man1/nbdkit-gzip-plugin.1*
%{_mandir}/man3/nbdkit-lua-plugin.3*
%{_mandir}/man3/nbdkit-perl-plugin.3*
%{_mandir}/man3/nbdkit-python-plugin.3*
%{_mandir}/man3/nbdkit-ruby-plugin.3*
%{_mandir}/man1/nbdkit-tar-plugin.1*
%{_mandir}/man3/nbdkit-tcl-plugin.3*
%{_mandir}/man1/nbdkit-xz-plugin.1*
%{_mandir}/man1/nbdkit-blocksize-filter.1*
%{_mandir}/man1/nbdkit-cache-filter.1*
%{_mandir}/man1/nbdkit-cow-filter.1*
%{_mandir}/man1/nbdkit-delay-filter.1*
%{_mandir}/man1/nbdkit-error-filter.1*
%{_mandir}/man1/nbdkit-fua-filter.1*
%{_mandir}/man1/nbdkit-log-filter.1*
%{_mandir}/man1/nbdkit-nozero-filter.1*
%{_mandir}/man1/nbdkit-offset-filter.1*
%{_mandir}/man1/nbdkit-partition-filter.1*
%{_mandir}/man1/nbdkit-truncate-filter.1*
%{_mandir}/man3/nbdkit-filter.3*
%{_mandir}/man3/nbdkit-plugin.3*
%{_mandir}/man3/nbdkit-ocaml-plugin.3*
%changelog %changelog
* Fri Apr 3 2020 Ling Yang <lingyang2@huawei.com> - 1.6.2-3
- Fixed format for spec file
* Thu Dec 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.6.2-2 * Thu Dec 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.6.2-2
- Package init - Package init