%global debug_package %{nil} %global ntfs_version 2014.2.15 Name: libguestfs-winsupport Version: 7.1 Release: 3%{?dist} Summary: Add support for Windows guests to libguestfs URL: http://www.ntfs-3g.org/ License: GPLv2+ ExclusiveArch: x86_64 # This package shouldn't be installed without installing the base # libguestfs package. Requires: libguestfs >= 1:1.27.19 # Built for supermin 5. This will not work with older supermin. BuildRequires: supermin5 Requires: supermin5 # Source and patches for ntfs. Try to keep this in step with Fedora. Source0: http://tuxera.com/opensource/ntfs-3g_ntfsprogs-%{ntfs_version}.tgz Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch # Upstream patches which add fstrim support. # ae9aeebbbf1523f3e37221b1172cf05775ef8ec9 Patch1: 0001-Upgraded-fuse-lite-to-support-ioctls.patch # f4e3f126df0a577903ec043dbcbe38e2863ce3d6 Patch2: 0002-Implemented-fstrim-8.patch # c26a519da1ed182e7cfd67e7a353932dda53d811 Patch3: 0001-Fixed-fstrim-8-applied-to-partitions.patch # Patch2 requires that libntfs-3g/Makefile is regenerated. This can # be removed, as well as the call to autoreconf below, when we move to # a released version of ntfs-3g that includes the new feature. BuildRequires: autoconf automake BuildRequires: libtool, libattr-devel BuildRequires: libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel %description This optional package adds support for Windows guests (NTFS) to the base libguestfs Red Hat Enterprise Linux (RHEL) package. This is useful for examining Windows virtual machines running on RHEL, and for performing V2V of Windows guests from another hypervisor to RHEL. To enable Windows support, simply install this package. To disable Windows support, uninstall this package. The package contains NTFS FUSE filesystem support from ntfs-3g %{ntfs_3g_version}. %prep %setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version} %patch0 -p1 -b .unsupported %patch1 -p1 -b .ioctl %patch2 -p1 -b .fstrim %patch3 -p1 -b .parts autoreconf -i %build CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" %configure \ --disable-static \ --disable-ldconfig \ --exec-prefix=/ \ --enable-crypto \ --enable-extras make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool %install make LIBTOOL=%{_bindir}/libtool DESTDIR=%{buildroot} install rm -rf %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_libdir}/*.a rm -rf %{buildroot}/%{_sbindir}/mount.ntfs-3g cp -a %{buildroot}/%{_bindir}/ntfs-3g %{buildroot}/%{_sbindir}/mount.ntfs-3g # Actually make some symlinks for simplicity... # ... since we're obsoleting ntfsprogs-fuse pushd %{buildroot}/%{_bindir} ln -s ntfs-3g ntfsmount popd pushd %{buildroot}/%{_sbindir} ln -s mount.ntfs-3g mount.ntfs-fuse # And since there is no other package in Fedora that provides an ntfs # mount... ln -s mount.ntfs-3g mount.ntfs # Need this for fsck to find it ln -s ../bin/ntfsck fsck.ntfs popd mv %{buildroot}/sbin/* %{buildroot}/%{_sbindir} rmdir %{buildroot}/sbin # We get this on our own, thanks. rm %{buildroot}%{_defaultdocdir}/ntfs-3g/README # Add this package to the libguestfs appliance. mkdir -p %{buildroot}%{_libdir}/guestfs/supermin.d echo libguestfs-winsupport > %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc AUTHORS ChangeLog COPYING CREDITS NEWS README # From ntfs-3g package: %{_sbindir}/mount.ntfs %{_sbindir}/mount.ntfs-3g %{_sbindir}/mount.ntfs-fuse %{_sbindir}/mount.lowntfs-3g %{_bindir}/ntfs-3g %{_bindir}/ntfsmount %{_bindir}/ntfs-3g.probe %{_bindir}/ntfs-3g.secaudit %{_bindir}/ntfs-3g.usermap %{_bindir}/lowntfs-3g %{_libdir}/libntfs-3g.so.* # From -devel subpackage: %{_includedir}/ntfs-3g/ %{_libdir}/libntfs-3g.so %{_libdir}/pkgconfig/libntfs-3g.pc # From ntfsprogs package: %{_bindir}/ntfscat %{_bindir}/ntfscluster %{_bindir}/ntfscmp %{_bindir}/ntfsfix %{_bindir}/ntfsinfo %{_bindir}/ntfsls %{_bindir}/ntfsck %{_bindir}/ntfsdecrypt %{_bindir}/ntfsdump_logfile %{_bindir}/ntfsmftalloc %{_bindir}/ntfsmove %{_bindir}/ntfstruncate %{_bindir}/ntfswipe %{_sbindir}/fsck.ntfs %{_sbindir}/mkfs.ntfs %{_sbindir}/mkntfs %{_sbindir}/ntfsclone %{_sbindir}/ntfscp %{_sbindir}/ntfslabel %{_sbindir}/ntfsresize %{_sbindir}/ntfsundelete # Documentation. %{_mandir}/man8/*.8* # For libguestfs appliance: %{_libdir}/guestfs/supermin.d/zz-winsupport %changelog * Thu Aug 28 2014 Richard W.M. Jones - 7.1-3 - Add patches from Fedora package which add fstrim support. resolves: rhbz#1100319 * Mon Jul 21 2014 Richard W.M. Jones - 7.1-2 - New package for RHEL 7.1 - Rebase to ntfs-3g 2014.2.15 resolves: rhbz#1100319 - Change the package so it works with supermin5. - Remove dependency on external FUSE. * Wed Apr 3 2013 Richard W.M. Jones - 7.0-2 - Resync against Rawhide package (ntfs-3g 2013.1.13). - Drop HAL file since HAL is dead. resolves: rhbz#819939 * Thu Dec 20 2012 Richard W.M. Jones - 7.0-1 - New package for RHEL 7 resolves: rhbz#819939 - Resync against Rawhide package. * Mon Mar 28 2011 Richard W.M. Jones - 1.0-7 - Disable debuginfo package. resolves: RHBZ#691555. * Tue Mar 8 2011 Richard W.M. Jones - 1.0-6 - Require libguestfs 1.7.17 (newer version in RHEL 6.1). - Require febootstrap-supermin-helper instead of febootstrap resolves: RHBZ#670299. * Thu Jul 1 2010 Richard W.M. Jones - 1.0-5 - Make sure intermediate lib* directories are created in hostfiles (RHBZ#603429) * Thu Jun 3 2010 Richard W.M. Jones - 1.0-4 - Requires fuse-libs (RHBZ#599300). * Fri May 21 2010 Richard W.M. Jones - 1.0-3 - ExclusiveArch x86_64. * Tue May 18 2010 Richard W.M. Jones - 1.0-2 - Package Windows support for libguestfs.