2017-02-18 03:19:43 +01:00
|
|
|
#
|
|
|
|
# spec file for package rebootmgr
|
|
|
|
#
|
2019-02-04 21:21:36 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-02-18 03:19:43 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-02-04 21:21:36 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-02-18 03:19:43 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-09-27 14:42:56 +02:00
|
|
|
%if ! %{defined _distconfdir}
|
|
|
|
%define _distconfdir %{_sysconfdir}
|
|
|
|
%define with_config 1
|
|
|
|
%else
|
|
|
|
%define with_config 0
|
|
|
|
%endif
|
|
|
|
|
2017-02-18 03:19:43 +01:00
|
|
|
Name: rebootmgr
|
2019-09-27 14:42:56 +02:00
|
|
|
Version: 0.20
|
2017-02-18 03:19:43 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Automatic controlled reboot during a maintenance window
|
2018-03-26 11:56:27 +02:00
|
|
|
License: GPL-2.0-only AND LGPL-2.1-or-later
|
2017-02-18 03:19:43 +01:00
|
|
|
Group: System/Base
|
2018-03-26 11:56:27 +02:00
|
|
|
URL: https://github.com/SUSE/rebootmgr
|
2019-02-04 21:21:36 +01:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
2017-02-18 03:19:43 +01:00
|
|
|
BuildRequires: cetcd-devel
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(dbus-glib-1)
|
|
|
|
BuildRequires: pkgconfig(glib-2.0) >= 2.40
|
|
|
|
BuildRequires: pkgconfig(json-c)
|
2019-09-27 14:42:56 +02:00
|
|
|
BuildRequires: pkgconfig(libeconf)
|
2017-02-18 03:19:43 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
RebootManager is a dbus service to execute a controlled reboot after updates in a defined maintenance window.
|
|
|
|
|
|
|
|
If you updated a system with e.g. transactional updates or a kernel update was applied, you can tell rebootmgrd with rebootmgrctl, that the machine should be reboot at the next possible time. This can either be immeaditly, during a defined maintenance window or, to avoid that a lot of machines boot at the same time, controlled with locks and etcd.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2018-03-26 11:56:27 +02:00
|
|
|
%make_install
|
2017-02-18 03:19:43 +01:00
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcrebootmgr
|
2019-09-27 14:42:56 +02:00
|
|
|
if [ ! -d %{buildroot}%{_distconfdir} ]; then
|
|
|
|
mkdir -p %{buildroot}%{_distconfdir}
|
|
|
|
mv %{buildroot}%{_sysconfdir}/rebootmgr.conf %{buildroot}%{_distconfdir}
|
|
|
|
fi
|
2017-02-18 03:19:43 +01:00
|
|
|
%fdupes %{buildroot}%{_mandir}
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre rebootmgr.service
|
2019-09-27 14:42:56 +02:00
|
|
|
test -f /etc/rebootmgr.conf.rpmsave && mv -v /etc/rebootmgr.conf.rpmsave /etc/rebootmgr.conf.rpmsave.old ||:
|
2017-02-18 03:19:43 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post rebootmgr.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun rebootmgr.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun rebootmgr.service
|
|
|
|
|
2019-09-27 14:42:56 +02:00
|
|
|
%posttrans
|
|
|
|
test -f /etc/rebootmgr.conf.rpmsave && mv -v /etc/rebootmgr.conf.rpmsave /etc/rebootmgr.conf
|
|
|
|
|
2017-02-18 03:19:43 +01:00
|
|
|
%files
|
2018-03-26 11:56:27 +02:00
|
|
|
%license COPYING COPYING.LIB
|
|
|
|
%doc NEWS
|
2017-02-18 03:19:43 +01:00
|
|
|
%dir %{_sysconfdir}/dbus-1/system.d
|
2019-09-27 14:42:56 +02:00
|
|
|
%if %{with_config}
|
2017-02-18 03:19:43 +01:00
|
|
|
%config %{_sysconfdir}/rebootmgr.conf
|
2019-09-27 14:42:56 +02:00
|
|
|
%else
|
|
|
|
%{_distconfdir}/rebootmgr.conf
|
|
|
|
%endif
|
2017-02-18 03:19:43 +01:00
|
|
|
%config %{_sysconfdir}/dbus-1/system.d/org.opensuse.RebootMgr.conf
|
|
|
|
%{_prefix}/lib/systemd/system/rebootmgr.service
|
|
|
|
%{_sbindir}/rebootmgrctl
|
|
|
|
%{_sbindir}/rebootmgrd
|
|
|
|
%{_sbindir}/rcrebootmgr
|
|
|
|
%{_datadir}/dbus-1/interfaces/org.opensuse.RebootMgr.xml
|
2018-03-26 11:56:27 +02:00
|
|
|
%{_mandir}/man1/rebootmgrctl.1%{?ext_man}
|
|
|
|
%{_mandir}/man5/rebootmgr.conf.5%{?ext_man}
|
|
|
|
%{_mandir}/man8/rebootmgrd.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/org.opensuse.RebootMgr.conf.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/rebootmgr.service.8%{?ext_man}
|
2017-02-18 03:19:43 +01:00
|
|
|
|
|
|
|
%changelog
|