469e9d
################################################################################
469e9d
Name:             pki-core
469e9d
################################################################################
469e9d
e432aa
%global           vendor_id redhat
e432aa
%global           brand Red Hat
e432aa
bd7cad
Summary:          %{brand} PKI Core Package
469e9d
URL:              http://www.dogtagpki.org/
469e9d
# The entire source code is GPLv2 except for 'pki-tps' which is LGPLv2
469e9d
License:          GPLv2 and LGPLv2
469e9d
8c8802
# For development (unsupported) releases, use x.y.z-0.n.unstable with alpha/beta phase.
8c8802
# For official (supported) releases, use x.y.z-r where r >=1 without alpha/beta phase.
8c8802
Version:          10.9.4
8c8802
Release:          1%{?_timestamp}%{?_commit_id}%{?dist}
8c8802
#global           _phase -a1
469e9d
469e9d
# To create a tarball from a version tag:
469e9d
# $ git archive \
469e9d
#     --format=tar.gz \
469e9d
#     --prefix pki-<version>/ \
469e9d
#     -o pki-<version>.tar.gz \
469e9d
#     <version tag>
469e9d
Source: https://github.com/dogtagpki/pki/archive/v%{version}%{?_phase}/pki-%{version}%{?_phase}.tar.gz
469e9d
469e9d
# To create a patch for all changes since a version tag:
469e9d
# $ git format-patch \
469e9d
#     --stdout \
469e9d
#     <version tag> \
469e9d
#     > pki-VERSION-RELEASE.patch
469e9d
# Patch: pki-VERSION-RELEASE.patch
8c8802
8c8802
# Do not remove this!! pytest-runner isn't available on RHEL. Removing this
8c8802
# patch will break RHEL builds. The error message is:
8c8802
# BUILDSTDERR: Download error on https://pypi.org/simple/pytest-runner/:
8c8802
#   [Errno 111] Connection refused -- Some packages may not be found!
bd7cad
Patch1: 0001-Removed-dependency-on-pytest-runner.patch
469e9d
469e9d
################################################################################
469e9d
# NSS
469e9d
################################################################################
469e9d
469e9d
%global nss_default_db_type sql
469e9d
469e9d
################################################################################
469e9d
# Python
469e9d
################################################################################
469e9d
bd7cad
%if 0%{?rhel}
bd7cad
%global python_executable /usr/libexec/platform-python
469e9d
%else
bd7cad
%global python_executable /usr/bin/python3
469e9d
%endif
469e9d
469e9d
################################################################################
469e9d
# Java
469e9d
################################################################################
469e9d
8c8802
%define java_home /usr/lib/jvm/jre-openjdk
8c8802
%define java_devel java-devel
8c8802
%define java_headless java-headless
8c8802
8c8802
%if 0%{?fedora} && 0%{?fedora} >= 33
8c8802
%define min_java_version 1:11
8c8802
%else
8c8802
%define min_java_version 1:1.8.0
8c8802
%endif
469e9d
469e9d
################################################################################
469e9d
# RESTEasy
469e9d
################################################################################
469e9d
469e9d
%define jaxrs_api_jar /usr/share/java/jboss-jaxrs-2.0-api.jar
469e9d
%define resteasy_lib /usr/share/java/resteasy
469e9d
469e9d
################################################################################
469e9d
# PKI
469e9d
################################################################################
469e9d
469e9d
# By default the build will execute unit tests unless --without test
469e9d
# option is specified.
469e9d
469e9d
# bcond_without test
469e9d
%global with_test 1
469e9d
469e9d
# By default all packages will be built except the ones specified with
469e9d
# --without <package> option (exclusion method).
469e9d
469e9d
# If --with pkgs option is specified, only packages specified with
469e9d
# --with <package> will be built (inclusion method).
469e9d
469e9d
# bcond_with pkgs
469e9d
%global with_pkgs 1
469e9d
469e9d
# Define package_option macro to wrap bcond_with or bcond_without macro
469e9d
# depending on package selection method.
469e9d
469e9d
%if %{with pkgs}
469e9d
%define package_option() %bcond_with %1
469e9d
%else
469e9d
%define package_option() %bcond_without %1
bd7cad
%endif
469e9d
469e9d
# Define --with <package> or --without <package> options depending on
469e9d
# package selection method.
469e9d
469e9d
# package_option base
469e9d
%global with_base 1
469e9d
# package_option server
469e9d
%global with_server 1
469e9d
# package_option ca
469e9d
%global with_ca 1
469e9d
# package_option kra
469e9d
%global with_kra 1
469e9d
# package_option ocsp
469e9d
# package_option tks
469e9d
# package_option tps
469e9d
# package_option javadoc
469e9d
# package_option console
469e9d
# package_option theme
469e9d
# package_option meta
8c8802
# package_option tests
469e9d
# package_option debug
469e9d
%global with_debug 1
469e9d
469e9d
%if ! %{with debug}
469e9d
%define debug_package %{nil}
bd7cad
%endif
469e9d
469e9d
# ignore unpackaged files from native 'tpsclient'
469e9d
# REMINDER:  Remove this '%%define' once 'tpsclient' is rewritten as a Java app
469e9d
%define _unpackaged_files_terminate_build 0
469e9d
bd7cad
# The PKI UID and GID are preallocated, see:
bd7cad
# https://bugzilla.redhat.com/show_bug.cgi?id=476316
bd7cad
# https://bugzilla.redhat.com/show_bug.cgi?id=476782
bd7cad
# https://pagure.io/setup/blob/master/f/uidgid
bd7cad
# /usr/share/doc/setup/uidgid
469e9d
%define pki_username pkiuser
469e9d
%define pki_uid 17
469e9d
%define pki_groupname pkiuser
469e9d
%define pki_gid 17
469e9d
%define pki_homedir /usr/share/pki
469e9d
469e9d
%global saveFileContext() \
469e9d
if [ -s /etc/selinux/config ]; then \
469e9d
     . %{_sysconfdir}/selinux/config; \
469e9d
     FILE_CONTEXT=%{_sysconfdir}/selinux/%1/contexts/files/file_contexts; \
469e9d
     if [ "${SELINUXTYPE}" == %1 -a -f ${FILE_CONTEXT} ]; then \
469e9d
          cp -f ${FILE_CONTEXT} ${FILE_CONTEXT}.%{name}; \
469e9d
     fi \
469e9d
fi;
469e9d
469e9d
%global relabel() \
469e9d
. %{_sysconfdir}/selinux/config; \
469e9d
FILE_CONTEXT=%{_sysconfdir}/selinux/%1/contexts/files/file_contexts; \
469e9d
selinuxenabled; \
469e9d
if [ $? == 0  -a "${SELINUXTYPE}" == %1 -a -f ${FILE_CONTEXT}.%{name} ]; then \
469e9d
     fixfiles -C ${FILE_CONTEXT}.%{name} restore; \
469e9d
     rm -f ${FILE_CONTEXT}.%name; \
