08bafd
################################################################################
b93447
Name:           jss
08bafd
################################################################################
b93447
08bafd
Summary:        Java Security Services (JSS)
08bafd
URL:            http://www.dogtagpki.org/wiki/JSS
b93447
License:        MPLv1.1 or GPLv2+ or LGPLv2+
08bafd
08bafd
Version:        4.4.4
a7d761
Release:        5%{?_timestamp}%{?_commit_id}%{?dist}
08bafd
08bafd
# To generate the source tarball:
aee1ec
#
08bafd
# git clone https://github.com/dogtagpki/jss.git
aee1ec
# cd jss
08bafd
# git archive --format=tar.gz --prefix jss-VERSION/jss/ -o jss-VERSION.tar.gz -v HEAD
aee1ec
#
08bafd
Source:         https://github.com/dogtagpki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
08bafd
08bafd
Patch0:         jss-fix-classpath.patch
08bafd
Patch1:         jss-fix-README.patch
08bafd
Patch2:         jss-update-jss-spec-in-template.patch
08bafd
Patch3:         jss-add-build-sh.patch
08bafd
Patch4:         jss-add-travis-yml.patch
08bafd
Patch5:         jss-add-x509-cert-and-crl-migration.patch
08bafd
Patch6:         jss-fix-algorithm-identifier-encode-decode.patch
08bafd
Patch7:         jss-add-TLS-SHA384-ciphers.patch
a7d761
Patch8:         jss-disallow-curve-x25519-in-FIPS-mode.patch
a7d761
Patch9:         jss-enable-AIA-OCSP-cert-checking-for-entire-cert-chain.patch
a7d761
Patch10:        jss-enable-AIA-OCSP-cert-checking-for-entire-cert-chain-2.patch
a7d761
b93447
aee1ec
Conflicts:      idm-console-framework < 1.1.17-4
aee1ec
Conflicts:      pki-base < 10.4.0
aee1ec
Conflicts:      tomcatjss < 7.2.1
aee1ec
08bafd
# autosetup
08bafd
BuildRequires:  git
08bafd
aee1ec
BuildRequires:  nss-devel >= 3.28.4-6
aee1ec
BuildRequires:  nspr-devel >= 4.13.1
b93447
BuildRequires:  java-devel
08bafd
BuildRequires:  jpackage-utils
a7067b
%if 0%{?fedora} >= 25 || 0%{?rhel} > 7
a7067b
BuildRequires:  perl-interpreter
aee1ec
%endif
08bafd
BuildRequires:  apache-commons-lang
08bafd
BuildRequires:  apache-commons-codec
08bafd
BuildRequires:  ldapjdk
aee1ec
08bafd
Requires:       nss >= 3.28.4-6
08bafd
Requires:       java-headless
08bafd
Requires:       jpackage-utils
08bafd
Requires:       apache-commons-lang
08bafd
Requires:       apache-commons-codec
08bafd
Requires:       ldapjdk
b93447
b93447
%description
b93447
Java Security Services (JSS) is a java native interface which provides a bridge
b93447
for java-based applications to use native Network Security Services (NSS).
b93447
This only works with gcj. Other JREs require that JCE providers be signed.
b93447
08bafd
################################################################################
b93447
%package javadoc
08bafd
################################################################################
08bafd
b93447
Summary:        Java Security Services (JSS) Javadocs
b93447
Group:          Documentation
b93447
Requires:       jss = %{version}-%{release}
b93447
b93447
%description javadoc
b93447
This package contains the API documentation for JSS.
b93447
08bafd
################################################################################
b93447
%prep
08bafd
08bafd
#%autosetup -n %{name}-%{version} -p 1 -S git
aee1ec
%setup -q -n %{name}-%{version}
aee1ec
pushd jss
08bafd
# Force use of 'patch' rather than 'git apply' by injecting "/jss/" prefix
08bafd
# on patches of existing files located in top-level directory . . .
08bafd
%patch0 -p2
08bafd
%patch1 -p2
08bafd
%patch2 -p2
762105
%patch3 -p1
762105
%patch4 -p1
762105
%patch5 -p1
08bafd
%patch6 -p2
08bafd
%patch7 -p2
a7d761
%patch8 -p2
a7d761
%patch9 -p2
a7d761
%patch10 -p2
aee1ec
popd
b93447
08bafd
################################################################################
b93447
%build
08bafd
08bafd
#%set_build_flags
08bafd
b93447
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
aee1ec
[ -z "$USE_INSTALLED_NSPR" ] && export USE_INSTALLED_NSPR=1
aee1ec
[ -z "$USE_INSTALLED_NSS" ] && export USE_INSTALLED_NSS=1
b93447
b93447
# Enable compiler optimizations and disable debugging code
aee1ec
# NOTE: If you ever need to create a debug build with optimizations disabled
aee1ec
# just comment out this line and change in the %%install section below the
aee1ec
# line that copies jars xpclass.jar to be xpclass_dbg.jar
aee1ec
export BUILD_OPT=1
b93447
b93447
# Generate symbolic info for debuggers
b93447
XCFLAGS="-g $RPM_OPT_FLAGS"
b93447
export XCFLAGS
b93447
b93447
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
b93447
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
b93447
b93447
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
b93447
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
b93447
b93447
NSPR_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nspr | sed 's/-I//'`
b93447
NSPR_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nspr | sed 's/-L//'`
b93447
b93447
NSS_INCLUDE_DIR=`/usr/bin/pkg-config --cflags-only-I nss | sed 's/-I//'`
b93447
NSS_LIB_DIR=`/usr/bin/pkg-config --libs-only-L nss | sed 's/-L//'`
b93447
b93447
export NSPR_INCLUDE_DIR
b93447
export NSPR_LIB_DIR
b93447
export NSS_INCLUDE_DIR
b93447
export NSS_LIB_DIR
b93447
aee1ec
%if 0%{?__isa_bits} == 64
b93447
USE_64=1
b93447
export USE_64
b93447
%endif
b93447
b93447
# The Makefile is not thread-safe
aee1ec
make -C jss/coreconf
aee1ec
make -C jss
aee1ec
make -C jss javadoc
aee1ec
08bafd
################################################################################
b93447
%install
b93447
aee1ec
# Copy the license files here so we can include them in %%doc
08bafd
cp -p jss/MPL-1.1.txt .
08bafd
cp -p jss/gpl.txt .
08bafd
cp -p jss/lgpl.txt .
b93447
b93447
# There is no install target so we'll do it by hand
b93447
b93447
# jars
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_jnidir}
aee1ec
# NOTE: if doing a debug no opt build change xpclass.jar to xpclass_dbg.jar
aee1ec
install -m 644 dist/xpclass.jar ${RPM_BUILD_ROOT}%{_jnidir}/jss4.jar
b93447
b93447
# We have to use the name libjss4.so because this is dynamically
b93447
# loaded by the jar file.
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/jss
aee1ec
install -m 0755 dist/Linux*.OBJ/lib/libjss4.so ${RPM_BUILD_ROOT}%{_libdir}/jss/
b93447
pushd  ${RPM_BUILD_ROOT}%{_libdir}/jss
b93447
    ln -fs %{_jnidir}/jss4.jar jss4.jar
