Skip to contentSkip to conversation

Add liboauth2

PATCH In review Frede Hoey Braendstrup 2 participants 5 messages Jan 25 – Jan 26

lore
Share & tools
lore
#0 lore raw

v2 cover Add liboauth2

These patches add liboauth2 and its dependency cjose from OpenIDC

V2 removes the hard requirement for apache2 for liboauth2

Frede Hoey Braendstrup (2):
cjose: Add recipe at 0.6.2.4
liboauth2: Add recipe at 2.2.0

 .../recipes-support/cjose/cjose_0.6.2.4.bb    | 14 +++++++++++++
 .../liboauth2/liboauth2_2.2.0.bb              | 21 +++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-support/cjose/cjose_0.6.2.4.bb
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
Signature · 1 line
2.52.0
#1 lore raw

PATCH v2 1/2 cjose: Add recipe at 0.6.2.4

---
 meta-oe/recipes-support/cjose/cjose_0.6.2.4.bb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 meta-oe/recipes-support/cjose/cjose_0.6.2.4.bb
meta-oe/recipes-support/cjose/cjose_0.6.2.4.bb new file +14 -0
new file mode 100644
index 0000000000..f6a5d15a9b
@@ -0,0 +1,14 @@
+SUMMARY = "C library implementing the Javascript Object Signing and Encryption (JOSE)"
+HOMEPAGE = "https://github.com/OpenIDC/cjose"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7249e2f9437adfb8c88d870438042f0e"
+
+SRC_URI = "git://github.com/OpenIDC/cjose;protocol=https;branch=version-0.6.2.x;tag=v${PV}"
+
+PV = "0.6.2.4"
+SRCREV = "8d94c3ad3237ab6a83d2e92fa541542b1b92c023"
+
+DEPENDS = "openssl libcheck jansson"
+
+inherit pkgconfig autotools
+
Signature · 1 line
2.52.0
#2 lore raw

PATCH v2 2/2 liboauth2: Add recipe at 2.2.0

In reply to Frede Hoey Braendstrup

V2 removes the hard requirement for apache2 for liboauth2

---
 .../liboauth2/liboauth2_2.2.0.bb              | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb new file +20 -0
new file mode 100644
index 0000000000..0890a6b78d
@@ -0,0 +1,20 @@
+SUMMARY = "OAuth 2.x and OpenID Connect C library"
+HOMEPAGE = "https://github.com/OpenIDC/liboauth2"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+
+SRC_URI = "git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV}"
+
+PV = "2.2.0"
+SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
+
+DEPENDS = "libpcre2 jansson curl openssl cjose"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG ??= "memcache redis jq apache"
+PACKAGECONFIG[memcache] = "--with-memcache,--without-memcache,libmemcached"
+PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
+PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
+PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
+
#3 lore raw

Re: [oe] [meta-oe][PATCH v2 2/2] liboauth2: Add recipe at 2.2.0

fails to build with TOOLCHAIN = "clang"

src/http.c:1027:3: error: call to 'Wcurl_easy_setopt_err_long' declared
with 'warning' attribute: curl_easy_setopt expects a long argument
[-Werror,-Wattribute-warning]
1027 | curl_easy_setopt(curl, CURLOPT_TIMEOUT,
ctx->timeout);
| ^
/srv/build/yoe/build/tmp/work/cortexa57-yoe-linux/liboauth2/2.2.0/recipe-sysroot/usr/include/curl/typecheck-gcc.h:50:15:
note: expanded from macro 'curl_easy_setopt'

   50 |               Wcurl_easy_setopt_err_long();
    \
      |               ^
src/http.c:1095:3: error: call to 'Wcurl_easy_setopt_err_long' declared
with 'warning' attribute: curl_easy_setopt expects a long argument
[-Werror,-Wattribute-warning]
 1095 |                 curl_easy_setopt(curl, CURLOPT_POST, 1);
      |                 ^
