[php-voms-admin/el5] Minor fixes to post installation script
Mattias Ellert
ellert at fedoraproject.org
Fri Oct 26 09:05:26 UTC 2012
commit 7d9798ff73caacdd36281acc687c2b0ba46bdb05
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date: Fri Oct 26 11:04:57 2012 +0200
Minor fixes to post installation script
- Add missing package dependencies
php-voms-admin.spec | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/php-voms-admin.spec b/php-voms-admin.spec
index 448f273..3794f6f 100644
--- a/php-voms-admin.spec
+++ b/php-voms-admin.spec
@@ -1,7 +1,7 @@
Name: php-voms-admin
%define shortname pva
Version: 0.6.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Web based interface to control VOMS parameters written in PHP
Group: Applications/Internet
@@ -18,6 +18,8 @@ Requires: httpd
Requires: php
Requires: php-mysql
Requires: php-PHPMailer
+Requires: php-soap
+Requires: php-gd
Requires: mysql >= 5.0.0
Provides: %{shortname} = %{version}-%{release}
@@ -57,10 +59,16 @@ mkdir -p %{buildroot}%{_mandir}/man5
sed '/^ADDVOCONF=/s!=.*!=%{_sysconfdir}/%{shortname}/addvo.conf!' \
addvo > %{buildroot}%{_sbindir}/pva-addvo
chmod 755 %{buildroot}%{_sbindir}/pva-addvo
+
install -p -m 755 pva-dbschema-update %{buildroot}%{_sbindir}
-install -p -m 644 index.php VOMSACL.php VOMSAdmin.php VOMSAttributes.php \
- VOMSCompatibility.php VOMSCompatibility2.php VOMSRegistration.php rpc.php \
+install -p -m 644 index.php rpc.php \
+ VOMSACL.php \
+ VOMSAdmin.php \
+ VOMSAttributes.php \
+ VOMSCompatibility.php \
+ VOMSCompatibility2.php \
+ VOMSRegistration.php \
%{buildroot}%{_datadir}/%{shortname}
for dir in interfaces js kcaptcha lang modules pics styles wsdl ; do
@@ -94,23 +102,25 @@ install -p -m 644 pva-config.5 %{buildroot}%{_mandir}/man5/
%clean
rm -rf %{buildroot}
-%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 6
%post
+%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 6
semanage fcontext -a -t httpd_sys_rw_content_t \
"%{_localstatedir}/www/%{shortname}/mail-copies(/.*)?" 2>/dev/null || :
restorecon -R %{_localstatedir}/www/%{shortname}/mail-copies 2>/dev/null || :
+%endif
# update DB schema for served VOs
-for voconf in $( ls /etc/pva/vomses/*.conf ); do
+for voconf in $( find %{_sysconfdir}/%{shortname}/vomses -name '*.conf' ); do
eval $( php -r "require(\"$voconf\");
printf(\"DBHOST='%%s'\\nDBNAME='%%s'\\nDBUSER='%%s'\\nDBPASSWD='%%s'\\n\", \$dbhost, \$dbname, \$dbuser, \$dbpasswd);"
)
- /usr/sbin/pva-dbschema-update -h "${DBHOST}" -d "${DBNAME}" -u "${DBUSER}" -p "${DBPASSWD}"
+ %{_sbindir}/pva-dbschema-update -h "${DBHOST}" -d "${DBNAME}" -u "${DBUSER}" -p "${DBPASSWD}"
if [ $? -ne 0 ]; then
echo "Database schema update for VO specified in config file '${voconf}' finished with errors."
fi
done
+%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 6
%postun
if [ $1 -eq 0 ]; then
semanage fcontext -d -t httpd_sys_rw_content_t \
@@ -139,6 +149,10 @@ fi
%doc AUTHORS CHANGELOG LICENSE NOTES README README.transactions README.Fedora
%changelog
+* Fri Oct 26 2012 Mattias Ellert <mattias.ellert at fysast.uu.se> - 0.6.5-2
+- Minor fixes to post installation script
+- Add missing package dependencies
+
* Tue Oct 23 2012 Mattias Ellert <mattias.ellert at fysast.uu.se> - 0.6.5-1
- Update to released version 0.6.5
More information about the scm-commits
mailing list