[vfrnav/f20] validator service subpackage
sailer
sailer at fedoraproject.org
Fri Aug 30 07:27:10 UTC 2013
commit ec67fbc764bf2fed968f39c6120aa42908fb1f1f
Author: Thomas Sailer <t.sailer at alumni.ethz.ch>
Date: Fri Aug 30 01:21:25 2013 +0200
validator service subpackage
vfrnav.spec | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 deletions(-)
---
diff --git a/vfrnav.spec b/vfrnav.spec
index 32769ca..e0e3c92 100644
--- a/vfrnav.spec
+++ b/vfrnav.spec
@@ -85,11 +85,23 @@ Requires: %{name} = %{version}
This package contains utilities for database creation and manipulation
for the VFR navigation application.
+%package validatorservice
+Summary: VFR Navigation CFMU Validator Service
+Group: Applications/Productivity
+Requires: %{name} = %{version}
+Requires: xorg-x11-server-Xvfb
+
+%description validatorservice
+Opening the connection to the CFMU validator takes some time (in the order
+of seconds to minutes). In order to amortize this time over multiple tasks,
+this package contains a local socket validator server.
+
%if %{with webservice}
%package webservice
Summary: VFR Navigation CFMU Autorouter Webservice
Group: Applications/Productivity
Requires: %{name} = %{version}
+Requires: %{name}-validatorservice = %{version}
Requires: httpd
Requires: php
Requires: php-pdo
@@ -135,23 +147,24 @@ rm -f $RPM_BUILD_ROOT/lib/systemd/system/cfmuws.service
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cfmuws
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/vfrnav/cfmuwsusers.json
+install -d $RPM_BUILD_ROOT/run/vfrnav/validator
+install -d $RPM_BUILD_ROOT/var/lib/vfrnav
+
%if %{with webservice}
install -d $RPM_BUILD_ROOT/%{_libdir}/vfrnav
echo "CREATE TABLE IF NOT EXISTS credentials (username TEXT UNIQUE NOT NULL, passwdclear TEXT, passwdmd5 TEXT, salt INTEGER);" | sqlite3 $RPM_BUILD_ROOT/%{_sysconfdir}/vfrnav/autoroute.db
-install -d $RPM_BUILD_ROOT/run/vfrnav
+install -d $RPM_BUILD_ROOT/run/vfrnav/autoroute
%else
rm -f $RPM_BUILD_ROOT/lib/systemd/system/cfmuautoroute.service
rm -f $RPM_BUILD_ROOT/lib/systemd/system/cfmuautoroute.socket
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cfmuautoroute
%endif
-%if %{with webservice}
-%pre webservice
+%pre validatorservice
getent group vfrnav &>/dev/null || groupadd -r vfrnav
getent passwd vfrnav &>/dev/null || \
useradd -g vfrnav -d /var/lib/vfrnav -M -r -s /sbin/nologin \
- -c "Special user account to be used by vfrnav cfmuautoroute web service" vfrnav
-%endif
+ -c "Special user account to be used by vfrnav cfmuautoroute/cfmuvalidate services" vfrnav
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@@ -170,7 +183,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING NEWS README TODO doc/flightdeck.pdf
+%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO doc/flightdeck.pdf
%{_datadir}/applications/vfrnav.desktop
%{_datadir}/applications/flightdeck.desktop
%{_datadir}/applications/vfrairporteditor.desktop
@@ -250,6 +263,15 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/vfrdbfasimport
%{_bindir}/vfrradconvert
+%files validatorservice
+%defattr(-,root,root,-)
+/lib/systemd/system/cfmuvalidate.service
+/lib/systemd/system/cfmuvalidate.socket
+%config(noreplace) %{_sysconfdir}/sysconfig/cfmuvalidate
+%dir %attr(0755,vfrnav,vfrnav) /run/vfrnav
+%dir %attr(0750,vfrnav,vfrnav) /run/vfrnav/validator
+%dir %attr(0750,vfrnav,vfrnav) /var/lib/vfrnav
+
%if %{with webservice}
%files webservice
%defattr(-,root,root,-)
@@ -257,9 +279,8 @@ rm -rf $RPM_BUILD_ROOT
/lib/systemd/system/cfmuautoroute.socket
%config(noreplace) %{_sysconfdir}/sysconfig/cfmuautoroute
%dir %{_sysconfdir}/vfrnav
-%dir %{_libdir}/vfrnav
-%dir %attr(0755,vfrnav,vfrnav) /run/vfrnav
%config(noreplace) %attr(0660,vfrnav,apache) %{_sysconfdir}/vfrnav/autoroute.db
+%dir %attr(0750,vfrnav,apache) /run/vfrnav/autoroute
%endif
%changelog
More information about the scm-commits
mailing list