/srv/build/yoe/build/tmp/work/cortexa57-yoe-linux/liboauth2/2.2.0/recipe-sysroot/usr/include/curl/typecheck-gcc.h:50:15:
note: expanded from macro 'curl_easy_setopt'
   50 |               Wcurl_easy_setopt_err_long();
    \
      |               ^

2 errors generated.

Detailed build log
https://termbin.com/qfx8

Quoted 53 lines · Frederik Brændstrup via lists.openembedded.org

V2 removes the hard requirement for apache2 for liboauth2

---
 .../liboauth2/liboauth2_2.2.0.bb              | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb new file +6 -0
new file mode 100644
index 0000000000..0890a6b78d
@@ -0,0 +1,20 @@
+SUMMARY = "OAuth 2.x and OpenID Connect C library"
+HOMEPAGE = "https://github.com/OpenIDC/liboauth2"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+
+SRC_URI = "git://

github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV}
<http://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v$%7BPV%7D>
"

meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb new file +10 -0
+
+PV = "2.2.0"
+SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
+
+DEPENDS = "libpcre2 jansson curl openssl cjose"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG ??= "memcache redis jq apache"
+PACKAGECONFIG[memcache] =

"--with-memcache,--without-memcache,libmemcached"

meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb new file +4 -2
+PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
+PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
+PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
+
--
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group. View/Reply Online (#123839):
https://lists.openembedded.org/g/openembedded-devel/message/123839
Mute This Topic: https://lists.openembedded.org/mt/117448448/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

PATCH v3 1/1 liboauth2: Add recipe at 2.2.0

In reply to Frede Hoey Braendstrup

V3 adds fixes for building with clang

---
 ..._easy_setopt-takes-a-long-not-an-int.patch | 33 +++++++++++++++++++
 .../liboauth2/liboauth2_2.2.0.bb              | 23 +++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch new file +33 -0
new file mode 100644
index 0000000000..bdb4a0f108
@@ -0,0 +1,33 @@
+From a9f28a44b9b387ef28904e24ca05d28562fdcc45 Mon Sep 17 00:00:00 2001
+From: Frede Hoey Braendstrup <[email protected]>
+Date: Mon, 26 Jan 2026 11:07:24 +0100
+Subject: [PATCH] fix(clang): curl_easy_setopt takes a long not an int
+
+Signed-off-by: Frede Hoey Braendstrup <[email protected]>
+Upstream-status: Backport https://github.com/OpenIDC/liboauth2/pull/69
+---
+ src/http.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/http.c b/src/http.c
+index ab7a25a..bc242ed 100644
+--- a/src/http.c
++++ b/src/http.c
+@@ -1024,7 +1024,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data,
+ 	curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 5L);
+ 
+ 	if (ctx)
+-		curl_easy_setopt(curl, CURLOPT_TIMEOUT, ctx->timeout);
++		curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)ctx->timeout);
+ 
+ 	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
+ 			 oauth2_http_curl_buf_write);
+@@ -1092,7 +1092,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data,
+ 
+ 	if (data != NULL) {
+ 		curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+-		curl_easy_setopt(curl, CURLOPT_POST, 1);
++		curl_easy_setopt(curl, CURLOPT_POST, 1L);
+ 	}
+ 
+ 	if (ctx)
meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb new file +23 -0
new file mode 100644
index 0000000000..718208aa2e
@@ -0,0 +1,23 @@
+SUMMARY = "OAuth 2.x and OpenID Connect C library"
+HOMEPAGE = "https://github.com/OpenIDC/liboauth2"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+
+SRC_URI = " \
+    git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV} \
+    file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch \
+    "
+
+PV = "2.2.0"
+SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
+
+DEPENDS = "libpcre2 jansson curl openssl cjose"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG ??= "memcache redis jq apache"
+PACKAGECONFIG[memcache] = "--with-memcache,--without-memcache,libmemcached"
+PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
+PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
+PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
+
Signature · 1 line
2.52.0