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
38 BuildRequires: ruby-devel
39 BuildRequires: rubygem-rake
42 Requires: qemu >= 0.10-7
46 Libguestfs is a library for accessing and modifying guest disk images.
47 Amongst the things this is good for: making batch configuration
48 changes to guests, getting disk used/free statistics (see also:
49 virt-df), migrating between virtualization systems (see also:
50 virt-p2v), performing partial backups, performing partial guest
51 clones, cloning guests and changing registry/UUID/hostname info, and
54 Libguestfs uses Linux kernel and qemu code, and can access any type of
55 guest filesystem that Linux and qemu can, including but not limited
56 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
57 schemes, qcow, qcow2, vmdk.
59 Libguestfs provides ways to enumerate guest storage (eg. partitions,
60 LVs, what filesystem is in each LV, etc.). It can also run commands
61 in the context of the guest. Also you can access filesystems over FTP.
63 Libguestfs is a library that can be linked with C and C++ management
66 See also the 'guestfish' package for shell scripting and command line
69 For Perl bindings, see 'libguestfs-perl'.
71 For OCaml bindings, see 'libguestfs-ocaml-devel'.
73 For Python bindings, see 'libguestfs-python'.
75 For Ruby bindings, see 'libguestfs-ruby'.
79 Summary: Development tools and libraries for %{name}
80 Group: Development/Libraries
81 Requires: %{name} = %{version}-%{release}
85 %{name}-devel contains development tools and libraries
90 Summary: Shell for accessing and modifying virtual machine disk images
91 Group: Development/Tools
93 Requires: %{name} = %{version}-%{release}
94 Requires: /usr/bin/pod2text
97 %description -n guestfish
98 Guestfish is the Filesystem Interactive SHell, for accessing and
99 modifying virtual machine disk images from the command line and shell
104 Summary: OCaml bindings for %{name}
105 Group: Development/Libraries
106 Requires: %{name} = %{version}-%{release}
110 %{name}-ocaml contains OCaml bindings for %{name}.
112 This is for toplevel and scripting access only. To compile OCaml
113 programs which use %{name} you will also need %{name}-ocaml-devel.
117 Summary: OCaml bindings for %{name}
118 Group: Development/Libraries
119 Requires: %{name}-ocaml = %{version}-%{release}
122 %description ocaml-devel
123 %{name}-ocaml-devel contains development libraries
124 required to use the OCaml bindings for %{name}.
128 Summary: Perl bindings for %{name}
129 Group: Development/Libraries
130 Requires: %{name} = %{version}-%{release}
131 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
135 %{name}-perl contains Perl bindings for %{name}.
139 Summary: Python bindings for %{name}
140 Group: Development/Libraries
141 Requires: %{name} = %{version}-%{release}
143 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
144 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
147 %{name}-python contains Python bindings for %{name}.
151 Summary: Ruby bindings for %{name}
152 Group: Development/Libraries
153 Requires: %{name} = %{version}-%{release}
154 Requires: ruby(abi) = 1.8
155 Provides: ruby(guestfs) = %{version}
157 %{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
158 %{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
161 %{name}-ruby contains Ruby bindings for %{name}.
171 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
173 make INSTALLDIRS=vendor
177 test -n "$QUICK_RPMBUILD" || make check
181 rm -rf $RPM_BUILD_ROOT
183 make DESTDIR=$RPM_BUILD_ROOT install
185 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
186 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
188 # Clean up the examples/ directory which will get installed in %doc.
189 # Note we can't delete the original examples/Makefile because that
190 # will be needed by the check section later in the RPM build.
198 # Same for ocaml/examples.
199 cp -a ocaml/examples ocaml/ex
205 find $RPM_BUILD_ROOT -name perllocal.pod -delete
206 find $RPM_BUILD_ROOT -name .packlist -delete
208 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a
209 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la
211 if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
212 mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
213 mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
214 $RPM_BUILD_ROOT%{python_sitelib}/
217 # Install ruby bindings by hand.
218 mkdir -p $RPM_BUILD_ROOT%{ruby_sitelib}
219 mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch}
220 install -p -m0644 ruby/lib/guestfs.rb $RPM_BUILD_ROOT%{ruby_sitelib}
221 install -p -m0755 ruby/ext/guestfs/_guestfs.so $RPM_BUILD_ROOT%{ruby_sitearch}
225 rm -rf $RPM_BUILD_ROOT
228 %post -p /sbin/ldconfig
230 %postun -p /sbin/ldconfig
234 %defattr(-,root,root,-)
237 %{_libdir}/libguestfs.so.*
241 %defattr(-,root,root,-)
242 %doc HACKING TODO README ex html/guestfs.3.html html/pod.css
243 %doc src/generator.ml
244 %{_libdir}/libguestfs.so
245 %{_mandir}/man3/guestfs.3*
246 %{_includedir}/guestfs.h
247 %{_includedir}/guestfs-actions.h
248 %{_includedir}/guestfs-structs.h
252 %defattr(-,root,root,-)
253 %doc html/guestfish.1.html html/pod.css
255 %{_mandir}/man1/guestfish.1*
259 %defattr(-,root,root,-)
260 %{_libdir}/ocaml/guestfs
261 %exclude %{_libdir}/ocaml/guestfs/*.a
262 %exclude %{_libdir}/ocaml/guestfs/*.cmxa
263 %exclude %{_libdir}/ocaml/guestfs/*.cmx
264 %exclude %{_libdir}/ocaml/guestfs/*.mli
265 %{_libdir}/ocaml/stublibs/*.so
266 %{_libdir}/ocaml/stublibs/*.so.owner
270 %defattr(-,root,root,-)
272 %{_libdir}/ocaml/guestfs/*.a
273 %{_libdir}/ocaml/guestfs/*.cmxa
274 %{_libdir}/ocaml/guestfs/*.cmx
275 %{_libdir}/ocaml/guestfs/*.mli
279 %defattr(-,root,root,-)
282 %{_mandir}/man3/Sys::Guestfs.3pm*
286 %defattr(-,root,root,-)
288 %{python_sitelib}/*.py
289 %{python_sitelib}/*.pyc
290 %{python_sitelib}/*.pyo
294 %defattr(-,root,root,-)
295 %{ruby_sitelib}/guestfs.rb
296 %{ruby_sitearch}/_guestfs.so
300 * Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - @VERSION@-1
301 - New upstream version @VERSION@.
303 * Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - 0.9.9-12
304 - Multiple fixes to get it to scratch build in Koji.
306 * Sat Apr 4 2009 Richard Jones <rjones@redhat.com> - 0.9.9-1