Blame SPECS/libguestfs-winsupport.spec

e34c53
%global         ntfs_version 2015.3.14
e34c53
e34c53
# debuginfo makes no sense for this package, so disable it
e34c53
%global         debug_package %{nil}
e34c53
e34c53
Name:           libguestfs-winsupport
e34c53
Version:        7.2
70298e
Release:        2%{?dist}
e34c53
Summary:        Add support for Windows guests to virt-v2v and virt-p2v
e34c53
e34c53
URL:            http://www.ntfs-3g.org/
e34c53
License:        GPLv2+
e34c53
ExclusiveArch:  aarch64 x86_64
e34c53
e34c53
# This package shouldn't be installed without installing the base
e34c53
# libguestfs package.
e34c53
Requires:       libguestfs >= 1:1.28.1
e34c53
e34c53
# Source and patches for ntfs.  Try to keep this in step with Fedora.
e34c53
Source0:        http://tuxera.com/opensource/ntfs-3g_ntfsprogs-%{ntfs_version}.tgz
e34c53
e34c53
Patch0:         ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch
e34c53
Patch1:         CVE-2015-3202.patch
70298e
# https://bugzilla.redhat.com/show_bug.cgi?id=1301593#c8
70298e
Patch2:         0001-unistr.c-Enable-encoding-broken-UTF-16-into-broken-U.patch
70298e
Patch3:         0002-unistr.c-Unify-the-two-defines-NOREVBOM-and-ALLOW_BR.patch
e34c53
e34c53
BuildRequires:  libtool, libattr-devel
e34c53
BuildRequires:  libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel
e34c53
e34c53
e34c53
%description
e34c53
This optional package adds support for Windows guests (NTFS) to the
e34c53
virt-v2v and virt-p2v programs.
e34c53
e34c53
e34c53
%prep
e34c53
%setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version}
e34c53
%patch0 -p1 -b .unsupported
e34c53
%patch1 -p1 -b .cve
70298e
%patch2 -p1
70298e
%patch3 -p1
e34c53
e34c53
e34c53
%build
e34c53
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
e34c53
%configure \
e34c53
        --disable-static \
e34c53
        --disable-ldconfig \
e34c53
        --exec-prefix=/ \
e34c53
        --enable-crypto \
e34c53
        --enable-extras \
e34c53
        --enable-quarantined
