/[smecontribs]/rpms/phpki/contribs9/phpki.spec
ViewVC logotype

Contents of /rpms/phpki/contribs9/phpki.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Sat Nov 17 13:20:42 2018 UTC (5 years, 6 months ago) by jcrisp
Branch: MAIN
CVS Tags: phpki-0_82-19_el6_sme
Changes since 1.3: +8 -2 lines
* Sat Nov 17 2018 Terry Fage <tfage@yahoo.com.au> 0.82-19.sme
- Fix preg_match warnings [SME:10622]

1 # $Id: phpki.spec,v 1.3 2018/10/08 07:35:31 dani Exp $
2 # Authority: vip-ire
3 # Name: Daniel Berteaud
4
5 %define name phpki
6 %define version 0.82
7 %define release 19
8 Summary: Phpki is a simple certificate management suite
9 Name: %{name}
10 Version: %{version}
11 Release: %{release}%{?dist}
12 License: GNU GPL version 2
13 URL: http://sourceforge.net/projects/phpki/
14 Group: SMEserver/addon
15 #wget http://www.fooweb.com/downloads/foo-3.6.431.tar.gz
16 Source: phpki-0.82.tar.gz
17 Patch1: phpki-0.82-email_signing.patch
18 Patch2: phpki-0.82-sme_openvpn_bridge_compat.patch
19 Patch3: phpki-0.82-sme_admin_user.patch
20 Patch4: phpki-0.82-openvpn_static_key.patch
21 Patch5: phpki-0.82-expirey.patch
22 Patch6: phpki-0.82-dl_display_ta_dh.patch
23 Patch7: phpki-0.82-dl_crl_in_pem.patch
24 Patch8: phpki-0.82-remove_email_from_upload_file_name.patch
25 Patch9: phpki-0.82-display_root_pem.patch
26 Patch10: phpki-0.82-disable_download_after_create.patch
27 Patch11: phpki-0.82-remove_security_warning.patch
28 Patch12: phpki-0.82-remove_email_from_upload_file_name.patch2
29 Patch13: phpki-0.82-ca_help.patch
30 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 Patch18: phpki-0.82.bz10622.fixphpwarnings.patch
35 Patch19: phpki-0.82-potential_xss_php_self.patch
36 Patch20: phpki-0.82-fix-preg_match.patch
37
38 BuildArch: noarch
39 BuildRoot: /var/tmp/%{name}-%{version}
40
41 BuildRequires: e-smith-devtools
42
43 Requires: e-smith-release >= 7.0
44 Requires: php
45 Requires: openssl
46 Requires: openvpn
47 AutoReqProv: no
48
49 %description
50 http://sourceforge.net/projects/phpki/
51 PHPki is an Open Source Web application for managing a multi-agency PKI for HIPAA compliance.
52 With it, you may create and centrally manage X.509 certificates for use with S/MIME enabled
53 e-mail clients, SSL servers, and VPN applications.
54
55 %changelog
56 * Sat Nov 17 2018 Terry Fage <tfage@yahoo.com.au> 0.82-19.sme
57 - Fix preg_match warnings [SME:10622]
58
59 * Mon Oct 8 2018 Daniel B. <daniel@firewall-services.com> 0.82-18.sme
60 - Fix potential XSS with unsafe use of PHP_SELF [SME: 10626]
61
62 * Thu Sep 6 2018 brian r. <brianr@bjsystems.co.uk> 0.82-17.sme
63 - Replace use of ereg by preg_replace as per deprecated in php 5.3 and removed in 7.0
64 - [SME: 10622]
65
66 * Mon Dec 12 2011 Daniel B. <daniel@firewall-services.com> 0.82-16.sme
67 - Remove php-posix dependency (not available, nor needed on SME 7.x) [SME: 6805]
68
69 * Wed Oct 26 2011 Daniel B. <daniel@firewall-services.com> 0.82-15.sme
70 - Requires php-posix
71
72 * Wed Jun 29 2011 Daniel B. <daniel@firewall-services.com> 0.82-14.sme
73 - Don't check issuer (everyone allowed to access /ca can manage
74 all the certificates, access to /ca is controlled by apache)
75
76 * Tue Mar 15 2011 Daniel B. <daniel@firewall-services.com> 0.82-13.sme
77 - Replace md5 with sha1 for signing
78
79 * Fri May 28 2010 Daniel B. <daniel@firewall-services.com> [0.82-12]
80 - Weekly update the CRL via cron so MS Crypto API will be happy
81
82 * Thu Mar 18 2010 Daniel B. <daniel@firewall-services.com> [0.82-11]
83 - Fixe empty password with PHP 5.2 (SME 8b5)
84
85 * Wed Aug 26 2009 Daniel B. <daniel@firewall-services.com> [0.82-10]
86 - Fixe links for CA help page
87
88 * Mon Mar 23 2009 Daniel B. <daniel@firewall-services.com> [0.82-9]
89 - Remove links after uninstall so you can easily re-install the contrib
90 later [SME: 5091]
91
92 * Tue Mar 03 2009 Daniel B. <daniel@firewall-services.com> [0.82-8]
93 - Add e-smith-devtools as a dependencie
94
95 * Tue Jan 20 2009 Daniel B. <daniel@firewall-services.com> [0.82-7]
96 - Don't replace config file on upgrades
97
98 * Wed Jan 07 2009 Daniel B. <daniel@firewall-services.com> [0.82-6]
99 - Remove the email address from the file name during upload (in search page)
100 - Remove secure.sh script
101
102 * Tue Dec 16 2008 Daniel B. <daniel@firewall-services.com> [0.82-5]
103 - Link index.php to setup-presetup.php
104
105 * Mon Dec 08 2008 Daniel B. <daniel@firewall-services.com> [0.82-4]
106 - Changes so certificates imported from openvpn-bridge are recognized
107 - Configure default admin user to 'admin'
108 - Create a static key for OpenVPN TLS auth (requires openvpn)
109 - Add expirey values (3 Months, 6 Months)
110 - Display or download takey.pem and dhparam1024.pem from
111 the certificate management menue
112 - Display the Root certificate in PEM format
113 - Possibility to download the CRL in PEM format
114 - Remove the email address from the file name during upload
115 - Disable download of certificate after creating a new one
116 - Remove security warning after setup
117
118 * Wed Dec 05 2008 Daniel B. <daniel@firewall-services.com> [0.82-3]
119 - Correct extension name for email_signing certificates
120 - Remove links, and recreate them in the %post section so upgrade can be done smoothly
121
122 * Wed Nov 26 2008 Daniel B. <daniel@firewall-services.com> [0.82-0]
123 - initial release
124 - builds from unchanged .tar.gz
125
126 %prep
127 %setup -c -n %{name}
128 %patch1 -p1
129 %patch2 -p1
130 %patch3 -p1
131 %patch4 -p1
132 %patch5 -p1
133 %patch6 -p1
134 %patch7 -p1
135 %patch8 -p1
136 %patch9 -p1
137 %patch10 -p1
138 %patch11 -p1
139 %patch12 -p1
140 %patch13 -p1
141 %patch14 -p1
142 %patch15 -p1
143 %patch16 -p1
144 %patch17 -p1
145 %patch18 -p1
146 %patch19 -p1
147 %patch20 -p1
148
149 %build
150 %{__mkdir_p} root/opt/phpki/html
151 %{__mkdir_p} root/opt/phpki/phpki-store
152 %{__mkdir_p} root/opt/phpki/bin
153 %{__mkdir_p} root/%{_sysconfdir}/cron.weekly/
154 %{__mv} %{name}-%{version}/gen_crl.php root/opt/phpki/bin/
155 %{__mv} %{name}-%{version}/* root/opt/phpki/html/
156
157
158 cat <<"HERE" > root/%{_sysconfdir}/cron.weekly/phpki_update_crl
159 #!/bin/bash
160
161 cd /opt/phpki/bin
162 php ./gen_crl.php 2>&1 > /dev/null
163
164 HERE
165
166
167 # Remove links to setup page so upgrades can be done smoothly
168 %{__rm} -f root/opt/phpki/html/index.php
169 %{__rm} -f root/opt/phpki/html/ca/index.php
170 %{__rm} -f root/opt/phpki/html/setup.php
171
172 # This script shouldn't be here
173 %{__rm} -f root/opt/phpki/html/secure.sh
174
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
179 rm -f %{name}-%{version}-filelist
180 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
181 --file '/opt/phpki/html/config.php' 'attr(660,root,phpki) %config(noreplace)' \
182 --file '/opt/phpki/html/openssl.cnf' 'attr(660,root,phpki) %config(noreplace)' \
183 --file '%{_sysconfdir}/cron.weekly/phpki_update_crl' 'attr(744,root,root)' \
184 --dir '/opt/phpki/html' 'attr(770,root,phpki)' \
185 --dir '/opt/phpki/html/ca' 'attr(770,root,phpki)' \
186 --dir '/opt/phpki/phpki-store' 'attr(750,phpki,phpki)' \
187 > %{name}-%{version}-filelist
188
189 %files -f %{name}-%{version}-filelist
190 %defattr(-,root,root)
191
192 %clean
193 cd ..
194 rm -rf $RPM_BUILD_ROOT
195
196 %pre
197 if ! /usr/bin/id phpki &>/dev/null; then
198 /usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \
199 %logmsg "Unexpected error adding user \"phpki\". Abort installation."
200 fi
201
202 %preun
203
204 %post
205 # First install, point index.php to setup.php
206 if [ $1 == 1 ]; then
207 %{__ln_s} /opt/phpki/html/setup.php-presetup /opt/phpki/html/index.php
208 %{__ln_s} /opt/phpki/html/setup.php-presetup /opt/phpki/html/setup.php
209 echo "<?php
210 header(\"Location: ./../index.php\");
211 ?>
212 " > /opt/phpki/html/ca/index.php
213 fi
214
215 %postun
216 # Remove the links to index.php after uninstall
217 if [ $1 == 0 ]; then
218 %{__rm} -f /opt/phpki/html/index.php
219 %{__rm} -f /opt/phpki/html/setup.php
220 %{__rm} -f /opt/phpki/html/ca/index.php
221 fi
222
223
224 true

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed