1 |
# $Id: phpki.spec,v 1.5 2009/08/26 17:49:59 vip-ire Exp $ |
# $Id: phpki.spec,v 1.9 2011/06/29 11:11:58 vip-ire Exp $ |
2 |
# Authority: vip-ire |
# Authority: vip-ire |
3 |
# Name: Daniel Berteaud |
# Name: Daniel Berteaud |
4 |
|
|
5 |
%define name phpki |
%define name phpki |
6 |
%define version 0.82 |
%define version 0.82 |
7 |
%define release 11 |
%define release 15 |
8 |
Summary: Phpki is a simple certificate management suite |
Summary: Phpki is a simple certificate management suite |
9 |
Name: %{name} |
Name: %{name} |
10 |
Version: %{version} |
Version: %{version} |
28 |
Patch12: phpki-0.82-remove_email_from_upload_file_name.patch2 |
Patch12: phpki-0.82-remove_email_from_upload_file_name.patch2 |
29 |
Patch13: phpki-0.82-ca_help.patch |
Patch13: phpki-0.82-ca_help.patch |
30 |
Patch14: phpki-0.82-empty_pass_php_5.2.patch |
Patch14: phpki-0.82-empty_pass_php_5.2.patch |
31 |
|
Patch15: phpki-0.82-update_crl_via_cron.patch |
32 |
|
Patch16: phpki-0.82-use_sha1.patch |
33 |
|
Patch17: phpki-0.82-ca_admin_users.patch |
34 |
|
|
35 |
BuildArch: noarch |
BuildArch: noarch |
36 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
39 |
|
|
40 |
Requires: e-smith-release >= 7.0 |
Requires: e-smith-release >= 7.0 |
41 |
Requires: php |
Requires: php |
42 |
|
Requires: php-posix |
43 |
Requires: openssl |
Requires: openssl |
44 |
Requires: openvpn |
Requires: openvpn |
45 |
AutoReqProv: no |
AutoReqProv: no |
51 |
e-mail clients, SSL servers, and VPN applications. |
e-mail clients, SSL servers, and VPN applications. |
52 |
|
|
53 |
%changelog |
%changelog |
54 |
|
* Wed Oct 26 2011 Daniel B. <daniel@firewall-services.com> 0.82-15.sme |
55 |
|
- Requires php-posix |
56 |
|
|
57 |
|
* Wed Jun 29 2011 Daniel B. <daniel@firewall-services.com> 0.82-14.sme |
58 |
|
- Don't check issuer (everyone allowed to access /ca can manage |
59 |
|
all the certificates, access to /ca is controlled by apache) |
60 |
|
|
61 |
|
* Tue Mar 15 2011 Daniel B. <daniel@firewall-services.com> 0.82-13.sme |
62 |
|
- Replace md5 with sha1 for signing |
63 |
|
|
64 |
|
* Fri May 28 2010 Daniel B. <daniel@firewall-services.com> [0.82-12] |
65 |
|
- Weekly update the CRL via cron so MS Crypto API will be happy |
66 |
|
|
67 |
* Thu Mar 18 2010 Daniel B. <daniel@firewall-services.com> [0.82-11] |
* Thu Mar 18 2010 Daniel B. <daniel@firewall-services.com> [0.82-11] |
68 |
- Fixe empty password with PHP 5.2 (SME 8b5) |
- Fixe empty password with PHP 5.2 (SME 8b5) |
69 |
|
|
124 |
%patch12 -p1 |
%patch12 -p1 |
125 |
%patch13 -p1 |
%patch13 -p1 |
126 |
%patch14 -p1 |
%patch14 -p1 |
127 |
|
%patch15 -p1 |
128 |
|
%patch16 -p1 |
129 |
|
%patch17 -p1 |
130 |
|
|
131 |
%build |
%build |
|
#drop in an unchanged .tgz, if required rename directory here, eg remove version number. |
|
132 |
%{__mkdir_p} root/opt/phpki/html |
%{__mkdir_p} root/opt/phpki/html |
133 |
%{__mkdir_p} root/opt/phpki/phpki-store |
%{__mkdir_p} root/opt/phpki/phpki-store |
134 |
|
%{__mkdir_p} root/opt/phpki/bin |
135 |
|
%{__mkdir_p} root/%{_sysconfdir}/cron.weekly/ |
136 |
|
%{__mv} %{name}-%{version}/gen_crl.php root/opt/phpki/bin/ |
137 |
%{__mv} %{name}-%{version}/* root/opt/phpki/html/ |
%{__mv} %{name}-%{version}/* root/opt/phpki/html/ |
138 |
|
|
139 |
|
|
140 |
|
cat <<"HERE" > root/%{_sysconfdir}/cron.weekly/phpki_update_crl |
141 |
|
#!/bin/bash |
142 |
|
|
143 |
|
cd /opt/phpki/bin |
144 |
|
php ./gen_crl.php 2>&1 > /dev/null |
145 |
|
|
146 |
|
HERE |
147 |
|
|
148 |
|
|
149 |
# Remove links to setup page so upgrades can be done smoothly |
# Remove links to setup page so upgrades can be done smoothly |
150 |
%{__rm} -f root/opt/phpki/html/index.php |
%{__rm} -f root/opt/phpki/html/index.php |
151 |
%{__rm} -f root/opt/phpki/html/ca/index.php |
%{__rm} -f root/opt/phpki/html/ca/index.php |
162 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
163 |
--file '/opt/phpki/html/config.php' 'attr(660,root,phpki) %config(noreplace)' \ |
--file '/opt/phpki/html/config.php' 'attr(660,root,phpki) %config(noreplace)' \ |
164 |
--file '/opt/phpki/html/openssl.cnf' 'attr(660,root,phpki) %config(noreplace)' \ |
--file '/opt/phpki/html/openssl.cnf' 'attr(660,root,phpki) %config(noreplace)' \ |
165 |
|
--file '%{_sysconfdir}/cron.weekly/phpki_update_crl' 'attr(744,root,root)' \ |
166 |
--dir '/opt/phpki/html' 'attr(770,root,phpki)' \ |
--dir '/opt/phpki/html' 'attr(770,root,phpki)' \ |
167 |
--dir '/opt/phpki/html/ca' 'attr(770,root,phpki)' \ |
--dir '/opt/phpki/html/ca' 'attr(770,root,phpki)' \ |
168 |
--dir '/opt/phpki/phpki-store' 'attr(750,phpki,phpki)' \ |
--dir '/opt/phpki/phpki-store' 'attr(750,phpki,phpki)' \ |