1 # libguestfs.spec. Generated from libguestfs.spec.in by configure.
3 # Enable to build w/o network.
6 Summary: Access and modify virtual machine disk images
11 Group: Development/Libraries
12 URL: http://et.redhat.com/~rjones/libguestfs/
13 Source0: http://et.redhat.com/~rjones/libguestfs/files/%{name}-%{version}.tar.gz
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16 # Currently fails on non-x86 because of this error:
17 # "qemu: linux kernel too old to load a ram disk"
18 ExclusiveArch: %{ix86} x86_64
20 # Basic build requirements:
21 BuildRequires: /usr/bin/pod2man
22 BuildRequires: /usr/bin/pod2text
23 BuildRequires: febootstrap >= 2.0
24 BuildRequires: augeas-devel >= 0.5.0
25 BuildRequires: readline-devel
26 BuildRequires: qemu >= 0.10-7
27 BuildRequires: createrepo
29 # This is only needed for RHEL 5 because readline-devel doesn't
30 # properly depend on it, but doesn't do any harm on other platforms:
31 BuildRequires: ncurses-devel
33 # Build requirements for the appliance:
34 # (see 'make-initramfs.sh.in' in the source)
35 BuildRequires: kernel, bash, coreutils, lvm2, ntfs-3g, util-linux-ng
36 BuildRequires: MAKEDEV, net-tools, augeas-libs, file
37 BuildRequires: module-init-tools, procps, strace, iputils
38 BuildRequires: grub, dosfstools, ntfsprogs
40 # These are only required if you want to build the bindings for
41 # different languages:
43 BuildRequires: ocaml-findlib-devel
44 BuildRequires: perl-devel
45 BuildRequires: perl-Test-Simple
46 BuildRequires: perl-Test-Pod
47 BuildRequires: perl-Test-Pod-Coverage
48 BuildRequires: perl-ExtUtils-MakeMaker
49 BuildRequires: python-devel
50 BuildRequires: ruby-devel
51 BuildRequires: rubygem-rake
52 BuildRequires: java >= 1.5.0
53 BuildRequires: jpackage-utils
54 BuildRequires: java-devel
57 BuildRequires: perl-Sys-Virt
60 Requires: qemu >= 0.10-7
64 Libguestfs is a library for accessing and modifying guest disk images.
65 Amongst the things this is good for: making batch configuration
66 changes to guests, getting disk used/free statistics (see also:
67 virt-df), migrating between virtualization systems (see also:
68 virt-p2v), performing partial backups, performing partial guest
69 clones, cloning guests and changing registry/UUID/hostname info, and
72 Libguestfs uses Linux kernel and qemu code, and can access any type of
73 guest filesystem that Linux and qemu can, including but not limited
74 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
75 schemes, qcow, qcow2, vmdk.
77 Libguestfs provides ways to enumerate guest storage (eg. partitions,
78 LVs, what filesystem is in each LV, etc.). It can also run commands
79 in the context of the guest. Also you can access filesystems over FTP.
81 Libguestfs is a library that can be linked with C and C++ management
84 See also the 'guestfish' package for shell scripting and command line
87 For Perl bindings, see 'perl-libguestfs'.
89 For OCaml bindings, see 'ocaml-libguestfs-devel'.
91 For Python bindings, see 'python-libguestfs'.
93 For Ruby bindings, see 'ruby-libguestfs'.
95 For Java bindings, see 'libguestfs-java-devel'.
99 Summary: Development tools and libraries for %{name}
100 Group: Development/Libraries
101 Requires: %{name} = %{version}-%{release}
106 %{name}-devel contains development tools and libraries
110 %package -n guestfish
111 Summary: Shell for accessing and modifying virtual machine disk images
112 Group: Development/Tools
114 Requires: %{name} = %{version}-%{release}
115 Requires: /usr/bin/pod2text
118 %description -n guestfish
119 Guestfish is the Filesystem Interactive SHell, for accessing and
120 modifying virtual machine disk images from the command line and shell
124 %package -n virt-inspector
125 Summary: Display OS version, kernel, drivers, etc in a virtual machine
126 Group: Development/Tools
128 Requires: %{name} = %{version}-%{release}
130 Requires: perl-Sys-Virt
133 %description -n virt-inspector
134 Virt-inspector examines a virtual machine and tries to determine the
135 version of the OS, the kernel version, what drivers are installed,
136 whether the virtual machine is fully virtualized (FV) or
137 para-virtualized (PV), what applications are installed and more.
140 %package -n ocaml-%{name}
141 Summary: OCaml bindings for %{name}
142 Group: Development/Libraries
143 Requires: %{name} = %{version}-%{release}
146 %description -n ocaml-%{name}
147 ocaml-%{name} contains OCaml bindings for %{name}.
149 This is for toplevel and scripting access only. To compile OCaml
150 programs which use %{name} you will also need ocaml-%{name}-devel.
153 %package -n ocaml-%{name}-devel
154 Summary: OCaml bindings for %{name}
155 Group: Development/Libraries
156 Requires: ocaml-%{name} = %{version}-%{release}
159 %description -n ocaml-%{name}-devel
160 ocaml-%{name}-devel contains development libraries
161 required to use the OCaml bindings for %{name}.
164 %package -n perl-%{name}
165 Summary: Perl bindings for %{name}
166 Group: Development/Libraries
167 Requires: %{name} = %{version}-%{release}
168 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
171 %description -n perl-%{name}
172 perl-%{name} contains Perl bindings for %{name}.
175 %package -n python-%{name}
176 Summary: Python bindings for %{name}
177 Group: Development/Libraries
178 Requires: %{name} = %{version}-%{release}
180 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
181 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
183 %description -n python-%{name}
184 python-%{name} contains Python bindings for %{name}.
187 %package -n ruby-%{name}
188 Summary: Ruby bindings for %{name}
189 Group: Development/Libraries
190 Requires: %{name} = %{version}-%{release}
191 Requires: ruby(abi) = 1.8
192 Provides: ruby(guestfs) = %{version}
194 %{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
195 %{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
197 %description -n ruby-%{name}
198 ruby-%{name} contains Ruby bindings for %{name}.
202 Summary: Java bindings for %{name}
203 Group: Development/Libraries
204 Requires: %{name} = %{version}-%{release}
205 Requires: java >= 1.5.0
206 Requires: jpackage-utils
209 %{name}-java contains Java bindings for %{name}.
211 If you want to develop software in Java which uses %{name}, then
212 you will also need %{name}-java-devel.
216 Summary: Java development package for %{name}
217 Group: Development/Libraries
218 Requires: %{name} = %{version}-%{release}
219 Requires: %{name}-java = %{version}-%{release}
221 %description java-devel
222 %{name}-java-devel contains the tools for developing Java software
225 See also %{name}-javadoc.
229 Summary: Java documentation for %{name}
230 Group: Development/Libraries
231 Requires: %{name} = %{version}-%{release}
232 Requires: %{name}-java = %{version}-%{release}
233 Requires: jpackage-utils
236 %{name}-javadoc contains the Java documentation for %{name}.
248 find /var/cache/yum/build -type f -name '*.rpm' -print0 | xargs -0 cp -t repo
250 %define extra --with-mirror=file://$(pwd)/repo --with-repo=fedora-12
256 --prefix=%{_prefix} --libdir=%{_libdir} \
257 --mandir=%{_mandir} \
258 --with-java-home=%{java_home} \
259 --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \
260 --enable-debug-command \
263 # This ensures that /usr/sbin/chroot is on the path. Not needed
264 # except for RHEL 5, it shouldn't do any harm on other platforms.
265 export PATH=/usr/sbin:$PATH
267 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
269 make INSTALLDIRS=vendor %{?_smp_mflags}
273 test -n "$QUICK_RPMBUILD" || make check
277 rm -rf $RPM_BUILD_ROOT
279 make DESTDIR=$RPM_BUILD_ROOT install
281 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
282 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
284 # Clean up the examples/ directory which will get installed in %doc.
285 # Note we can't delete the original examples/Makefile because that
286 # will be needed by the check section later in the RPM build.
294 # Same for ocaml/examples.
295 cp -a ocaml/examples ocaml/ex
301 find $RPM_BUILD_ROOT -name perllocal.pod -delete
302 find $RPM_BUILD_ROOT -name .packlist -delete
303 find $RPM_BUILD_ROOT -name '*.bs' -delete
305 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a
306 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la
308 if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
309 mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
310 mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
311 $RPM_BUILD_ROOT%{python_sitelib}/
314 # Install ruby bindings by hand.
315 mkdir -p $RPM_BUILD_ROOT%{ruby_sitelib}
316 mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch}
317 install -p -m0644 ruby/lib/guestfs.rb $RPM_BUILD_ROOT%{ruby_sitelib}
318 install -p -m0755 ruby/ext/guestfs/_guestfs.so $RPM_BUILD_ROOT%{ruby_sitearch}
320 # Remove static-linked Java bindings.
321 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.a
322 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.la
324 # Generator shouldn't be executable when we distribute it.
325 chmod -x src/generator.ml
329 rm -rf $RPM_BUILD_ROOT
332 %post -p /sbin/ldconfig
334 %postun -p /sbin/ldconfig
338 %defattr(-,root,root,-)
341 %{_libdir}/libguestfs.so.*
345 %defattr(-,root,root,-)
346 %doc ChangeLog HACKING TODO README ex html/guestfs.3.html html/pod.css
347 %doc src/generator.ml
348 %{_libdir}/libguestfs.so
349 %{_mandir}/man3/guestfs.3*
350 %{_includedir}/guestfs.h
351 %{_includedir}/guestfs-actions.h
352 %{_includedir}/guestfs-structs.h
353 %{_libdir}/pkgconfig/libguestfs.pc
357 %defattr(-,root,root,-)
358 %doc html/guestfish.1.html html/pod.css recipes/
360 %{_mandir}/man1/guestfish.1*
363 %files -n virt-inspector
364 %defattr(-,root,root,-)
365 %{_bindir}/virt-inspector
366 %{_mandir}/man1/virt-inspector.1*
369 %files -n ocaml-%{name}
370 %defattr(-,root,root,-)
372 %{_libdir}/ocaml/guestfs
373 %exclude %{_libdir}/ocaml/guestfs/*.a
374 %exclude %{_libdir}/ocaml/guestfs/*.cmxa
375 %exclude %{_libdir}/ocaml/guestfs/*.cmx
376 %exclude %{_libdir}/ocaml/guestfs/*.mli
377 %{_libdir}/ocaml/stublibs/*.so
378 %{_libdir}/ocaml/stublibs/*.so.owner
381 %files -n ocaml-%{name}-devel
382 %defattr(-,root,root,-)
384 %{_libdir}/ocaml/guestfs/*.a
385 %{_libdir}/ocaml/guestfs/*.cmxa
386 %{_libdir}/ocaml/guestfs/*.cmx
387 %{_libdir}/ocaml/guestfs/*.mli
390 %files -n perl-%{name}
391 %defattr(-,root,root,-)
394 %{_mandir}/man3/Sys::Guestfs.3pm*
397 %files -n python-%{name}
398 %defattr(-,root,root,-)
401 %{python_sitelib}/*.py
402 %{python_sitelib}/*.pyc
403 %{python_sitelib}/*.pyo
406 %files -n ruby-%{name}
407 %defattr(-,root,root,-)
409 %{ruby_sitelib}/guestfs.rb
410 %{ruby_sitearch}/_guestfs.so
414 %defattr(-,root,root,-)
416 %{_libdir}/libguestfs_jni*.so.*
417 %{_datadir}/java/*.jar
421 %defattr(-,root,root,-)
423 %{_libdir}/libguestfs_jni*.so
427 %defattr(-,root,root,-)
429 %{_datadir}/javadoc/%{name}-java-%{version}
433 * Fri May 8 2009 Richard Jones <rjones@redhat.com> - 1.0.23-1
434 - New upstream version 1.0.23.
436 * Fri May 8 2009 Richard Jones <rjones@redhat.com> - 1.0.21-2
437 - New upstream version 1.0.21.
439 * Thu May 7 2009 Richard Jones <rjones@redhat.com> - 1.0.20-2
440 - New upstream version 1.0.20.
442 * Thu May 7 2009 Richard Jones <rjones@redhat.com> - 1.0.19-1
443 - New upstream version 1.0.19.
445 * Tue Apr 28 2009 Richard Jones <rjones@redhat.com> - 1.0.15-1
446 - New upstream version 1.0.15.
448 * Fri Apr 24 2009 Richard Jones <rjones@redhat.com> - 1.0.12-1
449 - New upstream version 1.0.12.
451 * Wed Apr 22 2009 Richard Jones <rjones@redhat.com> - 1.0.6-1
452 - New upstream version 1.0.6.
454 * Mon Apr 20 2009 Richard Jones <rjones@redhat.com> - 1.0.2-1
455 - New upstream version 1.0.2.
457 * Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - 0.9.9-12
458 - Multiple fixes to get it to scratch build in Koji.
460 * Sat Apr 4 2009 Richard Jones <rjones@redhat.com> - 0.9.9-1