469e9d
fi;
469e9d
469e9d
################################################################################
469e9d
# Build Dependencies
469e9d
################################################################################
469e9d
469e9d
# autosetup
469e9d
BuildRequires:    git
469e9d
BuildRequires:    make
469e9d
8c8802
BuildRequires:    cmake >= 3.0.2
469e9d
BuildRequires:    gcc-c++
469e9d
BuildRequires:    zip
8c8802
BuildRequires:    %java_devel >= %{min_java_version}
8c8802
BuildRequires:    javapackages-tools
469e9d
BuildRequires:    redhat-rpm-config
8c8802
BuildRequires:    ldapjdk >= 4.22.0
469e9d
BuildRequires:    apache-commons-cli
469e9d
BuildRequires:    apache-commons-codec
469e9d
BuildRequires:    apache-commons-io
469e9d
BuildRequires:    apache-commons-lang
8c8802
BuildRequires:    apache-commons-net
469e9d
BuildRequires:    jakarta-commons-httpclient
469e9d
BuildRequires:    glassfish-jaxb-api
469e9d
BuildRequires:    slf4j
469e9d
BuildRequires:    slf4j-jdk14
469e9d
BuildRequires:    nspr-devel
469e9d
BuildRequires:    nss-devel >= 3.36.1
469e9d
469e9d
BuildRequires:    openldap-devel
469e9d
BuildRequires:    pkgconfig
469e9d
BuildRequires:    policycoreutils
469e9d
469e9d
BuildRequires:    python3-lxml
469e9d
BuildRequires:    python3-sphinx
469e9d
469e9d
BuildRequires:    velocity
469e9d
BuildRequires:    xalan-j2
469e9d
BuildRequires:    xerces-j2
469e9d
469e9d
%if 0%{?rhel}
469e9d
BuildRequires:    resteasy >= 3.0.26
469e9d
%else
469e9d
BuildRequires:    jboss-annotations-1.2-api
469e9d
BuildRequires:    jboss-jaxrs-2.0-api
469e9d
BuildRequires:    jboss-logging
469e9d
BuildRequires:    resteasy-atom-provider >= 3.0.17-1
469e9d
BuildRequires:    resteasy-client >= 3.0.17-1
469e9d
BuildRequires:    resteasy-jaxb-provider >= 3.0.17-1
469e9d
BuildRequires:    resteasy-core >= 3.0.17-1
469e9d
BuildRequires:    resteasy-jackson2-provider >= 3.0.17-1
469e9d
%endif
469e9d
bd7cad
BuildRequires:    python3 >= 3.5
469e9d
BuildRequires:    python3-devel
8c8802
BuildRequires:    python3-setuptools
469e9d
BuildRequires:    python3-cryptography
469e9d
BuildRequires:    python3-lxml
469e9d
BuildRequires:    python3-ldap
469e9d
BuildRequires:    python3-libselinux
469e9d
BuildRequires:    python3-nss
469e9d
BuildRequires:    python3-requests >= 2.6.0
469e9d
BuildRequires:    python3-six
bd7cad
bd7cad
%if 0%{?rhel}
bd7cad
# no python3-pytest-runner
bd7cad
%else
bd7cad
BuildRequires:    python3-pytest-runner
bd7cad
%endif
469e9d
469e9d
BuildRequires:    junit
469e9d
BuildRequires:    jpackage-utils >= 0:1.7.5-10
8c8802
BuildRequires:    jss >= 4.7.0
8c8802
BuildRequires:    tomcatjss >= 7.5.0
469e9d
BuildRequires:    systemd-units
469e9d
469e9d
%if 0%{?rhel}
e432aa
BuildRequires:    pki-servlet-engine
469e9d
%else
469e9d
BuildRequires:    tomcat >= 1:9.0.7
469e9d
%endif
469e9d
469e9d
# additional build requirements needed to build native 'tpsclient'
469e9d
# REMINDER:  Revisit these once 'tpsclient' is rewritten as a Java app
469e9d
BuildRequires:    apr-devel
469e9d
BuildRequires:    apr-util-devel
469e9d
BuildRequires:    cyrus-sasl-devel
469e9d
BuildRequires:    httpd-devel >= 2.4.2
469e9d
BuildRequires:    pcre-devel
469e9d
BuildRequires:    systemd
469e9d
BuildRequires:    zlib
469e9d
BuildRequires:    zlib-devel
469e9d
e432aa
# build dependency to build man pages
e432aa
%if 0%{?fedora} && 0%{?fedora} <= 30 || 0%{?rhel}
e432aa
BuildRequires:    go-md2man
e432aa
%else
e432aa
BuildRequires:    golang-github-cpuguy83-md2man
e432aa
%endif
e432aa
bd7cad
# pki-healthcheck depends on the following library
bd7cad
%if 0%{?rhel}
bd7cad
BuildRequires:    ipa-healthcheck-core
bd7cad
%else
bd7cad
BuildRequires:    freeipa-healthcheck-core
bd7cad
%endif
bd7cad
e432aa
# PKICertImport depends on certutil and openssl
e432aa
BuildRequires:    nss-tools
e432aa
BuildRequires:    openssl
e432aa
469e9d
# description for top-level package (if there is a separate meta package)
e432aa
%if "%{name}" != "%{vendor_id}-pki"
469e9d
%description
469e9d
e432aa
%{brand} PKI is an enterprise software system designed
469e9d
to manage enterprise Public Key Infrastructure deployments.
469e9d
469e9d
PKI consists of the following components:
469e9d
469e9d
  * Certificate Authority (CA)
469e9d
  * Key Recovery Authority (KRA)
469e9d
  * Online Certificate Status Protocol (OCSP) Manager
469e9d
  * Token Key Service (TKS)
469e9d
  * Token Processing Service (TPS)
469e9d
469e9d
%endif
469e9d
469e9d
%if %{with meta}
e432aa
%if "%{name}" != "%{vendor_id}-pki"
469e9d
################################################################################
e432aa
%package -n       %{vendor_id}-pki
469e9d
################################################################################
469e9d
e432aa
Summary:          %{brand} PKI Package
469e9d
%endif
469e9d
469e9d
# Make certain that this 'meta' package requires the latest version(s)
469e9d
# of ALL PKI theme packages
e432aa
Requires:         %{vendor_id}-pki-server-theme = %{version}
e432aa
Requires:         %{vendor_id}-pki-console-theme = %{version}
469e9d
469e9d
# Make certain that this 'meta' package requires the latest version(s)
469e9d
# of ALL PKI core packages
e432aa
Requires:         pki-ca = %{version}
e432aa
Requires:         pki-kra = %{version}
e432aa
Requires:         pki-ocsp = %{version}
e432aa
Requires:         pki-tks = %{version}
e432aa
Requires:         pki-tps = %{version}
469e9d
469e9d
# Make certain that this 'meta' package requires the latest version(s)
469e9d
# of PKI console
e432aa
Requires:         pki-console = %{version}
e432aa
Requires:         pki-javadoc = %{version}
469e9d
469e9d
# Make certain that this 'meta' package requires the latest version(s)
469e9d
# of ALL PKI clients
469e9d
Requires:         esc >= 1.1.1
469e9d
469e9d
# description for top-level package (unless there is a separate meta package)
e432aa
%if "%{name}" == "%{vendor_id}-pki"
469e9d
%description
469e9d
%else
e432aa
%description -n   %{vendor_id}-pki
469e9d
%endif
469e9d
e432aa
%{brand} PKI is an enterprise software system designed
469e9d
to manage enterprise Public Key Infrastructure deployments.
469e9d
469e9d
PKI consists of the following components:
469e9d
469e9d
  * Certificate Authority (CA)
469e9d
  * Key Recovery Authority (KRA)
469e9d
  * Online Certificate Status Protocol (OCSP) Manager
469e9d
  * Token Key Service (TKS)
469e9d
  * Token Processing Service (TPS)
469e9d
bd7cad
# with meta
bd7cad
%endif
469e9d
469e9d
%if %{with base}
469e9d
################################################################################
469e9d
%package -n       pki-symkey
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Symmetric Key Package
469e9d
8c8802
Requires:         %java_headless >= %{min_java_version}
469e9d
Requires:         jpackage-utils >= 0:1.7.5-10
8c8802
Requires:         jss >= 4.7.0
469e9d
Requires:         nss >= 3.38.0
469e9d
e432aa
# Ensure we end up with a useful installation
e432aa
Conflicts:        pki-symkey < %{version}
e432aa
Conflicts:        pki-javadoc < %{version}
e432aa
Conflicts:        pki-server-theme < %{version}
e432aa
Conflicts:        pki-console-theme < %{version}
e432aa
469e9d
%description -n   pki-symkey
469e9d
The PKI Symmetric Key Java Package supplies various native
469e9d
symmetric key operations to Java programs.
469e9d
469e9d
################################################################################
469e9d
%package -n       pki-base
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Base Package
469e9d
BuildArch:        noarch
469e9d
469e9d
Requires:         nss >= 3.36.1
bd7cad
8c8802
Requires:         python3-pki = %{version}-%{release}
8c8802
Requires(post):   python3-pki = %{version}-%{release}
469e9d
e432aa
# Ensure we end up with a useful installation
e432aa
Conflicts:        pki-symkey < %{version}
e432aa
Conflicts:        pki-javadoc < %{version}
e432aa
Conflicts:        pki-server-theme < %{version}
e432aa
Conflicts:        pki-console-theme < %{version}
e432aa
469e9d
%description -n   pki-base
469e9d
The PKI Base Package contains the common and client libraries and utilities
469e9d
written in Python.
469e9d
469e9d
################################################################################
469e9d
%package -n       python3-pki
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Python 3 Package
469e9d
BuildArch:        noarch
469e9d
469e9d
Obsoletes:        pki-base-python3 < %{version}
e432aa
Provides:         pki-base-python3 = %{version}
469e9d
%if 0%{?fedora}
469e9d
%{?python_provide:%python_provide python3-pki}
469e9d
%endif
469e9d
8c8802
Requires:         pki-base = %{version}-%{release}
bd7cad
Requires:         python3 >= 3.5
469e9d
Requires:         python3-cryptography
469e9d
Requires:         python3-lxml
469e9d
Requires:         python3-nss
469e9d
Requires:         python3-requests >= 2.6.0
469e9d
Requires:         python3-six
469e9d
469e9d
%description -n   python3-pki
469e9d
This package contains PKI client library for Python 3.
469e9d
469e9d
################################################################################
469e9d
%package -n       pki-base-java
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Base Java Package
469e9d
BuildArch:        noarch
469e9d
8c8802
Requires:         %java_headless >= %{min_java_version}
469e9d
Requires:         apache-commons-cli
469e9d
Requires:         apache-commons-codec
469e9d
Requires:         apache-commons-io
469e9d
Requires:         apache-commons-lang
469e9d
Requires:         apache-commons-logging
8c8802
Requires:         apache-commons-net
469e9d
Requires:         jakarta-commons-httpclient
469e9d
Requires:         glassfish-jaxb-api
469e9d
Requires:         slf4j
469e9d
Requires:         slf4j-jdk14
469e9d
Requires:         jpackage-utils >= 0:1.7.5-10
8c8802
Requires:         jss >= 4.7.0
8c8802
Requires:         ldapjdk >= 4.22.0
8c8802
Requires:         pki-base = %{version}-%{release}
469e9d
469e9d
%if 0%{?rhel}
469e9d
Requires:         resteasy >= 3.0.26
469e9d
%else
469e9d
Requires:         resteasy-atom-provider >= 3.0.17-1
469e9d
Requires:         resteasy-client >= 3.0.17-1
469e9d
Requires:         resteasy-jaxb-provider >= 3.0.17-1
469e9d
Requires:         resteasy-core >= 3.0.17-1
469e9d
Requires:         resteasy-jackson2-provider >= 3.0.17-1
469e9d
%endif
469e9d
8c8802
%if 0%{?fedora} && 0%{?fedora} >= 33
8c8802
Requires:         jaxb-impl >= 2.3.3
8c8802
Requires:         jakarta-activation >= 1.2.2
8c8802
%endif
8c8802
469e9d
Requires:         xalan-j2
469e9d
Requires:         xerces-j2
469e9d
Requires:         xml-commons-apis
469e9d
Requires:         xml-commons-resolver
469e9d
469e9d
%description -n   pki-base-java
469e9d
The PKI Base Java Package contains the common and client libraries and utilities
469e9d
written in Java.
469e9d
469e9d
################################################################################
469e9d
%package -n       pki-tools
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Tools Package
469e9d
469e9d
Requires:         openldap-clients
469e9d
Requires:         nss-tools >= 3.36.1
8c8802
Requires:         pki-base-java = %{version}-%{release}
bd7cad
Requires:         p11-kit-trust
e432aa
e432aa
# PKICertImport depends on certutil and openssl
e432aa
Requires:         nss-tools
e432aa
Requires:         openssl
469e9d
469e9d
%description -n   pki-tools
469e9d
This package contains PKI executables that can be used to help make
469e9d
Certificate System into a more complete and robust PKI solution.
469e9d
bd7cad
# with base
bd7cad
%endif
469e9d
469e9d
%if %{with server}
469e9d
################################################################################
469e9d
%package -n       pki-server
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Server Package
469e9d
BuildArch:        noarch
469e9d
469e9d
Requires:         hostname
469e9d
Requires:         net-tools
469e9d
469e9d
Requires:         policycoreutils
469e9d
Requires:         procps-ng
469e9d
Requires:         openldap-clients
469e9d
Requires:         openssl
8c8802
Requires:         pki-symkey = %{version}-%{release}
8c8802
Requires:         pki-tools = %{version}-%{release}
e432aa
e432aa
Requires:         keyutils
469e9d
469e9d
Requires:         policycoreutils-python-utils
469e9d
469e9d
Requires:         python3-ldap
469e9d
Requires:         python3-lxml
469e9d
Requires:         python3-libselinux
469e9d
Requires:         python3-policycoreutils
469e9d
469e9d
Requires:         selinux-policy-targeted >= 3.13.1-159
469e9d
469e9d
%if 0%{?rhel}
e432aa
Requires:         pki-servlet-engine >= 1:9.0.7
469e9d
%else
469e9d
Requires:         tomcat >= 1:9.0.7
469e9d
%endif
469e9d
469e9d
Requires:         velocity
8c8802
Requires:         sudo
8c8802
Requires:         systemd
469e9d
Requires(post):   systemd-units
469e9d
Requires(preun):  systemd-units
469e9d
Requires(postun): systemd-units
469e9d
Requires(pre):    shadow-utils
8c8802
Requires:         tomcatjss >= 7.5.0
bd7cad
bd7cad
# pki-healthcheck depends on the following library
bd7cad
%if 0%{?rhel}
bd7cad
Requires:         ipa-healthcheck-core
bd7cad
%else
bd7cad
Requires:         freeipa-healthcheck-core
469e9d
%endif
469e9d
469e9d
# https://pagure.io/freeipa/issue/7742
469e9d
%if 0%{?rhel}
469e9d
Conflicts:        ipa-server < 4.7.1
469e9d
%else
469e9d
Conflicts:        freeipa-server < 4.7.1
469e9d
%endif
469e9d
8c8802
Provides:         bundled(js-backbone) = 1.4.0
8c8802
Provides:         bundled(js-bootstrap) = 3.4.1
8c8802
Provides:         bundled(js-jquery) = 3.5.1
8c8802
Provides:         bundled(js-jquery-i18n-properties) = 1.2.7
8c8802
Provides:         bundled(js-patternfly) = 3.59.2
8c8802
Provides:         bundled(js-underscore) = 1.9.2
8c8802
469e9d
%description -n   pki-server
469e9d
The PKI Server Package contains libraries and utilities needed by the
469e9d
following PKI subsystems:
469e9d
469e9d
    the Certificate Authority (CA),
469e9d
    the Key Recovery Authority (KRA),
469e9d
    the Online Certificate Status Protocol (OCSP) Manager,
469e9d
    the Token Key Service (TKS), and
469e9d
    the Token Processing Service (TPS).
