Blame SPECS/libguestfs-winsupport.spec

877860
%global         ntfs_version 2022.5.17
b87ced
%global         compression_version 1.0
047598
047598
# debuginfo makes no sense for this package, so disable it
047598
%global         debug_package %{nil}
047598
047598
Name:           libguestfs-winsupport
877860
Version:        8.8
b87ced
Release:        1%{?dist}
047598
Summary:        Add support for Windows guests to virt-v2v and virt-p2v
047598
ebea85
URL:            https://www.tuxera.com/company/open-source/
b87ced
# and URL:      https://github.com/ebiggers/ntfs-3g-system-compression
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
b87ced
# Source and patches for ntfs-3g and ntfs-3g-system-compression.
047598
Source0:        http://tuxera.com/opensource/ntfs-3g_ntfsprogs-%{ntfs_version}.tgz
b87ced
Source1:        https://github.com/ebiggers/ntfs-3g-system-compression/archive/v%{version}/ntfs-3g-system-compression-%{compression_version}.tar.gz
047598
047598
Patch0:         ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch
b87ced
ebea85
BuildRequires:  make
b87ced
BuildRequires:  gcc
047598
BuildRequires:  libtool, libattr-devel
047598
BuildRequires:  libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel
b87ced
BuildRequires:  autoconf, automake, libtool, fuse-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
b87ced
This package also supports system compression ("Compact OS") using the
b87ced
plugin from https://github.com/ebiggers/ntfs-3g-system-compression
b87ced
047598
047598
%prep
047598
%setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version}
b87ced
%setup -n ntfs-3g_ntfsprogs-%{ntfs_version} -T -D -a 1
047598
%patch0 -p1 -b .unsupported
047598
047598
047598
%build
047598
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
047598
%configure \
047598
        --disable-static \
047598
        --disable-ldconfig \
ebea85
        --with-fuse=external \
047598
        --exec-prefix=/ \
047598
        --enable-posix-acls \
047598
        --enable-xattr-mappings \
047598
        --enable-crypto \
047598
        --enable-extras \
047598
        --enable-quarantined
ebea85
%make_build LIBTOOL=%{_bindir}/libtool
047598
b87ced
# Build ntfs-3g-system-compression plugin.
b87ced
pushd ntfs-3g-system-compression-%{compression_version}
b87ced
autoreconf -i
b87ced
# Trick the plugin into using the just-compiled ntfs-3g.
b87ced
cp ../libntfs-3g/libntfs-3g.pc .
b87ced
sed -i \
b87ced
    -e 's,^libdir=.*,libdir=../libntfs-3g,' \
b87ced
    -e 's,^includedir=.*,includedir=../include,' \
b87ced
    libntfs-3g.pc
b87ced
export PKG_CONFIG_PATH=.
b87ced
%configure
b87ced
%make_build
b87ced
popd
b87ced
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
b87ced
# Install ntfs-3g-system-compression plugin in the same place.
b87ced
pushd ntfs-3g-system-compression-%{compression_version}
b87ced
%make_install DESTDIR=$(pwd)/../destdir
b87ced
popd
b87ced
rm -rf destdir/%{_libdir}/ntfs-3g/*.la
b87ced
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
b87ced
tar zvcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz .
047598
popd
047598
047598
047598
%files
047598
%doc AUTHORS ChangeLog COPYING CREDITS NEWS README
047598
%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz
047598
047598
047598
%changelog
877860
* Mon Sep 26 2022 Richard W.M. Jones <rjones@redhat.com> - 8.8-1
877860
- Rebase to ntfs-3g 2022.5.17
877860
- Fixes: CVE-2021-46790, CVE-2022-30783, CVE-2022-30784, CVE-2022-30785,
877860
  CVE-2022-30786, CVE-2022-30787, CVE-2022-30788, CVE-2022-30789
877860
  resolves: rhbz#2127240 rhbz#2127248
877860
  (also: 2127233 2127234 2127241 2127249 2127255 2127256 2127262 2127263)
877860
ebea85
* Fri Sep 17 2021 Richard W.M. Jones <rjones@redhat.com> - 8.6-1
ebea85
- Rebase to ntfs-3g 2021.8.22
ebea85
- Fixes: CVE-2021-33285, CVE-2021-33286, CVE-2021-33287, CVE-2021-33289,
ebea85
  CVE-2021-35266, CVE-2021-35267, CVE-2021-35268, CVE-2021-35269,
ebea85
  CVE-2021-39251, CVE-2021-39252, CVE-2021-39253, CVE-2021-39254
ebea85
  resolves: rhbz#2004490
ebea85
ebea85
* Thu Sep 2 2021 Danilo C. L. de Paula <ddepaula@redhat.com> - 8.2-1.el8
ebea85
- Resolves: bz#2000225
ebea85
  (Rebase virt:rhel module:stream based on AV-8.6)
ebea85
b87ced
* Mon Apr 27 2020 Danilo C. L. de Paula <ddepaula@redhat.com> - 8.2
b87ced
- Resolves: bz#1810193
b87ced
  (Upgrade components in virt:rhel module:stream for RHEL-8.3 release)
b87ced
00daca
* Fri Jun 28 2019 Danilo de Paula <ddepaula@redhat.com> - 8.0-4
00daca
- Rebuild all virt packages to fix RHEL's upgrade path
00daca
- Resolves: rhbz#1695587
00daca
  (Ensure modular RPM upgrade path)
00daca
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.