public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/files/, sys-libs/libcap/
Date: Sat, 11 Sep 2021 23:52:10 +0000 (UTC)	[thread overview]
Message-ID: <1631404323.db1bc68b2aeba14deebf61e49174fde9612868df.sam@gentoo> (raw)

commit:     db1bc68b2aeba14deebf61e49174fde9612868df
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 11 23:51:44 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 11 23:52:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db1bc68b

sys-libs/libcap: add 2.57

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libcap/Manifest                           |  1 +
 .../libcap/files/libcap-2.57-parallel-make.patch   | 29 +++++++
 sys-libs/libcap/libcap-2.57.ebuild                 | 90 ++++++++++++++++++++++
 3 files changed, 120 insertions(+)

diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
index 9e6e421def2..fcbd62a9743 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -1,2 +1,3 @@
 DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0
 DIST libcap-2.56.tar.xz 167056 BLAKE2B 97d1cf6196bcbcb48e335f810385ca2b36e7c3e234a1f99172fe00419ecc4af7337f208e107f012e5ffd46c1b6207a9d4515f3a677a924dd26ed8a699a080a5a SHA512 8a5c6c99458b0996c9599e00648e99e53b222ddf429535c475099c1af02796331b864fbfae767c16cfb7f2899cf0beaf74095e26a52988361ea1400f012f30c8
+DIST libcap-2.57.tar.xz 167740 BLAKE2B e0c004f3d11caf824d907315e6102707bb34c0ef3e9d430f23c191d711f073267ef6dc44463e2ce8041b8d13658b0c20560f7f3c6387f770ff9e66b81ff9f5d3 SHA512 5c70b3c6a1248ca0de92538614f0d0d516d72f6f25b135c92738c377b67533662e6fd6b0b61cb051ec99f406387d3334fcc7ddb54789626e4c387bcf46ebffbf

diff --git a/sys-libs/libcap/files/libcap-2.57-parallel-make.patch b/sys-libs/libcap/files/libcap-2.57-parallel-make.patch
new file mode 100644
index 00000000000..612044bcfb0
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.57-parallel-make.patch
@@ -0,0 +1,29 @@
+https://git.kernel.org/pub/scm/libs/libcap/libcap.git/patch/?id=893c134ca5cd6fc33ac19d8dbb9d985067d2e66b
+
+From: "Andrew G. Morgan" <morgan@kernel.org>
+Date: Fri, 10 Sep 2021 16:11:57 -0700
+Subject: Another missing dependency for make -j13
+
+One more missing dependency for pam_cap.so building.
+
+Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
+--- a/pam_cap/Makefile
++++ b/pam_cap/Makefile
+@@ -19,7 +19,11 @@ install: all
+ execable.o: execable.c ../libcap/execable.h ../libcap/loader.txt
+ 	$(CC) $(CFLAGS) $(CPPFLAGS) -DLIBCAP_VERSION=\"libcap-$(VERSION).$(MINOR)\" -DSHARED_LOADER=\"$(shell cat ../libcap/loader.txt)\" -c execable.c -o $@
+ 
+-pam_cap.so: pam_cap.o execable.o pam_cap_linkopts
++LIBCAP:
++	$(MAKE) -C ../libcap all
++	touch $@
++
++pam_cap.so: pam_cap.o execable.o pam_cap_linkopts LIBCAP
+ 	cat pam_cap_linkopts | xargs -e $(LD) $(LDFLAGS) -o $@ pam_cap.o execable.o $(LIBCAPLIB)
+ 
+ # Some distributions force link everything at compile time, and don't
+@@ -83,3 +87,4 @@ sudotest: test_pam_cap
+ 
+ clean:
+ 	rm -f *.o *.so testlink lazylink.so test_pam_cap pam_cap_linkopts *~
++	rm -f LIBCAP

diff --git a/sys-libs/libcap/libcap-2.57.ebuild b/sys-libs/libcap/libcap-2.57.ebuild
new file mode 100644
index 00000000000..ca29aacc3bb
--- /dev/null
+++ b/sys-libs/libcap/libcap-2.57.ebuild
@@ -0,0 +1,90 @@
+# 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=(
+	# Backported patch, drop on > 2.57
+	"${FILESDIR}"/${PN}-2.57-parallel-make.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
+}


             reply	other threads:[~2021-09-11 23:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 23:52 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-30 18:12 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/files/, sys-libs/libcap/ David Seifert
2021-11-28 14:02 David Seifert
2021-11-28 14:02 David Seifert
2021-11-21 23:37 David Seifert
2021-09-05  9:51 David Seifert
2021-09-04 17:35 David Seifert
2021-08-03 10:27 Lars Wendler
2021-06-06 15:42 David Seifert
2021-05-30 10:54 Lars Wendler
2020-11-04 22:16 Lars Wendler
2020-09-18 10:30 Lars Wendler
2020-08-02 17:14 Lars Wendler
2020-07-20 13:50 Lars Wendler
2020-07-13  9:10 Lars Wendler
2020-07-04 21:45 Lars Wendler
2020-06-04 17:45 Lars Wendler
2020-03-04 10:04 Lars Wendler
2019-12-10 10:29 Lars Wendler
2019-05-03 16:10 Lars Wendler
2017-02-01 14:42 Tony Vroon
2016-03-30 23:48 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1631404323.db1bc68b2aeba14deebf61e49174fde9612868df.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox