diff --git a/README b/README new file mode 100644 index 0000000..6028bde --- /dev/null +++ b/README @@ -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. diff --git a/libguestfs.changes b/libguestfs.changes index 6def7f9..68c72eb 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -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 diff --git a/libguestfs.spec b/libguestfs.spec index 9ead920..318502d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -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