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