Resolve jar paths using xmvn

This commit is contained in:
Marian Koncek 2023-01-20 14:18:32 +01:00
parent 4249d3ae27
commit cbda668288
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,50 @@
From 10b9e50cde070774118b6d9361c9d3c2ff686573 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Fri, 20 Jan 2023 12:59:49 +0100
Subject: [PATCH] Resolve jar paths using xmvn
---
base/CMakeLists.txt | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt
index c315be0..8cabd7f 100644
--- a/base/CMakeLists.txt
+++ b/base/CMakeLists.txt
@@ -151,25 +151,16 @@ find_file(JACKSON2_JAXB_ANNOTATIONS_JAR
/usr/share/java
)
-find_file(JAXB_API_JAR
- NAMES
- jaxb-api.jar
- PATHS
- /usr/share/java
+execute_process(
+ COMMAND xmvn-resolve jakarta.xml.bind:jakarta.xml.bind-api:2
+ OUTPUT_VARIABLE JAXB_API_JAR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
-find_file(JAVAX_ACTIVATION_JAR
- NAMES
- jakarta.activation.jar
- jakarta-activation.jar
- javax.activation.jar
- javax-activation.jar
- PATHS
- /usr/share/java/jakarta-activation
- /usr/share/java/jakarta
- /usr/share/java/javax-activation
- /usr/share/java/javax
- /usr/share/java
+execute_process(
+ COMMAND xmvn-resolve jakarta.activation:jakarta.activation-api:1
+ OUTPUT_VARIABLE JAVAX_ACTIVATION_JAR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_file(JAVAX_ANNOTATIONS_API_JAR
--
2.39.0

View File

@ -14,7 +14,7 @@ Name: dogtag-pki
# Downstream release number:
# - development/stabilization (unsupported): 0.<n> where n >= 1
# - GA/update (supported): <n> where n >= 1
%global release_number 2
%global release_number 3
# Development phase:
# - development (unsupported): alpha<n> where n >= 1
@ -45,6 +45,9 @@ Source: https://github.com/dogtagpki/pki/archive/v%{version}%{?phase:-}%{?phase}
# Fix with python-ldap 3.4.2
Patch0: 0001-Don-t-use-deprecated-python-ldap-options-4082.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2158907
Patch1: 0002-Resolve-jar-paths-using-xmvn.patch
# To create a patch for all changes since a version tag:
# $ git format-patch \
# --stdout \
@ -235,6 +238,7 @@ BuildRequires: freeipa-healthcheck-core
# PKICertImport depends on certutil and openssl
BuildRequires: nss-tools
BuildRequires: openssl
BuildRequires: maven-local
# description for top-level package (if there is a separate meta package)
%if "%{name}" != "%{product_id}"
@ -1263,6 +1267,9 @@ fi
################################################################################
%changelog
* Fri Jan 20 2023 Marian Koncek <mkoncek@redhat.com> - 11.2.0-3
- Resolve jar paths using xmvn
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 11.2.0-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild