]>
Commit | Line | Data |
---|---|---|
835f2e4f JB |
1 | # |
2 | # Conditional build: | |
ba4f2429 | 3 | %bcond_without python # python binding |
835f2e4f | 4 | # |
adb66b1f | 5 | Summary: SELinux library and simple utilities |
4967c211 | 6 | Summary(pl.UTF-8): Biblioteka SELinux i proste narzędzia |
adb66b1f | 7 | Name: libselinux |
170f8eeb | 8 | Version: 2.0.80 |
50fa2c36 | 9 | Release: 1 |
fefe9db1 | 10 | License: Public Domain |
adb66b1f | 11 | Group: Libraries |
170f8eeb | 12 | #git http://oss.tresys.com/git/selinux.git/ |
13 | Source0: %{name}-%{version}.tar.gz | |
14 | # Source0-md5: c4647a6adde8353600f4291d64f96108 | |
3157c0b5 | 15 | Patch0: %{name}-vcontext-selinux.patch |
50fa2c36 | 16 | URL: http://userspace.selinuxproject.org/trac |
ba4f2429 JB |
17 | %ifarch ppc ppc64 sparc sparcv9 sparc64 |
18 | BuildRequires: gcc >= 5:3.4 | |
19 | %else | |
20 | BuildRequires: gcc >= 5:3.2 | |
21 | %endif | |
51212447 | 22 | BuildRequires: glibc-devel >= 6:2.3 |
4e401b41 | 23 | BuildRequires: libsepol-devel >= 2.0.0 |
bcfbd898 | 24 | %{?with_python:BuildRequires: libsepol-static} |
835f2e4f JB |
25 | %{?with_python:BuildRequires: python-devel} |
26 | %{?with_python:BuildRequires: rpm-pythonprov} | |
6b7a7bf6 | 27 | BuildRequires: sed >= 4.0 |
8d42c624 | 28 | %{?with_python:BuildRequires: swig-python} |
87678bda | 29 | Requires: glibc(tls) |
4e401b41 | 30 | Requires: libsepol >= 2.0.0 |
9b0e6c11 | 31 | Obsoletes: selinux-libs |
af1b8555 | 32 | Conflicts: SysVinit < 2.86-4 |
801180f1 | 33 | ExcludeArch: i386 |
c017911b | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
adb66b1f | 35 | |
36 | %description | |
37 | Security-enhanced Linux is a patch of the Linux kernel and a number | |
38 | of utilities with enhanced security functionality designed to add | |
39 | mandatory access controls to Linux. The Security-enhanced Linux kernel | |
40 | contains new architectural components originally developed to improve | |
41 | the security of the Flask operating system. These architectural | |
42 | components provide general support for the enforcement of many kinds | |
43 | of mandatory access control policies, including those based on the | |
44 | concepts of Type Enforcement, Role-based Access Control, and | |
45 | Multi-level Security. | |
46 | ||
47 | libselinux provides an API for SELinux applications to get and set | |
48 | process and file security contexts and to obtain security policy | |
49 | decisions. Required for any applications that use the SELinux API. | |
50 | ||
c75faa25 JR |
51 | %description -l pl.UTF-8 |
52 | Security-enhanced Linux jest prototypem jądra Linuksa i wielu | |
53 | aplikacji użytkowych o funkcjach podwyższonego bezpieczeństwa. | |
54 | Zaprojektowany jest tak, aby w prosty sposób ukazać znaczenie | |
55 | obowiązkowej kontroli dostępu dla społeczności linuksowej. Ukazuje | |
56 | również jak taką kontrolę można dodać do istniejącego systemu typu | |
57 | Linux. Jądro SELinux zawiera nowe składniki architektury pierwotnie | |
58 | opracowane w celu ulepszenia bezpieczeństwa systemu operacyjnego | |
59 | Flask. Te elementy zapewniają ogólne wsparcie we wdrażaniu wielu | |
60 | typów polityk obowiązkowej kontroli dostępu, włączając te wzorowane | |
61 | na: Type Enforcement (TE), kontroli dostępu opartej na rolach (RBAC) | |
1c016cbd | 62 | i zabezpieczeniach wielopoziomowych. |
06b84620 | 63 | |
c75faa25 JR |
64 | libselinux dostarcza API dla aplikacji SELinux aby mogły pobierać |
65 | i ustawiać procesy i konteksty plików w celu korzystania z polityki | |
66 | bezpieczeństwa. Biblioteka jest wymagana przez wszystkie aplikacje, | |
67 | które używają API SELinux. | |
adb66b1f | 68 | |
69 | %package devel | |
9f09f0e2 | 70 | Summary: Header files and devel documentation |
4967c211 | 71 | Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna |
9f09f0e2 | 72 | Group: Development/Libraries |
5e241984 | 73 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9b0e6c11 | 74 | Obsoletes: selinux-libs-devel |
adb66b1f | 75 | |
76 | %description devel | |
77 | Header files and devel documentation for SELinux libraries. | |
78 | ||
c75faa25 JR |
79 | %description devel -l pl.UTF-8 |
80 | Pliki nagłówkowe i dokumentacja programistyczna bibliotek SELinux. | |
adb66b1f | 81 | |
82 | %package static | |
9f09f0e2 | 83 | Summary: Static SELinux library |
4967c211 | 84 | Summary(pl.UTF-8): Biblioteki statyczne SELinux |
9f09f0e2 | 85 | Group: Development/Libraries |
5e241984 | 86 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
9b0e6c11 | 87 | Obsoletes: selinux-static |
adb66b1f | 88 | |
89 | %description static | |
90 | SELinux static libraries. | |
91 | ||
c75faa25 | 92 | %description static -l pl.UTF-8 |
adb66b1f | 93 | Biblioteki statyczne SELinux. |
94 | ||
95 | %package utils | |
9f09f0e2 | 96 | Summary: SELinux utils |
4967c211 | 97 | Summary(pl.UTF-8): Narzędzia SELinux |
9f09f0e2 | 98 | Group: Applications/System |
5e241984 | 99 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9b0e6c11 | 100 | Obsoletes: selinux-utils |
adb66b1f | 101 | |
102 | %description utils | |
103 | SELinux utils. | |
104 | ||
c75faa25 JR |
105 | %description utils -l pl.UTF-8 |
106 | Narzędzia SELinux. | |
adb66b1f | 107 | |
1531e56e JB |
108 | %package -n python-selinux |
109 | Summary: Python binding for SELinux library | |
4967c211 | 110 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki SELinux |
1531e56e JB |
111 | Group: Libraries/Python |
112 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
113 | ||
114 | %description -n python-selinux | |
115 | Python binding for SELinux library. | |
116 | ||
c75faa25 JR |
117 | %description -n python-selinux -l pl.UTF-8 |
118 | Wiązania Pythona do biblioteki SELinux. | |
1531e56e | 119 | |
adb66b1f | 120 | %prep |
121 | %setup -q | |
3157c0b5 | 122 | %patch0 -p1 |
adb66b1f | 123 | |
6b7a7bf6 JB |
124 | # "-z defs" doesn't mix with --as-needed when some object needs symbols from |
125 | # ld.so (because of __thread variable in this case) | |
126 | sed -i -e 's/-z,defs,//' src/Makefile | |
127 | ||
adb66b1f | 128 | %build |
50fa2c36 | 129 | %{__make} -j1 all %{?with_python:pywrap} \ |
06b84620 | 130 | CC="%{__cc}" \ |
3107b8b8 | 131 | LDFLAGS="%{rpmldflags}" \ |
835f2e4f | 132 | CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" \ |
e5a4fb52 | 133 | LIBDIR=%{_libdir} |
adb66b1f | 134 | |
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
06b84620 | 137 | |
e5a4fb52 | 138 | %{__make} install %{?with_python:install-pywrap} \ |
f9a14a1c JK |
139 | LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \ |
140 | SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" \ | |
e5a4fb52 | 141 | DESTDIR="$RPM_BUILD_ROOT" |
adb66b1f | 142 | |
c017911b | 143 | # make symlink across / absolute |
4c5842ce | 144 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libselinux.so.*) \ |
c017911b JB |
145 | $RPM_BUILD_ROOT%{_libdir}/libselinux.so |
146 | ||
adb66b1f | 147 | %clean |
148 | rm -rf $RPM_BUILD_ROOT | |
149 | ||
150 | %post -p /sbin/ldconfig | |
151 | %postun -p /sbin/ldconfig | |
152 | ||
153 | %files | |
154 | %defattr(644,root,root,755) | |
949e0ed7 | 155 | %doc ChangeLog LICENSE |
c017911b | 156 | %attr(755,root,root) /%{_lib}/libselinux.so.* |
adb66b1f | 157 | |
158 | %files devel | |
159 | %defattr(644,root,root,755) | |
c017911b | 160 | %attr(755,root,root) %{_libdir}/libselinux.so |
06b84620 | 161 | %{_includedir}/selinux |
4063d94d | 162 | %{_mandir}/man3/*.3* |
e18dd3a0 | 163 | %{_mandir}/man5/selabel_*.5* |
adb66b1f | 164 | |
165 | %files static | |
166 | %defattr(644,root,root,755) | |
167 | %{_libdir}/libselinux.a | |
168 | ||
169 | %files utils | |
170 | %defattr(644,root,root,755) | |
d11e9f1f | 171 | %attr(755,root,root) %{_sbindir}/* |
4063d94d | 172 | %{_mandir}/man8/*.8* |
1531e56e | 173 | |
835f2e4f | 174 | %if %{with python} |
1531e56e JB |
175 | %files -n python-selinux |
176 | %defattr(644,root,root,755) | |
f0f66b1d | 177 | %dir %{py_sitedir}/selinux |
178 | %attr(755,root,root) %{py_sitedir}/selinux/_selinux.so | |
179 | %attr(755,root,root) %{py_sitedir}/selinux/audit2why.so | |
180 | %{py_sitedir}/selinux/__init__.py | |
835f2e4f | 181 | %endif |