Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions LICENSES-AND-NOTICES/SPECS/data/licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@
"libisofs",
"libjaylink",
"libjcat",
"libjwt",
"libkcapi",
"libkeepalive",
"libkkc",
Expand Down
5 changes: 5 additions & 0 deletions SPECS-EXTENDED/libjwt/libjwt.signatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"libjwt-1.12.1.tar.gz": "d29e4250d437340b076350e910e69fd5539ef8b92528d0306745cec0e343cc17"
}
}
78 changes: 78 additions & 0 deletions SPECS-EXTENDED/libjwt/libjwt.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
Vendor: Microsoft Corporation
Distribution: Azure Linux
Name: libjwt
Version: 1.12.1
Release: 1%{?dist}
Summary: A JSON Web Token library in C

License: MPL-2.0
URL: https://github.com/benmcollins/libjwt
Source0: https://github.com/benmcollins/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

# Wire up --without-examples so example binaries (jwtgen, jwtauth) are
# not built; upstream ships the flag but does not honor it in
# Makefile.am. Imported verbatim from Fedora.
Patch0: without_examples.patch

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: jansson-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: openssl-devel

%description
libjwt is a C library implementing JSON Web Tokens (RFC 7519). It supports
signing and verification using HMAC (HS256/384/512), RSA (RS256/384/512),
ECDSA (ES256/384/512), and RSA-PSS (PS256/384/512) algorithms via OpenSSL,
and uses Jansson for JSON encoding and decoding.

%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: jansson-devel
Requires: openssl-devel

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%autosetup -p1
autoreconf -i


%build
%configure --disable-static --without-examples
%make_build


%install
%make_install
find %{buildroot} -name '*.la' -exec rm -f {} ';'


%ldconfig_scriptlets


%files
%license LICENSE
%doc README.md
%{_libdir}/libjwt.so.*


%files devel
%doc README.md
%{_includedir}/jwt.h
%{_libdir}/libjwt.so
%{_libdir}/pkgconfig/libjwt.pc


%changelog
* Mon Jun 15 2026 lakarri <lakarri@microsoft.com> - 1.12.1-1
- Initial Azure Linux import from Fedora 44 (license: MIT).
- Required by slurmrestd (Slurm REST API daemon) for JWT-based
authentication. Tracked via ADO #61504121.
- License verified.
34 changes: 34 additions & 0 deletions SPECS-EXTENDED/libjwt/without_examples.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/Makefile.am b/Makefile.am
index 8144c12..cee45ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,10 @@
ACLOCAL_AMFLAGS = -I m4

-SUBDIRS = include libjwt examples tests dist
+SUBDIRS = include libjwt
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
+SUBDIRS += tests dist

include $(top_srcdir)/doxygen.mk

diff --git a/configure.ac b/configure.ac
index 4aa1de8..e0e9008 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,13 @@ AS_IF([test "x$with_openssl" != "xno"], [
AM_CONDITIONAL([HAVE_OPENSSL], [false])
])

+AC_ARG_WITH([examples],
+ AS_HELP_STRING([--without-examples], [do not build example programs]),
+ [],
+ [with_examples=yes])
+
+AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$with_examples" != "xno"])
+
PKG_CHECK_MODULES([JANSSON], [jansson >= 2.0])
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [true], [true])

10 changes: 10 additions & 0 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10166,6 +10166,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "libjwt",
"version": "1.12.1",
"downloadUrl": "https://github.com/benmcollins/libjwt/archive/v1.12.1.tar.gz"
}
}
},
{
"component": {
"type": "other",
Expand Down
Loading