98 lines
2.9 KiB

# spec file for package rebootmgr
# Copyright (c) 2024 SUSE LLC
# 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.
# Please submit bugfixes or comments via
%if ! %{defined _distconfdir}
%define _distconfdir %{_sysconfdir}
%define with_config 1
%define with_config 0
Name: rebootmgr
Version: 2.3
Release: 0
Summary: Automatic controlled reboot during a maintenance window
License: GPL-2.0-only AND LGPL-2.1-or-later
Group: System/Base
Source: %{name}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libeconf)
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 immediately or during a defined maintenance window.
%setup -q
make %{?_smp_mflags}
ln -sf service %{buildroot}%{_sbindir}/rcrebootmgr
if [ ! -d %{buildroot}%{_distconfdir} ]; then
mkdir -p %{buildroot}%{_distconfdir}
mv %{buildroot}%{_sysconfdir}/rebootmgr.conf %{buildroot}%{_distconfdir}
%fdupes %{buildroot}%{_mandir}
%service_add_pre rebootmgr.service
test -f /etc/rebootmgr.conf.rpmsave && mv -v /etc/rebootmgr.conf.rpmsave /etc/rebootmgr.conf.rpmsave.old ||:
%service_add_post rebootmgr.service
%service_del_preun rebootmgr.service
%service_del_postun rebootmgr.service
test -f /etc/rebootmgr.conf.rpmsave && mv -v /etc/rebootmgr.conf.rpmsave /etc/rebootmgr.conf ||:
%doc NEWS
%if %{with_config}
%config %{_sysconfdir}/rebootmgr.conf