dist/spec: provide obs-operator subpackage.

This commit is contained in:
Jimmy Berry 2018-11-07 22:59:23 -06:00
parent 24d56d8eed
commit 408f8fb031
2 changed files with 36 additions and 0 deletions

View File

@ -199,6 +199,17 @@ Requires: build
Requires: perl-XML-Simple
Requires(pre): shadow
%package obs-operator
Summary: Server used to perform staging operations
Group: Development/Tools/Other
BuildArch: noarch
Requires: osc-plugin-staging = %{version}
Requires(pre): shadow
%description obs-operator
Server used to perform staging operations as a service instead of requiring
the osc staging plugin to be utilized directly.
%description repo-checker
Repository checker service that inspects built RPMs from stagings.
@ -367,6 +378,17 @@ if [ -x /usr/bin/systemctl ] && /usr/bin/systemctl is-enabled grafana-server ; t
/usr/bin/systemctl try-restart --no-block grafana-server
fi
%pre obs-operator
getent passwd osrt-obs-operator > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-obs-operator" osrt-obs-operator
exit 0
%postun obs-operator
%systemd_postun
if [ -x /usr/bin/systemctl ] && /usr/bin/systemctl is-enabled osrt-obs-operator ; then
/usr/bin/systemctl try-restart --no-block osrt-obs-operator
fi
%pre repo-checker
getent passwd osrt-repo-checker > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-repo-checker" osrt-repo-checker
@ -544,6 +566,10 @@ exit 0
%{_unitdir}/osrt-metrics-access.service
%{_unitdir}/osrt-metrics-access.timer
%files obs-operator
%{_bindir}/osrt-obs_operator
%{_unitdir}/osrt-obs-operator.service
%files repo-checker
%defattr(-,root,root,-)
%{_bindir}/osrt-repo_checker

View File

@ -0,0 +1,10 @@
[Unit]
Description=openSUSE Release Tools: OBS Operator
[Service]
User=osrt-obs-operator
ExecStart=/usr/bin/osrt-obs_operator --debug
Restart=on-failure
[Install]
WantedBy=multi-user.target