Blame SPECS/libguestfs-winsupport.spec

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