summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/liboauth2
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/liboauth2')
-rw-r--r--meta-oe/recipes-support/liboauth2/liboauth2/0001-build-guard-coverage-linker-flag-behind-CODE_COVERAG.patch33
-rw-r--r--meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr-with-new-GCC.patch33
-rw-r--r--meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb5
3 files changed, 69 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/liboauth2/liboauth2/0001-build-guard-coverage-linker-flag-behind-CODE_COVERAG.patch b/meta-oe/recipes-support/liboauth2/liboauth2/0001-build-guard-coverage-linker-flag-behind-CODE_COVERAG.patch
new file mode 100644
index 0000000000..f234cbd50b
--- /dev/null
+++ b/meta-oe/recipes-support/liboauth2/liboauth2/0001-build-guard-coverage-linker-flag-behind-CODE_COVERAG.patch
@@ -0,0 +1,33 @@
1From 7c70315f7f6b4305d761804fb03f8f90ad7572eb Mon Sep 17 00:00:00 2001
2From: Khem Raj <khem.raj@oss.qualcomm.com>
3Date: Fri, 17 Apr 2026 14:01:46 -0700
4Subject: [PATCH] build: guard --coverage linker flag behind
5 CODE_COVERAGE_ENABLED
6
7AM_LDFLAGS passes --coverage to the linker unconditionally,
8it causes coverage instrumentation to be enabled even when
9configured with --disable-code-coverage. Wrap it in the
10automake conditional provided by AX_CODE_COVERAGE.
11
12Upstream-Status: Submitted [https://github.com/OpenIDC/liboauth2/pull/74]
13Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
14---
15 Makefile.am | 5 ++++-
16 1 file changed, 4 insertions(+), 1 deletion(-)
17
18diff --git a/Makefile.am b/Makefile.am
19index a079dcc..a3f991d 100644
20--- a/Makefile.am
21+++ b/Makefile.am
22@@ -8,7 +8,10 @@ EXTRA_DIST = autogen.sh ChangeLog README.md LICENSE
23
24 AM_CPPFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -I${srcdir}/include -I${srcdir}/src @JANSSON_CFLAGS@ @OPENSSL_CFLAGS@
25 AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS) $(CODE_COVERAGE_CFLAGS)
26-AM_LDFLAGS = --coverage
27+AM_LDFLAGS =
28+if CODE_COVERAGE_ENABLED
29+AM_LDFLAGS += --coverage
30+endif
31
32 LDADD = @JANSSON_LIBS@ @OPENSSL_LIBS@
33 LDADD += $(CODE_COVERAGE_LIBS)
diff --git a/meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr-with-new-GCC.patch b/meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr-with-new-GCC.patch
new file mode 100644
index 0000000000..65340e806a
--- /dev/null
+++ b/meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr-with-new-GCC.patch
@@ -0,0 +1,33 @@
1From 0dcba079907d559550ee8d9a201d26203bb8aebd Mon Sep 17 00:00:00 2001
2From: Alexander Bokovoy <abokovoy@redhat.com>
3Date: Wed, 7 Jan 2026 11:41:37 +0200
4Subject: [PATCH] Fix use of strchr with new GCC
5
6According to C specification, 7.28.5.1, strchr() is a generic function
7and its string argument's type is promoted to the result. So if it is
8const char*, the result will be const char* as well.
9
10gcc in Fedora Rawhide (15.2.1 20251111 or later) implements this
11conformance, resulting in a compilation fail with
12-Werror=discarded-qualifiers.
13
14Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
15Upstream-Status: Backport [https://github.com/OpenIDC/liboauth2/commit/0dcba079907d559550ee8d9a201d26203bb8aebd]
16Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
17---
18 src/jose.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/src/jose.c b/src/jose.c
22index fbaf661..a3441c8 100644
23--- a/src/jose.c
24+++ b/src/jose.c
25@@ -993,7 +993,7 @@ char *oauth2_jose_jwt_header_peek(oauth2_log_t *log,
26 {
27 char *input = NULL, *result = NULL;
28 json_t *json = NULL;
29- char *p = NULL;
30+ const char *p = NULL;
31 size_t result_len;
32 char *rv = NULL;
33
diff --git a/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb b/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
index 31d7aec69d..83825c69a5 100644
--- a/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
+++ b/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
@@ -6,9 +6,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
6SRC_URI = " \ 6SRC_URI = " \
7 git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV} \ 7 git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV} \
8 file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch \ 8 file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch \
9 file://0002-Fix-use-of-strchr-with-new-GCC.patch \
10 file://0001-build-guard-coverage-linker-flag-behind-CODE_COVERAG.patch \
9 " 11 "
10 12
11PV = "2.2.0"
12SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19" 13SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
13 14
14DEPENDS = "libpcre2 jansson curl openssl cjose" 15DEPENDS = "libpcre2 jansson curl openssl cjose"
@@ -20,4 +21,4 @@ PACKAGECONFIG[memcache] = "--with-memcache,--without-memcache,libmemcached"
20PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis" 21PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
21PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq" 22PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
22PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2" 23PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
23 24PACKAGECONFIG[ccov] = "--enable-code-coverage,--disable-code-coverage,"