summaryrefslogtreecommitdiffstats
path: root/pki/specs/pki-core.spec
blob: 613115bb0d39c76dd2726e8cc2460453a15eec16 (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# (C) 2010 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK


###############################################################################
###                       P A C K A G E   H E A D E R                       ###
###############################################################################

Name:             pki-core
Version:          9.0.0
Release:          1%{?dist}
Summary:          Certificate System - PKI Core Components
URL:              http://pki.fedoraproject.org/
License:          GPLv2
Group:            System Environment/Daemons

BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:    cmake
BuildRequires:    java-devel >= 1:1.6.0
BuildRequires:    jpackage-utils
BuildRequires:    jss >= 4.2.6
BuildRequires:    tomcatjss
BuildRequires:    osutil

Source0:          http://pki.fedoraproject.org/pki/sources/%{name}/%{name}-%{version}.tar.gz

%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 }'`)

%define overview                                                       \
==================================                                     \
||  ABOUT "CERTIFICATE SYSTEM"  ||                                     \
==================================                                     \
                                                                       \
Certificate System (CS) is an enterprise software system designed      \
to manage enterprise Public Key Infrastructure (PKI) deployments.      \
                                                                       \
PKI Core contains fundamental packages required by Certificate System, \
and consists of the following components:                              \
                                                                       \
  * pki-setup                                                          \
  * pki-symkey                                                         \
  * pki-native-tools                                                   \
  * pki-util                                                           \
  * pki-util-javadoc                                                   \
  * pki-java-tools                                                     \
  * pki-java-tools-javadoc                                             \
  * pki-common                                                         \
  * pki-common-javadoc                                                 \
  * pki-selinux                                                        \
  * pki-ca                                                             \
  * pki-silent                                                         \
                                                                       \
which comprise the following PKI subsystems:                           \
                                                                       \
  * Certificate Authority (CA)                                         \
                                                                       \
For deployment purposes, Certificate System requires ONE AND ONLY ONE  \
of the following "Mutually-Exclusive" PKI Theme packages:              \
                                                                       \
  * ipa-pki-theme    (IPA deployments - Null Theme)                    \
  * dogtag-pki-theme (Dogtag Certificate System deployments)           \
  * redhat-pki-theme (Red Hat Certificate System deployments)          \
                                                                       \
%{nil}

%description %{overview}


###############################################################################
###                   S U B P A C K A G E   H E A D E R S                   ###
###############################################################################

########################
##     pki-setup      ##
########################

%package -n       pki-setup
Summary:          Certificate System - PKI Instance Creation & Removal Scripts
Group:            System Environment/Base

BuildArch:        noarch

Requires:         perl-Crypt-SSLeay
Requires:         policycoreutils
Requires:         openldap-clients

%description -n   pki-setup
PKI setup scripts are used to create and remove instances from PKI deployments.

This package is a part of the PKI Core used by the Certificate System.

%{overview}


########################
##     pki-symkey     ##
########################

%package -n       pki-symkey
Summary:          Symmetric Key JNI Package
Group:            System Environment/Libraries

Requires:         java >= 1:1.6.0
Requires:         jpackage-utils
Requires:         jss >= 4.2.6
Requires:         nss >= 3.12.3.99

Provides:         symkey = %{version}-%{release}

Obsoletes:        symkey < %{version}-%{release}

%description -n   pki-symkey
The Symmetric Key Java Native Interface (JNI) package supplies various native
symmetric key operations to Java programs.

This package is a part of the PKI Core used by the Certificate System.

%{overview}


########################
##  pki-native-tools  ##
########################

%package -n       pki-native-tools
Summary:          Certificate System - Native Tools
Group:            System Environment/Base

Requires:         openldap-clients
Requires:         nss >= 3.12.3.99
Requires:         nss-tools >= 3.12.3.99

%description -n   pki-native-tools
These platform-dependent PKI executables are used to help make
Certificate System into a more complete and robust PKI solution.

This package is a part of the PKI Core used by the Certificate System.

%{overview}


########################
##      pki-util      ##
########################

%package -n       pki-util
Summary:          Certificate System - PKI Utility Framework
Group:            System Environment/Base

BuildArch:        noarch

Requires:         java >= 1:1.6.0
Requires:         jpackage-utils
Requires:         jss >= 4.2.6
Requires:         ldapjdk

%description -n   pki-util
The PKI Utility Framework is required by the following four PKI subsystems:

    the Certificate Authority (CA),
    the Data Recovery Manager (DRM),
    the Online Certificate Status Protocol (OCSP) Manager, and
    the Token Key Service (TKS).

This package is a part of the PKI Core used by the Certificate System.

%{overview}


#%package -n       pki-util-javadoc
#Summary:          Certificate System - PKI Utility Framework Javadocs
#Group:            Documentation

#BuildArch:        noarch

