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

Annotation of /rpms/phpki/contribs9/phpki.spec

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


Revision 1.7 - (hide annotations) (download)
Thu Apr 2 10:29:40 2020 UTC (4 years, 1 month ago) by jcrisp
Branch: MAIN
CVS Tags: phpki-0_82-22_el6_sme
Changes since 1.6: +7 -4 lines
* Thu Apr 02 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.82-22.sme
- Add the patch file which I forgot

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

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