PKI Version Number in Fedora#

In Fedora the version number is defined in pki.spec:

Version:          10.6.7
Release:          1%{?_timestamp}%{?_commit_id}%{?dist}

The version number and release number are passed to CMake with the following parameter:

%build

%cmake \
    ...
    -DVERSION=%{version}-%{release} \
    ...

After installation, the package version number will be stored in /usr/share/pki/VERSION:

Specification-Version: ${APPLICATION_VERSION}
Implementation-Version: ${VERSION}

The configuration version number will be stored in /etc/pki/pki.version during installation:

%post -n pki-base

if [ $1 -eq 1 ]
then
    echo "Configuration-Version: %{version}" > %{_sysconfdir}/pki/pki.version
else
    /sbin/pki-upgrade --silent >> /var/log/pki/pki-upgrade-%{version}.log 2>&1
fi

PKI Version Number in CMake Scripts#

The version number is initialized with this code:

if (NOT DEFINED VERSION)
    set(VERSION "10.0.0")
endif(NOT DEFINED VERSION)

The version number is parsed into major, minor, and patch versions.

string(REGEX REPLACE "^([0-9]+).*" "\\1" APPLICATION_VERSION_MAJOR ${VERSION})
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" APPLICATION_VERSION_MINOR ${VERSION})
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" APPLICATION_VERSION_PATCH ${VERSION})

The version number (without the release number) is reconstructed with the following code:

set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")

PKI Version Number in JAR Files#

In JAR files the version number is stored in META-INF/MANIFEST.MF:

Specification-Version: ${APPLICATION_VERSION}
Implementation-Version: ${VERSION}

PKI Version Number in Python#

In conf.py:

version = '@APPLICATION_VERSION@'
release = '@APPLICATION_VERSION@'

PKI Version Number in System Configuration#

In /etc/pki/pki.version:

Configuration-Version: %{version}"

PKI Version Number in Server Configuration#

In /var/lib/pki//conf/tomcat.conf:

PKI_VERSION=[APPLICATION_VERSION]

PKI Version Number in Subsystem Configuration#

In CS.cfg:

cms.product.version=@APPLICATION_VERSION@
cms.version=@APPLICATION_VERSION_MAJOR@.@APPLICATION_VERSION_MINOR@

References#