#Requires:         pki-util = %{version}-%{release}

#%description -n   pki-util-javadoc
#This documentation pertains exclusively to version %{version} of
#the PKI Utility Framework.
#
#This package is a part of the PKI Core used by the Certificate System.
#


########################
##   pki-java-tools   ##
########################

%package -n       pki-java-tools
Summary:          Certificate System - PKI Java-Based Tools
Group:            System Environment/Base

BuildArch:        noarch

Requires:         java >= 1:1.6.0
Requires:         pki-native-tools = %{version}-%{release}
Requires:         pki-util = %{version}-%{release}

%description -n   pki-java-tools
These platform-independent PKI executables are used to help make
Certificate System into a more complete and robust PKI solution.

This package is a part of the PKI Core used by the Certificate System.

%{overview}


#%package -n       pki-java-tools-javadoc
#Summary:          Certificate System - PKI Java-Based Tools Javadocs
#Group:            Documentation

#BuildArch:        noarch

#Requires:         pki-java-tools = %{version}-%{release}

#%description -n   pki-java-tools-javadoc
#This documentation pertains exclusively to version %{version} of
#the PKI Java-Based Tools.
#
#This package is a part of the PKI Core used by the Certificate System.
#


########################
##     pki-common     ##
########################

%package -n       pki-common
Summary:          Certificate System - PKI Common Framework
Group:            System Environment/Base

BuildArch:        noarch

Requires:         java >= 1:1.6.0
Requires:         jss >= 4.2.6
Requires:         osutil
Requires:         pki-common-theme
Requires:         pki-java-tools = %{version}-%{release}
Requires:         pki-setup = %{version}-%{release}
Requires:         pki-symkey = %{version}-%{release}
Requires:         tomcatjss
Requires:         %{_javadir}/ldapjdk.jar
Requires:         %{_javadir}/velocity.jar
Requires:         %{_javadir}/xalan-j2.jar
Requires:         %{_javadir}/xalan-j2-serializer.jar
Requires:         %{_javadir}/xerces-j2.jar
Requires:         velocity

%description -n   pki-common
The PKI Common Framework is required by the following four PKI subsystems:

    the Certificate Authority (CA),
    the Data Recovery Manager (DRM),
    the Online Certificate Status Protocol (OCSP) Manager, and
    the Token Key Service (TKS).

This package is a part of the PKI Core used by the Certificate System.

%{overview}


#%package -n       pki-common-javadoc
#Summary:          Certificate System - PKI Common Framework Javadocs
#Group:            Documentation

#BuildArch:        noarch

#Requires:         pki-common = %{version}-%{release}

#%description -n   pki-common-javadoc
#This documentation pertains exclusively to version %{version} of
#the PKI Common Framework.
#
#This package is a part of the PKI Core used by the Certificate System.
#


########################
##    pki-selinux     ##
########################

%package -n       pki-selinux
Summary:          Certificate System - PKI Selinux Policies
Group:            System Environment/Base

BuildArch:        noarch

Requires:         policycoreutils
Requires:         selinux-policy-targeted

%description -n   pki-selinux
Selinux policies for the PKI components.

This package is a part of the PKI Core used by the Certificate System.

%{overview}


########################
##       pki-ca       ##
########################

%package -n       pki-ca
Summary:          Certificate System - Certificate Authority
Group:            System Environment/Daemons

BuildArch:        noarch

Requires:         java >= 1:1.6.0
Requires:         pki-ca-theme
Requires:         pki-common = %{version}-%{release}
Requires:         pki-selinux = %{version}-%{release}
Requires(post):   chkconfig
Requires(preun):  chkconfig
Requires(preun):  initscripts
Requires(postun): initscripts

%description -n   pki-ca
The Certificate Authority (CA) is a required PKI subsystem which issues,
renews, revokes, and publishes certificates as well as compiling and
publishing Certificate Revocation Lists (CRLs).

The Certificate Authority can be configured as a self-signing Certificate
Authority, where it is the root CA, or it can act as a subordinate CA,
where it obtains its own signing certificate from a public CA.

This package is a part of the PKI Core used by the Certificate System.

%{overview}


########################
##     pki-silent     ##
########################

%package -n       pki-silent
Summary:          Certificate System - Silent Installer
Group:            System Environment/Base

BuildArch:        noarch

Requires:         java >= 1:1.6.0
Requires:         pki-common = %{version}-%{release}

%description -n   pki-silent
The PKI Silent Installer may be used to "automatically" configure
the following PKI subsystems in a non-graphical (batch) fashion
including:

    the Certificate Authority (CA),
    the Data Recovery Manager (DRM),
    the Online Certificate Status Protocol (OCSP) Manager,
    the Registration Authority (RA),
    the Token Key Service (TKS), and/or
    the Token Processing System (TPS).

This package is a part of the PKI Core used by the Certificate System.

