diff --git a/README b/README new file mode 100644 index 0000000..6028bde --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +The ntfs-3g tools contained in this archive are provided for the exclusive +use of guestfs tools. Any use of these ntfs-3g tools outside the guestfs +tools context is unsupported and strictly forbidden. diff --git a/libguestfs.changes b/libguestfs.changes index 6def7f9..4cf19e3 100644 --- a/libguestfs.changes +++ b/libguestfs.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Sep 21 13:25:16 UTC 2017 - jengelh@inai.de + +- Update summaries and RPM groups. Trim description for size. +- Replace old $RPM_ shell vars by macros. + Remove redundant %clean section. + +------------------------------------------------------------------- +Wed Sep 20 17:18:24 UTC 2017 - cbosdonnat@suse.com + +- Add windows support files to the appliance for SLES (fate#316274) +- Merge SLES and openSUSE spec files. + ------------------------------------------------------------------- Mon Sep 4 19:15:25 UTC 2017 - cbosdonnat@suse.com diff --git a/libguestfs.spec b/libguestfs.spec index 9ead920..b3774f0 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -150,6 +150,7 @@ Patch100: appliance.patch Source0: http://download.libguestfs.org/1.36-stable/libguestfs-%{version}.tar.gz Source1: libguestfs.rpmlintrc Source100: mount-rootfs-and-chroot.sh +Source101: README Source789653: Pod-Simple-3.23.tar.xz # Source10001: libguestfs.test.simple.run-libugestfs-test-tool.sh @@ -168,16 +169,6 @@ disk images. You can use this for viewing and editing files inside guests, scripting changes to VMs, monitoring disk used/free statistics, P2V, V2V, performing partial backups, cloning VMs, and much else besides. -libguestfs can access nearly any type of filesystem including: all known types -of Linux filesystem (ext2/3/4, XFS, btrfs etc), any Windows filesystem (VFAT -and NTFS), any Mac OS X and BSD filesystems, LVM2 volume management, MBR and -GPT disk partitions, raw disks, qcow2, VirtualBox VDI, VMWare VMDK, CD and DVD -ISOs, SD cards, and dozens more. libguestfs doesn't need root permissions. - -All this functionality is available through a convenient shell called -guestfish, or use virt-rescue to get a rescue shell for fixing unbootable -virtual machines. - %package -n guestfs-tools Summary: Tools for accessing and modifying virtual machine disk images License: GPL-2.0 @@ -246,18 +237,18 @@ This package is only required for building the appliance. # %if %{with ocaml_bindings} %package -n ocaml-libguestfs -Summary: Provides OCaml support for libguestfs +Summary: OCaml bindings for libguestfs # License: GPL-2.0 -Group: System/Filesystems +Group: Development/Languages/Ocaml %description -n ocaml-libguestfs Allows OCaml scripts to directly use libguestfs. %package -n ocaml-libguestfs-devel -Summary: Provides OCaml support for libguestfs +Summary: Development files for libguesfs OCaml bindings License: GPL-2.0 -Group: Development/Libraries/Other +Group: Development/Languages/Ocaml %description -n ocaml-libguestfs-devel Allows OCaml scripts to directly use libguestfs. @@ -265,9 +256,9 @@ Allows OCaml scripts to directly use libguestfs. # %if %{with perl_bindings} %package -n perl-Sys-Guestfs -Summary: Provides Perl support for libguestfs +Summary: Perl bindings for libguestfs License: GPL-2.0 -Group: System/Filesystems +Group: Development/Languages/Perl BuildRequires: perl BuildRequires: perl(Data::Dumper) BuildRequires: perl(Getopt::Long) @@ -294,9 +285,9 @@ Allows Perl scripts to directly use libguestfs. # %if %{with lua_bindings} %package -n lua-libguestfs -Summary: Provides Lua support for libguestfs +Summary: Lua bindings for libguestfs License: GPL-2.0 -Group: System/Filesystems +Group: Development/Languages/Lua BuildRequires: lua-devel Requires: guestfs-data >= %{version} %define _configure_lua --enable-lua @@ -310,9 +301,9 @@ Allows lua scripts to directly use libguestfs. %if %{with python_bindings} %{?!python_module:%define python_module() python-%{**} python3-%{**}} %package -n python2-libguestfs -Summary: Provides Python 2 support for libguestfs +Summary: Python 2 bindings for libguestfs License: GPL-2.0 -Group: System/Filesystems +Group: Development/Languages/Python BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: python @@ -328,9 +319,9 @@ Requires: guestfs-data >= %{version} Allows Python 2 scripts to directly use libguestfs. %package -n python3-libguestfs -Summary: Provides Python 3 support for libguestfs +Summary: Python 3 bindings for libguestfs License: GPL-2.0 -Group: System/Filesystems +Group: Development/Languages/Python %define _configure_python --enable-python # Obsoletes: libguestfs-python < %{version} @@ -346,7 +337,7 @@ Allows Python 3 scripts to directly use libguestfs. %package -n rubygem-libguestfs Summary: Ruby bindings for libguestfs License: GPL-2.0 -Group: System/Filesystems +Group: Development/Languages/Ruby BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygem-rake @@ -361,7 +352,7 @@ Allows Ruby scripts to directly use libguestfs. %package test Summary: Testcases for libguestfs License: GPL-2.0 -Group: System/Filesystems +Group: Development/Tools/Other Requires: %{name} %description test @@ -456,6 +447,9 @@ Recommends: parted Recommends: zerofree Recommends: genisoimage Recommends: ldmtool +%if %{?is_opensuse:0} == 0 +Recommends: guestfs-winsupport +%endif Summary: Virtual machine needed for libguestfs License: GPL-2.0 @@ -467,11 +461,25 @@ Obsoletes: libguestfs-data < %{version} libguestfs needs for it's run a virtual machine image. This package provides such an image, an initrd and a kernel. +%if 0%{?is_opensuse} == 0 +%package -n guestfs-winsupport +Summary: Windows guest support in libguestfs +License: GPL-2.0+ +Group: System/Filesystems +Requires: libguestfs >= 1.32 +BuildRequires: ntfs-3g +BuildRequires: ntfsprogs +BuildRequires: rsync + +%description -n guestfs-winsupport +Provides the needed pieces for libguestfs to handle Windows guests. + +%endif %package devel Summary: Development files for libguestfs License: GPL-2.0 -Group: Development/Libraries/Other +Group: Development/Libraries/C and C++ Requires: libguestfs0 = %{version} %description devel @@ -482,29 +490,14 @@ disk images. You can use this for viewing and editing files inside guests, scripting changes to VMs, monitoring disk used/free statistics, P2V, V2V, performing partial backups, cloning VMs, and much else besides. -libguestfs can access nearly any type of filesystem including: all known types -of Linux filesystem (ext2/3/4, XFS, btrfs etc), any Windows filesystem (VFAT -and NTFS), any Mac OS X and BSD filesystems, LVM2 volume management, MBR and -GPT disk partitions, raw disks, qcow2, VirtualBox VDI, VMWare VMDK, CD and DVD -ISOs, SD cards, and dozens more. libguestfs doesn't need root permissions. - -All this functionality is available through a convenient shell called -guestfish, or use virt-rescue to get a rescue shell for fixing unbootable -virtual machines. - %package -n libguestfs0 Summary: Runtime library of libguestfs License: LGPL-2.1 -Group: System/Filesystems +Group: System/Libraries Requires: %{kvm_binary} Requires: qemu >= 2.0 Requires: qemu-tools Requires: supermin >= 5.1.6 -%if %suse_version == 1315 -%if 0%{?is_opensuse} == 0 -Recommends: guestfs-winsupport -%endif -%endif %description -n libguestfs0 Library for libguestfs. @@ -574,8 +567,8 @@ export QEMU="%{kvm_binary}" export SUPERMIN=supermin export SUPERMIN_HELPER=supermin-helper # for configure macro below -CFLAGS="$RPM_OPT_FLAGS -Wno-unused" -CXXFLAGS="$RPM_OPT_FLAGS -Wno-unused" +export CFLAGS="%{optflags} -Wno-unused" +export CXXFLAGS="%{optflags} -Wno-unused" autoreconf -fi # @@ -619,28 +612,28 @@ make \ %makeinstall \ INSTALLDIRS=vendor \ udevrulesdir=%{udevrulesdir} -find $RPM_BUILD_ROOT -ls -mkdir -p $RPM_BUILD_ROOT%{_datadir}/guestfs -cp -avLt $RPM_BUILD_ROOT%{_datadir}/guestfs \ +find %{buildroot} -ls +mkdir -p %{buildroot}/%{_datadir}/guestfs +cp -avLt %{buildroot}/%{_datadir}/guestfs \ %{S:10005} \ %{S:10004} \ %{S:10003} \ %{S:10002} \ %{S:10001} -chmod 0755 $RPM_BUILD_ROOT%{_datadir}/guestfs/* +chmod 0755 %{buildroot}/%{_datadir}/guestfs/* #remove ocaml bindings files if they are disable via rpm macro %if !%{with ocaml_bindings} -rm -rfv $RPM_BUILD_ROOT%{_libdir}/ocaml +rm -rfv %{buildroot}/%{_libdir}/ocaml %endif -rm -rfv $RPM_BUILD_ROOT%{guestfs_docdir} -find $RPM_BUILD_ROOT -type f \( \ +rm -rfv %{buildroot}/%{guestfs_docdir} +find %{buildroot}/ -type f \( \ -name "virt-list-filesystems" -o -name "virt-list-filesystems.*" -o \ -name "virt-list-partitions" -o -name "virt-list-partitions.*" -o \ -name "virt-tar" -o -name "virt-tar.*" \ \) -print -delete %if %{with perl_bindings} # Delete empty perl bootstrap files -find $RPM_BUILD_ROOT -name "*.bs" -size 0c -print -delete +find %{buildroot}/ -name "*.bs" -size 0c -print -delete %perl_process_packlist %perl_gen_filelist # the macro above packages everything, here only the perl files are desrired @@ -650,7 +643,7 @@ mv t %{name}.files %if %{with python_bindings} pushd python -sed -i -e "s:libraries=:library_dirs=['$RPM_BUILD_ROOT/%{_libdir}'], libraries=:" setup.py +sed -i -e "s:libraries=:library_dirs=['%{buildroot}/%{_libdir}'], libraries=:" setup.py make stamp-extra-files # Build needs libguestfs library to be installed @@ -667,38 +660,53 @@ popd %endif # -find $RPM_BUILD_ROOT -name "*.la" -print -delete -rm -fv $RPM_BUILD_ROOT/%{_libdir}/*.a +find %{buildroot}/ -name "*.la" -print -delete +rm -fv %{buildroot}/%{_libdir}/*.a # touch %{name}.lang %find_lang %{name} -%fdupes -s $RPM_BUILD_ROOT +%fdupes -s %{buildroot}/ -mkdir -p $RPM_BUILD_ROOT/tmp/etc/alternatives -pushd $RPM_BUILD_ROOT/tmp/etc/alternatives +# Appliance NTFS files +%if %{?is_opensuse} +mkdir -p %{buildroot}/tmp/etc/alternatives +pushd %{buildroot}/tmp/etc/alternatives ln -s /sbin/mount.ntfs-3g mount.ntfs popd -pushd $RPM_BUILD_ROOT/tmp -tar czf $RPM_BUILD_ROOT/%{_libdir}/guestfs/supermin.d/zz-ntfs-symlink.tar.gz etc +pushd %{buildroot}/tmp +tar -czf %{buildroot}/%{_libdir}/guestfs/supermin.d/zz-ntfs-symlink.tar.gz etc popd -rm -rf $RPM_BUILD_ROOT/tmp +rm -rf %{buildroot}/tmp +%else +# Just copy the content of the ntfs packages +mkdir winsupport +for pkg in $(rpm -qa | grep ntfs); do + rpm -ql $pkg > $pkg.list + rsync -av --files-from $pkg.list / winsupport +done -mkdir -p $RPM_BUILD_ROOT/tmp/usr/bin -cp %{S:100} $RPM_BUILD_ROOT/tmp/usr/bin -chmod a+x $RPM_BUILD_ROOT/tmp/usr/bin/* -pushd $RPM_BUILD_ROOT/tmp -tar czf $RPM_BUILD_ROOT/%{_libdir}/guestfs/supermin.d/zz-scripts.tar.gz usr +cp %{S:101} winsupport + +pushd winsupport +tar zcf %{buildroot}%{_libdir}/guestfs/supermin.d/zz-winsupport.tar.gz . popd -rm -rf $RPM_BUILD_ROOT/tmp + +echo "libfuse2" > %{buildroot}%{_libdir}/guestfs/supermin.d/zz-packages-winsupport +%endif + +mkdir -p %{buildroot}/tmp/usr/bin +cp %{S:100} %{buildroot}/tmp/usr/bin +chmod a+x %{buildroot}/tmp/usr/bin/* +pushd %{buildroot}/tmp +tar -czf %{buildroot}/%{_libdir}/guestfs/supermin.d/zz-scripts.tar.gz usr +popd +rm -rf %{buildroot}/tmp %if %{with p2v} # Remove the kickstart files from p2v package -rm $RPM_BUILD_ROOT/%{_datadir}/virt-p2v/p2v.ks.in +rm %{buildroot}/%{_datadir}/virt-p2v/p2v.ks.in %endif -%clean -rm -rf $RPM_BUILD_ROOT - %post -n libguestfs0 -p /sbin/ldconfig %postun -n libguestfs0 -p /sbin/ldconfig @@ -708,7 +716,26 @@ rm -rf $RPM_BUILD_ROOT %files -n guestfs-data %defattr(-,root,root) -%{_libdir}/guestfs +%dir %{_libdir}/guestfs +%dir %{_libdir}/guestfs/supermin.d +%{_libdir}/guestfs/supermin.d/base.tar.gz +%{_libdir}/guestfs/supermin.d/daemon.tar.gz +%{_libdir}/guestfs/supermin.d/init.tar.gz +%{_libdir}/guestfs/supermin.d/udev-rules.tar.gz +%{_libdir}/guestfs/supermin.d/excludefiles +%{_libdir}/guestfs/supermin.d/hostfiles +%{_libdir}/guestfs/supermin.d/packages +%{_libdir}/guestfs/supermin.d/zz-scripts.tar.gz + +%if %{?is_opensuse} +%{_libdir}/guestfs/supermin.d/zz-ntfs-symlink.tar.gz +%endif + +%if 0%{?is_opensuse} == 0 +%files -n guestfs-winsupport +%defattr(-,root,root) +%{_libdir}/guestfs/supermin.d/zz-*winsupport* +%endif %if %{with ocaml_bindings} %files -n ocaml-libguestfs