SHA256
1
0
forked from pool/libguestfs

Accepting request 527667 from home:cbosdonnat:branches:Virtualization

- Add windows support files to the appliance for SLES (fate#316274)
- Merge SLES and openSUSE spec files.

OBS-URL: https://build.opensuse.org/request/show/527667
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=405
This commit is contained in:
Cédric Bosdonnat 2017-09-21 09:01:23 +00:00 committed by Git OBS Bridge
parent f90b15aef3
commit 77da480dd9
3 changed files with 65 additions and 6 deletions

3
README Normal file
View File

@ -0,0 +1,3 @@
The ntfs-3g tools contained in this archive are provided for the exclusive
use of guestfs tools. Any use of these ntfs-3g tools outside the guestfs
tools context is unsupported and strictly forbidden.

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 20 17:18:24 UTC 2017 - cbosdonnat@suse.com
- Add windows support files to the appliance for SLES (fate#316274)
- Merge SLES and openSUSE spec files.
-------------------------------------------------------------------
Mon Sep 4 19:15:25 UTC 2017 - cbosdonnat@suse.com

View File

@ -150,6 +150,7 @@ Patch100: appliance.patch
Source0: http://download.libguestfs.org/1.36-stable/libguestfs-%{version}.tar.gz
Source1: libguestfs.rpmlintrc
Source100: mount-rootfs-and-chroot.sh
Source101: README
Source789653: Pod-Simple-3.23.tar.xz
#
Source10001: libguestfs.test.simple.run-libugestfs-test-tool.sh
@ -456,6 +457,9 @@ Recommends: parted
Recommends: zerofree
Recommends: genisoimage
Recommends: ldmtool
%if %{?is_opensuse:0} == 0
Recommends: guestfs-winsupport
%endif
Summary: Virtual machine needed for libguestfs
License: GPL-2.0
@ -467,6 +471,20 @@ Obsoletes: libguestfs-data < %{version}
libguestfs needs for it's run a virtual machine image.
This package provides such an image, an initrd and a kernel.
%if 0%{?is_opensuse} == 0
%package -n guestfs-winsupport
Summary: Windows guests support in libguestfs
License: GPL-2.0+
Group: System/Filesystems
Requires: libguestfs >= 1.32
BuildRequires: ntfs-3g
BuildRequires: ntfsprogs
BuildRequires: rsync
%description -n guestfs-winsupport
Provides the needed pieces for libguestfs to handle Windows guests.
%endif
%package devel
Summary: Development files for libguestfs
@ -500,11 +518,6 @@ Requires: %{kvm_binary}
Requires: qemu >= 2.0
Requires: qemu-tools
Requires: supermin >= 5.1.6
%if %suse_version == 1315
%if 0%{?is_opensuse} == 0
Recommends: guestfs-winsupport
%endif
%endif
%description -n libguestfs0
Library for libguestfs.
@ -674,6 +687,8 @@ touch %{name}.lang
%find_lang %{name}
%fdupes -s $RPM_BUILD_ROOT
# Appliance NTFS files
%if %{?is_opensuse}
mkdir -p $RPM_BUILD_ROOT/tmp/etc/alternatives
pushd $RPM_BUILD_ROOT/tmp/etc/alternatives
ln -s /sbin/mount.ntfs-3g mount.ntfs
@ -682,6 +697,22 @@ pushd $RPM_BUILD_ROOT/tmp
tar czf $RPM_BUILD_ROOT/%{_libdir}/guestfs/supermin.d/zz-ntfs-symlink.tar.gz etc
popd
rm -rf $RPM_BUILD_ROOT/tmp
%else
# Just copy the content of the ntfs packages
mkdir winsupport
for pkg in $(rpm -qa | grep ntfs); do
rpm -ql $pkg > $pkg.list
rsync -av --files-from $pkg.list / winsupport
done
cp %{S:101} winsupport
pushd winsupport
tar zcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz .
popd
echo "libfuse2" > %{buildroot}%{_libdir}/guestfs/supermin.d/zz-packages-winsupport
%endif
mkdir -p $RPM_BUILD_ROOT/tmp/usr/bin
cp %{S:100} $RPM_BUILD_ROOT/tmp/usr/bin
@ -708,7 +739,26 @@ rm -rf $RPM_BUILD_ROOT
%files -n guestfs-data
%defattr(-,root,root)
%{_libdir}/guestfs
%dir %{_libdir}/guestfs
%dir %{_libdir}/guestfs/supermin.d
%{_libdir}/guestfs/supermin.d/base.tar.gz
%{_libdir}/guestfs/supermin.d/daemon.tar.gz
%{_libdir}/guestfs/supermin.d/init.tar.gz
%{_libdir}/guestfs/supermin.d/udev-rules.tar.gz
%{_libdir}/guestfs/supermin.d/excludefiles
%{_libdir}/guestfs/supermin.d/hostfiles
%{_libdir}/guestfs/supermin.d/packages
%{_libdir}/guestfs/supermin.d/zz-scripts.tar.gz
%if %{?is_opensuse}
%{_libdir}/guestfs/supermin.d/zz-ntfs-symlink.tar.gz
%endif
%if 0%{?is_opensuse} == 0
%files -n guestfs-winsupport
%defattr(-,root,root)
%{_libdir}/guestfs/supermin.d/zz-*winsupport*
%endif
%if %{with ocaml_bindings}
%files -n ocaml-libguestfs