blob: 3cda14a8c422eb224e05ef9d022312db2b2390a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
Name: pki-tks
Version: 1.3.0
Release: 1%{?dist}
Summary: Dogtag Certificate System - Token Key Service
URL: http://pki.fedoraproject.org/
License: GPLv2 with exceptions
Group: System Environment/Daemons
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ant
BuildRequires: dogtag-pki-tks-ui
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: jss >= 4.2.6
BuildRequires: pki-common
BuildRequires: pki-util
BuildRequires: tomcatjss
Requires: java >= 1:1.6.0
Requires: pki-tks-ui
Requires: pki-common
Requires: pki-selinux
Source0: http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz
%description
Dogtag Certificate System is an enterprise software system designed
to manage enterprise Public Key Infrastructure (PKI) deployments.
The Dogtag Token Key Service is an optional PKI subsystem that
manages the master key(s) and the transport key(s) required to generate and
distribute keys for hardware tokens. Dogtag Token Key Service provides
the security between tokens and an instance of Dogtag Token Processing System,
where the security relies upon the relationship between the master key
and the token keys. A Dogtag Token Processing System communicates with a
Dogtag Token Key Service over SSL using client authentication.
Dogtag Token Key Service helps establish a secure channel (signed and
encrypted) between the token and the Dogtag Token Processing System,
provides proof of presence of the security token during enrollment, and
supports key changeover when the master key changes on the
Dogtag Token Key Service. Tokens with older keys will get new token keys.
Because of the sensitivity of the data that Dogtag Token Key Service manages,
Dogtag Token Key Service should be set up behind the firewall with
restricted access.
%prep
%setup -q
%build
ant \
-Dproduct.ui.flavor.prefix="" \
-Dproduct.prefix="pki" \
-Dproduct="tks" \
-Dversion="%{version}"
%install
%define major_version %(echo `echo %{version} | awk -F. '{ print $1 }'`)
%define minor_version %(echo `echo %{version} | awk -F. '{ print $2 }'`)
%define patch_version %(echo `echo %{version} | awk -F. '{ print $3 }'`)
rm -rf %{buildroot}
cd dist/binary
unzip %{name}-%{version}.zip -d %{buildroot}
sed -i 's/^preop.product.version=.*$/preop.product.version=%{version}/' %{buildroot}%{_datadir}/pki/tks/conf/CS.cfg
sed -i 's/^cms.version=.*$/cms.version=%{major_version}.%{minor_version}/' %{buildroot}%{_datadir}/pki/tks/conf/CS.cfg
cd %{buildroot}%{_datadir}/java/pki/tks
mv tks.jar tks-%{version}.jar
ln -s tks-%{version}.jar tks.jar
%clean
rm -rf %{buildroot}
%pre
if [ `grep -c pkiuser /etc/group` -eq 0 ] ; then
echo "Adding default PKI group \"pkiuser\" to /etc/group."
groupadd pkiuser
fi
if [ `grep -c pkiuser /etc/passwd` -eq 0 ] ; then
echo "Adding default PKI user \"pkiuser\" to /etc/passwd."
useradd -g pkiuser -d %{_datadir}/pki -s /sbin/nologin -c "Dogtag Certificate System" -m pkiuser
fi
%post
%{_datadir}/pki/tks/setup/postinstall pki tks %{version} %{release}
echo ""
echo "Install finished."
%preun
if [ -d /var/lib/pki-tks ] ; then
echo "WARNING: The default instance \"/var/lib/pki-tks\" was NOT removed!"
echo ""
echo "NOTE: This means that the data in the default instance called"
echo " \"/var/lib/pki-tks\" will NOT be overwritten once the"
echo " \"%{name}\" package is re-installed."
echo ""
echo "Shutting down the default instance \"/var/lib/pki-tks\""
echo "PRIOR to uninstalling the \"%{name}\" package:"
echo ""
/etc/init.d/pki-tks stop
fi
%files
%defattr(-,root,root,-)
%doc LICENSE
%{_datadir}/java/pki/tks/*
%{_datadir}/pki/tks/*
%changelog
* Fri Oct 16 2009 Ade Lee <alee@redhat.com> 1.3.0-1
- Bugzilla Bug #X - Packaging for Fedora Dogtag
|