Blame SPECS/libguestfs-winsupport.spec

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