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