b93447
popd
b93447
b93447
# javadoc
b93447
install -d -m 0755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
aee1ec
cp -rp dist/jssdoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
aee1ec
cp -p jss/jss.html $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
08bafd
cp -p jss/*.txt $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
b93447
b93447
# No ldconfig is required since this library is loaded by Java itself.
08bafd
################################################################################
b93447
%files
08bafd
b93447
%defattr(-,root,root,-)
08bafd
%doc jss/jss.html jss/MPL-1.1.txt jss/gpl.txt jss/lgpl.txt
b93447
%{_libdir}/jss/*
b93447
%{_jnidir}/*
aee1ec
%{_libdir}/jss/lib*.so
b93447
08bafd
################################################################################
b93447
%files javadoc
08bafd
b93447
%defattr(-,root,root,-)
b93447
%dir %{_javadocdir}/%{name}-%{version}
b93447
%{_javadocdir}/%{name}-%{version}/*
b93447
08bafd
################################################################################
b93447
%changelog
a7d761
* Fri Feb 15 2019 Dogtag PKI Team <pki-devel@redhat.com> 4.4.4-5
a7d761
- Bugzilla #1671247 - CC: Enable AIA OCSP cert checking for entire cert
a7d761
  chain [rhel-7.6.z] (jmagne)
a7d761
a7d761
* Thu Jan 31 2019 Dogtag PKI Team <pki-devel@redhat.com> 4.4.4-4
a7d761
- Bugzilla #1671244 - x25519 allowed in FIPS mode [rhel-7.6.z] (ascheel)
a7d761
- Bugzilla #1671247 - CC: Enable AIA OCSP cert checking for entire cert
a7d761
  chain [rhel-7.6.z] (jmagne)
08bafd
08bafd
* Thu Jul  5 2018 Dogtag PKI Team <pki-devel@redhat.com> 4.4.4-3
08bafd
- Bugzilla #1534772 - org.mozilla.jss.pkix.primitive.AlgorithmIdentifier
08bafd
  decode/encode process alters original data (cfu)
08bafd
- Bugzilla #1554056 - JSS: Add support for TLS_*_SHA384 ciphers (cfu)
08bafd
08bafd
* Thu Jun 21 2018 Dogtag PKI Team <pki-devel@redhat.com> 4.4.4-2
08bafd
- Red Hat Bugzilla #1560682 - (RFE) Migrate RHCS x509 cert and crl
08bafd
  functionality to JSS (jmagne)
08bafd
08bafd
* Tue May 29 2018 Dogtag PKI Team <pki-devel@redhat.com> 4.4.4-1
08bafd
- Rebased to JSS 4.4.4
08bafd
08bafd
* Thu Apr 05 2018 Dogtag PKI Team <pki-devel@redhat.com> 4.4.3-1
08bafd
- Rebased to JSS 4.4.3
08bafd
#- Red Hat Bugzilla #1548548 - Partial Fedora build flags injection