[php-voms-admin/el5: 3/3] Update to released version 0.6.5

Mattias Ellert ellert at fedoraproject.org
Wed Oct 24 07:11:12 UTC 2012


commit c6a67310f25c7379364169534a3232fec97dc78b
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Wed Oct 24 09:09:33 2012 +0200

    Update to released version 0.6.5

 .gitignore          |    2 +-
 php-voms-admin.spec |   47 +++++++++++++++++++++++++++++++++--------------
 sources             |    2 +-
 3 files changed, 35 insertions(+), 16 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e0da2af..f6a3a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/php-voms-admin-0.6.tar.gz
+/*.tar.gz
diff --git a/php-voms-admin.spec b/php-voms-admin.spec
index eeec2be..448f273 100644
--- a/php-voms-admin.spec
+++ b/php-voms-admin.spec
@@ -1,15 +1,15 @@
 Name:		php-voms-admin
 %define shortname pva
-Version:	0.6
-Release:	3%{?dist}
+Version:	0.6.5
+Release:	1%{?dist}
 Summary:	Web based interface to control VOMS parameters written in PHP
 
 Group:		Applications/Internet
 License:	ASL 2.0
 URL:		http://grid.org.ua/development/pva/
 #		The source was created from a svn checkout
-#		svn co http://svn.nordugrid.org/repos/nordugrid/contrib/pva/tags/pva-0.6 php-voms-admin-0.6
-#		tar -z -c --exclude .svn -f php-voms-admin-0.6.tar.gz php-voms-admin-0.6
+#		svn export http://svn.nordugrid.org/repos/nordugrid/contrib/pva/tags/pva-0.6.5 php-voms-admin-0.6.5
+#		tar -z -c -f php-voms-admin-0.6.5.tar.gz php-voms-admin-0.6.5
 Source0:	%{name}-%{version}.tar.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:	noarch
@@ -55,10 +55,12 @@ mkdir -p %{buildroot}%{_mandir}/man1
 mkdir -p %{buildroot}%{_mandir}/man5
 
 sed '/^ADDVOCONF=/s!=.*!=%{_sysconfdir}/%{shortname}/addvo.conf!' \
-    addvo > %{buildroot}%{_sbindir}/%{shortname}-addvo
-chmod 755 %{buildroot}%{_sbindir}/%{shortname}-addvo
+    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 VOMSCompatibility.php VOMSCompatibility2.php rpc.php \
+install -p -m 644 index.php VOMSACL.php VOMSAdmin.php VOMSAttributes.php \
+    VOMSCompatibility.php VOMSCompatibility2.php VOMSRegistration.php rpc.php \
     %{buildroot}%{_datadir}/%{shortname}
 
 for dir in interfaces js kcaptcha lang modules pics styles wsdl ; do
@@ -84,9 +86,10 @@ ln -s %{_sysconfdir}/%{shortname}/%{shortname}-config \
 ln -s %{_sysconfdir}/%{shortname}/vomses \
     %{buildroot}%{_datadir}/%{shortname}/conf
 
-install -p -m 644 pva-addvo.1 %{buildroot}%{_mandir}/man1/%{shortname}-addvo.1
-install -p -m 644 addvo.conf.5 %{buildroot}%{_mandir}/man5/addvo.conf.5
-install -p -m 644 pva-config.5 %{buildroot}%{_mandir}/man5/%{shortname}-config.5
+install -p -m 644 pva-addvo.1 %{buildroot}%{_mandir}/man1/
+install -p -m 644 pva-dbschema-update.1 %{buildroot}%{_mandir}/man1/
+install -p -m 644 addvo.conf.5 %{buildroot}%{_mandir}/man5/
+install -p -m 644 pva-config.5 %{buildroot}%{_mandir}/man5/
 
 %clean
 rm -rf %{buildroot}
@@ -97,6 +100,17 @@ 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 || :
 
+# update DB schema for served VOs
+for voconf in $( ls /etc/pva/vomses/*.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}"
+    if [ $? -ne 0 ]; then
+	echo "Database schema update for VO specified in config file '${voconf}' finished with errors."
+    fi
+done
+
 %postun
 if [ $1 -eq 0 ]; then
   semanage fcontext -d -t httpd_sys_rw_content_t \
@@ -108,21 +122,26 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%{_sbindir}/%{shortname}-addvo
-%{_mandir}/man1/%{shortname}-addvo.1*
+%{_sbindir}/pva-addvo
+%{_sbindir}/pva-dbschema-update
+%{_mandir}/man1/pva-addvo.1*
+%{_mandir}/man1/pva-dbschema-update.1*
 %{_mandir}/man5/addvo.conf.5*
-%{_mandir}/man5/%{shortname}-config.5*
+%{_mandir}/man5/pva-config.5*
 %{_datadir}/%{shortname}
 %dir %{_localstatedir}/www/%{shortname}
 %attr(-,apache,apache) %{_localstatedir}/www/%{shortname}/mail-copies
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{shortname}.conf
 %dir %{_sysconfdir}/%{shortname}
 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/%{shortname}/addvo.conf
-%attr(640,apache,apache) %config(noreplace) %{_sysconfdir}/%{shortname}/%{shortname}-config
+%attr(640,apache,apache) %config(noreplace) %{_sysconfdir}/%{shortname}/pva-config
 %attr(640,apache,apache) %config(noreplace) %{_sysconfdir}/%{shortname}/vomses/external
 %doc AUTHORS CHANGELOG LICENSE NOTES README README.transactions README.Fedora
 
 %changelog
+* Tue Oct 23 2012 Mattias Ellert <mattias.ellert at fysast.uu.se> - 0.6.5-1
+- Update to released version 0.6.5
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.6-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/sources b/sources
index b0faf1d..85c8eeb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5b80a613f595914197b59e9d50f94907  php-voms-admin-0.6.tar.gz
+5303dedf1226c2cbc4e3421790cf6f8a  php-voms-admin-0.6.5.tar.gz


More information about the scm-commits mailing list