diff --git a/0001-ocaml-Conditionally-remove-bindtests.-when-doing-mak.patch b/0001-ocaml-Conditionally-remove-bindtests.-when-doing-mak.patch new file mode 100644 index 0000000..8e8168a --- /dev/null +++ b/0001-ocaml-Conditionally-remove-bindtests.-when-doing-mak.patch @@ -0,0 +1,36 @@ +From 4414de775ad11624a6263bdbaa200fe5695caebb Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 1 Oct 2015 14:17:52 +0100 +Subject: [PATCH] ocaml: Conditionally remove bindtests.* when doing 'make + install'. + +Commit f6a790b67d7c8f79532f61d20d11ec8d3a4e003b changed the Makefile +so it only builds the tests when you run 'make check'. + +If you didn't run 'make check' then (in particular) bindtests won't be +built, and so when you install it cannot be removed. + +The simple fix for this is to make the removal of bindtests.* +conditional. + +This fixes commit f6a790b67d7c8f79532f61d20d11ec8d3a4e003b. +--- + ocaml/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am +index b9828e1..d838561 100644 +--- a/ocaml/Makefile.am ++++ b/ocaml/Makefile.am +@@ -201,7 +201,7 @@ install-data-hook: + -ldconf ignore -destdir $(DESTDIR)$(OCAMLLIB) \ + guestfs \ + $(data_hook_files) +- rm $(DESTDIR)$(OCAMLLIB)/guestfs/bindtests.* ++ rm -f $(DESTDIR)$(OCAMLLIB)/guestfs/bindtests.* + rm $(DESTDIR)$(OCAMLLIB)/guestfs/libguestfsocaml.a + + CLEANFILES += $(noinst_DATA) $(check_DATA) +-- +2.5.0 + diff --git a/libguestfs.spec b/libguestfs.spec index 817e17a..61ce083 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -1,5 +1,5 @@ # Architectures on which golang works. -#%global golang_arches aarch64 %{arm} %{ix86} x86_64 +#% global golang_arches aarch64 % {arm} % {ix86} x86_64 # In theory the above, in practice golang is so often broken that # I now disable it: %global golang_arches NONE @@ -10,13 +10,15 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.31.9 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ # Source and patches. URL: http://libguestfs.org/ Source0: http://libguestfs.org/download/1.31-development/%{name}-%{version}.tar.gz +Patch1: 0001-ocaml-Conditionally-remove-bindtests.-when-doing-mak.patch + # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -167,9 +169,9 @@ Requires: selinux-policy >= 3.11.1-63 # For UML backend (this backend only works on x86). # UML has been broken upstream (in the kernel) for a while, so don't # include this. Note that uml_utilities also depends on Perl. -#%ifarch %{ix86} x86_64 +#% ifarch % {ix86} x86_64 #Requires: uml_utilities -#%endif +#% endif # libguestfs live service Source2: guestfsd.service @@ -772,8 +774,7 @@ for %{name}. %prep %setup -q - -# Apply patches, if any, here. +%autopatch -p1 # For Python 3 we must build libguestfs twice. This creates: # %{name}-%{version}/ @@ -1302,8 +1303,11 @@ rm -r $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllv2v_test_harness* %changelog -* Thu Oct 01 2015 Richard W.M. Jones - 1:1.31.9-1 +* Thu Oct 01 2015 Richard W.M. Jones - 1:1.31.9-2 - New upstream version 1.31.9. +- Include patch which fixes 'make install' in OCaml directory. +- Switch to using RPM autopatch directive. +- Fix a few RPM "macro expanded in comment" warnings. * Tue Sep 29 2015 Richard W.M. Jones - 1:1.31.8-1 - New upstream version 1.31.8.