From afb7ad1ffeb075dd0b6eb7a37eeb1867eccafdad Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Thu, 14 May 2026 10:53:27 +0200 Subject: [PATCH] Bump release to v0.9.3 Resolves: RHEL-160081 Signed-off-by: Sergio Arroutbi --- .gitignore | 1 + libcap-ng-0.9.3-cap-audit-task-comm-len.patch | 24 ++++++++++++++ libcap-ng.spec | 32 +++++++++++++++---- sources | 2 +- 4 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 libcap-ng-0.9.3-cap-audit-task-comm-len.patch diff --git a/.gitignore b/.gitignore index edef5c6..56767a3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ libcap-ng-0.6.4.tar.gz /libcap-ng-0.8.2.tar.gz /libcap-ng-0.8.3.tar.gz /libcap-ng-0.8.4.tar.gz +/libcap-ng-0.9.3.tar.gz diff --git a/libcap-ng-0.9.3-cap-audit-task-comm-len.patch b/libcap-ng-0.9.3-cap-audit-task-comm-len.patch new file mode 100644 index 0000000..5f08bb0 --- /dev/null +++ b/libcap-ng-0.9.3-cap-audit-task-comm-len.patch @@ -0,0 +1,24 @@ +From: Sergio Arroutbi +Subject: cap-audit: define TASK_COMM_LEN fallback for BPF compilation + +vmlinux.h is generated from BTF data and contains only type/struct +definitions, not preprocessor macros. TASK_COMM_LEN is a #define in +linux/sched.h (value 16) and is not present in vmlinux.h, causing a +build failure when compiling the BPF program with clang. + +Add a #ifndef guard to define it when missing. + +diff --git a/utils/cap-audit/cap_audit.bpf.c b/utils/cap-audit/cap_audit.bpf.c +--- a/utils/cap-audit/cap_audit.bpf.c ++++ b/utils/cap-audit/cap_audit.bpf.c +@@ -27,6 +27,10 @@ + #define CAP_OPT_NOAUDIT 2 + #endif + ++#ifndef TASK_COMM_LEN ++#define TASK_COMM_LEN 16 ++#endif ++ + #include + #include + #include diff --git a/libcap-ng.spec b/libcap-ng.spec index 7185335..6bcdf34 100644 --- a/libcap-ng.spec +++ b/libcap-ng.spec @@ -1,15 +1,25 @@ Summary: Alternate posix capabilities library Name: libcap-ng -Version: 0.8.4 -Release: 6%{?dist} +Version: 0.9.3 +Release: 1%{?dist} License: LGPL-2.0-or-later URL: https://people.redhat.com/sgrubb/libcap-ng/ Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz -Patch1: libcap-ng-0.8.5-python-exception.patch +Patch1: libcap-ng-0.9.3-cap-audit-task-comm-len.patch +%global bpf_arches aarch64 x86_64 ppc64le s390x BuildRequires: gcc BuildRequires: make -BuildRequires: kernel-headers >= 2.6.11 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: kernel-headers >= 2.6.11 BuildRequires: libattr-devel +%ifarch %{bpf_arches} +BuildRequires: clang +BuildRequires: bpftool +BuildRequires: libbpf-devel +BuildRequires: audit-libs-devel +%endif %description Libcap-ng is a library that makes using posix capabilities easier @@ -49,9 +59,15 @@ lets you set the file system based capabilities. %prep %setup -q %patch -P1 -p1 +touch NEWS +cp README.md README +autoreconf -fvi %build -%configure --libdir=%{_libdir} --with-python=no --with-python3 +%configure --libdir=%{_libdir} --with-python=no --with-python3 \ +%ifarch %{bpf_arches} + --enable-cap-audit +%endif %make_build CFLAGS="%{optflags}" %install @@ -86,14 +102,18 @@ make check %files python3 %attr(755,root,root) %{python3_sitearch}/* -%{python3_sitearch}/capng.py* %files utils %license COPYING %attr(0755,root,root) %{_bindir}/* %attr(0644,root,root) %{_mandir}/man8/* +%{_datadir}/bash-completion/completions/* %changelog +* Thu May 14 2026 Sergio Arroutbi - 0.9.3-1 +- Bump release to v0.9.3 + Resolves: RHEL-160081 + * Tue Oct 29 2024 Troy Dawson - 0.8.4-6 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018 diff --git a/sources b/sources index 01293e2..9c63e13 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libcap-ng-0.8.4.tar.gz) = f4f3499d592e8583c2bdb8d700981a7930bd545f0889bc02f49acecf17e3bc600b100cd4f64e9326e5bac0a07a02a1ac4b7e83e919563066665a3d67cbe6871e +SHA512 (libcap-ng-0.9.3.tar.gz) = cbe6e322a6349dcd2b23833c4f66a173d5d8d36ccded782e79fa8b83a1a700da293e0a79a31408814f19cf788fd56726beb587f51314a92c135e05eb2e5a47e2