File rollback-helper.spec of Package rollback-helper.1238
#
# spec file for package rollback-helper
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: rollback-helper
Version: 0.1
Release: 0
Summary: Helper Scripts for system rollback
License: GPL-2.0+
Group: System/Packages
Source0: rollback-helper-%{version}.tar.bz2
Requires: snapper
Requires: snapper-zypp-plugin
Supplements: snapper
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
PreReq: %insserv_prereq
PreReq: systemd-presets-branding-SLE >= 12.0-14.7.1
%description
The rollback-helper package is a collection of scripts, which,
after a successfull filesystem rollback with snapper, resets
registered products on SCC or SMT.
%prep
%setup -q
%build
%install
install -d "%{buildroot}/usr/lib/snapper/plugins"
install -d "%{buildroot}/%{_var}/lib/rollback"
install -d "%{buildroot}%{_unitdir}"
install -d "%{buildroot}%{_sbindir}"
cp plugins/rollback %{buildroot}/usr/lib/snapper/plugins/
cp systemd/rollback.service %{buildroot}%{_unitdir}/
cp sbin/rollback-reset-registration %{buildroot}%{_sbindir}/
%pre
%service_add_pre rollback.service
%post
%service_add_post rollback.service
%preun
%service_del_preun rollback.service
%postun
%service_del_postun rollback.service
%files
%defattr(-,root,root)
%dir /usr/lib/snapper
%dir /usr/lib/snapper/plugins
/usr/lib/snapper/plugins/rollback
%{_unitdir}/rollback.service
%{_sbindir}/rollback-reset-registration
%changelog