From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D1008158041 for ; Sun, 5 Sep 2021 09:52:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 110A1E0845; Sun, 5 Sep 2021 09:52:01 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DFDB9E0845 for ; Sun, 5 Sep 2021 09:52:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 65E24335D3B for ; Sun, 5 Sep 2021 09:51:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9ABC656 for ; Sun, 5 Sep 2021 09:51:57 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1630835503.72b75e511e958de407ff6172fe52d93fcdc5c83c.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcap/files/, sys-libs/libcap/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch sys-libs/libcap/libcap-2.56.ebuild X-VCS-Directories: sys-libs/libcap/ sys-libs/libcap/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 72b75e511e958de407ff6172fe52d93fcdc5c83c X-VCS-Branch: master Date: Sun, 5 Sep 2021 09:51:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8c5abea4-7a1e-47cc-be51-0549fea9c0cf X-Archives-Hash: 58b0c29792b5080b2777bad19e07e28a commit: 72b75e511e958de407ff6172fe52d93fcdc5c83c Author: David Seifert gentoo org> AuthorDate: Sun Sep 5 09:51:43 2021 +0000 Commit: David Seifert gentoo org> CommitDate: Sun Sep 5 09:51:43 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72b75e51 sys-libs/libcap: update patch for 2.56 * all build system changes are now upstreamed Signed-off-by: David Seifert gentoo.org> .../files/libcap-2.56-build-system-fixes.patch | 233 +++++++++++++++++++-- sys-libs/libcap/libcap-2.56.ebuild | 1 + 2 files changed, 216 insertions(+), 18 deletions(-) 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 index bd026b15632..572bde97e2c 100644 --- a/sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch +++ b/sys-libs/libcap/files/libcap-2.56-build-system-fixes.patch @@ -1,22 +1,26 @@ -From 35989c0ae0073009b1f9c0338410162a11d399fc Mon Sep 17 00:00:00 2001 +From 3249c2696468bc82ec45f4fcabddc390473a45da Mon Sep 17 00:00:00 2001 From: David Seifert -Date: Fri, 3 Sep 2021 09:41:26 +0200 -Subject: [PATCH] Build system fixes +Date: Sat, 4 Sep 2021 10:39:34 +0200 +Subject: [PATCH 1/3] Build system fixes Summary: -- Always respect CFLAGS -- Only build tests conditionally (when we're going to run them) +- Always keep $(WARNINGS) when overriding CFLAGS + +Signed-off-by: Andrew G. Morgan --- - Make.Rules | 3 ++- - Makefile | 1 - - 2 files changed, 2 insertions(+), 2 deletions(-) + Make.Rules | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Make.Rules b/Make.Rules -index 3eeb098..04dd8dc 100644 +index 3eeb098..00f2a03 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 \ +@@ -78,10 +78,11 @@ OBJCOPY := $(CROSS_COMPILE)objcopy + + DEBUG = # -g -DDEBUG + WARNINGS=-Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align \ +- -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \ ++ -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \ -Winline -Wshadow COPTS ?= -O2 -CFLAGS ?= $(COPTS) $(WARNINGS) $(DEBUG) @@ -25,18 +29,211 @@ index 3eeb098..04dd8dc 100644 CPPFLAGS += -Dlinux $(DEFINES) $(LIBCAP_INCLUDES) LDFLAGS ?= # -g +-- +2.33.0 + + +From 99799844ad9272d43892881d1090369e6032aec2 Mon Sep 17 00:00:00 2001 +From: "Andrew G. Morgan" +Date: Sat, 4 Sep 2021 11:42:24 -0700 +Subject: [PATCH 2/3] Don't build the tests/binaries until we want to run them + +Signed-off-by: Andrew G. Morgan +--- + tests/Makefile | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/tests/Makefile b/tests/Makefile +index dd78432..ecb7d1b 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -8,12 +8,10 @@ include ../Make.Rules + # + + all: +- $(MAKE) libcap_launch_test uns_test +-ifeq ($(PTHREADS),yes) +- $(MAKE) psx_test libcap_psx_test libcap_psx_launch_test +-endif ++ @echo leave test building to test target + +-install: all ++install: ++ @echo nothing to install from tests + + ifeq ($(DYNAMIC),yes) + LINKEXTRA=-Wl,-rpath,../libcap +-- +2.33.0 + + +From 5ef14d07420c299ecd8de96928a5d1ce1e232df3 Mon Sep 17 00:00:00 2001 +From: "Andrew G. Morgan" +Date: Sat, 4 Sep 2021 14:05:11 -0700 +Subject: [PATCH 3/3] Refactor top level Makefile to reduce redundant building + +Make build a bit quicker for folk that don't want to run tests. + +Signed-off-by: Andrew G. Morgan +--- + Makefile | 28 +++++----------------------- + doc/Makefile | 6 ++++++ + go/Makefile | 5 +++-- + libcap/Makefile | 3 +++ + pam_cap/Makefile | 2 +- + progs/Makefile | 5 +++-- + 6 files changed, 21 insertions(+), 28 deletions(-) + diff --git a/Makefile b/Makefile -index 1c195dd..3f71b12 100644 +index 1c195dd..9ee11c8 100644 --- a/Makefile +++ b/Makefile -@@ -17,7 +17,6 @@ ifeq ($(GOLANG),yes) - $(MAKE) -C go $@ - rm -f cap/go.sum - endif -- $(MAKE) -C tests $@ +@@ -8,7 +8,7 @@ include Make.Rules + # flags + # + +-all install clean: %: %-here ++all test sudotest install clean: %: %-here + $(MAKE) -C libcap $@ + ifneq ($(PAM_CAP),no) + $(MAKE) -C pam_cap $@ +@@ -20,10 +20,13 @@ endif + $(MAKE) -C tests $@ $(MAKE) -C progs $@ $(MAKE) -C doc $@ - $(MAKE) -C kdebug $@ +- $(MAKE) -C kdebug $@ + + all-here: + ++test-here: ++ ++sudotest-here: ++ + install-here: + + clean-here: +@@ -41,30 +44,9 @@ distclean: clean + release: distclean + cd .. && ln -s libcap libcap-$(VERSION).$(MINOR) && tar cvf libcap-$(VERSION).$(MINOR).tar --exclude patches libcap-$(VERSION).$(MINOR)/* && rm libcap-$(VERSION).$(MINOR) + +-test: all +- $(MAKE) -C libcap $@ +- $(MAKE) -C tests $@ +-ifneq ($(PAM_CAP),no) +- $(MAKE) -C pam_cap $@ +-endif +-ifeq ($(GOLANG),yes) +- $(MAKE) -C go $@ +-endif +- $(MAKE) -C progs $@ +- + ktest: all + $(MAKE) -C kdebug test + +-sudotest: all +- $(MAKE) -C tests $@ +-ifneq ($(PAM_CAP),no) +- $(MAKE) -C pam_cap $@ +-endif +-ifeq ($(GOLANG),yes) +- $(MAKE) -C go $@ +-endif +- $(MAKE) -C progs $@ +- + distcheck: + ./distcheck.sh + $(MAKE) DYNAMIC=no COPTS="-D_FORTIFY_SOURCE=2 -O1 -g" clean test +diff --git a/doc/Makefile b/doc/Makefile +index e2802dc..9614180 100644 +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -32,6 +32,12 @@ MANS = $(MAN1S) $(MAN3S) $(MAN8S) + + all: $(MANS) + ++test: ++ @echo no doc tests available ++ ++sudotest: ++ @echo no doc sudotests available ++ + .PHONY: html + html: + mkdir -p html +diff --git a/go/Makefile b/go/Makefile +index 5af5321..2b2061b 100644 +--- a/go/Makefile ++++ b/go/Makefile +@@ -14,8 +14,9 @@ IMPORTDIR=kernel.org/pub/linux/libs/security/libcap + PKGDIR=pkg/$(GOOSARCH)/$(IMPORTDIR) + + DEPS=../libcap/libcap.a ../libcap/libpsx.a ++TESTS=compare-cap try-launching psx-signals + +-all: PSXGOPACKAGE CAPGOPACKAGE web setid gowns captree compare-cap try-launching psx-signals ++all: PSXGOPACKAGE CAPGOPACKAGE web setid gowns captree + + $(DEPS): + $(MAKE) -C ../libcap all +@@ -93,7 +94,7 @@ endif + b210613: b210613.go CAPGOPACKAGE + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build -mod=vendor $< + +-test: all ++test: all $(TESTS) + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) test -mod=vendor $(IMPORTDIR)/psx + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) test -mod=vendor $(IMPORTDIR)/cap + LD_LIBRARY_PATH=../libcap ./compare-cap +diff --git a/libcap/Makefile b/libcap/Makefile +index 4b96a0c..84340f2 100644 +--- a/libcap/Makefile ++++ b/libcap/Makefile +@@ -148,6 +148,9 @@ ifeq ($(PTHREADS),yes) + endif + endif + ++sudotest: ++ @echo no sudotests for libcap ++ + install: install-static + ifeq ($(SHARED),yes) + $(MAKE) install-shared +diff --git a/pam_cap/Makefile b/pam_cap/Makefile +index b245307..a000978 100644 +--- a/pam_cap/Makefile ++++ b/pam_cap/Makefile +@@ -72,7 +72,7 @@ test: testlink test_pam_cap pam_cap.so + LD_LIBRARY_PATH=../libcap ./pam_cap.so --help + @echo "module can be run as an executable!" + +-sudotest: test test_pam_cap ++sudotest: test_pam_cap + $(SUDO) ./test_pam_cap root 0x0 0x0 0x0 config=./capability.conf + $(SUDO) ./test_pam_cap root 0x0 0x0 0x0 config=./sudotest.conf + $(SUDO) ./test_pam_cap alpha 0x0 0x0 0x0 config=./capability.conf +diff --git a/progs/Makefile b/progs/Makefile +index 2f887c8..e2bd7fe 100644 +--- a/progs/Makefile ++++ b/progs/Makefile +@@ -42,7 +42,8 @@ ifeq ($(RAISE_SETFCAP),yes) + $(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap + endif + +-test: $(PROGS) capsh ++test: ++ @echo "no program tests without privilege, try 'make sudotest'" + + capshdoc.h.cf: capshdoc.h ./mkcapshdoc.sh + ./mkcapshdoc.sh > $@ +@@ -60,7 +61,7 @@ uns_test: ../tests/uns_test.c + $(MAKE) -C ../tests uns_test + cp ../tests/uns_test . + +-sudotest: test tcapsh-static uns_test ++sudotest: tcapsh-static uns_test + $(SUDO) $(LDPATH) ./quicktest.sh + + clean: -- 2.33.0 diff --git a/sys-libs/libcap/libcap-2.56.ebuild b/sys-libs/libcap/libcap-2.56.ebuild index ef97a68d05a..0298367e447 100644 --- a/sys-libs/libcap/libcap-2.56.ebuild +++ b/sys-libs/libcap/libcap-2.56.ebuild @@ -23,6 +23,7 @@ DEPEND="${PDEPEND} BDEPEND="tools? ( dev-lang/go )" PATCHES=( + # backport, remove on bump "${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