1 %include /usr/lib/rpm/macros.perl
2 Summary: restorecond - daemon which corrects contexts of newly created files
3 Summary(pl.UTF-8): restorecond - demon poprawiający konteksty nowo tworzonych plików
4 Name: selinux-restorecond
9 #Source0Download: https://github.com/SELinuxProject/selinux/wiki/Releases
10 Source0: https://github.com/SELinuxProject/selinux/releases/download/20190315/restorecond-%{version}.tar.gz
11 # Source0-md5: 1a24cb2a23d8bd01d3f8d9bb2031981f
12 Patch0: restorecond-init.patch
13 URL: https://github.com/SELinuxProject/selinux/wiki
14 BuildRequires: dbus-glib-devel
15 BuildRequires: glibc-devel >= 6:2.4
16 BuildRequires: pkgconfig
17 BuildRequires: pcre-devel
18 BuildRequires: libselinux-devel >= 2.9
19 Requires(post,preun): /sbin/chkconfig
20 Requires: libselinux >= 2.9
22 Obsoletes: policycoreutils-restorecond < 2.7
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Security-enhanced Linux is a patch of the Linux kernel and a number of
27 utilities with enhanced security functionality designed to add
28 mandatory access controls to Linux. The Security-enhanced Linux kernel
29 contains new architectural components originally developed to improve
30 the security of the Flask operating system. These architectural
31 components provide general support for the enforcement of many kinds
32 of mandatory access control policies, including those based on the
33 concepts of Type Enforcement, Role-based Access Control, and
36 restorecond daemon uses inotify to watch files listed in the
37 /etc/selinux/restorecond.conf, when they are created, this daemon will
38 make sure they have the correct file context associated with the
41 %description -l pl.UTF-8
42 Security-enhanced Linux jest prototypem jądra Linuksa i wielu
43 aplikacji użytkowych o funkcjach podwyższonego bezpieczeństwa.
44 Zaprojektowany jest tak, aby w prosty sposób ukazać znaczenie
45 obowiązkowej kontroli dostępu dla społeczności linuksowej. Ukazuje
46 również jak taką kontrolę można dodać do istniejącego systemu typu
47 Linux. Jądro SELinux zawiera nowe składniki architektury pierwotnie
48 opracowane w celu ulepszenia bezpieczeństwa systemu operacyjnego
49 Flask. Te elementy zapewniają ogólne wsparcie we wdrażaniu wielu typów
50 polityk obowiązkowej kontroli dostępu, włączając te wzorowane na: Type
51 Enforcement (TE), kontroli dostępu opartej na rolach (RBAC) i
52 zabezpieczeniach wielopoziomowych.
54 Demon restorecond używa inotify do śledzenia plików wymienionych w
55 pliku /etc/selinux/restorecond.conf, aby przy ich tworzeniu upewnić
56 się, że mają przypisane właściwe konteksty plików z polityki.
59 %setup -q -n restorecond-%{version}
63 CFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -W" \
66 LDFLAGS="%{rpmldflags}"
69 rm -rf $RPM_BUILD_ROOT
72 DESTDIR=$RPM_BUILD_ROOT \
74 SYSTEMDDIR=/lib/systemd
77 rm -rf $RPM_BUILD_ROOT
80 /sbin/chkconfig --add restorecond
81 %service restorecond restart
84 if [ "$1" = "0" ]; then
85 %service restorecond stop
86 /sbin/chkconfig --del restorecond
90 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_sbindir}/restorecond
92 %attr(754,root,root) /etc/rc.d/init.d/restorecond
93 %{systemdunitdir}/restorecond.service
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/selinux/restorecond.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/selinux/restorecond_user.conf
96 %{_mandir}/man8/restorecond.8*
97 %lang(ru) %{_mandir}/ru/man8/restorecond.8*
98 %{_sysconfdir}/xdg/autostart/restorecond.desktop
99 %{_datadir}/dbus-1/services/org.selinux.Restorecond.service