public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/files/, sys-libs/libcap/
Date: Sun, 28 Nov 2021 14:02:02 +0000 (UTC)	[thread overview]
Message-ID: <1638108113.f251acb661ae11a7e25d66082f45d994fdc2f0e5.soap@gentoo> (raw)

commit:     f251acb661ae11a7e25d66082f45d994fdc2f0e5
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 28 14:01:53 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 28 14:01:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f251acb6

sys-libs/libcap: clean up patches

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-libs/libcap/files/libcap-2.61-Wformat.patch | 25 +++++++++++++++++++++++++
 sys-libs/libcap/files/libcap-2.61-no_perl.patch | 13 ++++---------
 sys-libs/libcap/libcap-2.61.ebuild              |  1 +
 3 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/sys-libs/libcap/files/libcap-2.61-Wformat.patch b/sys-libs/libcap/files/libcap-2.61-Wformat.patch
new file mode 100644
index 000000000000..e0046de58770
--- /dev/null
+++ b/sys-libs/libcap/files/libcap-2.61-Wformat.patch
@@ -0,0 +1,25 @@
+From 9fd3e7ac5870f84c73ac777d9a14480227ad7f00 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sun, 28 Nov 2021 14:14:42 +0100
+Subject: [PATCH] Fix `-Wformat` on 32-bit platforms
+
+---
+ libcap/cap_test.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcap/cap_test.c b/libcap/cap_test.c
+index b7fb2c5..39df261 100644
+--- a/libcap/cap_test.c
++++ b/libcap/cap_test.c
+@@ -124,7 +124,7 @@ static int test_short_bits(void)
+     }
+     if (strlen(tmp) > __CAP_NAME_SIZE) {
+ 	printf("cap_to_text buffer size reservation needs fixing (%ld > %d)\n",
+-	       strlen(tmp), __CAP_NAME_SIZE);
++	       (long int)strlen(tmp), __CAP_NAME_SIZE);
+ 	result = -1;
+     }
+     free(tmp);
+-- 
+2.34.1
+

diff --git a/sys-libs/libcap/files/libcap-2.61-no_perl.patch b/sys-libs/libcap/files/libcap-2.61-no_perl.patch
index deda35db8e31..3d42a4dc6135 100644
--- a/sys-libs/libcap/files/libcap-2.61-no_perl.patch
+++ b/sys-libs/libcap/files/libcap-2.61-no_perl.patch
@@ -25,7 +25,7 @@ Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
  
  # The linker magic needed to build a dynamic library as independently
  # executable
-@@ -82,17 +84,27 @@
+@@ -82,8 +84,18 @@
  	./_makenames > cap_names.h
  
  $(GPERF_OUTPUT): cap_names.list.h
@@ -44,19 +44,14 @@ Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
 +		--lookup-function-name="__cap_lookup_name" \
 +		-c -t -m20 $(INDENT) > $@
  
--# Intention is that libcap keeps up with torvalds' tree, as reflected
--# by this maintained version of the kernel header. libcap dynamically
--# trims the meaning of "all" capabilities down to that of the running
--# kernel as of 2.30.
+ # Intention is that libcap keeps up with torvalds' tree, as reflected
+ # by this maintained version of the kernel header. libcap dynamically
+@@ -92,7 +104,7 @@
  UAPI_HEADER := $(topdir)/libcap/include/uapi/linux/capability.h
  cap_names.list.h: Makefile $(UAPI_HEADER)
  	@echo "=> making $@ from $(UAPI_HEADER)"
 -	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"; } }' $(UAPI_HEADER) | fgrep -v 0x > $@
 +	$(AWK) '($$0 ~ /^#define[[:space:]]+CAP[_A-Z]+[[:space:]]+[0-9]+[[:space:]]*$$/) { printf "{\"%s\",%s},\n", tolower($$2), $$3 }' $(UAPI_HEADER) > $@
-+
-+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 }' $< > $@
  
  $(STACAPLIBNAME): $(CAPOBJS)
  	$(AR) rcs $@ $^

diff --git a/sys-libs/libcap/libcap-2.61.ebuild b/sys-libs/libcap/libcap-2.61.ebuild
index d7182a35dc5b..28b28501b9d6 100644
--- a/sys-libs/libcap/libcap-2.61.ebuild
+++ b/sys-libs/libcap/libcap-2.61.ebuild
@@ -27,6 +27,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.61-no_perl.patch
 	"${FILESDIR}"/${PN}-2.61-ignore-RAISE_SETFCAP-install-failures.patch
+	"${FILESDIR}"/${PN}-2.61-Wformat.patch
 )
 
 QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS


             reply	other threads:[~2021-11-28 14:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 14:02 David Seifert [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-21 23:37 David Seifert
2021-09-11 23:52 Sam James
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=1638108113.f251acb661ae11a7e25d66082f45d994fdc2f0e5.soap@gentoo \
    --to=soap@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