conf->policyvers = sepol_policy_kern_vers_max();
conf->target_platform = SEPOL_TARGET_SELINUX;
conf->expand_check = 1;
---- libsemanage-2.4/src/Makefile.orig 2015-02-02 15:38:10.000000000 +0100
-+++ libsemanage-2.4/src/Makefile 2015-10-25 16:33:33.496185556 +0100
-@@ -9,6 +9,7 @@
+--- libsemanage-2.7/src/Makefile.orig 2017-08-04 15:31:00.000000000 +0200
++++ libsemanage-2.7/src/Makefile 2017-11-16 15:56:27.007173590 +0100
+@@ -10,6 +10,7 @@
# Installation directories.
PREFIX ?= $(DESTDIR)/usr
LIBDIR ?= $(PREFIX)/lib
+LIBEXECDIR ?= $(PREFIX)/libexec
SHLIBDIR ?= $(DESTDIR)/lib
INCLUDEDIR ?= $(PREFIX)/include
- PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])')
-@@ -60,7 +61,7 @@
+ PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX))
+@@ -61,7 +62,7 @@
SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \
-Wno-unused-parameter
--override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE
-+override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -DLIBEXECDIR=\"$(LIBEXECDIR)\"
+-override CFLAGS += -I../include -D_GNU_SOURCE
++override CFLAGS += -I../include -D_GNU_SOURCE -DLIBEXECDIR=\"$(LIBEXECDIR)\"
RANLIB ?= ranlib
SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
Summary: An interface for SELinux management
Summary(pl.UTF-8): Interfejs do zarządzania SELinuksem
Name: libsemanage
-Version: 2.6
+Version: 2.7
Release: 1
License: LGPL v2.1+
Group: Libraries
#Source0Download: https://github.com/SELinuxProject/selinux/wiki/Releases
-Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20161014/%{name}-%{version}.tar.gz
-# Source0-md5: 666a48c4058c07f2b07ede9eaf210c5f
+Source0: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/%{name}-%{version}.tar.gz
+# Source0-md5: a6b5c451fbe45ff9e3e0e65f2db0ae1d
Patch0: %{name}-libexecdir.patch
URL: https://github.com/SELinuxProject/selinux/wiki
BuildRequires: bison
BuildRequires: bzip2-devel
BuildRequires: flex
-BuildRequires: libselinux-devel >= 2.6
-BuildRequires: libsepol-devel >= 2.6
+BuildRequires: libselinux-devel >= 2.7
+BuildRequires: libsepol-devel >= 2.7
%{?with_python2:BuildRequires: python-devel >= 2}
%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
-BuildRequires: ustr-devel
-Requires: libselinux >= 2.6
-Requires: libsepol >= 2.6
+Requires: libselinux >= 2.7
+Requires: libsepol >= 2.7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki semanage
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
-Requires: python-selinux >= 2.6
+Requires: python-selinux >= 2.7
%description -n python-semanage
Python 2 binding for semanage library.
Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki semanage
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
-Requires: python3-selinux >= 2.6
+Requires: python3-selinux >= 2.7
%description -n python3-semanage
Python 3 binding for semanage library.
LIBEXECDIR=$RPM_BUILD_ROOT%{_libdir} \
SHLIBDIR=$RPM_BUILD_ROOT/%{_lib} \
PYPREFIX=python2 \
+ PYSITEDIR=$RPM_BUILD_ROOT%{py_sitedir} \
PYTHON=%{__python} \
DESTDIR=$RPM_BUILD_ROOT
LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
LIBEXECDIR=$RPM_BUILD_ROOT%{_libdir} \
PYPREFIX=python3 \
+ PYSITEDIR=$RPM_BUILD_ROOT%{py3_sitedir} \
PYTHON=%{__python3} \
DESTDIR=$RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc ChangeLog
-%attr(755,root,root) /%{_lib}/libsemanage.so.*
+%attr(755,root,root) /%{_lib}/libsemanage.so.1
%dir %{_sysconfdir}/selinux
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/selinux/semanage.conf
%dir %{_libdir}/selinux
%if %{with python3}
%files -n python3-semanage
%defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/_semanage.so
+%attr(755,root,root) %{py3_sitedir}/_semanage.cpython-*.so
%{py3_sitedir}/semanage.py
%{py3_sitedir}/__pycache__/semanage.cpython-*.py[co]
%endif