e34c53
make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool
e34c53
e34c53
e34c53
%install
e34c53
# Build it into a destdir which is not the final buildroot.
e34c53
mkdir destdir
e34c53
make LIBTOOL=%{_bindir}/libtool DESTDIR=$(pwd)/destdir install
e34c53
rm -rf destdir/%{_libdir}/*.la
e34c53
rm -rf destdir/%{_libdir}/*.a
e34c53
e34c53
rm -rf destdir/%{_sbindir}/mount.ntfs-3g
e34c53
cp -a destdir/%{_bindir}/ntfs-3g destdir/%{_sbindir}/mount.ntfs-3g
e34c53
e34c53
# Actually make some symlinks for simplicity...
e34c53
# ... since we're obsoleting ntfsprogs-fuse
e34c53
pushd destdir/%{_bindir}
e34c53
ln -s ntfs-3g ntfsmount
e34c53
popd
e34c53
pushd destdir/%{_sbindir}
e34c53
ln -s mount.ntfs-3g mount.ntfs-fuse
e34c53
# And since there is no other package in Fedora that provides an ntfs 
e34c53
# mount...
e34c53
ln -s mount.ntfs-3g mount.ntfs
e34c53
# Need this for fsck to find it
e34c53
ln -s ../bin/ntfsck fsck.ntfs
e34c53
popd
e34c53
mv destdir/sbin/* destdir/%{_sbindir}
e34c53
rmdir destdir/sbin
e34c53
e34c53
# We get this on our own, thanks.
e34c53
rm -r destdir/%{_defaultdocdir}
e34c53
e34c53
# Remove development files.
e34c53
rm -r destdir/%{_includedir}
e34c53
rm -r destdir/%{_libdir}/pkgconfig
e34c53
e34c53
# Take the destdir and put it into a tarball for the libguestfs appliance.
e34c53
mkdir -p %{buildroot}%{_libdir}/guestfs/supermin.d
e34c53
pushd destdir
e34c53
tar zcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz .
e34c53
popd
e34c53
e34c53
e34c53
%files
e34c53
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README
e34c53
e34c53
%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz
e34c53
e34c53
e34c53
%changelog
70298e
* Wed Feb 22 2017 Richard W.M. Jones <rjones@redhat.com> - 7.2-2
70298e
- Fix for handling guest filenames with invalid or incomplete
70298e
  multibyte or wide characters
70298e
  resolves: rhbz#1301593
70298e
e34c53
* Tue Jul 07 2015 Richard W.M. Jones <rjones@redhat.com> - 7.2-1
e34c53
- Rebase and rebuild for RHEL 7.2
e34c53
  resolves: rhbz#1240278
e34c53
e34c53
* Tue Jun 30 2015 Richard W.M. Jones <rjones@redhat.com> - 7.1-6
e34c53
- Bump version and rebuild.
e34c53
  related: rhbz#1221583
e34c53
e34c53
* Fri May 15 2015 Richard W.M. Jones <rjones@redhat.com> - 7.1-5
e34c53
- Enable aarch64 architecture.
e34c53
  resolves: rhbz#1221583
e34c53
e34c53
* Thu Aug 28 2014 Richard W.M. Jones <rjones@redhat.com> - 7.1-4
e34c53
- Enable debuginfo support and stripping.
e34c53
  resolves: rhbz#1100319
e34c53
e34c53
* Thu Aug 28 2014 Richard W.M. Jones <rjones@redhat.com> - 7.1-3
e34c53
- Add patches from Fedora package which add fstrim support.
e34c53
  resolves: rhbz#1100319
e34c53
e34c53
* Mon Jul 21 2014 Richard W.M. Jones <rjones@redhat.com> - 7.1-2
e34c53
- New package for RHEL 7.1
e34c53
- Rebase to ntfs-3g 2014.2.15
e34c53
  resolves: rhbz#1100319
e34c53
- Change the package so it works with supermin5.
e34c53
- Remove dependency on external FUSE.
e34c53
e34c53
* Wed Apr  3 2013 Richard W.M. Jones <rjones@redhat.com> - 7.0-2
e34c53
- Resync against Rawhide package (ntfs-3g 2013.1.13).
e34c53
- Drop HAL file since HAL is dead.
e34c53
  resolves: rhbz#819939
e34c53
e34c53
* Thu Dec 20 2012 Richard W.M. Jones <rjones@redhat.com> - 7.0-1
e34c53
- New package for RHEL 7
e34c53
  resolves: rhbz#819939
e34c53
- Resync against Rawhide package.
e34c53
e34c53
* Mon Mar 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-7
e34c53
- Disable debuginfo package.
e34c53
  resolves: RHBZ#691555.
e34c53
e34c53
* Tue Mar  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-6
e34c53
- Require libguestfs 1.7.17 (newer version in RHEL 6.1).
e34c53
- Require febootstrap-supermin-helper instead of febootstrap
e34c53
  resolves: RHBZ#670299.
e34c53
e34c53
* Thu Jul  1 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-5
e34c53
- Make sure intermediate lib* directories are created in hostfiles (RHBZ#603429)
e34c53
e34c53
* Thu Jun  3 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-4
e34c53
- Requires fuse-libs (RHBZ#599300).
e34c53
e34c53
* Fri May 21 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-3
e34c53
- ExclusiveArch x86_64.
e34c53
e34c53
* Tue May 18 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-2
e34c53
- Package Windows support for libguestfs.