4 |
|
|
5 |
%define name phpki-ng |
%define name phpki-ng |
6 |
%define version 0.84 |
%define version 0.84 |
7 |
%define release 6 |
%define release 11 |
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} |
19 |
Patch3: phpki-ng-0.84-fix-crl.patch |
Patch3: phpki-ng-0.84-fix-crl.patch |
20 |
Patch4: phpki-ng-0.84-fix-missing-slash-certtype-detection.patch |
Patch4: phpki-ng-0.84-fix-missing-slash-certtype-detection.patch |
21 |
Patch5: phpki-ng-0.84-fix-html-directory-check.patch |
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 |
|
|
25 |
BuildArch: noarch |
BuildArch: noarch |
26 |
BuildRoot: /var/tmp/%{name}-%{version} |
BuildRoot: /var/tmp/%{name}-%{version} |
43 |
e-mail clients, SSL servers, and VPN applications. |
e-mail clients, SSL servers, and VPN applications. |
44 |
|
|
45 |
%changelog |
%changelog |
46 |
|
* Thu Aug 05 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-11.sme |
47 |
|
- Fix html syntax error in help - Thanks Mauro De Carolis [SME: 11688] |
48 |
|
|
49 |
|
* Tue Apr 06 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-10.sme |
50 |
|
- And tidy up the copying wording. [SME: 11192] |
51 |
|
- Credit to Terry Fage for persisting with testing |
52 |
|
|
53 |
|
* Mon Apr 05 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-9.sme |
54 |
|
- Really fix the copy this time [SME: 11192] |
55 |
|
|
56 |
|
* Sat Apr 03 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-8.sme |
57 |
|
- copy phpki-store as a backup instead of move [SME: 11192] |
58 |
|
|
59 |
|
* Thu Apr 01 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-7.sme |
60 |
|
- Fix broken Download Certificate in Cert generation [SME: 11513] |
61 |
|
|
62 |
* Thu Mar 18 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-6.sme |
* Thu Mar 18 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-6.sme |
63 |
- Update html header info |
- Update html header info [SME: 11192] |
64 |
- Remove obsolete align |
- Remove obsolete align |
65 |
- Remove accidentally duplicated html |
- Remove accidentally duplicated html |
66 |
- Fix typo |
- Fix typo |
199 |
%patch3 -p1 |
%patch3 -p1 |
200 |
%patch4 -p1 |
%patch4 -p1 |
201 |
%patch5 -p1 |
%patch5 -p1 |
202 |
|
%patch6 -p1 |
203 |
|
%patch7 -p1 |
204 |
|
|
205 |
%build |
%build |
206 |
%{__mkdir_p} root/opt/phpki/html |
%{__mkdir_p} root/opt/phpki/html |
259 |
echo "* " |
echo "* " |
260 |
echo "* We cannot upgrade your existing certificates" |
echo "* We cannot upgrade your existing certificates" |
261 |
echo "* " |
echo "* " |
262 |
echo "* If we detect an existing certificate store" |
echo "* If you have existing certificates you want to use" |
263 |
echo "* we are going to move it" |
echo "* then start with a new CA, backup up, and then restore" |
264 |
|
echo "* your phpki-store directory in /opt/phpki" |
265 |
echo "* " |
echo "* " |
|
echo "* You can then start with a new CA and certificates" |
|
266 |
echo "******************************************************" |
echo "******************************************************" |
267 |
echo "" |
echo "" |
268 |
|
|
271 |
RANDOM=$$ |
RANDOM=$$ |
272 |
PHPKIDIR=$(( 1 + $RANDOM%99999 )) |
PHPKIDIR=$(( 1 + $RANDOM%99999 )) |
273 |
echo "Number is $PHPKIDIR" |
echo "Number is $PHPKIDIR" |
274 |
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" |
275 |
mv /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR" |
/bin/cp -pr /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR" |
276 |
echo "Directory moved...continuing installaton" |
echo "Directory copied...continuing installaton" |
277 |
else |
else |
278 |
echo "No directory detected...continuing installaton" |
echo "No directory detected...continuing installaton" |
279 |
fi |
fi |
280 |
|
|
281 |
echo "Creating phpki user" |
|
282 |
|
|
283 |
if ! /usr/bin/id phpki &>/dev/null; then |
if ! /usr/bin/id phpki &>/dev/null; then |
284 |
|
echo "Creating phpki user" |
285 |
/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 || \ |
286 |
%logmsg "Unexpected error adding user \"phpki\". Abort installation." |
%logmsg "Unexpected error adding user \"phpki\". Abort installation." |
287 |
fi |
fi |