From 90d9fbcacb946db52cc5912a52d157c5e72201d1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 18 Jan 2015 07:44:15 +0000 Subject: [PATCH] Add upstream patch which fixes LUA 5.3 (beta) in Rawhide. --- ...checkint-which-was-deprecated-in-lua.patch | 29 +++++++++++++++++++ libguestfs.spec | 7 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-lua-Define-luaL_checkint-which-was-deprecated-in-lua.patch diff --git a/0001-lua-Define-luaL_checkint-which-was-deprecated-in-lua.patch b/0001-lua-Define-luaL_checkint-which-was-deprecated-in-lua.patch new file mode 100644 index 0000000..d94e81d --- /dev/null +++ b/0001-lua-Define-luaL_checkint-which-was-deprecated-in-lua.patch @@ -0,0 +1,29 @@ +From 4f3c288a1bac741fbcc9a8cd790d30618093a03e Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sun, 18 Jan 2015 07:38:58 +0000 +Subject: [PATCH] lua: Define luaL_checkint which was deprecated in lua 5.3. + +--- + generator/lua.ml | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/generator/lua.ml b/generator/lua.ml +index c1fa6f0..f2aa8c7 100644 +--- a/generator/lua.ml ++++ b/generator/lua.ml +@@ -54,6 +54,12 @@ let generate_lua_c () = + #endif + #endif + ++#if LUA_VERSION_NUM >= 503 ++#ifndef luaL_checkint ++#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) ++#endif ++#endif ++ + #include + #include \"guestfs-internal-frontend.h\" + +-- +2.2.1 + diff --git a/libguestfs.spec b/libguestfs.spec index 8e86146..81addce 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -35,6 +35,9 @@ Source0: http://libguestfs.org/download/1.29-development/%{name}-%{version # Upstream patch to allow LVM test to be skipped in check section. Patch1: 0001-tests-lvm-Allow-test-lvm-mapping.pl-to-be-skipped.patch +# Upstream patch which fixes LUA 5.3 (beta) in Rawhide. +Patch2: 0001-lua-Define-luaL_checkint-which-was-deprecated-in-lua.patch + # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -733,6 +736,7 @@ for %{name}. %setup -q %patch1 -p1 +%patch2 -p1 if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then # For sVirt to work, the local temporary directory we use in the @@ -1235,10 +1239,11 @@ popd %changelog -* Sat Jan 17 2015 Richard W.M. Jones - 1:1.29.20-1 +* Sun Jan 18 2015 Richard W.M. Jones - 1:1.29.20-1 - New upstream version 1.29.20. - Rebuild upstream with automake 1.15. - Add upstream patch to allow LVM test to be skipped. +- Add upstream patch which fixes LUA 5.3 (beta) in Rawhide. - Skip a couple of tests which are broken by changes in Rawhide. - Remove bogus daemon/m4 directory which has not existed for years.