restorecond/restorecond.spec
Johannes Segitz ec3c895512 Accepting request 1134074 from home:cahu:branches:security:SELinux
- Update to version 3.6
  https://github.com/SELinuxProject/selinux/releases/tag/3.6
  * Add notself support for neverallow rules
  * Improve man pages
  * man pages: Remove the Russian translations
  * Add notself and other support to CIL
  * Add support for deny rules
  * Translations updated from
    https://translate.fedoraproject.org/projects/selinux/
  * Bug fixes
- Remove keys from keyring since they expired:
  - E853C1848B0185CF42864DF363A8AD4B982C4373
    Petr Lautrbach <plautrba@redhat.com>
  - 63191CE94183098689CAB8DB7EF137EC935B0EAF
    Jason Zaman <jasonzaman@gmail.com>
- Add key to keyring:  
  - B8682847764DF60DF52D992CBC3905F235179CF1  
    Petr Lautrbach <lautrbach@redhat.com>

OBS-URL: https://build.opensuse.org/request/show/1134074
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/restorecond?expand=0&rev=31
2024-01-05 15:36:31 +00:00

78 lines
2.5 KiB
RPMSpec

#
# spec file for package restorecond
#
# Copyright (c) 2023 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 https://bugs.opensuse.org/
#
%define libselinux_ver 3.6
Name: restorecond
Version: 3.6
Release: 0
Summary: Daemon to restore SELinux contexts
License: GPL-2.0-or-later
Group: Productivity/Security
URL: https://github.com/SELinuxProject/selinux.git
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz.asc
Source2: restorecond.keyring
Patch0: harden_restorecond.service.patch
BuildRequires: dbus-1-glib-devel
BuildRequires: libselinux-devel >= %{libselinux_ver}
Requires: libselinux1 >= %{libselinux_ver}
Requires: selinux-tools >= %{libselinux_ver}
%description
Daemon that watches for file creation and then sets the default SELinux file context
%prep
%setup -q
%patch -P0 -p1
%build
export CFLAGS="%optflags"
%make_build LSPP_PRIV=y all
%install
make DESTDIR=%{buildroot} SHLIBDIR=/%{_lib} SYSTEMDSYSTEMUNITDIR=%{_unitdir} SYSTEMDUSERUNITDIR=%{_userunitdir} install
rm %{buildroot}%{_sysconfdir}/rc.d/init.d/restorecond
ln -s /sbin/service %{buildroot}%{_sbindir}/rcrestorecond
%pre
%service_add_pre restorecond.service
%post
%service_add_post restorecond.service
%preun
%service_del_preun restorecond.service
%postun
%service_del_postun restorecond.service
%files
%dir %{_sysconfdir}/selinux
%config %{_sysconfdir}/selinux/restorecond.conf
%config(noreplace) %{_sysconfdir}/selinux/restorecond_user.conf
%{_sysconfdir}/xdg/autostart/restorecond.desktop
%{_unitdir}/restorecond.service
%{_userunitdir}/restorecond_user.service
%{_sbindir}/restorecond
%{_sbindir}/rcrestorecond
%{_datadir}/dbus-1/services/org.selinux.Restorecond.service
%{_mandir}/man8/restorecond.8%{?ext_man}
%changelog