summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Vermeulen <swift@gentoo.org>2016-03-13 18:12:49 +0100
committerSven Vermeulen <swift@gentoo.org>2016-03-13 20:46:32 +0100
commitec7c7fbaca366eb86eec892b5dec1bd80e9bc647 (patch)
treea0547b295129be9cdfd029970bd3a28afa1d153b /sys-libs/libselinux
parentx11-drivers/xf86-video-intel: Remove old (diff)
downloadgentoo-ec7c7fbaca366eb86eec892b5dec1bd80e9bc647.tar.gz
gentoo-ec7c7fbaca366eb86eec892b5dec1bd80e9bc647.tar.bz2
gentoo-ec7c7fbaca366eb86eec892b5dec1bd80e9bc647.zip
sys-libs/libselinux: Bump to 2.5 release
Package-Manager: portage-2.2.26
Diffstat (limited to 'sys-libs/libselinux')
-rw-r--r--sys-libs/libselinux/Manifest1
-rw-r--r--sys-libs/libselinux/files/0007-build-related-fixes-bug-500674-for-2.5.patch69
-rw-r--r--sys-libs/libselinux/libselinux-2.5.ebuild147
-rw-r--r--sys-libs/libselinux/libselinux-9999.ebuild12
4 files changed, 224 insertions, 5 deletions
diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest
index f9ea8da6d95..6cfaca08948 100644
--- a/sys-libs/libselinux/Manifest
+++ b/sys-libs/libselinux/Manifest
@@ -1,5 +1,6 @@
DIST libselinux-2.2.2.tar.gz 171013 SHA256 30ab363416806da907b86b97f1d31c252473e3200358bb1570f563c8312b5a3e SHA512 1270cba11ec0795a2cea3706ac5547655d0e65dcd2141932000526f3d0c781b6ae114051b2bb53950b8ef207a318335329280b9fc9fd81796e8e4a27cf6ae841 WHIRLPOOL a444e44225ced35b126bbd2e8924aaf5c9f4da7abb9663d20a32b97babe750245c22d75e2238de0958b73295cf582b8aec39e23312886b96417120c600ed37dc
DIST libselinux-2.3.tar.gz 171254 SHA256 0b1e0b43ecd84a812713d09564019b08e7c205d89072b5cbcd07b052cd8e77b2 SHA512 8cfcd20ab0b43ffbb32389e0498b21e43cde643dcdf471a2354f1ca557f11641d250871ed5e71b9dde4c5f47ac1048746fe514f8f6cfad668fa179ed5136e802 WHIRLPOOL e975a391559aca3f8b251d2aa484cf8e344d09caa43ff56dd929e75a0ad195cf8d9a88b950679f589f4deb74aea0d22be4e7ad00b11eacc080288df0b5ac7ccb
DIST libselinux-2.4.tar.gz 165931 SHA256 46043091f4c5ba4f43e8d3715f30d665a2d571c9126c1f03945c9ea4ed380f7b SHA512 f7c7ceabcc6ca7bb5cb24fd04b8ea4771af7e509a11ce601fb50d52bd14b291ab6136b7f5193912d02b61b132a2fdd1666f229478598d0b20b99bdea0f5e69d6 WHIRLPOOL d1499818fc885c3bd07785d41466b4ea4bcf56fafe8cbc9bd1a517fe0d2d528b10911fa6df08756ca63aebc411fd69c7f01283685c8a858a81301e203dfd3ec2
+DIST libselinux-2.5.tar.gz 189019 SHA256 94c9e97706280bedcc288f784f67f2b9d3d6136c192b2c9f812115edba58514f SHA512 1c6718aa6fa05c8635427cd6f5a89ce47fb6bb9bd2fec417293122826695d1ebb0e0b86e83711abb5c4fe71c67dce6f2e18745592833d1711f0ab2d01246b8c7 WHIRLPOOL 96192b856d32a82b9b4413137085e69ad52cbf2e0d274603a90d904e9a318a80c83f337aef26f54c685a689972432955f0f9de67949e0bb4f844611df22d3589
DIST patchbundle-libselinux-2.2.2-r5.tar.gz 2304 SHA256 ad77f499c05ec3b5707cb9db518a891dd9c84ccb77db07e686c87e5799e1802c SHA512 a01db39a7aade27b0127dd0e2f3185587ff4d913b7b1be7beac36dc2d3e1007de5e6bae8a11bc84567385420fff064ba54892d8e113c8fd54ad3c598dde7648d WHIRLPOOL 5886d9de6fcf073d54ca5e0eac3f8b4754c44382e7044debb223f94ecc81ea0e26b7638037eef17eb6f8ce4cc5046a4bb9f93b9b7767480908ee5b2ced0413ac
DIST patchbundle-libselinux-4.tar.gz 2631 SHA256 91bf43c84ce3d3178c8d21fdcf97380a635fa2465d1611fe4e0e3838a586c78c SHA512 bd2f9762f095e3dbc67e77ee04968cb8e87d460fdf10feff91cb1ce6027e19a660bb57617887e44608d39720e8f95500c451c4b284d58c0a756a04b08fa305c2 WHIRLPOOL 07a6a69d33c46c443907aae2ae4f3646a0360565e28d0a50cbcf81f8b5d8c259812d3e086841fc21c2a8104ce9863fc6c9c1d32e28ea08ebc7baf2d45af3509f
diff --git a/sys-libs/libselinux/files/0007-build-related-fixes-bug-500674-for-2.5.patch b/sys-libs/libselinux/files/0007-build-related-fixes-bug-500674-for-2.5.patch
new file mode 100644
index 00000000000..67e47ad40a6
--- /dev/null
+++ b/sys-libs/libselinux/files/0007-build-related-fixes-bug-500674-for-2.5.patch
@@ -0,0 +1,69 @@
+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 -uNr libselinux-2.5.orig/src/Makefile libselinux-2.5/src/Makefile
+--- libselinux-2.5.orig/src/Makefile 2016-03-13 19:27:07.091000000 +0100
++++ libselinux-2.5/src/Makefile 2016-03-13 19:27:16.495000000 +0100
+@@ -73,7 +73,7 @@
+ -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 $(EMFLAGS)
++override CFLAGS += -I../include $(PCRE_CFLAGS) -D_GNU_SOURCE $(EMFLAGS)
+
+ 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
+@@ -102,17 +102,17 @@
+ $(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 $@ $^ -lpcre -ldl $(LDFLAGS) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -ldl $(PCRE_LIBS) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
+ ln -sf $@ $(TARGET)
+
+ $(LIBPC): $(LIBPC).in ../VERSION
+@@ -125,7 +125,7 @@
+ $(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 -uNr libselinux-2.5.orig/utils/Makefile libselinux-2.5/utils/Makefile
+--- libselinux-2.5.orig/utils/Makefile 2016-03-13 19:27:07.102000000 +0100
++++ libselinux-2.5/utils/Makefile 2016-03-13 19:27:40.297000000 +0100
+@@ -24,11 +24,12 @@
+ -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const \
+ -Werror -Wno-aggregate-return -Wno-redundant-decls
+ override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
+-LDLIBS += -L../src -lselinux -L$(LIBDIR)
++LDLIBS += -L../src -lselinux
+
+ TARGETS=$(patsubst %.c,%,$(wildcard *.c))
+
+-sefcontext_compile: LDLIBS += -lpcre ../src/libselinux.a -lsepol
++sefcontext_compile: CFLAGS += $(PCRE_FLAGS)
++sefcontext_compile: LDLIBS += $(PCRE_LIBS) -lsepol ../src/libselinux.a
+
+ selinux_restorecon: LDLIBS += -lsepol
+
diff --git a/sys-libs/libselinux/libselinux-2.5.ebuild b/sys-libs/libselinux/libselinux-2.5.ebuild
new file mode 100644
index 00000000000..ad21b65880a
--- /dev/null
+++ b/sys-libs/libselinux/libselinux-2.5.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 python3_5 )
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
+
+# No, I am not calling ruby-ng
+inherit multilib python-r1 toolchain-funcs eutils multilib-minimal
+
+MY_P="${P//_/-}"
+SEPOL_VER="${PV}"
+
+DESCRIPTION="SELinux userland library"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/${MY_P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
+
+IUSE="python ruby static-libs ruby_targets_ruby20 ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
+
+RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
+ >=dev-libs/libpcre-8.33-r1[static-libs?,${MULTILIB_USEDEP}]
+ python? ( ${PYTHON_DEPS} )
+ ruby? (
+ ruby_targets_ruby20? ( dev-lang/ruby:2.0 )
+ ruby_targets_ruby21? ( dev-lang/ruby:2.1 )
+ ruby_targets_ruby22? ( dev-lang/ruby:2.2 )
+ ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ python? ( >=dev-lang/swig-2.0.9 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/0005-use-ruby-include-with-rubylibver.patch"
+ epatch "${FILESDIR}/0007-build-related-fixes-bug-500674-for-2.5.patch"
+
+ epatch_user
+
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ tc-export PKG_CONFIG RANLIB
+ local PCRE_CFLAGS=$(${PKG_CONFIG} libpcre --cflags)
+ local PCRE_LIBS=$(${PKG_CONFIG} libpcre --libs)
+ export PCRE_{CFLAGS,LIBS}
+
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
+ LDFLAGS="-fPIC ${LDFLAGS} -pthread" \
+ all
+
+ if multilib_is_native_abi && use python; then
+ building() {
+ python_export PYTHON_INCLUDEDIR PYTHON_LIBPATH
+ emake \
+ CC="$(tc-getCC)" \
+ PYINC="-I${PYTHON_INCLUDEDIR}" \
+ PYTHONLIBDIR="${PYTHON_LIBPATH}" \
+ PYPREFIX="${EPYTHON##*/}" \
+ LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
+ pywrap
+ }
+ python_foreach_impl building
+ fi
+
+ if multilib_is_native_abi && use ruby; then
+ building() {
+ einfo "Calling rubywrap for ${1}"
+ # Clean up .lo file to force rebuild
+ rm -f src/selinuxswig_ruby_wrap.lo || die
+ emake \
+ CC="$(tc-getCC)" \
+ RUBY=${1} \
+ RUBYINSTALL=$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]') \
+ LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \
+ LIBDIR="\$(PREFIX)/$(get_libdir)" \
+ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
+ rubywrap
+ }
+ for RUBYTARGET in ${USE_RUBY}; do
+ use ruby_targets_${RUBYTARGET} || continue
+
+ building ${RUBYTARGET}
+ done
+ fi
+}
+
+multilib_src_install() {
+ LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
+ emake DESTDIR="${D}" install
+
+ if multilib_is_native_abi && use python; then
+ installation() {
+ LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" install-pywrap
+ python_optimize # bug 531638
+ }
+ python_foreach_impl installation
+ fi
+
+ if multilib_is_native_abi && use ruby; then
+ installation() {
+ einfo "Calling install-rubywrap for ${1}"
+ # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions
+ rm src/selinuxswig_ruby_wrap.lo
+ LIBDIR="\$(PREFIX)/$(get_libdir)" emake DESTDIR="${D}" \
+ RUBY=${1} \
+ RUBYINSTALL="${D}/$(${1} -e 'print RbConfig::CONFIG["vendorarchdir"]')" \
+ install-rubywrap
+ }
+ for RUBYTARGET in ${USE_RUBY}; do
+ use ruby_targets_${RUBYTARGET} || continue
+
+ installation ${RUBYTARGET}
+ done
+ fi
+
+ use static-libs || rm "${D}"/usr/lib*/*.a || die
+}
+
+pkg_postinst() {
+ # Fix bug 473502
+ for POLTYPE in ${POLICY_TYPES};
+ do
+ mkdir -p /etc/selinux/${POLTYPE}/contexts/files || die
+ touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local || die
+ # Fix bug 516608
+ for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do
+ if [[ -f ${EXPRFILE} ]]; then
+ sefcontext_compile /etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE} \
+ || die "Failed to recompile contexts"
+ fi
+ done
+ done
+}
diff --git a/sys-libs/libselinux/libselinux-9999.ebuild b/sys-libs/libselinux/libselinux-9999.ebuild
index 76ec5a6ff08..8539807bebd 100644
--- a/sys-libs/libselinux/libselinux-9999.ebuild
+++ b/sys-libs/libselinux/libselinux-9999.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
PYTHON_COMPAT=( python2_7 python3_3 python3_4 python3_5 )
-USE_RUBY="ruby19 ruby20"
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
# No, I am not calling ruby-ng
inherit multilib python-r1 toolchain-funcs eutils multilib-minimal
@@ -29,14 +29,16 @@ fi
LICENSE="public-domain"
SLOT="0"
-IUSE="python ruby static-libs ruby_targets_ruby19 ruby_targets_ruby20"
+IUSE="python ruby static-libs ruby_targets_ruby20 ruby_targets_ruby21 ruby_targets_ruby22 ruby_targets_ruby23"
RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}[${MULTILIB_USEDEP}]
>=dev-libs/libpcre-8.33-r1[static-libs?,${MULTILIB_USEDEP}]
python? ( ${PYTHON_DEPS} )
ruby? (
- ruby_targets_ruby19? ( dev-lang/ruby:1.9 )
ruby_targets_ruby20? ( dev-lang/ruby:2.0 )
+ ruby_targets_ruby21? ( dev-lang/ruby:2.1 )
+ ruby_targets_ruby22? ( dev-lang/ruby:2.2 )
+ ruby_targets_ruby23? ( dev-lang/ruby:2.3 )
)"
DEPEND="${RDEPEND}
virtual/pkgconfig
@@ -46,7 +48,7 @@ src_prepare() {
if [[ ${PV} != 9999 ]] ; then
# If needed for live builds, place them in /etc/portage/patches
epatch "${FILESDIR}/0005-use-ruby-include-with-rubylibver.patch"
- epatch "${FILESDIR}/0006-build-related-fixes-bug-500674.patch"
+ epatch "${FILESDIR}/0007-build-related-fixes-bug-500674-for-2.5.patch"
fi
epatch_user