From 9e8acac3f4356e96ca3c1dec117861af83ce163f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 29 Jan 2020 15:11:39 +0000 Subject: [PATCH] Rebuild for RHEL AV 8.2. Include ntfs-3g-system-compression plugin. resolves: rhbz#1705234, rhbz#1796073 --- .gitignore | 1 + libguestfs-winsupport.spec | 43 ++++++++++++++++++++++++++++++++++---- sources | 1 + 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 325cb73..7f4dfd1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ clog ntfs-3g_ntfsprogs-*.tgz ntfs-3g_ntfsprogs-*/ +/ntfs-3g-system-compression-1.0.tar.gz diff --git a/libguestfs-winsupport.spec b/libguestfs-winsupport.spec index 7055861..3cab7b3 100644 --- a/libguestfs-winsupport.spec +++ b/libguestfs-winsupport.spec @@ -1,22 +1,25 @@ %global ntfs_version 2017.3.23 +%global compression_version 1.0 # debuginfo makes no sense for this package, so disable it %global debug_package %{nil} Name: libguestfs-winsupport -Version: 8.0 -Release: 4%{?dist} +Version: 8.2 +Release: 1%{?dist} Summary: Add support for Windows guests to virt-v2v and virt-p2v URL: http://www.ntfs-3g.org/ +# and URL: https://github.com/ebiggers/ntfs-3g-system-compression License: GPLv2+ # This package shouldn't be installed without installing the base # libguestfs package. Requires: libguestfs >= 1:1.38.2 -# Source and patches for ntfs. Try to keep this in step with Fedora. +# Source and patches for ntfs-3g and ntfs-3g-system-compression. Source0: http://tuxera.com/opensource/ntfs-3g_ntfsprogs-%{ntfs_version}.tgz +Source1: https://github.com/ebiggers/ntfs-3g-system-compression/archive/v%{version}/ntfs-3g-system-compression-%{compression_version}.tar.gz Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch Patch1: check-mftmirr.patch @@ -27,17 +30,24 @@ Patch2: ntfs-3g-big-sectors.patch Patch3: ntfsclone-full-clusters-bz1601146.patch # CVE-2019-9755 (https://bugzilla.redhat.com/show_bug.cgi?id=1698502) Patch4: 0001-Fixed-reporting-an-error-when-failed-to-build-the-mo.patch + +BuildRequires: gcc BuildRequires: libtool, libattr-devel BuildRequires: libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel +BuildRequires: autoconf, automake, libtool, fuse-devel %description This optional package adds support for Windows guests (NTFS) to the virt-v2v and virt-p2v programs. +This package also supports system compression ("Compact OS") using the +plugin from https://github.com/ebiggers/ntfs-3g-system-compression + %prep %setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version} +%setup -n ntfs-3g_ntfsprogs-%{ntfs_version} -T -D -a 1 %patch0 -p1 -b .unsupported %patch1 -p0 -b .check-mftmirr %patch2 -p0 -b .big-sectors @@ -58,6 +68,20 @@ CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" --enable-quarantined make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool +# Build ntfs-3g-system-compression plugin. +pushd ntfs-3g-system-compression-%{compression_version} +autoreconf -i +# Trick the plugin into using the just-compiled ntfs-3g. +cp ../libntfs-3g/libntfs-3g.pc . +sed -i \ + -e 's,^libdir=.*,libdir=../libntfs-3g,' \ + -e 's,^includedir=.*,includedir=../include,' \ + libntfs-3g.pc +export PKG_CONFIG_PATH=. +%configure +%make_build +popd + %install # Build it into a destdir which is not the final buildroot. @@ -92,10 +116,16 @@ rm -r destdir/%{_defaultdocdir} rm -r destdir/%{_includedir} rm -r destdir/%{_libdir}/pkgconfig +# Install ntfs-3g-system-compression plugin in the same place. +pushd ntfs-3g-system-compression-%{compression_version} +%make_install DESTDIR=$(pwd)/../destdir +popd +rm -rf destdir/%{_libdir}/ntfs-3g/*.la + # Take the destdir and put it into a tarball for the libguestfs appliance. mkdir -p %{buildroot}%{_libdir}/guestfs/supermin.d pushd destdir -tar zcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz . +tar zvcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz . popd @@ -106,6 +136,11 @@ popd %changelog +* Wed Jan 29 2020 Richard W.M. Jones - 8.2-1 +- Rebuild for RHEL AV 8.2. +- Include ntfs-3g-system-compression plugin. + resolves: rhbz#1705234, rhbz#1796073 + * Fri Jun 28 2019 Danilo de Paula - 8.0-4 - Rebuild all virt packages to fix RHEL's upgrade path - Resolves: rhbz#1695587 diff --git a/sources b/sources index 4d7be77..b121db9 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (ntfs-3g_ntfsprogs-2017.3.23.tgz) = 3a607f0d7be35204c992d8931de0404fbc52032c13b4240d2c5e6f285c318a28eb2a385d7cf5ac4cd445876aee5baa5753bb636ada0d870d84a9d3fdbce794ef +SHA512 (ntfs-3g-system-compression-1.0.tar.gz) = 6ac463469db896b9ce4f72af27ae1014de2abd7a968fb19229129b5e6410239607b73e416d43e199b9c721b7bcdb8cf2fa9e4871dfc89af2ab4edcf66d17e07c