%bcond_with php # PHP binding
%bcond_without python # Python binding
%bcond_without ruby # Ruby binding
+%bcond_with rust # Rust binding
%bcond_without systemtap # systemtap/dtrace probes
%if 0%{!?php_name:1}
%ifarch x32
%undefine with_erlang
-%undefine with_golang
%undefine with_ocaml_opt
%endif
+%ifnarch %{go_arches}
+%undefine with_golang
+%endif
+
+%{?with_java:%{?use_default_jdk}}
+
Summary: Library and tools for accessing and modifying virtual machine disk images
Summary(pl.UTF-8): Biblioteka i narzędzia do dostępu i modyfikacji obrazów dysków maszyn wirtualnych
Name: libguestfs
Version: 1.46.0
-Release: 1
+Release: 5
License: LGPL v2+
Group: Libraries
-Source0: http://libguestfs.org/download/1.46-stable/%{name}-%{version}.tar.gz
+Source0: https://libguestfs.org/download/1.46-stable/%{name}-%{version}.tar.gz
# Source0-md5: 3d6f99ed705206d11904c67e69ba64da
Patch0: ncurses.patch
Patch1: augeas-libxml2.patch
-Patch3: %{name}-completionsdir.patch
-URL: http://libguestfs.org/
+Patch2: %{name}-completionsdir.patch
+Patch3: x32.patch
+URL: https://libguestfs.org/
BuildRequires: acl-devel
-BuildRequires: attr-devel
-BuildRequires: augeas-devel >= 1.0.0
+BuildRequires: augeas-devel >= 1.2.0
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: bison
BuildRequires: cdrkit-mkisofs
-BuildRequires: db-utils
+BuildRequires: cpio
BuildRequires: flex
BuildRequires: gettext-tools
BuildRequires: glib2-devel >= 1:2.26.0
BuildRequires: gobject-introspection-devel >= 1.30.0
BuildRequires: gperf
BuildRequires: hivex-devel >= 1.2.7
+BuildRequires: jansson-devel >= 2.7
BuildRequires: libcap-devel
BuildRequires: libconfig-devel
BuildRequires: libfuse-devel
BuildRequires: libmagic-devel
BuildRequires: libselinux-devel
+BuildRequires: libstdc++-devel
BuildRequires: libtirpc-devel
BuildRequires: libtool
BuildRequires: libvirt-devel >= 0.10.2
BuildRequires: libxml2-devel >= 2.0
BuildRequires: libxml2-progs
BuildRequires: ncurses-devel
-BuildRequires: pcre-devel
+BuildRequires: ocaml >= 1:4.01
+BuildRequires: ocaml-findlib
+BuildRequires: ocaml-hivex-devel
+BuildRequires: pcre2-8-devel
BuildRequires: perl-base
+BuildRequires: perl-modules
BuildRequires: perl-tools-pod
BuildRequires: pkgconfig
BuildRequires: po4a
BuildRequires: qemu-img >= 1.0
BuildRequires: readline-devel
-BuildRequires: rpmbuild(macros) >= 1.656
+BuildRequires: rpcsvc-proto
+BuildRequires: rpm-devel >= 4.6.0
+BuildRequires: rpmbuild(macros) >= 2.021
+BuildRequires: sleuthkit-devel
# libsystemd-journal
BuildRequires: systemd-devel >= 1:196
-BuildRequires: yajl-devel >= 2.0.4
+BuildRequires: xz
+BuildRequires: yara-devel
%if %{with appliance}
BuildRequires: supermin >= 5.1.0
%endif
BuildRequires: ghc
%endif
%if %{with java}
-BuildRequires: jdk
+%{?use_jdk:%buildrequires_jdk}%{!?use_jdk:BuildRequires: jdk}
BuildRequires: rpm-javaprov
%endif
%if %{with lua}
-# use 5.2 as 5.1 packaging in PLD was incompatible with what's expected by configure
-BuildRequires: lua52
-BuildRequires: lua52-devel
+BuildRequires: lua
+BuildRequires: lua-devel
%endif
%if %{with ocaml}
-BuildRequires: ocaml >= 1:4.0
BuildRequires: ocaml-camlp4
BuildRequires: ocaml-fileutils-devel
-BuildRequires: ocaml-findlib
BuildRequires: ocaml-gettext-devel
-BuildRequires: ocaml-hivex-devel
BuildRequires: ocaml-libvirt-devel >= 0.6.1.4-4
BuildRequires: ocaml-pcre-devel
-# for virt-builder
-BuildRequires: xz-devel
%endif
%if %{with perl}
BuildRequires: perl-ExtUtils-MakeMaker
%if %{with python}
BuildRequires: python3
BuildRequires: python3-devel
+BuildRequires: python3-modules
BuildRequires: rpm-pythonprov
%endif
%if %{with ruby}
BuildRequires: ruby-rdoc
BuildRequires: ruby-rubygems
%endif
+%if %{with rust}
+BuildRequires: cargo
+BuildRequires: rust
+%endif
%if %{with systemtap}
BuildRequires: systemtap-sdt-devel
%endif
+Requires: jansson >= 2.7
Requires: qemu-common >= 1.1.0
Requires: yajl >= 2.0.4
Suggests: db-utils
%ifarch %{x8664} x32
%define qemu_bin /usr/bin/qemu-system-x86_64
%endif
+%ifarch aarch64
+%define qemu_bin /usr/bin/qemu-system-aarch64
+%endif
+%ifarch %{arm}
+%define qemu_bin /usr/bin/qemu-system-arm
+%endif
%description
libguestfs is a library and set of tools for accessing and modifying
Summary(pl.UTF-8): Narzędzia libguestfs do dostępu i modyfikacji obrazów dysków maszyn wirtualnych
Group: Applications/System
Requires: %{name} = %{version}-%{release}
-Requires: augeas-libs >= 1.0.0
+Requires: augeas-libs >= 1.2.0
%{?with_ocaml:Requires: ocaml-libguestfs = %{version}-%{release}}
%if %{with ocaml}
Requires: ocaml-libvirt >= 0.6.1.4-4
Summary: bash-completion for libguestfs tools
Summary(pl.UTF-8): Bashowe uzupełnianie argumentów dla narzędzi libguestfs
Group: Applications/Shells
-Requires: bash-completion >= 2.0
+Requires: bash-completion >= 1:2.0
%description -n bash-completion-libguestfs
bash-completion for guestfish tool.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%ifarch x32
%patch3 -p1
+%endif
%build
# preserve dir across libtoolize
vmchannel_test=no \
DB_DUMP=/usr/bin/db_dump \
DB_LOAD=/usr/bin/db_load \
- %{?with_lua:LUA=/usr/bin/lua5.2} \
PBMTEXT=/usr/bin/pbmtext \
PNMTOPNG=/usr/bin/pnmtopng \
BMPTOPNM=/usr/bin/bmptopnm \
%{!?with_systemtap:--disable-probes} \
%{!?with_python:--disable-python} \
%{!?with_ruby:--disable-ruby} \
+ %{!?with_rust:--disable-rust} \
--disable-silent-rules \
%{__enable_disable static_libs static}
%if %{with ocaml}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dll*.so.owner
%else
-%{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man1/virt-{builder,index-validate,resize,sparsify,sysprep,v2v-test-harness}.1 \
- $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ocaml.3
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ocaml.3
%endif
%if %{without ruby}
%{__rm} $RPM_BUILD_ROOT%{_mandir}/{ja,uk}/man3/guestfs-ruby.3