Update RPM services and startup scripts to match our Debian packages.
Bugs closed: AURORA-1394
Reviewed at https://reviews.apache.org/r/48513/
diff --git a/specs/rpm/SOURCES/aurora.init.sh b/specs/rpm/SOURCES/aurora-scheduler.init.sh
similarity index 100%
rename from specs/rpm/SOURCES/aurora.init.sh
rename to specs/rpm/SOURCES/aurora-scheduler.init.sh
diff --git a/specs/rpm/SOURCES/aurora.logrotate b/specs/rpm/SOURCES/aurora-scheduler.logrotate
similarity index 100%
rename from specs/rpm/SOURCES/aurora.logrotate
rename to specs/rpm/SOURCES/aurora-scheduler.logrotate
diff --git a/specs/rpm/SOURCES/aurora.service b/specs/rpm/SOURCES/aurora-scheduler.service
similarity index 100%
rename from specs/rpm/SOURCES/aurora.service
rename to specs/rpm/SOURCES/aurora-scheduler.service
diff --git a/specs/rpm/SOURCES/aurora.startup.sh b/specs/rpm/SOURCES/aurora-scheduler.startup.sh
similarity index 95%
rename from specs/rpm/SOURCES/aurora.startup.sh
rename to specs/rpm/SOURCES/aurora-scheduler.startup.sh
index 3c444d9..2ce64e8 100644
--- a/specs/rpm/SOURCES/aurora.startup.sh
+++ b/specs/rpm/SOURCES/aurora-scheduler.startup.sh
@@ -15,7 +15,7 @@
# limitations under the License.
-source /etc/sysconfig/aurora
+source /etc/sysconfig/aurora-scheduler
# Environment variables control the behavior of the Mesos scheduler driver (libmesos).
export GLOG_v LIBPROCESS_PORT LIBPROCESS_IP
diff --git a/specs/rpm/SOURCES/aurora.sysconfig b/specs/rpm/SOURCES/aurora-scheduler.sysconfig
similarity index 100%
rename from specs/rpm/SOURCES/aurora.sysconfig
rename to specs/rpm/SOURCES/aurora-scheduler.sysconfig
diff --git a/specs/rpm/SOURCES/thermos-observer.init.sh b/specs/rpm/SOURCES/thermos.init.sh
similarity index 98%
rename from specs/rpm/SOURCES/thermos-observer.init.sh
rename to specs/rpm/SOURCES/thermos.init.sh
index 38eea53..461fea6 100644
--- a/specs/rpm/SOURCES/thermos-observer.init.sh
+++ b/specs/rpm/SOURCES/thermos.init.sh
@@ -33,7 +33,7 @@
# Source LSB function library.
. /lib/lsb/init-functions
-exec="/usr/bin/thermos-observer-startup"
+exec="/usr/bin/thermos-startup"
prog="thermos-observer"
logdir="/var/log/thermos"
lockfile="/var/run/thermos-observer.lock"
diff --git a/specs/rpm/SOURCES/thermos-observer.logrotate b/specs/rpm/SOURCES/thermos.logrotate
similarity index 100%
rename from specs/rpm/SOURCES/thermos-observer.logrotate
rename to specs/rpm/SOURCES/thermos.logrotate
diff --git a/specs/rpm/SOURCES/thermos-observer.service b/specs/rpm/SOURCES/thermos.service
similarity index 94%
rename from specs/rpm/SOURCES/thermos-observer.service
rename to specs/rpm/SOURCES/thermos.service
index d019635..b699a56 100644
--- a/specs/rpm/SOURCES/thermos-observer.service
+++ b/specs/rpm/SOURCES/thermos.service
@@ -16,7 +16,7 @@
Wants=network.target
[Service]
-ExecStart=/usr/bin/thermos-observer-startup
+ExecStart=/usr/bin/thermos-startup
User=root
Group=root
Restart=always
diff --git a/specs/rpm/SOURCES/thermos-observer.startup.sh b/specs/rpm/SOURCES/thermos.startup.sh
similarity index 94%
rename from specs/rpm/SOURCES/thermos-observer.startup.sh
rename to specs/rpm/SOURCES/thermos.startup.sh
index 2d94fd9..788210a 100644
--- a/specs/rpm/SOURCES/thermos-observer.startup.sh
+++ b/specs/rpm/SOURCES/thermos.startup.sh
@@ -14,6 +14,6 @@
# limitations under the License.
-source /etc/sysconfig/thermos-observer
+source /etc/sysconfig/thermos
exec /usr/bin/thermos_observer "${OBSERVER_ARGS[@]}"
diff --git a/specs/rpm/SOURCES/thermos-observer.sysconfig b/specs/rpm/SOURCES/thermos.sysconfig
similarity index 100%
rename from specs/rpm/SOURCES/thermos-observer.sysconfig
rename to specs/rpm/SOURCES/thermos.sysconfig
diff --git a/specs/rpm/aurora.spec b/specs/rpm/aurora.spec
index a4fc46d..200864e 100644
--- a/specs/rpm/aurora.spec
+++ b/specs/rpm/aurora.spec
@@ -63,16 +63,16 @@
URL: https://aurora.apache.org/
Source0: http://www.apache.org/dyn/closer.cgi?action=download&filename=aurora/%{version}/apache-aurora-%{version}.tar.gz#/apache-aurora-%{version}.tar.gz
-Source1: aurora.service
-Source2: thermos-observer.service
-Source3: aurora.init.sh
-Source4: thermos-observer.init.sh
-Source5: aurora.startup.sh
-Source6: thermos-observer.startup.sh
-Source7: aurora.sysconfig
-Source8: thermos-observer.sysconfig
-Source9: aurora.logrotate
-Source10: thermos-observer.logrotate
+Source1: aurora-scheduler.service
+Source2: thermos.service
+Source3: aurora-scheduler.init.sh
+Source4: thermos.init.sh
+Source5: aurora-scheduler.startup.sh
+Source6: thermos.startup.sh
+Source7: aurora-scheduler.sysconfig
+Source8: thermos.sysconfig
+Source9: aurora-scheduler.logrotate
+Source10: thermos.logrotate
Source11: clusters.json
Source12: aurora-pants.ini
@@ -133,6 +133,7 @@
Group: Applications/System
Requires: mesos >= %{MESOS_VERSION}
+Requires: cyrus-sasl
%if 0%{?rhel} && 0%{?rhel} < 7
Requires: python27
%else
@@ -220,21 +221,21 @@
# Installs all support scripting.
%if 0%{?fedora} || 0%{?rhel} > 6
-install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/system
-install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/systemd/system/thermos-observer.service
+install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/systemd/system/aurora-scheduler.service
+install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/systemd/system/thermos.service
%else
-install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/aurora
-install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/thermos-observer
+install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/aurora-scheduler
+install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/init.d/thermos
%endif
install -m 755 %{SOURCE5} %{buildroot}%{_bindir}/aurora-scheduler-startup
-install -m 755 %{SOURCE6} %{buildroot}%{_bindir}/thermos-observer-startup
+install -m 755 %{SOURCE6} %{buildroot}%{_bindir}/thermos-startup
-install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/aurora
-install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/thermos-observer
+install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/aurora-scheduler
+install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/thermos
-install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/aurora
-install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/thermos-observer
+install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/logrotate.d/aurora-scheduler
+install -m 644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/thermos
install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/aurora/clusters.json
@@ -249,47 +250,47 @@
# Pre/post installation scripts:
%post
%if 0%{?fedora} || 0%{?rhel} > 6
-%systemd_post aurora.service
+%systemd_post aurora-scheduler.service
%else
-/sbin/chkconfig --add aurora
+/sbin/chkconfig --add aurora-scheduler
%endif
%preun
%if 0%{?fedora} || 0%{?rhel} > 6
-%systemd_preun aurora.service
+%systemd_preun aurora-scheduler.service
%else
-/sbin/service aurora stop >/dev/null 2>&1
-/sbin/chkconfig --del aurora
+/sbin/service aurora-scheduler stop >/dev/null 2>&1
+/sbin/chkconfig --del aurora-scheduler
%endif
%postun
%if 0%{?fedora} || 0%{?rhel} > 6
-%systemd_postun_with_restart aurora.service
+%systemd_postun_with_restart aurora-scheduler.service
%else
-/sbin/service aurora start >/dev/null 2>&1
+/sbin/service aurora-scheduler start >/dev/null 2>&1
%endif
%post -n aurora-executor
%if 0%{?fedora} || 0%{?rhel} > 6
-%systemd_post thermos-observer.service
+%systemd_post thermos.service
%else
-/sbin/chkconfig --add thermos-observer
+/sbin/chkconfig --add thermos
%endif
%preun -n aurora-executor
%if 0%{?fedora} || 0%{?rhel} > 6
-%systemd_preun thermos-observer.service
+%systemd_preun thermos.service
%else
-/sbin/service thermos-observer stop >/dev/null 2>&1
-/sbin/chkconfig --del thermos-observer
+/sbin/service thermos stop >/dev/null 2>&1
+/sbin/chkconfig --del thermos
%endif
%postun -n aurora-executor
%if 0%{?fedora} || 0%{?rhel} > 6
-%systemd_postun_with_restart thermos-observer.service
+%systemd_postun_with_restart thermos.service
%else
-/sbin/service thermos-observer start >/dev/null 2>&1
+/sbin/service thermos start >/dev/null 2>&1
%endif
@@ -303,12 +304,12 @@
%{_prefix}/lib/aurora/etc/*
%{_prefix}/lib/aurora/lib/*
%if 0%{?fedora} || 0%{?rhel} > 6
-%{_sysconfdir}/systemd/system/aurora.service
+%{_sysconfdir}/systemd/system/aurora-scheduler.service
%else
-%{_sysconfdir}/init.d/aurora
+%{_sysconfdir}/init.d/aurora-scheduler
%endif
-%config(noreplace) %{_sysconfdir}/logrotate.d/aurora
-%config(noreplace) %{_sysconfdir}/sysconfig/aurora
+%config(noreplace) %{_sysconfdir}/logrotate.d/aurora-scheduler
+%config(noreplace) %{_sysconfdir}/sysconfig/aurora-scheduler
%files -n aurora-tools
@@ -324,16 +325,16 @@
%{_bindir}/thermos_executor
%{_bindir}/thermos_observer
%{_bindir}/thermos_runner
-%{_bindir}/thermos-observer-startup
+%{_bindir}/thermos-startup
%{_localstatedir}/log/thermos
%{_localstatedir}/run/thermos
%if 0%{?fedora} || 0%{?rhel} > 6
-%{_sysconfdir}/systemd/system/thermos-observer.service
+%{_sysconfdir}/systemd/system/thermos.service
%else
-%{_sysconfdir}/init.d/thermos-observer
+%{_sysconfdir}/init.d/thermos
%endif
-%config(noreplace) %{_sysconfdir}/logrotate.d/thermos-observer
-%config(noreplace) %{_sysconfdir}/sysconfig/thermos-observer
+%config(noreplace) %{_sysconfdir}/logrotate.d/thermos
+%config(noreplace) %{_sysconfdir}/sysconfig/thermos
%changelog