]>
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 |
7f19745b | 8 | Version: 2.0.94 |
e5f72d10 | 9 | Release: 3 |
fefe9db1 | 10 | License: Public Domain |
adb66b1f | 11 | Group: Libraries |
c11186ed | 12 | #git clone http://oss.tresys.com/git/selinux.git/ |
7f19745b | 13 | Source0: http://userspace.selinuxproject.org/releases/20100525/devel/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 544f75aab11c2af352facc51af12029f | |
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 | |
3f1ec040 | 59 | Flask. Te elementy zapewniają ogólne wsparcie we wdrażaniu wielu typów |
60 | polityk obowiązkowej kontroli dostępu, włączając te wzorowane na: | |
61 | Type Enforcement (TE), kontroli dostępu opartej na rolach (RBAC) | |
1c016cbd | 62 | i zabezpieczeniach wielopoziomowych. |
06b84620 | 63 | |
3f1ec040 | 64 | libselinux dostarcza API dla aplikacji SELinux aby mogły pobierać |
c75faa25 JR |
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} |
ba10bc43 | 74 | Requires: libsepol-devel |
9b0e6c11 | 75 | Obsoletes: selinux-libs-devel |
adb66b1f | 76 | |
77 | %description devel | |
78 | Header files and devel documentation for SELinux libraries. | |
79 | ||
c75faa25 JR |
80 | %description devel -l pl.UTF-8 |
81 | Pliki nagłówkowe i dokumentacja programistyczna bibliotek SELinux. | |
adb66b1f | 82 | |
83 | %package static | |
9f09f0e2 | 84 | Summary: Static SELinux library |
4967c211 | 85 | Summary(pl.UTF-8): Biblioteki statyczne SELinux |
9f09f0e2 | 86 | Group: Development/Libraries |
5e241984 | 87 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
9b0e6c11 | 88 | Obsoletes: selinux-static |
adb66b1f | 89 | |
90 | %description static | |
91 | SELinux static libraries. | |
92 | ||
c75faa25 | 93 | %description static -l pl.UTF-8 |
adb66b1f | 94 | Biblioteki statyczne SELinux. |
95 | ||
96 | %package utils | |
9f09f0e2 | 97 | Summary: SELinux utils |
4967c211 | 98 | Summary(pl.UTF-8): Narzędzia SELinux |
9f09f0e2 | 99 | Group: Applications/System |
5e241984 | 100 | Requires: %{name} = %{epoch}:%{version}-%{release} |
9b0e6c11 | 101 | Obsoletes: selinux-utils |
adb66b1f | 102 | |
103 | %description utils | |
104 | SELinux utils. | |
105 | ||
c75faa25 JR |
106 | %description utils -l pl.UTF-8 |
107 | Narzędzia SELinux. | |
adb66b1f | 108 | |
1531e56e JB |
109 | %package -n python-selinux |
110 | Summary: Python binding for SELinux library | |
4967c211 | 111 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki SELinux |
1531e56e JB |
112 | Group: Libraries/Python |
113 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
114 | ||
115 | %description -n python-selinux | |
116 | Python binding for SELinux library. | |
117 | ||
c75faa25 JR |
118 | %description -n python-selinux -l pl.UTF-8 |
119 | Wiązania Pythona do biblioteki SELinux. | |
1531e56e | 120 | |
adb66b1f | 121 | %prep |
122 | %setup -q | |
3157c0b5 | 123 | %patch0 -p1 |
adb66b1f | 124 | |
6b7a7bf6 JB |
125 | # "-z defs" doesn't mix with --as-needed when some object needs symbols from |
126 | # ld.so (because of __thread variable in this case) | |
127 | sed -i -e 's/-z,defs,//' src/Makefile | |
128 | ||
adb66b1f | 129 | %build |
50fa2c36 | 130 | %{__make} -j1 all %{?with_python:pywrap} \ |
06b84620 | 131 | CC="%{__cc}" \ |
3107b8b8 | 132 | LDFLAGS="%{rpmldflags}" \ |
835f2e4f | 133 | CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" \ |
e5a4fb52 | 134 | LIBDIR=%{_libdir} |
adb66b1f | 135 | |
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
06b84620 | 138 | |
e5a4fb52 | 139 | %{__make} install %{?with_python:install-pywrap} \ |
f9a14a1c JK |
140 | LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \ |
141 | SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" \ | |
e5a4fb52 | 142 | DESTDIR="$RPM_BUILD_ROOT" |
adb66b1f | 143 | |
c017911b | 144 | # make symlink across / absolute |
4c5842ce | 145 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libselinux.so.*) \ |
c017911b JB |
146 | $RPM_BUILD_ROOT%{_libdir}/libselinux.so |
147 | ||
adb66b1f | 148 | %clean |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
151 | %post -p /sbin/ldconfig | |
152 | %postun -p /sbin/ldconfig | |
153 | ||
154 | %files | |
155 | %defattr(644,root,root,755) | |
949e0ed7 | 156 | %doc ChangeLog LICENSE |
c017911b | 157 | %attr(755,root,root) /%{_lib}/libselinux.so.* |
adb66b1f | 158 | |
159 | %files devel | |
160 | %defattr(644,root,root,755) | |
c017911b | 161 | %attr(755,root,root) %{_libdir}/libselinux.so |
3f14fe48 | 162 | %{_pkgconfigdir}/libselinux.pc |
06b84620 | 163 | %{_includedir}/selinux |
4063d94d | 164 | %{_mandir}/man3/*.3* |
e18dd3a0 | 165 | %{_mandir}/man5/selabel_*.5* |
adb66b1f | 166 | |
167 | %files static | |
168 | %defattr(644,root,root,755) | |
169 | %{_libdir}/libselinux.a | |
170 | ||
171 | %files utils | |
172 | %defattr(644,root,root,755) | |
d11e9f1f | 173 | %attr(755,root,root) %{_sbindir}/* |
71882c4e | 174 | %attr(755,root,root) /sbin/matchpathcon |
4063d94d | 175 | %{_mandir}/man8/*.8* |
1531e56e | 176 | |
835f2e4f | 177 | %if %{with python} |
1531e56e JB |
178 | %files -n python-selinux |
179 | %defattr(644,root,root,755) | |
f0f66b1d | 180 | %dir %{py_sitedir}/selinux |
181 | %attr(755,root,root) %{py_sitedir}/selinux/_selinux.so | |
182 | %attr(755,root,root) %{py_sitedir}/selinux/audit2why.so | |
183 | %{py_sitedir}/selinux/__init__.py | |
835f2e4f | 184 | %endif |