Proper unbundle with central requires, remove systemd again.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 17 Sep 2014 22:58:54 +0000 (00:58 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 17 Sep 2014 22:58:54 +0000 (00:58 +0200)
rOCCI-server.spec

index 9cd7d49..0cd72e5 100644 (file)
@@ -18,30 +18,22 @@ Source1:        %{semodule_name}.te
 Source2:        %{semodule_name}.fc
 Source3:        %{name}.logrotate
 Source4:        README.Fedora
-Source5:        %{name}.target
 # kill bundler
 # (not intended for upstream)
 Patch0:         rocci-server-unbundle.diff
-# missing requires in code (needed when bundler is not used)
-# https://github.com/EGI-FCTF/rOCCI-server/pull/55
-Patch1:         rocci-server-requires.diff
 
 BuildArch:      noarch
 BuildRequires:  policycoreutils-python
 BuildRequires:  ruby(release) >= 1.9.3
 BuildRequires:  rubygems-devel
 BuildRequires:  rubygem(rdoc)
-BuildRequires:  systemd
 # tests (plus all runtimes)
 #BuildRequires:  rubygem(rspec)
 #BuildRequires:  rubygem(rspec-rails)
 Requires(pre):  shadow-utils
 Requires(post): policycoreutils
-Requires(post): systemd
 Requires(preun): policycoreutils
-Requires(preun): systemd
 Requires(postun): policycoreutils
-Requires(postun): systemd
 Requires:       logrotate
 Requires:       memcached
 Requires:       mod_passenger
@@ -138,7 +130,6 @@ This package provides Opennebula backend for OCCI server.
 
 # kill bundler
 %patch0 -p1
-%patch1 -p1
 mv Gemfile Gemfile.unused
 mv Gemfile.lock Gemfile.lock.unused
 
@@ -197,9 +188,6 @@ install -p -m 0644 examples/etc/apache2/sites-available/occi-ssl %{buildroot}%{_
 echo "Listen 11443" >>  %{buildroot}%{_sysconfdir}/httpd/conf.d/occi-listen.conf
 install -p -m 0644 examples/etc/apache2/conf.d/security %{buildroot}%{_sysconfdir}/httpd/conf.d/occi-security.conf
 
-mkdir -p %{buildroot}%{_unitdir}
-install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}
-
 # Upstream testsuite fails:
 #254 examples, 29 failures, 13 pending
 #%%check
@@ -211,17 +199,13 @@ getent group rocci >/dev/null || groupadd -r rocci
 getent passwd rocci >/dev/null || useradd -r -g rocci -d %{app_root} -c "rOCCI user" rocci
 
 %post
-%systemd_post %{name}.target
 if [ "$1" -le "1" ] ; then # First install
   semodule -i %{_datadir}/selinux/packages/%{name}/%{semodule_name}.pp 2>/dev/null || :
   restorecon -R %{app_root} %{_localstatedir}/log/rocci-server 2>/dev/null || :
   semanage port -a -t http_port_t -p tcp 11443 2>/dev/null || :
-  # reload and start everything in case httpd is already running
-  systemctl reload httpd.service >/dev/null 2>&1 && systemctl start %{name}.target >/dev/null 2>&1
 fi
 
 %preun
-%systemd_preun %{name}.target
 if [ "$1" -lt "1" ] ; then # Final removal
   semodule -r %{semodule_name} 2>/dev/null || :
   semanage port -d -t http_port_t -p tcp 11443 2>/dev/null || :
@@ -232,11 +216,6 @@ if [ "$1" -ge "1" ] ; then # Upgrade
   semodule -i %{_datadir}/selinux/packages/%{name}/%{semodule_name}.pp 2>/dev/null || :
   restorecon -R %{app_root} %{_localstatedir}/log/rocci-server 2>/dev/null || :
 fi
-if [ "$1" -lt "1" ] ; then # Final removal
-  # reload httpd needed
-  systemctl reload httpd.service >/dev/null 2>&1
-fi
-%systemd_postun
 
 
 %files
@@ -273,7 +252,6 @@ fi
 %{app_root}/config.ru
 %attr(-,rocci,rocci) %{_localstatedir}/log/rocci-server/
 %{_datadir}/selinux/packages/%{name}/%{semodule_name}.pp
-%{_unitdir}/%{name}.target
 %exclude %{app_root}/bin/
 %exclude %{app_root}/.bundle/
 %exclude %{app_root}/.rspec
@@ -302,5 +280,5 @@ fi
 
 
 %changelog
-* Sun Sep 14 2014 František Dvořák <valtri@civ.zcu.cz> - 1.0.5-1.20140915git9ec6ad2
+* Wed Sep 17 2014 František Dvořák <valtri@civ.zcu.cz> - 1.0.5-1.20140915git9ec6ad2
 - Initial package