Download raw body.
Update devel/cjose
Thanks,
On Tue, 28 Apr 2026 08:12:06 +0100
Stuart Henderson <stu@spacehopper.org> wrote:
> On 2026/04/28 09:11, YASUOKA Masahiko wrote:
>> +V = 0.6.1
>> +DISTNAME = ${GH_PROJECT}-${V}
>> +
>> GH_ACCOUNT = cisco
>> GH_PROJECT = cjose
>> -GH_TAGNAME = 0.6.1
>> -REVISION = 2
>> +GH_COMMIT = db7d26ef2bd02572128c7cdaa4066f39af2b42da
>> +REVISION = 3
>
> Since it uses new upstream source, please update the version number
> rather than just bumping REVISION. I suggest:
>
> GH_ACCOUNT = cisco
> GH_PROJECT = cjose
> GH_COMMIT = db7d26ef2bd02572128c7cdaa4066f39af2b42da
> DISTNAME = cjose-0.6.1pl20260427
sure.
> Build fails:
>
> ---
> concatkdf.c:17:10: fatal error: 'alloca.h' file not found
> 17 | #include <alloca.h>
> | ^~~~~~~~~~
> 1 error generated.
> ---
>
> adding a patch to change the <alloca.h> include to <stdlib.h> fixes
> that for me.
I'm sorry. I did that, but I mistakenly lost the change by an operation of cvs..
> It also needs a SHARED_LIBS bump to 0.1 due to new exported symbols,
> and "make plist".
sure.
Also, I'm aware that patches/patch-src_jws_c is no longer needed. The
diff will remove it.
(Note that I am considering to rebase cisco/cjose -> OpenIDC/cjose.)
Index: Makefile
===================================================================
RCS file: /disk/cvs/openbsd/ports/devel/cjose/Makefile,v
diff -u -p -r1.7 Makefile
--- Makefile 9 Mar 2025 16:02:56 -0000 1.7
+++ Makefile 28 Apr 2026 20:52:50 -0000
@@ -2,10 +2,10 @@ COMMENT = Javascript Object Signing and
GH_ACCOUNT = cisco
GH_PROJECT = cjose
-GH_TAGNAME = 0.6.1
-REVISION = 2
+GH_COMMIT = db7d26ef2bd02572128c7cdaa4066f39af2b42da
+DISTNAME = cjose-0.6.1pl20260427
-SHARED_LIBS = cjose 0.0
+SHARED_LIBS = cjose 0.1
CATEGORIES = devel
Index: distinfo
===================================================================
RCS file: /disk/cvs/openbsd/ports/devel/cjose/distinfo,v
diff -u -p -r1.1.1.1 distinfo
--- distinfo 30 Jan 2019 07:58:19 -0000 1.1.1.1
+++ distinfo 28 Apr 2026 20:52:50 -0000
@@ -1,2 +1,2 @@
-SHA256 (cjose-0.6.1.tar.gz) = II6qD6YWtEpx2KoVXECxTHydD6K7kdFAiCRSDS/BtN0=
-SIZE (cjose-0.6.1.tar.gz) = 1586963
+SHA256 (cjose-0.6.1pl20260427-db7d26ef.tar.gz) = //HJclJXJ+FzA9MPOKEDuDlSKhXA7yOshIXgkdu6UNM=
+SIZE (cjose-0.6.1pl20260427-db7d26ef.tar.gz) = 1589696
Index: patches/patch-src_Makefile_am
===================================================================
RCS file: /disk/cvs/openbsd/ports/devel/cjose/patches/patch-src_Makefile_am,v
diff -u -p -r1.2 patch-src_Makefile_am
--- patches/patch-src_Makefile_am 11 Mar 2022 18:49:49 -0000 1.2
+++ patches/patch-src_Makefile_am 28 Apr 2026 20:52:50 -0000
@@ -1,9 +1,13 @@
Index: src/Makefile.am
--- src/Makefile.am.orig
+++ src/Makefile.am
-@@ -1,4 +1,4 @@
+@@ -1,7 +1,7 @@
-AM_CFLAGS =-std=gnu99 --pedantic -Wall -Werror -g -O2 -I$(top_builddir)/include
+AM_CFLAGS =-std=gnu99 --pedantic -Wall -I$(top_builddir)/include
lib_LTLIBRARIES=libcjose.la
- libcjose_la_CPPFLAGS= -I$(topdir)/include
+-libcjose_la_CPPFLAGS= -I$(topdir)/include
++libcjose_la_CPPFLAGS= -I$(top_builddir)/include
+ libcjose_la_LDFLAGS= -lm
+ libcjose_la_SOURCES=version.c \
+ util.c \
Index: patches/patch-src_concatkdf_c
===================================================================
RCS file: /disk/cvs/openbsd/ports/devel/cjose/patches/patch-src_concatkdf_c,v
diff -u -p -r1.2 patch-src_concatkdf_c
--- patches/patch-src_concatkdf_c 11 Mar 2022 18:49:49 -0000 1.2
+++ patches/patch-src_concatkdf_c 28 Apr 2026 20:52:50 -0000
@@ -1,21 +1,12 @@
Index: src/concatkdf.c
--- src/concatkdf.c.orig
+++ src/concatkdf.c
-@@ -16,15 +16,9 @@
- ////////////////////////////////////////////////////////////////////////////////
- static uint8_t *_apply_uint32(const uint32_t value, uint8_t *buffer)
- {
-- const uint32_t formatted = htonl(value);
-- const uint8_t data[4] = {
-- (formatted >> 0) & 0xff,
-- (formatted >> 8) & 0xff,
-- (formatted >> 16) & 0xff,
-- (formatted >> 24) & 0xff
-- };
-- memcpy(buffer, data, 4);
-+ const uint32_t big_endian_int32 = htonl(value);
-
-+ memcpy(buffer, &big_endian_int32, 4);
- return buffer + 4;
- }
-
+@@ -14,7 +14,7 @@
+ #include <malloc.h>
+ #else
+ #include <arpa/inet.h>
+-#include <alloca.h>
++#include <stdlib.h>
+ #endif
+ #include <openssl/evp.h>
+ #include <string.h>
Index: patches/patch-src_jws_c
===================================================================
RCS file: patches/patch-src_jws_c
diff -N patches/patch-src_jws_c
--- patches/patch-src_jws_c 11 Mar 2022 18:49:49 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-Index: src/jws.c
---- src/jws.c.orig
-+++ src/jws.c
-@@ -171,6 +171,12 @@ static bool _cjose_jws_build_dig_sha(cjose_jws_t *jws,
- goto _cjose_jws_build_dig_sha_cleanup;
- }
-
-+ if (NULL != jws->dig)
-+ {
-+ cjose_get_dealloc()(jws->dig);
-+ jws->dig = NULL;
-+ }
-+
- // allocate buffer for digest
- jws->dig_len = EVP_MD_size(digest_alg);
- jws->dig = (uint8_t *)cjose_get_alloc()(jws->dig_len);
Index: patches/patch-test_check_concatkdf_c
===================================================================
RCS file: patches/patch-test_check_concatkdf_c
diff -N patches/patch-test_check_concatkdf_c
--- patches/patch-test_check_concatkdf_c 11 Mar 2022 18:49:49 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-Index: test/check_concatkdf.c
---- test/check_concatkdf.c.orig
-+++ test/check_concatkdf.c
-@@ -60,14 +60,9 @@ _create_otherinfo_header_finish:
-
- static bool _cmp_uint32(uint8_t **actual, uint32_t expected)
- {
-- uint32_t value = htonl(expected);
-- uint8_t expectedData[] = {
-- (value >> 0) & 0xff,
-- (value >> 8) & 0xff,
-- (value >> 16) & 0xff,
-- (value >> 24) & 0xff
-- };
-- bool result = (0 == memcmp(*actual, expectedData, 4));
-+ uint32_t big_endian_int32 = htonl(expected);
-+
-+ bool result = (0 == memcmp(*actual, &big_endian_int32, 4));
- (*actual) += 4;
- return result;
- }
Index: pkg/PLIST
===================================================================
RCS file: /disk/cvs/openbsd/ports/devel/cjose/pkg/PLIST,v
diff -u -p -r1.2 PLIST
--- pkg/PLIST 11 Mar 2022 18:49:49 -0000 1.2
+++ pkg/PLIST 28 Apr 2026 20:52:50 -0000
@@ -8,7 +8,7 @@ include/cjose/jwk.h
include/cjose/jws.h
include/cjose/util.h
include/cjose/version.h
-lib/libcjose.a
+@static-lib lib/libcjose.a
lib/libcjose.la
@lib lib/libcjose.so.${LIBcjose_VERSION}
lib/pkgconfig/cjose.pc
Update devel/cjose