aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-22 21:29:32 -0700
committerArmin Kuster <akuster808@gmail.com>2022-09-15 08:25:06 -0400
commit9f1013ba4555257989b640d3c37bf2f322a1a311 (patch)
treedb7de8ba2278b66638ed60d8a5d367ad2374c0ab
parentd230d1178f22fab3529c7eac3c438513c04b954e (diff)
downloadmeta-openembedded-contrib-9f1013ba4555257989b640d3c37bf2f322a1a311.tar.gz
ntpsec: Add -D_GNU_SOURCE and fix building with devtool
wscript detects .git directory and if its present them invokes git describe --dirty which does not work on the devtool created git repository, since its synthesized. Add GNU_SOURCE define to get strptime() definition Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 375be9fd60e22fb60b53d664983cb70d26d8a288) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-support/ntpsec/ntpsec/0001-wscript-Widen-the-search-for-tags.patch29
-rw-r--r--meta-networking/recipes-support/ntpsec/ntpsec_1.2.1.bb6
2 files changed, 33 insertions, 2 deletions
diff --git a/meta-networking/recipes-support/ntpsec/ntpsec/0001-wscript-Widen-the-search-for-tags.patch b/meta-networking/recipes-support/ntpsec/ntpsec/0001-wscript-Widen-the-search-for-tags.patch
new file mode 100644
index 0000000000..98c62eed49
--- /dev/null
+++ b/meta-networking/recipes-support/ntpsec/ntpsec/0001-wscript-Widen-the-search-for-tags.patch
@@ -0,0 +1,29 @@
+From 9a7dead72f41e79979625c9bdef2fb638427d3d6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 Aug 2022 20:54:17 -0700
+Subject: [PATCH] wscript: Widen the search for tags
+
+Default is to look for annotated tags, howveer when using devtool we
+create our own git tree from release tarballs which will have tags but
+they are not annotated, therefore broaden the search to include all tags
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ wscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index 879ded1..dff835d 100644
+--- a/wscript
++++ b/wscript
+@@ -177,7 +177,7 @@ def configure(ctx):
+ if build_desc:
+ build_desc = ' ' + build_desc
+ if ctx.env.BIN_GIT:
+- cmd = ctx.env.BIN_GIT + shlex.split("describe --dirty")
++ cmd = ctx.env.BIN_GIT + shlex.split("describe --tags --dirty")
+ git_short_hash = ctx.cmd_and_log(cmd).strip()
+ git_short_hash = '-'.join(git_short_hash.split('-')[1:])
+
diff --git a/meta-networking/recipes-support/ntpsec/ntpsec_1.2.1.bb b/meta-networking/recipes-support/ntpsec/ntpsec_1.2.1.bb
index 3efac7d983..bed0e2e108 100644
--- a/meta-networking/recipes-support/ntpsec/ntpsec_1.2.1.bb
+++ b/meta-networking/recipes-support/ntpsec/ntpsec_1.2.1.bb
@@ -16,7 +16,9 @@ SRC_URI = "https://ftp.ntpsec.org/pub/releases/ntpsec-${PV}.tar.gz \
file://0001-ntpd-ntp_sandbox.c-allow-clone3-for-glibc-2.34-in-se.patch \
file://0001-ntpd-ntp_sandbox.c-allow-newfstatat-on-all-archs-for.patch \
file://0002-ntpd-ntp_sandbox.c-match-riscv-to-aarch-in-seccomp-f.patch \
- file://volatiles.ntpsec"
+ file://volatiles.ntpsec \
+ file://0001-wscript-Widen-the-search-for-tags.patch \
+ "
SRC_URI[sha256sum] = "f2684835116c80b8f21782a5959a805ba3c44e3a681dd6c17c7cb00cc242c27a"
@@ -54,7 +56,7 @@ export PYTAG = "cpython${@ d.getVar('PYTHON_BASEVERSION').replace('.', '')}"
export pyext_PATTERN = "%s.so"
export PYTHON_LDFLAGS = "-lpthread -ldl"
-CFLAGS:append = " -I${PYTHON_INCLUDE_DIR}"
+CFLAGS:append = " -I${PYTHON_INCLUDE_DIR} -D_GNU_SOURCE"
EXTRA_OECONF = "--cross-compiler='${CC}' \
--cross-cflags='${CFLAGS}' \