diff options
author | David Seifert <soap@gentoo.org> | 2021-09-04 00:40:00 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-09-04 00:40:00 +0200 |
commit | d017c72405862aae4b02f07b05303fd274b4ddd8 (patch) | |
tree | 2a77bf4c4849f3905d4045c176167f72a7e2f6fa /sys-libs/libcap | |
parent | multilib.eclass: add OBJCOPY to exception list (diff) | |
download | gentoo-d017c72405862aae4b02f07b05303fd274b4ddd8.tar.gz gentoo-d017c72405862aae4b02f07b05303fd274b4ddd8.tar.bz2 gentoo-d017c72405862aae4b02f07b05303fd274b4ddd8.zip |
sys-libs/libcap: add 2.56
Closes: https://github.com/gentoo/gentoo/pull/22205
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-libs/libcap')
-rw-r--r-- | sys-libs/libcap/Manifest | 1 | ||||
-rw-r--r-- | sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch | 42 | ||||
-rw-r--r-- | sys-libs/libcap/libcap-2.56.ebuild | 89 | ||||
-rw-r--r-- | sys-libs/libcap/metadata.xml | 17 |
4 files changed, 142 insertions, 7 deletions
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest index fb0ba3e19b1d..594609befb8c 100644 --- a/sys-libs/libcap/Manifest +++ b/sys-libs/libcap/Manifest @@ -2,3 +2,4 @@ DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b DIST libcap-2.51.tar.xz 145440 BLAKE2B 9f004e28891fbbb3552016e2e9250eab38935b6b40ad9e808a64ab07eecb52c5fa9032caed0baab719df8afe9aeec98403d10b05336bebe15a50b64020e5afc2 SHA512 3b4a97ef864a2ce2f87056ebc282223b0c71ca71c539744dc629ffe7905ca5fdde937ca70c34ec84406fe54863d39abf32775818a5e5a6fdf3069706b1723a88 DIST libcap-2.52.tar.xz 158720 BLAKE2B 0696ae00a485df019f5441efe1d71676ddf294f1116e7fc3f352ad0595f9d4830f2e4fac1f98353016de36a4866f9d018f53419970ccd114c6df0faa556bcea3 SHA512 95d9e0f81fd955c42a0f299163a4402f00e9e7a2b392dfbabe613abea4babba2730576e76c9b612665a0bb8bd88aa98bf28ea3eb5582b5c06cd1137594a59893 DIST libcap-2.55.tar.xz 166164 BLAKE2B 75136d228c6b42086698aea79e774bed37d43aa0692154026708ddd27275fc611a702dafd0ad76b16b32d8006f863f7ca3aff1f645c74f1649ad5ae9b77db47c SHA512 b7c682b45800d96a86d12489855f643e8166849606e50ffae45da143790304858d677fe0d19067a9e09f5fa711548aee4bd7a6fda662a87ea2cc35c9455e8a2c +DIST libcap-2.56.tar.xz 167056 BLAKE2B 97d1cf6196bcbcb48e335f810385ca2b36e7c3e234a1f99172fe00419ecc4af7337f208e107f012e5ffd46c1b6207a9d4515f3a677a924dd26ed8a699a080a5a SHA512 8a5c6c99458b0996c9599e00648e99e53b222ddf429535c475099c1af02796331b864fbfae767c16cfb7f2899cf0beaf74095e26a52988361ea1400f012f30c8 diff --git a/sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch new file mode 100644 index 000000000000..bd026b15632d --- /dev/null +++ b/sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch @@ -0,0 +1,42 @@ +From 35989c0ae0073009b1f9c0338410162a11d399fc Mon Sep 17 00:00:00 2001 +From: David Seifert <soap@gentoo.org> +Date: Fri, 3 Sep 2021 09:41:26 +0200 +Subject: [PATCH] Build system fixes + +Summary: +- Always respect CFLAGS +- Only build tests conditionally (when we're going to run them) +--- + Make.Rules | 3 ++- + Makefile | 1 - + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Make.Rules b/Make.Rules +index 3eeb098..04dd8dc 100644 +--- a/Make.Rules ++++ b/Make.Rules +@@ -81,7 +81,8 @@ WARNINGS=-Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \ + -Winline -Wshadow + COPTS ?= -O2 +-CFLAGS ?= $(COPTS) $(WARNINGS) $(DEBUG) ++CFLAGS ?= $(COPTS) $(DEBUG) ++CFLAGS += $(WARNINGS) + CPPFLAGS += -Dlinux $(DEFINES) $(LIBCAP_INCLUDES) + LDFLAGS ?= # -g + +diff --git a/Makefile b/Makefile +index 1c195dd..3f71b12 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes) + $(MAKE) -C go $@ + rm -f cap/go.sum + endif +- $(MAKE) -C tests $@ + $(MAKE) -C progs $@ + $(MAKE) -C doc $@ + $(MAKE) -C kdebug $@ +-- +2.33.0 + diff --git a/sys-libs/libcap/libcap-2.56.ebuild b/sys-libs/libcap/libcap-2.56.ebuild new file mode 100644 index 000000000000..ef97a68d05ae --- /dev/null +++ b/sys-libs/libcap/libcap-2.56.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-minimal toolchain-funcs pam usr-ldscript + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="https://sites.google.com/site/fullycapable/" +SRC_URI="https://www.kernel.org/pub/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 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="pam static-libs tools" + +# While the build system optionally uses gperf, we don't DEPEND on it because +# the build automatically falls back when it's unavailable. #604802 +PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )" +DEPEND="${PDEPEND} + sys-kernel/linux-headers" +BDEPEND="tools? ( dev-lang/go )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.56-build-system-fixes.patch + "${FILESDIR}"/${PN}-2.38-no_perl.patch + "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch +) + +QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS + +src_prepare() { + default + multilib_copy_sources +} + +run_emake() { + local args=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + OBJCOPY="$(tc-getOBJCOPY)" + RANLIB="$(tc-getRANLIB)" + exec_prefix="${EPREFIX}" + lib_prefix="${EPREFIX}/usr" + lib="$(get_libdir)" + prefix="${EPREFIX}/usr" + PAM_CAP="$(usex pam yes no)" + DYNAMIC=yes + GOLANG="$(multilib_native_usex tools yes no)" + ) + emake "${args[@]}" "$@" +} + +src_configure() { + tc-export_build_env BUILD_CC + multilib-minimal_src_configure +} + +multilib_src_compile() { + run_emake +} + +multilib_src_test() { + run_emake test +} + +multilib_src_install() { + # no configure, needs explicit install line #444724#c3 + run_emake DESTDIR="${D}" install + + gen_usr_ldscript -a cap + gen_usr_ldscript -a psx + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{cap,psx}.a || die + fi + + # install pam plugins ourselves + rm -rf "${ED}"/usr/$(get_libdir)/security || die + + 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 +} diff --git a/sys-libs/libcap/metadata.xml b/sys-libs/libcap/metadata.xml index d10107478bd7..c00b296dee90 100644 --- a/sys-libs/libcap/metadata.xml +++ b/sys-libs/libcap/metadata.xml @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> -<upstream> - <remote-id type="cpe">cpe:/a:libcap:libcap</remote-id> -</upstream> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="tools">Install captree, which requires <pkg>dev-lang/go</pkg></flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:libcap:libcap</remote-id> + </upstream> </pkgmetadata> |