469e9d
bd7cad
# with server
bd7cad
%endif
469e9d
469e9d
%if %{with ca}
469e9d
################################################################################
469e9d
%package -n       pki-ca
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI CA Package
469e9d
BuildArch:        noarch
469e9d
8c8802
Requires:         pki-server = %{version}-%{release}
469e9d
Requires(post):   systemd-units
469e9d
Requires(preun):  systemd-units
469e9d
Requires(postun): systemd-units
469e9d
469e9d
%description -n   pki-ca
469e9d
The Certificate Authority (CA) is a required PKI subsystem which issues,
469e9d
renews, revokes, and publishes certificates as well as compiling and
469e9d
publishing Certificate Revocation Lists (CRLs).
469e9d
469e9d
The Certificate Authority can be configured as a self-signing Certificate
469e9d
Authority, where it is the root CA, or it can act as a subordinate CA,
469e9d
where it obtains its own signing certificate from a public CA.
469e9d
bd7cad
# with ca
bd7cad
%endif
469e9d
469e9d
%if %{with kra}
469e9d
################################################################################
469e9d
%package -n       pki-kra
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI KRA Package
469e9d
BuildArch:        noarch
469e9d
8c8802
Requires:         pki-server = %{version}-%{release}
469e9d
Requires(post):   systemd-units
469e9d
Requires(preun):  systemd-units
469e9d
Requires(postun): systemd-units
469e9d
469e9d
%description -n   pki-kra
469e9d
The Key Recovery Authority (KRA) is an optional PKI subsystem that can act
469e9d
as a key archival facility.  When configured in conjunction with the
469e9d
Certificate Authority (CA), the KRA stores private encryption keys as part of
469e9d
the certificate enrollment process.  The key archival mechanism is triggered
469e9d
when a user enrolls in the PKI and creates the certificate request.  Using the
469e9d
Certificate Request Message Format (CRMF) request format, a request is
469e9d
generated for the user's private encryption key.  This key is then stored in
469e9d
the KRA which is configured to store keys in an encrypted format that can only
469e9d
be decrypted by several agents requesting the key at one time, providing for
469e9d
protection of the public encryption keys for the users in the PKI deployment.
469e9d
469e9d
Note that the KRA archives encryption keys; it does NOT archive signing keys,
469e9d
since such archival would undermine non-repudiation properties of signing keys.
469e9d
bd7cad
# with kra
bd7cad
%endif
469e9d
469e9d
%if %{with ocsp}
469e9d
################################################################################
469e9d
%package -n       pki-ocsp
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI OCSP Package
469e9d
BuildArch:        noarch
469e9d
e432aa
Requires:         pki-server = %{version}
469e9d
Requires(post):   systemd-units
469e9d
Requires(preun):  systemd-units
469e9d
Requires(postun): systemd-units
469e9d
469e9d
%description -n   pki-ocsp
469e9d
The Online Certificate Status Protocol (OCSP) Manager is an optional PKI
469e9d
subsystem that can act as a stand-alone OCSP service.  The OCSP Manager
469e9d
performs the task of an online certificate validation authority by enabling
469e9d
OCSP-compliant clients to do real-time verification of certificates.  Note
469e9d
that an online certificate-validation authority is often referred to as an
469e9d
OCSP Responder.
469e9d
469e9d
Although the Certificate Authority (CA) is already configured with an
469e9d
internal OCSP service.  An external OCSP Responder is offered as a separate
469e9d
subsystem in case the user wants the OCSP service provided outside of a
469e9d
firewall while the CA resides inside of a firewall, or to take the load of
469e9d
requests off of the CA.
469e9d
469e9d
The OCSP Manager can receive Certificate Revocation Lists (CRLs) from
469e9d
multiple CA servers, and clients can query the OCSP Manager for the
469e9d
revocation status of certificates issued by all of these CA servers.
469e9d
469e9d
When an instance of OCSP Manager is set up with an instance of CA, and
469e9d
publishing is set up to this OCSP Manager, CRLs are published to it
469e9d
whenever they are issued or updated.
469e9d
bd7cad
# with ocsp
bd7cad
%endif
469e9d
469e9d
%if %{with tks}
469e9d
################################################################################
469e9d
%package -n       pki-tks
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI TKS Package
469e9d
BuildArch:        noarch
469e9d
e432aa
Requires:         pki-server = %{version}
469e9d
Requires(post):   systemd-units
469e9d
Requires(preun):  systemd-units
469e9d
Requires(postun): systemd-units
469e9d
469e9d
%description -n   pki-tks
469e9d
The Token Key Service (TKS) is an optional PKI subsystem that manages the
469e9d
master key(s) and the transport key(s) required to generate and distribute
469e9d
keys for hardware tokens.  TKS provides the security between tokens and an
469e9d
instance of Token Processing System (TPS), where the security relies upon the
469e9d
relationship between the master key and the token keys.  A TPS communicates
469e9d
with a TKS over SSL using client authentication.
469e9d
469e9d
TKS helps establish a secure channel (signed and encrypted) between the token
469e9d
and the TPS, provides proof of presence of the security token during
469e9d
enrollment, and supports key changeover when the master key changes on the
469e9d
TKS.  Tokens with older keys will get new token keys.
469e9d
469e9d
Because of the sensitivity of the data that TKS manages, TKS should be set up
469e9d
behind the firewall with restricted access.
469e9d
bd7cad
# with tks
bd7cad
%endif
469e9d
469e9d
%if %{with tps}
469e9d
################################################################################
469e9d
%package -n       pki-tps
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI TPS Package
469e9d
e432aa
Requires:         pki-server = %{version}
469e9d
Requires(post):   systemd-units
469e9d
Requires(preun):  systemd-units
469e9d
Requires(postun): systemd-units
469e9d
469e9d
# additional runtime requirements needed to run native 'tpsclient'
469e9d
# REMINDER:  Revisit these once 'tpsclient' is rewritten as a Java app
469e9d
469e9d
Requires:         nss-tools >= 3.36.1
469e9d
Requires:         openldap-clients
469e9d
469e9d
%description -n   pki-tps
469e9d
The Token Processing System (TPS) is an optional PKI subsystem that acts
469e9d
as a Registration Authority (RA) for authenticating and processing
469e9d
enrollment requests, PIN reset requests, and formatting requests from
469e9d
the Enterprise Security Client (ESC).
469e9d
469e9d
TPS is designed to communicate with tokens that conform to
469e9d
Global Platform's Open Platform Specification.
469e9d
469e9d
TPS communicates over SSL with various PKI backend subsystems (including
469e9d
the Certificate Authority (CA), the Key Recovery Authority (KRA), and the
469e9d
Token Key Service (TKS)) to fulfill the user's requests.
469e9d
469e9d
TPS also interacts with the token database, an LDAP server that stores
469e9d
information about individual tokens.
469e9d
469e9d
The utility "tpsclient" is a test tool that interacts with TPS.  This
469e9d
tool is useful to test TPS server configs without risking an actual
469e9d
smart card.
469e9d
bd7cad
# with tps
bd7cad
%endif
469e9d
469e9d
%if %{with javadoc}
469e9d
################################################################################
469e9d
%package -n       pki-javadoc
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Javadoc Package
469e9d
BuildArch:        noarch
469e9d
e432aa
# Ensure we end up with a useful installation
e432aa
Conflicts:        pki-base < %{version}
e432aa
Conflicts:        pki-symkey < %{version}
e432aa
Conflicts:        pki-server-theme < %{version}
e432aa
Conflicts:        pki-console-theme < %{version}
e432aa
469e9d
%description -n   pki-javadoc
469e9d
This package contains PKI API documentation.
469e9d
bd7cad
# with javadoc
bd7cad
%endif
469e9d
469e9d
%if %{with console}
469e9d
################################################################################
469e9d
%package -n       pki-console
469e9d
################################################################################
469e9d
469e9d
Summary:          PKI Console Package
469e9d
BuildArch:        noarch
469e9d
469e9d
BuildRequires:    idm-console-framework >= 1.2.0
469e9d
469e9d
Requires:         idm-console-framework >= 1.2.0
e432aa
Requires:         pki-base-java = %{version}
e432aa
Requires:         pki-console-theme = %{version}
469e9d
469e9d
%description -n   pki-console
469e9d
The PKI Console is a Java application used to administer PKI server.
469e9d
bd7cad
# with console
bd7cad
%endif
469e9d
469e9d
%if %{with theme}
469e9d
################################################################################
e432aa
%package -n       %{vendor_id}-pki-server-theme
469e9d
################################################################################
469e9d
e432aa
Summary:          %{brand} PKI Server Theme Package
469e9d
BuildArch:        noarch
469e9d
e432aa
Provides:         pki-server-theme = %{version}
e432aa
e432aa
# Ensure we end up with a useful installation
e432aa
Conflicts:        pki-base < %{version}
e432aa
Conflicts:        pki-symkey < %{version}
e432aa
Conflicts:        pki-console-theme < %{version}
e432aa
Conflicts:        pki-javadoc < %{version}
469e9d
e432aa
%description -n   %{vendor_id}-pki-server-theme
469e9d
This PKI Server Theme Package contains
e432aa
%{brand} textual and graphical user interface for PKI Server.
469e9d
469e9d
################################################################################
e432aa
%package -n       %{vendor_id}-pki-console-theme
469e9d
################################################################################
469e9d
e432aa
Summary:          %{brand} PKI Console Theme Package
469e9d
BuildArch:        noarch
469e9d
e432aa
Provides:         pki-console-theme = %{version}
469e9d
e432aa
# Ensure we end up with a useful installation
e432aa
Conflicts:        pki-base < %{version}
e432aa
Conflicts:        pki-symkey < %{version}
e432aa
Conflicts:        pki-server-theme < %{version}
e432aa
Conflicts:        pki-javadoc < %{version}
e432aa
e432aa
%description -n   %{vendor_id}-pki-console-theme
469e9d
This PKI Console Theme Package contains
e432aa
%{brand} textual and graphical user interface for PKI Console.
469e9d
bd7cad
# with theme
bd7cad
%endif
469e9d
8c8802
%if %{with tests}
8c8802
################################################################################
8c8802
%package -n       pki-tests
8c8802
################################################################################
8c8802
8c8802
Summary:          PKI Tests
8c8802
BuildArch:        noarch
8c8802
8c8802
%description -n   pki-tests
8c8802
This package contains PKI test suite.
8c8802
8c8802
# with tests
8c8802
%endif
8c8802
469e9d
################################################################################
469e9d
%prep
469e9d
################################################################################
469e9d
469e9d
%autosetup -n pki-%{version}%{?_phase} -p 1 -S git
469e9d
469e9d
################################################################################
469e9d
%build
469e9d
################################################################################
469e9d
8c8802
# get Java <major>.<minor> version number
8c8802
java_version=`%{java_home}/bin/java -XshowSettings:properties -version 2>&1 | sed -n 's/ *java.version *= *\([0-9]\+\.[0-9]\+\).*/\1/p'`
8c8802
8c8802
# if <major> == 1, get <minor> version number
8c8802
# otherwise get <major> version number
8c8802
java_version=`echo $java_version | sed -e 's/^1\.//' -e 's/\..*$//'`
8c8802
469e9d
# get Tomcat <major>.<minor> version number
469e9d
tomcat_version=`/usr/sbin/tomcat version | sed -n 's/Server number: *\([0-9]\+\.[0-9]\+\).*/\1/p'`
469e9d
469e9d
if [ $tomcat_version == "9.0" ]; then
469e9d
    app_server=tomcat-8.5
