diff options
6 files changed, 55 insertions, 269 deletions
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" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
10 | 10 | ||
11 | PV = "1.0.24+git" | 11 | PV = "1.0.24+git" |
12 | SRCREV = "0ea3fe3d829b5085307cd27a512708d99ef48199" | 12 | SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6" |
13 | SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \ | 13 | SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \ |
14 | file://diod \ | 14 | file://diod \ |
15 | file://diod.conf \ | 15 | file://diod.conf \ |
16 | file://0001-build-allow-builds-to-work-with-separate-build-dir.patch \ | 16 | file://0001-build-Find-lua-with-pkg-config.patch \ |
17 | file://0002-auto.diod.in-remove-bashisms.patch \ | 17 | " |
18 | file://0001-diod-ops.c-add-header-file-for-makedev.patch \ | ||
19 | file://0001-drod-add-option-to-config-systemddir.patch \ | ||
20 | " | ||
21 | DEPENDS = "libcap ncurses tcp-wrappers lua" | 18 | DEPENDS = "libcap ncurses tcp-wrappers lua" |
22 | 19 | ||
23 | EXTRA_OECONF = "--with-systemddir=${systemd_unitdir}/system" | 20 | EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system" |
24 | 21 | ||
25 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
26 | 23 | ||
27 | inherit autotools systemd | 24 | inherit autotools pkgconfig systemd |
28 | 25 | ||
29 | do_install:append () { | 26 | do_install:append () { |
30 | # install our init based on start-stop-daemon | 27 | # 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 00000000..9f61792a --- /dev/null +++ b/recipes-extended/diod/files/0001-build-Find-lua-with-pkg-config.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 8124eec4e59222f1c3f3dc4d7e6706e13c33755c Mon Sep 17 00:00:00 2001 | ||
2 | From: Ola x Nilsson <olani@axis.com> | ||
3 | Date: Wed, 6 Mar 2024 18:40:16 +0100 | ||
4 | Subject: [PATCH] build: Find lua with pkg-config | ||
5 | |||
6 | ax_lua.m4 does not support cross compilation. | ||
7 | |||
8 | Upstream-Status: Inappropriate (Embedded specific) | ||
9 | |||
10 | --- | ||
11 | configure.ac | 26 +++++++++++++++++++++++++- | ||
12 | 1 file changed, 25 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index e8fcdb2..f3ebdc5 100644 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -121,7 +121,31 @@ AC_ARG_ENABLE([config], | ||
19 | [AS_HELP_STRING([--disable-config], [disable lua config file support])]) | ||
20 | |||
21 | AS_IF([test "x$enable_config" != "xno"], [ | ||
22 | - AX_PROG_LUA([5.1],[5.5]) | ||
23 | + dnl Use pkg_config to check for lua settings. This is not standard | ||
24 | + dnl as lua typically does not distribute a pc file. The | ||
25 | + dnl OpenEmbedded recipe adds one that can be used. Reuse/replicate | ||
26 | + dnl as much of AX_PROG_LUA as possible so AX_LUA_HEADERS and | ||
27 | + dnl AX_LUA_LIBS are still usable. | ||
28 | + PKG_CHECK_EXISTS([lua], [ | ||
29 | + AS_IF([ | ||
30 | + $PKG_CONFIG --atleast-version=5.1 lua && $PKG_CONFIG --max-version=5.5 lua | ||
31 | + ],[ | ||
32 | + AC_ARG_VAR([LUA], [The LUA interpreter, e.g. /usr/bin/lua5.1]) | ||
33 | + dnl should really check that the file exists ... | ||
34 | + AC_SUBST([LUA], [${bindir}/lua]) | ||
35 | + AC_CACHE_CHECK([for $LUA version], [ax_cv_lua_version], [ | ||
36 | + ax_cv_lua_version=[`$PKG_CONFIG --modversion lua | $SED 's/^\([0-9]\+\.[0-9]\+\).*/\1/'`] | ||
37 | + ]) | ||
38 | + AS_IF([test "x$ax_cv_lua_version" = 'x'], | ||
39 | + [AC_MSG_ERROR([invalid Lua version number])]) | ||
40 | + AC_SUBST([LUA_VERSION], [$ax_cv_lua_version]) | ||
41 | + AC_SUBST([LUA_SHORT_VERSION], [`echo "$LUA_VERSION" | $SED 's|\.||'`]) | ||
42 | + ],[ | ||
43 | + AC_MSG_ERROR([Incorrect lua version]) | ||
44 | + ]) | ||
45 | + ],[ | ||
46 | + AX_PROG_LUA([5.1],[5.5]) | ||
47 | + ]) | ||
48 | AX_LUA_HEADERS([],[ | ||
49 | AC_MSG_ERROR([Install lua headers or configure with --disable-config]) | ||
50 | ]) | ||
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..00000000 --- a/recipes-extended/diod/files/0001-build-allow-builds-to-work-with-separate-build-dir.patch +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | From 43403468298ef4167baa5d84de2ee2eaf7f4007a Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Fri, 9 Jan 2015 18:34:04 +0000 | ||
4 | Subject: [PATCH 1/2] build: allow builds to work with separate build dir | ||
5 | |||
6 | Remove assumptions in include paths that assume the build | ||
7 | is happening in the source directories. | ||
8 | |||
9 | Upstream-Status: Inappropriate [embedded specific] | ||
10 | |||
11 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
12 | --- | ||
13 | diod/Makefile.am | 2 +- | ||
14 | libdiod/Makefile.am | 2 +- | ||
15 | liblsd/Makefile.am | 2 +- | ||
16 | libnpclient/Makefile.am | 2 +- | ||
17 | scripts/Makefile.am | 6 +++--- | ||
18 | tests/kern/dbench/Makefile.am | 4 ++-- | ||
19 | utils/Makefile.am | 2 +- | ||
20 | 7 files changed, 10 insertions(+), 10 deletions(-) | ||
21 | |||
22 | diff --git a/diod/Makefile.am b/diod/Makefile.am | ||
23 | index 7644be7..fdaf130 100644 | ||
24 | --- a/diod/Makefile.am | ||
25 | +++ b/diod/Makefile.am | ||
26 | @@ -1,7 +1,7 @@ | ||
27 | AM_CFLAGS = @GCCWARN@ | ||
28 | |||
29 | AM_CPPFLAGS = \ | ||
30 | - -I../libnpfs -I../liblsd -I../libdiod | ||
31 | + -I$(srcdir)/../libnpfs -I$(srcdir)/../liblsd -I$(srcdir)/../libdiod | ||
32 | |||
33 | sbin_PROGRAMS = diod | ||
34 | |||
35 | diff --git a/libdiod/Makefile.am b/libdiod/Makefile.am | ||
36 | index 4810e14..6905cdd 100644 | ||
37 | --- a/libdiod/Makefile.am | ||
38 | +++ b/libdiod/Makefile.am | ||
39 | @@ -1,7 +1,7 @@ | ||
40 | AM_CFLAGS = @GCCWARN@ | ||
41 | |||
42 | AM_CPPFLAGS = \ | ||
43 | - -I../libnpfs -I../libnpclient -I../liblsd | ||
44 | + -I$(srcdir)/../libnpfs -I$(srcdir)/../libnpclient -I$(srcdir)/../liblsd | ||
45 | |||
46 | noinst_LIBRARIES = libdiod.a | ||
47 | |||
48 | diff --git a/liblsd/Makefile.am b/liblsd/Makefile.am | ||
49 | index c3e5658..7e18bf8 100644 | ||
50 | --- a/liblsd/Makefile.am | ||
51 | +++ b/liblsd/Makefile.am | ||
52 | @@ -1,6 +1,6 @@ | ||
53 | AM_CFLAGS = @GCCWARN@ | ||
54 | |||
55 | -AM_CPPFLAGS = -I../libdiod | ||
56 | +AM_CPPFLAGS = -I$(srcdir)/../libdiod | ||
57 | |||
58 | noinst_LIBRARIES = liblsd.a | ||
59 | |||
60 | diff --git a/libnpclient/Makefile.am b/libnpclient/Makefile.am | ||
61 | index 5305df9..cbaf266 100644 | ||
62 | --- a/libnpclient/Makefile.am | ||
63 | +++ b/libnpclient/Makefile.am | ||
64 | @@ -1,7 +1,7 @@ | ||
65 | AM_CFLAGS = @GCCWARN@ | ||
66 | |||
67 | AM_CPPFLAGS = \ | ||
68 | - -I../libnpfs | ||
69 | + -I$(srcdir)/../libnpfs | ||
70 | |||
71 | noinst_LIBRARIES = libnpclient.a | ||
72 | |||
73 | diff --git a/scripts/Makefile.am b/scripts/Makefile.am | ||
74 | index 51c24a3..2aba728 100644 | ||
75 | --- a/scripts/Makefile.am | ||
76 | +++ b/scripts/Makefile.am | ||
77 | @@ -1,9 +1,9 @@ | ||
78 | -systemddir=$(sysconfdir)/systemd/system | ||
79 | +systemddir=/lib/systemd/system | ||
80 | |||
81 | install-data-local: | ||
82 | - $(top_srcdir)/config/install-sh -m 755 $(srcdir)/auto.diod \ | ||
83 | + $(top_srcdir)/config/install-sh -m 755 ./auto.diod \ | ||
84 | $(DESTDIR)$(sysconfdir)/auto.diod | ||
85 | - $(top_srcdir)/config/install-sh -m 755 $(srcdir)/diod.service \ | ||
86 | + $(top_srcdir)/config/install-sh -m 644 ./diod.service \ | ||
87 | $(DESTDIR)$(systemddir)/diod.service | ||
88 | |||
89 | uninstall-local: | ||
90 | diff --git a/tests/kern/dbench/Makefile.am b/tests/kern/dbench/Makefile.am | ||
91 | index e0cdefa..1704f9f 100644 | ||
92 | --- a/tests/kern/dbench/Makefile.am | ||
93 | +++ b/tests/kern/dbench/Makefile.am | ||
94 | @@ -2,7 +2,7 @@ AM_CFLAGS = -w | ||
95 | |||
96 | # VERSION=4.00 | ||
97 | |||
98 | -AM_CPPFLAGS = -DDATADIR=\"$(X_DATADIR)\" | ||
99 | +AM_CPPFLAGS = -I. -DDATADIR=\"$(X_DATADIR)\" | ||
100 | |||
101 | LDADD = $(LIBPOPT) | ||
102 | |||
103 | @@ -25,6 +25,6 @@ BUILT_SOURCES = proto.h | ||
104 | CLEANFILES = proto.h | ||
105 | |||
106 | proto.h: $(dbench_SOURCES) mkproto.pl | ||
107 | - perl mkproto.pl $(dbench_SOURCES) > proto.h | ||
108 | + $(srcdir)/mkproto.pl $(patsubst %,$(srcdir),$(dbench_SOURCES)) > proto.h | ||
109 | |||
110 | EXTRA_DIST = mkproto.pl | ||
111 | diff --git a/utils/Makefile.am b/utils/Makefile.am | ||
112 | index 169b6c4..91d571d 100644 | ||
113 | --- a/utils/Makefile.am | ||
114 | +++ b/utils/Makefile.am | ||
115 | @@ -1,7 +1,7 @@ | ||
116 | AM_CFLAGS = @GCCWARN@ | ||
117 | |||
118 | AM_CPPFLAGS = \ | ||
119 | - -I../libnpfs -I../liblsd -I../libdiod -I../libnpclient | ||
120 | + -I$(srcdir)/../libnpfs -I$(srcdir)/../liblsd -I$(srcdir)/../libdiod -I$(srcdir)/../libnpclient | ||
121 | |||
122 | sbin_PROGRAMS = diodmount diodcat dtop diodload diodls diodshowmount dioddate | ||
123 | |||
124 | -- | ||
125 | 2.11.0 | ||
126 | |||
diff --git a/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch b/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch deleted file mode 100644 index 49bc507b..00000000 --- a/recipes-extended/diod/files/0001-diod-ops.c-add-header-file-for-makedev.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From f75836731d6051d85e6317eb4c12465bafb4973e Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongzhi.Song" <hongzhi.song@windriver.com> | ||
3 | Date: Fri, 31 Aug 2018 05:47:02 -0400 | ||
4 | Subject: [PATCH] diod/ops.c: add header file for makedev | ||
5 | |||
6 | Error: | ||
7 | diod/ops.c:845: undefined reference to `makedev' | ||
8 | |||
9 | Fixed: | ||
10 | Glibc removes sys/sysmacros.h which defines makedev from sys/types.h | ||
11 | since v2.28. [Commit ID: e16deca62e16f] | ||
12 | |||
13 | And then glibc suggestions us to include <sys/sysmacros.h> directly if | ||
14 | code needs it. | ||
15 | |||
16 | Upstream-Status: Submitted | ||
17 | |||
18 | Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> | ||
19 | --- | ||
20 | diod/ops.c | 1 + | ||
21 | 1 file changed, 1 insertion(+) | ||
22 | |||
23 | diff --git a/diod/ops.c b/diod/ops.c | ||
24 | index c6c8291..469a502 100644 | ||
25 | --- a/diod/ops.c | ||
26 | +++ b/diod/ops.c | ||
27 | @@ -74,6 +74,7 @@ | ||
28 | #include <pthread.h> | ||
29 | #include <errno.h> | ||
30 | #include <sys/types.h> | ||
31 | +#include <sys/sysmacros.h> | ||
32 | |||
33 | #ifdef __FreeBSD__ | ||
34 | #if !__BSD_VISIBLE | ||
35 | -- | ||
36 | 2.8.1 | ||
37 | |||
diff --git a/recipes-extended/diod/files/0001-drod-add-option-to-config-systemddir.patch b/recipes-extended/diod/files/0001-drod-add-option-to-config-systemddir.patch deleted file mode 100644 index 4931a19b..00000000 --- a/recipes-extended/diod/files/0001-drod-add-option-to-config-systemddir.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From 365159534b1981dfe291ecc05d2455f32652a166 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Mon, 26 Aug 2019 18:00:39 +0800 | ||
4 | Subject: [PATCH] drod: add option to config systemddir | ||
5 | |||
6 | Not need to send upstream, since upstream have refactor | ||
7 | related code, but not released. and this version release | ||
8 | 4 years ago, not proper to just backport one or more | ||
9 | commits, this patch maybe could be dropped after upgrade. | ||
10 | |||
11 | Upstream-Status: Inappropriate [embedded specific] | ||
12 | |||
13 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
14 | --- | ||
15 | configure.ac | 9 +++++++++ | ||
16 | scripts/Makefile.am | 2 +- | ||
17 | 2 files changed, 10 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/configure.ac b/configure.ac | ||
20 | index 1cb8579..3e4a5ec 100644 | ||
21 | --- a/configure.ac | ||
22 | +++ b/configure.ac | ||
23 | @@ -25,6 +25,15 @@ AC_DEFINE([_GNU_SOURCE], 1, | ||
24 | [Define _GNU_SOURCE so that we get all necessary prototypes]) | ||
25 | |||
26 | ## | ||
27 | +#Add option to config systemddir | ||
28 | +## | ||
29 | +AC_ARG_WITH([systemddir], | ||
30 | + [AS_HELP_STRING([--with-systemddir=DIR], [systemd dir])], | ||
31 | + [systemddir=$withval], | ||
32 | + [systemddir="/lib/systemd/system"]) | ||
33 | +AC_SUBST([systemddir], [$systemddir]) | ||
34 | + | ||
35 | +## | ||
36 | # Checks for programs | ||
37 | ## | ||
38 | AC_PROG_CC | ||
39 | diff --git a/scripts/Makefile.am b/scripts/Makefile.am | ||
40 | index 2aba728..40822b7 100644 | ||
41 | --- a/scripts/Makefile.am | ||
42 | +++ b/scripts/Makefile.am | ||
43 | @@ -1,4 +1,4 @@ | ||
44 | -systemddir=/lib/systemd/system | ||
45 | +systemddir=@systemddir@ | ||
46 | |||
47 | install-data-local: | ||
48 | $(top_srcdir)/config/install-sh -m 755 ./auto.diod \ | ||
49 | -- | ||
50 | 2.7.4 | ||
51 | |||
diff --git a/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch b/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch deleted file mode 100644 index 13e0a86e..00000000 --- a/recipes-extended/diod/files/0002-auto.diod.in-remove-bashisms.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 5a9e09dc5de833db11607530351cd87cecbfd17e Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Thu, 22 Jun 2017 06:32:30 +0000 | ||
4 | Subject: [PATCH 2/2] auto.diod.in: remove bashisms | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
9 | --- | ||
10 | scripts/auto.diod.in | 14 +++++++------- | ||
11 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
12 | |||
13 | diff --git a/scripts/auto.diod.in b/scripts/auto.diod.in | ||
14 | index f63e004..4d5fc3a 100755 | ||
15 | --- a/scripts/auto.diod.in | ||
16 | +++ b/scripts/auto.diod.in | ||
17 | @@ -1,4 +1,4 @@ | ||
18 | -#!/bin/bash | ||
19 | +#!/bin/sh | ||
20 | # | ||
21 | # auto.diod - executable automounter map for diod file systems | ||
22 | # | ||
23 | @@ -41,15 +41,15 @@ dcatopts="${DIOD_TIMEOUT:+-t $DIOD_TIMEOUT}" | ||
24 | for server in $DIOD_SERVERS; do | ||
25 | $DIOD_DIODCAT -s $server $dcatopts exports | awk '{print $1}' |\ | ||
26 | while read path; do | ||
27 | - if [ "$path" == "/" ]; then | ||
28 | - if [ "$key" == "ROOT" ]; then | ||
29 | + if [ "$path" = "/" ]; then | ||
30 | + if [ "$key" = "ROOT" ]; then | ||
31 | echo "$prefix $server:$path" | ||
32 | exit 0 | ||
33 | fi | ||
34 | - elif [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \ | ||
35 | - || [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \ | ||
36 | - || [ "$key" == "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \ | ||
37 | - || [ "$key" == "$(basename $path)" ]; then | ||
38 | + elif [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//./g')" ] \ | ||
39 | + || [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//_/g')" ] \ | ||
40 | + || [ "$key" = "$(echo $path|sed -e's/^\///' -e's/\//-/g')" ] \ | ||
41 | + || [ "$key" = "$(basename $path)" ]; then | ||
42 | echo "$prefix $server:$path" | ||
43 | exit 0 | ||
44 | fi | ||
45 | -- | ||
46 | 2.11.0 | ||
47 | |||