From eeaec68a4f6684df6ea7d943ebae7bbb437cfe74d5158942dc860a6ec6b5a178 Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Wed, 12 Dec 2018 09:16:33 +0000 Subject: [PATCH] Accepting request 657416 from home:jsegitz:branches:security:SELinux - Update to version 2.8 (bsc#1111732). For changes please see https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/RELEASE-20180524.txt - ran spec-cleaner on spec files For changes please see https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/RELEASE-20170804.txt For changes please see https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/RELEASE-20180524.txt - ran spec-cleaner on spec files For changes please see https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/RELEASE-20170804.txt OBS-URL: https://build.opensuse.org/request/show/657416 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libselinux?expand=0&rev=103 --- libselinux-bindings.changes | 7 ++++- libselinux-bindings.spec | 32 +++++++++------------ libselinux.changes | 5 ++++ libselinux.spec | 56 ++++++++++++++++--------------------- 4 files changed, 48 insertions(+), 52 deletions(-) diff --git a/libselinux-bindings.changes b/libselinux-bindings.changes index 3838865..ee269dd 100644 --- a/libselinux-bindings.changes +++ b/libselinux-bindings.changes @@ -1,7 +1,10 @@ ------------------------------------------------------------------- Wed Oct 17 11:48:30 UTC 2018 - jsegitz@suse.com -- Update to version 2.8 (bsc#1111732) +- Update to version 2.8 (bsc#1111732). + For changes please see + https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/RELEASE-20180524.txt +- ran spec-cleaner on spec files ------------------------------------------------------------------- Mon May 14 22:50:42 UTC 2018 - mcepl@cepl.eu @@ -9,6 +12,8 @@ Mon May 14 22:50:42 UTC 2018 - mcepl@cepl.eu - Update to version 2.7. * %files needed to be heavily modified * Based expressly on python3, not just python + For changes please see + https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/RELEASE-20170804.txt ------------------------------------------------------------------- Fri Mar 16 15:25:10 UTC 2018 - jsegitz@suse.com diff --git a/libselinux-bindings.spec b/libselinux-bindings.spec index 30b992c..99596a7 100644 --- a/libselinux-bindings.spec +++ b/libselinux-bindings.spec @@ -17,17 +17,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} - %define libsepol_ver 2.8 - Name: libselinux-bindings Version: 2.8 Release: 0 Summary: SELinux runtime library and simple utilities License: GPL-2.0-only AND SUSE-Public-Domain Group: Development/Libraries/C and C++ -Url: https://github.com/SELinuxProject/selinux/wiki/Releases - +URL: https://github.com/SELinuxProject/selinux/wiki/Releases # embedded is the MD5 Source: https://github.com/SELinuxProject/selinux/archive/libselinux-%{version}.tar.gz Source1: selinux-ready @@ -35,7 +32,6 @@ Source2: baselibs.conf Patch3: python3.patch # PATCH-FIX-UPSTREAM Include for readv prototype Patch4: readv-proto.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libsepol-devel-static >= %{libsepol_ver} BuildRequires: pcre-devel BuildRequires: python-rpm-macros @@ -48,16 +44,16 @@ libselinux provides an interface to get and set process and file security contexts and to obtain security policy decisions. %package -n python3-selinux +%define oldpython python Summary: Python bindings for the SELinux runtime library License: SUSE-Public-Domain Group: Development/Libraries/Python -%define oldpython python +Requires: libselinux1 = %{version} +Requires: python3 %ifpython2 Obsoletes: %{oldpython}-selinux < %{version} Provides: %{oldpython}-selinux = %{version} %endif -Requires: libselinux1 = %{version} -Requires: python3 %description -n python3-selinux libselinux provides an interface to get and set process and file @@ -86,30 +82,28 @@ language. %patch4 -p1 %build -make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src V=1 -make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src swigify V=1 -make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src pywrap V=1 -make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="$RPM_OPT_FLAGS" -C src rubywrap V=1 +make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags}" -C src V=1 +make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags}" -C src swigify V=1 +make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags}" -C src pywrap V=1 +make %{?_smp_mflags} LIBDIR="%{_libdir}" CFLAGS="%{optflags}" -C src rubywrap V=1 %install -make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" \ +make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" \ SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a \ -C src install V=1 -make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" \ +make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" \ SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a \ -C src install-pywrap V=1 -make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" \ +make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" \ SHLIBDIR="/%{_lib}" LIBSEPOLA=%{_libdir}/libsepol.a \ -C src install-rubywrap V=1 -rm -rf $RPM_BUILD_ROOT/%{_lib} $RPM_BUILD_ROOT%{_libdir}/libselinux.* \ - $RPM_BUILD_ROOT%{_libdir}/pkgconfig +rm -rf %{buildroot}/%{_lib} %{buildroot}%{_libdir}/libselinux.* \ + %{buildroot}%{_libdir}/pkgconfig %files -n python3-selinux -%defattr(-,root,root,-) %{python3_sitearch}/*selinux* %files -n ruby-selinux -%defattr(-,root,root,-) %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}/selinux.so %changelog diff --git a/libselinux.changes b/libselinux.changes index 3711232..664ce80 100644 --- a/libselinux.changes +++ b/libselinux.changes @@ -2,6 +2,9 @@ Wed Oct 17 11:48:30 UTC 2018 - jsegitz@suse.com - Update to version 2.8 (bsc#1111732) + For changes please see + https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20180524/RELEASE-20180524.txt +- ran spec-cleaner on spec files ------------------------------------------------------------------- Mon May 14 22:45:54 UTC 2018 - mcepl@cepl.eu @@ -9,6 +12,8 @@ Mon May 14 22:45:54 UTC 2018 - mcepl@cepl.eu - Update to version 2.7. * %files needed to be heavily modified * Based expressly on python3, not just python + For changes please see + https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20170804/RELEASE-20170804.txt ------------------------------------------------------------------- Fri Nov 24 09:09:02 UTC 2017 - jsegitz@suse.com diff --git a/libselinux.spec b/libselinux.spec index ef10510..69d79df 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -17,26 +17,23 @@ %define libsepol_ver 2.8 - Name: libselinux Version: 2.8 Release: 0 Summary: SELinux runtime library and utilities License: GPL-2.0-only AND SUSE-Public-Domain Group: Development/Libraries/C and C++ -Url: https://github.com/SELinuxProject/selinux/wiki/Releases - +URL: https://github.com/SELinuxProject/selinux/wiki/Releases Source: https://github.com/SELinuxProject/selinux/archive/libselinux-%{version}.tar.gz Source1: selinux-ready Source2: baselibs.conf Patch3: python3.patch # PATCH-FIX-UPSTREAM Include for readv prototype Patch4: readv-proto.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes BuildRequires: libsepol-devel >= %{libsepol_ver} BuildRequires: pcre-devel -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: python3 %description @@ -103,39 +100,37 @@ necessary to develop your own software using libselinux. %patch4 -p1 %build -make %{?_smp_mflags} LIBDIR="%{_libdir}" CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} LIBDIR="%{_libdir}" CC="gcc" CFLAGS="%{optflags}" %install -mkdir -p $RPM_BUILD_ROOT/%{_lib} -mkdir -p $RPM_BUILD_ROOT%{_libdir} -mkdir -p $RPM_BUILD_ROOT%{_includedir} -mkdir -p $RPM_BUILD_ROOT%{_sbindir} -make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" BINDIR="%{_sbindir}" install -rm -f $RPM_BUILD_ROOT%{_sbindir}/compute_* -rm -f $RPM_BUILD_ROOT%{_sbindir}/deftype -rm -f $RPM_BUILD_ROOT%{_sbindir}/execcon -rm -f $RPM_BUILD_ROOT%{_sbindir}/getenforcemode -rm -f $RPM_BUILD_ROOT%{_sbindir}/getfilecon -rm -f $RPM_BUILD_ROOT%{_sbindir}/getpidcon -rm -f $RPM_BUILD_ROOT%{_sbindir}/mkdircon -rm -f $RPM_BUILD_ROOT%{_sbindir}/policyvers -rm -f $RPM_BUILD_ROOT%{_sbindir}/setfilecon -rm -f $RPM_BUILD_ROOT%{_sbindir}/selinuxconfig -rm -f $RPM_BUILD_ROOT%{_sbindir}/selinuxdisable -rm -f $RPM_BUILD_ROOT%{_sbindir}/getseuser -rm -f $RPM_BUILD_ROOT%{_sbindir}/selinux_check_securetty_context -mv $RPM_BUILD_ROOT%{_sbindir}/getdefaultcon $RPM_BUILD_ROOT%{_sbindir}/selinuxdefcon -mv $RPM_BUILD_ROOT%{_sbindir}/getconlist $RPM_BUILD_ROOT%{_sbindir}/selinuxconlist -install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/selinux-ready +mkdir -p %{buildroot}/%{_lib} +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_sbindir} +make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" BINDIR="%{_sbindir}" install +rm -f %{buildroot}%{_sbindir}/compute_* +rm -f %{buildroot}%{_sbindir}/deftype +rm -f %{buildroot}%{_sbindir}/execcon +rm -f %{buildroot}%{_sbindir}/getenforcemode +rm -f %{buildroot}%{_sbindir}/getfilecon +rm -f %{buildroot}%{_sbindir}/getpidcon +rm -f %{buildroot}%{_sbindir}/mkdircon +rm -f %{buildroot}%{_sbindir}/policyvers +rm -f %{buildroot}%{_sbindir}/setfilecon +rm -f %{buildroot}%{_sbindir}/selinuxconfig +rm -f %{buildroot}%{_sbindir}/selinuxdisable +rm -f %{buildroot}%{_sbindir}/getseuser +rm -f %{buildroot}%{_sbindir}/selinux_check_securetty_context +mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon +mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist +install -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/selinux-ready # Remove duplicate files %fdupes -s %{buildroot}%{_mandir} %post -n libselinux1 -p /sbin/ldconfig - %postun -n libselinux1 -p /sbin/ldconfig %files -n selinux-tools -%defattr(-,root,root,-) %{_sbindir}/avcstat %{_sbindir}/getenforce %{_sbindir}/getsebool @@ -158,18 +153,15 @@ install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/selinux-ready %{_mandir}/man8/* %files -n libselinux1 -%defattr(-,root,root,-) /%{_lib}/libselinux.so.* %files devel -%defattr(-,root,root,-) %{_libdir}/libselinux.so %{_includedir}/selinux/ %{_mandir}/man3/* %{_libdir}/pkgconfig/libselinux.pc %files devel-static -%defattr(-,root,root,-) %{_libdir}/libselinux.a %changelog