[meta-virtualization][PATCH] diod: Update to b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6

2024-03-11 Thread Ola x Nilsson
Just needs a single patch to handle the lua feature in configure when
cross-compiling.

Signed-off-by: Ola x Nilsson 
---
 recipes-extended/diod/diod_1.0.24.bb  |  13 +-
 .../0001-build-Find-lua-with-pkg-config.patch |  50 +++
 ...ilds-to-work-with-separate-build-dir.patch | 126 --
 ...od-ops.c-add-header-file-for-makedev.patch |  37 -
 ...drod-add-option-to-config-systemddir.patch |  51 ---
 .../0002-auto.diod.in-remove-bashisms.patch   |  47 ---
 6 files changed, 55 insertions(+), 269 deletions(-)
 create mode 100644 
recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
 delete mode 100644 
recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch
 delete mode 100644 
recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch
 delete mode 100644 
recipes-extended/diod/files/0001-drod-add-option-to-config-systemddir.patch
 delete mode 100644 
recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch

diff --git a/recipes-extended/diod/diod_1.0.24.bb 
b/recipes-extended/diod/diod_1.0.24.bb
index 2b87a8ae..5e191dc0 100644
--- a/recipes-extended/diod/diod_1.0.24.bb
+++ b/recipes-extended/diod/diod_1.0.24.bb
@@ -9,22 +9,19 @@ LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
 PV = "1.0.24+git"
-SRCREV = "0ea3fe3d829b5085307cd27a512708d99ef48199"
+SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6"
 SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \
file://diod \
file://diod.conf \
-   
file://0001-build-allow-builds-to-work-with-separate-build-dir.patch \
-   file://0002-auto.diod.in-remove-bashisms.patch \
-   file://0001-diod-ops.c-add-header-file-for-makedev.patch \
-   file://0001-drod-add-option-to-config-systemddir.patch \
-  "
+   file://0001-build-Find-lua-with-pkg-config.patch \
+   "
 DEPENDS = "libcap ncurses tcp-wrappers lua"
 
-EXTRA_OECONF = "--with-systemddir=${systemd_unitdir}/system"
+EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system"
 
 S = "${WORKDIR}/git"
 
