diff options
author | Jason Zaman <perfinion@gentoo.org> | 2016-10-01 11:26:58 +0800 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2016-10-03 15:02:28 +0800 |
commit | d2e6a0825a951d92abe34fa7703ba89057eae912 (patch) | |
tree | ff9f7e3f57e65b1e3b0b395378d47475da072b91 /sys-libs/libselinux/files | |
parent | sys-libs/libsepol: bump to 2.6-rc1 (diff) | |
download | gentoo-d2e6a0825a951d92abe34fa7703ba89057eae912.tar.gz gentoo-d2e6a0825a951d92abe34fa7703ba89057eae912.tar.bz2 gentoo-d2e6a0825a951d92abe34fa7703ba89057eae912.zip |
sys-libs/libselinux: bump to 2.6-rc1
Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-libs/libselinux/files')
-rw-r--r-- | sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch | 39 | ||||
-rw-r--r-- | sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch | 91 |
2 files changed, 130 insertions, 0 deletions
diff --git a/sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch b/sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch new file mode 100644 index 000000000000..a2f704df7144 --- /dev/null +++ b/sys-libs/libselinux/files/libselinux-2.6-0005-use-ruby-include-with-rubylibver.patch @@ -0,0 +1,39 @@ +From 024a8628e698e8c90f7876a35c820f30c6957031 Mon Sep 17 00:00:00 2001 +From: Jason Zaman <jason@perfinion.com> +Date: Sun, 2 Oct 2016 02:06:35 +0800 +Subject: [PATCH] libselinux: versioned ruby pkg-config and query vendorarchdir + properly + +Gentoo and Arch have pkg-config entries for "ruby-$(RUBYLIBVER)" but not +for "ruby". Check if that exists first then fall back to plain ruby if +it does not. + +The ruby install paths were incorrect. Fedora 20 installed to +/usr/lib64/ruby/vendor_ruby/, Arch needs it to be vendor_ruby as well, +site_ruby does not work. Thanks to Nicolas Iooss for the correct way to +query for the path. + +Signed-off-by: Jason Zaman <jason@perfinion.com> +--- + libselinux/src/Makefile | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile +index 7169230..f9e3de1 100644 +--- libselinux/src/Makefile ++++ libselinux/src/Makefile +@@ -16,9 +16,8 @@ PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_i + PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) + PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) + RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")') +-RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') +-RUBYINC ?= $(shell $(PKG_CONFIG) --cflags ruby) +-RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) ++RUBYINC ?= $(shell $(PKG_CONFIG) --exists ruby-$(RUBYLIBVER) && $(PKG_CONFIG) --cflags ruby-$(RUBYLIBVER) || $(PKG_CONFIG) --cflags ruby) ++RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') + LIBBASE ?= $(shell basename $(LIBDIR)) + + VERSION = $(shell cat ../VERSION) +-- +2.7.3 + diff --git a/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch b/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch new file mode 100644 index 000000000000..83596e8e0a7f --- /dev/null +++ b/sys-libs/libselinux/files/libselinux-2.6-0007-build-related-fixes-bug-500674.patch @@ -0,0 +1,91 @@ +https://bugs.gentoo.org/500674 + +random fixes: +- make sure PCRE_CFLAGS get used +- use PCRE_LIBS via pkg-config +- move LDFLAGS to before objects, not after +- do not hardcode -L$(LIBDIR) (let the toolchain handle it) +- do not hardcode -I$(INCLUDEDIR) (let the toolchain handle it) + +diff --git a/libselinux/Makefile b/libselinux/Makefile +index baa0db3..4dc5aa0 100644 +--- libselinux/Makefile ++++ libselinux/Makefile +@@ -1,5 +1,6 @@ + SUBDIRS = src include utils man + ++PKG_CONFIG ?= pkg-config + DISABLE_SETRANS ?= n + DISABLE_RPM ?= n + ANDROID_HOST ?= n +@@ -20,10 +21,11 @@ export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST + + USE_PCRE2 ?= n + ifeq ($(USE_PCRE2),y) +- PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 +- PCRE_LDFLAGS := -lpcre2-8 ++ PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell $(PKG_CONFIG) --cflags libpcre2-8) ++ PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre2-8) + else +- PCRE_LDFLAGS := -lpcre ++ PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre) ++ PCRE_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpcre) + endif + export PCRE_CFLAGS PCRE_LDFLAGS + +diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile +index 13501cd..42cb2f6 100644 +--- libselinux/src/Makefile ++++ libselinux/src/Makefile +@@ -67,7 +67,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi + + PCRE_LDFLAGS ?= -lpcre + +-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) ++override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) + + SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \ + -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations +@@ -107,17 +107,17 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< + + $(SWIGSO): $(SWIGLOBJ) +- $(CC) $(CFLAGS) -shared -o $@ $< -L. -lselinux $(LDFLAGS) -L$(LIBDIR) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux + + $(SWIGRUBYSO): $(SWIGRUBYLOBJ) +- $(CC) $(CFLAGS) -shared -o $@ $^ -L. -lselinux $(LDFLAGS) -L$(LIBDIR) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux + + $(LIBA): $(OBJS) + $(AR) rcs $@ $^ + $(RANLIB) $@ + + $(LIBSO): $(LOBJS) +- $(CC) $(CFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(PCRE_LDFLAGS) -ldl -Wl,-soname,$(LIBSO),-z,defs,-z,relro + ln -sf $@ $(TARGET) + + $(LIBPC): $(LIBPC).in ../VERSION +@@ -130,7 +130,7 @@ $(AUDIT2WHYLOBJ): audit2why.c + $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< + + $(AUDIT2WHYSO): $(AUDIT2WHYLOBJ) +- $(CC) $(CFLAGS) -shared -o $@ $^ -L. $(LDFLAGS) -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lselinux $(LIBDIR)/libsepol.a + + %.o: %.c policy.h + $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $< +diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile +index e56a953..6fd205a 100644 +--- libselinux/utils/Makefile ++++ libselinux/utils/Makefile +@@ -25,7 +25,7 @@ CFLAGS ?= -O -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissi + -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \ + -Werror -Wno-aggregate-return -Wno-redundant-decls + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) +-LDLIBS += -L../src -lselinux -L$(LIBDIR) ++LDLIBS += -L../src -lselinux + PCRE_LDFLAGS ?= -lpcre + + ifeq ($(ANDROID_HOST),y) |