4 |
|
|
5 |
%define name phpki-ng |
%define name phpki-ng |
6 |
%define version 0.84 |
%define version 0.84 |
7 |
%define release 2 |
%define release 13 |
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} |
15 |
#wget http://www.fooweb.com/downloads/foo-3.6.431.tar.gz |
#wget http://www.fooweb.com/downloads/foo-3.6.431.tar.gz |
16 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
17 |
Patch1: phpki-ng-0.84-fix-for-php74-code-tidy.patch |
Patch1: phpki-ng-0.84-fix-for-php74-code-tidy.patch |
18 |
|
Patch2: phpki-ng-0.84-fix-pregmatch-revoke-certs.patch |
19 |
|
Patch3: phpki-ng-0.84-fix-crl.patch |
20 |
|
Patch4: phpki-ng-0.84-fix-missing-slash-certtype-detection.patch |
21 |
|
Patch5: phpki-ng-0.84-fix-html-directory-check.patch |
22 |
|
Patch6: phpki-ng-0.84-fix-download-cert.patch |
23 |
|
Patch7: phpki-ng-0.84-fix-html-syntax-in-help.patch |
24 |
|
Patch8: phpki-ng-0.84-fix-final-redirect.patch |
25 |
|
|
26 |
|
|
27 |
BuildArch: noarch |
BuildArch: noarch |
28 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
45 |
e-mail clients, SSL servers, and VPN applications. |
e-mail clients, SSL servers, and VPN applications. |
46 |
|
|
47 |
%changelog |
%changelog |
48 |
* Wed Mar 07 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-2.sme |
* Fri Nov 18 2022 Jean-Philippe Pialasse <tests@pialasse.com> %{version}-13.sme |
49 |
|
- remove extra space in URL in search.php [SME: 12232] |
50 |
|
|
51 |
|
* Thu Sep 30 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-12.sme |
52 |
|
- Attempt to fix the final reload after CA creation [SME: 11192] |
53 |
|
|
54 |
|
* Thu Aug 05 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-11.sme |
55 |
|
- Fix html syntax error in help - Thanks Mauro De Carolis [SME: 11688] |
56 |
|
|
57 |
|
* Tue Apr 06 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-10.sme |
58 |
|
- And tidy up the copying wording. [SME: 11192] |
59 |
|
- Credit to Terry Fage for persisting with testing |
60 |
|
|
61 |
|
* Mon Apr 05 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-9.sme |
62 |
|
- Really fix the copy this time [SME: 11192] |
63 |
|
|
64 |
|
* Sat Apr 03 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-8.sme |
65 |
|
- copy phpki-store as a backup instead of move [SME: 11192] |
66 |
|
|
67 |
|
* Thu Apr 01 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-7.sme |
68 |
|
- Fix broken Download Certificate in Cert generation [SME: 11513] |
69 |
|
|
70 |
|
* Thu Mar 18 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-6.sme |
71 |
|
- Update html header info [SME: 11192] |
72 |
|
- Remove obsolete align |
73 |
|
- Remove accidentally duplicated html |
74 |
|
- Fix typo |
75 |
|
- Fix directory check |
76 |
|
- move function flush_exec to functions file |
77 |
|
|
78 |
|
* Tue Mar 09 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-5.sme |
79 |
|
- Fix missing / [SME:11435] |
80 |
|
- Update cert type detection for renew [SME: 11436] |
81 |
|
- Code formatting |
82 |
|
|
83 |
|
* Mon Mar 08 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-4.sme |
84 |
|
- Fix crl creation [SME: 11141] |
85 |
|
- Extra notes in setup page |
86 |
|
|
87 |
|
* Mon Mar 08 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-3.sme |
88 |
|
- Fix Typo in certificate password [SME: 11435] |
89 |
|
- Fix typos and preg_match issues [SME: 11436] |
90 |
|
- Add Certificate creation notification [SME: 11437] |
91 |
|
- Bit of file formatting |
92 |
|
|
93 |
|
* Wed Mar 03 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-2.sme |
94 |
- Change version to 0.84 |
- Change version to 0.84 |
95 |
- Fix undefined constant errors [SME: 11397] |
- Fix undefined constant errors [SME: 11397] |
96 |
- fix tempdir [SME: 11398] |
- fix tempdir [SME: 11398] |
203 |
%prep |
%prep |
204 |
%setup -c -n %{name} |
%setup -c -n %{name} |
205 |
%patch1 -p1 |
%patch1 -p1 |
206 |
|
%patch2 -p1 |
207 |
|
%patch3 -p1 |
208 |
|
%patch4 -p1 |
209 |
|
%patch5 -p1 |
210 |
|
%patch6 -p1 |
211 |
|
%patch7 -p1 |
212 |
|
%patch8 -p1 |
213 |
|
|
214 |
%build |
%build |
215 |
%{__mkdir_p} root/opt/phpki/html |
%{__mkdir_p} root/opt/phpki/html |
268 |
echo "* " |
echo "* " |
269 |
echo "* We cannot upgrade your existing certificates" |
echo "* We cannot upgrade your existing certificates" |
270 |
echo "* " |
echo "* " |
271 |
echo "* If we detect an existing certificate store" |
echo "* If you have existing certificates you want to use" |
272 |
echo "* we are going to move it" |
echo "* then start with a new CA, backup up, and then restore" |
273 |
|
echo "* your phpki-store directory in /opt/phpki" |
274 |
echo "* " |
echo "* " |
|
echo "* You can then start with a new CA and certificates" |
|
275 |
echo "******************************************************" |
echo "******************************************************" |
276 |
echo "" |
echo "" |
277 |
|
|
280 |
RANDOM=$$ |
RANDOM=$$ |
281 |
PHPKIDIR=$(( 1 + $RANDOM%99999 )) |
PHPKIDIR=$(( 1 + $RANDOM%99999 )) |
282 |
echo "Number is $PHPKIDIR" |
echo "Number is $PHPKIDIR" |
283 |
echo "moving from /opt/phpki/phpki-store to /opt/phpki/phpki-store.$PHPKIDIR" |
echo "Copying from /opt/phpki/phpki-store to /opt/phpki/phpki-store.$PHPKIDIR" |
284 |
mv /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR" |
/bin/cp -pr /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR" |
285 |
echo "Directory moved...continuing installaton" |
echo "Directory copied...continuing installaton" |
286 |
else |
else |
287 |
echo "No directory detected...continuing installaton" |
echo "No directory detected...continuing installaton" |
288 |
fi |
fi |
289 |
|
|
290 |
echo "Creating phpki user" |
|
291 |
|
|
292 |
if ! /usr/bin/id phpki &>/dev/null; then |
if ! /usr/bin/id phpki &>/dev/null; then |
293 |
|
echo "Creating phpki user" |
294 |
/usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \ |
/usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \ |
295 |
%logmsg "Unexpected error adding user \"phpki\". Abort installation." |
%logmsg "Unexpected error adding user \"phpki\". Abort installation." |
296 |
fi |
fi |