-inherit autotools systemd
+inherit autotools pkgconfig systemd
 
 do_install:append () {
 # install our init based on start-stop-daemon
diff --git 
a/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch 
b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
new file mode 100644
index ..9f61792a
--- /dev/null
+++ b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
@@ -0,0 +1,50 @@
+From 8124eec4e59222f1c3f3dc4d7e6706e13c33755c Mon Sep 17 00:00:00 2001
+From: Ola x Nilsson 
+Date: Wed, 6 Mar 2024 18:40:16 +0100
+Subject: [PATCH] build: Find lua with pkg-config
+
+ax_lua.m4 does not support cross compilation.
+
+Upstream-Status: Inappropriate (Embedded specific)
+
+---
+ configure.ac | 26 +-
+ 1 file changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e8fcdb2..f3ebdc5 100644
+--- a/configure.ac
 b/configure.ac
+@@ -121,7 +121,31 @@ AC_ARG_ENABLE([config],
+   [AS_HELP_STRING([--disable-config], [disable lua config file support])])
+ 
+ AS_IF([test "x$enable_config" != "xno"], [
+-  AX_PROG_LUA([5.1],[5.5])
++  dnl Use pkg_config to check for lua settings.  This is not standard
++  dnl as lua typically does not distribute a pc file.  The
++  dnl OpenEmbedded recipe adds one that can be used.  Reuse/replicate
++  dnl as much of AX_PROG_LUA as possible so AX_LUA_HEADERS and
++  dnl AX_LUA_LIBS are still usable.
++  PKG_CHECK_EXISTS([lua], [
++AS_IF([
++  $PKG_CONFIG --atleast-version=5.1 lua && $PKG_CONFIG --max-version=5.5 
lua
++],[
++  AC_ARG_VAR([LUA], [The LUA interpreter, e.g. /usr/bin/lua5.1])
++dnl should really check that the file exists ...
++  AC_SUBST([LUA], [${bindir}/lua])
++AC_CACHE_CHECK([for $LUA version], [ax_cv_lua_version], [
++  ax_cv_lua_version=[`$PKG_CONFIG --modversion lua | $SED 
's/^\([0-9]\+\.[0-9]\+\).*/\1/'`]
++  ])
++AS_IF([test "x$ax_cv_lua_version" = 'x'],
++   [AC_MSG_ERROR([invalid Lua version number])])
++  AC_SUBST([LUA_VERSION], [$ax_cv_lua_version])
++  AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | $SED 's|\.||'`])
++],[
++AC_MSG_ERROR([Incorrect lua version])
++  ])
++  ],[
++AX_PROG_LUA([5.1],[5.5])
++  ])
+   AX_LUA_HEADERS([],[
+ AC_MSG_ERROR([Install lua headers or configure with --disable-config])
+   ])
diff --git 
a/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch
 
b/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch
deleted file mode 100644
index f40e0eb5..
--- 
a/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 43403468298e

Re: [meta-virtualization][PATCH] diod: Update to b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6

2024-03-11 Thread Bruce Ashfield
On Mon, Mar 11, 2024 at 8:24 AM Ola x Nilsson  wrote:
>
> Just needs a single patch to handle the lua feature in configure when
> cross-compiling.
>

This needs a listing of the changes between the two SRCREVs.

I haven't gotten around to updating diod for the release, so I'll consider
this once ceph is working again, but for now, it will probably wait until
my round of package bumps post release.

Bruce

> Signed-off-by: Ola x Nilsson 
> ---
>  recipes-extended/diod/diod_1.0.24.bb  |  13 +-
>  .../0001-build-Find-lua-with-pkg-config.patch |  50 +++
>  ...ilds-to-work-with-separate-build-dir.patch | 126 --
>  ...od-ops.c-add-header-file-for-makedev.patch |  37 -
>  ...drod-add-option-to-config-systemddir.patch |  51 ---
>  .../0002-auto.diod.in-remove-bashisms.patch   |  47 ---
>  6 files changed, 55 insertions(+), 269 deletions(-)
>  create mode 100644 
> recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
>  delete mode 100644 
> recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch
>  delete mode 100644 
> recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch
>  delete mode 100644 
> recipes-extended/diod/files/0001-drod-add-option-to-config-systemddir.patch
>  delete mode 100644 
> recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch
>
> diff --git a/recipes-extended/diod/diod_1.0.24.bb 
> b/recipes-extended/diod/diod_1.0.24.bb
> index 2b87a8ae..5e191dc0 100644
> --- a/recipes-extended/diod/diod_1.0.24.bb
> +++ b/recipes-extended/diod/diod_1.0.24.bb
> @@ -9,22 +9,19 @@ LICENSE = "GPL-2.0-only"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
>
>  PV = "1.0.24+git"
> -SRCREV = "0ea3fe3d829b5085307cd27a512708d99ef48199"
> +SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6"
>  SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \
> file://diod \
> file://diod.conf \
> -   
> file://0001-build-allow-builds-to-work-with-separate-build-dir.patch \
> -   file://0002-auto.diod.in-remove-bashisms.patch \
> -   file://0001-diod-ops.c-add-header-file-for-makedev.patch \
> -   file://0001-drod-add-option-to-config-systemddir.patch \
> -  "
> +   file://0001-build-Find-lua-with-pkg-config.patch \
> +   "
>  DEPENDS = "libcap ncurses tcp-wrappers lua"
>
> -EXTRA_OECONF = "--with-systemddir=${systemd_unitdir}/system"
> +EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system"
>
>  S = "${WORKDIR}/git"
>
> -inherit autotools systemd
> +inherit autotools pkgconfig systemd
>
>  do_install:append () {
>  # install our init based on start-stop-daemon
> diff --git 
> a/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch 
> b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
> new file mode 100644
> index ..9f61792a
> --- /dev/null
> +++ b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
> @@ -0,0 +1,50 @@
> +From 8124eec4e59222f1c3f3dc4d7e6706e13c33755c Mon Sep 17 00:00:00 2001
> +From: Ola x Nilsson 
> +Date: Wed, 6 Mar 2024 18:40:16 +0100
> +Subject: [PATCH] build: Find lua with pkg-config
> +
> +ax_lua.m4 does not support cross compilation.
> +
> +Upstream-Status: Inappropriate (Embedded specific)
> +
> +---
> + configure.ac | 26 +-
> + 1 file changed, 25 insertions(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index e8fcdb2..f3ebdc5 100644
> +--- a/configure.ac
>  b/configure.ac
> +@@ -121,7 +121,31 @@ AC_ARG_ENABLE([config],
> +   [AS_HELP_STRING([--disable-config], [disable lua config file support])])
> +
> + AS_IF([test "x$enable_config" != "xno"], [
> +-  AX_PROG_LUA([5.1],[5.5])
> ++  dnl Use pkg_config to check for lua settings.  This is not standard
> ++  dnl as lua typically does not distribute a pc file.  The
> ++  dnl OpenEmbedded recipe adds one that can be used.  Reuse/replicate
> ++  dnl as much of AX_PROG_LUA as possible so AX_LUA_HEADERS and
> ++  dnl AX_LUA_LIBS are still usable.
> ++  PKG_CHECK_EXISTS([lua], [
> ++AS_IF([
> ++  $PKG_CONFIG --atleast-version=5.1 lua && $PKG_CONFIG 
> --max-version=5.5 lua
> ++],[
> ++  AC_ARG_VAR([LUA], [The LUA interpreter, e.g. /usr/bin/lua5.1])
> ++dnl should really check that the file exists ...
> ++  AC_SUBST([LUA], [${bindir}/lua])
> ++AC_CACHE_CHECK([for $LUA version], [ax_cv_lua_version], [
> ++  ax_cv_lua_version=[`$PKG_CONFIG --modversion lua | $SED 
> 's/^\([0-9]\+\.[0-9]\+\).*/\1/'`]
> ++  ])
> ++AS_IF([test "x$ax_cv_lua_version" = 'x'],
> ++   [AC_MSG_ERROR([invalid Lua version number])])
> ++  AC_SUBST([LUA_VERSION], [$ax_cv_lua_version])
> ++  AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | $SED 's|\.||'`])
> ++],[
> ++AC_MSG_ERROR([Incorrect lua version])
> ++  ])
> ++  ],[
> ++AX_PRO

Re: [meta-virtualization][PATCH] diod: Update to b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6

2024-03-11 Thread Ola x Nilsson



On Mon, Mar 11 2024, Bruce Ashfield wrote:

> On Mon, Mar 11, 2024 at 8:24 AM Ola x Nilsson  wrote:
>>
>> Just needs a single patch to handle the lua feature in configure when
>> cross-compiling.
>>
>
> This needs a listing of the changes between the two SRCREVs.

I've sent a v2.

> I haven't gotten around to updating diod for the release, so I'll consider
> this once ceph is working again, but for now, it will probably wait until
> my round of package bumps post release.

That's fine with me.

/Ola


>
>> Signed-off-by: Ola x Nilsson 
>> ---
>>  recipes-extended/diod/diod_1.0.24.bb  |  13 +-
>>  .../0001-build-Find-lua-with-pkg-config.patch |  50 +++
>>  ...ilds-to-work-with-separate-build-dir.patch | 126 --
>>  ...od-ops.c-add-header-file-for-makedev.patch |  37 -
>>  ...drod-add-option-to-config-systemddir.patch |  51 ---
>>  .../0002-auto.diod.in-remove-bashisms.patch   |  47 ---
>>  6 files changed, 55 insertions(+), 269 deletions(-)
>>  create mode 100644 
>> recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
>>  delete mode 100644 
>> recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch
>>  delete mode 100644 
>> recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch
>>  delete mode 100644 
>> recipes-extended/diod/files/0001-drod-add-option-to-config-systemddir.patch
>>  delete mode 100644 
>> recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch
>>
>> diff --git a/recipes-extended/diod/diod_1.0.24.bb 
>> b/recipes-extended/diod/diod_1.0.24.bb
>> index 2b87a8ae..5e191dc0 100644
>> --- a/recipes-extended/diod/diod_1.0.24.bb
>> +++ b/recipes-extended/diod/diod_1.0.24.bb
>> @@ -9,22 +9,19 @@ LICENSE = "GPL-2.0-only"
>>  LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
>>
>>  PV = "1.0.24+git"
>> -SRCREV = "0ea3fe3d829b5085307cd27a512708d99ef48199"
>> +SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6"
>>  SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \
>> file://diod \
>> file://diod.conf \
>> -   
>> file://0001-build-allow-builds-to-work-with-separate-build-dir.patch \
>> -   file://0002-auto.diod.in-remove-bashisms.patch \
>> -   file://0001-diod-ops.c-add-header-file-for-makedev.patch \
>> -   file://0001-drod-add-option-to-config-systemddir.patch \
>> -  "
>> +   file://0001-build-Find-lua-with-pkg-config.patch \
>> +   "
>>  DEPENDS = "libcap ncurses tcp-wrappers lua"
>>
>> -EXTRA_OECONF = "--with-systemddir=${systemd_unitdir}/system"
>> +EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system"
>>
>>  S = "${WORKDIR}/git"
>>
>> -inherit autotools systemd
>> +inherit autotools pkgconfig systemd
>>
>>  do_install:append () {
>>  # install our init based on start-stop-daemon
>> diff --git 
>> a/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch 
>> b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
>> new file mode 100644
>> index ..9f61792a
>> --- /dev/null
>> +++ b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch
>> @@ -0,0 +1,50 @@
>> +From 8124eec4e59222f1c3f3dc4d7e6706e13c33755c Mon Sep 17 00:00:00 2001
>> +From: Ola x Nilsson 
>> +Date: Wed, 6 Mar 2024 18:40:16 +0100
>> +Subject: [PATCH] build: Find lua with pkg-config
>> +
>> +ax_lua.m4 does not support cross compilation.
>> +
>> +Upstream-Status: Inappropriate (Embedded specific)
>> +
>> +---
>> + configure.ac | 26 +-
>> + 1 file changed, 25 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/configure.ac b/configure.ac
>> +index e8fcdb2..f3ebdc5 100644
>> +--- a/configure.ac
>>  b/configure.ac
>> +@@ -121,7 +121,31 @@ AC_ARG_ENABLE([config],
>> +   [AS_HELP_STRING([--disable-config], [disable lua config file support])])
>> +
>> + AS_IF([test "x$enable_config" != "xno"], [
>> +-  AX_PROG_LUA([5.1],[5.5])
>> ++  dnl Use pkg_config to check for lua settings.  This is not standard
>> ++  dnl as lua typically does not distribute a pc file.  The
>> ++  dnl OpenEmbedded recipe adds one that can be used.  Reuse/replicate
>> ++  dnl as much of AX_PROG_LUA as possible so AX_LUA_HEADERS and
>> ++  dnl AX_LUA_LIBS are still usable.
>> ++  PKG_CHECK_EXISTS([lua], [
>> ++AS_IF([
>> ++  $PKG_CONFIG --atleast-version=5.1 lua && $PKG_CONFIG 
>> --max-version=5.5 lua
>> ++],[
>> ++  AC_ARG_VAR([LUA], [The LUA interpreter, e.g. /usr/bin/lua5.1])
>> ++dnl should really check that the file exists ...
>> ++  AC_SUBST([LUA], [${bindir}/lua])
>> ++AC_CACHE_CHECK([for $LUA version], [ax_cv_lua_version], [
>> ++  ax_cv_lua_version=[`$PKG_CONFIG --modversion lua | $SED 
>> 's/^\([0-9]\+\.[0-9]\+\).*/\1/'`]
>> ++  ])
>> ++AS_IF([test "x$ax_cv_lua_version" = 'x'],
>> ++   [AC_MSG_ERROR([invalid Lua version number])])
>> ++  AC_SUBST([LUA_VERSI