Blame SPECS/libguestfs-winsupport.spec

c96443
%global         ntfs_version 2022.5.17
5f735e
%global         compression_version 1.0
0f6478
0f6478
# debuginfo makes no sense for this package, so disable it
0f6478
%global         debug_package %{nil}
0f6478
0f6478
Name:           libguestfs-winsupport
c96443
Version:        8.8
5f735e
Release:        1%{?dist}
0f6478
Summary:        Add support for Windows guests to virt-v2v and virt-p2v
0f6478
dd7df0
URL:            https://www.tuxera.com/company/open-source/
5f735e
# and URL:      https://github.com/ebiggers/ntfs-3g-system-compression
0f6478
License:        GPLv2+
0f6478
0f6478
# This package shouldn't be installed without installing the base
0f6478
# libguestfs package.
0f6478
Requires:       libguestfs >= 1:1.38.2
0f6478
5f735e
# Source and patches for ntfs-3g and ntfs-3g-system-compression.
0f6478
Source0:        http://tuxera.com/opensource/ntfs-3g_ntfsprogs-%{ntfs_version}.tgz
5f735e
Source1:        https://github.com/ebiggers/ntfs-3g-system-compression/archive/v%{version}/ntfs-3g-system-compression-%{compression_version}.tar.gz
0f6478
0f6478
Patch0:         ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch
5f735e
dd7df0
BuildRequires:  make
5f735e
BuildRequires:  gcc
0f6478
BuildRequires:  libtool, libattr-devel
0f6478
BuildRequires:  libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel
5f735e
BuildRequires:  autoconf, automake, libtool, fuse-devel
0f6478
0f6478
0f6478
%description
0f6478
This optional package adds support for Windows guests (NTFS) to the
0f6478
virt-v2v and virt-p2v programs.
0f6478
5f735e
This package also supports system compression ("Compact OS") using the
5f735e
plugin from https://github.com/ebiggers/ntfs-3g-system-compression
5f735e
0f6478
0f6478
%prep
0f6478
%setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version}
5f735e
%setup -n ntfs-3g_ntfsprogs-%{ntfs_version} -T -D -a 1
0f6478
%patch0 -p1 -b .unsupported
0f6478
0f6478
0f6478
%build
0f6478
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
0f6478
%configure \
0f6478
        --disable-static \
0f6478
        --disable-ldconfig \
dd7df0
        --with-fuse=external \
0f6478
        --exec-prefix=/ \
0f6478
        --enable-posix-acls \
0f6478
        --enable-xattr-mappings \
0f6478
        --enable-crypto \
0f6478
        --enable-extras \
0f6478
        --enable-quarantined
dd7df0
%make_build LIBTOOL=%{_bindir}/libtool
0f6478
5f735e
# Build ntfs-3g-system-compression plugin.
5f735e
pushd ntfs-3g-system-compression-%{compression_version}
5f735e
autoreconf -i
5f735e
# Trick the plugin into using the just-compiled ntfs-3g.
5f735e
cp ../libntfs-3g/libntfs-3g.pc .
5f735e
sed -i \
5f735e
    -e 's,^libdir=.*,libdir=../libntfs-3g,' \
5f735e
    -e 's,^includedir=.*,includedir=../include,' \
5f735e
    libntfs-3g.pc
