diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-03-08 22:11:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-03-08 22:11:34 +0000 |
commit | 81a85447363c46dda89d49055935959a57edbf1b (patch) | |
tree | d0cdcadae2c1c5a9a57047b378d4de6424f105b5 | |
parent | fixed compile with >=vdr-2.1.3, thx to E.Seifert on wrt bug 503452 (diff) | |
download | historical-81a85447363c46dda89d49055935959a57edbf1b.tar.gz historical-81a85447363c46dda89d49055935959a57edbf1b.tar.bz2 historical-81a85447363c46dda89d49055935959a57edbf1b.zip |
Clean up linking behavior #500674 by SpanKY.
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
-rw-r--r-- | sys-libs/libselinux/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/libselinux/Manifest | 24 | ||||
-rw-r--r-- | sys-libs/libselinux/files/libselinux-2.2.2-build.patch | 68 | ||||
-rw-r--r-- | sys-libs/libselinux/libselinux-2.2.2-r3.ebuild | 92 |
4 files changed, 183 insertions, 9 deletions
diff --git a/sys-libs/libselinux/ChangeLog b/sys-libs/libselinux/ChangeLog index cc2c7bfd59ff..6f68120aa4d3 100644 --- a/sys-libs/libselinux/ChangeLog +++ b/sys-libs/libselinux/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/libselinux # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.112 2014/03/04 20:41:11 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/ChangeLog,v 1.113 2014/03/08 22:11:32 vapier Exp $ + +*libselinux-2.2.2-r3 (08 Mar 2014) + + 08 Mar 2014; Mike Frysinger <vapier@gentoo.org> + +files/libselinux-2.2.2-build.patch, +libselinux-2.2.2-r3.ebuild: + Clean up linking behavior #500674 by SpanKY. 04 Mar 2014; Samuli Suominen <ssuominen@gentoo.org> libselinux-2.2.2-r2.ebuild: diff --git a/sys-libs/libselinux/Manifest b/sys-libs/libselinux/Manifest index d3808a5ebfd7..c4f69588f8f2 100644 --- a/sys-libs/libselinux/Manifest +++ b/sys-libs/libselinux/Manifest @@ -4,6 +4,7 @@ Hash: SHA256 AUX libselinux-2.1.12-mountsys.patch 967 SHA256 eb786a19484663705a291a68f1183d4783090d3e00d690142bd47ee78a795df2 SHA512 d329c7be25e77a2017599fe7efd624194e5785bae19ddafbde288791d59072b832f8a82870782f4d229ce99009f7a3960bee6ef9de1e392286e08d45c04aa68c WHIRLPOOL d41eb6cb064f7f0e31b0032ab150e80568af56ac5cae4d9d89e923ad419cde131454b6bc6748de6c6b241fce7e0d6f17b3fdb821f77b07df9bd652902ae5450b AUX libselinux-2.1.9-mountsys.patch 957 SHA256 ab2c728464411d3d44d19afe79ebcfa0f7d69445245a505e330cf051ea65ed35 SHA512 c9d2df56f1513ea973d231d31ff958e419b7a64c882bfdaae0554752d847cc98885e27ef21f1a0ce821c05c376ee5d9140fc1f8f7009fd69e3b56eccfa709f0d WHIRLPOOL df27d264eafdc98e8e947c4c1d970a7dd693f465cd06163cc72de10b1433ea47b6d1e782dd38e100d7189d424d65fe81d8282423c623e89e8b1f0d99121cfc01 AUX libselinux-2.1.9-support_ruby19.patch 635 SHA256 095b618bdbf786545d552fbc25ab91369d4b9dbc72764c3379706b65bb6f106c SHA512 bd1150a12097ae0dfd0c34b0e1742fef3af9a8ccff921a6a64f8abe24a681db9d5a8936ecc0eb973119c5d33712834a85998dd6a057aa0cbcebdc9455b6ac217 WHIRLPOOL 7c74fff046041fd99d4c6ca66401208752bf489415807dd02f4a7a699b12741a0a838a8de8ddbc72cff8c158efc0ed02e8f2555023d9398b9e411183babcd280 +AUX libselinux-2.2.2-build.patch 2872 SHA256 206f9047d71ed149bafd36c2144a5ab4be5213e40f77fd4e0f9718da3b0af78a SHA512 221abc9f2e2ab0f57fcd3084e03590d6f77d35faf63ea6fe980114085ff9fb8de97af394dbb9c803788caf2832bb70a61d1e6305cc771fd67cd4c74718e45823 WHIRLPOOL e8b3e6ebd1f3ee1b9e46634c87fee2d669fda4115aa1137d37257de5276cc77798a20e12122622de40cfa9f8e7e75b9c214ba8a64727528a81c010961aeae183 DIST libselinux-2.1.13.tar.gz 168931 SHA256 57aad47c06b7ec18a76e8d9870539277a84cb40109cfdcf70ed3260bdb04447a SHA512 e0f922a7b71e944f7cde8cc99f74654aa6d1018ebe9b6186a4f9bc2bc1a06f515ea9d2ea8b9d7718bea481e9311a47943b0bf7cd1344a739ea960f62f9cd59a6 WHIRLPOOL 8b907756719fca6038a38ca54a9d3d7571e17abf142c54349c12e072c2e0ef7f2ce020f5e92ad647d8b822c634aad09c0ef7063675ed8b2f098f877ddfec9fc4 DIST libselinux-2.2.1.tar.gz 171057 SHA256 d720209532b77f84d4abdf55882206d10442fda5fee4e2d6cb20309fac8e789f SHA512 a0f698c5c83fb43a92f86fc8663a730d95aca390421bfa3056fb33510978f4069c5a7dcf92a377425e5d4fb1e3efdc4ce5eb5d396ba2caf36bdd81d91f28d6a5 WHIRLPOOL 223e142546442d5f0b4e1fa3fdd9eb3f01e62a07a5f8801fa4e79e376c08a1492364cc049c2d3f0735da612eaf2a162df5449c71ede3869c8e9e05f9d28e7497 DIST libselinux-2.2.2.tar.gz 171013 SHA256 30ab363416806da907b86b97f1d31c252473e3200358bb1570f563c8312b5a3e SHA512 1270cba11ec0795a2cea3706ac5547655d0e65dcd2141932000526f3d0c781b6ae114051b2bb53950b8ef207a318335329280b9fc9fd81796e8e4a27cf6ae841 WHIRLPOOL a444e44225ced35b126bbd2e8924aaf5c9f4da7abb9663d20a32b97babe750245c22d75e2238de0958b73295cf582b8aec39e23312886b96417120c600ed37dc @@ -22,16 +23,23 @@ EBUILD libselinux-2.2-r1.ebuild 3311 SHA256 4238a6a7ec222a1dc66cec000f7f148e2dfc EBUILD libselinux-2.2.1-r1.ebuild 3323 SHA256 6822e1a6ea3869654c68e0196a1e089c8bc1d66d3e34b4b3c5c7814bc0416f63 SHA512 3451911e348714ce3c3641ee16f9ed14c7d110765c144dfa586ce58f0382998e478dd9ba7255422a2eb229a8bf4eafbfef7cfc5d037b0e3272d06e70636931ee WHIRLPOOL 350c383d42b43acd8c56ee26b70c5add1f51f2d8f544bddf86e8a7a2373f89c7c6dcea87ed053815c6b332eaee19b4a80e898adaa0f8875157d7abcad8f42df9 EBUILD libselinux-2.2.2-r1.ebuild 2140 SHA256 deff00397bb716ad79f3993bd80f978cb61cff7c1333320921369a324d3b334e SHA512 09a4b0ae46f95018ab53eaed1bda97b7d811afdb1d1d8565465e959ec27a5acee3a8eef77b30a566ee97fd5cd12672dfe4cdf67912ee0d86511fe7563082eb25 WHIRLPOOL f09eb9ab689657d7148e4acef7707186fce95510a81a1d4c9e191b2cbaf8d99b4af47918239cebf94e5ed591786a7a6ab9b269e46b2119b95ac6a60011cf6625 EBUILD libselinux-2.2.2-r2.ebuild 2257 SHA256 d710376bb101c5961e57aedc04d22571be6a5c941f3cd647ed10d8a4a848fe71 SHA512 0b2c63c7028925c6156cf20cae7fdc306eb0809bd090d0195899c8fd642f9116477bc8f93ca28aefb359d936a6041fc26bd31299d24da8e96dcb71542d999c20 WHIRLPOOL b7e09a45126795a291074aef4c1a46d676e3ff1bb23741ddd8c1eb68c32f32a1819d8039472acb5de870e82556744201f5729550d8a21934080a13131007bf03 -MISC ChangeLog 16293 SHA256 22dcf6339991c16f0a94eff349015a224ed822f8f8647c1657f049eb50532467 SHA512 9f3f15eb3ba663311ae1e824c4b4af0695b9a65856c3401fb87cd33f7d171109b0425f42d1c7e7f1f31fae155eaeef8d35eb8dbb2e75245c7780aa70c1465ec9 WHIRLPOOL 5785b52b218feaa24b2b6e685c08ee536330556de8b305ca86c7ea3bf1d58f20c353a7a9d6b18adacf9e3e2c319836ab58fc88104883e6fa29b5f8d3ee4bf54c +EBUILD libselinux-2.2.2-r3.ebuild 2411 SHA256 0fb3c89874dcf8f885f69dc004f3b73e72be1fa55b0cd99d09c9ad82bbfcb9fe SHA512 5a0439de7c18cd9ad37f26a5de939855aba7eab123e0148f77950653ce18aa82755dc92c200819862b4cd5f7e40fa52d781cd86a96c7042557c5688fd45c6812 WHIRLPOOL 9eb3e10c9b5608b80e78b66ba73d5c5ce574f9c45adb59f2752ed760f9aa31a61ccd0968256f184790758a9834457d99c5b215dfed2fb8cba7b87e179aa791d0 +MISC ChangeLog 16492 SHA256 4d8853115092201b0fe830b8496888ae6bf3450ee64b564dd01a9704b4c0b3f1 SHA512 ad82e1a117bbfe40eccfc07d3b01c39058c41aad1d971cb2225595066316af202e819804900d5d270e4cf88ea03457e4c89c73a854e20dfefbc1538a17d1a084 WHIRLPOOL f14ea8788102113c7dde0bf71cab59d1795d54b30e1836b33d5a7bb05606cf7512921aa91d9e02c6212308bc3c78454bbd924a6519ccea784fc30c59bff3e323 MISC metadata.xml 406 SHA256 934da6149d008c09754c0654dbea6c49da117923adc6fbf3fcabac58195b9c45 SHA512 5bd2b0637c4d77b6113540dff5c4253390b1fcc69b864aaf2196d2c6e8c2c10fbb06bfcb69ba73978e3a2c3ca60fc6e4eccc0ea02a818b34a66c137f993a33a0 WHIRLPOOL f34ec6f0a7f35b9c2a8f29688fc58b6228484e3ba0568d65b6d8e24cc91662b6704ea532e036cf0a6ceca83b4e118bb7c8a64c6c4ba45bd60e2fa2d73d2d2abd -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) -iQEcBAEBCAAGBQJTFjmwAAoJEEdUh39IaPFNBEkH/3H1P+bOKztf+ym0ggzk4Zbi -GujzzgNCMHdpl10SmruAvMqFZLt5X9/gBHS51SnwwdIcbu9VLo2riC6VWM/yEECK -ryXD7BPC78C1CCHb8GS7GDRT6ZL1iqcmDmqP8Ad4ZGgYrB8uL9pCEIfQYdd2HMDK -TBEDzI3BUclzjRFgFYLcLvZtleMUxQuWMjaWvqtv4KHDRQATvnd1Eup9aAbTf1u8 -34Ew+TU5UjFMRJyM9qbdQCFs8NKz3MbH0ipRz3qEH7fAlaptCfqB4L5jWtpNbnrD -We9uA1QlwmxQf/EMI4UeLvsTCON5uX/ZSfgO8dPqDPFfx1d5sQxlib/8aP5woOQ= -=uNrz +iQIcBAEBCAAGBQJTG5WZAAoJEPGu1DbS6WIAnd8P/0o6uwyOryITtGneCxLZb200 +tDTneFAFhQrragE6vGU97CCad7IqcSBdJb3CE4rgtjUVbgisX/1noiWlM5A503FA +ke5JRo0A4d/8vjarYu2JvE+ro4JsT5oXZ5ZxdfimUPmQ7McgdLfQ/cjaD4q7Q2Le +IRrfxP/7ZQoPMejhWKB+9ScemYD1WLAhRpwhKKjf4U/SrW/flcRHsGYWwkUcKRnl +EzXY5CYJMZPGxQd3x19lk130EbmD/cyGG4g7XP+KvtKZSJmYEN/NO1hrwta/tSEq +zB7AUVuiixp+4MnQ6iMM4CYYBR47zvCgtBhk3XMGtPTu1Gt9k5IqNE4Yk19Asltr +9gH+cHd0Fz0oPqu85hiLmHG1GawruXetG7hNOULMm1CV0ya98Sf1mcwxRdWTOpmG +KqjCj4Tap3+R+yJ6En/DB4vHDM7eoMt/7LjF9gtGtSacCmxB0/uVHjakAEA80Tjc +3cf3K2vS9uTgNdIdE3AjVZ1JXOpaLJAzLPCa8fBuCeeX1Y4hE+4j7noGA2hckFa1 +KXxXpKThL9KfhKOCl358q8zX/GsNCDolTL3Tduex3wIFjOK/sAzSiHl3Qqhfi5Iu +m+ChseJCGcpL3rnhL9By5KjMePeob6+och5fAmb386UsE0CheQ2WJ2CoNGeQffrm +hR2ZOHdHIUvJMjbHRvH1 +=be1C -----END PGP SIGNATURE----- diff --git a/sys-libs/libselinux/files/libselinux-2.2.2-build.patch b/sys-libs/libselinux/files/libselinux-2.2.2-build.patch new file mode 100644 index 000000000000..4a32f5b798ce --- /dev/null +++ b/sys-libs/libselinux/files/libselinux-2.2.2-build.patch @@ -0,0 +1,68 @@ +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 libsepol static lib + - do not hardcode -L$(LIBDIR) (let the toolchain handle it) + - do not hardcode -I$(INCLUDEDIR) (let the toolchain handle it) + +--- a/src/Makefile ++++ b/src/Makefile +@@ -75,7 +75,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 -D_FILE_OFFSET_BITS=64 $(EMFLAGS) ++override CFLAGS += -I../include $(PCRE_CFLAGS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(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 +@@ -104,17 +104,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 $@ $^ -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 +@@ -127,7 +127,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 -lsepol + + %.o: %.c policy.h + $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $< +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -24,11 +24,12 @@ 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 -D_GNU_SOURCE $(EMFLAGS) +-LDLIBS += -L../src -lselinux -L$(LIBDIR) ++LDLIBS += -L../src -lselinux + + TARGETS=$(patsubst %.c,%,$(wildcard *.c)) + +-sefcontext_compile: LDLIBS += -lpcre ++sefcontext_compile: CFLAGS += $(PCRE_CFLAGS) ++sefcontext_compile: LDLIBS += $(PCRE_LIBS) + + ifeq ($(DISABLE_AVC),y) + UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel diff --git a/sys-libs/libselinux/libselinux-2.2.2-r3.ebuild b/sys-libs/libselinux/libselinux-2.2.2-r3.ebuild new file mode 100644 index 000000000000..bb53705ecc5f --- /dev/null +++ b/sys-libs/libselinux/libselinux-2.2.2-r3.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libselinux/libselinux-2.2.2-r3.ebuild,v 1.1 2014/03/08 22:11:32 vapier Exp $ + +EAPI="5" +PYTHON_COMPAT=( python2_7 python3_2 python3_3 ) + +inherit multilib python-r1 toolchain-funcs eutils multilib-minimal + +SEPOL_VER="2.2" + +DESCRIPTION="SELinux userland library" +HOMEPAGE="http://userspace.selinuxproject.org" +SRC_URI="http://userspace.selinuxproject.org/releases/20131030/${P}.tar.gz + http://dev.gentoo.org/~swift/patches/${PN}/patchbundle-${P}-r1.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="python static-libs" + +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER} + >=dev-libs/libpcre-8.30-r2[static-libs?] + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + virtual/pkgconfig + python? ( >=dev-lang/swig-2.0.9 )" + +src_prepare() { + EPATCH_MULTI_MSG="Applying libselinux patches ... " \ + EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \ + EPATCH_FORCE="yes" \ + epatch + epatch "${FILESDIR}"/${PN}-2.2.2-build.patch #500674 + + 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" \ + pywrap + } + python_foreach_impl building + 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_foreach_impl installation + fi + + use static-libs || rm "${D}"/usr/lib*/*.a +} + +pkg_postinst() { + # Fix bug 473502 + for POLTYPE in ${POLICY_TYPES}; + do + mkdir -p /etc/selinux/${POLTYPE}/contexts/files + touch /etc/selinux/${POLTYPE}/contexts/files/file_contexts.local + done +} |