Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 700164 Details for
Bug 913249
Provide native systemd unit file for moksha
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
inital systemd support
moksha-systemd.patch (text/plain), 6.80 KB, created by
Jóhann B. Guðmundsson
on 2013-02-20 18:24:36 UTC
(
hide
)
Description:
inital systemd support
Filename:
MIME Type:
Creator:
Jóhann B. Guðmundsson
Created:
2013-02-20 18:24:36 UTC
Size:
6.80 KB
patch
obsolete
>From c92d1e330ab9ac0b91debed4b15a98c0f37a80a1 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?"J=C3=B3hann=20B.=20Gu=C3=B0mundsson"?= > <johannbg@fedoraproject.org> >Date: Wed, 20 Feb 2013 18:33:59 +0000 >Subject: [PATCH 1/4] Introducing native systemd units > >--- > moksha-hub.service | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > create mode 100644 moksha-hub.service > >diff --git a/moksha-hub.service b/moksha-hub.service >new file mode 100644 >index 0000000..2206bf5 >--- /dev/null >+++ b/moksha-hub.service >@@ -0,0 +1,13 @@ >+[Unit] >+Description=Moksha Hub >+Documentation=http://mokshaproject.net >+After=network.target >+ >+[Service] >+User=moksha >+Type=forking >+MainPID=/run/moksha/moksha-hub.pid >+ExecStart=/bin/moksha-hub --daemon >+ >+[Install] >+WantedBy=multi-user.target >-- >1.7.11.7 > > >From a895920045d9944d9ffc1ec481cd15a9ad0608e0 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?"J=C3=B3hann=20B.=20Gu=C3=B0mundsson"?= > <johannbg@fedoraproject.org> >Date: Wed, 20 Feb 2013 18:34:35 +0000 >Subject: [PATCH 2/4] Adding tmpfiles.d file > >--- > moksha.conf | 1 + > 1 file changed, 1 insertion(+) > create mode 100644 moksha.conf > >diff --git a/moksha.conf b/moksha.conf >new file mode 100644 >index 0000000..a237457 >--- /dev/null >+++ b/moksha.conf >@@ -0,0 +1 @@ >+D /var/run/moksha 0755 root root - >-- >1.7.11.7 > > >From 7656cf2f3ba715f058445cffdf97e6814e9c14d8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?"J=C3=B3hann=20B.=20Gu=C3=B0mundsson"?= > <johannbg@fedoraproject.org> >Date: Wed, 20 Feb 2013 18:35:24 +0000 >Subject: [PATCH 3/4] Adding changes to spec file for native systemd units > >--- > moksha.spec | 45 ++++++++++++++++++++++++++++++++++----------- > 1 file changed, 34 insertions(+), 11 deletions(-) > >diff --git a/moksha.spec b/moksha.spec >index 83246fa..52e9bbf 100644 >--- a/moksha.spec >+++ b/moksha.spec >@@ -3,12 +3,14 @@ > > Name: moksha > Version: 1.0.0 >-Release: 5%{?dist} >+Release: 6%{?dist} > Summary: A platform for creating real-time web applications > Group: Applications/Internet > License: ASL 2.0 > URL: https://fedorahosted.org/moksha > Source0: http://pypi.python.org/packages/source/m/%{name}/%{name}-%{version}.tar.gz >+Source1: %{name}.conf >+Source2: moksha-hub.service > > Patch0: 0001-Fix-our-apache-config-for-2.4-rhbz-871430.patch > >@@ -22,6 +24,10 @@ BuildRequires: python-moksha-common > BuildRequires: python-moksha-hub > BuildRequires: python-moksha-wsgi > >+Requires(post): systemd >+Requires(preun): systemd >+Requires(postun): systemd >+ > Requires: python-moksha-common > Requires: python-moksha-hub > Requires: python-moksha-wsgi >@@ -66,13 +72,14 @@ make -C docs html > %{__mkdir_p} %{buildroot}%{_datadir}/%{name}/production/apache > %{__mkdir_p} %{buildroot}%{_datadir}/%{name}/production/nginx > %{__mkdir_p} %{buildroot}%{_datadir}/%{name}/production/rabbitmq >+%{__mkdir_p} %{buildroot}/run/%{name} > %{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d >+%{__mkdir_p} %{buildroot}%{_prefix}/lib/tmpfiles.d > %{__mkdir_p} -m 0755 %{buildroot}/%{_localstatedir}/cache/%{name} > %{__mkdir_p} -m 0755 %{buildroot}/%{_localstatedir}/lib/%{name} > %{__mkdir_p} -m 0755 %{buildroot}%{_sysconfdir}/httpd/conf.d > %{__mkdir_p} -m 0755 %{buildroot}/%{_sysconfdir}/%{name}/ > %{__mkdir_p} -m 0755 %{buildroot}/%{_sysconfdir}/%{name}/conf.d >-%{__mkdir_p} -m 0755 %{buildroot}/%{_sysconfdir}/init.d/ > %{__mkdir_p} -m 0755 %{buildroot}/%{_var}/log/%{name} > > %{__install} -m 0644 production/*.* %{buildroot}%{_datadir}/%{name}/production/ >@@ -82,8 +89,8 @@ make -C docs html > %{__install} -m 0644 production/rabbitmq/*.patch %{buildroot}%{_datadir}/%{name}/production/rabbitmq > %{__install} -m 0755 production/rabbitmq/run %{buildroot}%{_datadir}/%{name}/production/rabbitmq > %{__install} -m 0644 production/logrotate/moksha %{buildroot}%{_sysconfdir}/logrotate.d/ >-%{__install} production/moksha-hub.init %{buildroot}%{_sysconfdir}/init.d/moksha-hub >-%{__install} -d -m 0755 %{buildroot}/var/run/%{name} >+%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf >+%{__install} -p -D -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/moksha-hub.service > > %{__cp} production/sample-production.ini %{buildroot}%{_sysconfdir}/%{name}/sample-production.ini > %{__cp} development.ini %{buildroot}%{_sysconfdir}/%{name}/development.ini >@@ -94,29 +101,42 @@ make -C docs html > %{__rm} %{buildroot}%{_datadir}/%{name}/production/moksha-hub.init > > %post >-/sbin/chkconfig --add moksha-hub >+%systemd_post moksha-hub.service > > %post server > semanage fcontext -a -t httpd_cache_t '/var/cache/moksha(/.*)?' > restorecon -Rv /var/cache/moksha > >+%postun >+%systemd_postun >+ > %pre > %{_sbindir}/groupadd -r %{name} &>/dev/null || : > %{_sbindir}/useradd -r -s /sbin/nologin -d %{_datadir}/%{name} -M \ > -c 'Moksha' -g %{name} %{name} &>/dev/null || : > > %preun >-if [ $1 -eq 0 ]; then >- /sbin/service moksha-hub stop >/dev/null 2>&1 >- /sbin/chkconfig --del moksha-hub >-fi >+%systemd_preun moksha-hub.service >+ >+%triggerun -- moksha < 1.0.0-5 >+# Save the current service runlevel info >+# User must manually run systemd-sysv-convert --apply moksha-hub >+# and systemd-sysv-convert --apply moksha-hub >+# to migrate them to systemd targets >+/usr/bin/systemd-sysv-convert --save moksha-hub >/dev/null 2>&1 ||: >+ >+# Run these because the SysV package being removed won't do them >+/sbin/chkconfig --del moksha-hub >/dev/null 2>&1 || : >+/bin/systemctl try-restart moksha-hub >/dev/null 2>&1 || : >+ > > %files > %doc README AUTHORS COPYING >-%{_sysconfdir}/init.d/moksha-hub >+%dir /run/%{name}/ >+%{_prefix}/lib/tmpfiles.d/%{name}.conf >+%{_unitdir}/moksha-hub.service > %attr(-,apache,apache) %dir %{_localstatedir}/lib/%{name} > %attr(0755,root,%{name}) %dir %{_var}/log/%{name} >-%ghost %attr(755, %{name}, %{name}) /var/run/%{name} > %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} > > %files server >@@ -130,6 +150,9 @@ fi > %doc docs/_build/html > > %changelog >+* Wed Feb 20 2013 Jóhann B. Guðmundsson <johannbg@fedoraproject.org> - 1.0.0-6 >+- Inital systemd support >+ > * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-5 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild > >-- >1.7.11.7 > > >From 4250298e6145e4fed517eb5f03abe55703ea915c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?"J=C3=B3hann=20B.=20Gu=C3=B0mundsson"?= > <johannbg@fedoraproject.org> >Date: Wed, 20 Feb 2013 19:22:31 +0000 >Subject: [PATCH 4/4] Fixing PID file to actually be PIDFile in systemd unit > >--- > moksha-hub.service | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/moksha-hub.service b/moksha-hub.service >index 2206bf5..73b9166 100644 >--- a/moksha-hub.service >+++ b/moksha-hub.service >@@ -6,7 +6,7 @@ After=network.target > [Service] > User=moksha > Type=forking >-MainPID=/run/moksha/moksha-hub.pid >+PIDFile=/run/moksha/moksha-hub.pid > ExecStart=/bin/moksha-hub --daemon > > [Install] >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 913249
:
700149
| 700164