File rollback-helper.spec of Package rollback-helper

# spec file for package rollback-helper
# Copyright (c) 2018 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

Name:           rollback-helper
Version:        1.0+git20181218.5394d6e
Release:        0
Summary:        Helper Scripts for system rollback
License:        GPL-2.0-or-later
Group:          System/Packages
Source:         rollback-helper-%{version}.tar.xz
Source1:        README.packaging.txt
Patch0:	harden_rollback.service.patch
Requires:       SUSEConnect
Supplements:    packageand(snapper:SUSEConnect)
BuildArch:      noarch
# SUSEConnect does not build for i586 and s390 and is not supported on those architectures
# bsc#1088552
ExcludeArch:    %ix86 s390

The rollback-helper package is a collection of scripts, which,
after a successfull filesystem rollback with snapper, resets
registered products on SCC or SMT.

%setup -q
%patch0 -p1


install -d "%{buildroot}%{_prefix}/lib/snapper/plugins"
install -d "%{buildroot}/%{_var}/lib/rollback"
install -d "%{buildroot}%{_unitdir}"
install -d "%{buildroot}%{_sbindir}"
cp plugins/rollback %{buildroot}%{_prefix}/lib/snapper/plugins/
cp systemd/rollback.service %{buildroot}%{_unitdir}/
cp sbin/rollback-reset-registration %{buildroot}%{_sbindir}/

%service_add_pre rollback.service

%service_add_post rollback.service

%service_del_preun rollback.service

%service_del_postun rollback.service

%license COPYING
%dir %{_prefix}/lib/snapper
%dir %{_prefix}/lib/snapper/plugins
%dir %{_var}/lib/rollback

openSUSE Build Service is sponsored by