mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 00:46:58 +02:00
sys-libs/libcap: Sync with Gentoo
It's from Gentoo commit ca1ee8658964db3cafefd5692d90a8e8361232d0.
This commit is contained in:
parent
f5c91e6a81
commit
f1a1d0180f
@ -1,5 +1,2 @@
|
||||
DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0
|
||||
DIST libcap-2.57.tar.xz 167740 BLAKE2B e0c004f3d11caf824d907315e6102707bb34c0ef3e9d430f23c191d711f073267ef6dc44463e2ce8041b8d13658b0c20560f7f3c6387f770ff9e66b81ff9f5d3 SHA512 5c70b3c6a1248ca0de92538614f0d0d516d72f6f25b135c92738c377b67533662e6fd6b0b61cb051ec99f406387d3334fcc7ddb54789626e4c387bcf46ebffbf
|
||||
DIST libcap-2.58.tar.xz 168520 BLAKE2B 9f160c08e7e8bcb9eb49ab6a7a0805145461613a946ccfebeadc269b26331eadc9f467437b2f5b022e9a545b034ea4fd8fed4d5893e84d9a48dd85318810b974 SHA512 092e45f82113293e1c2db7e51dca7298496c2a3af08eb41107e8c2b4798c25d3c9059e152181dc048b232fe0e59c4c3beaa158da2e5798cd6e1013d85226a9cf
|
||||
DIST libcap-2.59.tar.xz 168404 BLAKE2B 5db562b389f2c4034b5fa840a14f7fd7ada49470fea8d13828b2c302a7d768831a6215593d21938b8e1d5bd65fa0581628809526fa5f6091ca4eac5e884cd38c SHA512 296c11259e1b4d577b3527ab5e2160be3f94a2bee7d63d1b7feadc603f7e160b72f8c8ede34dec269f5eb7595304ff290693803be778bdbbe088de0e99a33812
|
||||
DIST libcap-2.60.tar.xz 170744 BLAKE2B 858b5133a5cb2f3b30dab569a6c9f2097034318c90419fa2372e0b28c891160f5e84b54b302b2d98664df8f7c44df78eb3cb4e47b328cecd4c27e7ab223045ae SHA512 f2ff0d81df7251c05decda706ccc6463ce58df6a3c542fe479328dce5416f77aa5c6a09a1ab05a1d1a3638e6dae5c0e546aaa4824843a570700a8927fb7f73e6
|
||||
DIST libcap-2.65.tar.xz 179852 BLAKE2B 9417c5c22fa2fc03df08667dca802c2e190f17af3cda86021de175bd315cbef8607cff51ee2a9c0b6cee7a09c536dbdc43c01549e0540c335966f0afaf9268c3 SHA512 de34cd7fecfe9b688ee08e56c71d4f39a3a05f6414f88577faaadfcd5111a0ae1824af3e76a5b8199131a8df6e87e47fdcb3570c364999e4626f2ab8fafb8671
|
||||
DIST libcap-2.66.tar.xz 181592 BLAKE2B e79bf10c6a3dbffe96dc97aad0bed67caa0b3805d9dcaff1e4a8a833396ee5c6da4f7f0d321b254e99a00073bc39021b9f3a4b350d93094d0df4d74889b3ca56 SHA512 ac005b622f6e065f30ce282a5c87240e7b9da75366ee537aa4835bc501b44bc242c10a4ba4dc070e2415fc7f635d1c3c4e45fbeeaf962cf7973dda82bf6377f0
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- a/libcap/libcap.h
|
||||
+++ b/libcap/libcap.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/capability.h>
|
||||
+#include <sys/prctl.h> /* prctl() */
|
||||
|
||||
#ifndef __u8
|
||||
#define __u8 unsigned char
|
@ -1,71 +0,0 @@
|
||||
From 3f76418eaf73896489129c529fac021e4f3a03c0 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>
|
||||
Forward ported from libcap-2.26 to libcap-2.28
|
||||
Forward ported from libcap-2.28 to libcap-2.38
|
||||
|
||||
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||
---
|
||||
libcap/Makefile | 26 +++++++++++++++++++-------
|
||||
1 file changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libcap/Makefile b/libcap/Makefile
|
||||
index 3d6463d..df2526c 100644
|
||||
--- a/libcap/Makefile
|
||||
+++ b/libcap/Makefile
|
||||
@@ -22,6 +22,8 @@ MAJLIBNAME=$(LIBNAME).$(VERSION)
|
||||
MINLIBNAME=$(MAJLIBNAME).$(MINOR)
|
||||
GPERF_OUTPUT = _caps_output.gperf
|
||||
CFLAGS += -fPIC
|
||||
+AWK = awk
|
||||
+SED = sed
|
||||
|
||||
all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME)
|
||||
|
||||
@@ -55,17 +57,27 @@ 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) > $@
|
||||
- sed -e 's/unsigned int len/size_t len/' -i $@
|
||||
+ (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) > $@
|
||||
|
||||
-# 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.
|
||||
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 $@ $^
|
||||
--
|
||||
2.27.0
|
||||
|
@ -1,199 +0,0 @@
|
||||
From d0e5c20fda92fcc48109bce7055d5fad458579ca Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Wed, 4 Nov 2020 22:46:20 +0100
|
||||
Subject: [PATCH] build system fixes
|
||||
|
||||
This touches up the homebrewed build system to work much better "out of the
|
||||
box" for people. Specifically:
|
||||
- allow toolchain vars to be set via environment
|
||||
- CC / BUILD_CC / AR / RANLIB
|
||||
- CFLAGS / CPPFLAGS / LDFLAGS
|
||||
- split CPPFLAGS out of CFLAGS
|
||||
- break -fPIC out of global CFLAGS and only use where needed
|
||||
- use LDLIBS for libraries, not LDFLAGS
|
||||
|
||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
Forward ported from libcap-2.24 to libcap-2.25
|
||||
Forward ported from libcap-2.25 to libcap-2.28
|
||||
Forward ported from libcap-2.28 to libcap-2.29
|
||||
Forward ported from libcap-2.29 to libcap-2.33
|
||||
Forward ported from libcap-2.33 to libcap-2.34
|
||||
Forward ported from libcap-2.34 to libcap-2.37
|
||||
Forward ported from libcap-2.37 to libcap-2.39
|
||||
Forward ported from libcap-2.39 to libcap-2.42
|
||||
Forward ported from libcap-2.42 to libcap-2.44
|
||||
Forward ported from libcap-2.44 to libcap-2.45
|
||||
Forward ported from libcap-2.45 to libcap-2.48
|
||||
|
||||
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||
---
|
||||
Make.Rules | 10 ++++++----
|
||||
Makefile | 1 -
|
||||
libcap/Makefile | 7 ++++---
|
||||
pam_cap/Makefile | 8 +++++---
|
||||
progs/Makefile | 2 +-
|
||||
tests/Makefile | 6 ++++--
|
||||
6 files changed, 20 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/Make.Rules b/Make.Rules
|
||||
index ded9014..07b716f 100644
|
||||
--- a/Make.Rules
|
||||
+++ b/Make.Rules
|
||||
@@ -52,7 +52,6 @@ GOMAJOR=0
|
||||
# Compilation specifics
|
||||
|
||||
KERNEL_HEADERS := $(topdir)/libcap/include/uapi
|
||||
-IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include
|
||||
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
@@ -60,7 +59,7 @@ COPTS ?= -O2
|
||||
CFLAGS ?= $(COPTS) $(DEFINES)
|
||||
BUILD_CC ?= $(CC)
|
||||
BUILD_COPTS ?= -O2
|
||||
-BUILD_CFLAGS ?= $(BUILD_COPTS) $(DEFINES) $(IPATH)
|
||||
+BUILD_CFLAGS ?= $(CFLAGS)
|
||||
AR := $(CROSS_COMPILE)ar
|
||||
RANLIB := $(CROSS_COMPILE)ranlib
|
||||
DEBUG = -g #-DDEBUG
|
||||
@@ -76,10 +75,13 @@ LIBPSXLIB := -L$(topdir)/libcap -lpsx $(PSXLINKFLAGS)
|
||||
|
||||
BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes)
|
||||
|
||||
-SYSTEM_HEADERS = /usr/include
|
||||
+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include $(DEFINES)
|
||||
+CPPFLAGS += $(LIBCAP_CPPFLAGS)
|
||||
+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS)
|
||||
INCS=$(topdir)/libcap/include/sys/capability.h
|
||||
LDFLAGS += -L$(topdir)/libcap
|
||||
-CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
|
||||
+CPPFLAGS += -Dlinux
|
||||
+CFLAGS += $(WARNINGS) $(DEBUG)
|
||||
INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
|
||||
|
||||
# SHARED tracks whether or not the SHARED libraries (libcap.so,
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 7150b9b..9dff1e9 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 $@
|
||||
diff --git a/libcap/Makefile b/libcap/Makefile
|
||||
index 9563d88..4b42f01 100644
|
||||
--- a/libcap/Makefile
|
||||
+++ b/libcap/Makefile
|
||||
@@ -25,6 +25,7 @@ MINCAPLIBNAME=$(MAJCAPLIBNAME).$(MINOR)
|
||||
PSXOBJS=$(addsuffix .o, $(PSXFILES))
|
||||
MAJPSXLIBNAME=$(PSXLIBNAME).$(VERSION)
|
||||
MINPSXLIBNAME=$(MAJPSXLIBNAME).$(MINOR)
|
||||
+CFLAGS += -fPIC
|
||||
|
||||
all: pcs $(STACAPLIBNAME)
|
||||
ifeq ($(SHARED),yes)
|
||||
@@ -66,7 +67,7 @@ libpsx.pc: libpsx.pc.in
|
||||
$< >$@
|
||||
|
||||
_makenames: _makenames.c cap_names.list.h
|
||||
- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
|
||||
+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
|
||||
|
||||
cap_names.h: _makenames
|
||||
./_makenames > cap_names.h
|
||||
@@ -105,10 +106,10 @@ $(PSXLIBNAME) $(MAJPSXLIBNAME) $(MINPSXLIBNAME): $(PSXOBJS) include/sys/psx_sysc
|
||||
endif
|
||||
|
||||
%.o: %.c $(INCLS)
|
||||
- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
|
||||
- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
|
||||
|
||||
cap_test: cap_test.c libcap.h
|
||||
$(CC) $(CFLAGS) $(IPATH) $< -o $@
|
||||
diff --git a/pam_cap/Makefile b/pam_cap/Makefile
|
||||
index 56604fd..2da4674 100644
|
||||
--- a/pam_cap/Makefile
|
||||
+++ b/pam_cap/Makefile
|
||||
@@ -3,6 +3,8 @@
|
||||
topdir=$(shell pwd)/..
|
||||
include ../Make.Rules
|
||||
|
||||
+CFLAGS += -fPIC
|
||||
+
|
||||
all: pam_cap.so
|
||||
$(MAKE) testlink
|
||||
|
||||
@@ -16,16 +18,16 @@ install: all
|
||||
# written (and you know why it fails), email me and explain why. Thanks!
|
||||
|
||||
pam_cap.so: pam_cap.o
|
||||
- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
|
||||
+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS)
|
||||
|
||||
pam_cap.o: pam_cap.c
|
||||
- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
test_pam_cap: test_pam_cap.c pam_cap.c
|
||||
$(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static
|
||||
|
||||
testlink: test.c pam_cap.o
|
||||
- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS)
|
||||
|
||||
test: pam_cap.so
|
||||
make testlink
|
||||
diff --git a/progs/Makefile b/progs/Makefile
|
||||
index 1d7fc7a..64dbe86 100644
|
||||
--- a/progs/Makefile
|
||||
+++ b/progs/Makefile
|
||||
@@ -28,7 +28,7 @@ $(BUILD): %: %.o $(DEPS)
|
||||
$(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
|
||||
|
||||
%.o: %.c $(INCS)
|
||||
- $(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -c $< -o $@
|
||||
+ $(CC) $(CAPSH_SHELL) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
install: all
|
||||
mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR)
|
||||
diff --git a/tests/Makefile b/tests/Makefile
|
||||
index 1e7039d..5874624 100644
|
||||
--- a/tests/Makefile
|
||||
+++ b/tests/Makefile
|
||||
@@ -13,6 +13,8 @@ ifeq ($(PTHREADS),yes)
|
||||
make psx_test libcap_psx_test libcap_psx_launch_test
|
||||
endif
|
||||
|
||||
+CFLAGS += -fPIC
|
||||
+
|
||||
install: all
|
||||
|
||||
ifeq ($(DYNAMIC),yes)
|
||||
@@ -62,13 +64,13 @@ run_psx_test: psx_test
|
||||
./psx_test
|
||||
|
||||
psx_test: psx_test.c $(DEPS)
|
||||
- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
|
||||
|
||||
run_libcap_psx_test: libcap_psx_test
|
||||
./libcap_psx_test
|
||||
|
||||
libcap_psx_test: libcap_psx_test.c $(DEPS)
|
||||
- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
|
||||
|
||||
# privileged
|
||||
run_libcap_launch_test: libcap_launch_test noop ../progs/tcapsh-static
|
||||
--
|
||||
2.30.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
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
|
@ -11,15 +11,11 @@ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||
Forward ported from libcap-2.20 to libcap-2.25
|
||||
|
||||
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
||||
---
|
||||
progs/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/progs/Makefile b/progs/Makefile
|
||||
index c094a24..4a6db38 100644
|
||||
index 2cb7520..6d417de 100644
|
||||
--- a/progs/Makefile
|
||||
+++ b/progs/Makefile
|
||||
@@ -27,7 +27,7 @@ install: all
|
||||
@@ -39,7 +39,7 @@ install: all
|
||||
install -m 0755 $$p $(FAKEROOT)$(SBINDIR) ; \
|
||||
done
|
||||
ifeq ($(RAISE_SETFCAP),yes)
|
||||
@ -27,7 +23,4 @@ index c094a24..4a6db38 100644
|
||||
+ -$(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap
|
||||
endif
|
||||
|
||||
clean:
|
||||
--
|
||||
2.7.1
|
||||
|
||||
test:
|
@ -1,87 +0,0 @@
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
|
||||
# Requires test suite being run as root (via sudo)
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.48-build-system-fixes.patch
|
||||
"${FILESDIR}"/${PN}-2.38-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
|
||||
GOLANG=no
|
||||
CC="$(tc-getCC)"
|
||||
AR="$(tc-getAR)"
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
)
|
||||
emake "${args[@]}" "$@"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
tc-export AR CC RANLIB
|
||||
tc-export_build_env BUILD_CC
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
run_emake
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
# 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.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
|
||||
}
|
@ -1,18 +1,25 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib-minimal toolchain-funcs pam usr-ldscript
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
|
||||
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
fi
|
||||
|
||||
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
|
||||
@ -20,15 +27,16 @@ IUSE="pam static-libs tools"
|
||||
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
|
||||
DEPEND="${PDEPEND}
|
||||
sys-kernel/linux-headers"
|
||||
BDEPEND="tools? ( dev-lang/go )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.38-no_perl.patch
|
||||
"${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
|
||||
)
|
||||
BDEPEND="
|
||||
sys-apps/diffutils
|
||||
tools? ( dev-lang/go )"
|
||||
|
||||
QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
multilib_copy_sources
|
@ -1,18 +1,25 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib-minimal toolchain-funcs pam usr-ldscript
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
fi
|
||||
|
||||
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
|
||||
@ -20,17 +27,16 @@ IUSE="pam static-libs tools"
|
||||
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
|
||||
)
|
||||
BDEPEND="
|
||||
sys-apps/diffutils
|
||||
tools? ( dev-lang/go )"
|
||||
|
||||
QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.62-ignore-RAISE_SETFCAP-install-failures.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
multilib_copy_sources
|
@ -1,18 +1,25 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit multilib-minimal toolchain-funcs pam usr-ldscript
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libcap/libcap.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/${P}.tar.xz"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
fi
|
||||
|
||||
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
|
||||
@ -20,12 +27,9 @@ IUSE="pam static-libs tools"
|
||||
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
|
||||
DEPEND="${PDEPEND}
|
||||
sys-kernel/linux-headers"
|
||||
BDEPEND="tools? ( dev-lang/go )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.38-no_perl.patch
|
||||
"${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch
|
||||
)
|
||||
BDEPEND="
|
||||
sys-apps/diffutils
|
||||
tools? ( dev-lang/go )"
|
||||
|
||||
QA_FLAGS_IGNORED="sbin/captree" # go binaries don't use LDFLAGS
|
||||
|
Loading…
Reference in New Issue
Block a user