libselinux-2.4-6

- Build libselinux without rpm_execcon() (#1284019)
This commit is contained in:
Petr Lautrbach 2015-12-10 18:48:10 +01:00
parent 81637499f8
commit bc2c12a08f
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,31 @@
diff -up libselinux/include/selinux/selinux.h.rpm_execcon libselinux/include/selinux/selinux.h
--- libselinux/include/selinux/selinux.h.rpm_execcon 2015-12-02 21:18:25.000000000 +0100
+++ libselinux/include/selinux/selinux.h 2015-12-10 17:50:09.861577967 +0100
@@ -601,10 +601,12 @@ void fini_selinuxmnt(void);
* program, falling back to a new context with the specified type. */
extern int setexecfilecon(const char *filename, const char *fallback_type);
+#ifndef DISABLE_RPM
/* Execute a helper for rpm in an appropriate security context. */
extern int rpm_execcon(unsigned int verified,
const char *filename,
char *const argv[], char *const envp[]);
+#endif
/* Returns whether a file context is customizable, and should not
be relabeled . */
diff -up libselinux/src/Makefile.rpm_execcon libselinux/src/Makefile
--- libselinux/src/Makefile.rpm_execcon 2015-12-02 21:18:25.000000000 +0100
+++ libselinux/src/Makefile 2015-12-10 17:51:26.158784386 +0100
@@ -85,9 +85,9 @@ ifneq (,$(filter i386,$(ARCH)))
TLSFLAGS += -mno-tls-direct-seg-refs
endif
-SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
+SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./ $(EMFLAGS)
-SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./
+SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(EMFLAGS)
all: $(LIBA) $(LIBSO) $(LIBPC)

View File

@ -9,7 +9,7 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.4
Release: 5%{?dist}
Release: 6%{?dist}
License: Public Domain
Group: System Environment/Libraries
# https://github.com/SELinuxProject/selinux/wiki/Releases
@ -20,6 +20,8 @@ Url: https://github.com/SELinuxProject/selinux/wiki
# use make-rhat-patches.sh to create following patches from https://github.com/fedora-selinux/selinux/
# HEAD https://github.com/fedora-selinux/selinux/commit/8c09d34e464e79a602fb9c9408554279aede3b6b
Patch1: libselinux-rhat.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1284019
Patch10: libselinux-rpm_execcon.patch
BuildRequires: pkgconfig python-devel ruby-devel ruby libsepol-static >= %{libsepolver} swig pcre-devel xz-devel
%if 0%{?with_python3}
BuildRequires: python3-devel
@ -103,6 +105,7 @@ needed for developing SELinux applications.
%prep
%setup -q
%patch1 -p1 -b .rhat
%patch10 -p1 -b .rhat
%build
export LDFLAGS="%{?__global_ldflags}"
@ -248,6 +251,9 @@ rm -rf %{buildroot}
%{ruby_vendorarchdir}/selinux.so
%changelog
* Thu Dec 10 2015 Petr Lautrbach <plautrba@redhat.com> - 2.4-6
- Build libselinux without rpm_execcon() (#1284019)
* Thu Oct 15 2015 Robert Kuska <rkuska@redhat.com> - 2.4-5
- Rebuilt for Python3.5 rebuild