5f735e
export PKG_CONFIG_PATH=.
5f735e
%configure
5f735e
%make_build
5f735e
popd
5f735e
0f6478
0f6478
%install
0f6478
# Build it into a destdir which is not the final buildroot.
0f6478
mkdir destdir
0f6478
make LIBTOOL=%{_bindir}/libtool DESTDIR=$(pwd)/destdir install
0f6478
rm -rf destdir/%{_libdir}/*.la
0f6478
rm -rf destdir/%{_libdir}/*.a
0f6478
0f6478
rm -rf destdir/%{_sbindir}/mount.ntfs-3g
0f6478
cp -a destdir/%{_bindir}/ntfs-3g destdir/%{_sbindir}/mount.ntfs-3g
0f6478
0f6478
# Actually make some symlinks for simplicity...
0f6478
# ... since we're obsoleting ntfsprogs-fuse
0f6478
pushd destdir/%{_bindir}
0f6478
ln -s ntfs-3g ntfsmount
0f6478
popd
0f6478
pushd destdir/%{_sbindir}
0f6478
ln -s mount.ntfs-3g mount.ntfs-fuse
0f6478
# And since there is no other package in Fedora that provides an ntfs 
0f6478
# mount...
0f6478
ln -s mount.ntfs-3g mount.ntfs
0f6478
# Need this for fsck to find it
0f6478
ln -s ../bin/ntfsck fsck.ntfs
0f6478
popd
0f6478
mv destdir/sbin/* destdir/%{_sbindir}
0f6478
rmdir destdir/sbin
0f6478
0f6478
# We get this on our own, thanks.
0f6478
rm -r destdir/%{_defaultdocdir}
0f6478
0f6478
# Remove development files.
0f6478
rm -r destdir/%{_includedir}
0f6478
rm -r destdir/%{_libdir}/pkgconfig
0f6478
5f735e
# Install ntfs-3g-system-compression plugin in the same place.
5f735e
pushd ntfs-3g-system-compression-%{compression_version}
5f735e
%make_install DESTDIR=$(pwd)/../destdir
5f735e
popd
5f735e
rm -rf destdir/%{_libdir}/ntfs-3g/*.la
5f735e
0f6478
# Take the destdir and put it into a tarball for the libguestfs appliance.
0f6478
mkdir -p %{buildroot}%{_libdir}/guestfs/supermin.d
0f6478
pushd destdir
5f735e
tar zvcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz .
0f6478
popd
0f6478
0f6478
0f6478
%files
0f6478
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README
0f6478
%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz
0f6478
0f6478
0f6478
%changelog
c96443
* Mon Sep 26 2022 Richard W.M. Jones <rjones@redhat.com> - 8.8-1
c96443
- Rebase to ntfs-3g 2022.5.17
c96443
- Fixes: CVE-2021-46790, CVE-2022-30783, CVE-2022-30784, CVE-2022-30785,
c96443
  CVE-2022-30786, CVE-2022-30787, CVE-2022-30788, CVE-2022-30789
c96443
  resolves: rhbz#2127240 rhbz#2127248
c96443
  (also: 2127233 2127234 2127241 2127249 2127255 2127256 2127262 2127263)
c96443
dd7df0
* Fri Sep 17 2021 Richard W.M. Jones <rjones@redhat.com> - 8.6-1
dd7df0
- Rebase to ntfs-3g 2021.8.22
dd7df0
- Fixes: CVE-2021-33285, CVE-2021-33286, CVE-2021-33287, CVE-2021-33289,
dd7df0
  CVE-2021-35266, CVE-2021-35267, CVE-2021-35268, CVE-2021-35269,
dd7df0
  CVE-2021-39251, CVE-2021-39252, CVE-2021-39253, CVE-2021-39254
dd7df0
  resolves: rhbz#2004490
dd7df0
dd7df0
* Thu Sep 2 2021 Danilo C. L. de Paula <ddepaula@redhat.com> - 8.2-1.el8
dd7df0
- Resolves: bz#2000225
dd7df0
  (Rebase virt:rhel module:stream based on AV-8.6)
dd7df0
5f735e
* Mon Apr 27 2020 Danilo C. L. de Paula <ddepaula@redhat.com> - 8.2
5f735e
- Resolves: bz#1810193
5f735e
  (Upgrade components in virt:rhel module:stream for RHEL-8.3 release)
5f735e
3d59c1
* Fri Jun 28 2019 Danilo de Paula <ddepaula@redhat.com> - 8.0-4
82323d
- Rebuild all virt packages to fix RHEL's upgrade path
3d59c1
- Resolves: rhbz#1695587
3d59c1
  (Ensure modular RPM upgrade path)
3d59c1
3d59c1
* Wed Apr 10 2019 Richard W.M. Jones <rjones@redhat.com> - 8.0-3
3d59c1
- Fix for CVE-2019-9755
3d59c1
  (heap-based buffer overflow leads to local root privilege escalation)
3d59c1
  resolves: rhbz#1698503
82323d
0f6478
* Mon Jul 16 2018 Richard W.M. Jones <rjones@redhat.com> - 8.0-2
0f6478
- Fix for ntfsclone crash (RHBZ#1601146).
0f6478
0f6478
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 8.0-1
0f6478
- Rebase to 2017.3.23.
0f6478
- Remove patches which are now upstream.
0f6478
- Resynch with Fedora package.
0f6478
- Enable all architectures for RHEL 8.
0f6478
0f6478
* Wed Feb 22 2017 Richard W.M. Jones <rjones@redhat.com> - 7.2-2
0f6478
- Fix for handling guest filenames with invalid or incomplete
0f6478
  multibyte or wide characters
0f6478
  resolves: rhbz#1301593
0f6478
0f6478
* Tue Jul 07 2015 Richard W.M. Jones <rjones@redhat.com> - 7.2-1
0f6478
- Rebase and rebuild for RHEL 7.2
0f6478
  resolves: rhbz#1240278
0f6478
0f6478
* Tue Jun 30 2015 Richard W.M. Jones <rjones@redhat.com> - 7.1-6
0f6478
- Bump version and rebuild.
0f6478
  related: rhbz#1221583
0f6478
0f6478
* Fri May 15 2015 Richard W.M. Jones <rjones@redhat.com> - 7.1-5
0f6478
- Enable aarch64 architecture.
0f6478
  resolves: rhbz#1221583
0f6478
0f6478
* Thu Aug 28 2014 Richard W.M. Jones <rjones@redhat.com> - 7.1-4
0f6478
- Enable debuginfo support and stripping.
0f6478
  resolves: rhbz#1100319
0f6478
0f6478
* Thu Aug 28 2014 Richard W.M. Jones <rjones@redhat.com> - 7.1-3
0f6478
- Add patches from Fedora package which add fstrim support.
0f6478
  resolves: rhbz#1100319
0f6478
0f6478
* Mon Jul 21 2014 Richard W.M. Jones <rjones@redhat.com> - 7.1-2
0f6478
- New package for RHEL 7.1
0f6478
- Rebase to ntfs-3g 2014.2.15
0f6478
  resolves: rhbz#1100319
0f6478
- Change the package so it works with supermin5.
0f6478
- Remove dependency on external FUSE.
0f6478
0f6478
* Wed Apr  3 2013 Richard W.M. Jones <rjones@redhat.com> - 7.0-2
0f6478
- Resync against Rawhide package (ntfs-3g 2013.1.13).
0f6478
- Drop HAL file since HAL is dead.
0f6478
  resolves: rhbz#819939
0f6478
0f6478
* Thu Dec 20 2012 Richard W.M. Jones <rjones@redhat.com> - 7.0-1
0f6478
- New package for RHEL 7
0f6478
  resolves: rhbz#819939
0f6478
- Resync against Rawhide package.
0f6478
0f6478
* Mon Mar 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-7
0f6478
- Disable debuginfo package.
0f6478
  resolves: RHBZ#691555.
0f6478
0f6478
* Tue Mar  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-6
0f6478
- Require libguestfs 1.7.17 (newer version in RHEL 6.1).
0f6478
- Require febootstrap-supermin-helper instead of febootstrap
0f6478
  resolves: RHBZ#670299.
0f6478
0f6478
* Thu Jul  1 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-5
0f6478
- Make sure intermediate lib* directories are created in hostfiles (RHBZ#603429)
0f6478
0f6478
* Thu Jun  3 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-4
0f6478
- Requires fuse-libs (RHBZ#599300).
0f6478
0f6478
* Fri May 21 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-3
0f6478
- ExclusiveArch x86_64.
0f6478
0f6478
* Tue May 18 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-2
0f6478
- Package Windows support for libguestfs.