The package rpms/liboauth2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/liboauth2.git/commit/?id=c28bce52....
Change:
+%ifnarch armv7hl
Thanks.
Full change:
============
commit c28bce52cfd398cfd318ef2ba9002709693fc12e
Author: Alexander Bokovoy <abokovoy(a)redhat.com>
Date: Wed Apr 21 11:03:52 2021 +0300
Fix tests
Avoid running internal tests on 32-bit ARMv7 until we fix unaligned
issues upstream.
Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
diff --git a/liboauth2-fix-logging.patch b/liboauth2-fix-logging.patch
new file mode 100644
index 0000000..1fc560c
--- /dev/null
+++ b/liboauth2-fix-logging.patch
@@ -0,0 +1,29 @@
+From 9f8dabd9c15d2b8cfdf4c37e7b58aa9d87935ba6 Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <abokovoy(a)redhat.com>
+Date: Tue, 20 Apr 2021 10:19:55 +0300
+Subject: [PATCH] pass missing argument to oauth2_error in
+ _oauth2_dpop_jti_validate
+
+Fixes a crash in test/check_oauth2.c
+
+Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
+---
+ src/dpop.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/dpop.c b/src/dpop.c
+index 5ca00f9..28600c0 100644
+--- a/src/dpop.c
++++ b/src/dpop.c
+@@ -310,7 +310,7 @@ static bool _oauth2_dpop_jti_validate(oauth2_log_t *log,
+ oauth2_cache_get(log, verify->cache, clm_jti, &s_value);
+ if (s_value != NULL) {
+ oauth2_error(log, "a token with the same JTI \"%s\" exists in "
+- "the cache: possible replay attack");
++ "the cache: possible replay attack", clm_jti);
+ goto end;
+ }
+
+--
+2.31.1
+
diff --git a/liboauth2.spec b/liboauth2.spec
index 668a3e5..eb31acf 100644
--- a/liboauth2.spec
+++ b/liboauth2.spec
@@ -11,6 +11,8 @@ Source0:
https://github.com/zmartzone/liboauth2/archive/v%{version}/%{name}-%{ve
# APR CFLAGS, we need also APXS include details. Use APXS tool directly.
# Merged upstream:
https://github.com/zmartzone/liboauth2/pull/20
Patch1: liboauth2-apache-fix.patch
+#
https://github.com/zmartzone/liboauth2/pull/22
+Patch2: liboauth2-fix-logging.patch
BuildRequires: automake
BuildRequires: cmake
@@ -24,7 +26,7 @@ BuildRequires: pkgconfig(cjose)
BuildRequires: pkgconfig(jansson)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(openssl)
-
+BuildRequires: gdb-minimal
%description
liboauth2 library provides primitives to create OAuth 2.x and OpenID Connect
@@ -65,7 +67,11 @@ autoreconf -ivf
%make_build
%check
+%ifnarch armv7hl
+# Do not run tests on 32-bit ARMv7 until we find a way to fix unaligned memory access
+#
https://github.com/zmartzone/liboauth2/issues/21
%make_build check
+%endif
%install
%make_install
commit a3ee5d08c65002ee4e269884dbb9c83a7e2607dc
Author: Alexander Bokovoy <abokovoy(a)redhat.com>
Date: Tue Apr 20 08:43:02 2021 +0300
Import liboauth2
Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..47b5b52
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/liboauth2-1.4.1.tar.gz
diff --git a/liboauth2-apache-fix.patch b/liboauth2-apache-fix.patch
new file mode 100644
index 0000000..b83fe73
--- /dev/null
+++ b/liboauth2-apache-fix.patch
@@ -0,0 +1,58 @@
+From f73c01d6d64b951524377394d933e207b58ae63f Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <abokovoy(a)redhat.com>
+Date: Mon, 19 Apr 2021 11:59:57 +0300
+Subject: [PATCH] apache: use include directory from APXS
+
+On Fedora, when building Apache module support, it is not enough to get
+APR CFLAGS, we need also APXS include details. Use APXS tool directly.
+
+Signed-off-by: Alexander Bokovoy <abokovoy(a)redhat.com>
+---
+ Makefile.am | 2 +-
+ configure.ac | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6aec52f..448cb30 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -121,7 +121,7 @@ liboauth2_apache_la_pkgconfigdir = $(libdir)/pkgconfig
+ liboauth2_apache_la_pkgconfig_DATA = liboauth2_apache.pc
+
+ liboauth2_apache_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAVE_APACHE
+-liboauth2_apache_la_CFLAGS = @APR_CFLAGS@
++liboauth2_apache_la_CFLAGS = @APACHE_CFLAGS@
+ liboauth2_apache_la_LIBADD = @APR_LIBS@
+
+ includesub_HEADERS += \
+diff --git a/configure.ac b/configure.ac
+index bbe39ba..8583d3f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,12 +51,22 @@ fi
+ AC_SUBST(HIREDIS_PC)
+
+ AC_ARG_WITH([apache], AS_HELP_STRING([--with-apache], [build with Apache support
[default=autodetect]]),)
++AC_ARG_WITH([apxs],
++ [AS_HELP_STRING([--with-apxs=PATH/NAME],[path to the apxs binary for Apache
[[apxs]]])],
++ [AC_SUBST(APXS, $with_apxs)],
++ [AC_PATH_PROGS(APXS, [apxs2 apxs])])
+ if test "x$with_apache" != "xno"; then
+ PKG_CHECK_MODULES([APR], [apr-1, apr-util-1], [have_apache="yes"],
[have_apache="no"])
++
++ AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"],
++ [AC_MSG_NOTICE([apxs found at $APXS])],
++ [AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])])
++
++ APACHE_CFLAGS="`${APXS} -q CFLAGS` `${APXS} -q EXTRA_CPPFLAGS` -I`${APXS} -q
INCLUDEDIR` ${APR_CFLAGS}"
+ fi
+ AM_CONDITIONAL(HAVE_APACHE, [test x"$have_apache" = "xyes"])
+-AC_SUBST(APR_CFLAGS)
+ AC_SUBST(APR_LIBS)
++AC_SUBST(APACHE_CFLAGS)
+
+ AC_ARG_WITH([nginx], AS_HELP_STRING([--with-nginx=DIR], [build with NGINX support
[default=no]]), [have_nginx="yes"], [have_nginx="no"])
+ if test x"$have_nginx" = "xyes" ; then
+--
+2.31.1
+
diff --git a/liboauth2.spec b/liboauth2.spec
new file mode 100644
index 0000000..668a3e5
--- /dev/null
+++ b/liboauth2.spec
@@ -0,0 +1,102 @@
+Name: liboauth2
+Version: 1.4.1
+Release: 2%{?dist}
+Summary: Generic library to build OAuth 2.x and OpenID Connect servers and clients in C
+License: AGPLv3
+URL:
https://github.com/zmartzone/liboauth2
+Source0:
https://github.com/zmartzone/liboauth2/archive/v%{version}/%{name}-%{vers...
+
+# apache: use include directory from APXS
+# On Fedora, when building Apache module support, it is not enough to get
+# APR CFLAGS, we need also APXS include details. Use APXS tool directly.
+# Merged upstream:
https://github.com/zmartzone/liboauth2/pull/20
+Patch1: liboauth2-apache-fix.patch
+
+BuildRequires: automake
+BuildRequires: cmake
+BuildRequires: gcc
+BuildRequires: httpd-devel
+BuildRequires: libtool
+BuildRequires: make
+BuildRequires: check
+BuildRequires: pkgconfig(check)
+BuildRequires: pkgconfig(cjose)
+BuildRequires: pkgconfig(jansson)
+BuildRequires: pkgconfig(libcurl)
+BuildRequires: pkgconfig(openssl)
+
+
+%description
+liboauth2 library provides primitives to create OAuth 2.x and OpenID Connect
+servers and clients
+
+%package devel
+Summary: Library to build OAuth 2.x and OpenID Connect servers and clients in C
+License: AGPLv3
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+liboauth2 library provides primitives to create OAuth 2.x and OpenID Connect
+servers and clients.
+
+%package apache
+Summary: OAuth 2.x and OpenID Connect library integration to Apache
+License: AGPLv3
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description apache
+OAuth 2.x and OpenID Connect library integration to Apache web server
+
+%package apache-devel
+Summary: Development components to build Apache module with liboauth2 library
+License: AGPLv3
+Requires: %{name}-apache%{?_isa} = %{version}-%{release}
+Requires: %{name}-devel%{?_isa} = %{version}-%{release}
+
+%description apache-devel
+Development components to build Apache module with liboauth2 library
+
+%prep
+%autosetup -p1 -n liboauth2-%{version}
+
+%build
+autoreconf -ivf
+%configure --with-apache --without-redis --without-memcache
+%make_build
+
+%check
+%make_build check
+
+%install
+%make_install
+# Don't install static libraries and .la files
+rm -vf %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/*.a
+find %{buildroot}%{_includedir}/oauth2 -name '*.h' | grep -v apache | sed
's@%{buildroot}@@g' > file.headers
+
+%files devel -f file.headers
+%dir %{_includedir}/oauth2
+%{_libdir}/pkgconfig/liboauth2.pc
+%{_libdir}/liboauth2.so
+
+%files
+%{_libdir}/liboauth2.so.0
+%{_libdir}/liboauth2.so.0.0.0
+%license LICENSE
+%doc README.md
+
+%files apache
+%{_libdir}/liboauth2_apache.so.0
+%{_libdir}/liboauth2_apache.so.0.0.0
+
+%files apache-devel
+%{_includedir}/oauth2/apache.h
+%{_libdir}/pkgconfig/liboauth2_apache.pc
+%{_libdir}/liboauth2_apache.so
+
+
+%changelog
+* Mon Apr 19 2021 Alexander Bokovoy <abokovoy(a)redhat.com> 1.4.1-2
+- Fedora packaging review updates
+
+* Sat Apr 17 2021 Alexander Bokovoy <abokovoy(a)redhat.com> 1.4.1-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..4816aa2
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (liboauth2-1.4.1.tar.gz) =
43b643f2111f24d999c56eccc7e40045cc8f7b85925280895d0ece2a36f4b01ceb9a06afcc76bd84bf9cb60817832a1fd59b40287274681fbd12cce7417531a8