%{overview}


###############################################################################
###                   P A C K A G E   P R O C E S S I N G                   ###
###############################################################################

%prep


%setup -q


%clean
%{__rm} -rf %{buildroot}


%build
%{__mkdir_p} build
cd build
%cmake -DVAR_INSTALL_DIR:PATH=/var -DBUILD_CORE:BOOL=ON ..
%{__make} VERBOSE=1 %{?_smp_mflags}


###############################################################################
###                 P A C K A G E   I N S T A L L A T I O N                 ###
###############################################################################

%install
%{__rm} -rf %{buildroot}
cd build
%{__make} install DESTDIR=%{buildroot}


###############################################################################
###              S U B P A C K A G E   I N S T A L L A T I O N              ###
###############################################################################

########################
##     pki-setup      ##
########################


########################
##     pki-symkey     ##
########################

cd %{buildroot}%{_jnidir}
%{__rm} symkey.jar
%{__ln_s} %{_libdir}/symkey/symkey-%{version}.jar symkey.jar

cd %{buildroot}%{_libdir}/symkey
%{__rm} symkey.jar
%{__ln_s} symkey-%{version}.jar symkey.jar


########################
##  pki-native-tools  ##
########################


########################
##      pki-util      ##
########################


########################
##   pki-java-tools   ##
########################

#cd %{buildroot}%{_javadir}
#%{__ln_s} pkitools.jar cstools.jar
#cd %{buildroot}%{_javadir}/pki
#%{__ln_s} pkitools.jar cstools.jar
#cd %{buildroot}%{_javadir}/pki
#%{__ln_s} ../pkitools.jar cstools.jar


########################
##     pki-common     ##
########################


########################
##    pki-selinux     ##
########################


########################
##       pki-ca       ##
########################

%{__sed} -i 's/^preop.product.version=.*$/preop.product.version=%{version}/' %{buildroot}%{_datadir}/pki/ca/conf/CS.cfg
%{__sed} -i 's/^cms.version=.*$/cms.version=%{major_version}.%{minor_version}/' %{buildroot}%{_datadir}/pki/ca/conf/CS.cfg


########################
##     pki-silent     ##
########################


###############################################################################
###  P R E  &  P O S T   I N S T A L L / U N I N S T A L L   S C R I P T S  ###
###############################################################################

########################
##     pki-setup      ##
########################


########################
##     pki-symkey     ##
########################


########################
##  pki-native-tools  ##
########################


########################
##      pki-util      ##
########################


########################
##   pki-java-tools   ##
########################


########################
##     pki-common     ##
########################


########################
##    pki-selinux     ##
########################


########################
##       pki-ca       ##
########################

%pre -n pki-ca


%post -n pki-ca
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add pki-cad || :


%preun -n pki-ca
if [ $1 = 0 ] ; then
    /sbin/service pki-cad stop >/dev/null 2>&1
    /sbin/chkconfig --del pki-cad || :
fi


%postun -n pki-ca
if [ "$1" -ge "1" ] ; then
    /sbin/service pki-cad condrestart >/dev/null 2>&1 || :
fi


########################
##     pki-silent     ##
########################


###############################################################################
###   I N V E N T O R Y   O F   F I L E S   A N D   D I R E C T O R I E S   ### 
###############################################################################

########################
##     pki-setup      ##
########################

%files -n pki-setup
%defattr(-,root,root,-)
%doc base/setup/LICENSE
%{_bindir}/pkicreate
%{_bindir}/pkiremove
%dir %{_datadir}/pki
%dir %{_datadir}/pki/scripts
%{_datadir}/pki/scripts/pkicommon.pm
%dir %{_localstatedir}/lock/pki
%dir %{_localstatedir}/run/pki


########################
##     pki-symkey     ##
########################

