summaryrefslogtreecommitdiff
path: root/sys-libs/libcap
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /sys-libs/libcap
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'sys-libs/libcap')
-rw-r--r--sys-libs/libcap/Manifest3
-rw-r--r--sys-libs/libcap/files/libcap-2.26-no-perl.patch61
-rw-r--r--sys-libs/libcap/libcap-2.26-r2.ebuild81
3 files changed, 145 insertions, 0 deletions
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
index 8017bd00d633..64f7ba03a7d9 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -3,7 +3,10 @@ AUX libcap-2.22-no-perl.patch 2360 BLAKE2B f9ef0549a8f2f1f08f3b93e9a4234d8d01887
AUX libcap-2.25-build-system-fixes.patch 4705 BLAKE2B be3c05b5c798411cc03458c1ce71956ddf2996db71d349e6733a082ec90b264d6a24aa6abaff4b44a65502dc9cd49fe749f11d2fc41fa45879fa0cb6bde2b6ef SHA512 c99df67dfdceefeea3c3033a38e94a93cd7a9c4ed6e74f42c3b7198d66deee4b5d4aa91c540a48b12749ce3285c0ac3f11d0ecc33b913c3f0169578ae28745da
AUX libcap-2.25-gperf.patch 620 BLAKE2B c870cd0d093df2e8f7498adc4d9b23f101089d80906eeba948982b599469c209e4dc4076efee04b37978b4226c3281ace2ee6ce751c27ee6719456657ebcdeda SHA512 1fd325160ebcf96f8a8f58e7f453241d15d2c968752cc050b52871536840f8ebbbfe1fa2bd03c19f86859e9739eb0059d30f157d2fa3a076da4a895fc32182e6
AUX libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch 988 BLAKE2B 63417032b843ff7cb704c9880cfca4db5083d05d479c71dd12925d729f22a4900c2ae277a20399d58830eaca969842d587a2ae0a646809d6b659a75d13678312 SHA512 ba573ce68858c1370f3d25ad03678a534e6f3052076694d09e795d1febf2f3d76a6a170658b71d9e31105521fd5d22dd72095585a5402286dba424937064b389
+AUX libcap-2.26-no-perl.patch 2483 BLAKE2B 34d20ca017119a40e31e2da64786a93c1d5468558e8dfcfb15f3758b6648aaad38bf333c11b35a2c8c4cb66d823e4daefed93b7073a0a65225fe9ef3494ff9ef SHA512 750a64c7b45fd145a043f29b8262c9f972aa4dcfb76afed9e440365c0e55d67d0103491e67a34f0f24ee580656e2fffd589b46b0c5a04b4c9e05b5dac6bbe994
DIST libcap-2.25.tar.xz 63672 BLAKE2B 205790dea83f15b585e5151814ea520ab1545661d18fa57f36e8c8e597a7c0f0ff1d7b5ccffc36e313eb28606f1e71678233a06896e29cb28e5559b190dd47ed SHA512 c3ab491885292adc171cde542b96f1295e84132febb50112a46575c3bde3a3eb6fcf733f7a756b4b656e013c0abb5ed6571db24799f8c0b23d8f759f992864f9
+DIST libcap-2.26.tar.xz 67172 BLAKE2B 9d1952bd03e1bba5ffa225a5088b8d841c2007219bbb9524f979ac65e472bf932db496acf93984fa77fe42e71d45b85cd603ca461a071fb4742526dfbc5f66eb SHA512 1c2d59f007226405a924950b2c2090393527e06f0692a84e6463e33915a070df61a9070b8f30a624d5630ddd39290eac117e5d440577d1edd48510195b9d12f0
EBUILD libcap-2.25-r1.ebuild 2014 BLAKE2B 4f3f2bf0f68703594aec5d4eccc4e0847deabf68c5d80437b7f99a0a61d7e63c7421d376b23258d9365bb783e7cbf5f703dd8161093969f20bef66accf74b77d SHA512 7858b3d5ac0aedbf9c973c535fa1c36d003a782b6c93e88310dab1f25fe7bd11105a418dc4e0ea0551fa2253a626dbc56bab09f8d08824a076579f9022d7bae7
EBUILD libcap-2.25.ebuild 1985 BLAKE2B 9b54adaecef1a90ec278fca89520259164c42cf119a40472d24a000c6123010c561d73ca5bcac50005187cb79a89fe4c480a6b49960eaee4eb120915ff886351 SHA512 8fa3587c008e1acf25283186f49a78484ab70cd41bc2d87161241688ee8b9640623abda097f66d9527f498b030cb113afb1babb3f07041d9b2230fd4ade0c8ad
+EBUILD libcap-2.26-r2.ebuild 2024 BLAKE2B c97af87bad088092a8c0c62f4404e97ab31399e841d2102692e4aae0991e8f24dc46f1add51f65eeff0ab6666ce224c84d3851b97dfa0879d71f2854802c2807 SHA512 119f7b245d448a7da0bcad134534c6c8b79f148d6420940637d00a321fb44ee872f1c0191d4a6578df4c71f07dd39118ab24be911052a0d6090e54f70f9a20b4
MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555
diff --git a/sys-libs/libcap/files/libcap-2.26-no-perl.patch b/sys-libs/libcap/files/libcap-2.26-no-perl.patch
new file mode 100644
index 000000000000..55ee34ee71f9
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.26-no-perl.patch
@@ -0,0 +1,61 @@
+From c15a25a61d64efe8f7b29c1e2d0a96885835ec59 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 21 Nov 2018 11:00:54 +0100
+Subject: [PATCH] use awk/sed instead of perl for creating header files
+
+More systems should have awk/sed than perl.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+Forward ported from libcap-2.22 to libcap-2.26
+and incorporated the gperf-3.1 fix provided by Mike Gilbert
+<floppym@gentoo.org>
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ libcap/Makefile | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/libcap/Makefile b/libcap/Makefile
+index 77b26c5..a3f0507 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -18,6 +18,8 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
+ MINLIBNAME=$(MAJLIBNAME).$(MINOR)
+ GPERF_OUTPUT = _caps_output.gperf
+ CFLAGS += -fPIC
++AWK = awk
++SED = sed
+
+ all: $(MINLIBNAME) $(STALIBNAME) libcap.pc
+
+@@ -42,11 +44,22 @@ cap_names.h: _makenames
+ ./_makenames > cap_names.h
+
+ $(GPERF_OUTPUT): cap_names.list.h
+- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
++ (printf "%b" "struct __cap_token_s { const char *name; int index; };\n%%\n"; \
++ $(SED) -e 's:["{}]::g' -e 's:,$$::' $<) | \
++ gperf \
++ --ignore-case \
++ --language=ANSI-C \
++ --includes \
++ --readonly \
++ --null-strings \
++ --global-table \
++ --hash-function-name=__cap_hash_name \
++ --lookup-function-name="__cap_lookup_name" \
++ -c -t -m20 $(INDENT) > $@
+
+-cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h
+- @echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h"
+- perl -e 'while ($$l=<>) { if ($$l =~ /^\#define[ \t](CAP[_A-Z]+)[ \t]+([0-9]+)\s+$$/) { $$tok=$$1; $$val=$$2; $$tok =~ tr/A-Z/a-z/; print "{\"$$tok\",$$val},\n"; } }' $(KERNEL_HEADERS)/linux/capability.h | fgrep -v 0x > $@
++cap_names.list.h: $(KERNEL_HEADERS)/linux/capability.h Makefile
++ @echo "=> making $@ from $<"
++ $(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $< > $@
+
+ $(STALIBNAME): $(OBJS)
+ $(AR) rcs $@ $^
+--
+2.20.0.rc0
+
diff --git a/sys-libs/libcap/libcap-2.26-r2.ebuild b/sys-libs/libcap/libcap-2.26-r2.ebuild
new file mode 100644
index 000000000000..27c8f7ee0891
--- /dev/null
+++ b/sys-libs/libcap/libcap-2.26-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib multilib-minimal toolchain-funcs pam
+
+DESCRIPTION="POSIX 1003.1e capabilities"
+HOMEPAGE="http://www.friedhoff.org/posixfilecaps.html"
+SRC_URI="mirror://kernel/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
+
+# it's available under either of the licenses
+LICENSE="|| ( GPL-2 BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="pam static-libs"
+
+# While the build system optionally uses gperf, we don't DEPEND on it because
+# the build automatically falls back when it's unavailable. #604802
+RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]
+ pam? ( virtual/pam[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers"
+
+# Requires test suite being run as root (via sudo)
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.25-build-system-fixes.patch
+ "${FILESDIR}"/${PN}-2.26-no-perl.patch
+ "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
+ "${FILESDIR}"/${PN}-2.21-include.patch
+)
+
+src_prepare() {
+ default
+ multilib_copy_sources
+}
+
+run_emake() {
+ local args=(
+ exec_prefix="${EPREFIX}"
+ lib_prefix="${EPREFIX}/usr"
+ lib="$(get_libdir)"
+ prefix="${EPREFIX}/usr"
+ PAM_CAP="$(usex pam yes no)"
+ DYNAMIC=yes
+ )
+ emake "${args[@]}" "$@"
+}
+
+multilib_src_compile() {
+ tc-export AR CC RANLIB
+ local BUILD_CC
+ tc-export_build_env BUILD_CC
+
+ run_emake
+}
+
+multilib_src_install() {
+ # no configure, needs explicit install line #444724#c3
+ run_emake DESTDIR="${D}" install
+
+ gen_usr_ldscript -a cap
+ if ! use static-libs ; then
+ rm "${ED%/}"/usr/$(get_libdir)/libcap.a || die
+ fi
+
+ if [[ -d "${ED%/}"/usr/$(get_libdir)/security ]] ; then
+ rm -r "${ED%/}"/usr/$(get_libdir)/security || die
+ fi
+
+ if use pam; then
+ dopammod pam_cap/pam_cap.so
+ dopamsecurity '' pam_cap/capability.conf
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc CHANGELOG README doc/capability.notes
+}