diff options
author | David Seifert <soap@gentoo.org> | 2021-11-28 15:01:53 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-11-28 15:01:53 +0100 |
commit | f251acb661ae11a7e25d66082f45d994fdc2f0e5 (patch) | |
tree | 00c37e48bd5443b7322fda17a600f4b683f49d80 /sys-libs | |
parent | sys-libs/libcap: drop 2.60, 2.60-r1 (diff) | |
download | gentoo-f251acb661ae11a7e25d66082f45d994fdc2f0e5.tar.gz gentoo-f251acb661ae11a7e25d66082f45d994fdc2f0e5.tar.bz2 gentoo-f251acb661ae11a7e25d66082f45d994fdc2f0e5.zip |
sys-libs/libcap: clean up patches
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libcap/files/libcap-2.61-Wformat.patch | 25 | ||||
-rw-r--r-- | sys-libs/libcap/files/libcap-2.61-no_perl.patch | 13 | ||||
-rw-r--r-- | 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 |