469e9d
else
469e9d
    app_server=tomcat-$tomcat_version
469e9d
fi
469e9d
8c8802
%if 0%{?rhel}
469e9d
%{__mkdir_p} build
469e9d
cd build
8c8802
%endif
8c8802
469e9d
%cmake \
469e9d
    --no-warn-unused-cli \
469e9d
    -DVERSION=%{version}-%{release} \
469e9d
    -DVAR_INSTALL_DIR:PATH=/var \
bd7cad
    -DP11_KIT_TRUST=/etc/alternatives/libnssckbi.so.%{_arch} \
8c8802
    -DJAVA_VERSION=%{java_version} \
8c8802
    -DJAVA_HOME=%java_home \
8c8802
    -DPKI_JAVA_PATH=%java \
469e9d
    -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \
469e9d
    -DSYSTEMD_LIB_INSTALL_DIR=%{_unitdir} \
469e9d
    -DAPP_SERVER=$app_server \
469e9d
    -DJAXRS_API_JAR=%{jaxrs_api_jar} \
469e9d
    -DRESTEASY_LIB=%{resteasy_lib} \
469e9d
    -DNSS_DEFAULT_DB_TYPE=%{nss_default_db_type} \
469e9d
    -DBUILD_PKI_CORE:BOOL=ON \
bd7cad
    -DPYTHON_EXECUTABLE=%{python_executable} \
469e9d
    -DWITH_TEST:BOOL=%{?with_test:ON}%{!?with_test:OFF} \
469e9d
%if ! %{with server} && ! %{with ca} && ! %{with kra} && ! %{with ocsp} && ! %{with tks} && ! %{with tps}
469e9d
    -DWITH_SERVER:BOOL=OFF \
469e9d
%endif
469e9d
    -DWITH_JAVADOC:BOOL=%{?with_javadoc:ON}%{!?with_javadoc:OFF} \
469e9d
    -DBUILD_PKI_CONSOLE:BOOL=%{?with_console:ON}%{!?with_console:OFF} \
e432aa
    -DTHEME=%{?with_theme:%{vendor_id}} \
8c8802
%if 0%{?rhel}
469e9d
    ..
8c8802
%else
8c8802
    -B %{_vpath_builddir}
8c8802
%endif
8c8802
8c8802
%if 0%{?fedora}
8c8802
cd %{_vpath_builddir}
8c8802
%endif
8c8802
8c8802
# Do not use _smp_mflags to preserve build order
8c8802
%{__make} \
8c8802
    VERBOSE=%{?_verbose} \
8c8802
    CMAKE_NO_VERBOSE=1 \
8c8802
    DESTDIR=%{buildroot} \
8c8802
    INSTALL="install -p" \
8c8802
    --no-print-directory \
8c8802
    all
469e9d
469e9d
################################################################################
469e9d
%install
469e9d
################################################################################
469e9d
8c8802
%if 0%{?rhel}
469e9d
cd build
8c8802
%else
8c8802
cd %{_vpath_builddir}
8c8802
%endif
469e9d
469e9d
%{__make} \
469e9d
    VERBOSE=%{?_verbose} \
469e9d
    CMAKE_NO_VERBOSE=1 \
469e9d
    DESTDIR=%{buildroot} \
469e9d
    INSTALL="install -p" \
469e9d
    --no-print-directory \
8c8802
    install
469e9d
e432aa
%if %{with_test}
e432aa
ctest --output-on-failure
e432aa
%endif
e432aa
469e9d
%if %{with meta}
469e9d
%{__mkdir_p} %{buildroot}%{_datadir}/doc/pki
469e9d
469e9d
cat > %{buildroot}%{_datadir}/doc/pki/README << EOF
469e9d
This package is a "meta-package" whose dependencies pull in all of the
e432aa
packages comprising the %{brand} Public Key Infrastructure (PKI) Suite.
469e9d
EOF
469e9d
bd7cad
# with meta
469e9d
%endif
469e9d
469e9d
# Customize client library links in /usr/share/pki/lib
bd7cad
ln -sf /usr/share/java/jboss-logging/jboss-logging.jar %{buildroot}%{_datadir}/pki/lib/jboss-logging.jar
bd7cad
ln -sf /usr/share/java/jboss-annotations-1.2-api/jboss-annotations-api_1.2_spec.jar %{buildroot}%{_datadir}/pki/lib/jboss-annotations-api_1.2_spec.jar
469e9d
469e9d
%if %{with server}
469e9d
469e9d
# Customize server common library links in /usr/share/pki/server/common/lib
bd7cad
ln -sf %{jaxrs_api_jar} %{buildroot}%{_datadir}/pki/server/common/lib/jboss-jaxrs-2.0-api.jar
bd7cad
ln -sf /usr/share/java/jboss-logging/jboss-logging.jar %{buildroot}%{_datadir}/pki/server/common/lib/jboss-logging.jar
bd7cad
ln -sf /usr/share/java/jboss-annotations-1.2-api/jboss-annotations-api_1.2_spec.jar %{buildroot}%{_datadir}/pki/server/common/lib/jboss-annotations-api_1.2_spec.jar
469e9d
bd7cad
# with server
469e9d
%endif
469e9d
469e9d
%if %{with server}
469e9d
469e9d
%pre -n pki-server
469e9d
getent group %{pki_groupname} >/dev/null || groupadd -f -g %{pki_gid} -r %{pki_groupname}
469e9d
if ! getent passwd %{pki_username} >/dev/null ; then
bd7cad
    useradd -r -u %{pki_uid} -g %{pki_groupname} -d %{pki_homedir} -s /sbin/nologin -c "Certificate System" %{pki_username}
469e9d
fi
469e9d
exit 0
469e9d
bd7cad
# with server
bd7cad
%endif
469e9d
469e9d
%if %{with base}
469e9d
469e9d
%post -n pki-base
469e9d
469e9d
if [ $1 -eq 1 ]
469e9d
then
469e9d
    # On RPM installation create system upgrade tracker
469e9d
    echo "Configuration-Version: %{version}" > %{_sysconfdir}/pki/pki.version
469e9d
469e9d
else
469e9d
    # On RPM upgrade run system upgrade
8c8802
    echo "Upgrading PKI system configuration at `/bin/date`." >> /var/log/pki/pki-upgrade-%{version}.log
8c8802
    /sbin/pki-upgrade 2>&1 | tee -a /var/log/pki/pki-upgrade-%{version}.log
8c8802
    echo >> /var/log/pki/pki-upgrade-%{version}.log
469e9d
fi
469e9d
469e9d
%postun -n pki-base
469e9d
469e9d
if [ $1 -eq 0 ]
469e9d
then
469e9d
    # On RPM uninstallation remove system upgrade tracker
469e9d
    rm -f %{_sysconfdir}/pki/pki.version
469e9d
fi
469e9d
bd7cad
# with base
bd7cad
%endif
469e9d
469e9d
%if %{with server}
469e9d
469e9d
%post -n pki-server
469e9d
## NOTE:  At this time, NO attempt has been made to update ANY PKI subsystem
469e9d
##        from EITHER 'sysVinit' OR previous 'systemd' processes to the new
469e9d
##        PKI deployment process
469e9d
469e9d
# Reload systemd daemons on upgrade only
469e9d
if [ "$1" == "2" ]
469e9d
then
469e9d
    systemctl daemon-reload
