import jss-4.9.0-1.module+el8.5.0+11983+6ba118b4

This commit is contained in:
CentOS Sources 2021-10-05 09:58:53 -04:00 committed by Stepan Oksanichenko
parent ffddbe9ada
commit 014d956306
3 changed files with 66 additions and 41 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/jss-4.8.1.tar.gz
SOURCES/jss-4.9.0.tar.gz

View File

@ -1 +1 @@
5bf724d866e8fd7e577ffdecb06dbb679b113ce3 SOURCES/jss-4.8.1.tar.gz
a358b4c70f9809d6f26bbb7c0a329ac1963983b7 SOURCES/jss-4.9.0.tar.gz

View File

@ -6,9 +6,11 @@ Summary: Java Security Services (JSS)
URL: http://www.dogtagpki.org/wiki/JSS
License: MPLv1.1 or GPLv2+ or LGPLv2+
Version: 4.8.1
# For development (i.e. unsupported) releases, use x.y.z-0.n.<phase>.
# For official (i.e. supported) releases, use x.y.z-r where r >=1.
Version: 4.9.0
Release: 1%{?_timestamp}%{?_commit_id}%{?dist}
#global _phase -a1
#global _phase -alpha1
# To generate the source tarball:
# $ git clone https://github.com/dogtagpki/jss.git
@ -26,44 +28,56 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas
# > jss-VERSION-RELEASE.patch
# Patch: jss-VERSION-RELEASE.patch
################################################################################
# Java
################################################################################
%if 0%{?fedora} && 0%{?fedora} <= 32 || 0%{?rhel} && 0%{?rhel} <= 8
%define java_devel java-1.8.0-openjdk-devel
%define java_headless java-1.8.0-openjdk-headless
%define java_home /usr/lib/jvm/jre-1.8.0-openjdk
%else
%define java_devel java-11-openjdk-devel
%define java_headless java-11-openjdk-headless
%define java_home /usr/lib/jvm/jre-11-openjdk
%endif
################################################################################
# Build Options
################################################################################
# By default the build will execute unit tests unless --without test
# option is specified.
%bcond_without test
################################################################################
# Build Dependencies
################################################################################
# autosetup
BuildRequires: git
BuildRequires: make
BuildRequires: cmake >= 3.14
BuildRequires: zip
BuildRequires: unzip
BuildRequires: gcc-c++
BuildRequires: nspr-devel >= 4.13.1
BuildRequires: nss-devel >= 3.44
BuildRequires: nss-tools >= 3.44
BuildRequires: java-devel
BuildRequires: %{java_devel}
BuildRequires: jpackage-utils
BuildRequires: slf4j
BuildRequires: glassfish-jaxb-api
%if 0%{?rhel} && 0%{?rhel} <= 7
# no slf4j-jdk14
%else
BuildRequires: slf4j-jdk14
%endif
BuildRequires: apache-commons-lang3
BuildRequires: junit
Requires: nss >= 3.44
Requires: java-headless
Requires: %{java_headless}
Requires: jpackage-utils
Requires: slf4j
Requires: glassfish-jaxb-api
%if 0%{?rhel} && 0%{?rhel} <= 7
# no slf4j-jdk14
%else
Requires: slf4j-jdk14
%endif
Requires: apache-commons-lang3
Conflicts: ldapjdk < 4.20
@ -89,15 +103,13 @@ This package contains the API documentation for JSS.
################################################################################
%prep
%autosetup -n %{name}-%{version}%{?_phase} -p 1 -S git
%autosetup -n %{name}-%{version}%{?_phase} -p 1
################################################################################
%build
%set_build_flags
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
# Enable compiler optimizations
export BUILD_OPT=1
@ -110,39 +122,43 @@ modutil -dbdir /etc/pki/nssdb -chkfips true | grep -q enabled && export FIPS_ENA
# The Makefile is not thread-safe
%cmake \
-DVERSION=%{version} \
-DJAVA_HOME=%{java_home} \
-DJAVA_LIB_INSTALL_DIR=%{_jnidir} \
-DJSS_LIB_INSTALL_DIR=%{_libdir}/jss \
-B %{_vpath_builddir}
cd %{_vpath_builddir}
%{__make} all
%{__make} javadoc
%{__make} \
VERBOSE=%{?_verbose} \
CMAKE_NO_VERBOSE=1 \
--no-print-directory \
all
%{__make} \
VERBOSE=%{?_verbose} \
CMAKE_NO_VERBOSE=1 \
--no-print-directory \
javadoc
%if %{with test}
ctest --output-on-failure
%endif
################################################################################
%install
# There is no install target so we'll do it by hand
cd %{_vpath_builddir}
# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir}
install -m 644 %{_vpath_builddir}/jss4.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar
%{__make} \
VERBOSE=%{?_verbose} \
CMAKE_NO_VERBOSE=1 \
DESTDIR=%{buildroot} \
INSTALL="install -p" \
--no-print-directory \
install
# We have to use the name libjss4.so because this is dynamically
# loaded by the jar file.
install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss
install -m 0755 %{_vpath_builddir}/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/
pushd ${RPM_BUILD_ROOT}%{_libdir}/jss
ln -fs %{_jnidir}/jss4.jar jss4.jar
popd
# javadoc
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -rp %{_vpath_builddir}/docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -p jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
# No ldconfig is required since this library is loaded by Java itself.
################################################################################
%files
@ -160,6 +176,15 @@ cp -p *.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
################################################################################
%changelog
* Mon Jul 26 2021 Red Hat PKI Team <rhcs-maint@redhat.com> 4.9.0-1
- Rebase to JSS 4.9.0
* Fri Jun 11 2021 Red Hat PKI Team <rhcs-maint@redhat.com> 4.9.0-0.2
- Rebase to JSS 4.9.0-alpha2
* Wed Jun 02 2021 Red Hat PKI Team <rhcs-maint@redhat.com> 4.9.0-0.1
- Rebase to JSS 4.9.0-alpha1
* Thu Jan 14 2021 Red Hat PKI Team <rhcs-maint@redhat.com> 4.8.1-1
- Rebase to upstream JSS v4.8.1
- Red Hat Bugilla #1908541 - jss broke SCEP - missing PasswordChallenge class