182 lines
5.3 KiB
RPMSpec
182 lines
5.3 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
%global ntfs_version 2012.1.15
|
|
|
|
Name: libguestfs-winsupport
|
|
Version: 7.0
|
|
Release: 1%{?dist}
|
|
Summary: Add support for Windows guests to libguestfs
|
|
|
|
License: GPLv2+
|
|
ExclusiveArch: x86_64
|
|
|
|
# This package shouldn't be installed without installing the base
|
|
# libguestfs package.
|
|
Requires: libguestfs >= 1:1.20.0
|
|
|
|
# Needs fuse-libs (RHBZ#599300).
|
|
Requires: fuse-libs
|
|
|
|
# Source and patches for ntfs. Try to keep this in step with Fedora.
|
|
Source0: http://tuxera.com/opensource/ntfs-3g_ntfsprogs-%{ntfs_version}.tgz
|
|
Source1: 20-ntfs-config-write-policy.fdi
|
|
|
|
Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch
|
|
Patch1: ntfs-3g-junction-point-fix.patch
|
|
# Windows 8 safety checks
|
|
Patch2: ntfs-3g-4d0b9163c9ef1f0cdbbf533317b291220c7fd1c7.patch
|
|
Patch3: ntfs-3g-559270a8f67c77a7ce51246c23d2b2837bcff0c9.patch
|
|
|
|
BuildRequires: fuse-devel
|
|
Requires: fuse
|
|
|
|
BuildRequires: libtool, libattr-devel
|
|
BuildRequires: libconfig-devel, libgcrypt-devel, gnutls-devel, libuuid-devel
|
|
|
|
# Required by binaries in the supermin appliance.
|
|
Requires: libgcrypt, gnutls, p11-kit, libtasn1, zlib
|
|
|
|
|
|
%description
|
|
This optional package adds support for Windows guests (NTFS) to the
|
|
base libguestfs Red Hat Enterprise Linux (RHEL) package. This is
|
|
useful for examining Windows virtual machines running on RHEL, and for
|
|
performing V2V of Windows guests from another hypervisor to RHEL.
|
|
|
|
To enable Windows support, simply install this package.
|
|
|
|
To disable Windows support, uninstall this package.
|
|
|
|
|
|
%prep
|
|
%setup -q -n ntfs-3g_ntfsprogs-%{ntfs_version}
|
|
%patch0 -p1 -b .unsupported
|
|
%patch1 -p1 -b .junction-fix
|
|
%patch2 -p1 -b .4d0b9163
|
|
%patch3 -p1 -b .559270a8
|
|
|
|
|
|
%build
|
|
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
|
|
%configure \
|
|
--disable-static \
|
|
--disable-ldconfig \
|
|
--with-fuse=external \
|
|
--exec-prefix=/ \
|
|
--enable-crypto \
|
|
--enable-extras
|
|
make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool
|
|
|
|
# Create a README file.
|
|
cat <<'EOF' > README
|
|
This optional package adds support for Windows guests (NTFS) to the
|
|
base libguestfs Red Hat Enterprise Linux (RHEL) package. This is
|
|
useful for examining Windows virtual machines running on RHEL, and for
|
|
performing V2V of Windows guests from another hypervisor to RHEL.
|
|
|
|
The package contains NTFS programs from ntfsprogs %{ntfsprogs_version}
|
|
and NTFS FUSE filesystem support from ntfs-3g %{ntfs_3g_version}.
|
|
EOF
|
|
|
|
|
|
%install
|
|
mkdir ntfs
|
|
export DESTDIR=$(pwd)/ntfs
|
|
|
|
#----- Standard package install rule, but installing into ntfs/ subdir.
|
|
make LIBTOOL=%{_bindir}/libtool install
|
|
rm -rf $DESTDIR%{_libdir}/*.la
|
|
rm -rf $DESTDIR%{_libdir}/*.a
|
|
|
|
rm -rf $DESTDIR%{_sbindir}/mount.ntfs-3g
|
|
cp -a $DESTDIR%{_bindir}/ntfs-3g $DESTDIR%{_sbindir}/mount.ntfs-3g
|
|
|
|
# Actually make some symlinks for simplicity...
|
|
# ... since we're obsoleting ntfsprogs-fuse
|
|
pushd $DESTDIR%{_bindir}
|
|
ln -s ntfs-3g ntfsmount
|
|
popd
|
|
pushd $DESTDIR%{_sbindir}
|
|
ln -s mount.ntfs-3g mount.ntfs-fuse
|
|
# And since there is no other package in Fedora that provides an ntfs
|
|
# mount...
|
|
ln -s mount.ntfs-3g mount.ntfs
|
|
# Need this for fsck to find it
|
|
ln -s ../bin/ntfsck fsck.ntfs
|
|
popd
|
|
mv $DESTDIR/sbin/* $DESTDIR%{_sbindir}
|
|
rmdir $DESTDIR/sbin
|
|
|
|
# We get this on our own, thanks.
|
|
rm -rf $DESTDIR%{_defaultdocdir}/%{name}/README
|
|
|
|
mkdir -p $DESTDIR%{_datadir}/hal/fdi/policy/10osvendor/
|
|
cp -a %{SOURCE1} $DESTDIR%{_datadir}/hal/fdi/policy/10osvendor/
|
|
#----- End of standard package install rule.
|
|
|
|
# Copy the files we need to a static supermin appliance.
|
|
rm -f files
|
|
echo . >> files
|
|
echo usr >> files
|
|
echo usr/bin >> files
|
|
echo usr/lib64 >> files
|
|
echo usr/sbin >> files
|
|
pushd ntfs
|
|
find | egrep '/s?bin/|/lib(64)/' >> ../files
|
|
cpio --quiet -o -H newc < ../files > ../ntfs.img
|
|
popd
|
|
|
|
# Supporting hostfiles.
|
|
cat <<'EOF' > ntfs.hostfiles
|
|
.
|
|
./usr
|
|
.%{_libdir}
|
|
.%{_libdir}/libfuse.so.*
|
|
.%{_libdir}/libgcrypt.so.*
|
|
.%{_libdir}/libgnutls.so.*
|
|
.%{_libdir}/libgpg-error.so.*
|
|
.%{_libdir}/libp11-kit.so.*
|
|
.%{_libdir}/libtasn1.so.*
|
|
.%{_libdir}/libz.so.*
|
|
./lib64
|
|
./lib64/libfuse.so.*
|
|
EOF
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d
|
|
install -m 0644 ntfs.img $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d/
|
|
install -m 0644 ntfs.hostfiles $RPM_BUILD_ROOT%{_libdir}/guestfs/supermin.d/
|
|
|
|
|
|
%files
|
|
%doc COPYING README
|
|
%{_libdir}/guestfs/supermin.d/ntfs.img
|
|
%{_libdir}/guestfs/supermin.d/ntfs.hostfiles
|
|
|
|
|
|
%changelog
|
|
* Thu Dec 20 2011 Richard W.M. Jones <rjones@redhat.com> - 7.0-1
|
|
- New package for RHEL 7
|
|
resolves: rhbz#819939
|
|
- Resync against Rawhide package.
|
|
|
|
* Mon Mar 28 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-7
|
|
- Disable debuginfo package.
|
|
resolves: RHBZ#691555.
|
|
|
|
* Tue Mar 8 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-6
|
|
- Require libguestfs 1.7.17 (newer version in RHEL 6.1).
|
|
- Require febootstrap-supermin-helper instead of febootstrap
|
|
resolves: RHBZ#670299.
|
|
|
|
* Thu Jul 1 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-5
|
|
- Make sure intermediate lib* directories are created in hostfiles (RHBZ#603429)
|
|
|
|
* Thu Jun 3 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-4
|
|
- Requires fuse-libs (RHBZ#599300).
|
|
|
|
* Fri May 21 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-3
|
|
- ExclusiveArch x86_64.
|
|
|
|
* Tue May 18 2010 Richard W.M. Jones <rjones@redhat.com> - 1.0-2
|
|
- Package Windows support for libguestfs.
|