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
39 BuildRequires: zerofree
41 # These are only required if you want to build the bindings for
42 # different languages:
44 BuildRequires: ocaml-findlib-devel
45 BuildRequires: perl-devel
46 BuildRequires: perl-Test-Simple
47 BuildRequires: perl-Test-Pod
48 BuildRequires: perl-Test-Pod-Coverage
49 BuildRequires: perl-ExtUtils-MakeMaker
50 BuildRequires: python-devel
51 BuildRequires: ruby-devel
52 BuildRequires: rubygem-rake
53 BuildRequires: java >= 1.5.0
54 BuildRequires: jpackage-utils
55 BuildRequires: java-devel
58 BuildRequires: perl-Sys-Virt
61 Requires: qemu >= 0.10-7
65 Libguestfs is a library for accessing and modifying guest disk images.
66 Amongst the things this is good for: making batch configuration
67 changes to guests, getting disk used/free statistics (see also:
68 virt-df), migrating between virtualization systems (see also:
69 virt-p2v), performing partial backups, performing partial guest
70 clones, cloning guests and changing registry/UUID/hostname info, and
73 Libguestfs uses Linux kernel and qemu code, and can access any type of
74 guest filesystem that Linux and qemu can, including but not limited
75 to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition
76 schemes, qcow, qcow2, vmdk.
78 Libguestfs provides ways to enumerate guest storage (eg. partitions,
79 LVs, what filesystem is in each LV, etc.). It can also run commands
80 in the context of the guest. Also you can access filesystems over FTP.
82 Libguestfs is a library that can be linked with C and C++ management
85 See also the 'guestfish' package for shell scripting and command line
88 For Perl bindings, see 'perl-libguestfs'.
90 For OCaml bindings, see 'ocaml-libguestfs-devel'.
92 For Python bindings, see 'python-libguestfs'.
94 For Ruby bindings, see 'ruby-libguestfs'.
96 For Java bindings, see 'libguestfs-java-devel'.
100 Summary: Development tools and libraries for %{name}
101 Group: Development/Libraries
102 Requires: %{name} = %{version}-%{release}
107 %{name}-devel contains development tools and libraries
111 %package -n guestfish
112 Summary: Shell for accessing and modifying virtual machine disk images
113 Group: Development/Tools
115 Requires: %{name} = %{version}-%{release}
116 Requires: /usr/bin/pod2text
119 %description -n guestfish
120 Guestfish is the Filesystem Interactive SHell, for accessing and
121 modifying virtual machine disk images from the command line and shell
125 %package -n virt-inspector
126 Summary: Display OS version, kernel, drivers, etc in a virtual machine
127 Group: Development/Tools
129 Requires: %{name} = %{version}-%{release}
131 Requires: perl-Sys-Virt
134 %description -n virt-inspector
135 Virt-inspector examines a virtual machine and tries to determine the
136 version of the OS, the kernel version, what drivers are installed,
137 whether the virtual machine is fully virtualized (FV) or
138 para-virtualized (PV), what applications are installed and more.
141 %package -n ocaml-%{name}
142 Summary: OCaml bindings for %{name}
143 Group: Development/Libraries
144 Requires: %{name} = %{version}-%{release}
147 %description -n ocaml-%{name}
148 ocaml-%{name} contains OCaml bindings for %{name}.
150 This is for toplevel and scripting access only. To compile OCaml
151 programs which use %{name} you will also need ocaml-%{name}-devel.
154 %package -n ocaml-%{name}-devel
155 Summary: OCaml bindings for %{name}
156 Group: Development/Libraries
157 Requires: ocaml-%{name} = %{version}-%{release}
160 %description -n ocaml-%{name}-devel
161 ocaml-%{name}-devel contains development libraries
162 required to use the OCaml bindings for %{name}.
165 %package -n perl-%{name}
166 Summary: Perl bindings for %{name}
167 Group: Development/Libraries
168 Requires: %{name} = %{version}-%{release}
169 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
172 %description -n perl-%{name}
173 perl-%{name} contains Perl bindings for %{name}.
176 %package -n python-%{name}
177 Summary: Python bindings for %{name}
178 Group: Development/Libraries
179 Requires: %{name} = %{version}-%{release}
181 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
182 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
184 %description -n python-%{name}
185 python-%{name} contains Python bindings for %{name}.
188 %package -n ruby-%{name}
189 Summary: Ruby bindings for %{name}
190 Group: Development/Libraries
191 Requires: %{name} = %{version}-%{release}
192 Requires: ruby(abi) = 1.8
193 Provides: ruby(guestfs) = %{version}
195 %{!?ruby_sitelib: %define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")}
196 %{!?ruby_sitearch: %define ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
198 %description -n ruby-%{name}
199 ruby-%{name} contains Ruby bindings for %{name}.
203 Summary: Java bindings for %{name}
204 Group: Development/Libraries
205 Requires: %{name} = %{version}-%{release}
206 Requires: java >= 1.5.0
207 Requires: jpackage-utils
210 %{name}-java contains Java bindings for %{name}.
212 If you want to develop software in Java which uses %{name}, then
213 you will also need %{name}-java-devel.
217 Summary: Java development package for %{name}
218 Group: Development/Libraries
219 Requires: %{name} = %{version}-%{release}
220 Requires: %{name}-java = %{version}-%{release}
222 %description java-devel
223 %{name}-java-devel contains the tools for developing Java software
226 See also %{name}-javadoc.
230 Summary: Java documentation for %{name}
231 Group: Development/Libraries
232 Requires: %{name} = %{version}-%{release}
233 Requires: %{name}-java = %{version}-%{release}
234 Requires: jpackage-utils
237 %{name}-javadoc contains the Java documentation for %{name}.
249 find /var/cache/yum/build -type f -name '*.rpm' -print0 | xargs -0 cp -t repo
251 %define extra --with-mirror=file://$(pwd)/repo --with-repo=fedora-12
257 --prefix=%{_prefix} --libdir=%{_libdir} \
258 --mandir=%{_mandir} \
259 --with-java-home=%{java_home} \
260 --with-qemu="qemu-kvm qemu-system-%{_build_arch} qemu" \
261 --enable-debug-command \
264 # This ensures that /usr/sbin/chroot is on the path. Not needed
265 # except for RHEL 5, it shouldn't do any harm on other platforms.
266 export PATH=/usr/sbin:$PATH
268 # 'INSTALLDIRS' ensures that perl libs are installed in the vendor dir
270 make INSTALLDIRS=vendor %{?_smp_mflags}
274 test -n "$QUICK_RPMBUILD" || make check
278 rm -rf $RPM_BUILD_ROOT
280 make DESTDIR=$RPM_BUILD_ROOT install
282 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.a
283 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs.la
285 # Clean up the examples/ directory which will get installed in %doc.
286 # Note we can't delete the original examples/Makefile because that
287 # will be needed by the check section later in the RPM build.
295 # Same for ocaml/examples.
296 cp -a ocaml/examples ocaml/ex
302 find $RPM_BUILD_ROOT -name perllocal.pod -delete
303 find $RPM_BUILD_ROOT -name .packlist -delete
304 find $RPM_BUILD_ROOT -name '*.bs' -delete
306 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.a
307 rm $RPM_BUILD_ROOT%{python_sitearch}/libguestfsmod.la
309 if [ "$RPM_BUILD_ROOT%{python_sitearch}" != "$RPM_BUILD_ROOT%{python_sitelib}" ]; then
310 mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
311 mv $RPM_BUILD_ROOT%{python_sitearch}/guestfs.py* \
312 $RPM_BUILD_ROOT%{python_sitelib}/
315 # Install ruby bindings by hand.
316 mkdir -p $RPM_BUILD_ROOT%{ruby_sitelib}
317 mkdir -p $RPM_BUILD_ROOT%{ruby_sitearch}
318 install -p -m0644 ruby/lib/guestfs.rb $RPM_BUILD_ROOT%{ruby_sitelib}
319 install -p -m0755 ruby/ext/guestfs/_guestfs.so $RPM_BUILD_ROOT%{ruby_sitearch}
321 # Remove static-linked Java bindings.
322 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.a
323 rm $RPM_BUILD_ROOT%{_libdir}/libguestfs_jni.la
325 # Generator shouldn't be executable when we distribute it.
326 chmod -x src/generator.ml
330 rm -rf $RPM_BUILD_ROOT
333 %post -p /sbin/ldconfig
335 %postun -p /sbin/ldconfig
339 %defattr(-,root,root,-)
342 %{_libdir}/libguestfs.so.*
346 %defattr(-,root,root,-)
347 %doc ChangeLog HACKING TODO README ex html/guestfs.3.html html/pod.css
348 %doc src/generator.ml
349 %{_libdir}/libguestfs.so
350 %{_mandir}/man3/guestfs.3*
351 %{_includedir}/guestfs.h
352 %{_includedir}/guestfs-actions.h
353 %{_includedir}/guestfs-structs.h
354 %{_libdir}/pkgconfig/libguestfs.pc
358 %defattr(-,root,root,-)
359 %doc html/guestfish.1.html html/pod.css recipes/
361 %{_mandir}/man1/guestfish.1*
364 %files -n virt-inspector
365 %defattr(-,root,root,-)
366 %{_bindir}/virt-inspector
367 %{_mandir}/man1/virt-inspector.1*
370 %files -n ocaml-%{name}
371 %defattr(-,root,root,-)
373 %{_libdir}/ocaml/guestfs
374 %exclude %{_libdir}/ocaml/guestfs/*.a
375 %exclude %{_libdir}/ocaml/guestfs/*.cmxa
376 %exclude %{_libdir}/ocaml/guestfs/*.cmx
377 %exclude %{_libdir}/ocaml/guestfs/*.mli
378 %{_libdir}/ocaml/stublibs/*.so
379 %{_libdir}/ocaml/stublibs/*.so.owner
382 %files -n ocaml-%{name}-devel
383 %defattr(-,root,root,-)
385 %{_libdir}/ocaml/guestfs/*.a
386 %{_libdir}/ocaml/guestfs/*.cmxa
387 %{_libdir}/ocaml/guestfs/*.cmx
388 %{_libdir}/ocaml/guestfs/*.mli
391 %files -n perl-%{name}
392 %defattr(-,root,root,-)
395 %{_mandir}/man3/Sys::Guestfs.3pm*
398 %files -n python-%{name}
399 %defattr(-,root,root,-)
402 %{python_sitelib}/*.py
403 %{python_sitelib}/*.pyc
404 %{python_sitelib}/*.pyo
407 %files -n ruby-%{name}
408 %defattr(-,root,root,-)
410 %{ruby_sitelib}/guestfs.rb
411 %{ruby_sitearch}/_guestfs.so
415 %defattr(-,root,root,-)
417 %{_libdir}/libguestfs_jni*.so.*
418 %{_datadir}/java/*.jar
422 %defattr(-,root,root,-)
424 %{_libdir}/libguestfs_jni*.so
428 %defattr(-,root,root,-)
430 %{_datadir}/javadoc/%{name}-java-%{version}
434 * Fri May 8 2009 Richard Jones <rjones@redhat.com> - 1.0.23-1
435 - New upstream version 1.0.23.
437 * Fri May 8 2009 Richard Jones <rjones@redhat.com> - 1.0.21-2
438 - New upstream version 1.0.21.
440 * Thu May 7 2009 Richard Jones <rjones@redhat.com> - 1.0.20-2
441 - New upstream version 1.0.20.
443 * Thu May 7 2009 Richard Jones <rjones@redhat.com> - 1.0.19-1
444 - New upstream version 1.0.19.
446 * Tue Apr 28 2009 Richard Jones <rjones@redhat.com> - 1.0.15-1
447 - New upstream version 1.0.15.
449 * Fri Apr 24 2009 Richard Jones <rjones@redhat.com> - 1.0.12-1
450 - New upstream version 1.0.12.
452 * Wed Apr 22 2009 Richard Jones <rjones@redhat.com> - 1.0.6-1
453 - New upstream version 1.0.6.
455 * Mon Apr 20 2009 Richard Jones <rjones@redhat.com> - 1.0.2-1
456 - New upstream version 1.0.2.
458 * Thu Apr 16 2009 Richard Jones <rjones@redhat.com> - 0.9.9-12
459 - Multiple fixes to get it to scratch build in Koji.
461 * Sat Apr 4 2009 Richard Jones <rjones@redhat.com> - 0.9.9-1