469e9d
fi
469e9d
469e9d
## preun -n pki-server
469e9d
## NOTE:  At this time, NO attempt has been made to update ANY PKI subsystem
469e9d
##        from EITHER 'sysVinit' OR previous 'systemd' processes to the new
469e9d
##        PKI deployment process
469e9d
469e9d
469e9d
## postun -n pki-server
469e9d
## NOTE:  At this time, NO attempt has been made to update ANY PKI subsystem
469e9d
##        from EITHER 'sysVinit' OR previous 'systemd' processes to the new
469e9d
##        PKI deployment process
469e9d
bd7cad
# with server
bd7cad
%endif
469e9d
469e9d
%if %{with meta}
e432aa
%if "%{name}" != "%{vendor_id}-pki"
469e9d
################################################################################
e432aa
%files -n %{vendor_id}-pki
469e9d
################################################################################
469e9d
%else
469e9d
%files
469e9d
%endif
469e9d
469e9d
%doc %{_datadir}/doc/pki/README
469e9d
bd7cad
# with meta
bd7cad
%endif
469e9d
469e9d
%if %{with base}
469e9d
################################################################################
469e9d
%files -n pki-symkey
469e9d
################################################################################
469e9d
8c8802
%license base/symkey/LICENSE
469e9d
%{_jnidir}/symkey.jar
469e9d
%{_libdir}/symkey/
469e9d
469e9d
################################################################################
469e9d
%files -n pki-base
469e9d
################################################################################
469e9d
8c8802
%license base/common/LICENSE
8c8802
%license base/common/LICENSE.LESSER
469e9d
%doc %{_datadir}/doc/pki-base/html
469e9d
%dir %{_datadir}/pki
469e9d
%{_datadir}/pki/VERSION
bd7cad
%{_datadir}/pki/pom.xml
469e9d
%dir %{_datadir}/pki/etc
469e9d
%{_datadir}/pki/etc/pki.conf
469e9d
%{_datadir}/pki/etc/logging.properties
bd7cad
%dir %{_datadir}/pki/lib
469e9d
%dir %{_datadir}/pki/scripts
469e9d
%{_datadir}/pki/scripts/config
469e9d
%{_datadir}/pki/upgrade/
469e9d
%{_datadir}/pki/key/templates
469e9d
%dir %{_sysconfdir}/pki
469e9d
%config(noreplace) %{_sysconfdir}/pki/pki.conf
469e9d
%dir %{_localstatedir}/log/pki
469e9d
%{_sbindir}/pki-upgrade
469e9d
%{_mandir}/man1/pki-python-client.1.gz
469e9d
%{_mandir}/man5/pki-logging.5.gz
469e9d
%{_mandir}/man8/pki-upgrade.8.gz
469e9d
469e9d
################################################################################
469e9d
%files -n pki-base-java
469e9d
################################################################################
469e9d
8c8802
%license base/common/LICENSE
8c8802
%license base/common/LICENSE.LESSER
469e9d
%{_datadir}/pki/examples/java/
bd7cad
%{_datadir}/pki/lib/*.jar
469e9d
%dir %{_javadir}/pki
469e9d
%{_javadir}/pki/pki-cmsutil.jar
469e9d
%{_javadir}/pki/pki-certsrv.jar
469e9d
469e9d
################################################################################
469e9d
%files -n python3-pki
469e9d
################################################################################
469e9d
8c8802
%license base/common/LICENSE
8c8802
%license base/common/LICENSE.LESSER
bd7cad
%if %{with server}
469e9d
%exclude %{python3_sitelib}/pki/server
469e9d
%endif
469e9d
%{python3_sitelib}/pki
469e9d
469e9d
################################################################################
469e9d
%files -n pki-tools
469e9d
################################################################################
469e9d
8c8802
%license base/native-tools/LICENSE
8c8802
%doc base/native-tools/doc/README
469e9d
%{_bindir}/p7tool
bd7cad
%{_bindir}/pistool
bd7cad
%{_bindir}/pki
469e9d
%{_bindir}/revoker
469e9d
%{_bindir}/setpin
469e9d
%{_bindir}/sslget
469e9d
%{_bindir}/tkstool
469e9d
%{_datadir}/pki/native-tools/
469e9d
%{_bindir}/AtoB
469e9d
%{_bindir}/AuditVerify
469e9d
%{_bindir}/BtoA
469e9d
%{_bindir}/CMCEnroll
469e9d
%{_bindir}/CMCRequest
469e9d
%{_bindir}/CMCResponse
469e9d
%{_bindir}/CMCRevoke
469e9d
%{_bindir}/CMCSharedToken
469e9d
%{_bindir}/CRMFPopClient
469e9d
%{_bindir}/DRMTool
469e9d
%{_bindir}/ExtJoiner
469e9d
%{_bindir}/GenExtKeyUsage
469e9d
%{_bindir}/GenIssuerAltNameExt
469e9d
%{_bindir}/GenSubjectAltNameExt
469e9d
%{_bindir}/HttpClient
469e9d
%{_bindir}/KRATool
469e9d
%{_bindir}/OCSPClient
469e9d
%{_bindir}/PKCS10Client
469e9d
%{_bindir}/PKCS12Export
e432aa
%{_bindir}/PKICertImport
469e9d
%{_bindir}/PrettyPrintCert
469e9d
%{_bindir}/PrettyPrintCrl
469e9d
%{_bindir}/TokenInfo
469e9d
%{_javadir}/pki/pki-tools.jar
469e9d
%{_datadir}/pki/java-tools/
bd7cad
%{_datadir}/pki/lib/p11-kit-trust.so
469e9d
%{_mandir}/man1/AtoB.1.gz
469e9d
%{_mandir}/man1/AuditVerify.1.gz
469e9d
%{_mandir}/man1/BtoA.1.gz
469e9d
%{_mandir}/man1/CMCEnroll.1.gz
469e9d
%{_mandir}/man1/CMCRequest.1.gz
469e9d
%{_mandir}/man1/CMCSharedToken.1.gz
469e9d
%{_mandir}/man1/CMCResponse.1.gz
469e9d
%{_mandir}/man1/DRMTool.1.gz
469e9d
%{_mandir}/man1/KRATool.1.gz
469e9d
%{_mandir}/man1/PrettyPrintCert.1.gz
469e9d
%{_mandir}/man1/PrettyPrintCrl.1.gz
469e9d
%{_mandir}/man1/pki.1.gz
469e9d
%{_mandir}/man1/pki-audit.1.gz
e432aa
%{_mandir}/man1/pki-ca-cert.1.gz
469e9d
%{_mandir}/man1/pki-ca-kraconnector.1.gz
469e9d
%{_mandir}/man1/pki-ca-profile.1.gz
469e9d
%{_mandir}/man1/pki-client.1.gz
469e9d
%{_mandir}/man1/pki-group.1.gz
469e9d
%{_mandir}/man1/pki-group-member.1.gz
e432aa
%{_mandir}/man1/pki-kra-key.1.gz
469e9d
%{_mandir}/man1/pki-pkcs12-cert.1.gz
469e9d
%{_mandir}/man1/pki-pkcs12-key.1.gz
469e9d
%{_mandir}/man1/pki-pkcs12.1.gz
469e9d
%{_mandir}/man1/pki-securitydomain.1.gz
469e9d
%{_mandir}/man1/pki-tps-profile.1.gz
469e9d
%{_mandir}/man1/pki-user.1.gz
469e9d
%{_mandir}/man1/pki-user-cert.1.gz
469e9d
%{_mandir}/man1/pki-user-membership.1.gz
469e9d
%{_mandir}/man1/PKCS10Client.1.gz
e432aa
%{_mandir}/man1/PKICertImport.1.gz
469e9d
bd7cad
# with base
bd7cad
%endif
469e9d
469e9d
%if %{with server}
469e9d
################################################################################
469e9d
%files -n pki-server
469e9d
################################################################################
469e9d
8c8802
%license base/common/THIRD_PARTY_LICENSES
8c8802
%license base/server/LICENSE
469e9d
%doc base/server/README
469e9d
%attr(755,-,-) %dir %{_sysconfdir}/sysconfig/pki
469e9d
%attr(755,-,-) %dir %{_sysconfdir}/sysconfig/pki/tomcat
469e9d
%{_sbindir}/pkispawn
469e9d
%{_sbindir}/pkidestroy
469e9d
%{_sbindir}/pki-server
469e9d
%{_sbindir}/pki-server-upgrade
469e9d
%{python3_sitelib}/pki/server/
bd7cad
%{_sbindir}/pki-healthcheck
bd7cad
%{python3_sitelib}/pki/server/healthcheck/
bd7cad
%{python3_sitelib}/pkihealthcheck-*.egg-info/
bd7cad
%config(noreplace) %{_sysconfdir}/pki/healthcheck.conf
469e9d
469e9d
%{_datadir}/pki/etc/tomcat.conf
469e9d
%dir %{_datadir}/pki/deployment
469e9d
%{_datadir}/pki/deployment/config/
469e9d
%{_datadir}/pki/scripts/operations
469e9d
%{_bindir}/pkidaemon
469e9d
%{_bindir}/pki-server-nuxwdog
469e9d
%dir %{_sysconfdir}/systemd/system/pki-tomcatd.target.wants
469e9d
%attr(644,-,-) %{_unitdir}/pki-tomcatd@.service
469e9d
%attr(644,-,-) %{_unitdir}/pki-tomcatd.target
469e9d
%dir %{_sysconfdir}/systemd/system/pki-tomcatd-nuxwdog.target.wants
469e9d
%attr(644,-,-) %{_unitdir}/pki-tomcatd-nuxwdog@.service
469e9d
%attr(644,-,-) %{_unitdir}/pki-tomcatd-nuxwdog.target
469e9d
%{_javadir}/pki/pki-cms.jar
469e9d
%{_javadir}/pki/pki-cmsbundle.jar
469e9d
%{_javadir}/pki/pki-tomcat.jar
469e9d
%dir %{_sharedstatedir}/pki
469e9d
%{_mandir}/man1/pkidaemon.1.gz
469e9d
%{_mandir}/man5/pki_default.cfg.5.gz
469e9d
%{_mandir}/man5/pki-server-logging.5.gz
469e9d
%{_mandir}/man8/pki-server-upgrade.8.gz
469e9d
%{_mandir}/man8/pkidestroy.8.gz
469e9d
%{_mandir}/man8/pkispawn.8.gz
469e9d
%{_mandir}/man8/pki-server.8.gz
8c8802
%{_mandir}/man8/pki-server-acme.8.gz
469e9d
%{_mandir}/man8/pki-server-instance.8.gz
469e9d
%{_mandir}/man8/pki-server-subsystem.8.gz
469e9d
%{_mandir}/man8/pki-server-nuxwdog.8.gz
469e9d
%{_mandir}/man8/pki-server-migrate.8.gz
469e9d
%{_mandir}/man8/pki-server-cert.8.gz
469e9d
%{_mandir}/man8/pki-server-ca.8.gz
469e9d
%{_mandir}/man8/pki-server-kra.8.gz
469e9d
%{_mandir}/man8/pki-server-ocsp.8.gz
469e9d
%{_mandir}/man8/pki-server-tks.8.gz
469e9d
%{_mandir}/man8/pki-server-tps.8.gz
bd7cad
%{_mandir}/man8/pki-healthcheck.8.gz
469e9d
%{_datadir}/pki/setup/
469e9d
%{_datadir}/pki/server/
bd7cad
%{_datadir}/pki/acme/
bd7cad
%{_javadir}/pki/pki-acme.jar
469e9d
bd7cad
# with server
bd7cad
%endif
469e9d
469e9d
%if %{with ca}
469e9d
################################################################################
469e9d
%files -n pki-ca
469e9d
################################################################################
469e9d
8c8802
%license base/ca/LICENSE
469e9d
%{_javadir}/pki/pki-ca.jar
469e9d
%dir %{_datadir}/pki/ca
469e9d
%{_datadir}/pki/ca/conf/
469e9d
%{_datadir}/pki/ca/emails/
bd7cad
%{_datadir}/pki/ca/profiles/
469e9d
%{_datadir}/pki/ca/setup/
469e9d
%{_datadir}/pki/ca/webapps/
469e9d
bd7cad
# with ca
bd7cad
%endif
469e9d
469e9d
%if %{with kra}
469e9d
################################################################################
469e9d
%files -n pki-kra
469e9d
################################################################################
469e9d
8c8802
%license base/kra/LICENSE
469e9d
%{_javadir}/pki/pki-kra.jar
469e9d
%dir %{_datadir}/pki/kra
469e9d
%{_datadir}/pki/kra/conf/
469e9d
%{_datadir}/pki/kra/setup/
469e9d
%{_datadir}/pki/kra/webapps/
469e9d
bd7cad
# with kra
bd7cad
%endif
469e9d
469e9d
%if %{with ocsp}
469e9d
################################################################################
469e9d
%files -n pki-ocsp
469e9d
################################################################################
469e9d
8c8802
%license base/ocsp/LICENSE
469e9d
%{_javadir}/pki/pki-ocsp.jar
469e9d
%dir %{_datadir}/pki/ocsp
469e9d
%{_datadir}/pki/ocsp/conf/
469e9d
%{_datadir}/pki/ocsp/setup/
469e9d
%{_datadir}/pki/ocsp/webapps/
469e9d
bd7cad
# with ocsp
bd7cad
%endif
469e9d
469e9d
%if %{with tks}
469e9d
################################################################################
469e9d
%files -n pki-tks
469e9d
################################################################################
469e9d
8c8802
%license base/tks/LICENSE
469e9d
%{_javadir}/pki/pki-tks.jar
469e9d
%dir %{_datadir}/pki/tks
469e9d
%{_datadir}/pki/tks/conf/
469e9d
%{_datadir}/pki/tks/setup/
469e9d
%{_datadir}/pki/tks/webapps/
469e9d
bd7cad
# with tks
bd7cad
%endif
469e9d
469e9d
%if %{with tps}
469e9d
################################################################################
469e9d
%files -n pki-tps
469e9d
################################################################################
469e9d
8c8802
%license base/tps/LICENSE
469e9d
%{_javadir}/pki/pki-tps.jar
469e9d
%dir %{_datadir}/pki/tps
469e9d
%{_datadir}/pki/tps/applets/
469e9d
%{_datadir}/pki/tps/conf/
469e9d
%{_datadir}/pki/tps/setup/
469e9d
%{_datadir}/pki/tps/webapps/
469e9d
%{_mandir}/man5/pki-tps-connector.5.gz
469e9d
%{_mandir}/man5/pki-tps-profile.5.gz
469e9d
%{_mandir}/man1/tpsclient.1.gz
469e9d
469e9d
# files for native 'tpsclient'
469e9d
# REMINDER:  Remove this comment once 'tpsclient' is rewritten as a Java app
469e9d
469e9d
%{_bindir}/tpsclient
469e9d
%{_libdir}/tps/libtps.so
469e9d
%{_libdir}/tps/libtokendb.so
469e9d
bd7cad
# with tps
bd7cad
%endif
469e9d
469e9d
%if %{with javadoc}
469e9d
################################################################################
469e9d
%files -n pki-javadoc
469e9d
################################################################################
469e9d
469e9d
%{_javadocdir}/pki-%{version}/
469e9d
bd7cad
# with javadoc
bd7cad
%endif
469e9d
469e9d
%if %{with console}
469e9d
################################################################################
469e9d
%files -n pki-console
469e9d
################################################################################
469e9d
8c8802
%license base/console/LICENSE
469e9d
%{_bindir}/pkiconsole
469e9d
%{_javadir}/pki/pki-console.jar
469e9d
bd7cad
# with console
bd7cad
%endif
469e9d
469e9d
%if %{with theme}
469e9d
################################################################################
e432aa
%files -n %{vendor_id}-pki-server-theme
469e9d
################################################################################
469e9d
8c8802
%license themes/%{vendor_id}/common-ui/LICENSE
469e9d
%dir %{_datadir}/pki
469e9d
%{_datadir}/pki/CS_SERVER_VERSION
469e9d
%{_datadir}/pki/common-ui/
469e9d
%{_datadir}/pki/server/webapps/pki/ca
469e9d
%{_datadir}/pki/server/webapps/pki/css
469e9d
%{_datadir}/pki/server/webapps/pki/esc
469e9d
%{_datadir}/pki/server/webapps/pki/fonts
469e9d
%{_datadir}/pki/server/webapps/pki/images
469e9d
%{_datadir}/pki/server/webapps/pki/kra
469e9d
%{_datadir}/pki/server/webapps/pki/ocsp
469e9d
%{_datadir}/pki/server/webapps/pki/pki.properties
469e9d
%{_datadir}/pki/server/webapps/pki/tks
469e9d
469e9d
################################################################################
e432aa
%files -n %{vendor_id}-pki-console-theme
469e9d
################################################################################
469e9d
8c8802
%license themes/%{vendor_id}/console-ui/LICENSE
469e9d
%{_javadir}/pki/pki-console-theme.jar
469e9d
bd7cad
# with theme
bd7cad
%endif
469e9d
8c8802
%if %{with tests}
8c8802
################################################################################
8c8802
%files -n pki-tests
8c8802
################################################################################
8c8802
8c8802
%{_datadir}/pki/tests/
8c8802
8c8802
# with tests
8c8802
%endif
8c8802
469e9d
################################################################################
469e9d
%changelog
8c8802
* Fri Sep 11 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.4-1
8c8802
- Rebased to PKI 10.9.4
8c8802
- Red Hat Bugzilla #1873235 - Fix SSL_ERROR_INAPPROPRIATE_FALLBACK_ALERT in pki ca-user-cert-add
8c8802
8c8802
* Thu Sep 03 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.3-1
8c8802
- Rebased to PKI 10.9.3
8c8802
- Bug #1869893 - Common certificates are missing in CS.cfg on shared PKI instance
8c8802
8c8802
* Tue Aug 18 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.2-2
8c8802
- Bug #1871064 - Replica install failing during pki-ca component configuration
8c8802
8c8802
* Tue Aug 18 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.2-1
8c8802
- Rebased to PKI 10.9.2
8c8802
8c8802
* Wed Aug 12 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.1-2
8c8802
- Bug #1857933 - CA Installation is failing with ncipher v12.30 HSM
8c8802
- Bug #1868233 - Disabling AIA and cert policy extensions in ACME examples
8c8802
8c8802
* Thu Aug 06 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.1-1
8c8802
- Rebased to PKI 10.9.1
8c8802
- Bug #1426572 - Fix Secure connection issue when server is down
8c8802
8c8802
* Fri Jul 31 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.0-1
8c8802
- Rebased to PKI 10.9.0
8c8802
8c8802
* Fri Jul 14 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.0-0.7
8c8802
- Fixed pki kra-key-generate failure
8c8802
- Fixed error handling in PKIRealm
8c8802
8c8802
* Fri Jul 10 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.0-0.6
8c8802
- Rebased to PKI 10.9.0-b4
8c8802
8c8802
* Thu Jun 25 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.0-0.4
8c8802
- Rebased to PKI 10.9.0-b2
8c8802
8c8802
* Mon Jun 22 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.0-0.3
8c8802
- Rebased to PKI 10.9.0-b1
8c8802
8c8802
* Tue May 26 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.9.0-0.1
8c8802
- Rebased to PKI 10.9.0-a1
3b22ff
bd7cad
* Tue Mar 03 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.3-1
bd7cad
- Rebased to PKI 10.8.3
bd7cad
- Bug #1809210 - TPS installation failure on HSM machine
bd7cad
- Bug #1807421 - Subordinate CA installation failed
bd7cad
- Bug #1806840 - KRA cloning with HSM failed
bd7cad
bd7cad
* Wed Feb 19 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.2-2
bd7cad
- Bug #1795215 - pkispawn interactive installation failed
bd7cad
bd7cad
* Mon Feb 17 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.2-1
bd7cad
- Rebased to PKI 10.8.2
bd7cad
- Bug #1802006 - KRA installation failed to create ECC admin cert
bd7cad
bd7cad
* Mon Feb 10 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.1-1
bd7cad
- Rebased to PKI 10.8.1
bd7cad
bd7cad
* Fri Feb 07 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.0-1
bd7cad
- Rebased to PKI 10.8.0
bd7cad
bd7cad
* Thu Jan 16 2020 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.0-0.5
bd7cad
- Rebased to PKI 10.8.0-b3
bd7cad
bd7cad
* Fri Dec 13 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.0-0.4
bd7cad
- Rebased to PKI 10.8.0-b2
bd7cad
bd7cad
* Wed Dec 11 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.0-0.3
bd7cad
- Rebased to PKI 10.8.0-b1
bd7cad
bd7cad
* Fri Nov 22 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.0-0.2
bd7cad
- Rebased to PKI 10.8.0-a2
bd7cad
bd7cad
* Thu Oct 31 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.8.0-0.1
bd7cad
- Rebased to PKI 10.8.0-a1
bd7cad
bd7cad
* Wed Aug 14 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.7.3-1
e432aa
- Rebased to PKI 10.7.3
e432aa
- Bug #1698084 - pkidestroy not working as expected
e432aa
- Bug #1468050 and Bug #1448235 - Support AES for LWCA key replication
e432aa
bd7cad
* Tue Jul 23 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.7.2-1
e432aa
- Rebased to PKI 10.7.2
e432aa
- Bug #1721340 - TPS installation failure
e432aa
- Bug #1248216 - Incorrect pkidaemon status
e432aa
- Bug #1729215 - cert-fix: detect and prevent pkidbuser being used as --agent-uid
e432aa
- Bug #1698059 - pki-core implements crypto
e432aa
bd7cad
* Thu Jun 13 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.7.1-2
e432aa
- Fixed cloning issue
e432aa
- Fixed TPS installation issue
e432aa
bd7cad
* Wed Jun 12 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.7.1-1
e432aa
- Rebased to PKI 10.7.1
e432aa
bd7cad
* Wed Apr 24 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.7.0-1
e432aa
- Rebased to PKI 10.7.0
e432aa
bd7cad
* Mon Jan 28 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.9-2
469e9d
- Bug #1652269 - Replace Nuxwdog
469e9d
bd7cad
* Mon Jan 14 2019 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.9-1
469e9d
- Rebased to PKI 10.6.9
469e9d
- Bug #1629048 - X500Name.directoryStringEncodingOrder overridden by CSR encoding
469e9d
- Bug #1652269 - Replace Nuxwdog
469e9d
- Bug #1656856 - Need Method to Include SKI in CA Signing Certificate Request
469e9d
bd7cad
* Thu Nov 29 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.8-1
469e9d
- Rebased to PKI 10.6.8
469e9d
- Bug #1602659 - Fix issues found by covscan
469e9d
- Bug #1566360 - Fix missing serial number from pki-server subsystem-cert-find
469e9d
bd7cad
* Fri Oct 26 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.7-3
469e9d
- Bug #1643101 - Fix problems due to token normalization
469e9d
bd7cad
* Tue Oct 23 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.7-2
469e9d
- Bug #1623444 - Fix Python KeyClient KeyRequestResponse parsing
469e9d
bd7cad
* Fri Oct 05 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.7-1
469e9d
- Rebased to PKI 10.6.7
469e9d
bd7cad
* Fri Aug 24 2018 Alexander Bokovoy <abokovoy@redhat.com> 10.6.6-3
469e9d
- Build on s390x
469e9d
bd7cad
* Wed Aug 22 2018 Alexander Bokovoy <abokovoy@redhat.com> 10.6.6-2
469e9d
- Use platform-python interpreter
469e9d
- Bug #1620066 - pkispawn crashes as /usr/bin/python3 does not exist
469e9d
bd7cad
* Mon Aug 13 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.6-1
469e9d
- Rebased to PKI 10.6.6
469e9d
bd7cad
* Wed Aug 08 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.5-1
469e9d
- Rebased to PKI 10.6.5
469e9d
469e9d
* Tue Aug 07 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.4-4
469e9d
- Bug #1612063 - Do not override system crypto policy (support TLS 1.3)
469e9d
bd7cad
* Wed Aug 01 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.4-3
469e9d
- Patch PKI to use Jackson 2 and avoid Jackson 1 dependency.
469e9d
  Add direct dependency on slf4j-jdk14.
469e9d
bd7cad
* Tue Jul 31 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.4-2
469e9d
- Updated Jackson and RESTEasy dependencies
469e9d
bd7cad
* Fri Jul 20 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.4-1
469e9d
- Rebased to PKI 10.6.4
469e9d
bd7cad
* Thu Jul 05 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.3-1
469e9d
- Rebased to PKI 10.6.3
469e9d
bd7cad
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> 10.6.2-4
469e9d
- Rebuilt for Python 3.7
469e9d
bd7cad
* Thu Jun 28 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.2-3
469e9d
- Fixed macro expressions
469e9d
- Bug #1566606 - pki-core: Switch to Python 3
469e9d
- Bug #1590467 - pki-core: Drop pylint dependency from RHEL 8
469e9d
bd7cad
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> 10.6.2-2
469e9d
- Rebuilt for Python 3.7
469e9d
bd7cad
* Fri Jun 15 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.2-1
469e9d
- Rebased to PKI 10.6.2
469e9d
bd7cad
* Wed May 30 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.1-3
469e9d
- Updated JSS dependency
469e9d
- Updated Tomcat dependency
469e9d
- Fixed rpmlint warnings
469e9d
bd7cad
* Fri May 04 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.1-2
469e9d
- Bug #1574711 - pki-tools cannot be installed on current Rawhide
469e9d
- Fixed rpmlint warnings
469e9d
bd7cad
* Thu May 03 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.1-1
469e9d
- Rebased to PKI 10.6.1
469e9d
- Bug #1559047 - pki-core misses a dependency to pki-symkey
469e9d
- Bug #1573094 - FreeIPA external CA installation fails
469e9d
bd7cad
* Wed Apr 11 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.0-1
469e9d
- Updated project URL and package descriptions
469e9d
- Cleaned up spec file
469e9d
- Rebased to PKI 10.6.0 final
469e9d
bd7cad
* Thu Mar 29 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.0-0.3
469e9d
- Iryna Shcherbina <ishcherb@redhat.com>: Update Python 2 dependency declarations to new packaging standards
469e9d
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
469e9d
- Rebased to PKI 10.6.0 beta2
469e9d
bd7cad
* Thu Mar 15 2018 Red Hat PKI Team <rhcs-maint@redhat.com> 10.6.0-0.2
469e9d
- Rebased to PKI 10.6.0 beta
469e9d