%files -n pki-symkey
%defattr(-,root,root,-)
%doc base/symkey/LICENSE
%{_jnidir}/symkey.jar
%dir %{_libdir}/symkey
%{_libdir}/symkey/*


########################
##  pki-native-tools  ##
########################

%files -n pki-native-tools
%defattr(-,root,root,-)
%doc base/native-tools/LICENSE base/native-tools/doc/README
%{_bindir}/bulkissuance
%{_bindir}/p7tool
%{_bindir}/revoker
%{_bindir}/setpin
%{_bindir}/sslget
%{_bindir}/tkstool
%dir %{_datadir}/pki/native-tools
%{_datadir}/pki/native-tools/*


########################
##      pki-util      ##
########################

%files -n pki-util
%defattr(-,root,root,-)
%doc base/util/LICENSE
%dir %{_javadir}/pki
%{_javadir}/pki/cmsutil-%{version}.jar
%{_javadir}/pki/cmsutil.jar
%{_javadir}/pki/nsutil-%{version}.jar
%{_javadir}/pki/nsutil.jar

#%files -n pki-util-javadoc
#%defattr(-,root,root,-)
#%dir %{_javadocdir}/pki-util-%{version}
#%{_javadocdir}/pki-util-%{version}/*


########################
##   pki-java-tools   ##
########################

%files -n pki-java-tools
%defattr(-,root,root,-)
%doc base/java-tools/LICENSE
%{_bindir}/AtoB
%{_bindir}/AuditVerify
%{_bindir}/BtoA
%{_bindir}/CMCEnroll
%{_bindir}/CMCRequest
%{_bindir}/CMCResponse
%{_bindir}/CMCRevoke
%{_bindir}/CRMFPopClient
%{_bindir}/ExtJoiner
%{_bindir}/GenExtKeyUsage
%{_bindir}/GenIssuerAltNameExt
%{_bindir}/GenSubjectAltNameExt
%{_bindir}/HttpClient
%{_bindir}/OCSPClient
%{_bindir}/PKCS10Client
%{_bindir}/PKCS12Export
%{_bindir}/PrettyPrintCert
%{_bindir}/PrettyPrintCrl
%{_bindir}/TokenInfo
%{_javadir}/pkitools-%{version}.jar
%{_javadir}/pkitools.jar
#%{_javadir}/cstools.jar
#%{_javadir}/pki/pkitools-%{version}.jar
#%{_javadir}/pki/pkitools.jar
#%{_javadir}/pki/cstools.jar

#%files -n pki-java-tools-javadoc
#%defattr(-,root,root,-)
#%dir %{_javadocdir}/pki-java-tools-%{version}
#%{_javadocdir}/pki-java-tools-%{version}/*


########################
##     pki-common     ##
########################

%files -n pki-common
%defattr(-,root,root,-)
%doc base/common/LICENSE
%{_javadir}/pki/certsrv-%{version}.jar
%{_javadir}/pki/certsrv.jar
%{_javadir}/pki/cms-%{version}.jar
%{_javadir}/pki/cms.jar
%{_javadir}/pki/cmsbundle-%{version}.jar
%{_javadir}/pki/cmsbundle.jar
%{_javadir}/pki/cmscore-%{version}.jar
%{_javadir}/pki/cmscore.jar
%{_datadir}/pki/scripts/functions
%{_datadir}/pki/scripts/pki_apache_initscript
%dir %{_datadir}/pki/setup
%{_datadir}/pki/setup/CertServer.directory
%{_datadir}/pki/setup/menu.xml
%{_datadir}/pki/setup/web-app_2_3.dtd

#%files -n pki-common-javadoc
#%defattr(-,root,root,-)
#%dir %{_javadocdir}/pki-common-%{version}
#%{_javadocdir}/pki-common-%{version}/*


########################
##    pki-selinux     ##
########################

%files -n pki-selinux
%defattr(-,root,root,-)
%doc base/selinux/LICENSE
%{_datadir}/selinux/modules/pki.pp


########################
##       pki-ca       ##
########################

%files -n pki-ca
%defattr(-,root,root,-)
%doc base/ca/LICENSE
%{_initrddir}/pki-cad
%{_javadir}/ca-%{version}.jar
%{_javadir}/ca.jar
#%{_javadir}/pki/ca-%{version}.jar
#%{_javadir}/pki/ca/ca.jar
%dir %{_datadir}/pki/ca
%dir %{_datadir}/pki/ca/acl
%{_datadir}/pki/ca/acl/*
%dir %{_datadir}/pki/ca/conf
%{_datadir}/pki/ca/conf/*
%dir %{_datadir}/pki/ca/emails
%{_datadir}/pki/ca/emails/*
%dir %{_datadir}/pki/ca/profiles
%dir %{_datadir}/pki/ca/profiles/ca
%{_datadir}/pki/ca/profiles/ca/*
%dir %{_datadir}/pki/ca/webapps
%{_datadir}/pki/ca/webapps/*
%dir %{_datadir}/pki/ca/setup
%{_datadir}/pki/ca/setup/*
%dir %{_localstatedir}/lock/pki/ca
%dir %{_localstatedir}/run/pki/ca


########################
##     pki-silent     ##
########################

%files -n pki-silent
%defattr(-,root,root,-)
%doc base/silent/LICENSE
%{_bindir}/pkisilent
%{_javadir}/silent-%{version}.jar
%{_javadir}/silent.jar
#%{_javadir}/pki/silent-%{version}.jar
#%{_javadir}/pki/silent.jar
%dir %{_datadir}/pki/silent
%{_datadir}/pki/silent/*


###############################################################################
###                            C H A N G E L O G                            ###
###############################################################################

%changelog
* Wed Dec 1 2010 Matthew Harmsen <mharmsen@redhat.com> 9.0.0-1
- Initial revision. (kwright@redhat.com & mharmsen@redhat.com)