3 Summary: Access and modify virtual machine disk images
8 Group: Development/Libraries
9 URL: http://et.redhat.com/~rjones/libguestfs/
10 Source0: http://et.redhat.com/~rjones/libguestfs/files/%{name}-%{version}.tar.gz
11 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
13 # Basic build requirements:
14 BuildRequires: /usr/bin/pod2man
15 BuildRequires: /usr/bin/pod2text
16 BuildRequires: febootstrap >= 1.5
17 BuildRequires: augeas-devel >= 0.5.0
18 BuildRequires: readline-devel
19 BuildRequires: qemu >= 0.10-7
20 BuildRequires: createrepo
22 # Build requirements for the appliance:
23 # (see 'make-initramfs.sh.in' in the source)
24 BuildRequires: kernel, bash, coreutils, lvm2, ntfs-3g, util-linux-ng
25 BuildRequires: MAKEDEV, net-tools, augeas-libs, file
26 BuildRequires: module-init-tools, procps, strace, iputils
28 # These are only required if you want to build the bindings for
29 # different languages:
31 BuildRequires: ocaml-findlib-devel
32 BuildRequires: perl-devel
33 BuildRequires: perl-Test-Simple
34 BuildRequires: perl-Test-Pod
35 BuildRequires: perl-Test-Pod-Coverage
36 BuildRequires: perl-ExtUtils-MakeMaker
37 BuildRequires: python-devel
40 Requires: qemu >= 0.10-7
44 Libguestfs is a library for accessing and modifying guest disk images.
45 Amongst the things this is good for: making batch configuration
46 changes to guests, getting disk used/free statistics (see also:
47 virt-df), migrating between virtualization systems (see also:
48 virt-p2v), performing partial backups, performing partial guest
49 clones, cloning guests and changing registry/UUID/hostname info, and
52 Libguestfs uses Linux kernel and qemu code, and can access any type of
53 guest filesystem that Linux and qemu can, including but not limited
54 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
55 schemes, qcow, qcow2, vmdk.
57 Libguestfs provides ways to enumerate guest storage (eg. partitions,
58 LVs, what filesystem is in each LV, etc.). It can also run commands
59 in the context of the guest. Also you can access filesystems over FTP.
61 Libguestfs is a library that can be linked with C and C++ management
64 See also the 'guestfish' package for shell scripting and command line
67 For Perl bindings, see 'libguestfs-perl'.
69 For OCaml bindings, see 'libguestfs-ocaml-devel'.
71 For Python bindings, see 'libguestfs-python'.
75 Summary: Development tools and libraries for %{name}
76 Group: Development/Libraries
77 Requires: %{name} = %{version}-%{release}
81 %{name}-devel contains development tools and libraries
86 Summary: Shell for accessing and modifying virtual machine disk images
87 Group: Development/Tools
89 Requires: %{name} = %{version}-%{release}
90 Requires: /usr/bin/pod2text
93 %description -n guestfish
94 Guestfish is the Filesystem Interactive SHell, for accessing and
95 modifying virtual machine disk images from the command line and shell
100 Summary: OCaml bindings for %{name}
101 Group: Development/Libraries
102 Requires: %{name} = %{version}-%{release}
106 %{name}-ocaml contains OCaml bindings for %{name}.
108 This is for toplevel and scripting access only. To compile OCaml
109 programs which use %{name} you will also need %{name}-ocaml-devel.
113 Summary: OCaml bindings for %{name}
114 Group: Development/Libraries
115 Requires: %{name}-ocaml = %{version}-%{release}
118 %description ocaml-devel
119 %{name}-ocaml-devel contains development libraries
120 required to use the OCaml bindings for %{name}.
124 Summary: Perl bindings for %{name}
125 Group: Development/Libraries
126 Requires: %{name} = %{version}-%{release}
127 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
131 %{name}-perl contains Perl bindings for %{name}.
135 Summary: Python bindings for %{name}
136 Group: Development/Libraries
137 Requires: %{name} = %{version}-%{release}
139 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
140 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
143 %{name}-python contains Python bindings for %{name}.
153 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
155 make INSTALLDIRS=vendor
159 test -n "$QUICK_RPMBUILD" || make check
163 rm -rf $RPM_BUILD_ROOT
165 make DESTDIR=$RPM_BUILD_ROOT install
167 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
168 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
170 # Clean up the examples/ directory which will get installed in %doc.
171 # Note we can't delete the original examples/Makefile because that
172 # will be needed by the check section later in the RPM build.
180 # Same for ocaml/examples.
181 cp -a ocaml/examples ocaml/ex
187 find $RPM_BUILD_ROOT -name perllocal.pod -delete
188 find $RPM_BUILD_ROOT -name .packlist -delete
190 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a
191 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la
193 if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
194 mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
195 mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
196 $RPM_BUILD_ROOT%{python_sitelib}/
201 rm -rf $RPM_BUILD_ROOT
204 %post -p /sbin/ldconfig
206 %postun -p /sbin/ldconfig
210 %defattr(-,root,root,-)
213 %{_libdir}/libguestfs.so.*
217 %defattr(-,root,root,-)
218 %doc HACKING TODO README ex html/guestfs.3.html html/pod.css
219 %doc src/generator.ml
220 %{_libdir}/libguestfs.so
221 %{_mandir}/man3/guestfs.3*
222 %{_includedir}/guestfs.h
223 %{_includedir}/guestfs-actions.h
224 %{_includedir}/guestfs-structs.h
228 %defattr(-,root,root,-)
229 %doc html/guestfish.1.html html/pod.css
231 %{_mandir}/man1/guestfish.1*
235 %defattr(-,root,root,-)
236 %{_libdir}/ocaml/guestfs
237 %exclude %{_libdir}/ocaml/guestfs/*.a
238 %exclude %{_libdir}/ocaml/guestfs/*.cmxa
239 %exclude %{_libdir}/ocaml/guestfs/*.cmx
240 %exclude %{_libdir}/ocaml/guestfs/*.mli
241 %{_libdir}/ocaml/stublibs/*.so
242 %{_libdir}/ocaml/stublibs/*.so.owner
246 %defattr(-,root,root,-)
248 %{_libdir}/ocaml/guestfs/*.a
249 %{_libdir}/ocaml/guestfs/*.cmxa
250 %{_libdir}/ocaml/guestfs/*.cmx
251 %{_libdir}/ocaml/guestfs/*.mli
255 %defattr(-,root,root,-)
258 %{_mandir}/man3/Sys::Guestfs.3pm*
262 %defattr(-,root,root,-)
264 %{python_sitelib}/*.py
265 %{python_sitelib}/*.pyc
266 %{python_sitelib}/*.pyo
270 * Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - @VERSION@-1
271 - New upstream version @VERSION@.
273 * Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - 0.9.9-12
274 - Multiple fixes to get it to scratch build in Koji.
276 * Sat Apr 4 2009 Richard Jones <rjones@redhat.com> - 0.9.9-1