From eb610668421038776b5c65ac888b573519c67538 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 13:57:47 +0000 Subject: [PATCH 01/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index a07ff24..c916f94 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 Patch0: libcap-2.06-shared.patch @@ -74,6 +74,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 2.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Fri Jun 06 2008 Karsten Hopp 2.10-2 - drop libcap.so.1 - fix buildrequires and path to pam security module From 24c7369c90ea712c280181f4fdfe9d920ad54841 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Sun, 22 Mar 2009 17:02:16 +0000 Subject: [PATCH 02/97] - update, with a fix for rebuild problems --- .cvsignore | 2 +- libcap-2.06-shared.patch | 13 ------------- libcap-2.16-headerfix.patch | 12 ++++++++++++ libcap.spec | 14 ++++++++++---- sources | 2 +- 5 files changed, 24 insertions(+), 19 deletions(-) delete mode 100644 libcap-2.06-shared.patch create mode 100644 libcap-2.16-headerfix.patch diff --git a/.cvsignore b/.cvsignore index 64e2de5..876b21f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libcap-2.10.tar.bz2 +libcap-2.16.tar.gz diff --git a/libcap-2.06-shared.patch b/libcap-2.06-shared.patch deleted file mode 100644 index e5203ea..0000000 --- a/libcap-2.06-shared.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up libcap-2.06/progs/Makefile.shared libcap-2.06/progs/Makefile ---- libcap-2.06/progs/Makefile.shared 2008-02-21 17:17:09.000000000 +0100 -+++ libcap-2.06/progs/Makefile 2008-02-21 17:17:28.000000000 +0100 -@@ -9,7 +9,8 @@ PROGS=getpcaps getcap setcap capsh - all: $(PROGS) - - $(PROGS): %: %.o -- $(CC) --static $(COPTFLAG) $(LDFLAGS) -o $@ $< $(LIBS) -+ #$(CC) --static $(COPTFLAG) $(LDFLAGS) -o $@ $< $(LIBS) -+ $(CC) $(COPTFLAG) $(LDFLAGS) -o $@ $< $(LIBS) - - %.o: %.c $(INCS) - $(CC) $(CFLAGS) -c $< -o $@ diff --git a/libcap-2.16-headerfix.patch b/libcap-2.16-headerfix.patch new file mode 100644 index 0000000..ae6eb28 --- /dev/null +++ b/libcap-2.16-headerfix.patch @@ -0,0 +1,12 @@ +diff -up libcap-2.16/libcap/include/sys/capability.h.incfix libcap-2.16/libcap/include/sys/capability.h +--- libcap-2.16/libcap/include/sys/capability.h.incfix 2009-03-22 17:54:02.000000000 +0100 ++++ libcap-2.16/libcap/include/sys/capability.h 2009-03-22 17:54:09.000000000 +0100 +@@ -19,7 +19,7 @@ extern "C" { + * information for the user library. + */ + +-#include ++#include + #include + + /* diff --git a/libcap.spec b/libcap.spec index c916f94..7e4e2c9 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,9 +1,9 @@ Name: libcap -Version: 2.10 -Release: 3%{?dist} +Version: 2.16 +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities -Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 -Patch0: libcap-2.06-shared.patch +Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.gz +Patch0: libcap-2.16-headerfix.patch URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ License: LGPLv2+ @@ -50,6 +50,9 @@ mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man{2,3,8} #mv -f doc/*.2 ${RPM_BUILD_ROOT}/%{_mandir}/man2/ mv -f doc/*.3 ${RPM_BUILD_ROOT}/%{_mandir}/man3/ +# remove static lib +rm -f ${RPM_BUILD_ROOT}/%{_lib}/libcap.a + chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* %post -p /sbin/ldconfig @@ -74,6 +77,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Sun Mar 22 2009 Karsten Hopp 2.16-1 +- update, with a fix for rebuild problems + * Wed Feb 25 2009 Fedora Release Engineering - 2.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index e92aa36..3f78b32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a40050bb5e1c782ca97ccb5a54769d90 libcap-2.10.tar.bz2 +9e075fda242c4070ba76407064c13302 libcap-2.16.tar.gz From 024414f9a22ef060043f1b4a5495e6218a1e3e53 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Jun 2009 19:42:32 +0000 Subject: [PATCH 03/97] - fix build problems with p.e. cdrkit --- libcap-2.16-headerfix.patch | 21 ++++++++++----------- libcap.spec | 5 ++++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libcap-2.16-headerfix.patch b/libcap-2.16-headerfix.patch index ae6eb28..dc9fae1 100644 --- a/libcap-2.16-headerfix.patch +++ b/libcap-2.16-headerfix.patch @@ -1,12 +1,11 @@ -diff -up libcap-2.16/libcap/include/sys/capability.h.incfix libcap-2.16/libcap/include/sys/capability.h ---- libcap-2.16/libcap/include/sys/capability.h.incfix 2009-03-22 17:54:02.000000000 +0100 -+++ libcap-2.16/libcap/include/sys/capability.h 2009-03-22 17:54:09.000000000 +0100 -@@ -19,7 +19,7 @@ extern "C" { - * information for the user library. - */ +diff -up libcap-2.16/libcap/include/sys/capability.h.hfix libcap-2.16/libcap/include/sys/capability.h +--- libcap-2.16/libcap/include/sys/capability.h.hfix 2009-06-15 14:46:51.000000000 +0200 ++++ libcap-2.16/libcap/include/sys/capability.h 2009-06-15 14:47:00.000000000 +0200 +@@ -30,6 +30,7 @@ extern "C" { + #define _LINUX_FS_H + #define __LINUX_COMPILER_H + #define __user ++#define _ASM_X86_SIGCONTEXT_H --#include -+#include - #include - - /* + typedef unsigned int __u32; + typedef __u32 __le32; diff --git a/libcap.spec b/libcap.spec index 7e4e2c9..e9f725f 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.16 -Release: 2%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.gz Patch0: libcap-2.16-headerfix.patch @@ -77,6 +77,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Tue Jun 16 2009 Karsten Hopp 2.16-4 +- fix build problems with p.e. cdrkit + * Sun Mar 22 2009 Karsten Hopp 2.16-1 - update, with a fix for rebuild problems From f7e6927aeea411d073f164f741d8eff552646c8d Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Jun 2009 19:51:59 +0000 Subject: [PATCH 04/97] - update headerfix patch --- libcap-2.16-headerfix.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcap-2.16-headerfix.patch b/libcap-2.16-headerfix.patch index dc9fae1..0627fd0 100644 --- a/libcap-2.16-headerfix.patch +++ b/libcap-2.16-headerfix.patch @@ -1,11 +1,13 @@ diff -up libcap-2.16/libcap/include/sys/capability.h.hfix libcap-2.16/libcap/include/sys/capability.h --- libcap-2.16/libcap/include/sys/capability.h.hfix 2009-06-15 14:46:51.000000000 +0200 +++ libcap-2.16/libcap/include/sys/capability.h 2009-06-15 14:47:00.000000000 +0200 -@@ -30,6 +30,7 @@ extern "C" { +@@ -30,6 +30,9 @@ extern "C" { #define _LINUX_FS_H #define __LINUX_COMPILER_H #define __user +#define _ASM_X86_SIGCONTEXT_H ++#define _ASM_PPC64_SIGCONTEXT_H ++#define _ASM_SPARC_SIGCONTEXT_H typedef unsigned int __u32; typedef __u32 __le32; From 6f511d446b8c31ef2e7d0c7d949b2d550b5c0d18 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 16 Jun 2009 19:57:11 +0000 Subject: [PATCH 05/97] - more fixes --- libcap-2.16-headerfix.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcap-2.16-headerfix.patch b/libcap-2.16-headerfix.patch index 0627fd0..d7a1d0b 100644 --- a/libcap-2.16-headerfix.patch +++ b/libcap-2.16-headerfix.patch @@ -6,8 +6,8 @@ diff -up libcap-2.16/libcap/include/sys/capability.h.hfix libcap-2.16/libcap/inc #define __LINUX_COMPILER_H #define __user +#define _ASM_X86_SIGCONTEXT_H -+#define _ASM_PPC64_SIGCONTEXT_H -+#define _ASM_SPARC_SIGCONTEXT_H ++#define _ASM_POWERPC_SIGCONTEXT_H ++#define _SPARC_SIGCONTEXT_H typedef unsigned int __u32; typedef __u32 __le32; From e0f41390f0e947d343798b9e0febf0e5edefbdb1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 05:24:01 +0000 Subject: [PATCH 06/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index e9f725f..169e599 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.16 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.gz Patch0: libcap-2.16-headerfix.patch @@ -77,6 +77,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 2.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Tue Jun 16 2009 Karsten Hopp 2.16-4 - fix build problems with p.e. cdrkit From 683e3c636ae59a1ca5f806bef24d08f3aca5a938 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:50:52 +0000 Subject: [PATCH 07/97] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 19efe41..4a3275b 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: libcap -# $Id: Makefile,v 1.1 2004/09/09 07:21:20 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 18:59:38 notting Exp $ NAME := libcap SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From e79109b0ec4e1233ba105c980aa1c0b266ed6e46 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 10 Dec 2009 14:24:42 +0000 Subject: [PATCH 08/97] - update to 2.17 --- .cvsignore | 2 +- libcap.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 876b21f..a0531c4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libcap-2.16.tar.gz +libcap-2.17.tar.gz diff --git a/libcap.spec b/libcap.spec index 169e599..2563098 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.16 -Release: 5%{?dist} +Version: 2.17 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.gz Patch0: libcap-2.16-headerfix.patch @@ -31,7 +31,7 @@ libcap. %prep %setup -q -%patch0 -p1 +#patch0 -p1 %build # libcap can not be build with _smp_mflags: @@ -77,6 +77,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Thu Dec 10 2009 Karsten Hopp 2.17-1 +- update to 2.17 + * Fri Jul 24 2009 Fedora Release Engineering - 2.16-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 3f78b32..a82aac1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e075fda242c4070ba76407064c13302 libcap-2.16.tar.gz +fa8c3841ce491b379de316a195e65da2 libcap-2.17.tar.gz From 608ea3522bfb619c1e4bb2cba94f47d0a7804c95 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 20:46:13 +0000 Subject: [PATCH 09/97] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 4a3275b..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: libcap -# $Id: Makefile,v 1.2 2007/10/15 18:59:38 notting Exp $ -NAME := libcap -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 3049490c78767f9b2b6b9253aa0cd219c1413ba4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 22:54:41 -0600 Subject: [PATCH 10/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 2563098..668ff7a 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.gz Patch0: libcap-2.16-headerfix.patch @@ -77,6 +77,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 2.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Thu Dec 10 2009 Karsten Hopp 2.17-1 - update to 2.17 From 4cd05791008d37797febec9663d8ef710267883c Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 27 Jul 2011 15:10:13 +0200 Subject: [PATCH 11/97] update to 2.22 (#689752) --- .gitignore | 1 + libcap-2.16-headerfix.patch | 13 ------------- libcap.spec | 16 +++++++++------- sources | 2 +- 4 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 libcap-2.16-headerfix.patch diff --git a/.gitignore b/.gitignore index a0531c4..0479603 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ libcap-2.17.tar.gz +/libcap-2.22.tar.bz2 diff --git a/libcap-2.16-headerfix.patch b/libcap-2.16-headerfix.patch deleted file mode 100644 index d7a1d0b..0000000 --- a/libcap-2.16-headerfix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up libcap-2.16/libcap/include/sys/capability.h.hfix libcap-2.16/libcap/include/sys/capability.h ---- libcap-2.16/libcap/include/sys/capability.h.hfix 2009-06-15 14:46:51.000000000 +0200 -+++ libcap-2.16/libcap/include/sys/capability.h 2009-06-15 14:47:00.000000000 +0200 -@@ -30,6 +30,9 @@ extern "C" { - #define _LINUX_FS_H - #define __LINUX_COMPILER_H - #define __user -+#define _ASM_X86_SIGCONTEXT_H -+#define _ASM_POWERPC_SIGCONTEXT_H -+#define _SPARC_SIGCONTEXT_H - - typedef unsigned int __u32; - typedef __u32 __le32; diff --git a/libcap.spec b/libcap.spec index 668ff7a..f246ca0 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,9 +1,8 @@ Name: libcap -Version: 2.17 -Release: 2%{?dist} +Version: 2.22 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities -Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.gz -Patch0: libcap-2.16-headerfix.patch +Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ License: LGPLv2+ @@ -31,7 +30,6 @@ libcap. %prep %setup -q -#patch0 -p1 %build # libcap can not be build with _smp_mflags: @@ -40,7 +38,8 @@ make PREFIX=%{_prefix} LIBDIR=%{_lib} SBINDIR=%{_sbindir} \ %install rm -rf ${RPM_BUILD_ROOT} -make install DESTDIR=${RPM_BUILD_ROOT} \ +make install RAISE_SETFCAP=no \ + DESTDIR=${RPM_BUILD_ROOT} \ LIBDIR=${RPM_BUILD_ROOT}/%{_lib} \ SBINDIR=${RPM_BUILD_ROOT}/%{_sbindir} \ INCDIR=${RPM_BUILD_ROOT}/%{_includedir} \ @@ -62,6 +61,7 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* %defattr(-,root,root,-) /%{_lib}/*.so.* %{_sbindir}/* +%{_mandir}/man1/* %{_mandir}/man8/* /%{_lib}/security/pam_cap.so %doc doc/capability.notes License @@ -70,13 +70,15 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* %defattr(-,root,root,-) %{_includedir}/* /%{_lib}/*.so -#{_mandir}/man2/* %{_mandir}/man3/* %clean rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Jul 27 2011 Karsten Hopp 2.22-1 +- update to 2.22 (#689752) + * Mon Feb 07 2011 Fedora Release Engineering - 2.17-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index a82aac1..5bd38b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fa8c3841ce491b379de316a195e65da2 libcap-2.17.tar.gz +ce64058bdb3f086ddbfca8ce6c919845 libcap-2.22.tar.bz2 From 71517181d98b4fbf71482d95e2ddcf866c3367bb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 01:26:38 -0600 Subject: [PATCH 12/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index f246ca0..8fec743 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.22 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 @@ -76,6 +76,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 2.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Wed Jul 27 2011 Karsten Hopp 2.22-1 - update to 2.22 (#689752) From 84aef225488ede956478521b07e4db2acb3c794e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 14:22:39 -0500 Subject: [PATCH 13/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 8fec743..d377c60 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.22 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 @@ -76,6 +76,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 2.22-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Jan 13 2012 Fedora Release Engineering - 2.22-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 2e39f6a59c3c212da4bef14aa4c5ba392b7558b6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 22:06:08 -0600 Subject: [PATCH 14/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index d377c60..4739c0d 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.22 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 @@ -76,6 +76,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 2.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Thu Jul 19 2012 Fedora Release Engineering - 2.22-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 0b88293fb7297a8b754bfa292cce3ee36e2dc585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 24 Feb 2013 21:05:17 +0200 Subject: [PATCH 15/97] Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS. --- libcap-2.22-buildflags.patch | 21 +++++++++++++++++++++ libcap.spec | 12 ++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 libcap-2.22-buildflags.patch diff --git a/libcap-2.22-buildflags.patch b/libcap-2.22-buildflags.patch new file mode 100644 index 0000000..7e204af --- /dev/null +++ b/libcap-2.22-buildflags.patch @@ -0,0 +1,21 @@ +diff -up libcap-2.22/Make.Rules~ libcap-2.22/Make.Rules +--- libcap-2.22/Make.Rules~ 2011-07-25 05:18:23.000000000 +0300 ++++ libcap-2.22/Make.Rules 2013-02-24 20:58:45.681474100 +0200 +@@ -48,7 +48,7 @@ KERNEL_HEADERS := $(topdir)/libcap/inclu + IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) + + CC := gcc +-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ++CFLAGS := $(RPM_OPT_FLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + BUILD_CC := $(CC) + BUILD_CFLAGS := $(CFLAGS) $(IPATH) + AR := ar +@@ -59,7 +59,7 @@ WARNINGS=-Wall -Wwrite-strings \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wnested-externs -Winline -Wshadow + LD=$(CC) -Wl,-x -shared +-LDFLAGS := #-g ++LDFLAGS := $(RPM_LD_FLAGS) #-g + + SYSTEM_HEADERS = /usr/include + INCS=$(topdir)/libcap/include/sys/capability.h diff --git a/libcap.spec b/libcap.spec index 4739c0d..57b34b5 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,8 +1,9 @@ Name: libcap Version: 2.22 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 +Patch0: %{name}-2.22-buildflags.patch URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ License: LGPLv2+ @@ -30,11 +31,12 @@ libcap. %prep %setup -q +%patch0 -p1 %build # libcap can not be build with _smp_mflags: make PREFIX=%{_prefix} LIBDIR=%{_lib} SBINDIR=%{_sbindir} \ - INCDIR=%{_includedir} MANDIR=%{_mandir} COPTFLAG="$RPM_OPT_FLAGS" + INCDIR=%{_includedir} MANDIR=%{_mandir} %install rm -rf ${RPM_BUILD_ROOT} @@ -43,8 +45,7 @@ make install RAISE_SETFCAP=no \ LIBDIR=${RPM_BUILD_ROOT}/%{_lib} \ SBINDIR=${RPM_BUILD_ROOT}/%{_sbindir} \ INCDIR=${RPM_BUILD_ROOT}/%{_includedir} \ - MANDIR=${RPM_BUILD_ROOT}/%{_mandir}/ \ - COPTFLAG="$RPM_OPT_FLAGS" + MANDIR=${RPM_BUILD_ROOT}/%{_mandir} mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man{2,3,8} #mv -f doc/*.2 ${RPM_BUILD_ROOT}/%{_mandir}/man2/ mv -f doc/*.3 ${RPM_BUILD_ROOT}/%{_mandir}/man3/ @@ -76,6 +77,9 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Sun Feb 24 2013 Ville Skyttä - 2.22-5 +- Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS. + * Thu Feb 14 2013 Fedora Release Engineering - 2.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From b86f2aecd78befd7a9758046843257d767afa917 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 14 May 2013 11:54:08 +0200 Subject: [PATCH 16/97] add patch from Mark Wielaard to fix use of uninitialized memory in _fcaps_load, rhbz #911878 --- libcap-2.22-signed-sizeof-compare.patch | 21 +++++++++++++++++++++ libcap.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 libcap-2.22-signed-sizeof-compare.patch diff --git a/libcap-2.22-signed-sizeof-compare.patch b/libcap-2.22-signed-sizeof-compare.patch new file mode 100644 index 0000000..4ada3fa --- /dev/null +++ b/libcap-2.22-signed-sizeof-compare.patch @@ -0,0 +1,21 @@ +diff -up libcap-2.22/libcap/cap_file.c.911878 libcap-2.22/libcap/cap_file.c +--- libcap-2.22/libcap/cap_file.c.911878 2013-05-14 11:45:25.569448468 +0200 ++++ libcap-2.22/libcap/cap_file.c 2013-05-14 11:47:04.712036407 +0200 +@@ -187,7 +187,7 @@ cap_t cap_get_fd(int fildes) + /* fill the capability sets via a system call */ + sizeofcaps = fgetxattr(fildes, XATTR_NAME_CAPS, + &rawvfscap, sizeof(rawvfscap)); +- if (sizeofcaps < sizeof(rawvfscap.magic_etc)) { ++ if (sizeofcaps < (int) sizeof(rawvfscap.magic_etc)) { + cap_free(result); + result = NULL; + } else { +@@ -217,7 +217,7 @@ cap_t cap_get_file(const char *filename) + /* fill the capability sets via a system call */ + sizeofcaps = getxattr(filename, XATTR_NAME_CAPS, + &rawvfscap, sizeof(rawvfscap)); +- if (sizeofcaps < sizeof(rawvfscap.magic_etc)) { ++ if (sizeofcaps < (int) sizeof(rawvfscap.magic_etc)) { + cap_free(result); + result = NULL; + } else { diff --git a/libcap.spec b/libcap.spec index d377c60..f5b1d03 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,8 +1,9 @@ Name: libcap Version: 2.22 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 +Patch0: libcap-2.22-signed-sizeof-compare.patch URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ License: LGPLv2+ @@ -30,6 +31,7 @@ libcap. %prep %setup -q +%patch0 -p1 %build # libcap can not be build with _smp_mflags: @@ -76,6 +78,10 @@ chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* rm -rf ${RPM_BUILD_ROOT} %changelog +* Tue May 14 2013 Karsten Hopp 2.22-4 +- add patch from Mark Wielaard to fix use of uninitialized memory in _fcaps_load + rhbz #911878 + * Thu Jul 19 2012 Fedora Release Engineering - 2.22-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 889762dced2b3ed0f4a8ef847065bc6565970074 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 14 May 2013 13:58:09 +0200 Subject: [PATCH 17/97] add getpcaps man page --- getpcaps.8 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 getpcaps.8 diff --git a/getpcaps.8 b/getpcaps.8 new file mode 100644 index 0000000..6bbf46a --- /dev/null +++ b/getpcaps.8 @@ -0,0 +1,23 @@ +.\" Hey, EMACS: -*- nroff -*- +.TH GETPCAPS 8 "2001-05-29" +.\" Please adjust this date whenever revising the manpage. +.SH NAME +getpcaps \- display process capabilities +.SH SYNOPSIS +.B getpcaps +.IR pid ... +.SH DESCRIPTION +.B getpcaps +displays the capabilities on the processes indicated by the +.I pid +value(s) given on the commandline. The capabilities +are displayed in the +.BR cap_from_text (3) +format. +.SH SEE ALSO +.BR execcap (8). +.br +.SH AUTHOR +This manual page was written by Robert Bihlmeyer , +for the Debian GNU/Linux system (but may be used by others). + From 092440402b0066e00c47e5b04597f2ac805ee782 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 14 May 2013 13:58:22 +0200 Subject: [PATCH 18/97] mv libraries to /usr/lib* add getpcaps man page spec file cleanup fix URL of tarball --- libcap.spec | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/libcap.spec b/libcap.spec index f5b1d03..d0d946e 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,14 +1,17 @@ Name: libcap Version: 2.22 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities -Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/%{name}-%{version}.tar.bz2 +# Original tarball should be here, but got deleted: +#Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libcap-2.22.tar.bz2 +Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 +# http://manned.org/getpcaps/299a4949/src: +Source1: getpcaps.8 Patch0: libcap-2.22-signed-sizeof-compare.patch URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ License: LGPLv2+ Group: System Environment/Libraries -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libattr-devel pam-devel %description @@ -35,49 +38,54 @@ libcap. %build # libcap can not be build with _smp_mflags: -make PREFIX=%{_prefix} LIBDIR=%{_lib} SBINDIR=%{_sbindir} \ - INCDIR=%{_includedir} MANDIR=%{_mandir} COPTFLAG="$RPM_OPT_FLAGS" +make PREFIX=%{_prefix} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ + INCDIR=%{_includedir} MANDIR=%{_mandir} COPTFLAG="%{optflags}" %install -rm -rf ${RPM_BUILD_ROOT} make install RAISE_SETFCAP=no \ - DESTDIR=${RPM_BUILD_ROOT} \ - LIBDIR=${RPM_BUILD_ROOT}/%{_lib} \ - SBINDIR=${RPM_BUILD_ROOT}/%{_sbindir} \ - INCDIR=${RPM_BUILD_ROOT}/%{_includedir} \ - MANDIR=${RPM_BUILD_ROOT}/%{_mandir}/ \ - COPTFLAG="$RPM_OPT_FLAGS" -mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man{2,3,8} -#mv -f doc/*.2 ${RPM_BUILD_ROOT}/%{_mandir}/man2/ -mv -f doc/*.3 ${RPM_BUILD_ROOT}/%{_mandir}/man3/ + DESTDIR=%{buildroot} \ + LIBDIR=%{buildroot}/%{_libdir} \ + SBINDIR=%{buildroot}/%{_sbindir} \ + INCDIR=%{buildroot}/%{_includedir} \ + MANDIR=%{buildroot}/%{_mandir}/ \ + COPTFLAG="%{optflags}" +mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} +mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ +cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/ # remove static lib -rm -f ${RPM_BUILD_ROOT}/%{_lib}/libcap.a +rm -f %{buildroot}/%{_libdir}/libcap.a -chmod +x ${RPM_BUILD_ROOT}/%{_lib}/*.so.* +chmod +x %{buildroot}/%{_libdir}/*.so.* %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) -/%{_lib}/*.so.* +/%{_libdir}/*.so.* %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man8/* -/%{_lib}/security/pam_cap.so +/%{_libdir}/security/pam_cap.so %doc doc/capability.notes License %files devel %defattr(-,root,root,-) %{_includedir}/* -/%{_lib}/*.so +/%{_libdir}/*.so %{_mandir}/man3/* %clean -rm -rf ${RPM_BUILD_ROOT} +rm -rf %{buildroot} %changelog +* Tue May 14 2013 Karsten Hopp 2.22-5 +- mv libraries to /usr/lib* +- add getpcaps man page +- spec file cleanup +- fix URL of tarball + * Tue May 14 2013 Karsten Hopp 2.22-4 - add patch from Mark Wielaard to fix use of uninitialized memory in _fcaps_load rhbz #911878 From c5bd5acad3063f50a3a2ea628edc88e876edc7ed Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 2 Aug 2013 23:58:00 -0500 Subject: [PATCH 19/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 9d8bd7a..10894e2 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.22 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for getting and setting POSIX.1e capabilities # Original tarball should be here, but got deleted: #Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libcap-2.22.tar.bz2 @@ -81,6 +81,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 2.22-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue May 14 2013 Karsten Hopp 2.22-6 - mv libraries to /usr/lib* - add getpcaps man page From 0dec76c50486a18757cddb8e61b4dec07f79086a Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Apr 2014 11:54:54 +0200 Subject: [PATCH 20/97] update to 2.24 dropped patch for rhbz#911878, it is upstream now --- .gitignore | 1 + libcap-2.22-signed-sizeof-compare.patch | 21 ------------------- ...lags.patch => libcap-2.24-buildflags.patch | 13 ++++++------ libcap.spec | 18 +++++++++------- sources | 2 +- 5 files changed, 19 insertions(+), 36 deletions(-) delete mode 100644 libcap-2.22-signed-sizeof-compare.patch rename libcap-2.22-buildflags.patch => libcap-2.24-buildflags.patch (56%) diff --git a/.gitignore b/.gitignore index 0479603..5fdb45f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ libcap-2.17.tar.gz /libcap-2.22.tar.bz2 +/libcap-2.24.tar.gz diff --git a/libcap-2.22-signed-sizeof-compare.patch b/libcap-2.22-signed-sizeof-compare.patch deleted file mode 100644 index 4ada3fa..0000000 --- a/libcap-2.22-signed-sizeof-compare.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up libcap-2.22/libcap/cap_file.c.911878 libcap-2.22/libcap/cap_file.c ---- libcap-2.22/libcap/cap_file.c.911878 2013-05-14 11:45:25.569448468 +0200 -+++ libcap-2.22/libcap/cap_file.c 2013-05-14 11:47:04.712036407 +0200 -@@ -187,7 +187,7 @@ cap_t cap_get_fd(int fildes) - /* fill the capability sets via a system call */ - sizeofcaps = fgetxattr(fildes, XATTR_NAME_CAPS, - &rawvfscap, sizeof(rawvfscap)); -- if (sizeofcaps < sizeof(rawvfscap.magic_etc)) { -+ if (sizeofcaps < (int) sizeof(rawvfscap.magic_etc)) { - cap_free(result); - result = NULL; - } else { -@@ -217,7 +217,7 @@ cap_t cap_get_file(const char *filename) - /* fill the capability sets via a system call */ - sizeofcaps = getxattr(filename, XATTR_NAME_CAPS, - &rawvfscap, sizeof(rawvfscap)); -- if (sizeofcaps < sizeof(rawvfscap.magic_etc)) { -+ if (sizeofcaps < (int) sizeof(rawvfscap.magic_etc)) { - cap_free(result); - result = NULL; - } else { diff --git a/libcap-2.22-buildflags.patch b/libcap-2.24-buildflags.patch similarity index 56% rename from libcap-2.22-buildflags.patch rename to libcap-2.24-buildflags.patch index 7e204af..588eff8 100644 --- a/libcap-2.22-buildflags.patch +++ b/libcap-2.24-buildflags.patch @@ -1,16 +1,17 @@ -diff -up libcap-2.22/Make.Rules~ libcap-2.22/Make.Rules ---- libcap-2.22/Make.Rules~ 2011-07-25 05:18:23.000000000 +0300 -+++ libcap-2.22/Make.Rules 2013-02-24 20:58:45.681474100 +0200 -@@ -48,7 +48,7 @@ KERNEL_HEADERS := $(topdir)/libcap/inclu - IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS) +diff -up libcap-2.24/Make.Rules.rh libcap-2.24/Make.Rules +--- libcap-2.24/Make.Rules.rh 2014-04-16 11:01:44.027253230 +0200 ++++ libcap-2.24/Make.Rules 2014-04-16 11:02:40.340233607 +0200 +@@ -49,7 +49,8 @@ KERNEL_HEADERS := $(topdir)/libcap/inclu + IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include CC := gcc -CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +CFLAGS := $(RPM_OPT_FLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ++ BUILD_CC := $(CC) BUILD_CFLAGS := $(CFLAGS) $(IPATH) AR := ar -@@ -59,7 +59,7 @@ WARNINGS=-Wall -Wwrite-strings \ +@@ -60,7 +61,7 @@ WARNINGS=-Wall -Wwrite-strings \ -Wstrict-prototypes -Wmissing-prototypes \ -Wnested-externs -Winline -Wshadow LD=$(CC) -Wl,-x -shared diff --git a/libcap.spec b/libcap.spec index 10894e2..d92683c 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,14 +1,12 @@ Name: libcap -Version: 2.22 -Release: 7%{?dist} +Version: 2.24 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities -# Original tarball should be here, but got deleted: -#Source: http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libcap-2.22.tar.bz2 -Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 +#Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 +Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz # http://manned.org/getpcaps/299a4949/src: Source1: getpcaps.8 -Patch0: %{name}-2.22-buildflags.patch -Patch1: libcap-2.22-signed-sizeof-compare.patch +Patch0: %{name}-2.24-buildflags.patch URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ License: LGPLv2+ @@ -36,7 +34,6 @@ libcap. %prep %setup -q %patch0 -p1 -%patch1 -p1 %build # libcap can not be build with _smp_mflags: @@ -76,11 +73,16 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_includedir}/* /%{_libdir}/*.so %{_mandir}/man3/* +%{_libdir}/pkgconfig/libcap.pc %clean rm -rf %{buildroot} %changelog +* Wed Apr 16 2014 Karsten Hopp 2.24-1 +- update to 2.24 +- dropped patch for rhbz#911878, it is upstream now + * Sat Aug 03 2013 Fedora Release Engineering - 2.22-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 5bd38b6..63ec7c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ce64058bdb3f086ddbfca8ce6c919845 libcap-2.22.tar.bz2 +ffb154f29b1d28466c6fe6add8286a2d libcap-2.24.tar.gz From 0a1c43c4005fbce1bf1e60db036fe5cdaf6067d6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 16 Apr 2014 14:59:22 +0200 Subject: [PATCH 21/97] fix URL and license --- libcap.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libcap.spec b/libcap.spec index d92683c..8af29c3 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -8,8 +8,8 @@ Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{nam Source1: getpcaps.8 Patch0: %{name}-2.24-buildflags.patch -URL: http://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/ -License: LGPLv2+ +URL: https://sites.google.com/site/fullycapable/ +License: GPLv2 Group: System Environment/Libraries BuildRequires: libattr-devel pam-devel @@ -79,6 +79,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Wed Apr 16 2014 Karsten Hopp 2.24-2 +- fix URL and license + * Wed Apr 16 2014 Karsten Hopp 2.24-1 - update to 2.24 - dropped patch for rhbz#911878, it is upstream now From 21d9195d8a981cdb2be317c46515b9487d8ac239 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 23 Apr 2014 09:43:00 +0100 Subject: [PATCH 22/97] set pkg-config dir to proper value to get it built on AArch64 --- libcap.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index 8af29c3..84692f8 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -46,7 +46,8 @@ make install RAISE_SETFCAP=no \ LIBDIR=%{buildroot}/%{_libdir} \ SBINDIR=%{buildroot}/%{_sbindir} \ INCDIR=%{buildroot}/%{_includedir} \ - MANDIR=%{buildroot}/%{_mandir}/ + MANDIR=%{buildroot}/%{_mandir}/ \ + PKGCONFIGDIR=%{buildroot}/%{_libdir}/pkgconfig/ mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/ @@ -79,6 +80,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Wed Apr 23 2014 Marcin Juszkiewicz - 2.24-3 +- set pkg-config dir to proper value to get it built on AArch64 + * Wed Apr 16 2014 Karsten Hopp 2.24-2 - fix URL and license From 10bf45d809852e5d9c9ffe40346a977cd7413186 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Fri, 25 Apr 2014 12:59:49 +0200 Subject: [PATCH 23/97] fix libdir in libcap.pc --- libcap.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index 84692f8..9c2b40c 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -37,7 +37,7 @@ libcap. %build # libcap can not be build with _smp_mflags: -make PREFIX=%{_prefix} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ +make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ INCDIR=%{_includedir} MANDIR=%{_mandir} %install @@ -80,6 +80,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Fri Apr 25 2014 Karsten Hopp 2.24-4 +- fix libdir in libcap.pc + * Wed Apr 23 2014 Marcin Juszkiewicz - 2.24-3 - set pkg-config dir to proper value to get it built on AArch64 From 7cbf653de8ac1cbf19fb86f77dcd6deb08db93fb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 6 Jun 2014 21:46:29 -0500 Subject: [PATCH 24/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 9c2b40c..bfb71ab 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -80,6 +80,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 2.24-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Fri Apr 25 2014 Karsten Hopp 2.24-4 - fix libdir in libcap.pc From 82495089893c2685ed1708b1f6e20bb09d28f313 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 17 Jul 2014 14:11:11 -0400 Subject: [PATCH 25/97] fix license handling --- libcap.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index bfb71ab..4090f29 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -67,7 +67,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man1/* %{_mandir}/man8/* /%{_libdir}/security/pam_cap.so -%doc doc/capability.notes License +%doc doc/capability.notes +%{!?_licensedir:%global license %%doc} +%license License %files devel %defattr(-,root,root,-) @@ -80,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Thu Jul 17 2014 Tom Callaway - 2.24-6 +- fix license handling + * Sat Jun 07 2014 Fedora Release Engineering - 2.24-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From ac8ee694374449fcc19e1059513d1bb2923c8150 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 02:29:58 +0000 Subject: [PATCH 26/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 4090f29..3e0941b 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -82,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 2.24-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Thu Jul 17 2014 Tom Callaway - 2.24-6 - fix license handling From 0f4605475dd3e39c6d347e8837a6bde9c60c0fca Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 14:59:48 +0000 Subject: [PATCH 27/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 3e0941b..2ff81fb 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -82,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 2.24-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sun Aug 17 2014 Fedora Release Engineering - 2.24-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From dbee13ba15d0baeebc518786bd966c596558c06d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 02:57:30 +0000 Subject: [PATCH 28/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 2ff81fb..4e9f076 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.24 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz @@ -82,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 2.24-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 2.24-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 740b4b137668cb180182c3dba51755e491757b88 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 11 Apr 2016 19:00:39 +0200 Subject: [PATCH 29/97] libcap-2.25 --- .gitignore | 1 + ...dflags.patch => libcap-2.25-buildflags.patch | 8 ++++---- libcap.spec | 17 +++++++++-------- sources | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) rename libcap-2.24-buildflags.patch => libcap-2.25-buildflags.patch (69%) diff --git a/.gitignore b/.gitignore index 5fdb45f..887d514 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ libcap-2.17.tar.gz /libcap-2.22.tar.bz2 /libcap-2.24.tar.gz +/libcap-2.25.tar.gz diff --git a/libcap-2.24-buildflags.patch b/libcap-2.25-buildflags.patch similarity index 69% rename from libcap-2.24-buildflags.patch rename to libcap-2.25-buildflags.patch index 588eff8..48745fd 100644 --- a/libcap-2.24-buildflags.patch +++ b/libcap-2.25-buildflags.patch @@ -1,6 +1,6 @@ -diff -up libcap-2.24/Make.Rules.rh libcap-2.24/Make.Rules ---- libcap-2.24/Make.Rules.rh 2014-04-16 11:01:44.027253230 +0200 -+++ libcap-2.24/Make.Rules 2014-04-16 11:02:40.340233607 +0200 +diff -up libcap-2.25/Make.Rules.rh libcap-2.25/Make.Rules +--- libcap-2.25/Make.Rules.rh 2016-04-11 18:52:01.418065682 +0200 ++++ libcap-2.25/Make.Rules 2016-04-11 18:52:10.790113866 +0200 @@ -49,7 +49,8 @@ KERNEL_HEADERS := $(topdir)/libcap/inclu IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include @@ -17,6 +17,6 @@ diff -up libcap-2.24/Make.Rules.rh libcap-2.24/Make.Rules LD=$(CC) -Wl,-x -shared -LDFLAGS := #-g +LDFLAGS := $(RPM_LD_FLAGS) #-g + BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes) SYSTEM_HEADERS = /usr/include - INCS=$(topdir)/libcap/include/sys/capability.h diff --git a/libcap.spec b/libcap.spec index 4e9f076..bf13ab4 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,12 +1,12 @@ Name: libcap -Version: 2.24 -Release: 9%{?dist} +Version: 2.25 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz # http://manned.org/getpcaps/299a4949/src: Source1: getpcaps.8 -Patch0: %{name}-2.24-buildflags.patch +Patch0: %{name}-2.25-buildflags.patch URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -43,11 +43,9 @@ make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ %install make install RAISE_SETFCAP=no \ DESTDIR=%{buildroot} \ - LIBDIR=%{buildroot}/%{_libdir} \ - SBINDIR=%{buildroot}/%{_sbindir} \ - INCDIR=%{buildroot}/%{_includedir} \ - MANDIR=%{buildroot}/%{_mandir}/ \ - PKGCONFIGDIR=%{buildroot}/%{_libdir}/pkgconfig/ + LIBDIR=%{_libdir} \ + SBINDIR=%{_sbindir} + mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/ @@ -82,6 +80,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* rm -rf %{buildroot} %changelog +* Mon Apr 11 2016 Karsten Hopp - 2.25-1 +- libcap-2.25 + * Thu Feb 04 2016 Fedora Release Engineering - 2.24-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 63ec7c8..7d03ceb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ffb154f29b1d28466c6fe6add8286a2d libcap-2.24.tar.gz +4b18f7166a121138cca0cdd8ab64df4c libcap-2.25.tar.gz From f23323f15696b8f23571469de69ca068feddfe40 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 25 Apr 2016 10:14:24 +0100 Subject: [PATCH 30/97] Fix pkgconfig install location on aarch64, Spec file cleanups --- libcap.spec | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/libcap.spec b/libcap.spec index bf13ab4..f8d3556 100644 --- a/libcap.spec +++ b/libcap.spec @@ -2,15 +2,16 @@ Name: libcap Version: 2.25 Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities +URL: https://sites.google.com/site/fullycapable/ +License: GPLv2 +Group: System Environment/Libraries + #Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz # http://manned.org/getpcaps/299a4949/src: Source1: getpcaps.8 Patch0: %{name}-2.25-buildflags.patch -URL: https://sites.google.com/site/fullycapable/ -License: GPLv2 -Group: System Environment/Libraries BuildRequires: libattr-devel pam-devel %description @@ -38,13 +39,14 @@ libcap. %build # libcap can not be build with _smp_mflags: make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ - INCDIR=%{_includedir} MANDIR=%{_mandir} + INCDIR=%{_includedir} MANDIR=%{_mandir} PKGCONFIGDIR=%{_libdir}/pkgconfig/ %install make install RAISE_SETFCAP=no \ DESTDIR=%{buildroot} \ LIBDIR=%{_libdir} \ - SBINDIR=%{_sbindir} + SBINDIR=%{_sbindir} \ + PKGCONFIGDIR=%{_libdir}/pkgconfig/ mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ @@ -59,27 +61,26 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) -/%{_libdir}/*.so.* +%{!?_licensedir:%global license %%doc} +%license License +%doc doc/capability.notes +%{_libdir}/*.so.* %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man8/* -/%{_libdir}/security/pam_cap.so -%doc doc/capability.notes -%{!?_licensedir:%global license %%doc} -%license License +%{_libdir}/security/pam_cap.so %files devel -%defattr(-,root,root,-) %{_includedir}/* -/%{_libdir}/*.so +%{_libdir}/*.so %{_mandir}/man3/* %{_libdir}/pkgconfig/libcap.pc -%clean -rm -rf %{buildroot} - %changelog +* Mon Apr 25 2016 Peter Robinson 2.25-2 +- Fix pkgconfig install location on aarch64 +- Spec file cleanups + * Mon Apr 11 2016 Karsten Hopp - 2.25-1 - libcap-2.25 From 73b4e9141583b2d07e35540505236ed05fcb6b2a Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 25 Apr 2016 10:15:11 +0100 Subject: [PATCH 31/97] bump release --- libcap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index f8d3556..24bc086 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 From b4907a9c77373163c84f9ea7a064a34f7dd4fd4c Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sun, 27 Nov 2016 20:17:37 +0100 Subject: [PATCH 32/97] Add perl BR to fix FTBFS --- libcap.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index 24bc086..1229a92 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -12,7 +12,7 @@ Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{nam Source1: getpcaps.8 Patch0: %{name}-2.25-buildflags.patch -BuildRequires: libattr-devel pam-devel +BuildRequires: libattr-devel pam-devel perl %description libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) @@ -77,6 +77,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Sun Nov 27 2016 Lubomir Rintel - 2.25-3 +- Add perl BR to fix FTBFS + * Mon Apr 25 2016 Peter Robinson 2.25-2 - Fix pkgconfig install location on aarch64 - Spec file cleanups From 9f890cf8cf184e48e37f8935869b8b37e84f7a88 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 15 Dec 2016 11:11:16 +0100 Subject: [PATCH 33/97] add -static subpackage (rhbz#1380251) --- libcap.spec | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/libcap.spec b/libcap.spec index 1229a92..2da2e56 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -18,13 +18,25 @@ BuildRequires: libattr-devel pam-devel perl libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities. +%package static +Summary: Static libraries for libcap development +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description static +The libcap-static package contains static libraries needed to develop programs +that use libcap and need to be statically linked. + +libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) +draft 15 capabilities. + %package devel Summary: Development files for libcap Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel -Development files (Headers, libraries for static linking, etc) for libcap. +Development files (Headers, etc) for libcap. libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities. @@ -52,9 +64,6 @@ mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/ -# remove static lib -rm -f %{buildroot}/%{_libdir}/libcap.a - chmod +x %{buildroot}/%{_libdir}/*.so.* %post -p /sbin/ldconfig @@ -70,6 +79,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man8/* %{_libdir}/security/pam_cap.so +%files static +%{_libdir}/libcap.a + %files devel %{_includedir}/* %{_libdir}/*.so @@ -77,6 +89,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Thu Dec 15 2016 Karsten Hopp - 2.25-4 +- add -static subpackage (rhbz#1380251) + * Sun Nov 27 2016 Lubomir Rintel - 2.25-3 - Add perl BR to fix FTBFS From f17ad4c828018a730449494514a33150cf5d520b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 18:26:24 +0000 Subject: [PATCH 34/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 2da2e56..b5159f0 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -89,6 +89,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 2.25-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Dec 15 2016 Karsten Hopp - 2.25-4 - add -static subpackage (rhbz#1380251) From 968a3b0f12e5141ed0245eec92fd4f970bc32b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jul 2017 14:47:14 +0200 Subject: [PATCH 35/97] perl dependency renamed to perl-interpreter --- libcap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index b5159f0..f2f2c6a 100644 --- a/libcap.spec +++ b/libcap.spec @@ -12,7 +12,7 @@ Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{nam Source1: getpcaps.8 Patch0: %{name}-2.25-buildflags.patch -BuildRequires: libattr-devel pam-devel perl +BuildRequires: libattr-devel pam-devel perl-interpreter %description libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) From 6a551b81f53debf47ff23af3b71516de588dc1f0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 18:36:04 +0000 Subject: [PATCH 36/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index f2f2c6a..fefb134 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -89,6 +89,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 2.25-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 2.25-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From e1524cd2a36d328d86e0e8bba354496787b33b4f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 01:14:51 +0000 Subject: [PATCH 37/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index fefb134..3e8f311 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -89,6 +89,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 2.25-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 2.25-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From ffccb63de0a4d9a72a5739dce382c060f244a8c9 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 3 Feb 2018 18:15:34 +0100 Subject: [PATCH 38/97] Switch to %ldconfig_scriptlets Signed-off-by: Igor Gnatenko --- libcap.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libcap.spec b/libcap.spec index 3e8f311..5b62071 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -66,8 +66,7 @@ cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/ chmod +x %{buildroot}/%{_libdir}/*.so.* -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %{!?_licensedir:%global license %%doc} @@ -89,6 +88,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Sat Feb 03 2018 Igor Gnatenko - 2.25-8 +- Switch to %%ldconfig_scriptlets + * Thu Aug 03 2017 Fedora Release Engineering - 2.25-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From ee515425b1ba05f4ca9fb8e7735a52686663f423 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 21:17:55 +0000 Subject: [PATCH 39/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 5b62071..48e57d8 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -88,6 +88,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 2.25-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Feb 03 2018 Igor Gnatenko - 2.25-8 - Switch to %%ldconfig_scriptlets From b9b09f2bf40891160dd8b1bba2b717ced246fdfd Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 21 Feb 2018 10:05:50 +0100 Subject: [PATCH 40/97] Buildrequire gcc --- libcap.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index 48e57d8..3b4032d 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -12,7 +12,7 @@ Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{nam Source1: getpcaps.8 Patch0: %{name}-2.25-buildflags.patch -BuildRequires: libattr-devel pam-devel perl-interpreter +BuildRequires: libattr-devel pam-devel perl-interpreter gcc %description libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) @@ -88,6 +88,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Wed Feb 21 2018 Karsten Hopp - 2.25-10 +- buildrequire gcc + * Wed Feb 07 2018 Fedora Release Engineering - 2.25-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 931be7aaf4d7d0611fe7c60506dd366d4b6b13f4 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Mon, 25 Jun 2018 18:05:04 +0530 Subject: [PATCH 41/97] Adds tests according to the CI justification Adds tests according to the CI wiki specifically the standard test interface in the spec. The playbook includes Tier1 level test cases that have been tested in the following contexts and is passing reliably: Classic. Test logs are stored in the artifacts directory. The following steps are used to execute the tests using the standard test interface: Test enveronment Make sure you have installed packages from the spec ``` ansible-2.4.1.0-2.fc28.noarch python2-dnf-2.7.5-1.fc28.noarch libselinux-python-2.7-2.fc28.x86_64 standard-test-roles-2.5-1.fc28.noarch ``` Run tests for Classic Snip of the example test run for Classic tests: ``` :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 2 good, 0 bad :: Assertions: 2 good, 0 bad :: RESULT: PASS :: RESULT: PASS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 15:49:17 ] :: [ LOG ] :: Starting libcap tests ... :: [ 15:49:17 ] :: [ LOG ] :: Starting libcap tests ... :: [ 15:49:17 ] :: [ BEGIN ] :: Running '/usr/bin/test-libcap' [==========] Running 1 test(s). [ RUN ] test_drop_cap_net_raw [ OK ] test_drop_cap_net_raw [==========] 1 test(s) run. [ PASSED ] 1 test(s). :: [ 15:49:17 ] :: [ PASS ] :: Command '/usr/bin/test-libcap' (Expected 0, got 0) :: [ 15:49:17 ] :: [ PASS ] :: Command '/usr/bin/test-libcap' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Duration: 0s :: Assertions: 1 good, 0 bad :: Assertions: 1 good, 0 bad :: RESULT: PASS :: RESULT: PASS ``` --- tests/sanity-tests/Makefile | 46 ++++++++++++++++++++++++++++ tests/sanity-tests/runtest.sh | 34 +++++++++++++++++++++ tests/sanity-tests/test-libcap.c | 52 ++++++++++++++++++++++++++++++++ tests/tests.yml | 13 ++++++++ 4 files changed, 145 insertions(+) create mode 100644 tests/sanity-tests/Makefile create mode 100755 tests/sanity-tests/runtest.sh create mode 100644 tests/sanity-tests/test-libcap.c create mode 100644 tests/tests.yml diff --git a/tests/sanity-tests/Makefile b/tests/sanity-tests/Makefile new file mode 100644 index 0000000..9e75815 --- /dev/null +++ b/tests/sanity-tests/Makefile @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/libcap +# Description: Test if libcap working ok +# Author: Susant Sahani +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +export TEST=/CoreOS/libcap +export TESTVERSION=1.0 + +OBJS = test-libcap.c +CFLAG = -Wall -g3 +CC = gcc +LIBS = -lcap -lcmocka + +test-libcap:${OBJ} + ${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS} + +run: test-libcap + ./runtest.sh +clean: + -rm -f *~ test-libcap + +.c.o: + ${CC} ${CFLAGS} ${INCLUDES} -c $< + +CC = gcc + +include /usr/share/rhts/lib/rhts-make.include +$(METADATA): Makefile + @echo "Owner: Susant Sahani" > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test libcap works ok" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: libcap" >> $(METADATA) + @echo "Requires: libcap libcap-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -Fedora 29" >> $(METADATA) + rhts-lint $(METADATA) diff --git a/tests/sanity-tests/runtest.sh b/tests/sanity-tests/runtest.sh new file mode 100755 index 0000000..17d83e3 --- /dev/null +++ b/tests/sanity-tests/runtest.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# runtest.sh of libcap +# Description: Tests for libcap +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="libcap" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "cp test-libcap /usr/bin/" + rlPhaseEnd + + rlPhaseStartTest + rlLog "Starting libcap tests ..." + rlRun "/usr/bin/test-libcap" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm /usr/bin/test-libcap" + rlLog "libcap tests done" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + +rlGetTestState diff --git a/tests/sanity-tests/test-libcap.c b/tests/sanity-tests/test-libcap.c new file mode 100644 index 0000000..ca4101d --- /dev/null +++ b/tests/sanity-tests/test-libcap.c @@ -0,0 +1,52 @@ +/* +# SPDX-License-Identifier: LGPL-2.1+ +# ~~~ +# Description: libcap tests +# +# Author: Susant Sahani +# Copyright (c) 2018 Red Hat, Inc. +# ~~~ +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void drop_cap(cap_value_t capflag) { + cap_t d; + + d = cap_get_proc(); + assert_non_null(d); + + assert_return_code(cap_set_flag(d, CAP_EFFECTIVE, 1, &capflag, CAP_CLEAR), 0); + assert_return_code(cap_set_flag(d, CAP_PERMITTED, 1, &capflag, CAP_CLEAR), 0); + assert_return_code(cap_set_proc(d), 0); +} + +void test_drop_cap_net_raw(void **state) { + int s; + + assert_true((s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP)) >= 0); + close(s); + + drop_cap(CAP_NET_RAW); + + assert_false((s = socket(PF_INET, SOCK_RAW, IPPROTO_UDP)) >= 0); +} + +int main(int argc, char *argv[]) { + const struct CMUnitTest libcap_tests[] = { + cmocka_unit_test(test_drop_cap_net_raw), + }; + + return cmocka_run_group_tests(libcap_tests, NULL, NULL); +} diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..08a5513 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - sanity-tests + required_packages: + - libcap + - libcap-devel + - libcmocka + - libcmocka-devel + - gcc From 1943023aadb5eedf06194d339dcdd3d5b85ebf86 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 2 Jul 2018 16:29:53 +0200 Subject: [PATCH 42/97] bump release and rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 3b4032d..e7e38cd 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -88,6 +88,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Mon Jul 02 2018 Karsten Hopp - 2.25-11 +- rebuild + * Wed Feb 21 2018 Karsten Hopp - 2.25-10 - buildrequire gcc From d86fc23c40511b66bd75ec48487b1f5b6ba5bb3a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 07:52:46 +0000 Subject: [PATCH 43/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index e7e38cd..8a97616 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.25 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -88,6 +88,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 2.25-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Jul 02 2018 Karsten Hopp - 2.25-11 - rebuild From fbcc8c13703e8f216317543952712f2b96f1f9a9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 15 Jan 2019 13:53:18 +0100 Subject: [PATCH 44/97] update to 2.26 Signed-off-by: Karsten Hopp --- .gitignore | 1 + libcap.spec | 9 ++++----- sources | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 887d514..967e1d5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ libcap-2.17.tar.gz /libcap-2.22.tar.bz2 /libcap-2.24.tar.gz /libcap-2.25.tar.gz +/libcap-2.26.tar.gz diff --git a/libcap.spec b/libcap.spec index 8a97616..029db01 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,16 +1,15 @@ Name: libcap -Version: 2.25 -Release: 12%{?dist} +Version: 2.26 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 Group: System Environment/Libraries -#Source: http://mirror.linux.org.au/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.bz2 -Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz +Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-%{version}.tar.gz # http://manned.org/getpcaps/299a4949/src: Source1: getpcaps.8 -Patch0: %{name}-2.25-buildflags.patch +Patch0: libcap-2.25-buildflags.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc diff --git a/sources b/sources index 7d03ceb..b8adeaf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b18f7166a121138cca0cdd8ab64df4c libcap-2.25.tar.gz +SHA512 (libcap-2.26.tar.gz) = 4a0bfbc1c3efb009a309d9b894aa553009a229323da4780caa424bd70d0579d6b156e2034bc4dee8dc3b2caaf8617a18c74a01095a4c2a8fbe732e5e8a304603 From 38b03e9432d1926cc76c42daadc03fc7b6fde4e0 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Jan 2019 11:36:30 +0000 Subject: [PATCH 45/97] add CI tests using the standard test interface (astepano) --- tests/capsh-basic-functionality/Makefile | 64 +++++++++ tests/capsh-basic-functionality/PURPOSE | 3 + tests/capsh-basic-functionality/runtest.sh | 123 ++++++++++++++++++ tests/pam_cap-so-sanity-test/Makefile | 64 +++++++++ tests/pam_cap-so-sanity-test/PURPOSE | 5 + tests/pam_cap-so-sanity-test/runtest.sh | 63 +++++++++ tests/pkg-config-libcap-pc-addition/Makefile | 65 +++++++++ tests/pkg-config-libcap-pc-addition/PURPOSE | 7 + .../pkg-config-libcap-pc-addition/runtest.sh | 62 +++++++++ .../Makefile | 64 +++++++++ .../setcap-getcap-basic-functionality/PURPOSE | 3 + .../runtest.sh | 98 ++++++++++++++ tests/tests.yml | 17 ++- 13 files changed, 637 insertions(+), 1 deletion(-) create mode 100644 tests/capsh-basic-functionality/Makefile create mode 100644 tests/capsh-basic-functionality/PURPOSE create mode 100755 tests/capsh-basic-functionality/runtest.sh create mode 100644 tests/pam_cap-so-sanity-test/Makefile create mode 100644 tests/pam_cap-so-sanity-test/PURPOSE create mode 100755 tests/pam_cap-so-sanity-test/runtest.sh create mode 100644 tests/pkg-config-libcap-pc-addition/Makefile create mode 100644 tests/pkg-config-libcap-pc-addition/PURPOSE create mode 100755 tests/pkg-config-libcap-pc-addition/runtest.sh create mode 100644 tests/setcap-getcap-basic-functionality/Makefile create mode 100644 tests/setcap-getcap-basic-functionality/PURPOSE create mode 100755 tests/setcap-getcap-basic-functionality/runtest.sh diff --git a/tests/capsh-basic-functionality/Makefile b/tests/capsh-basic-functionality/Makefile new file mode 100644 index 0000000..49f35ed --- /dev/null +++ b/tests/capsh-basic-functionality/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/libcap/Sanity/capsh-basic-functionality +# Description: tests basic functionality +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/libcap/Sanity/capsh-basic-functionality +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Karel Srot " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: tests basic functionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: libcap" >> $(METADATA) + @echo "Requires: libcap" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/capsh-basic-functionality/PURPOSE b/tests/capsh-basic-functionality/PURPOSE new file mode 100644 index 0000000..810902f --- /dev/null +++ b/tests/capsh-basic-functionality/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/libcap/Sanity/capsh-basic-functionality +Description: tests basic functionality +Author: Karel Srot diff --git a/tests/capsh-basic-functionality/runtest.sh b/tests/capsh-basic-functionality/runtest.sh new file mode 100755 index 0000000..6102418 --- /dev/null +++ b/tests/capsh-basic-functionality/runtest.sh @@ -0,0 +1,123 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/libcap/Sanity/capsh-basic-functionality +# Description: tests basic functionality +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="libcap" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "useradd -m libcap_tester" + rlPhaseEnd + + rlPhaseStartTest "Remove the listed capabilities from the prevailing bounding set" + rlRun -s "capsh --drop=cap_net_raw -- -c 'getpcaps \$\$'" + rlAssertGrep "Capabilities for" $rlRun_LOG + rlAssertNotGrep cap_net_raw $rlRun_LOG + rlRun -s "capsh --drop=cap_net_raw -- -c 'ping localhost -c 1'" 2,126 "Ping without cap_net_raw shoud fail" + rlAssertGrep "Operation not permitted" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Set the prevailing process capabilities" + rlRun -s "capsh --caps=cap_chown+p --print" + rlAssertGrep "Current: = cap_chown+p" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Set the inheritable set of capabilities" + rlRun -s "capsh --inh=cap_chown --print" + rlRun "grep 'Current: = ' $rlRun_LOG | grep 'cap_chown+eip'" + rlRun -s "capsh --inh=cap_chown -- -c 'getpcaps \$\$' 2>&1" + rlAssertGrep "cap_chown+eip" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Assume the identity of the user nobody" + USERID=`id -u nobody` + GROUPID=`id -g nobody` + rlRun -s "capsh --user=nobody -- -c 'id'" + rlAssertGrep "uid=$USERID(nobody) gid=$GROUPID(nobody) groups=$GROUPID(nobody)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Force all uid values to equal to nobody" + rlRun -s "capsh --uid=$USERID -- -c 'id'" + rlAssertGrep "uid=$USERID(nobody) gid=0(root) groups=0(root)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Force all gid values to equal to nobody" + rlRun -s "capsh --gid=$GROUPID -- -c 'id'" + rlAssertGrep "uid=0(root) gid=$GROUPID(nobody)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Set the supplementary groups" + GROUP2ID=`id -g daemon` + rlRun -s "capsh --groups=${GROUPID},${GROUP2ID} -- -c id" + rlAssertGrep "uid=0(root) gid=0(root) groups=0(root),${GROUP2ID}(daemon),${GROUPID}(nobody)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Permit the process to retain its capabilities after a setuid" + CURRENT=`capsh --print | grep 'Current:' | cut -d '+' -f 1` + rlRun -s "capsh --keep=0 --uid=$USERID --print" + rlAssertGrep 'Current: =$' $rlRun_LOG -E + rlRun -s "capsh --keep=1 --uid=$USERID --print" + rlAssertGrep "$CURRENT" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Decode capabilities" + rlRun "CODE=$( cat /proc/$$/status | awk '/CapEff/ { print $2 }' )" + rlRun "DECODE=$( capsh --decode=$CODE | cut -d '=' -f 2 )" + rlRun "capsh --print | grep 'Current: = $DECODE'" + rlPhaseEnd + + rlPhaseStartTest "Verify the existence of a capability on the system" + rlRun "capsh --supports=cap_net_raw" + rlRun -s "capsh --supports=cap_foo_bar" 1 + rlAssertGrep "cap\[cap_foo_bar\] not recognized by library" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Verify exit code for unsupported option" + rlRun "capsh --foo bar" 1 + rlPhaseEnd + + rlPhaseStartTest "Run as a regular user" + USERID=`id -u libcap_tester` + rlRun -s "su - libcap_tester -c 'capsh --print'" + rlAssertGrep "Current: =\$" $rlRun_LOG -E + rlAssertGrep "uid=$USERID(libcap_tester)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "userdel -r libcap_tester" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/pam_cap-so-sanity-test/Makefile b/tests/pam_cap-so-sanity-test/Makefile new file mode 100644 index 0000000..3f30e80 --- /dev/null +++ b/tests/pam_cap-so-sanity-test/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/libcap/Sanity/pam_cap-so-sanity-test +# Description: basic functionality test for pam_cap.so module +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/libcap/Sanity/pam_cap-so-sanity-test +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Karel Srot " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: basic functionality test for pam_cap.so module" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: libcap" >> $(METADATA) + @echo "Requires: libcap" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/pam_cap-so-sanity-test/PURPOSE b/tests/pam_cap-so-sanity-test/PURPOSE new file mode 100644 index 0000000..9edc2b0 --- /dev/null +++ b/tests/pam_cap-so-sanity-test/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /CoreOS/libcap/Sanity/pam_cap-so-sanity-test +Description: basic functionality test for pam_cap.so module +Author: Karel Srot + +Test if a test user can be granted capabilities via pam_cap.so module. diff --git a/tests/pam_cap-so-sanity-test/runtest.sh b/tests/pam_cap-so-sanity-test/runtest.sh new file mode 100755 index 0000000..be93b30 --- /dev/null +++ b/tests/pam_cap-so-sanity-test/runtest.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/libcap/Sanity/pam_cap-so-sanity-test +# Description: basic functionality test for pam_cap.so module +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="libcap" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "useradd -m pam_cap_user" + rlRun "useradd -m pam_cap_user2" + rlFileBackup /etc/pam.d/su + [ -f /etc/security/capability.conf ] && rlFileBackup /etc/security/capability.conf + rlRun "echo -e 'cap_net_raw pam_cap_user\nnone *' > /etc/security/capability.conf" + rlRun "sed '1 s/^/auth required pam_cap.so/' -i /etc/pam.d/su" 0 "Configure pam_cap.so in /etc/pam.d/su" + rlPhaseEnd + + rlPhaseStartTest + rlRun "su - pam_cap_user -c 'getpcaps \$\$' &> user1.log" + rlAssertGrep "Capabilities for.* = cap_net_raw" user1.log -E + rlRun "su - pam_cap_user2 -c 'getpcaps \$\$' &> user2.log" + rlAssertNotGrep "cap_net_raw" user2.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "userdel -r pam_cap_user" + rlRun "userdel -r pam_cap_user2" + rlFileRestore + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/pkg-config-libcap-pc-addition/Makefile b/tests/pkg-config-libcap-pc-addition/Makefile new file mode 100644 index 0000000..57b4cd6 --- /dev/null +++ b/tests/pkg-config-libcap-pc-addition/Makefile @@ -0,0 +1,65 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition +# Description: Test for BZ#1425490 (Missing libcap.pc) +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Karel Srot " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1425490 (Missing libcap.pc)" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: libcap" >> $(METADATA) + @echo "Requires: libcap libcap-devel pkgconfig" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1425490" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/pkg-config-libcap-pc-addition/PURPOSE b/tests/pkg-config-libcap-pc-addition/PURPOSE new file mode 100644 index 0000000..68dbb0b --- /dev/null +++ b/tests/pkg-config-libcap-pc-addition/PURPOSE @@ -0,0 +1,7 @@ +PURPOSE of /CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition +Description: Test for BZ#1425490 (Missing libcap.pc) +Author: Karel Srot +Bug summary: Missing libcap.pc +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1425490 + +Checking the presence and sanity of the libcap.pc file. diff --git a/tests/pkg-config-libcap-pc-addition/runtest.sh b/tests/pkg-config-libcap-pc-addition/runtest.sh new file mode 100755 index 0000000..b63ad04 --- /dev/null +++ b/tests/pkg-config-libcap-pc-addition/runtest.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition +# Description: Test for BZ#1425490 (Missing libcap.pc) +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="libcap" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "rpm -ql libcap-devel | grep libcap.pc" 0 "There must be libcap.pc" + if [ $? -eq 0 ]; then + PCFILE=$(rpm -ql libcap-devel | grep libcap.pc) + rlRun "pkg-config --libs libcap | grep -- '-lcap'" + VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1) + rlRun "pkg-config --modversion libcap | grep $VER" + rlRun -s "pkg-config --print-variables libcap" + rlAssertGrep "^prefix" $rlRun_LOG + rlAssertGrep "^exec_prefix" $rlRun_LOG + rlAssertGrep "^libdir" $rlRun_LOG + rlAssertGrep "^includedir" $rlRun_LOG + fi + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/setcap-getcap-basic-functionality/Makefile b/tests/setcap-getcap-basic-functionality/Makefile new file mode 100644 index 0000000..02ce5d5 --- /dev/null +++ b/tests/setcap-getcap-basic-functionality/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/libcap/Sanity/setcap-getcap-basic-functionality +# Description: test basic functionality +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/libcap/Sanity/setcap-getcap-basic-functionality +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Karel Srot " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: test basic functionality" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: libcap" >> $(METADATA) + @echo "Requires: libcap" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/setcap-getcap-basic-functionality/PURPOSE b/tests/setcap-getcap-basic-functionality/PURPOSE new file mode 100644 index 0000000..a6ea33d --- /dev/null +++ b/tests/setcap-getcap-basic-functionality/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/libcap/Sanity/setcap-getcap-basic-functionality +Description: test basic functionality +Author: Karel Srot diff --git a/tests/setcap-getcap-basic-functionality/runtest.sh b/tests/setcap-getcap-basic-functionality/runtest.sh new file mode 100755 index 0000000..3639367 --- /dev/null +++ b/tests/setcap-getcap-basic-functionality/runtest.sh @@ -0,0 +1,98 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/libcap/Sanity/setcap-getcap-basic-functionality +# Description: test basic functionality +# Author: Karel Srot +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="libcap" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "mkdir mydir && touch file1 mydir/file2 mydir/file3" + rlPhaseEnd + + rlPhaseStartTest "set and get capabilities" + rlRun "setcap cap_net_admin+p file1 cap_net_raw+ei mydir/file2" + rlRun -s "getcap file1 mydir/file2" + rlAssertGrep "file1 = cap_net_admin+p" $rlRun_LOG + rlAssertGrep "mydir/file2 = cap_net_raw+ei" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "set capabilities via stdin" + rlRun "echo -e 'cap_net_raw+p\ncap_net_admin+p' > input" + rlRun -s "setcap - mydir/file3 < input" + rlAssertGrep "Please enter caps for file \[empty line to end\]:" $rlRun_LOG + rlRun "getcap mydir/file3 | grep 'mydir/file3 = cap_net_admin,cap_net_raw+p'" + rlPhaseEnd + + rlPhaseStartTest "set capabilities quietly via stdin" + rlRun "echo -e 'cap_net_raw+p' > input" + rlRun -s "setcap -q - mydir/file3 < input" + rlAssertNotGrep "Please enter caps for file" $rlRun_LOG + rlRun "getcap mydir/file3 | grep 'mydir/file3 = cap_net_raw+p'" + rlPhaseEnd + + rlPhaseStartTest "remove capabilities" + rlRun "setcap -r mydir/file3" + rlRun "getcap | grep file3" 1 "There should be no capabilities listed for file1" + rlPhaseEnd + + rlPhaseStartTest "listing capabilities recursively" + rlRun -s "getcap -r *" + rlAssertGrep "file1 = cap_net_admin+p" $rlRun_LOG + rlAssertGrep "mydir/file2 = cap_net_raw+ei" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "listing capabilities verbosely" + rlRun -s "getcap -v mydir/*" + rlAssertGrep "mydir/file2 = cap_net_raw+ei" $rlRun_LOG + rlAssertGrep "mydir/file3\$" $rlRun_LOG -E + rlPhaseEnd + + rlPhaseStartTest "print help" + rlRun "setcap -h | grep 'usage: setcap'" 1 + rlRun "getcap -h | grep 'usage: getcap'" 1 + rlPhaseEnd + + rlPhaseStartTest "exit with 1 on error" + rlRun -s "setcap foo bar" 1 + rlAssertGrep "fatal error: Invalid argument" $rlRun_LOG + rlRun -s "getcap -f oo" 1 + rlAssertGrep "getcap: invalid option -- 'f'" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml index 08a5513..fbbca7f 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -3,11 +3,26 @@ - role: standard-test-beakerlib tags: - classic + - container tests: - sanity-tests + - pam_cap-so-sanity-test + - setcap-getcap-basic-functionality required_packages: - - libcap + - libcap # libcap package required for all tests - libcap-devel - libcmocka - libcmocka-devel - gcc + - iputils # ping command required for capsh-basic-functionality + +# Tests that run in atomic +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - atomic + tests: + - capsh-basic-functionality + - pam_cap-so-sanity-test + - setcap-getcap-basic-functionality From 2bfd2c89301439ca555a5d1471c062e685f68f59 Mon Sep 17 00:00:00 2001 From: gitolite tester Date: Mon, 28 Jan 2019 12:39:34 +0100 Subject: [PATCH 46/97] bump release --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 029db01..82e1593 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -87,6 +87,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Mon Jan 28 2019 Karsten Hopp - 2.26-2 +- add CI tests using the standard test interface (astepano) + * Fri Jul 13 2018 Fedora Release Engineering - 2.25-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 221793d6c46abe9532cde898d8f1b4d839c89998 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:51 +0100 Subject: [PATCH 47/97] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- libcap.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/libcap.spec b/libcap.spec index 82e1593..08b3c11 100644 --- a/libcap.spec +++ b/libcap.spec @@ -4,7 +4,6 @@ Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 -Group: System Environment/Libraries Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-%{version}.tar.gz # http://manned.org/getpcaps/299a4949/src: @@ -19,7 +18,6 @@ draft 15 capabilities. %package static Summary: Static libraries for libcap development -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description static @@ -31,7 +29,6 @@ draft 15 capabilities. %package devel Summary: Development files for libcap -Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel From 75d8e883529d2bf54838486d0e12404d1bfdec6c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 06:46:51 +0000 Subject: [PATCH 48/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 08b3c11..0c99586 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -84,6 +84,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 2.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Mon Jan 28 2019 Karsten Hopp - 2.26-2 - add CI tests using the standard test interface (astepano) From 949589eef08b742e1b61dc7a383b97f8594f3f38 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 4 Feb 2019 13:57:47 +0100 Subject: [PATCH 49/97] bump release --- libcap.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libcap.spec b/libcap.spec index 0c99586..b7f0778 100644 --- a/libcap.spec +++ b/libcap.spec @@ -84,6 +84,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Mon Feb 04 2019 Karsten Hopp - 2.26-3 +- bump release + * Fri Feb 01 2019 Fedora Release Engineering - 2.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 0f144a5492981dadc8a37080f637a40b622dcda3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 4 Feb 2019 13:59:06 +0100 Subject: [PATCH 50/97] bump release --- libcap.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index b7f0778..6042084 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -84,7 +84,7 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog -* Mon Feb 04 2019 Karsten Hopp - 2.26-3 +* Mon Feb 04 2019 Karsten Hopp - 2.26-4 - bump release * Fri Feb 01 2019 Fedora Release Engineering - 2.26-3 From 478085da0488152d5832c0574d8573476b9572f0 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 4 Feb 2019 14:18:45 +0100 Subject: [PATCH 51/97] enable gating Signed-off-by: Karsten Hopp --- gating.yaml | 7 +++++++ libcap.spec | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4a1c38a --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +rules: + - !PassingTestCaseRule {test_case_name: dist.depcheck} + - !PassingTestCaseRule {test_case_name: dist.abicheck} diff --git a/libcap.spec b/libcap.spec index 6042084..ef22ede 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -84,6 +84,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Mon Feb 04 2019 Karsten Hopp - 2.26-5 +- enable gating + * Mon Feb 04 2019 Karsten Hopp - 2.26-4 - bump release From e0653df68c0ff17285442ef7d6be297bb0ddb86c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 12:54:16 +0000 Subject: [PATCH 52/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index ef22ede..104ef74 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -84,6 +84,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 2.26-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Mon Feb 04 2019 Karsten Hopp - 2.26-5 - enable gating From b6ff988c34e7d4acf8592ab0583010917ed3c8e8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 08:42:34 +0000 Subject: [PATCH 53/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 104ef74..5d1d23d 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -84,6 +84,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 2.26-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jul 25 2019 Fedora Release Engineering - 2.26-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 67e96608f23674abb40556f98d9bab5b1fb34196 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 04:20:16 +0000 Subject: [PATCH 54/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 5d1d23d..b624c98 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.26 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: GPLv2 @@ -84,6 +84,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/pkgconfig/libcap.pc %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 2.26-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jan 29 2020 Fedora Release Engineering - 2.26-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 366827aa94fbb279bca99468924d9308aadb23b1 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 21 Oct 2020 14:57:59 +0200 Subject: [PATCH 55/97] update to 2.44 remove additional getpcaps manpage as it now included in the sources update license tag Signed-off-by: Karsten Hopp --- .gitignore | 1 + libcap-2.25-buildflags.patch | 22 ---------------------- libcap-2.44-buildflags.patch | 25 +++++++++++++++++++++++++ libcap.spec | 17 +++++++++++------ sources | 2 +- 5 files changed, 38 insertions(+), 29 deletions(-) delete mode 100644 libcap-2.25-buildflags.patch create mode 100644 libcap-2.44-buildflags.patch diff --git a/.gitignore b/.gitignore index 967e1d5..d8e5cf2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ libcap-2.17.tar.gz /libcap-2.24.tar.gz /libcap-2.25.tar.gz /libcap-2.26.tar.gz +/libcap-2.44.tar.gz diff --git a/libcap-2.25-buildflags.patch b/libcap-2.25-buildflags.patch deleted file mode 100644 index 48745fd..0000000 --- a/libcap-2.25-buildflags.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up libcap-2.25/Make.Rules.rh libcap-2.25/Make.Rules ---- libcap-2.25/Make.Rules.rh 2016-04-11 18:52:01.418065682 +0200 -+++ libcap-2.25/Make.Rules 2016-04-11 18:52:10.790113866 +0200 -@@ -49,7 +49,8 @@ KERNEL_HEADERS := $(topdir)/libcap/inclu - IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include - - CC := gcc --CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -+CFLAGS := $(RPM_OPT_FLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -+ - BUILD_CC := $(CC) - BUILD_CFLAGS := $(CFLAGS) $(IPATH) - AR := ar -@@ -60,7 +61,7 @@ WARNINGS=-Wall -Wwrite-strings \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Wnested-externs -Winline -Wshadow - LD=$(CC) -Wl,-x -shared --LDFLAGS := #-g -+LDFLAGS := $(RPM_LD_FLAGS) #-g - BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes) - - SYSTEM_HEADERS = /usr/include diff --git a/libcap-2.44-buildflags.patch b/libcap-2.44-buildflags.patch new file mode 100644 index 0000000..f821d8a --- /dev/null +++ b/libcap-2.44-buildflags.patch @@ -0,0 +1,25 @@ +diff -up ./Make.Rules.rh ./Make.Rules +--- ./Make.Rules.rh 2020-10-21 14:35:56.645593319 +0200 ++++ ./Make.Rules 2020-10-21 14:38:34.794968440 +0200 +@@ -56,10 +56,10 @@ IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(t + + CC := $(CROSS_COMPILE)gcc + DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +-COPTS ?= -O2 ++COPTS ?= $(RPM_OPT_FLAGS) + CFLAGS ?= $(COPTS) $(DEFINES) + BUILD_CC ?= $(CC) +-BUILD_COPTS ?= -O2 ++BUILD_COPTS ?= $(RPM_OPT_FLAGS) + BUILD_CFLAGS ?= $(BUILD_COPTS) $(DEFINES) $(IPATH) + AR := $(CROSS_COMPILE)ar + RANLIB := $(CROSS_COMPILE)ranlib +@@ -69,7 +69,7 @@ WARNINGS=-Wall -Wwrite-strings \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wnested-externs -Winline -Wshadow + LD=$(CC) -Wl,-x -shared +-LDFLAGS ?= #-g ++LDFLAGS ?= $(RPM_LD_FLAGS) + LIBCAPLIB := -L$(topdir)/libcap -lcap + LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread -Wl,-wrap,pthread_create + diff --git a/libcap.spec b/libcap.spec index b624c98..5eb51f0 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,14 +1,13 @@ Name: libcap -Version: 2.26 -Release: 8%{?dist} +Version: 2.44 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ -License: GPLv2 +License: BSD or GPLv2 Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-%{version}.tar.gz # http://manned.org/getpcaps/299a4949/src: -Source1: getpcaps.8 -Patch0: libcap-2.25-buildflags.patch +Patch0: libcap-2.44-buildflags.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc @@ -58,7 +57,6 @@ make install RAISE_SETFCAP=no \ mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ -cp -f %{SOURCE1} %{buildroot}/%{_mandir}/man8/ chmod +x %{buildroot}/%{_libdir}/*.so.* @@ -76,14 +74,21 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %files static %{_libdir}/libcap.a +%{_libdir}/libpsx.a %files devel %{_includedir}/* %{_libdir}/*.so %{_mandir}/man3/* %{_libdir}/pkgconfig/libcap.pc +%{_libdir}/pkgconfig/libpsx.pc + %changelog +* Wed Oct 21 2020 Karsten Hopp - 2.44-1 +- update to 2.44 +- remove additional getpcaps manpage as it now included in the sources + * Tue Jul 28 2020 Fedora Release Engineering - 2.26-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index b8adeaf..920b392 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libcap-2.26.tar.gz) = 4a0bfbc1c3efb009a309d9b894aa553009a229323da4780caa424bd70d0579d6b156e2034bc4dee8dc3b2caaf8617a18c74a01095a4c2a8fbe732e5e8a304603 +SHA512 (libcap-2.44.tar.gz) = 29feb4a503aee7b86dba882175b0b76f05aed39c63ddcf47a7db7d62ab517a40c506dadfc40ddd1911f551dbe5bb26e447bb4c1024b298658a86750caab67144 From 787690e78fd21fdcc5290af5a50c57a4a0cbd714 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 5 Jan 2021 01:30:35 +0000 Subject: [PATCH 56/97] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- libcap.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/libcap.spec b/libcap.spec index 5eb51f0..9fcb831 100644 --- a/libcap.spec +++ b/libcap.spec @@ -10,6 +10,7 @@ Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-% Patch0: libcap-2.44-buildflags.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc +BuildRequires: make %description libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) From 7408f6c23e9553236f0deebef3ed4f3ce8cce794 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Jan 2021 10:17:39 +0000 Subject: [PATCH 57/97] Update to 0.2.46 --- .gitignore | 2 ++ libcap-2.44-buildflags.patch | 25 ------------------------- libcap.spec | 11 +++++------ sources | 2 +- 4 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 libcap-2.44-buildflags.patch diff --git a/.gitignore b/.gitignore index d8e5cf2..6c34aa0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ libcap-2.17.tar.gz /libcap-2.25.tar.gz /libcap-2.26.tar.gz /libcap-2.44.tar.gz +/libcap-0.2.46.tar.gz +/libcap-2.46.tar.gz diff --git a/libcap-2.44-buildflags.patch b/libcap-2.44-buildflags.patch deleted file mode 100644 index f821d8a..0000000 --- a/libcap-2.44-buildflags.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up ./Make.Rules.rh ./Make.Rules ---- ./Make.Rules.rh 2020-10-21 14:35:56.645593319 +0200 -+++ ./Make.Rules 2020-10-21 14:38:34.794968440 +0200 -@@ -56,10 +56,10 @@ IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(t - - CC := $(CROSS_COMPILE)gcc - DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --COPTS ?= -O2 -+COPTS ?= $(RPM_OPT_FLAGS) - CFLAGS ?= $(COPTS) $(DEFINES) - BUILD_CC ?= $(CC) --BUILD_COPTS ?= -O2 -+BUILD_COPTS ?= $(RPM_OPT_FLAGS) - BUILD_CFLAGS ?= $(BUILD_COPTS) $(DEFINES) $(IPATH) - AR := $(CROSS_COMPILE)ar - RANLIB := $(CROSS_COMPILE)ranlib -@@ -69,7 +69,7 @@ WARNINGS=-Wall -Wwrite-strings \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Wnested-externs -Winline -Wshadow - LD=$(CC) -Wl,-x -shared --LDFLAGS ?= #-g -+LDFLAGS ?= $(RPM_LD_FLAGS) - LIBCAPLIB := -L$(topdir)/libcap -lcap - LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread -Wl,-wrap,pthread_create - diff --git a/libcap.spec b/libcap.spec index 9fcb831..4dfecc1 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,13 +1,11 @@ Name: libcap -Version: 2.44 +Version: 2.46 Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-%{version}.tar.gz -# http://manned.org/getpcaps/299a4949/src: -Patch0: libcap-2.44-buildflags.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc BuildRequires: make @@ -41,8 +39,7 @@ Install libcap-devel if you want to develop or compile applications using libcap. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build # libcap can not be build with _smp_mflags: @@ -64,7 +61,6 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %ldconfig_scriptlets %files -%{!?_licensedir:%global license %%doc} %license License %doc doc/capability.notes %{_libdir}/*.so.* @@ -86,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Sun Jan 17 2021 Peter Robinson - 2.46-1 +- Update to 0.2.46 + * Wed Oct 21 2020 Karsten Hopp - 2.44-1 - update to 2.44 - remove additional getpcaps manpage as it now included in the sources diff --git a/sources b/sources index 920b392..4662b98 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libcap-2.44.tar.gz) = 29feb4a503aee7b86dba882175b0b76f05aed39c63ddcf47a7db7d62ab517a40c506dadfc40ddd1911f551dbe5bb26e447bb4c1024b298658a86750caab67144 +SHA512 (libcap-2.46.tar.gz) = d7d6d8d02701c2bef8f5095a0c923c1bb7033167894d573ad1c935d36d338adb9e58fe2e2779d5e9e8efaf5fe9bc87f43a85eafc733b76f953636038868d73d2 From 33bb9771575c5016f00f126412e737c194f4afb3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 16:45:18 +0000 Subject: [PATCH 58/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 4dfecc1..10e78b2 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.46 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -82,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.46-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sun Jan 17 2021 Peter Robinson - 2.46-1 - Update to 0.2.46 From 0a116b22dc419cda90d885ec7ebffef9bdaa3464 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 10 Feb 2021 15:33:22 +0100 Subject: [PATCH 59/97] Update to 0.2.48 Signed-off-by: Giuseppe Scrivano --- .gitignore | 1 + libcap.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c34aa0..8a001a4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ libcap-2.17.tar.gz /libcap-2.44.tar.gz /libcap-0.2.46.tar.gz /libcap-2.46.tar.gz +/libcap-2.48.tar.gz diff --git a/libcap.spec b/libcap.spec index 10e78b2..8814d90 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.46 -Release: 2%{?dist} +Version: 2.48 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -82,6 +82,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Wed Feb 10 2021 Giuseppe Scrivano - 2.48-1 +- Update to 0.2.48 + * Tue Jan 26 2021 Fedora Release Engineering - 2.46-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 4662b98..22a2095 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libcap-2.46.tar.gz) = d7d6d8d02701c2bef8f5095a0c923c1bb7033167894d573ad1c935d36d338adb9e58fe2e2779d5e9e8efaf5fe9bc87f43a85eafc733b76f953636038868d73d2 +SHA512 (libcap-2.48.tar.gz) = 90ac6e46531e4893b78b14171537c6dfd06cf617af9e90f38ea0ce4b50161451528aefff41dbe983719e76582cf39f8d7d432f99756e976f62403d5bc3c209c8 From 07c405388c4cabef9c9624db54ac140621e17b19 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 10 Feb 2021 15:19:54 +0000 Subject: [PATCH 60/97] cleanup .gitignore --- .gitignore | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 8a001a4..dd63848 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1 @@ -libcap-2.17.tar.gz -/libcap-2.22.tar.bz2 -/libcap-2.24.tar.gz -/libcap-2.25.tar.gz -/libcap-2.26.tar.gz -/libcap-2.44.tar.gz -/libcap-0.2.46.tar.gz -/libcap-2.46.tar.gz -/libcap-2.48.tar.gz +/libcap-*.tar.gz From b7ee31eb11f46fe42cacd01212b6651821767554 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 14 Feb 2021 22:50:31 +0000 Subject: [PATCH 61/97] Rebase distro flags patch --- libcap-use-compiler-flag-options.patch | 37 ++++++++++++++++++++++++++ libcap.spec | 6 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 libcap-use-compiler-flag-options.patch diff --git a/libcap-use-compiler-flag-options.patch b/libcap-use-compiler-flag-options.patch new file mode 100644 index 0000000..9728330 --- /dev/null +++ b/libcap-use-compiler-flag-options.patch @@ -0,0 +1,37 @@ +From 7c13fa4e4c044941afd3b3766de71821cdc04397 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Sun, 14 Feb 2021 14:06:49 -0800 +Subject: [PATCH] Update Make.Rules for Fedora RPM build + +--- + Make.Rules | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Make.Rules b/Make.Rules +index ded9014..537cb6c 100644 +--- a/Make.Rules ++++ b/Make.Rules +@@ -56,10 +56,10 @@ IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include + + CC := $(CROSS_COMPILE)gcc + DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +-COPTS ?= -O2 ++COPTS ?= $(RPM_OPT_FLAGS) + CFLAGS ?= $(COPTS) $(DEFINES) + BUILD_CC ?= $(CC) +-BUILD_COPTS ?= -O2 ++BUILD_COPTS ?= $(RPM_OPT_FLAGS) + BUILD_CFLAGS ?= $(BUILD_COPTS) $(DEFINES) $(IPATH) + AR := $(CROSS_COMPILE)ar + RANLIB := $(CROSS_COMPILE)ranlib +@@ -69,7 +69,7 @@ WARNINGS=-Wall -Wwrite-strings \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wnested-externs -Winline -Wshadow + LD=$(CC) -Wl,-x -shared +-LDFLAGS ?= #-g ++LDFLAGS ?= $(RPM_LD_FLAGS) + LIBCAPLIB := -L$(topdir)/libcap -lcap + PSXLINKFLAGS := -lpthread -Wl,-wrap,pthread_create + LIBPSXLIB := -L$(topdir)/libcap -lpsx $(PSXLINKFLAGS) +-- +2.29.2 diff --git a/libcap.spec b/libcap.spec index 8814d90..35a0881 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,11 +1,12 @@ Name: libcap Version: 2.48 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-%{version}.tar.gz +Patch0: libcap-use-compiler-flag-options.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc BuildRequires: make @@ -82,6 +83,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Sun Feb 14 2021 Peter Robinson - 2.48-2 +- Rebase distro flags patch + * Wed Feb 10 2021 Giuseppe Scrivano - 2.48-1 - Update to 0.2.48 From 57d7f730dce8e9631a3669962a03fe9814f90d83 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 11:03:05 +0000 Subject: [PATCH 62/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 35a0881..c3ac281 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.48 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -83,6 +83,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 2.48-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Sun Feb 14 2021 Peter Robinson - 2.48-2 - Rebase distro flags patch From 57896f99c54e43abc1e29b2d6739b7108bf6b6b0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 15:52:02 +0000 Subject: [PATCH 63/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index c3ac281..5abc70a 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.48 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -83,6 +83,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2.48-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 2.48-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From bf07aacd92f36c6acae9348cd5e6be819bec2018 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 17:25:35 +0000 Subject: [PATCH 64/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 5abc70a..1195f12 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.48 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -83,6 +83,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 2.48-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Thu Jan 20 2022 Fedora Release Engineering - 2.48-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 3978f4ec3efd3715242c1ed5c4a30b3f017d7888 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 15:57:00 +0000 Subject: [PATCH 65/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 1195f12..c5d5c92 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.48 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -83,6 +83,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 2.48-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 2.48-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 3d19cbc8ffcd75d8271590ba8ea2e20ef5b80140 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 10:26:26 +0000 Subject: [PATCH 66/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index c5d5c92..e93fa00 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.48 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD or GPLv2 @@ -83,6 +83,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 2.48-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jan 19 2023 Fedora Release Engineering - 2.48-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From e6e70f005a4fd39c8461bb5c11eb3d57ba1890ba Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Mon, 20 Nov 2023 08:36:39 -0700 Subject: [PATCH 67/97] update to 2.69 and modernize tests --- .fmf/version | 1 + .gitignore | 3 + capfaq-0.2.txt | 264 ------------------ getpcaps.8 | 23 -- libcap-use-compiler-flag-options.patch | 37 --- libcap.spec | 63 +++-- plans/main.fmf | 5 + tests/capsh-basic-functionality/Makefile | 64 ----- tests/capsh-basic-functionality/PURPOSE | 3 - tests/capsh-basic-functionality/runtest.sh | 123 -------- tests/capsh/main.fmf | 2 + tests/capsh/test.sh | 94 +++++++ tests/getcap-setcap/main.fmf | 2 + tests/getcap-setcap/test.sh | 98 +++++++ tests/libcap-devel/main.fmf | 2 + .../test-libcap.c | 0 tests/libcap-devel/test.sh | 17 ++ tests/main.fmf | 9 + tests/manpages/main.fmf | 2 + tests/manpages/test.sh | 21 ++ tests/pam_cap-so-sanity-test/Makefile | 64 ----- tests/pam_cap-so-sanity-test/PURPOSE | 5 - tests/pam_cap-so-sanity-test/runtest.sh | 63 ----- tests/pam_cap/main.fmf | 2 + tests/pam_cap/test.sh | 32 +++ tests/pkg-config-libcap-pc-addition/Makefile | 65 ----- tests/pkg-config-libcap-pc-addition/PURPOSE | 7 - .../pkg-config-libcap-pc-addition/runtest.sh | 62 ---- tests/pkg-configs/main.fmf | 2 + tests/pkg-configs/test.sh | 44 +++ tests/sanity-tests/Makefile | 46 --- tests/sanity-tests/runtest.sh | 34 --- .../Makefile | 64 ----- .../setcap-getcap-basic-functionality/PURPOSE | 3 - .../runtest.sh | 98 ------- tests/tests.yml | 28 -- 36 files changed, 378 insertions(+), 1074 deletions(-) create mode 100644 .fmf/version delete mode 100644 capfaq-0.2.txt delete mode 100644 getpcaps.8 delete mode 100644 libcap-use-compiler-flag-options.patch create mode 100644 plans/main.fmf delete mode 100644 tests/capsh-basic-functionality/Makefile delete mode 100644 tests/capsh-basic-functionality/PURPOSE delete mode 100755 tests/capsh-basic-functionality/runtest.sh create mode 100644 tests/capsh/main.fmf create mode 100755 tests/capsh/test.sh create mode 100644 tests/getcap-setcap/main.fmf create mode 100755 tests/getcap-setcap/test.sh create mode 100644 tests/libcap-devel/main.fmf rename tests/{sanity-tests => libcap-devel}/test-libcap.c (100%) create mode 100755 tests/libcap-devel/test.sh create mode 100644 tests/main.fmf create mode 100644 tests/manpages/main.fmf create mode 100755 tests/manpages/test.sh delete mode 100644 tests/pam_cap-so-sanity-test/Makefile delete mode 100644 tests/pam_cap-so-sanity-test/PURPOSE delete mode 100755 tests/pam_cap-so-sanity-test/runtest.sh create mode 100644 tests/pam_cap/main.fmf create mode 100755 tests/pam_cap/test.sh delete mode 100644 tests/pkg-config-libcap-pc-addition/Makefile delete mode 100644 tests/pkg-config-libcap-pc-addition/PURPOSE delete mode 100755 tests/pkg-config-libcap-pc-addition/runtest.sh create mode 100644 tests/pkg-configs/main.fmf create mode 100755 tests/pkg-configs/test.sh delete mode 100644 tests/sanity-tests/Makefile delete mode 100755 tests/sanity-tests/runtest.sh delete mode 100644 tests/setcap-getcap-basic-functionality/Makefile delete mode 100644 tests/setcap-getcap-basic-functionality/PURPOSE delete mode 100755 tests/setcap-getcap-basic-functionality/runtest.sh delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index dd63848..af0feb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ /libcap-*.tar.gz +/libcap-*.tar.sign +/*.asc +/*.src.rpm diff --git a/capfaq-0.2.txt b/capfaq-0.2.txt deleted file mode 100644 index e3e272b..0000000 --- a/capfaq-0.2.txt +++ /dev/null @@ -1,264 +0,0 @@ -This is the Linux kernel capabilities FAQ - -Its history, to the extent that I am able to reconstruct it is that -v2.0 was posted to the Linux kernel list on 1999/04/02 by Boris -Tobotras. Thanks to Denis Ducamp for forwarding me a copy. - -Cheers - -Andrew - -Linux Capabilities FAQ 0.2 -========================== - -1) What is a capability? - -The name "capabilities" as used in the Linux kernel can be confusing. -First there are Capabilities as defined in computer science. A -capability is a token used by a process to prove that it is allowed to -do an operation on an object. The capability identifies the object -and the operations allowed on that object. A file descriptor is a -capability. You create the file descriptor with the "open" call and -request read or write permissions. Later, when doing a read or write -operation, the kernel uses the file descriptor as an index into a -data structure that indicates what operations are allowed. This is an -efficient way to check permissions. The necessary data structures are -created once during the "open" call. Later read and write calls only -have to do a table lookup. Operations on capabilities include copying -capabilities, transferring capabilities between processes, modifying a -capability, and revoking a capability. Modifying a capability can be -something like taking a read-write filedescriptor and making it -read-only. A capability often has a notion of an "owner" which is -able to invalidate all copies and derived versions of a capability. -Entire OSes are based on this "capability" model, with varying degrees -of purity. There are other ways of implementing capabilities than the -file descriptor model - traditionally special hardware has been used, -but modern systems also use the memory management unit of the CPU. - -Then there is something quite different called "POSIX capabilities" -which is what Linux uses. These capabilities are a partitioning of -the all powerful root privilege into a set of distinct privileges (but -look at securelevel emulation to find out that this isn't necessary -the whole truth). Users familiar with VMS or "Trusted" versions of -other UNIX variants will know this under the name "privileges". The -name "capabilities" comes from the now defunct POSIX draft 1003.1e -which used this name. - -2) So what is a "POSIX capability"? - -A process has three sets of bitmaps called the inheritable(I), -permitted(P), and effective(E) capabilities. Each capability is -implemented as a bit in each of these bitmaps which is either set or -unset. When a process tries to do a privileged operation, the -operating system will check the appropriate bit in the effective set -of the process (instead of checking whether the effective uid of the -process i 0 as is normally done). For example, when a process tries -to set the clock, the Linux kernel will check that the process has the -CAP_SYS_TIME bit (which is currently bit 25) set in its effective set. - -The permitted set of the process indicates the capabilities the -process can use. The process can have capabilities set in the -permitted set that are not in the effective set. This indicates that -the process has temporarily disabled this capability. A process is -allowed to set a bit in its effective set only if it is available in -the permitted set. The distinction between effective and permitted -exists so that processes can "bracket" operations that need privilege. - -The inheritable capabilities are the capabilities of the current -process that should be inherited by a program executed by the current -process. The permitted set of a process is masked against the -inheritable set during exec(). Nothing special happens during fork() -or clone(). Child processes and threads are given an exact copy of -the capabilities of the parent process. - -3) What about other entities in the system? Users, Groups, Files? - -Files have capabilities. Conceptually they have the same three -bitmaps that processes have, but to avoid confusion we call them by -other names. Only executable files have capabilities, libraries don't -have capabilities (yet). The three sets are called the allowed set, -the forced set, and the effective set. - -The allowed set indicates what capabilities the executable is allowed -to receive from an execing process. This means that during exec(), -the capabilities of the old process are first masked against a set -which indicates what the process gives away (the inheritable set of -the process), and then they are masked against a set which indicates -what capabilities the new process image is allowed to receive (the -allowed set of the executable). - -The forced set is a set of capabilities created out of thin air and -given to the process after execing the executable. The forced set is -similar in nature to the setuid feature. In fact, the setuid bit from -the filesystem is "read" as a full forced set by the kernel. - -The effective set indicates which bits in the permitted set of the new -process should be transferred to the effective set of the new process. -The effective set is best thought of as a "capability aware" set. It -should consist of only 1s if the executable is capability-dumb, or -only 0s if the executable is capability-smart. Since the effective -set consists of only 0s or only 1s, the filesystem can implement this -set using a single bit. - -NOTE: Filesystem support for capabilities is not part of Linux 2.2. - -Users and Groups don't have associated capabilities from the kernel's -point of view, but it is entirely reasonable to associate users or -groups with capabilities. By letting the "login" program set some -capabilities it is possible to make role users such as a backup user -that will have the CAP_DAC_READ_SEARCH capability and be able to do -backups. This could also be implemented as a PAM module, but nobody -has implemented one yet. - -4) What capabilities exist? - -The capabilities available in Linux are listed and documented in the -file /usr/src/linux/include/linux/capability.h. - -5) Are Linux capabilities hierarchical? - -No, you cannot make a "subcapability" out of a Linux capability as in -capability-based OSes. - -6) How can I use capabilities to make sure Mr. Evil Luser (eluser) -can't exploit my "suid" programs? - -This is the general outline of how this works given filesystem -capability support exists. First, you have a PAM module that sets the -inheritable capabilities of the login-shell of eluser. Then for all -"suid" programs on the system, you decide what capabilities they need -and set the _allowed_ set of the executable to that set of -capabilities. The capability rules - - new permitted = forced | (allowed & inheritable) - -means that you should be careful about setting forced capabilities on -executables. In a few cases, this can be useful though. For example -the login program needs to set the inheritable set of the new user and -therefore needs an almost full permitted set. So if you want eluser -to be able to run login and log in as a different user, you will have -to set some forced bits on that executable. - -7) What about passing capabilities between processes? - -Currently this is done by the system call "setcap" which can set the -capabilities of another process. This requires the CAP_SETPCAP -capability which you really only want to grant a _few_ processes. -CAP_SETPCAP was originally intended as a workaround to be able to -implement filesystem support for capabilities using a daemon outside -the kernel. - -There has been discussions about implementing socket-level capability -passing. This means that you can pass a capability over a socket. No -support for this exists in the official kernel yet. - -8) I see securelevel has been removed from 2.2 and are superceeded by -capabilities. How do I emulate securelevel using capabilities? - -The setcap system call can remove a capability from _all_ processes on -the system in one atomic operation. The setcap utility from the -libcap distribution will do this for you. The utility requires the -CAP_SETPCAP privilege to do this. The CAP_SETPCAP capability is not -enabled by default. - -libcap is available from -ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.2/ - -9) I noticed that the capability.h file lacks some capabilities that -are needed to fully emulate 2.0 securelevel. Is there a patch for -this? - -Actually yes - funny you should ask :-). The problem with 2.0 -securelevel is that they for example stop root from accessing block -devices. At the same time they restrict the use of iopl. These two -changes are fundamentally different. Blocking access to block devices -means restricting something that usually isn't restricted. -Restricting access to the use of iopl on the other hand means -restricting (blocking) access to something that is already blocked. -Emulating the parts of 2.0 securelevel that restricts things that are -normally not restricted means that the capabilites in the kernel has -to have a set of capabilities that are usually _on_ for a normal -process (note that this breaks the explanation that capabilities are a -partitioning of the root privileges). There is an experimental patch at - -ftp://ftp.guardian.no/pub/free/linux/capabilities/patch-cap-exp-1 - -which implements a set of capabilities with the "CAP_USER" prefix: - -cap_user_sock - allowed to use socket() -cap_user_dev - allowed to open char/block devices -cap_user_fifo - allowed to use pipes - -These should be enough to emulate 2.0 securelevel (tell me if we need -something more). - -10) Seems I need a CAP_SETPCAP capability that I don't have to make use -of capabilities. How do I enable this capability? - -Change the definition of CAP_INIT_EFF_SET and CAP_INIT_INH_SET to the -following in include/linux/capability.h: - -#define CAP_INIT_EFF_SET { ~0 } -#define CAP_INIT_INH_SET { ~0 } - -This will start init with a full capability set and not with -CAP_SETPCAP removed. - -11) How do I start a process with a limited set of capabilities? - -Get the libcap library and use the execcap utility. The following -example starts the update daemon with only the CAP_SYS_ADMIN -capability. - -execcap 'cap_sys_admin=eip' update - -12) How do I start a process with a limited set of capabilities under -another uid? - -Use the sucap utility which changes uid from root without loosing any -capabilities. Normally all capabilities are cleared when changing uid -from root. The sucap utility requires the CAP_SETPCAP capability. -The following example starts updated under uid updated and gid updated -with CAP_SYS_ADMIN raised in the Effective set. - -sucap updated updated execcap 'cap_sys_admin=eip' update - -[ Sucap is currently available from -ftp://ftp.guardian.no/pub/free/linux/capabilities/sucap.c. Put it in -the progs directory of libcap to compile.] - -13) What are the "capability rules" - -The capability rules are the rules used to set the capabilities of the -new process image after an exec. They work like this: - - pI' = pI - (***) pP' = fP | (fI & pI) - pE' = pP' & fE [NB. fE is 0 or ~0] - - I=Inheritable, P=Permitted, E=Effective // p=process, f=file - ' indicates post-exec(). - -Now to make sense of the equations think of fP as the Forced set of -the executable, and fI as the Allowed set of the executable. Notice -how the Inheritable set isn't touched at all during exec(). - -14) What are the laws for setting capability bits in the Inheritable, -Permitted, and Effective sets? - -Bits can be transferred from Permitted to either Effective or -Inheritable set. - -Bits can be removed from all sets. - -15) Where is the standard on which the Linux capabilities are based? - -There used to be a POSIX draft called POSIX.6 and later POSIX 1003.1e. -However after the committee had spent over 10 years, POSIX decided -that enough is enough and dropped the draft. There will therefore not -be a POSIX standard covering security anytime soon. This may lead to -that the POSIX draft is available for free, however. - --- - Best regards, -- Boris. - diff --git a/getpcaps.8 b/getpcaps.8 deleted file mode 100644 index 6bbf46a..0000000 --- a/getpcaps.8 +++ /dev/null @@ -1,23 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.TH GETPCAPS 8 "2001-05-29" -.\" Please adjust this date whenever revising the manpage. -.SH NAME -getpcaps \- display process capabilities -.SH SYNOPSIS -.B getpcaps -.IR pid ... -.SH DESCRIPTION -.B getpcaps -displays the capabilities on the processes indicated by the -.I pid -value(s) given on the commandline. The capabilities -are displayed in the -.BR cap_from_text (3) -format. -.SH SEE ALSO -.BR execcap (8). -.br -.SH AUTHOR -This manual page was written by Robert Bihlmeyer , -for the Debian GNU/Linux system (but may be used by others). - diff --git a/libcap-use-compiler-flag-options.patch b/libcap-use-compiler-flag-options.patch deleted file mode 100644 index 9728330..0000000 --- a/libcap-use-compiler-flag-options.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7c13fa4e4c044941afd3b3766de71821cdc04397 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Sun, 14 Feb 2021 14:06:49 -0800 -Subject: [PATCH] Update Make.Rules for Fedora RPM build - ---- - Make.Rules | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Make.Rules b/Make.Rules -index ded9014..537cb6c 100644 ---- a/Make.Rules -+++ b/Make.Rules -@@ -56,10 +56,10 @@ IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include - - CC := $(CROSS_COMPILE)gcc - DEFINES := -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --COPTS ?= -O2 -+COPTS ?= $(RPM_OPT_FLAGS) - CFLAGS ?= $(COPTS) $(DEFINES) - BUILD_CC ?= $(CC) --BUILD_COPTS ?= -O2 -+BUILD_COPTS ?= $(RPM_OPT_FLAGS) - BUILD_CFLAGS ?= $(BUILD_COPTS) $(DEFINES) $(IPATH) - AR := $(CROSS_COMPILE)ar - RANLIB := $(CROSS_COMPILE)ranlib -@@ -69,7 +69,7 @@ WARNINGS=-Wall -Wwrite-strings \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Wnested-externs -Winline -Wshadow - LD=$(CC) -Wl,-x -shared --LDFLAGS ?= #-g -+LDFLAGS ?= $(RPM_LD_FLAGS) - LIBCAPLIB := -L$(topdir)/libcap -lcap - PSXLINKFLAGS := -lpthread -Wl,-wrap,pthread_create - LIBPSXLIB := -L$(topdir)/libcap -lpsx $(PSXLINKFLAGS) --- -2.29.2 diff --git a/libcap.spec b/libcap.spec index e93fa00..92aaa72 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,15 +1,22 @@ Name: libcap -Version: 2.48 -Release: 7%{?dist} +Version: 2.69 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ -License: BSD or GPLv2 +License: BSD-3-Clause OR GPL-2.0-only -Source: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/%{name}-%{version}.tar.gz -Patch0: libcap-use-compiler-flag-options.patch +Source0: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz +Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign +Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/29EE848AE2CCF3F4.asc -BuildRequires: libattr-devel pam-devel perl-interpreter gcc +BuildRequires: pam-devel gcc BuildRequires: make +BuildRequires: glibc-static +BuildRequires: gnupg2 + +%ifarch aarch64 armv7hl i686 ppc64le s390x x86_64 +BuildRequires: golang >= 1.11 +%endif %description libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) @@ -39,20 +46,27 @@ draft 15 capabilities. Install libcap-devel if you want to develop or compile applications using libcap. +%package -n captree +Summary: Capability inspection utility + +%description -n captree +The captree program was inspired by the utility pstree, but it uses the +libcap/cap (Go package) API to explore process runtime state and display +the capability status of processes and threads. + %prep +gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=- %autosetup -p1 + %build -# libcap can not be build with _smp_mflags: -make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ - INCDIR=%{_includedir} MANDIR=%{_mandir} PKGCONFIGDIR=%{_libdir}/pkgconfig/ +%make_build prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags=-linkmode=external" all + +%check +make test %install -make install RAISE_SETFCAP=no \ - DESTDIR=%{buildroot} \ - LIBDIR=%{_libdir} \ - SBINDIR=%{_sbindir} \ - PKGCONFIGDIR=%{_libdir}/pkgconfig/ +%make_install prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags=-linkmode=external" mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ @@ -63,11 +77,11 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %files %license License -%doc doc/capability.notes +%doc doc/capability.md %{_libdir}/*.so.* -%{_sbindir}/* -%{_mandir}/man1/* -%{_mandir}/man8/* +%{_sbindir}/{capsh,getcap,getpcaps,setcap} +%{_mandir}/man1/capsh.1* +%{_mandir}/man8/{getcap,getpcaps,setcap}.8* %{_libdir}/security/pam_cap.so %files static @@ -77,12 +91,19 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %files devel %{_includedir}/* %{_libdir}/*.so -%{_mandir}/man3/* -%{_libdir}/pkgconfig/libcap.pc -%{_libdir}/pkgconfig/libpsx.pc +%{_mandir}/man3/*.3* +%{_libdir}/pkgconfig/{libcap,libpsx}.pc +%files -n captree +%license License +%{_sbindir}/captree +%{_mandir}/man8/captree.8* %changelog +* Mon Nov 06 2023 Carlos Rodriguez-Fernandez - 2.69-1 +- Update to 2.69 (with contribs from Yanko Kaneti , and Andrew G. Morgan ) +- Update license to SPDX (by Anderson Toshiyuki Sasaki ) + * Thu Jul 20 2023 Fedora Release Engineering - 2.48-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..71d864c --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test for libcap +discover: + how: fmf +execute: + how: tmt diff --git a/tests/capsh-basic-functionality/Makefile b/tests/capsh-basic-functionality/Makefile deleted file mode 100644 index 49f35ed..0000000 --- a/tests/capsh-basic-functionality/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/libcap/Sanity/capsh-basic-functionality -# Description: tests basic functionality -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/libcap/Sanity/capsh-basic-functionality -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Karel Srot " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: tests basic functionality" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: libcap" >> $(METADATA) - @echo "Requires: libcap" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/capsh-basic-functionality/PURPOSE b/tests/capsh-basic-functionality/PURPOSE deleted file mode 100644 index 810902f..0000000 --- a/tests/capsh-basic-functionality/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/libcap/Sanity/capsh-basic-functionality -Description: tests basic functionality -Author: Karel Srot diff --git a/tests/capsh-basic-functionality/runtest.sh b/tests/capsh-basic-functionality/runtest.sh deleted file mode 100755 index 6102418..0000000 --- a/tests/capsh-basic-functionality/runtest.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/libcap/Sanity/capsh-basic-functionality -# Description: tests basic functionality -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="libcap" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "useradd -m libcap_tester" - rlPhaseEnd - - rlPhaseStartTest "Remove the listed capabilities from the prevailing bounding set" - rlRun -s "capsh --drop=cap_net_raw -- -c 'getpcaps \$\$'" - rlAssertGrep "Capabilities for" $rlRun_LOG - rlAssertNotGrep cap_net_raw $rlRun_LOG - rlRun -s "capsh --drop=cap_net_raw -- -c 'ping localhost -c 1'" 2,126 "Ping without cap_net_raw shoud fail" - rlAssertGrep "Operation not permitted" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Set the prevailing process capabilities" - rlRun -s "capsh --caps=cap_chown+p --print" - rlAssertGrep "Current: = cap_chown+p" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Set the inheritable set of capabilities" - rlRun -s "capsh --inh=cap_chown --print" - rlRun "grep 'Current: = ' $rlRun_LOG | grep 'cap_chown+eip'" - rlRun -s "capsh --inh=cap_chown -- -c 'getpcaps \$\$' 2>&1" - rlAssertGrep "cap_chown+eip" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Assume the identity of the user nobody" - USERID=`id -u nobody` - GROUPID=`id -g nobody` - rlRun -s "capsh --user=nobody -- -c 'id'" - rlAssertGrep "uid=$USERID(nobody) gid=$GROUPID(nobody) groups=$GROUPID(nobody)" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Force all uid values to equal to nobody" - rlRun -s "capsh --uid=$USERID -- -c 'id'" - rlAssertGrep "uid=$USERID(nobody) gid=0(root) groups=0(root)" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Force all gid values to equal to nobody" - rlRun -s "capsh --gid=$GROUPID -- -c 'id'" - rlAssertGrep "uid=0(root) gid=$GROUPID(nobody)" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Set the supplementary groups" - GROUP2ID=`id -g daemon` - rlRun -s "capsh --groups=${GROUPID},${GROUP2ID} -- -c id" - rlAssertGrep "uid=0(root) gid=0(root) groups=0(root),${GROUP2ID}(daemon),${GROUPID}(nobody)" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Permit the process to retain its capabilities after a setuid" - CURRENT=`capsh --print | grep 'Current:' | cut -d '+' -f 1` - rlRun -s "capsh --keep=0 --uid=$USERID --print" - rlAssertGrep 'Current: =$' $rlRun_LOG -E - rlRun -s "capsh --keep=1 --uid=$USERID --print" - rlAssertGrep "$CURRENT" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Decode capabilities" - rlRun "CODE=$( cat /proc/$$/status | awk '/CapEff/ { print $2 }' )" - rlRun "DECODE=$( capsh --decode=$CODE | cut -d '=' -f 2 )" - rlRun "capsh --print | grep 'Current: = $DECODE'" - rlPhaseEnd - - rlPhaseStartTest "Verify the existence of a capability on the system" - rlRun "capsh --supports=cap_net_raw" - rlRun -s "capsh --supports=cap_foo_bar" 1 - rlAssertGrep "cap\[cap_foo_bar\] not recognized by library" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "Verify exit code for unsupported option" - rlRun "capsh --foo bar" 1 - rlPhaseEnd - - rlPhaseStartTest "Run as a regular user" - USERID=`id -u libcap_tester` - rlRun -s "su - libcap_tester -c 'capsh --print'" - rlAssertGrep "Current: =\$" $rlRun_LOG -E - rlAssertGrep "uid=$USERID(libcap_tester)" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "userdel -r libcap_tester" - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/capsh/main.fmf b/tests/capsh/main.fmf new file mode 100644 index 0000000..28d19cd --- /dev/null +++ b/tests/capsh/main.fmf @@ -0,0 +1,2 @@ +summary: capsh tests +description: tests basic capsh functionality diff --git a/tests/capsh/test.sh b/tests/capsh/test.sh new file mode 100755 index 0000000..92a59d0 --- /dev/null +++ b/tests/capsh/test.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "useradd -m libcap_tester" + rlPhaseEnd + + rlPhaseStartTest "Should remove capability" + rlRun -s "capsh --drop=cap_sys_admin -- -c 'getpcaps \$\$'" + rlAssertGrep "cap_sys_admin-ep" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should prevent the use of removed capability" + rlRun -s "capsh --drop=cap_net_raw -- -c 'ping localhost -e 0 -c 1'" 2,126 "Ping without cap_net_raw shoud fail" + rlAssertGrep "Operation not permitted" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should set the prevailing process capabilities" + rlRun -s "capsh --caps=cap_chown+p --print" + rlAssertGrep "^Current:.*cap_chown[+=][ei]?p[ei]?.*" $rlRun_LOG -E + rlPhaseEnd + + rlPhaseStartTest "Should set the inheritable set of capabilities" + rlRun -s "capsh --inh=cap_chown --print" + rlAssertGrep "^Current:.*cap_chown[+=][ep]?i[ep]?.*" $rlRun_LOG -E + rlPhaseEnd + + rlPhaseStartTest "Should set and show the inheritable set of capabilities" + rlRun -s "capsh --inh=cap_chown -- -c 'getpcaps \$\$' 2>&1" + rlAssertGrep ".*cap_chown[+=][ep]?i[ep]?.*" $rlRun_LOG -E + rlPhaseEnd + + rlPhaseStartTest "Should assume the identity of the user nobody" + USERID=`id -u nobody` + GROUPID=`id -g nobody` + rlRun -s "capsh --user=nobody -- -c 'id'" + rlAssertGrep "uid=$USERID(nobody) gid=$GROUPID(nobody) groups=$GROUPID(nobody)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should assume the nobody identity with uid" + USERID=`id -u nobody` + rlRun -s "capsh --uid=$USERID -- -c 'id'" + rlAssertGrep "uid=$USERID(nobody) gid=0(root) groups=0(root)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should assume guid of nobody" + GROUPID=`id -g nobody` + rlRun -s "capsh --gid=$GROUPID -- -c 'id'" + rlAssertGrep "uid=0(root) gid=$GROUPID(nobody)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should assume the supplementary groups" + GROUPID=`id -g nobody` + GROUP2ID=`id -g daemon` + rlRun -s "capsh --groups=${GROUPID},${GROUP2ID} -- -c id" + rlAssertGrep "uid=0(root) gid=0(root) groups=0(root),${GROUP2ID}(daemon),${GROUPID}(nobody)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should decode capabilities" + rlRun "CODE=$( cat /proc/$$/status | awk '/CapEff/ { print $2 }' )" + rlRun "DECODE=$( capsh --decode=$CODE | cut -d '=' -f 2 )" + rlRun "capsh --print | grep \"$DECODE\"" + rlPhaseEnd + + rlPhaseStartTest "Should detect the existence of a capability on the system" + rlRun "capsh --supports=cap_net_raw" + rlPhaseEnd + + rlPhaseStartTest "Should detect the absence of a capability on the system" + rlRun -s "capsh --supports=cap_foo_bar" 1 + rlAssertGrep "cap\[cap_foo_bar\] not recognized by library" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should error for unsupported option" + rlRun "capsh --foo bar" 1 + rlPhaseEnd + + rlPhaseStartTest "Should run as a regular user" + USERID=`id -u libcap_tester` + rlRun -s "su - libcap_tester -c 'capsh --print'" + rlAssertGrep "Current: =\$" $rlRun_LOG -E + rlAssertGrep "uid=$USERID(libcap_tester)" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "userdel -r libcap_tester" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/getcap-setcap/main.fmf b/tests/getcap-setcap/main.fmf new file mode 100644 index 0000000..bce9fcd --- /dev/null +++ b/tests/getcap-setcap/main.fmf @@ -0,0 +1,2 @@ +summary: setcap and getcap tests +description: tests setcap and getcap basic functionality diff --git a/tests/getcap-setcap/test.sh b/tests/getcap-setcap/test.sh new file mode 100755 index 0000000..8384cbb --- /dev/null +++ b/tests/getcap-setcap/test.sh @@ -0,0 +1,98 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest "Should set and get capabilities on multiple files" + rlRun "touch test-file-0" + rlRun "touch test-file-1" + rlRun "setcap cap_net_admin+p test-file-0 cap_net_raw+ei test-file-1" + rlRun -s "getcap test-file-0 test-file-1" + rlAssertGrep "test-file-0.*cap_net_admin[+=]p" $rlRun_LOG -E + rlAssertGrep "test-file-1.*cap_net_raw[+=]ei" $rlRun_LOG -E + rlRun "rm -f test-file-0 test-file-1" + rlPhaseEnd + + rlPhaseStartTest "Should set capabilities via stdin" + rlRun "touch test-file-0" + rlRun "echo -e 'cap_net_raw+p\ncap_net_admin+p' > input" + rlRun -s "setcap - test-file-0 < input" + rlAssertGrep "Please" $rlRun_LOG + rlRun -s "getcap test-file-0" + rlAssertGrep "cap_net_admin,cap_net_raw[+=]p" $rlRun_LOG -E + rlRun "rm -f test-file-0" + rlPhaseEnd + + rlPhaseStartTest "Should set capabilities quietly via stdin" + rlRun "touch test-file-0" + rlRun "echo -e 'cap_net_raw+p' > input" + rlRun -s "setcap -q - test-file-0 < input" + rlAssertNotGrep "Please" $rlRun_LOG + rlRun -s "getcap test-file-0" + rlAssertGrep "cap_net_raw[+=]p" $rlRun_LOG -E + rlRun "rm -f test-file-0" + rlPhaseEnd + + rlPhaseStartTest "Should remove capabilities" + rlRun "touch test-file-0" + rlRun "setcap cap_net_admin+p test-file-0" + rlRun "setcap -r test-file-0" + rlRun -s "getcap test-file-0" + rlAssertNotGrep "cap_net_admin" $rlRun_LOG + rlRun "rm -f test-file-0" + rlPhaseEnd + + rlPhaseStartTest "Should list capabilities recursively" + rlRun "touch test-file-0" + rlRun "mkdir test-dir-1" + rlRun "touch test-dir-1/test-file-1" + rlRun "setcap cap_net_admin+p test-file-0 cap_net_raw+ei test-dir-1/test-file-1" + rlRun -s "getcap -r *" + rlAssertGrep "^test-file-0.*cap_net_admin[+=]p\$" $rlRun_LOG -E + rlAssertGrep "^test-dir-1/test-file-1.*cap_net_raw[+=]ei\$" $rlRun_LOG -E + rlRun "rm -f test-file-0" + rlRun "rm -rf test-dir-1" + rlPhaseEnd + + rlPhaseStartTest "listing capabilities verbosely" + rlRun "touch test-file-0" + rlRun "mkdir test-dir-1" + rlRun "touch test-dir-1/test-file-1" + rlRun "touch test-dir-1/test-file-2" + rlRun "setcap cap_net_admin+p test-file-0 cap_net_raw+ei test-dir-1/test-file-1" + rlRun -s "getcap -v -r *" + rlAssertGrep "^test-file-0.*cap_net_admin[+=]p\$" $rlRun_LOG -E + rlAssertGrep "^test-dir-1/test-file-1.*cap_net_raw[+=]ei\$" $rlRun_LOG -E + rlAssertGrep "^test-dir-1/test-file-2\$" $rlRun_LOG -E + rlRun "rm -f test-file-0" + rlRun "rm -rf test-dir-1" + rlPhaseEnd + + rlPhaseStartTest "Should setcap print help" + rlRun -s "setcap -h" + rlAssertGrep "usage" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should getcap print help" + rlRun -s "getcap -h" + rlAssertGrep "usage" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "setcap should exit with 1 on invalid arguments" + rlRun -s "setcap foo bar" 1 + rlAssertGrep "Invalid" $rlRun_LOG -i + rlPhaseEnd + rlPhaseStartTest "getcap should exit with 1 on invalid arguments" + rlRun -s "getcap -f oo" 1 + rlAssertGrep "Invalid" $rlRun_LOG -i + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/libcap-devel/main.fmf b/tests/libcap-devel/main.fmf new file mode 100644 index 0000000..3381c96 --- /dev/null +++ b/tests/libcap-devel/main.fmf @@ -0,0 +1,2 @@ +summary: libcap-devel tests +description: tests libcap-devel functionality diff --git a/tests/sanity-tests/test-libcap.c b/tests/libcap-devel/test-libcap.c similarity index 100% rename from tests/sanity-tests/test-libcap.c rename to tests/libcap-devel/test-libcap.c diff --git a/tests/libcap-devel/test.sh b/tests/libcap-devel/test.sh new file mode 100755 index 0000000..3c4fd93 --- /dev/null +++ b/tests/libcap-devel/test.sh @@ -0,0 +1,17 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + + +rlJournalStart + rlPhaseStartSetup + rlRun "gcc -lcap -lcmocka -Wall -g3 -o test-libcap test-libcap.c" + rlPhaseEnd + + rlPhaseStartTest + rlRun "./test-libcap" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm test-libcap" + rlPhaseEnd +rlJournalEnd diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..c7122a2 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,9 @@ +test: ./test.sh +framework: beakerlib +require: + - libcap + - libcap-devel + - libcmocka + - libcmocka-devel + - gcc + - iputils diff --git a/tests/manpages/main.fmf b/tests/manpages/main.fmf new file mode 100644 index 0000000..3a97d78 --- /dev/null +++ b/tests/manpages/main.fmf @@ -0,0 +1,2 @@ +summary: man pages install smoke tests +description: verify that the man pages are installed correctly diff --git a/tests/manpages/test.sh b/tests/manpages/test.sh new file mode 100755 index 0000000..b4afd94 --- /dev/null +++ b/tests/manpages/test.sh @@ -0,0 +1,21 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +expected_manpages=( + 'capsh(1)' + 'libcap(3)' # there are many more but if these are present then it verifies it because of the glob install + 'libpsx(3)' + 'getcap(8)' + 'getpcaps(8)' + 'setcap(8)' + 'captree(8)' + +) + +rlJournalStart + for page in "${expected_manpages[@]}"; do + rlPhaseStartTest "test ${page}" + rlRun "man --pager=cat '${page}'" + rlPhaseEnd + done +rlJournalEnd diff --git a/tests/pam_cap-so-sanity-test/Makefile b/tests/pam_cap-so-sanity-test/Makefile deleted file mode 100644 index 3f30e80..0000000 --- a/tests/pam_cap-so-sanity-test/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/libcap/Sanity/pam_cap-so-sanity-test -# Description: basic functionality test for pam_cap.so module -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/libcap/Sanity/pam_cap-so-sanity-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Karel Srot " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: basic functionality test for pam_cap.so module" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: libcap" >> $(METADATA) - @echo "Requires: libcap" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/pam_cap-so-sanity-test/PURPOSE b/tests/pam_cap-so-sanity-test/PURPOSE deleted file mode 100644 index 9edc2b0..0000000 --- a/tests/pam_cap-so-sanity-test/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /CoreOS/libcap/Sanity/pam_cap-so-sanity-test -Description: basic functionality test for pam_cap.so module -Author: Karel Srot - -Test if a test user can be granted capabilities via pam_cap.so module. diff --git a/tests/pam_cap-so-sanity-test/runtest.sh b/tests/pam_cap-so-sanity-test/runtest.sh deleted file mode 100755 index be93b30..0000000 --- a/tests/pam_cap-so-sanity-test/runtest.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/libcap/Sanity/pam_cap-so-sanity-test -# Description: basic functionality test for pam_cap.so module -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="libcap" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "useradd -m pam_cap_user" - rlRun "useradd -m pam_cap_user2" - rlFileBackup /etc/pam.d/su - [ -f /etc/security/capability.conf ] && rlFileBackup /etc/security/capability.conf - rlRun "echo -e 'cap_net_raw pam_cap_user\nnone *' > /etc/security/capability.conf" - rlRun "sed '1 s/^/auth required pam_cap.so/' -i /etc/pam.d/su" 0 "Configure pam_cap.so in /etc/pam.d/su" - rlPhaseEnd - - rlPhaseStartTest - rlRun "su - pam_cap_user -c 'getpcaps \$\$' &> user1.log" - rlAssertGrep "Capabilities for.* = cap_net_raw" user1.log -E - rlRun "su - pam_cap_user2 -c 'getpcaps \$\$' &> user2.log" - rlAssertNotGrep "cap_net_raw" user2.log - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "userdel -r pam_cap_user" - rlRun "userdel -r pam_cap_user2" - rlFileRestore - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/pam_cap/main.fmf b/tests/pam_cap/main.fmf new file mode 100644 index 0000000..15277dc --- /dev/null +++ b/tests/pam_cap/main.fmf @@ -0,0 +1,2 @@ +summary: pam_cap.so tests +description: tests pam_cap.so functionality diff --git a/tests/pam_cap/test.sh b/tests/pam_cap/test.sh new file mode 100755 index 0000000..035edd9 --- /dev/null +++ b/tests/pam_cap/test.sh @@ -0,0 +1,32 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "useradd -m pam_cap_user" + rlRun "useradd -m pam_cap_user2" + rlFileBackup /etc/pam.d/su + [ -f /etc/security/capability.conf ] && rlFileBackup /etc/security/capability.conf + rlRun "echo -e 'cap_net_raw pam_cap_user\nnone *' > /etc/security/capability.conf" + rlRun "sed '1 s/^/auth required pam_cap.so/' -i /etc/pam.d/su" 0 "Configure pam_cap.so in /etc/pam.d/su" + rlPhaseEnd + + rlPhaseStartTest "Should given pam_cap_user the cap_net_raw capability" + rlRun -s "su - pam_cap_user -c 'getpcaps \$\$'" + rlAssertGrep ".*cap_net_raw[+=].*" $rlRun_LOG -E + rlPhaseEnd + rlPhaseStartTest "The user pam_cap_user2 should not have the cap_net_raw capability" + rlRun -s "su - pam_cap_user2 -c 'getpcaps \$\$'" + rlAssertNotGrep "cap_net_raw" $rlRun_LOG + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "userdel -r pam_cap_user" + rlRun "userdel -r pam_cap_user2" + rlFileRestore + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/pkg-config-libcap-pc-addition/Makefile b/tests/pkg-config-libcap-pc-addition/Makefile deleted file mode 100644 index 57b4cd6..0000000 --- a/tests/pkg-config-libcap-pc-addition/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition -# Description: Test for BZ#1425490 (Missing libcap.pc) -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Karel Srot " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1425490 (Missing libcap.pc)" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: libcap" >> $(METADATA) - @echo "Requires: libcap libcap-devel pkgconfig" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1425490" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/pkg-config-libcap-pc-addition/PURPOSE b/tests/pkg-config-libcap-pc-addition/PURPOSE deleted file mode 100644 index 68dbb0b..0000000 --- a/tests/pkg-config-libcap-pc-addition/PURPOSE +++ /dev/null @@ -1,7 +0,0 @@ -PURPOSE of /CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition -Description: Test for BZ#1425490 (Missing libcap.pc) -Author: Karel Srot -Bug summary: Missing libcap.pc -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1425490 - -Checking the presence and sanity of the libcap.pc file. diff --git a/tests/pkg-config-libcap-pc-addition/runtest.sh b/tests/pkg-config-libcap-pc-addition/runtest.sh deleted file mode 100755 index b63ad04..0000000 --- a/tests/pkg-config-libcap-pc-addition/runtest.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/libcap/Sanity/pkg-config-libcap-pc-addition -# Description: Test for BZ#1425490 (Missing libcap.pc) -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="libcap" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest - rlRun "rpm -ql libcap-devel | grep libcap.pc" 0 "There must be libcap.pc" - if [ $? -eq 0 ]; then - PCFILE=$(rpm -ql libcap-devel | grep libcap.pc) - rlRun "pkg-config --libs libcap | grep -- '-lcap'" - VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1) - rlRun "pkg-config --modversion libcap | grep $VER" - rlRun -s "pkg-config --print-variables libcap" - rlAssertGrep "^prefix" $rlRun_LOG - rlAssertGrep "^exec_prefix" $rlRun_LOG - rlAssertGrep "^libdir" $rlRun_LOG - rlAssertGrep "^includedir" $rlRun_LOG - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/pkg-configs/main.fmf b/tests/pkg-configs/main.fmf new file mode 100644 index 0000000..fca923f --- /dev/null +++ b/tests/pkg-configs/main.fmf @@ -0,0 +1,2 @@ +summary: validates pkg-configs presence. +description: ensures libcap.pc and libpsx.pc are installed diff --git a/tests/pkg-configs/test.sh b/tests/pkg-configs/test.sh new file mode 100755 index 0000000..45f98a4 --- /dev/null +++ b/tests/pkg-configs/test.sh @@ -0,0 +1,44 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest "libcap pkg-config should be present and valid" + rlRun "rpm -ql libcap-devel | grep libcap.pc" 0 "There must be libcap.pc" + if [ $? -eq 0 ]; then + PCFILE=$(rpm -ql libcap-devel | grep libcap.pc) + rlRun "pkg-config --libs libcap | grep -- '-lcap'" + VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1) + rlRun "pkg-config --modversion libcap | grep $VER" + rlRun -s "pkg-config --print-variables libcap" + rlAssertGrep "^prefix" $rlRun_LOG + rlAssertGrep "^exec_prefix" $rlRun_LOG + rlAssertGrep "^libdir" $rlRun_LOG + rlAssertGrep "^includedir" $rlRun_LOG + fi + rlPhaseEnd + + rlPhaseStartTest "libcap pkg-config should be present and valid" + rlRun "rpm -ql libcap-devel | grep libpsx.pc" 0 "There must be libpsx.pc" + if [ $? -eq 0 ]; then + PCFILE=$(rpm -ql libcap-devel | grep libpsx.pc) + rlRun "pkg-config --libs libpsx | grep -- '-lpsx -lpthread -Wl,-wrap,pthread_create'" + VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1) + rlRun "pkg-config --modversion libpsx | grep $VER" + rlRun -s "pkg-config --print-variables libpsx" + rlAssertGrep "^prefix" $rlRun_LOG + rlAssertGrep "^exec_prefix" $rlRun_LOG + rlAssertGrep "^libdir" $rlRun_LOG + rlAssertGrep "^includedir" $rlRun_LOG + fi + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/sanity-tests/Makefile b/tests/sanity-tests/Makefile deleted file mode 100644 index 9e75815..0000000 --- a/tests/sanity-tests/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1+ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/libcap -# Description: Test if libcap working ok -# Author: Susant Sahani -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export TEST=/CoreOS/libcap -export TESTVERSION=1.0 - -OBJS = test-libcap.c -CFLAG = -Wall -g3 -CC = gcc -LIBS = -lcap -lcmocka - -test-libcap:${OBJ} - ${CC} ${CFLAGS} ${INCLUDES} -o $@ ${OBJS} ${LIBS} - -run: test-libcap - ./runtest.sh -clean: - -rm -f *~ test-libcap - -.c.o: - ${CC} ${CFLAGS} ${INCLUDES} -c $< - -CC = gcc - -include /usr/share/rhts/lib/rhts-make.include -$(METADATA): Makefile - @echo "Owner: Susant Sahani" > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test libcap works ok" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: libcap" >> $(METADATA) - @echo "Requires: libcap libcap-devel" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -Fedora 29" >> $(METADATA) - rhts-lint $(METADATA) diff --git a/tests/sanity-tests/runtest.sh b/tests/sanity-tests/runtest.sh deleted file mode 100755 index 17d83e3..0000000 --- a/tests/sanity-tests/runtest.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1+ -# ~~~ -# runtest.sh of libcap -# Description: Tests for libcap -# -# Author: Susant Sahani -# Copyright (c) 2018 Red Hat, Inc. -# ~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="libcap" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "cp test-libcap /usr/bin/" - rlPhaseEnd - - rlPhaseStartTest - rlLog "Starting libcap tests ..." - rlRun "/usr/bin/test-libcap" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "rm /usr/bin/test-libcap" - rlLog "libcap tests done" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd - -rlGetTestState diff --git a/tests/setcap-getcap-basic-functionality/Makefile b/tests/setcap-getcap-basic-functionality/Makefile deleted file mode 100644 index 02ce5d5..0000000 --- a/tests/setcap-getcap-basic-functionality/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/libcap/Sanity/setcap-getcap-basic-functionality -# Description: test basic functionality -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/libcap/Sanity/setcap-getcap-basic-functionality -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Karel Srot " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: test basic functionality" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 5m" >> $(METADATA) - @echo "RunFor: libcap" >> $(METADATA) - @echo "Requires: libcap" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/setcap-getcap-basic-functionality/PURPOSE b/tests/setcap-getcap-basic-functionality/PURPOSE deleted file mode 100644 index a6ea33d..0000000 --- a/tests/setcap-getcap-basic-functionality/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/libcap/Sanity/setcap-getcap-basic-functionality -Description: test basic functionality -Author: Karel Srot diff --git a/tests/setcap-getcap-basic-functionality/runtest.sh b/tests/setcap-getcap-basic-functionality/runtest.sh deleted file mode 100755 index 3639367..0000000 --- a/tests/setcap-getcap-basic-functionality/runtest.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/libcap/Sanity/setcap-getcap-basic-functionality -# Description: test basic functionality -# Author: Karel Srot -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="libcap" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "mkdir mydir && touch file1 mydir/file2 mydir/file3" - rlPhaseEnd - - rlPhaseStartTest "set and get capabilities" - rlRun "setcap cap_net_admin+p file1 cap_net_raw+ei mydir/file2" - rlRun -s "getcap file1 mydir/file2" - rlAssertGrep "file1 = cap_net_admin+p" $rlRun_LOG - rlAssertGrep "mydir/file2 = cap_net_raw+ei" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "set capabilities via stdin" - rlRun "echo -e 'cap_net_raw+p\ncap_net_admin+p' > input" - rlRun -s "setcap - mydir/file3 < input" - rlAssertGrep "Please enter caps for file \[empty line to end\]:" $rlRun_LOG - rlRun "getcap mydir/file3 | grep 'mydir/file3 = cap_net_admin,cap_net_raw+p'" - rlPhaseEnd - - rlPhaseStartTest "set capabilities quietly via stdin" - rlRun "echo -e 'cap_net_raw+p' > input" - rlRun -s "setcap -q - mydir/file3 < input" - rlAssertNotGrep "Please enter caps for file" $rlRun_LOG - rlRun "getcap mydir/file3 | grep 'mydir/file3 = cap_net_raw+p'" - rlPhaseEnd - - rlPhaseStartTest "remove capabilities" - rlRun "setcap -r mydir/file3" - rlRun "getcap | grep file3" 1 "There should be no capabilities listed for file1" - rlPhaseEnd - - rlPhaseStartTest "listing capabilities recursively" - rlRun -s "getcap -r *" - rlAssertGrep "file1 = cap_net_admin+p" $rlRun_LOG - rlAssertGrep "mydir/file2 = cap_net_raw+ei" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartTest "listing capabilities verbosely" - rlRun -s "getcap -v mydir/*" - rlAssertGrep "mydir/file2 = cap_net_raw+ei" $rlRun_LOG - rlAssertGrep "mydir/file3\$" $rlRun_LOG -E - rlPhaseEnd - - rlPhaseStartTest "print help" - rlRun "setcap -h | grep 'usage: setcap'" 1 - rlRun "getcap -h | grep 'usage: getcap'" 1 - rlPhaseEnd - - rlPhaseStartTest "exit with 1 on error" - rlRun -s "setcap foo bar" 1 - rlAssertGrep "fatal error: Invalid argument" $rlRun_LOG - rlRun -s "getcap -f oo" 1 - rlAssertGrep "getcap: invalid option -- 'f'" $rlRun_LOG - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index fbbca7f..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,28 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - - container - tests: - - sanity-tests - - pam_cap-so-sanity-test - - setcap-getcap-basic-functionality - required_packages: - - libcap # libcap package required for all tests - - libcap-devel - - libcmocka - - libcmocka-devel - - gcc - - iputils # ping command required for capsh-basic-functionality - -# Tests that run in atomic -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - atomic - tests: - - capsh-basic-functionality - - pam_cap-so-sanity-test - - setcap-getcap-basic-functionality From 75bb5af48b3bcabf59ce7d4a2ff63fc9752ad64d Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Mon, 20 Nov 2023 21:54:28 +0100 Subject: [PATCH 68/97] upload sources and add GPG key to git --- .gitignore | 1 - 29EE848AE2CCF3F4.asc | 105 +++++++++++++++++++++++++++++++++++++++++++ sources | 3 +- 3 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 29EE848AE2CCF3F4.asc diff --git a/.gitignore b/.gitignore index af0feb9..e3dc947 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /libcap-*.tar.gz /libcap-*.tar.sign -/*.asc /*.src.rpm diff --git a/29EE848AE2CCF3F4.asc b/29EE848AE2CCF3F4.asc new file mode 100644 index 0000000..6d95430 --- /dev/null +++ b/29EE848AE2CCF3F4.asc @@ -0,0 +1,105 @@ +pub rsa4096 2011-10-07 [SC] + 38A644698C69787344E954CE29EE848AE2CCF3F4 +uid Andrew G. Morgan +uid Andrew G. Morgan (Work Address) +sub rsa4096 2011-10-07 [E] + E8BBFE9EBCE94FB48D2F98FC61B996743B143E89 + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBE6OiBIBEADpdtUxC8Fmhn5UK6UCZdU7mFgZwN8U9cabFUPfUIkMqXULhCD0 +hG2/amuiiUoLollPjOopNqk4cc8LcZfszOdBFAYj7MeWzNySVw4KkWrVCEH/bZ0Q +QzZH2qmoMT5CIrtcNxCAvukYsZLhyZYO0HdfuE05mVhVjtX9Btfxr7Ndvb7L4MRS +3Qb6+nHTgfn/Oow92/koIWvi0YvskKdZypeU888TQL99E8xdgL2n2Ip3xYwBHRR2 +GPb5MGOuEItF3tJ0kkILW5mzkJq/iLzRphzKjdF76I9QVRP8dZ+uWHPubWePm/5c +1H9lnlw00ZZ/ucQvSwTesUYk2aKkxzgm6X8fCdJXBLGgW5K6CkynpjN3qJ9KpcNY +H55smUgp8BaiWuoHe4pLvuBhnN2wiYOe2j9UvGX1OaRstMXFx7YbBvkGgdoZthUe +VPGAa4K+dnI2oy4wukzl/unAKrlMCBRsRoW2qjy3TDSXqwJhd34ilHzrdAdchrh/ +acBfbBtRzVlcDTnGltDNMuRTXzujaY9C3B0L2E+Jfrds8WcM8ASO4mHwJUTMrBwM +b5sFSG+/X9Ufg/c2G086HQ7xMERUA5oz66P5ReHCph8WHQN2L5vtZwL7//hZB9hn +G0K1210YEDXpFPijpis/54MKUSkWEFOLjUbiSPbwEfb79A00CcHojQQinwARAQAB +tCRBbmRyZXcgRy4gTW9yZ2FuIDxtb3JnYW5Aa2VybmVsLm9yZz6JAhwEEAECAAYF +Ak6YnFgACgkQINBOWnE2YKdO8Q//fwzZuxAacpWE2wByvuwM7hiYOtzxX9tSsaMA +NaYtxb8rYwM5YtkjCaBnWoyJ8de7L82HJff/GnxVpw0CWm5Dyj9Pvs/VAIvC4+75 ++5cs6YWQIhIV5NbmD92lKFni2xNcBomzttB1CexjemtmXQIwm0i06HBbfg8Nkv3l +WnZlHHzgOffnkodR56rJCOq75wTPZPmx9WP87bDW2B5ZwzGs4jcBEP8qz4J5agVk +97OrYrhy2RrtD6a4f3/VYJq12mvJ/lImgEwNoLsZfMZ6B6wpCvfmx80z1dE/VOmG +YKpDPhU5v6y0gQm/UOpz0tzgRJw7CYRK3mbM/Ctnc4n6y0UpbVAmAStRvnlM1DgL +3nuuh3EJ6s1r2m2l1SRT09va+lK6s1GARMD+6tmQE7+89DwwSB0lJtWCHRGP/M8W +ePdqRAVz3xTkqbRMgcnuvpL6qPveK1Qzv2MxUomB7A8QDxzKzQAIugzm5E1irfmZ +jg54/8R2bo0uIp8PS6wx8RD7TYHxGpe4cEAkBr/5/5TfMaTDbrx/f/XqRm/89Mx9 +04TLVyMqVDcsXAgd+fIGtv/e8cBVMDIRsE9aZQsSOil168Q8qYrJbYRcWmEGaM4d +KCGYhEPE7ZaZK4jxshSwfiirozCoAmkTmvOt4E0s2HlljjLPDecAlvoFvn2bSS3Z +8coir4CJAjsEEwECACUCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJOmRGP +AhkBAAoJECnuhIrizPP0wK0P/RMvjmzeXbgoa36cBDvDKReAiC56Au4qGXkNah39 +84tNPT1hVUKCiwiUmULoNJbEI4qFJTtwsMi5QzE+daCA7t+ALJiC+PKiKFG1LDz7 +mxfhmBeS3XcYuqZdjyKrATUFr0SHbsJxtRCslawGD2gKczLknFeBXL0997TfJS9i +pLibqCtmvyryHn4EbZfoJqcpj/RBN/izVGHNYI8BsZpO5F6z7vXoncDL0dKh65nd +GaIbhVDUPsDBvzg3i+EzhB51hYTTNKK0QpWbmsXfJBnvztinfLUsnO9HV8aRaygO +I/DAKAtT7YPXORA1oFYtx69bzulqC+TXUmeV8YW8bETH4xHM9mQb0oNLPibR2nK2 +FSDiLp0/eEM5vgzfPVUX7WzBJUPsf0ah/e1yrXqudGUUZ0R+3VMOdxMryZBKLymk +zyvu6a5DcLarqAt8y9ciRH67HKNnE1gvHf5K2Q37gwSecwmXCjpMlbVJnIarLKBc +VRcYKtxgPxCv6483I8heSKF7PB/IFBmzT1cX7lhln9+62Ks/0Gs0pA0iNLaD+POP +iqWrAwZsFvKjD9PDaCBDFRWjFqZLyJMsMi1qmP8jWsdQqPdUskQC0ftvw3Z6Siyy +rriSAzglCjmmAcfdt+w4b/EO4SzSZUnd/ApkHkZx1Lbta15WKxGi7S8/5zNdaK72 +1nUdiQIzBBABCAAdFiEEIHnICkX+vZuglRryyyMS4ez3P1cFAl0PDA8ACgkQyyMS +4ez3P1eHXg//ceYbw0RGvvkpBn41t2D2OEDnowyAqgdrByFoub4mam3lxjKZob6F +nIVcp0aY6TTOW0Peo0ZMigLh2DkEpF0JZrtTu5Om2tZpn+16d2c9ThROEasTERqI +AnUHMmpXupRZDSdHJTSD+HdlBSvO9Ve2vtIv/F9AW8pIQqZby3rJeFwsaQl9GUuw +T6teyBG5GZVFLDvNM2r64moTGvxsZdOEz/2KSZNMONEIFWYJPbBtaKZjlNJebh+i +YwOda6YqGwmyBpudtMtyHUT5gXBIaaMfKW40CxxTesOuV7YWg52ZkJe8tsURnIUi +55wCaLnNM+bsqjRIDZ5tAvCqTCj+T5hg6uJbmWOhCHW4VMp3PKEgmajMSZVAfzcW +iryAT/xol531qwer+3LRRS21qha3lfAJNaDy6rTHBqeDXyo7oeBQwoFIJFA5w9Ia +DVRfWXiKnHjsma0CEg1JXXnL1eb2Bzh8qInUQEgm92B/w2tJgNDDNPIDQDlbWgQw +24Wzx5QGOfr4CJM3WMhSdUEn8jyyFj+GmCfCAtRTEPhGIf4op6rZfH5Q8O0UJ865 +iIvshNNLoWtkVx2MTU4juXsz666Vq+HFzyIw2xPeabVIKVzF25+vbTTRQIhohuU9 +FV36IqXOGGwYAlnu8/2NFDWbUIhaCaB0N2AeVH8kQcO9L0OEHB0MJy+0MEFuZHJl +dyBHLiBNb3JnYW4gKFdvcmsgQWRkcmVzcykgPGFnbUBnb29nbGUuY29tPokCOAQT +AQIAIgUCTpUPggIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQKe6EiuLM +8/TM2hAAwOPHeKi+9/SukBgW+8Cg9vOERdwnjX9P6lrFY4mbxISDt9edQeBd5PBb +dEk8ins+C5y0+iC8pBX7sZxTkNyDXcNk7icytKy8iewtCR94NVT/OXYy4cU60Eyk +OnqIZxTCNLRthu+XTd8+Ptlcgwv4js5LI16hn+fbO0j1SIgEei+wepmpibh3tU6L +idWPVj8ZqT32zDdwu9TCr1/eLyKg3PKeoFPuMD4ZYVp5Um4as4IEEGC4i7QSSDjY +0BnYBHfbBA/l4S2VICrwiX1FnN7BrW/viWgM0k6X6Rbn+NArq0aPYD2+VOpXMdQO +Y9n2foOzuHfCjaDeDNhfVy4zeylb1SwDxdQM1jbI0VgML0iwAjT27Xw3t/z2Kwb/ +JiHkxmknPZ/Htx5we3BJW6RMYcOxqgdNcyV+NCZVTl585FklroHHRORpILB5x6be +r7c5x2BbxfA9aKT/la/wHd0mikwfUzDelGGKu1N3r/zzE3IuQlK2m0ENm9uq8Hac +yZKKqCHSY96yWfC5vEnn/gVs/3OUs3vOnj1FkcoOX/wQxJcYKOYbpRPFbojdikp1 +zj7IR3X39RS3GpA59uAW+Vxt6xDkgu8s7NmJ2RLvLS/iL2tkF78cTLd4bzPizl2W +gGulIG8rJLCpa65IOfe0yrDgHPYF7cWC1gDhOc3LuyFwVHYEwWiJAjMEEAEIAB0W +IQQgecgKRf69m6CVGvLLIxLh7Pc/VwUCXQ8MGwAKCRDLIxLh7Pc/V0F9EACHKNqF +l5xXDHe/0nlZ+J/OFRNIE8ObZAxQLaPfK3gRkFn/SbKQzkzB84X2il7A/W221Lzi +me5eTFPhTX3RxUcoSQdrtCCov5gCeuiUbhuJ28zuJxslxLE8bhnmNfpLmFFGtbMI +kXq+y0uqc08Yj8frPXKgx7KvOoovpm0X/igiAkiuKLhbq8xIwaIN0NL4slFlx+ZP +Ed0KA6qOvlLr0T/lLVptAeMrzfi2gqY1utSqE5IVrbtU6Kptw3zfURsGFFIaKjIr +hzu25Cdpg/NxYGqo2GqD0lZ+OeWSy0WI5sxCSDqr0to9lvsJGv2Nc06ixIjH7vG2 +Hc/cC0QyHdBM6GwaLmUH9hrcSCLR5kxTzAW0Cf6lrAZUL36Ivl5l+zoLdJqSgZLY +YXqMdQf75Y5TRFzry5pWRef3ba4/sgui89W11Uccdq/pGe4OKo0I/vq3bv35/3cZ +aMGjj3x6v67kk8GWbKg6CPBnzb1dY7VDA5RWOt2lPZr4omUNFwRpxAfZADUz2Q4S +tMQVE018SSH1i6G9EB8KVQEBeD4qgaWs1z9sqA7K5wlBzGarTa2RspH0GMmYwxBY +hXtYpKm/47Dkg8j3N01VVwky0XGPFHCVgFbeXGknL1O3thOGs5XPO05jtBcbYI1u +vvK+h/CNn1yuTG13BSG4pgRF1Sy6CFLHme0d/rkCDQROjogSARAAtLny8nlyr8fy +YGAocQz0S47a99n/X0Vmgwo1trJsCXWbOrpztznY8IFRK/dRnRHiMwBxWQ4CvdUk +2p0MweUiOjpEN7bUm92jeFXMr0hpQKf+O4DMExHS4hxLwArnKFuAk2ejRQGXBcEo +Mv11LiUwuzFbWdXqMsA1TbuA+WvEBnFUYM/6xNiJeRIUIiGydhG1yaw8HrNWLHnh +hcOfT6z5AO69hZZiJacp9pU/+jnep/M42p4J17x81+ESpJeladwR0Qxc0qxOyWid +N7oO5hSiBEwU6lYQjdQ23pa7tN1o90P9jyN2nFBEdBu2D/mi4DV/+VXUYHNEy3uN +hmmLGwMoPVWiZveRmG74+ne7MVyxwb9EIF3IenS4T65ee1dlZvaoMxUlUe8htEK0 +ChrQZOfITs9MyjUwoTiLUVo3kQeMli9HJEQXPRjHqkkZ7W65LhkEVnHSPHWtttRS +DkuZYtze+he142GzDSQA3dF2zy/tLpBb5CA29ITcQTspgV7AuV8YQqDZ4XWHsR9A +m5334N83EXk2oouqxl7mKUB0Vg6tujNCBSRn6A3CUaA29w/MyTg4z6Yw6HD3il1J +8PcWEoOzqlUoPd8tA5pcZCcKngkXndpXgsZCgoCgvx9WNU+LUrHBfhC3TLLsI7iG +O1JvLghkesKTARF3O2hS3xAhfGZxn8MAEQEAAYkCHwQYAQIACQUCTo6IEgIbDAAK +CRAp7oSK4szz9HSYD/9hmEsJuSgAGwx/OPweYuDGkA25ajDAu59LpzTbjB/yOU1r +DVUu3cMH+UEyaEGlhbneGvHF2DsEC9il/8fVL4eaE9EWpopIonYndBE91+YiGHPT +oiyKcdp0KuQMwm2ENAiEf/qErrB2NLna4wfZUx5lzvEOEk3cNPmNz2ERyMPXIeei +Q9VKp3MzopWhvBItAyIzzuydKKvJAKzDoTOEL4w60slAphj8rVCsW45k2AurWUH7 +VFM8ezXunieLeygCGb+YJZAet6yVXD3UwnNcWCGQ+xKSPuyKrn4xKG0N5gzxnGIh +/S/7IOjRaNR5X+pfWd6YzN9qURUfiXmuLSPRHK4Flfam4gMMHul9wL6XBayFo2NU +PBaxg4U9ACAgSJxgCTNPCKwnovecOsRmIESKtT1F3hbZRRgRGj/TDepJQNfHSyk/ +ZQfuoJggBMQLJKzGII42rb0W90QLMk0SyCzeb3LO3yyNiKpluNpJsl2IqdBJE5t1 +LxhKDnju6JlFyPcGJnP/doTuDTjjL0V+guPAGVbuq0g2hku+ZlJwjMStNwHPWxei +fuDJbQVIp0xZbI5djdHC8hVJX+d09J5eq0PlgMEidc4F+Vv+mmGJl0GiNfhmTaAC +SRzbI25/bhvj2xhx8A2LEOuU/+nzYgQzPcFpawiUP1wBnTqi+maxKx5/9ifyrw== +=6WX5 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/sources b/sources index 22a2095..7857c6f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (libcap-2.48.tar.gz) = 90ac6e46531e4893b78b14171537c6dfd06cf617af9e90f38ea0ce4b50161451528aefff41dbe983719e76582cf39f8d7d432f99756e976f62403d5bc3c209c8 +SHA512 (libcap-2.69.tar.gz) = 75ee0fe8e1ac835f29cb76d233f731dcf126b73eed5229a130bbe4308a42441934d4e9cefeaaab45f774de2ed6859c752fbbfb9908e792f2f9f3d0f841e01aee +SHA512 (libcap-2.69.tar.sign) = 00f323444463b020c999f6fab255a61bd719f8d0ec1b619352e4f1b13407acee9a8e176861e5b408f64a871dc4095c6a26af541c3a0d4efca364c2d4b3679d30 From 34559e0319207408ab2fba9aa65825316da4f1a4 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Mon, 20 Nov 2023 23:01:57 +0100 Subject: [PATCH 69/97] Make file lists more explicit to avoid accidental ABI changes --- libcap.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libcap.spec b/libcap.spec index 92aaa72..93959cd 100644 --- a/libcap.spec +++ b/libcap.spec @@ -78,7 +78,8 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %files %license License %doc doc/capability.md -%{_libdir}/*.so.* +%{_libdir}/libcap.so.2{,.*} +%{_libdir}/libpsx.so.2{,.*} %{_sbindir}/{capsh,getcap,getpcaps,setcap} %{_mandir}/man1/capsh.1* %{_mandir}/man8/{getcap,getpcaps,setcap}.8* @@ -89,9 +90,15 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/libpsx.a %files devel -%{_includedir}/* -%{_libdir}/*.so -%{_mandir}/man3/*.3* +%{_includedir}/sys/capability.h +%{_includedir}/sys/psx_syscall.h +%{_libdir}/libcap.so +%{_libdir}/libpsx.so +%{_mandir}/man3/cap*.3* +%{_mandir}/man3/libcap.3* +%{_mandir}/man3/libpsx.3* +%{_mandir}/man3/psx_*.3* +%{_mandir}/man3/__psx_syscall.3* %{_libdir}/pkgconfig/{libcap,libpsx}.pc %files -n captree @@ -103,6 +110,7 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* * Mon Nov 06 2023 Carlos Rodriguez-Fernandez - 2.69-1 - Update to 2.69 (with contribs from Yanko Kaneti , and Andrew G. Morgan ) - Update license to SPDX (by Anderson Toshiyuki Sasaki ) +- Make file lists more explicit to avoid accidental ABI changes (Dominik Mierzejewski ) * Thu Jul 20 2023 Fedora Release Engineering - 2.48-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 0476c6eb3a4b3c031400effc213ac8b17edd846c Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Thu, 23 Nov 2023 22:36:32 -0700 Subject: [PATCH 70/97] fix gating --- gating.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gating.yaml b/gating.yaml index 4a1c38a..fba44d0 100644 --- a/gating.yaml +++ b/gating.yaml @@ -2,6 +2,19 @@ product_versions: - fedora-* decision_context: bodhi_update_push_testing +subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: dist.depcheck} - - !PassingTestCaseRule {test_case_name: dist.abicheck} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} From a0bcf8dd16fb2c93334d44d696f903e5ec7bf743 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Sat, 25 Nov 2023 11:50:03 -0700 Subject: [PATCH 71/97] ignore known lint issues --- libcap.rpmlintrc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 libcap.rpmlintrc diff --git a/libcap.rpmlintrc b/libcap.rpmlintrc new file mode 100644 index 0000000..e7a5e81 --- /dev/null +++ b/libcap.rpmlintrc @@ -0,0 +1,2 @@ +addFilter('.*static-library-without-debuginfo.*') +addFilter('.*pam-unauthorized-module.*') From a3e0bbb8fc94d9600a44cd7da2f7c81575f7dfed Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 7 Dec 2023 22:25:34 -0500 Subject: [PATCH 72/97] Limit captree to %golang_arches RHEL has dropped i686 from golang, without which the build of captree (but not its manpage) is disabled. --- libcap.spec | 7 ++++++- tests/manpages/test.sh | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libcap.spec b/libcap.spec index 93959cd..4c7971d 100644 --- a/libcap.spec +++ b/libcap.spec @@ -14,7 +14,7 @@ BuildRequires: make BuildRequires: glibc-static BuildRequires: gnupg2 -%ifarch aarch64 armv7hl i686 ppc64le s390x x86_64 +%ifarch %{golang_arches} BuildRequires: golang >= 1.11 %endif @@ -46,6 +46,7 @@ draft 15 capabilities. Install libcap-devel if you want to develop or compile applications using libcap. +%ifarch %{golang_arches} %package -n captree Summary: Capability inspection utility @@ -53,6 +54,7 @@ Summary: Capability inspection utility The captree program was inspired by the utility pstree, but it uses the libcap/cap (Go package) API to explore process runtime state and display the capability status of processes and threads. +%endif %prep gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=- @@ -84,6 +86,7 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man1/capsh.1* %{_mandir}/man8/{getcap,getpcaps,setcap}.8* %{_libdir}/security/pam_cap.so +%exclude %{_mandir}/man8/captree.8* %files static %{_libdir}/libcap.a @@ -101,10 +104,12 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man3/__psx_syscall.3* %{_libdir}/pkgconfig/{libcap,libpsx}.pc +%ifarch %{golang_arches} %files -n captree %license License %{_sbindir}/captree %{_mandir}/man8/captree.8* +%endif %changelog * Mon Nov 06 2023 Carlos Rodriguez-Fernandez - 2.69-1 diff --git a/tests/manpages/test.sh b/tests/manpages/test.sh index b4afd94..f9b20ac 100755 --- a/tests/manpages/test.sh +++ b/tests/manpages/test.sh @@ -8,8 +8,6 @@ expected_manpages=( 'getcap(8)' 'getpcaps(8)' 'setcap(8)' - 'captree(8)' - ) rlJournalStart @@ -18,4 +16,9 @@ rlJournalStart rlRun "man --pager=cat '${page}'" rlPhaseEnd done + if rpm --eval '%{golang_arches}' | tr ' ' '\n' | grep -q -e "$(rpm --eval '%{_arch}')"; then + rlPhaseStartTest 'test captree(8)' + rlRun "man --pager=cat 'captree(8)'" + rlPhaseEnd + fi rlJournalEnd From 929882363058b03ecdecb0812cdb153e23e06f8e Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Sun, 10 Dec 2023 22:13:31 -0700 Subject: [PATCH 73/97] run captree smoke tests --- tests/captree/main.fmf | 2 ++ tests/captree/test.sh | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/captree/main.fmf create mode 100755 tests/captree/test.sh diff --git a/tests/captree/main.fmf b/tests/captree/main.fmf new file mode 100644 index 0000000..e401668 --- /dev/null +++ b/tests/captree/main.fmf @@ -0,0 +1,2 @@ +summary: captree smoke test +description: tests basic captree functionality diff --git a/tests/captree/test.sh b/tests/captree/test.sh new file mode 100755 index 0000000..2992c2c --- /dev/null +++ b/tests/captree/test.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + +if rpm --eval '%{golang_arches}' | tr ' ' '\n' | grep -q -e "$(rpm --eval '%{_arch}')"; then + rlPhaseStartTest "Should display help" + rlRun "captree -h" + rlPhaseEnd + + rlPhaseStartTest "Should list capabilities of pid 1" + rlRun -s "captree --depth 1 1" + rlAssertGrep 'systemd.*=ep' $rlRun_LOG + rlPhaseEnd + + rlPhaseStartTest "Should display sys admin capability" + rlRun -s "capsh --drop=cap_sys_admin -- -c 'captree --verbose \$\$'" + rlAssertGrep "!cap_sys_admin" $rlRun_LOG + rlPhaseEnd +fi + +rlJournalEnd From 027afa6099219bac06bd74e664685c97561475f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 03:42:20 +0000 Subject: [PATCH 74/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 4c7971d..b786023 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -112,6 +112,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2.69-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Nov 06 2023 Carlos Rodriguez-Fernandez - 2.69-1 - Update to 2.69 (with contribs from Yanko Kaneti , and Andrew G. Morgan ) - Update license to SPDX (by Anderson Toshiyuki Sasaki ) From eea486d2984cdcd978edf2c7dbff651164ce8fcc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 01:39:48 +0000 Subject: [PATCH 75/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index b786023..534d4e9 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -112,6 +112,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2.69-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 2.69-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 478088c9969e6b557b0038351b1b4eda1f51f6e0 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sun, 11 Feb 2024 23:29:35 +0000 Subject: [PATCH 76/97] Rebuild for golang 1.22.0 --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 534d4e9..b8ab0a9 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -112,6 +112,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Sun Feb 11 2024 Maxwell G - 2.69-4 +- Rebuild for golang 1.22.0 + * Thu Jan 25 2024 Fedora Release Engineering - 2.69-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d21909866942e731bbe765d8778c76dcbb415806 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Wed, 3 Apr 2024 12:16:45 -0700 Subject: [PATCH 77/97] Add manpages for pam_cap and capability.conf --- 0001-doc-document-pam_cap-and-its-conf.patch | 179 +++++++++++++++++++ libcap.spec | 9 +- tests/manpages/test.sh | 2 + 3 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 0001-doc-document-pam_cap-and-its-conf.patch diff --git a/0001-doc-document-pam_cap-and-its-conf.patch b/0001-doc-document-pam_cap-and-its-conf.patch new file mode 100644 index 0000000..c87afb3 --- /dev/null +++ b/0001-doc-document-pam_cap-and-its-conf.patch @@ -0,0 +1,179 @@ +From 7787f4019a86b962ef3b44305cde5888a14cfe52 Mon Sep 17 00:00:00 2001 +From: Carlos Rodriguez-Fernandez +Date: Wed, 3 Apr 2024 11:57:14 -0700 +Subject: [PATCH] doc: document pam_cap and its conf + +Signed-off-by: Carlos Rodriguez-Fernandez +--- + doc/Makefile | 8 ++-- + doc/capability.conf.5 | 85 +++++++++++++++++++++++++++++++++++++++++++ + doc/pam_cap.8 | 35 ++++++++++++++++++ + 3 files changed, 125 insertions(+), 3 deletions(-) + create mode 100644 doc/capability.conf.5 + create mode 100644 doc/pam_cap.8 + +diff --git a/doc/Makefile b/doc/Makefile +index 6919488..9d1574c 100644 +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -32,9 +32,10 @@ MAN3S = cap_init.3 cap_free.3 cap_dup.3 \ + psx_syscall.3 psx_syscall3.3 psx_syscall6.3 psx_set_sensitivity.3 \ + psx_load_syscalls.3 __psx_syscall.3 \ + libpsx.3 +-MAN8S = getcap.8 setcap.8 getpcaps.8 captree.8 ++MAN5S = capability.conf.5 ++MAN8S = getcap.8 setcap.8 getpcaps.8 captree.8 pam_cap.8 + +-MANS = $(MAN1S) $(MAN3S) $(MAN8S) ++MANS = $(MAN1S) $(MAN3S) $(MAN5S) $(MAN8S) + + all: $(MANS) + +@@ -54,10 +55,11 @@ html: + done + + install: +- mkdir -p -m 755 $(FAKEROOT)$(MANDIR)/man1 $(FAKEROOT)$(MANDIR)/man3 $(FAKEROOT)$(MANDIR)/man8 ++ mkdir -p -m 755 $(FAKEROOT)$(MANDIR)/man1 $(FAKEROOT)$(MANDIR)/man3 $(FAKEROOT)$(MANDIR)/man5 $(FAKEROOT)$(MANDIR)/man8 + for man in \ + $(FAKEROOT)$(MANDIR)/man1 $(MAN1S) \ + $(FAKEROOT)$(MANDIR)/man3 $(MAN3S) \ ++ $(FAKEROOT)$(MANDIR)/man5 $(MAN5S) \ + $(FAKEROOT)$(MANDIR)/man8 $(MAN8S) \ + ; \ + do \ +diff --git a/doc/capability.conf.5 b/doc/capability.conf.5 +new file mode 100644 +index 0000000..10ff63b +--- /dev/null ++++ b/doc/capability.conf.5 +@@ -0,0 +1,85 @@ ++.\" generated with Ronn-NG/v0.9.1 ++.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 ++.TH "CAPABILITY\.CONF" "5" "April 2024" "" ++.SH "NAME" ++\fBcapability\.conf\fR \- pam_cap module configuration file ++.SH "SYNOPSIS" ++\fB/etc/security/capability\.conf\fR ++.SH "DESCRIPTION" ++The syntax for lines in this configuration file is: ++.P ++\fB# <\-\- \'#\' precedes a comment\fR ++.P ++\fB\fR ++.P ++Where \fB\fR refers to the text format for an inheritable IAB capability tuple, or the words \fBall\fR or \fBnone\fR\. ++.P ++The reserved word \fBall\fR does \fInot\fR grant \fIall the inheritable capabilities\fR, but acts as a simple \fIpass\-through\fR for any prevailing IAB tuple capabilities\. The reserved word \fBnone\fR refers to an empty \fIInheritable\fR capability set (and by extension an empty \fIAmbient\fR vector)\. ++.P ++Here \fB\fR refers to the space separated PAM username values that will be granted the specified \fIIAB\fR tuple\. A name prefixed with the character \fB@\fR refers to the locally defined \fB/etc/group\fR \fIetc\fR users listed under that group name\. ++.P ++The parsing of the file chooses the first line that applies to the authenticating user, and attempts to apply that and only that\. ++.P ++Examples of valid syntax are: ++.IP "" 4 ++.nf ++# only root gets to keep what it had ++ ++all root ++ ++ ++# this should fire for user beta only, who will have ++ ++# cap_chown dropped from their bounding set\. ++ ++!cap_chown beta ++ ++ ++# the next one should snag the members of the \'three\' group ++ ++# granting them cap_setuid and cap_chown ++ ++cap_setuid,cap_chown @three ++ ++ ++# this would apply to beta and gamma, but beta is already ++ ++# granted a lack of cap_chown above\. Further, if gamma is ++ ++# in the \'three\' group, it would not reach this line\. ++ ++cap_chown beta gamma ++ ++ ++# members of the \'one\' group are granted the cap_setuid Inheritable ++ ++# capability, but cap_chown is dropped from their bounding set\. ++ ++!cap_chown,cap_setuid @one ++ ++ ++# user alpha gets an ambient capability (unless it is also ++ ++# a member of the groups \'one\' or \'three\')\. ++ ++^cap_setuid alpha ++ ++ ++# user delta (if not a member of groups \'one\' and \'three\') will get ++ ++# cap_chown and cap_setgid Ambient capabilities, but have cap_setuid ++ ++# dropped from its bounding set\. ++ ++^cap_chown,^cap_setgid,!cap_setuid delta ++ ++ ++# any remaining members of group \'four\' will get the cap_setuid ++ ++# Inheritable capability\. ++ ++cap_setuid @four ++.fi ++.IP "" 0 ++.SH "SEE ALSO" ++pam_cap(8) +diff --git a/doc/pam_cap.8 b/doc/pam_cap.8 +new file mode 100644 +index 0000000..93c1a71 +--- /dev/null ++++ b/doc/pam_cap.8 +@@ -0,0 +1,35 @@ ++.\" generated with Ronn-NG/v0.9.1 ++.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 ++.TH "PAM_CAP" "8" "April 2024" "" ++.SH "NAME" ++\fBpam_cap\fR \- Capabilities PAM module ++.SH "SYNOPSIS" ++[service\-name] \fBauth\fR control\-flag \fBpam_cap\fR [options] ++.SH "DESCRIPTION" ++The \fBpam_so\fR module can be used to specify \fIInheritable\fR capabilities to process trees rooted in the PAM application\. The module also supports blocking \fIBounding\fR vector capabilities and adding \fIAmbient\fR vector capabilities\. ++.P ++For general PAM apps to work correctly, the application must be run with at least \fBCAP_SETPCAP\fR raised in its \fIPermitted\fR capability flag\. Many PAM applications run as \fIroot\fR, which has all of the bits in the \fIBounding\fR set raised, so this requirement is typically met\. To grant an \fIAmbient\fR vector capability, the corresponding Permitted bit must be available to the application too\. ++.P ++The \fBpam_so\fR module is a Linux\-PAM \fIauth\fR module\. It provides functionality to back \fBpam_sm_authenticate()\fR and \fBpam_sm_setcred()\fR\. It is the latter that actually modifies the inheritable 3\-tuple of capability vectors: the configured \fIIAB\fR\. In a typical application configuration you might have a line like this: ++.IP "" 4 ++.nf ++auth optional pam_cap\.so ++.fi ++.IP "" 0 ++.P ++The module arguments are: ++.IP "\[ci]" 4 ++\fBdebug\fR: While supported, this is a no\-op at present\. ++.IP "\[ci]" 4 ++\fBconfig=\fR\fI/path/to/file\fR: Override the default config for the module\. The unspecified default value for this file is \fB/etc/security/capability\.conf\fR\. Note, \fBconfig=/dev/null\fR is a valid value\. See \fBdefault=\fR below for situations in which this might be appropriate\. ++.IP "\[ci]" 4 ++\fBkeepcaps\fR: This is as much as the \fBpam_cap\.so\fR module can do to help an application support use of the \fIAmbient\fR capability vector\. The application support for the \fIAmbient\fR set is poor at the present time\. ++.IP "\[ci]" 4 ++\fBautoauth\fR: This argument causes the \fBpam_cap\.so\fR module to return \fBPAM_SUCCESS\fR if the \fBPAM_USER\fR being authenticated exists\. The absence of this argument will cause \fBpam_cap\.so\fR to only return \fBPAM_SUCCESS\fR if the \fBPAM_USER\fR is covered by a specific rule in the prevailing config file\. ++.IP "\[ci]" 4 ++\fBdefault=\fR\fIIAB\fR: This argument is ignored if the prevailing configuration file contains a "\fB*\fR" rule\. If there is no such rule, the \fIIAB\fR 3\-tuple is inserted at the end of the config file and applies to all \fBPAM_USER\fRs not covered by an earlier rule\. Note, if you want all \fBPAM_USER\fRs to be covered by this default rule, you can supply the module argument \fBconfig=/dev/null\fR\. ++.IP "\[ci]" 4 ++\fBdefer\fR: This argument arranges for the \fIIAB\fR capabilities granted to a user to be added sufficiently late in the Linux\-PAM authentication stack that they stick\. That is, \fIafter\fR the application does its \fBsetuid(UID)\fR call\. As such, in conjunction with the \fBkeepcaps\fR module argument, such compliant applications can support granting \fIAmbient\fR vector capabilities with \fBpam_cap\.so\fR\. ++.IP "" 0 ++.SH "SEE ALSO" ++pam\.conf(5), capability\.conf(5), pam(8) +-- +2.44.0 + diff --git a/libcap.spec b/libcap.spec index b8ab0a9..8c248a6 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -8,6 +8,7 @@ License: BSD-3-Clause OR GPL-2.0-only Source0: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/29EE848AE2CCF3F4.asc +Patch0: 0001-doc-document-pam_cap-and-its-conf.patch BuildRequires: pam-devel gcc BuildRequires: make @@ -84,7 +85,8 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_libdir}/libpsx.so.2{,.*} %{_sbindir}/{capsh,getcap,getpcaps,setcap} %{_mandir}/man1/capsh.1* -%{_mandir}/man8/{getcap,getpcaps,setcap}.8* +%{_mandir}/man5/capability.conf.5* +%{_mandir}/man8/{getcap,getpcaps,setcap,pam_cap}.8* %{_libdir}/security/pam_cap.so %exclude %{_mandir}/man8/captree.8* @@ -112,6 +114,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Wed Apr 03 2024 Carlos Rodriguez-Fernandez - 2.69-5 +- Add manpages for pam_cap and capability.conf + * Sun Feb 11 2024 Maxwell G - 2.69-4 - Rebuild for golang 1.22.0 diff --git a/tests/manpages/test.sh b/tests/manpages/test.sh index f9b20ac..db05935 100755 --- a/tests/manpages/test.sh +++ b/tests/manpages/test.sh @@ -5,9 +5,11 @@ expected_manpages=( 'capsh(1)' 'libcap(3)' # there are many more but if these are present then it verifies it because of the glob install 'libpsx(3)' + 'capability.conf(5)' 'getcap(8)' 'getpcaps(8)' 'setcap(8)' + 'pam_cap(8)' ) rlJournalStart From 9376ef2fc2a06e0fe6828a62c0465b4c2c0ea1d9 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Thu, 4 Apr 2024 20:32:51 -0700 Subject: [PATCH 78/97] Fix incompatibility of the build with go 1.22. --- libcap.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libcap.spec b/libcap.spec index 8c248a6..7979446 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -63,15 +63,15 @@ gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1 %build -%make_build prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags=-linkmode=external" all +%make_build prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags='-B gobuildid'" all %check make test %install -%make_install prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags=-linkmode=external" +%make_install prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags='-B gobuildid'" -mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} +mkdir -p %{buildroot}/%{_mandir}/man{2,3,5,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ chmod +x %{buildroot}/%{_libdir}/*.so.* @@ -114,6 +114,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Thu Apr 04 2024 Carlos Rodriguez-Fernandez - 2.69-6 +- Fix incompatibility of the build with go 1.22. + * Wed Apr 03 2024 Carlos Rodriguez-Fernandez - 2.69-5 - Add manpages for pam_cap and capability.conf From d105d70b42170c5c58354620d5cf8bb32e42ecd1 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 5 Apr 2024 12:18:03 -0700 Subject: [PATCH 79/97] reenable PIE in the captree tool --- libcap.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libcap.spec b/libcap.spec index 7979446..5999f33 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -63,13 +63,13 @@ gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1 %build -%make_build prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags='-B gobuildid'" all +%make_build prefix=%{_prefix} lib=%{_lib} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" all %check make test %install -%make_install prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags='-B gobuildid'" +%make_install prefix=%{_prefix} lib=%{_lib} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" mkdir -p %{buildroot}/%{_mandir}/man{2,3,5,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ @@ -114,6 +114,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Apr 05 2024 Carlos Rodriguez-Fernandez - 2.69-7 +- Reenable PIE in the captree tool + * Thu Apr 04 2024 Carlos Rodriguez-Fernandez - 2.69-6 - Fix incompatibility of the build with go 1.22. From deb9345a8c0ca3d04788bee9c72d384a9ca4edb6 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 5 Apr 2024 16:46:04 -0700 Subject: [PATCH 80/97] make correction to the capability.conf manpage --- ...ent-the-use-of-to-refer-to-all-users.patch | 26 +++++++++++++++++++ libcap.spec | 6 ++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0001-doc-document-the-use-of-to-refer-to-all-users.patch diff --git a/0001-doc-document-the-use-of-to-refer-to-all-users.patch b/0001-doc-document-the-use-of-to-refer-to-all-users.patch new file mode 100644 index 0000000..9741d75 --- /dev/null +++ b/0001-doc-document-the-use-of-to-refer-to-all-users.patch @@ -0,0 +1,26 @@ +From 70783bddc65628a1afc3dd2f8b4b3f03fc839b8e Mon Sep 17 00:00:00 2001 +From: Carlos Rodriguez-Fernandez +Date: Fri, 5 Apr 2024 16:37:30 -0700 +Subject: [PATCH] doc: document the use of `*` to refer to all users + +Signed-off-by: Carlos Rodriguez-Fernandez +--- + doc/capability.conf.5 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/capability.conf.5 b/doc/capability.conf.5 +index 10ff63b..15535f4 100644 +--- a/doc/capability.conf.5 ++++ b/doc/capability.conf.5 +@@ -16,7 +16,7 @@ Where \fB\fR refers to the text format for an inheritable IAB capability tu + .P + The reserved word \fBall\fR does \fInot\fR grant \fIall the inheritable capabilities\fR, but acts as a simple \fIpass\-through\fR for any prevailing IAB tuple capabilities\. The reserved word \fBnone\fR refers to an empty \fIInheritable\fR capability set (and by extension an empty \fIAmbient\fR vector)\. + .P +-Here \fB\fR refers to the space separated PAM username values that will be granted the specified \fIIAB\fR tuple\. A name prefixed with the character \fB@\fR refers to the locally defined \fB/etc/group\fR \fIetc\fR users listed under that group name\. ++Here \fB\fR refers to the space separated PAM username values that will be granted the specified \fIIAB\fR tuple\. A name prefixed with the character \fB@\fR refers to the locally defined \fB/etc/group\fR \fIetc\fR users listed under that group name\. An asterisk "\fB*\fR" can be used to denote all users\. + .P + The parsing of the file chooses the first line that applies to the authenticating user, and attempts to apply that and only that\. + .P +-- +2.44.0 + diff --git a/libcap.spec b/libcap.spec index 5999f33..7955ee0 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -9,6 +9,7 @@ Source0: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/lib Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/29EE848AE2CCF3F4.asc Patch0: 0001-doc-document-pam_cap-and-its-conf.patch +Patch1: 0001-doc-document-the-use-of-to-refer-to-all-users.patch BuildRequires: pam-devel gcc BuildRequires: make @@ -114,6 +115,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Apr 05 2024 Carlos Rodriguez-Fernandez - 2.69-8 +- Make correction to the capability.conf manpage + * Fri Apr 05 2024 Carlos Rodriguez-Fernandez - 2.69-7 - Reenable PIE in the captree tool From 6b8df4ed5f78c311ddab1d491c2a30e21adab503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Apr 2024 14:53:22 +0200 Subject: [PATCH 81/97] Actually use the sbindir location provided by rpm /usr/sbin was always used, which breaks build with https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin, because then %_sbindir in %files doesn't match the file locations. --- libcap.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index 7955ee0..866f59f 100644 --- a/libcap.spec +++ b/libcap.spec @@ -64,13 +64,13 @@ gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1 %build -%make_build prefix=%{_prefix} lib=%{_lib} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" all +%make_build prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" all %check make test %install -%make_install prefix=%{_prefix} lib=%{_lib} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" +%make_install prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" mkdir -p %{buildroot}/%{_mandir}/man{2,3,5,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ From bac8f5e536522c838b97ea5ace202eca058e9b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 14 Apr 2024 15:31:35 +0200 Subject: [PATCH 82/97] Add compat sbin Provides In preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin. dwarftherapist requires /usr/sbin/setcap. --- libcap.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libcap.spec b/libcap.spec index 866f59f..29bc5b8 100644 --- a/libcap.spec +++ b/libcap.spec @@ -20,6 +20,13 @@ BuildRequires: gnupg2 BuildRequires: golang >= 1.11 %endif +%if "%{_sbindir}" == "%{_bindir}" +# Compat symlinks for Requires in other packages. +# We rely on filesystem to create the symlinks for us. +Requires: filesystem(unmerged-sbin-symlinks) +Provides: /usr/sbin/setcap +%endif + %description libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities. From 98e4da842f0c46f88a28c0dab8d222eaccfd433d Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Sun, 14 Apr 2024 21:28:04 -0700 Subject: [PATCH 83/97] fix golang version dependency --- libcap.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 29bc5b8..a46c131 100644 --- a/libcap.spec +++ b/libcap.spec @@ -17,7 +17,7 @@ BuildRequires: glibc-static BuildRequires: gnupg2 %ifarch %{golang_arches} -BuildRequires: golang >= 1.11 +BuildRequires: golang >= 1.22 %endif %if "%{_sbindir}" == "%{_bindir}" From 120b640485cb29646adcd7d06d7caad2110875ce Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Mon, 20 May 2024 08:31:30 -0700 Subject: [PATCH 84/97] update to 2.70 --- 0001-doc-document-pam_cap-and-its-conf.patch | 179 ------------------ ...ent-the-use-of-to-refer-to-all-users.patch | 26 --- libcap.spec | 9 +- sources | 4 +- 4 files changed, 7 insertions(+), 211 deletions(-) delete mode 100644 0001-doc-document-pam_cap-and-its-conf.patch delete mode 100644 0001-doc-document-the-use-of-to-refer-to-all-users.patch diff --git a/0001-doc-document-pam_cap-and-its-conf.patch b/0001-doc-document-pam_cap-and-its-conf.patch deleted file mode 100644 index c87afb3..0000000 --- a/0001-doc-document-pam_cap-and-its-conf.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 7787f4019a86b962ef3b44305cde5888a14cfe52 Mon Sep 17 00:00:00 2001 -From: Carlos Rodriguez-Fernandez -Date: Wed, 3 Apr 2024 11:57:14 -0700 -Subject: [PATCH] doc: document pam_cap and its conf - -Signed-off-by: Carlos Rodriguez-Fernandez ---- - doc/Makefile | 8 ++-- - doc/capability.conf.5 | 85 +++++++++++++++++++++++++++++++++++++++++++ - doc/pam_cap.8 | 35 ++++++++++++++++++ - 3 files changed, 125 insertions(+), 3 deletions(-) - create mode 100644 doc/capability.conf.5 - create mode 100644 doc/pam_cap.8 - -diff --git a/doc/Makefile b/doc/Makefile -index 6919488..9d1574c 100644 ---- a/doc/Makefile -+++ b/doc/Makefile -@@ -32,9 +32,10 @@ MAN3S = cap_init.3 cap_free.3 cap_dup.3 \ - psx_syscall.3 psx_syscall3.3 psx_syscall6.3 psx_set_sensitivity.3 \ - psx_load_syscalls.3 __psx_syscall.3 \ - libpsx.3 --MAN8S = getcap.8 setcap.8 getpcaps.8 captree.8 -+MAN5S = capability.conf.5 -+MAN8S = getcap.8 setcap.8 getpcaps.8 captree.8 pam_cap.8 - --MANS = $(MAN1S) $(MAN3S) $(MAN8S) -+MANS = $(MAN1S) $(MAN3S) $(MAN5S) $(MAN8S) - - all: $(MANS) - -@@ -54,10 +55,11 @@ html: - done - - install: -- mkdir -p -m 755 $(FAKEROOT)$(MANDIR)/man1 $(FAKEROOT)$(MANDIR)/man3 $(FAKEROOT)$(MANDIR)/man8 -+ mkdir -p -m 755 $(FAKEROOT)$(MANDIR)/man1 $(FAKEROOT)$(MANDIR)/man3 $(FAKEROOT)$(MANDIR)/man5 $(FAKEROOT)$(MANDIR)/man8 - for man in \ - $(FAKEROOT)$(MANDIR)/man1 $(MAN1S) \ - $(FAKEROOT)$(MANDIR)/man3 $(MAN3S) \ -+ $(FAKEROOT)$(MANDIR)/man5 $(MAN5S) \ - $(FAKEROOT)$(MANDIR)/man8 $(MAN8S) \ - ; \ - do \ -diff --git a/doc/capability.conf.5 b/doc/capability.conf.5 -new file mode 100644 -index 0000000..10ff63b ---- /dev/null -+++ b/doc/capability.conf.5 -@@ -0,0 +1,85 @@ -+.\" generated with Ronn-NG/v0.9.1 -+.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -+.TH "CAPABILITY\.CONF" "5" "April 2024" "" -+.SH "NAME" -+\fBcapability\.conf\fR \- pam_cap module configuration file -+.SH "SYNOPSIS" -+\fB/etc/security/capability\.conf\fR -+.SH "DESCRIPTION" -+The syntax for lines in this configuration file is: -+.P -+\fB# <\-\- \'#\' precedes a comment\fR -+.P -+\fB\fR -+.P -+Where \fB\fR refers to the text format for an inheritable IAB capability tuple, or the words \fBall\fR or \fBnone\fR\. -+.P -+The reserved word \fBall\fR does \fInot\fR grant \fIall the inheritable capabilities\fR, but acts as a simple \fIpass\-through\fR for any prevailing IAB tuple capabilities\. The reserved word \fBnone\fR refers to an empty \fIInheritable\fR capability set (and by extension an empty \fIAmbient\fR vector)\. -+.P -+Here \fB\fR refers to the space separated PAM username values that will be granted the specified \fIIAB\fR tuple\. A name prefixed with the character \fB@\fR refers to the locally defined \fB/etc/group\fR \fIetc\fR users listed under that group name\. -+.P -+The parsing of the file chooses the first line that applies to the authenticating user, and attempts to apply that and only that\. -+.P -+Examples of valid syntax are: -+.IP "" 4 -+.nf -+# only root gets to keep what it had -+ -+all root -+ -+ -+# this should fire for user beta only, who will have -+ -+# cap_chown dropped from their bounding set\. -+ -+!cap_chown beta -+ -+ -+# the next one should snag the members of the \'three\' group -+ -+# granting them cap_setuid and cap_chown -+ -+cap_setuid,cap_chown @three -+ -+ -+# this would apply to beta and gamma, but beta is already -+ -+# granted a lack of cap_chown above\. Further, if gamma is -+ -+# in the \'three\' group, it would not reach this line\. -+ -+cap_chown beta gamma -+ -+ -+# members of the \'one\' group are granted the cap_setuid Inheritable -+ -+# capability, but cap_chown is dropped from their bounding set\. -+ -+!cap_chown,cap_setuid @one -+ -+ -+# user alpha gets an ambient capability (unless it is also -+ -+# a member of the groups \'one\' or \'three\')\. -+ -+^cap_setuid alpha -+ -+ -+# user delta (if not a member of groups \'one\' and \'three\') will get -+ -+# cap_chown and cap_setgid Ambient capabilities, but have cap_setuid -+ -+# dropped from its bounding set\. -+ -+^cap_chown,^cap_setgid,!cap_setuid delta -+ -+ -+# any remaining members of group \'four\' will get the cap_setuid -+ -+# Inheritable capability\. -+ -+cap_setuid @four -+.fi -+.IP "" 0 -+.SH "SEE ALSO" -+pam_cap(8) -diff --git a/doc/pam_cap.8 b/doc/pam_cap.8 -new file mode 100644 -index 0000000..93c1a71 ---- /dev/null -+++ b/doc/pam_cap.8 -@@ -0,0 +1,35 @@ -+.\" generated with Ronn-NG/v0.9.1 -+.\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -+.TH "PAM_CAP" "8" "April 2024" "" -+.SH "NAME" -+\fBpam_cap\fR \- Capabilities PAM module -+.SH "SYNOPSIS" -+[service\-name] \fBauth\fR control\-flag \fBpam_cap\fR [options] -+.SH "DESCRIPTION" -+The \fBpam_so\fR module can be used to specify \fIInheritable\fR capabilities to process trees rooted in the PAM application\. The module also supports blocking \fIBounding\fR vector capabilities and adding \fIAmbient\fR vector capabilities\. -+.P -+For general PAM apps to work correctly, the application must be run with at least \fBCAP_SETPCAP\fR raised in its \fIPermitted\fR capability flag\. Many PAM applications run as \fIroot\fR, which has all of the bits in the \fIBounding\fR set raised, so this requirement is typically met\. To grant an \fIAmbient\fR vector capability, the corresponding Permitted bit must be available to the application too\. -+.P -+The \fBpam_so\fR module is a Linux\-PAM \fIauth\fR module\. It provides functionality to back \fBpam_sm_authenticate()\fR and \fBpam_sm_setcred()\fR\. It is the latter that actually modifies the inheritable 3\-tuple of capability vectors: the configured \fIIAB\fR\. In a typical application configuration you might have a line like this: -+.IP "" 4 -+.nf -+auth optional pam_cap\.so -+.fi -+.IP "" 0 -+.P -+The module arguments are: -+.IP "\[ci]" 4 -+\fBdebug\fR: While supported, this is a no\-op at present\. -+.IP "\[ci]" 4 -+\fBconfig=\fR\fI/path/to/file\fR: Override the default config for the module\. The unspecified default value for this file is \fB/etc/security/capability\.conf\fR\. Note, \fBconfig=/dev/null\fR is a valid value\. See \fBdefault=\fR below for situations in which this might be appropriate\. -+.IP "\[ci]" 4 -+\fBkeepcaps\fR: This is as much as the \fBpam_cap\.so\fR module can do to help an application support use of the \fIAmbient\fR capability vector\. The application support for the \fIAmbient\fR set is poor at the present time\. -+.IP "\[ci]" 4 -+\fBautoauth\fR: This argument causes the \fBpam_cap\.so\fR module to return \fBPAM_SUCCESS\fR if the \fBPAM_USER\fR being authenticated exists\. The absence of this argument will cause \fBpam_cap\.so\fR to only return \fBPAM_SUCCESS\fR if the \fBPAM_USER\fR is covered by a specific rule in the prevailing config file\. -+.IP "\[ci]" 4 -+\fBdefault=\fR\fIIAB\fR: This argument is ignored if the prevailing configuration file contains a "\fB*\fR" rule\. If there is no such rule, the \fIIAB\fR 3\-tuple is inserted at the end of the config file and applies to all \fBPAM_USER\fRs not covered by an earlier rule\. Note, if you want all \fBPAM_USER\fRs to be covered by this default rule, you can supply the module argument \fBconfig=/dev/null\fR\. -+.IP "\[ci]" 4 -+\fBdefer\fR: This argument arranges for the \fIIAB\fR capabilities granted to a user to be added sufficiently late in the Linux\-PAM authentication stack that they stick\. That is, \fIafter\fR the application does its \fBsetuid(UID)\fR call\. As such, in conjunction with the \fBkeepcaps\fR module argument, such compliant applications can support granting \fIAmbient\fR vector capabilities with \fBpam_cap\.so\fR\. -+.IP "" 0 -+.SH "SEE ALSO" -+pam\.conf(5), capability\.conf(5), pam(8) --- -2.44.0 - diff --git a/0001-doc-document-the-use-of-to-refer-to-all-users.patch b/0001-doc-document-the-use-of-to-refer-to-all-users.patch deleted file mode 100644 index 9741d75..0000000 --- a/0001-doc-document-the-use-of-to-refer-to-all-users.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 70783bddc65628a1afc3dd2f8b4b3f03fc839b8e Mon Sep 17 00:00:00 2001 -From: Carlos Rodriguez-Fernandez -Date: Fri, 5 Apr 2024 16:37:30 -0700 -Subject: [PATCH] doc: document the use of `*` to refer to all users - -Signed-off-by: Carlos Rodriguez-Fernandez ---- - doc/capability.conf.5 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/capability.conf.5 b/doc/capability.conf.5 -index 10ff63b..15535f4 100644 ---- a/doc/capability.conf.5 -+++ b/doc/capability.conf.5 -@@ -16,7 +16,7 @@ Where \fB\fR refers to the text format for an inheritable IAB capability tu - .P - The reserved word \fBall\fR does \fInot\fR grant \fIall the inheritable capabilities\fR, but acts as a simple \fIpass\-through\fR for any prevailing IAB tuple capabilities\. The reserved word \fBnone\fR refers to an empty \fIInheritable\fR capability set (and by extension an empty \fIAmbient\fR vector)\. - .P --Here \fB\fR refers to the space separated PAM username values that will be granted the specified \fIIAB\fR tuple\. A name prefixed with the character \fB@\fR refers to the locally defined \fB/etc/group\fR \fIetc\fR users listed under that group name\. -+Here \fB\fR refers to the space separated PAM username values that will be granted the specified \fIIAB\fR tuple\. A name prefixed with the character \fB@\fR refers to the locally defined \fB/etc/group\fR \fIetc\fR users listed under that group name\. An asterisk "\fB*\fR" can be used to denote all users\. - .P - The parsing of the file chooses the first line that applies to the authenticating user, and attempts to apply that and only that\. - .P --- -2.44.0 - diff --git a/libcap.spec b/libcap.spec index a46c131..0eb2b94 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.69 -Release: 8%{?dist} +Version: 2.70 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -8,8 +8,6 @@ License: BSD-3-Clause OR GPL-2.0-only Source0: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/29EE848AE2CCF3F4.asc -Patch0: 0001-doc-document-pam_cap-and-its-conf.patch -Patch1: 0001-doc-document-the-use-of-to-refer-to-all-users.patch BuildRequires: pam-devel gcc BuildRequires: make @@ -122,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Mon May 20 2024 Carlos Rodriguez-Fernandez - 2.70-1 +- Update to version 2.70 + * Fri Apr 05 2024 Carlos Rodriguez-Fernandez - 2.69-8 - Make correction to the capability.conf manpage diff --git a/sources b/sources index 7857c6f..62713c8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libcap-2.69.tar.gz) = 75ee0fe8e1ac835f29cb76d233f731dcf126b73eed5229a130bbe4308a42441934d4e9cefeaaab45f774de2ed6859c752fbbfb9908e792f2f9f3d0f841e01aee -SHA512 (libcap-2.69.tar.sign) = 00f323444463b020c999f6fab255a61bd719f8d0ec1b619352e4f1b13407acee9a8e176861e5b408f64a871dc4095c6a26af541c3a0d4efca364c2d4b3679d30 +SHA512 (libcap-2.70.tar.gz) = 2a4a5959958989e6a0d54ea795a706b0f12596778ac660b19b7b1479910af01b4d870111b060dac0b1cd4671b98d815ea5953cefd4edde1a0ba9efe22f897842 +SHA512 (libcap-2.70.tar.sign) = d8a7d631d74ecdfad731e5d36087d959f9279ed837b20ed57bb518129f1ba6d144927987ca50a5459cc72d5374fe3a987583c1d5c88213e7f57f344ed698c71f From f6cc8a0776fa090950252efd694805f6e4fefebb Mon Sep 17 00:00:00 2001 From: Anderson Toshiyuki Sasaki Date: Fri, 31 May 2024 16:51:56 +0200 Subject: [PATCH 85/97] Include CGO_CFLAGS and CGO_LDFLAGS in the make command Set the value of CGO_CFLAGS as the CFLAGS environment variable value and CGO_LDFLAGS as the LDFLAGS value as part of the make command. The goal is to include the hardening compilation flags when building the Go binaries with CGO enabled. Also add -compressdwarf=false to ldflags, make the build verbose by adding the options -v -x, and force rebuilding by adding the -a option. Signed-off-by: Anderson Toshiyuki Sasaki --- libcap.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libcap.spec b/libcap.spec index 0eb2b94..d79e912 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.70 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -69,13 +69,13 @@ gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1 %build -%make_build prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" all +%make_build prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 CGO_CFLAGS="${CFLAGS}" CGO_LDFLAGS="${LDFLAGS}" GO_BUILD_FLAGS="-buildmode=pie -a -v -x -ldflags='-compressdwarf=false -B gobuildid'" all %check make test %install -%make_install prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 GO_BUILD_FLAGS="-buildmode=pie -ldflags='-B gobuildid'" +%make_install prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 CGO_CFLAGS="${CFLAGS}" CGO_LDFLAGS="${LDFLAGS}" GO_BUILD_FLAGS="-buildmode=pie -ldflags='-compressdwarf=false -B gobuildid'" mkdir -p %{buildroot}/%{_mandir}/man{2,3,5,8} mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Tue Jun 04 2024 Anderson Toshiyuki Sasaki - 2.70-2 +- Set CGO_CFLAGS=$CFLAGS and CGO_LDFLAGS=$LDFLAGS to build Go code + * Mon May 20 2024 Carlos Rodriguez-Fernandez - 2.70-1 - Update to version 2.70 From f165102918a33eee70f6f25b507599413ac763f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 9 Jul 2024 13:29:27 +0200 Subject: [PATCH 86/97] Rebuilt for the bin-sbin merge https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index d79e912..99aba72 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.70 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 2.70-3 +- Rebuilt for the bin-sbin merge + * Tue Jun 04 2024 Anderson Toshiyuki Sasaki - 2.70-2 - Set CGO_CFLAGS=$CFLAGS and CGO_LDFLAGS=$LDFLAGS to build Go code From ea30cbed1e2d40990b4cdb88ac103abe2047e37c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 13:27:58 +0000 Subject: [PATCH 87/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 99aba72..43a3e0c 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.70 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 2.70-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek - 2.70-3 - Rebuilt for the bin-sbin merge From 403c688803dbdfc057f2c88155e19dec2e70299a Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Mon, 28 Oct 2024 17:34:47 -0700 Subject: [PATCH 88/97] update to 2.71 --- libcap.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libcap.spec b/libcap.spec index 43a3e0c..edabdde 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.70 -Release: 4%{?dist} +Version: 2.71 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Mon Oct 28 2024 Carlos Rodriguez-Fernandez - 2.71-1 +- Update to version 2.71 + * Thu Jul 18 2024 Fedora Release Engineering - 2.70-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild diff --git a/sources b/sources index 62713c8..cd1d4df 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libcap-2.70.tar.gz) = 2a4a5959958989e6a0d54ea795a706b0f12596778ac660b19b7b1479910af01b4d870111b060dac0b1cd4671b98d815ea5953cefd4edde1a0ba9efe22f897842 -SHA512 (libcap-2.70.tar.sign) = d8a7d631d74ecdfad731e5d36087d959f9279ed837b20ed57bb518129f1ba6d144927987ca50a5459cc72d5374fe3a987583c1d5c88213e7f57f344ed698c71f +SHA512 (libcap-2.71.tar.gz) = 4ca378fda46a311cceaddede83be5300e40a81e8271ea5caa53ebd0f195b2cf70ba0751a58d22311715d8db773f601cf527201551359ed91704eee0fb3ca53e8 +SHA512 (libcap-2.71.tar.sign) = 1d03a41f5760a4fadad5301cc77ca02850d21158c3706cc921c42dde50541d0ad4abcde4ec208ef4f67045dc621aebdfb6755fc1048b5f97780127a7618eec2a From 4126e7676b42090f0e9263b38fa176641dde6b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 12 Jan 2025 14:33:14 +0100 Subject: [PATCH 89/97] Rebuilt for the bin-sbin merge (2nd attempt) https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index edabdde..bfc4b89 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.71 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 2.71-2 +- Rebuilt for the bin-sbin merge (2nd attempt) + * Mon Oct 28 2024 Carlos Rodriguez-Fernandez - 2.71-1 - Update to version 2.71 From 3f2c35c4b9ffe45d7ca8a7c88cd6b22f3bb57c9b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 10:46:02 +0000 Subject: [PATCH 90/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index bfc4b89..b5ad8d5 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.71 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 2.71-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek - 2.71-2 - Rebuilt for the bin-sbin merge (2nd attempt) From 607880c702b8f29eb62b8fec66a45a96f4917e7b Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 24 Jan 2025 11:32:01 -0700 Subject: [PATCH 91/97] Update to 2.73 --- libcap.spec | 7 +++++-- sources | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libcap.spec b/libcap.spec index b5ad8d5..b0da397 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.71 -Release: 3%{?dist} +Version: 2.73 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Jan 24 2025 Carlos Rodriguez-Fernandez - 2.73-1 +- Update to version 2.73 (rhbz#2340722) + * Fri Jan 17 2025 Fedora Release Engineering - 2.71-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/sources b/sources index cd1d4df..ff42fc3 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libcap-2.71.tar.gz) = 4ca378fda46a311cceaddede83be5300e40a81e8271ea5caa53ebd0f195b2cf70ba0751a58d22311715d8db773f601cf527201551359ed91704eee0fb3ca53e8 -SHA512 (libcap-2.71.tar.sign) = 1d03a41f5760a4fadad5301cc77ca02850d21158c3706cc921c42dde50541d0ad4abcde4ec208ef4f67045dc621aebdfb6755fc1048b5f97780127a7618eec2a +SHA512 (libcap-2.73.tar.gz) = 0311e2d955d1505eccd96a4b94d7153340d250c0b92be5b431e0f06759326d7d760e020bac92a8d46146782eaa99e1ef4a7576ac14d87571845174a929797c28 +SHA512 (libcap-2.73.tar.sign) = 2806018f3e6c145d558ac3623e3db8d453dec0cc837cf5710678ead5753865edf883d63915caff7fd174276ee76307c1f0bac0fd7058e5574a3525e88873eb2d From c0976890330a07be105a1df5708584839e2193dd Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 24 Jan 2025 13:30:13 -0700 Subject: [PATCH 92/97] Update internal CI tests --- libcap.spec | 5 ++++- tests/pkg-configs/test.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libcap.spec b/libcap.spec index b0da397..6c0ebca 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.73 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -120,6 +120,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Jan 24 2025 Carlos Rodriguez-Fernandez - 2.73-2 +- Update internal CI tests + * Fri Jan 24 2025 Carlos Rodriguez-Fernandez - 2.73-1 - Update to version 2.73 (rhbz#2340722) diff --git a/tests/pkg-configs/test.sh b/tests/pkg-configs/test.sh index 45f98a4..cc28259 100755 --- a/tests/pkg-configs/test.sh +++ b/tests/pkg-configs/test.sh @@ -26,7 +26,7 @@ rlJournalStart rlRun "rpm -ql libcap-devel | grep libpsx.pc" 0 "There must be libpsx.pc" if [ $? -eq 0 ]; then PCFILE=$(rpm -ql libcap-devel | grep libpsx.pc) - rlRun "pkg-config --libs libpsx | grep -- '-lpsx -lpthread -Wl,-wrap,pthread_create'" + rlRun "pkg-config --libs libpsx | grep -- '-lpsx'" VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1) rlRun "pkg-config --modversion libpsx | grep $VER" rlRun -s "pkg-config --print-variables libpsx" From ecb8d1cb460374c3006583af3d4078d86752000d Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Mon, 14 Apr 2025 22:14:24 -0700 Subject: [PATCH 93/97] Update to version 2.76 --- libcap.spec | 9 +++++++-- sources | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libcap.spec b/libcap.spec index 6c0ebca..87af783 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.73 -Release: 2%{?dist} +Version: 2.76 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -92,6 +92,7 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_sbindir}/{capsh,getcap,getpcaps,setcap} %{_mandir}/man1/capsh.1* %{_mandir}/man5/capability.conf.5* +%{_mandir}/man7/cap_text_formats.7* %{_mandir}/man8/{getcap,getpcaps,setcap,pam_cap}.8* %{_libdir}/security/pam_cap.so %exclude %{_mandir}/man8/captree.8* @@ -120,6 +121,10 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog + +* Mon Apr 14 2025 Carlos Rodriguez-Fernandez - 2.76-1 +- Update to version 2.76 (rhbz#2349318, rhbz#2352529) + * Fri Jan 24 2025 Carlos Rodriguez-Fernandez - 2.73-2 - Update internal CI tests diff --git a/sources b/sources index ff42fc3..3859b1c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libcap-2.73.tar.gz) = 0311e2d955d1505eccd96a4b94d7153340d250c0b92be5b431e0f06759326d7d760e020bac92a8d46146782eaa99e1ef4a7576ac14d87571845174a929797c28 -SHA512 (libcap-2.73.tar.sign) = 2806018f3e6c145d558ac3623e3db8d453dec0cc837cf5710678ead5753865edf883d63915caff7fd174276ee76307c1f0bac0fd7058e5574a3525e88873eb2d +SHA512 (libcap-2.76.tar.gz) = 673ed11d46f0e7033f6094893f82e5a141be31fa23626e968b199baecf8f60b37a84248a826afc45a65851c1ce14ac25973ae982c8a3035823450259df4b4383 +SHA512 (libcap-2.76.tar.sign) = 277d64dc2e76ade6780e49d7fb4b8280cfabb1f4c2e553d97c0b35ae7fee8aafb660d8dd9962427525a2fd8111b019ff642448b4caa598afad736779f5f37520 From 2f86af5298c99109581e26220ef71a780d657ecd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 19:25:57 +0000 Subject: [PATCH 94/97] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 87af783..16a21c8 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.76 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -121,6 +121,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 2.76-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Apr 14 2025 Carlos Rodriguez-Fernandez - 2.76-1 - Update to version 2.76 (rhbz#2349318, rhbz#2352529) From 4f902f16663cf5bacfa59889d6721daea5183dd7 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 15 Aug 2025 18:24:12 -0500 Subject: [PATCH 95/97] Rebuild for golang-1.25.0 --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 16a21c8..408c4d1 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.76 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -121,6 +121,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Aug 15 2025 Maxwell G - 2.76-3 +- Rebuild for golang-1.25.0 + * Thu Jul 24 2025 Fedora Release Engineering - 2.76-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 73dd02815788e408af9b5503457aff9c0887a539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 10 Oct 2025 17:10:46 +0200 Subject: [PATCH 96/97] rebuild --- libcap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index 408c4d1..0606c1e 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.76 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -121,6 +121,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Fri Oct 10 2025 Alejandro Sáez - 2.76-4 +- rebuild + * Fri Aug 15 2025 Maxwell G - 2.76-3 - Rebuild for golang-1.25.0 From d3979ba09dfa5020ce71a12147eec800295dc5ae Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Thu, 30 Oct 2025 16:31:38 -0700 Subject: [PATCH 97/97] Update to 2.77 --- _makenames-build.patch | 13 +++++++++++++ gating.yaml | 2 -- libcap.spec | 8 ++++++-- sources | 4 ++-- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 _makenames-build.patch diff --git a/_makenames-build.patch b/_makenames-build.patch new file mode 100644 index 0000000..460de75 --- /dev/null +++ b/_makenames-build.patch @@ -0,0 +1,13 @@ +diff --git a/libcap/Makefile b/libcap/Makefile +index f0eb87e..e90a950 100644 +--- a/libcap/Makefile ++++ b/libcap/Makefile +@@ -80,7 +80,7 @@ $(PSXTITLE).pc: $(PSXTITLE).pc.in + $< >$@ + + _makenames: _makenames.c cap_names.list.h +- $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ $(BUILD_LDFLAGS) ++ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ + + cap_names.h: _makenames + ./_makenames > cap_names.h diff --git a/gating.yaml b/gating.yaml index fba44d0..3738107 100644 --- a/gating.yaml +++ b/gating.yaml @@ -4,7 +4,6 @@ product_versions: decision_context: bodhi_update_push_testing subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} @@ -14,7 +13,6 @@ product_versions: decision_context: bodhi_update_push_stable subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/libcap.spec b/libcap.spec index 0606c1e..3476fd1 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap -Version: 2.76 -Release: 4%{?dist} +Version: 2.77 +Release: 1%{?dist} Summary: Library for getting and setting POSIX.1e capabilities URL: https://sites.google.com/site/fullycapable/ License: BSD-3-Clause OR GPL-2.0-only @@ -8,6 +8,7 @@ License: BSD-3-Clause OR GPL-2.0-only Source0: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/29EE848AE2CCF3F4.asc +Patch0: _makenames-build.patch BuildRequires: pam-devel gcc BuildRequires: make @@ -121,6 +122,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %endif %changelog +* Tue Oct 28 2025 Carlos Rodriguez-Fernandez - 2.77-1 +- Update to version 2.77 (rhbz#2406446) + * Fri Oct 10 2025 Alejandro Sáez - 2.76-4 - rebuild diff --git a/sources b/sources index 3859b1c..3dbe9ea 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (libcap-2.76.tar.gz) = 673ed11d46f0e7033f6094893f82e5a141be31fa23626e968b199baecf8f60b37a84248a826afc45a65851c1ce14ac25973ae982c8a3035823450259df4b4383 -SHA512 (libcap-2.76.tar.sign) = 277d64dc2e76ade6780e49d7fb4b8280cfabb1f4c2e553d97c0b35ae7fee8aafb660d8dd9962427525a2fd8111b019ff642448b4caa598afad736779f5f37520 +SHA512 (libcap-2.77.tar.gz) = e5471afc4f149a8330e6df07effe58cac44d8a773b1fff0686e7039c41888e33402e1942fe5271a142e159a6088abbdbb7a82133389b3a9351749c2bf797b6b8 +SHA512 (libcap-2.77.tar.sign) = c362eefb80bbc110b7d7c676cc2b37e04bd3dab1b8b4577d62a0774b6300258743156c57102e8dc11c35d2ea876053dc57eae44197137273413b959df33ef0c0