From e998f3139ef879075a4b04bec1afc163fbd3ebb9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 21 Sep 2011 15:35:17 +0100 Subject: [PATCH] - Add Erlang bindings in erlang-libguestfs subpackage. - Remove upstream patch. --- .gitignore | 1 + ...group-grub-for-the-guestfs_grub_inst.patch | 104 ------------------ libguestfs.spec | 36 +++++- sources | 2 +- 4 files changed, 32 insertions(+), 111 deletions(-) delete mode 100644 0001-Add-an-optional-group-grub-for-the-guestfs_grub_inst.patch diff --git a/.gitignore b/.gitignore index 63ff11b..33a553d 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ libguestfs-1.5.3.tar.gz /libguestfs-1.13.10.tar.gz /libguestfs-1.13.11.tar.gz /libguestfs-1.13.12.tar.gz +/libguestfs-1.13.13.tar.gz diff --git a/0001-Add-an-optional-group-grub-for-the-guestfs_grub_inst.patch b/0001-Add-an-optional-group-grub-for-the-guestfs_grub_inst.patch deleted file mode 100644 index 75464a6..0000000 --- a/0001-Add-an-optional-group-grub-for-the-guestfs_grub_inst.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 99624d29226ece1abbbdd921183b360f5f80de91 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 15 Sep 2011 22:02:43 +0100 -Subject: [PATCH] Add an optional group ("grub") for the guestfs_grub_install - API. - -This also improves the documentation for this call, pointing out -several pitfalls in using it. - -This unfortunately breaks existing callers that might use -guestfs_grub_install without checking for this new group. ---- - daemon/grub.c | 9 ++++++++- - generator/generator_actions.ml | 32 +++++++++++++++++++++++++++----- - 2 files changed, 35 insertions(+), 6 deletions(-) - -diff --git a/daemon/grub.c b/daemon/grub.c -index f394eef..c61f9df 100644 ---- a/daemon/grub.c -+++ b/daemon/grub.c -@@ -1,5 +1,5 @@ - /* libguestfs - the guestfsd daemon -- * Copyright (C) 2009 Red Hat Inc. -+ * Copyright (C) 2009-2011 Red Hat Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by -@@ -24,6 +24,13 @@ - - #include "daemon.h" - #include "actions.h" -+#include "optgroups.h" -+ -+int -+optgroup_grub_available (void) -+{ -+ return prog_exists ("grub-install"); -+} - - int - do_grub_install (const char *root, const char *device) -diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml -index a924d87..49963bc 100644 ---- a/generator/generator_actions.ml -+++ b/generator/generator_actions.ml -@@ -3013,7 +3013,7 @@ or growing unnecessarily. - See also: C, C, - C"); - -- ("grub_install", (RErr, [Pathname "root"; Device "device"], []), 86, [], -+ ("grub_install", (RErr, [Pathname "root"; Device "device"], []), 86, [Optional "grub"], - (* See: - * https://bugzilla.redhat.com/show_bug.cgi?id=484986 - * https://bugzilla.redhat.com/show_bug.cgi?id=479760 -@@ -3023,12 +3023,32 @@ C"); - ["write"; "/boot/grub/device.map"; "(hd0) /dev/vda"]; - ["grub_install"; "/"; "/dev/vda"]; - ["is_dir"; "/boot"]])], -- "install GRUB", -+ "install GRUB 1", - "\ --This command installs GRUB (the Grand Unified Bootloader) on -+This command installs GRUB 1 (the Grand Unified Bootloader) on - C, with the root directory being C. - --Note: If grub-install reports the error -+Notes: -+ -+=over 4 -+ -+=item * -+ -+There is currently no way in the API to install grub2, which -+is used by most modern Linux guests. It is possible to run -+the grub2 command from the guest, although see the -+caveats in L. -+ -+=item * -+ -+This uses C from the host. Unfortunately grub is -+not always compatible with itself, so this only works in rather -+narrow circumstances. Careful testing with each guest version -+is advisable. -+ -+=item * -+ -+If grub-install reports the error - \"No suitable drive was found in the generated device map.\" - it may be that you need to create a C - file first that contains the mapping between grub device names -@@ -3037,7 +3057,9 @@ a file containing: - - (hd0) /dev/vda - --replacing C with the name of the installation device."); -+replacing C with the name of the installation device. -+ -+=back"); - - ("cp", (RErr, [Pathname "src"; Pathname "dest"], []), 87, [], - [InitScratchFS, Always, TestOutput ( --- -1.7.6 - diff --git a/libguestfs.spec b/libguestfs.spec index 444bbfd..91666c9 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,8 +29,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.13.12 -Release: 4%{?dist} +Version: 1.13.13 +Release: 1%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -49,9 +49,6 @@ Patch2: libguestfs-1.12.0-configure-force-machine-accel-tcg.patch # while. Patch3: 0001-Fix-qemu-machine-option-for-latest-qemu-thanks-Marku.patch -# Upstream patch to add guestfs_grub_install to an optional group. -Patch4: 0001-Add-an-optional-group-grub-for-the-guestfs_grub_inst.patch - # Basic build requirements: BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2text @@ -132,6 +129,8 @@ BuildRequires: java >= 1.5.0 BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: php-devel +BuildRequires: erlang-erts +BuildRequires: erlang-erl_interface # For libguestfs-tools: BuildRequires: perl-Sys-Virt @@ -207,6 +206,8 @@ For Java bindings, see 'libguestfs-java-devel'. For PHP bindings, see 'php-libguestfs'. +For Erlang bindings, see 'erlang-libguestfs'. + %package devel Summary: Development tools and libraries for %{name} @@ -491,6 +492,16 @@ Requires: php php-%{name} contains PHP bindings for %{name}. +%package -n erlang-%{name} +Summary: Erlang bindings for %{name} +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: erlang-erts + +%description -n erlang-%{name} +erlang-%{name} contains Erlang bindings for %{name}. + + %package man-pages-uk Summary: Ukrainian (uk) man pages for %{name} Group: Development/Libraries @@ -507,7 +518,6 @@ for %{name}. %patch0 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 mkdir -p daemon/m4 @@ -870,6 +880,16 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/php/modules/guestfs_php.so +%files -n erlang-%{name} +%defattr(-,root,root,-) +%doc erlang/README +%doc erlang/examples/*.erl +%doc erlang/examples/LICENSE +%{_bindir}/erl-guestfs +%{_libdir}/erlang/lib/%{name}-%{version} +%{_mandir}/man3/guestfs-erlang.3* + + %files man-pages-uk %defattr(-,root,root,-) %lang(uk) %{_mandir}/uk/man1/*.1* @@ -877,6 +897,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 21 2011 Richard W.M. Jones - 1:1.13.13-1 +- Add Erlang bindings in erlang-libguestfs subpackage. +- Remove upstream patch. + * Fri Sep 16 2011 Richard W.M. Jones - 1:1.13.12-4 - Don't require grub. See RHBZ#737261. - Note this (hopefully temporarily) breaks guestfs_grub_install API. diff --git a/sources b/sources index 95de931..51c3f67 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -761c58d315bce5ef6603d6505e625fdd libguestfs-1.13.12.tar.gz +2cb3ea51d5f7781b48329c097feb8e2a libguestfs-1.13.13.tar.gz