/[smecontribs]/rpms/phpki-ng/contribs10/phpki-ng.spec
ViewVC logotype

Annotation of /rpms/phpki-ng/contribs10/phpki-ng.spec

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


Revision 1.4 - (hide annotations) (download)
Mon Mar 8 18:01:18 2021 UTC (3 years, 8 months ago) by jcrisp
Branch: MAIN
CVS Tags: phpki-ng-0_84-4_el7_sme
Changes since 1.3: +10 -4 lines
* Mon Mar 08 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-4.sme
- Fix crl creation [SME: 11141]
- Extra notes in setup page

1 jcrisp 1.1 # $Id: phpki-ng.spec,v 1.4 2018/11/17 13:20:42 jcrisp Exp $
2     # Authority: vip-ire
3     # Name: Daniel Berteaud
4    
5     %define name phpki-ng
6     %define version 0.84
7 jcrisp 1.4 %define release 4
8 jcrisp 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: %{name}-%{version}.tar.gz
17 jcrisp 1.2 Patch1: phpki-ng-0.84-fix-for-php74-code-tidy.patch
18 jcrisp 1.3 Patch2: phpki-ng-0.84-fix-pregmatch-revoke-certs.patch
19 jcrisp 1.4 Patch3: phpki-ng-0.84-fix-crl.patch
20 jcrisp 1.1
21     BuildArch: noarch
22     BuildRoot: /var/tmp/%{name}-%{version}
23    
24     BuildRequires: e-smith-devtools
25    
26 jcrisp 1.2 Requires: e-smith-release >= 10.0
27     Requires: php74-php-fpm
28 jcrisp 1.1 Requires: openssl
29     Requires: openvpn
30     Conflicts: phpki
31     AutoReqProv: no
32    
33     %description
34     http://sourceforge.net/projects/phpki/
35     https://github.com/radicand/phpki
36 jcrisp 1.2 https://github.com/reetp/phpki
37 jcrisp 1.1 PHPki is an Open Source Web application for managing a multi-agency PKI for HIPAA compliance.
38     With it, you may create and centrally manage X.509 certificates for use with S/MIME enabled
39     e-mail clients, SSL servers, and VPN applications.
40    
41     %changelog
42 jcrisp 1.4 * Mon Mar 08 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-4.sme
43     - Fix crl creation [SME: 11141]
44     - Extra notes in setup page
45    
46 jcrisp 1.3 * Mon Mar 08 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-3.sme
47     - Fix Typo in certificate password [SME: 11435]
48     - Fix typos and preg_match issues [SME: 11436]
49 jcrisp 1.4 - Add Certificate creation notification [SME: 11437]
50     - Bit of file formatting
51 jcrisp 1.3
52 jcrisp 1.4 * Wed Mar 03 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-2.sme
53 jcrisp 1.2 - Change version to 0.84
54     - Fix undefined constant errors [SME: 11397]
55     - fix tempdir [SME: 11398]
56     - update code to be PHP 7.4+ compliant
57     - format with CodeSniff to PSR2
58    
59 jcrisp 1.1 * Wed Apr 01 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-1.sme
60 jcrisp 1.2 - Rename to php-ng 0.84 [SME: 11192]
61 jcrisp 1.1 - Fix date sorting in certificates
62    
63     * Thu Mar 19 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-9.sme
64     - Update DH to 2048
65    
66     * Mon Mar 09 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-8.sme
67     - move warning and exit to %pre
68    
69     * Sat Mar 07 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-7.sme
70     - Lots of formatting - adding quotes to items and tidying up
71     - set default md to 512
72    
73     * Wed Mar 04 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-6.sme
74     - Fix renew-cert
75     - revert DH setup so you can see progress
76    
77     * Wed Mar 04 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-5.sme
78     - Fix create cert without password
79    
80     * Wed Mar 04 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-4.sme
81     - Fix openvpn error
82    
83     * Tue Mar 03 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-3.sme
84     - more fixes
85    
86     * Sat Feb 29 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-2.sme
87     - small fixes
88    
89     * Fri Feb 28 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.83-1.sme
90     - Update to 0.83
91    
92 jcrisp 1.2 * Sat Nov 17 2018 Terry Fage <tfage@yahoo.com.au> 0.82-19.sme
93 jcrisp 1.1 - Fix preg_match warnings [SME:10622]
94    
95     * Mon Oct 8 2018 Daniel B. <daniel@firewall-services.com> 0.82-18.sme
96     - Fix potential XSS with unsafe use of PHP_SELF [SME: 10626]
97    
98     * Thu Sep 6 2018 brian r. <brianr@bjsystems.co.uk> 0.82-17.sme
99     - Replace use of ereg by preg_replace as per deprecated in php 5.3 and removed in 7.0
100     - [SME: 10622]
101    
102     * Mon Dec 12 2011 Daniel B. <daniel@firewall-services.com> 0.82-16.sme
103     - Remove php-posix dependency (not available, nor needed on SME 7.x) [SME: 6805]
104    
105     * Wed Oct 26 2011 Daniel B. <daniel@firewall-services.com> 0.82-15.sme
106     - Requires php-posix
107    
108     * Wed Jun 29 2011 Daniel B. <daniel@firewall-services.com> 0.82-14.sme
109     - Don't check issuer (everyone allowed to access /ca can manage
110     all the certificates, access to /ca is controlled by apache)
111    
112     * Tue Mar 15 2011 Daniel B. <daniel@firewall-services.com> 0.82-13.sme
113     - Replace md5 with sha1 for signing
114    
115     * Fri May 28 2010 Daniel B. <daniel@firewall-services.com> [0.82-12]
116     - Weekly update the CRL via cron so MS Crypto API will be happy
117    
118     * Thu Mar 18 2010 Daniel B. <daniel@firewall-services.com> [0.82-11]
119     - Fixe empty password with PHP 5.2 (SME 8b5)
120    
121     * Wed Aug 26 2009 Daniel B. <daniel@firewall-services.com> [0.82-10]
122     - Fixe links for CA help page
123    
124     * Mon Mar 23 2009 Daniel B. <daniel@firewall-services.com> [0.82-9]
125     - Remove links after uninstall so you can easily re-install the contrib
126     later [SME: 5091]
127    
128     * Tue Mar 03 2009 Daniel B. <daniel@firewall-services.com> [0.82-8]
129     - Add e-smith-devtools as a dependencie
130    
131     * Tue Jan 20 2009 Daniel B. <daniel@firewall-services.com> [0.82-7]
132     - Don't replace config file on upgrades
133    
134     * Wed Jan 07 2009 Daniel B. <daniel@firewall-services.com> [0.82-6]
135     - Remove the email address from the file name during upload (in search page)
136     - Remove secure.sh script
137    
138     * Tue Dec 16 2008 Daniel B. <daniel@firewall-services.com> [0.82-5]
139     - Link index.php to setup-presetup.php
140    
141     * Mon Dec 08 2008 Daniel B. <daniel@firewall-services.com> [0.82-4]
142     - Changes so certificates imported from openvpn-bridge are recognized
143     - Configure default admin user to 'admin'
144     - Create a static key for OpenVPN TLS auth (requires openvpn)
145     - Add expirey values (3 Months, 6 Months)
146     - Display or download takey.pem and dhparam1024.pem from
147     the certificate management menue
148     - Display the Root certificate in PEM format
149     - Possibility to download the CRL in PEM format
150     - Remove the email address from the file name during upload
151     - Disable download of certificate after creating a new one
152     - Remove security warning after setup
153    
154     * Fri Dec 05 2008 Daniel B. <daniel@firewall-services.com> [0.82-3]
155     - Correct extension name for email_signing certificates
156     - Remove links, and recreate them in the %post section so upgrade can be done smoothly
157    
158     * Wed Nov 26 2008 Daniel B. <daniel@firewall-services.com> [0.82-0]
159     - initial release
160     - builds from unchanged .tar.gz
161    
162     %prep
163     %setup -c -n %{name}
164 jcrisp 1.2 %patch1 -p1
165 jcrisp 1.3 %patch2 -p1
166 jcrisp 1.4 %patch3 -p1
167 jcrisp 1.1
168     %build
169     %{__mkdir_p} root/opt/phpki/html
170     %{__mkdir_p} root/opt/phpki/phpki-store
171     %{__mkdir_p} root/opt/phpki/bin
172     %{__mkdir_p} root/%{_sysconfdir}/cron.weekly/
173     %{__mv} %{name}-%{version}/gen_crl.php root/opt/phpki/bin/
174     %{__mv} %{name}-%{version}/* root/opt/phpki/html/
175    
176    
177     cat <<"HERE" > root/%{_sysconfdir}/cron.weekly/phpki_update_crl
178     #!/bin/bash
179    
180     cd /opt/phpki/bin
181 jcrisp 1.2 /usr/bin/php74 ./gen_crl.php 2>&1 > /dev/null
182 jcrisp 1.1
183     HERE
184    
185    
186     # Remove links to setup page so upgrades can be done smoothly
187     %{__rm} -f root/opt/phpki/html/index.php
188     %{__rm} -f root/opt/phpki/html/ca/index.php
189     %{__rm} -f root/opt/phpki/html/setup.php
190    
191     # This script shouldn't be here
192     %{__rm} -f root/opt/phpki/html/secure.sh
193    
194    
195     %install
196     rm -rf $RPM_BUILD_ROOT
197     (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
198     rm -f %{name}-%{version}-filelist
199     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
200     --file '/opt/phpki/html/config.php' 'attr(660,root,phpki) %config(noreplace)' \
201     --file '/opt/phpki/html/openssl.cnf' 'attr(660,root,phpki) %config(noreplace)' \
202     --file '%{_sysconfdir}/cron.weekly/phpki_update_crl' 'attr(744,root,root)' \
203     --dir '/opt/phpki/html' 'attr(770,root,phpki)' \
204     --dir '/opt/phpki/html/ca' 'attr(770,root,phpki)' \
205     --dir '/opt/phpki/phpki-store' 'attr(750,phpki,phpki)' \
206     > %{name}-%{version}-filelist
207    
208     %files -f %{name}-%{version}-filelist
209     %defattr(-,root,root)
210    
211     %clean
212     cd ..
213     rm -rf $RPM_BUILD_ROOT
214    
215     %pre
216     echo "******************************************************"
217     echo "* "
218     echo "* !!! IMPORTANT - READ THIS NOW !!! "
219     echo "* "
220     echo "******************************************************"
221     echo "* This contrib now has higher levels of encryption"
222     echo "* "
223     echo "* We cannot upgrade your existing certificates"
224     echo "* "
225     echo "* If we detect an existing certificate store"
226     echo "* we are going to move it"
227     echo "* "
228     echo "* You can then start with a new CA and certificates"
229     echo "******************************************************"
230     echo ""
231    
232     if [ -d /opt/phpki/phpki-store ] ; then
233     echo "Backing up your /opt/phpki/phpki-store"
234     RANDOM=$$
235     PHPKIDIR=$(( 1 + $RANDOM%99999 ))
236     echo "Number is $PHPKIDIR"
237     echo "moving from /opt/phpki/phpki-store to /opt/phpki/phpki-store.$PHPKIDIR"
238     mv /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR"
239     echo "Directory moved...continuing installaton"
240     else
241     echo "No directory detected...continuing installaton"
242     fi
243    
244     echo "Creating phpki user"
245    
246     if ! /usr/bin/id phpki &>/dev/null; then
247     /usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \
248     %logmsg "Unexpected error adding user \"phpki\". Abort installation."
249     fi
250    
251     %preun
252    
253    
254     %post
255     # First install, point index.php to setup.php
256     if [ $1 == 1 ]; then
257     %{__ln_s} /opt/phpki/html/setup.php-presetup /opt/phpki/html/index.php
258     %{__ln_s} /opt/phpki/html/setup.php-presetup /opt/phpki/html/setup.php
259     echo "<?php
260     header(\"Location: ./../index.php\");
261     ?>
262     " > /opt/phpki/html/ca/index.php
263     fi
264    
265    
266     %postun
267     # Remove the links to index.php after uninstall
268     if [ $1 == 0 ]; then
269     %{__rm} -f /opt/phpki/html/index.php
270     %{__rm} -f /opt/phpki/html/setup.php
271     %{__rm} -f /opt/phpki/html/ca/index.php
272     fi
273    
274     true

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