Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
29
.gitignore
vendored
29
.gitignore
vendored
@ -1 +1,28 @@
|
|||||||
SOURCES/libcap-ng-0.7.11.tar.gz
|
libcap-ng-0.4.1.tar.gz
|
||||||
|
libcap-ng-0.4.2.tar.gz
|
||||||
|
libcap-ng-0.5.tar.gz
|
||||||
|
libcap-ng-0.5.1.tar.gz
|
||||||
|
libcap-ng-0.6.tar.gz
|
||||||
|
libcap-ng-0.6.1.tar.gz
|
||||||
|
libcap-ng-0.6.2.tar.gz
|
||||||
|
libcap-ng-0.6.3.tar.gz
|
||||||
|
libcap-ng-0.6.4.tar.gz
|
||||||
|
/libcap-ng-0.6.5.tar.gz
|
||||||
|
/libcap-ng-0.6.6.tar.gz
|
||||||
|
/libcap-ng-0.7.tar.gz
|
||||||
|
/libcap-ng-0.7.1.tar.gz
|
||||||
|
/libcap-ng-0.7.2.tar.gz
|
||||||
|
/libcap-ng-0.7.3.tar.gz
|
||||||
|
/libcap-ng-0.7.4.tar.gz
|
||||||
|
/libcap-ng-0.7.5.tar.gz
|
||||||
|
/libcap-ng-0.7.6.tar.gz
|
||||||
|
/libcap-ng-0.7.7.tar.gz
|
||||||
|
/libcap-ng-0.7.8.tar.gz
|
||||||
|
/libcap-ng-0.7.9.tar.gz
|
||||||
|
/libcap-ng-0.7.10.tar.gz
|
||||||
|
/libcap-ng-0.7.11.tar.gz
|
||||||
|
/libcap-ng-0.8.tar.gz
|
||||||
|
/libcap-ng-0.8.1.tar.gz
|
||||||
|
/libcap-ng-0.8.2.tar.gz
|
||||||
|
/libcap-ng-0.8.3.tar.gz
|
||||||
|
/libcap-ng-0.8.4.tar.gz
|
||||||
|
@ -1 +0,0 @@
|
|||||||
786cf60a922f55442d1aab1112faa6203b4d8aaf SOURCES/libcap-ng-0.7.11.tar.gz
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -ru a/bindings/src/capng_swig.i b/bindings/src/capng_swig.i
|
|
||||||
--- a/bindings/src/capng_swig.i
|
|
||||||
+++ b/bindings/src/capng_swig.i
|
|
||||||
@@ -26,6 +26,9 @@
|
|
||||||
%}
|
|
||||||
|
|
||||||
#if defined(SWIGPYTHON)
|
|
||||||
+
|
|
||||||
+%varargs(16, unsigned capability = 0) capng_updatev;
|
|
||||||
+
|
|
||||||
%except(python) {
|
|
||||||
$action
|
|
||||||
if (result < 0) {
|
|
@ -1,17 +0,0 @@
|
|||||||
diff -ru a/src/cap-ng.c b/src/cap-ng.c
|
|
||||||
--- a/src/cap-ng.c
|
|
||||||
+++ b/src/cap-ng.c
|
|
||||||
@@ -204,12 +204,7 @@
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
fd = open("/proc/sys/kernel/cap_last_cap", O_RDONLY);
|
|
||||||
- if (fd == -1) {
|
|
||||||
- if (errno != ENOENT) {
|
|
||||||
- m.state = CAPNG_ERROR;
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- } else {
|
|
||||||
+ if (fd >= 0) {
|
|
||||||
char buf[8];
|
|
||||||
int num = read(fd, buf, sizeof(buf) - 1);
|
|
||||||
if (num > 0) {
|
|
@ -1,179 +0,0 @@
|
|||||||
diff -ru a/src/cap-ng.c b/src/cap-ng.c
|
|
||||||
--- a/src/cap-ng.c
|
|
||||||
+++ b/src/cap-ng.c
|
|
||||||
@@ -46,7 +46,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# define hidden __attribute__ ((visibility ("hidden")))
|
|
||||||
-int last_cap hidden = -1;
|
|
||||||
+unsigned int last_cap hidden = 0;
|
|
||||||
/*
|
|
||||||
* Some milestones of when things became available:
|
|
||||||
* 2.6.24 kernel XATTR_NAME_CAPS
|
|
||||||
@@ -65,7 +65,7 @@
|
|
||||||
// Local defines
|
|
||||||
#define MASK(x) (1U << (x))
|
|
||||||
#ifdef PR_CAPBSET_DROP
|
|
||||||
-#define UPPER_MASK ~(unsigned)((~0U)<<(last_cap-31))
|
|
||||||
+#define UPPER_MASK ~((~0U)<<(last_cap-31))
|
|
||||||
#else
|
|
||||||
// For v1 systems UPPER_MASK will never be used
|
|
||||||
#define UPPER_MASK (unsigned)(~0U)
|
|
||||||
@@ -73,7 +73,7 @@
|
|
||||||
|
|
||||||
// Re-define cap_valid so its uniform between V1 and V3
|
|
||||||
#undef cap_valid
|
|
||||||
-#define cap_valid(x) ((x) <= (unsigned int)last_cap)
|
|
||||||
+#define cap_valid(x) ((x) <= last_cap)
|
|
||||||
|
|
||||||
// If we don't have the xattr library, then we can't
|
|
||||||
// compile-in file system capabilities
|
|
||||||
@@ -174,6 +174,26 @@
|
|
||||||
#ifdef HAVE_PTHREAD_H
|
|
||||||
pthread_atfork(NULL, NULL, deinit);
|
|
||||||
#endif
|
|
||||||
+ // Detect last cap
|
|
||||||
+ if (last_cap == 0) {
|
|
||||||
+ int fd;
|
|
||||||
+
|
|
||||||
+ fd = open("/proc/sys/kernel/cap_last_cap", O_RDONLY);
|
|
||||||
+ if (fd >= 0) {
|
|
||||||
+ char buf[8];
|
|
||||||
+ int num = read(fd, buf, sizeof(buf) - 1);
|
|
||||||
+ if (num > 0) {
|
|
||||||
+ buf[num] = 0;
|
|
||||||
+ errno = 0;
|
|
||||||
+ unsigned int val = strtoul(buf, NULL, 10);
|
|
||||||
+ if (errno == 0)
|
|
||||||
+ last_cap = val;
|
|
||||||
+ }
|
|
||||||
+ close(fd);
|
|
||||||
+ }
|
|
||||||
+ if (last_cap == 0)
|
|
||||||
+ last_cap = CAP_LAST_CAP;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
static void init(void)
|
|
||||||
@@ -199,26 +219,6 @@
|
|
||||||
#else
|
|
||||||
m.hdr.pid = (unsigned)getpid();
|
|
||||||
#endif
|
|
||||||
- // Detect last cap
|
|
||||||
- if (last_cap == -1) {
|
|
||||||
- int fd;
|
|
||||||
-
|
|
||||||
- fd = open("/proc/sys/kernel/cap_last_cap", O_RDONLY);
|
|
||||||
- if (fd >= 0) {
|
|
||||||
- char buf[8];
|
|
||||||
- int num = read(fd, buf, sizeof(buf) - 1);
|
|
||||||
- if (num > 0) {
|
|
||||||
- buf[num] = 0;
|
|
||||||
- errno = 0;
|
|
||||||
- int val = strtoul(buf, NULL, 10);
|
|
||||||
- if (errno == 0)
|
|
||||||
- last_cap = val;
|
|
||||||
- }
|
|
||||||
- close(fd);
|
|
||||||
- }
|
|
||||||
- if (last_cap == -1)
|
|
||||||
- last_cap = CAP_LAST_CAP;
|
|
||||||
- }
|
|
||||||
m.state = CAPNG_ALLOCATED;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -478,7 +478,7 @@
|
|
||||||
if (CAPNG_INHERITABLE & type)
|
|
||||||
v1_update(action, capability, &m.data.v1.inheritable);
|
|
||||||
} else {
|
|
||||||
- int idx;
|
|
||||||
+ unsigned int idx;
|
|
||||||
|
|
||||||
if (capability > 31) {
|
|
||||||
idx = capability>>5;
|
|
||||||
@@ -545,7 +545,7 @@
|
|
||||||
memcpy(&state, &m, sizeof(state)); /* save state */
|
|
||||||
capng_get_caps_process();
|
|
||||||
if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
|
|
||||||
- int i;
|
|
||||||
+ unsigned int i;
|
|
||||||
memcpy(&m, &state, sizeof(m)); /* restore state */
|
|
||||||
rc = 0;
|
|
||||||
for (i=0; i <= last_cap && rc == 0; i++)
|
|
||||||
@@ -602,7 +602,7 @@
|
|
||||||
#ifndef VFS_CAP_U32
|
|
||||||
return -1;
|
|
||||||
#else
|
|
||||||
- int rc, size;
|
|
||||||
+ int rc, size = 0;
|
|
||||||
struct vfs_cap_data filedata;
|
|
||||||
struct stat buf;
|
|
||||||
|
|
||||||
@@ -1010,7 +1010,7 @@
|
|
||||||
|
|
||||||
char *capng_print_caps_text(capng_print_t where, capng_type_t which)
|
|
||||||
{
|
|
||||||
- int i, once = 0, cnt = 0;
|
|
||||||
+ unsigned int i, once = 0, cnt = 0;
|
|
||||||
char *ptr = NULL;
|
|
||||||
|
|
||||||
if (m.state < CAPNG_INIT)
|
|
||||||
diff -ru a/src/lookup_table.c b/src/lookup_table.c
|
|
||||||
--- a/src/lookup_table.c
|
|
||||||
+++ b/src/lookup_table.c
|
|
||||||
@@ -29,10 +29,10 @@
|
|
||||||
|
|
||||||
|
|
||||||
#define hidden __attribute__ ((visibility ("hidden")))
|
|
||||||
-extern int last_cap hidden;
|
|
||||||
+extern unsigned int last_cap hidden;
|
|
||||||
|
|
||||||
#undef cap_valid
|
|
||||||
-#define cap_valid(x) ((x) <= (unsigned int)last_cap)
|
|
||||||
+#define cap_valid(x) ((x) <= last_cap)
|
|
||||||
|
|
||||||
|
|
||||||
struct transtab {
|
|
||||||
diff -ru a/src/test/lib_test.c b/src/test/lib_test.c
|
|
||||||
--- a/src/test/lib_test.c
|
|
||||||
+++ b/src/test/lib_test.c
|
|
||||||
@@ -29,7 +29,7 @@
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
-int get_last_cap(void)
|
|
||||||
+static unsigned int get_last_cap(void)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
@@ -41,17 +41,19 @@
|
|
||||||
int num = read(fd, buf, sizeof(buf));
|
|
||||||
if (num > 0) {
|
|
||||||
errno = 0;
|
|
||||||
- int val = strtoul(buf, NULL, 10);
|
|
||||||
+ unsigned int val = strtoul(buf, NULL, 10);
|
|
||||||
if (errno == 0)
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
+ close(fd);
|
|
||||||
}
|
|
||||||
return CAP_LAST_CAP;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
- int rc, i, len, last = get_last_cap();
|
|
||||||
+ int rc;
|
|
||||||
+ unsigned int i, len, last = get_last_cap();
|
|
||||||
char *text;
|
|
||||||
void *saved;
|
|
||||||
|
|
||||||
@@ -127,7 +129,7 @@
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
name = capng_capability_to_name(i);
|
|
||||||
- if (name == NULL) {
|
|
||||||
+ if (name == NULL) {
|
|
||||||
printf("Failed converting capability %d to name\n", i);
|
|
||||||
abort();
|
|
||||||
}
|
|
@ -1,87 +0,0 @@
|
|||||||
diff -ru a/configure.ac b/configure.ac
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -59,6 +59,9 @@
|
|
||||||
AC_CHECK_HEADERS(pthread.h,
|
|
||||||
[AC_SEARCH_LIBS(pthread_atfork, pthread)],
|
|
||||||
[AC_MSG_WARN(pthread.h not found, disabling pthread_atfork.)])
|
|
||||||
+AC_CHECK_HEADERS(sys/vfs.h, [
|
|
||||||
+ AC_CHECK_HEADERS(linux/magic.h, [] [AC_MSG_WARN(linux/magic.h is required in order to verify procfs.)])
|
|
||||||
+ ], [AC_MSG_WARN(sys/vfs.h is required in order to verify procfs.)])
|
|
||||||
|
|
||||||
AC_C_CONST
|
|
||||||
AC_C_INLINE
|
|
||||||
diff -ru a/src/cap-ng.c b/src/cap-ng.c
|
|
||||||
--- a/src/cap-ng.c
|
|
||||||
+++ b/src/cap-ng.c
|
|
||||||
@@ -44,6 +44,10 @@
|
|
||||||
#ifdef HAVE_LINUX_SECUREBITS_H
|
|
||||||
#include <linux/securebits.h>
|
|
||||||
#endif
|
|
||||||
+#ifdef HAVE_LINUX_MAGIC_H
|
|
||||||
+#include <sys/vfs.h>
|
|
||||||
+#include <linux/magic.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
# define hidden __attribute__ ((visibility ("hidden")))
|
|
||||||
unsigned int last_cap hidden = 0;
|
|
||||||
@@ -168,6 +172,15 @@
|
|
||||||
m.state = CAPNG_NEW;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static inline int test_cap(unsigned int cap)
|
|
||||||
+{
|
|
||||||
+ // prctl returns 0 or 1 for valid caps, -1 otherwise
|
|
||||||
+ return prctl(PR_CAPBSET_READ, cap) >= 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+// The maximum cap value is determined by VFS_CAP_U32
|
|
||||||
+#define MAX_CAP_VALUE (VFS_CAP_U32 * sizeof(__le32) * 8)
|
|
||||||
+
|
|
||||||
static void init_lib(void) __attribute__ ((constructor));
|
|
||||||
static void init_lib(void)
|
|
||||||
{
|
|
||||||
@@ -178,8 +191,15 @@
|
|
||||||
if (last_cap == 0) {
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
+ // Try to read last cap from procfs
|
|
||||||
fd = open("/proc/sys/kernel/cap_last_cap", O_RDONLY);
|
|
||||||
if (fd >= 0) {
|
|
||||||
+#ifdef HAVE_LINUX_MAGIC_H
|
|
||||||
+ struct statfs st;
|
|
||||||
+ // Bail out if procfs is invalid or fstatfs fails
|
|
||||||
+ if (fstatfs(fd, &st) || st.f_type != PROC_SUPER_MAGIC)
|
|
||||||
+ goto fail;
|
|
||||||
+#endif
|
|
||||||
char buf[8];
|
|
||||||
int num = read(fd, buf, sizeof(buf) - 1);
|
|
||||||
if (num > 0) {
|
|
||||||
@@ -189,10 +209,25 @@
|
|
||||||
if (errno == 0)
|
|
||||||
last_cap = val;
|
|
||||||
}
|
|
||||||
+fail:
|
|
||||||
close(fd);
|
|
||||||
}
|
|
||||||
- if (last_cap == 0)
|
|
||||||
- last_cap = CAP_LAST_CAP;
|
|
||||||
+ // Run a binary search over capabilities
|
|
||||||
+ if (last_cap == 0) {
|
|
||||||
+ // starting with last_cap=MAX_CAP_VALUE means we always know
|
|
||||||
+ // that cap1 is invalid after the first iteration
|
|
||||||
+ last_cap = MAX_CAP_VALUE;
|
|
||||||
+ unsigned int cap0 = 0, cap1 = MAX_CAP_VALUE;
|
|
||||||
+
|
|
||||||
+ while (cap0 < last_cap) {
|
|
||||||
+ if (test_cap(last_cap))
|
|
||||||
+ cap0 = last_cap;
|
|
||||||
+ else
|
|
||||||
+ cap1 = last_cap;
|
|
||||||
+
|
|
||||||
+ last_cap = (cap0 + cap1) / 2U;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
11
ci_tests.fmf
Normal file
11
ci_tests.fmf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/e2e:
|
||||||
|
plan:
|
||||||
|
import:
|
||||||
|
url: https://github.com/RedHat-SP-Security/libcap-ng-plans.git
|
||||||
|
name: /generic/e2e_ci
|
||||||
|
|
||||||
|
/rpmverify:
|
||||||
|
plan:
|
||||||
|
import:
|
||||||
|
url: https://github.com/RedHat-SP-Security/libcap-ng-plans.git
|
||||||
|
name: /generic/rpmverify
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-10
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
24
libcap-ng-0.8.5-python-exception.patch
Normal file
24
libcap-ng-0.8.5-python-exception.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
commit 30453b6553948cd05c438f9f509013e3bb84f25b
|
||||||
|
Author: Steve Grubb <ausearch.1@gmail.com>
|
||||||
|
Date: Thu Jan 4 15:06:29 2024 -0500
|
||||||
|
|
||||||
|
Remove python global exception handler since its deprecated
|
||||||
|
|
||||||
|
diff --git a/bindings/src/capng_swig.i b/bindings/src/capng_swig.i
|
||||||
|
index fcdaf18..fa85e13 100644
|
||||||
|
--- a/bindings/src/capng_swig.i
|
||||||
|
+++ b/bindings/src/capng_swig.i
|
||||||
|
@@ -30,13 +30,6 @@
|
||||||
|
|
||||||
|
%varargs(16, signed capability = 0) capng_updatev;
|
||||||
|
|
||||||
|
-%except(python) {
|
||||||
|
- $action
|
||||||
|
- if (result < 0) {
|
||||||
|
- PyErr_SetFromErrno(PyExc_OSError);
|
||||||
|
- return NULL;
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
%define __signed__
|
@ -1,18 +1,13 @@
|
|||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
Summary: Alternate posix capabilities library
|
||||||
|
|
||||||
Summary: An alternate posix capabilities library
|
|
||||||
Name: libcap-ng
|
Name: libcap-ng
|
||||||
Version: 0.7.11
|
Version: 0.8.4
|
||||||
Release: 1%{?dist}
|
Release: 6%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPL-2.0-or-later
|
||||||
URL: http://people.redhat.com/sgrubb/libcap-ng
|
URL: https://people.redhat.com/sgrubb/libcap-ng/
|
||||||
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
|
Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
|
||||||
Patch1: libcap-ng-0.8-vararg-support.patch
|
Patch1: libcap-ng-0.8.5-python-exception.patch
|
||||||
Patch2: libcap-ng-0.8.1-procfs-lastcap.patch
|
|
||||||
Patch3: libcap-ng-0.8.1-signed-unsigned-fix.patch
|
|
||||||
Patch4: libcap-ng-0.8.2-improve-lastcap-check.patch
|
|
||||||
BuildRequires: autoconf automake libtool
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: kernel-headers >= 2.6.11
|
BuildRequires: kernel-headers >= 2.6.11
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
|
|
||||||
@ -21,9 +16,9 @@ Libcap-ng is a library that makes using posix capabilities easier
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files for libcap-ng library
|
Summary: Header files for libcap-ng library
|
||||||
License: LGPLv2+
|
License: LGPL-2.0-or-later
|
||||||
Requires: kernel-headers >= 2.6.11
|
Requires: kernel-headers >= 2.6.11
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
Requires: pkgconfig
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
@ -32,9 +27,10 @@ applications that need to use the libcap-ng library.
|
|||||||
|
|
||||||
%package python3
|
%package python3
|
||||||
Summary: Python3 bindings for libcap-ng library
|
Summary: Python3 bindings for libcap-ng library
|
||||||
License: LGPLv2+
|
License: LGPL-2.0-or-later
|
||||||
BuildRequires: python3-devel swig
|
BuildRequires: python3-devel python-setuptools swig
|
||||||
Requires: %{name} = %{version}-%{release}
|
BuildRequires: make
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description python3
|
%description python3
|
||||||
The libcap-ng-python3 package contains the bindings so that libcap-ng
|
The libcap-ng-python3 package contains the bindings so that libcap-ng
|
||||||
@ -42,8 +38,8 @@ and can be used by python3 applications.
|
|||||||
|
|
||||||
%package utils
|
%package utils
|
||||||
Summary: Utilities for analyzing and setting file capabilities
|
Summary: Utilities for analyzing and setting file capabilities
|
||||||
License: GPLv2+
|
License: LGPL-2.0-or-later
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description utils
|
%description utils
|
||||||
The libcap-ng-utils package contains applications to analyze the
|
The libcap-ng-utils package contains applications to analyze the
|
||||||
@ -52,34 +48,22 @@ lets you set the file system based capabilities.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .vararg-support
|
%patch -P1 -p1
|
||||||
%patch2 -p1 -b .procfs-lastcap
|
|
||||||
%patch3 -p1 -b .signed-unsigned-fix
|
|
||||||
%patch4 -p1 -b .improve-lastcap-check
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
%configure --libdir=%{_libdir} --with-python=no --with-python3
|
||||||
%configure --libdir=/%{_lib} --with-python=no --with-python3
|
%make_build CFLAGS="%{optflags}"
|
||||||
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR="${RPM_BUILD_ROOT}" INSTALL='install -p' install
|
%make_install
|
||||||
|
|
||||||
# Move the symlink
|
|
||||||
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
||||||
VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
|
|
||||||
LIBNAME=$(basename $VLIBNAME)
|
|
||||||
ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
|
|
||||||
|
|
||||||
# Move the pkgconfig file
|
|
||||||
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
|
|
||||||
|
|
||||||
# Remove a couple things so they don't get picked up
|
# Remove a couple things so they don't get picked up
|
||||||
rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.la
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libcap-ng.la
|
||||||
rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libcap-ng.a
|
||||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.a
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libdrop_ambient.la
|
||||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.la
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libdrop_ambient.a
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/python%{python3_version}/site-packages/_capng.a
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/python%{python3_version}/site-packages/_capng.la
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
make check
|
||||||
@ -87,14 +71,16 @@ make check
|
|||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{!?_licensedir:%global license %%doc}
|
|
||||||
%license COPYING.LIB
|
%license COPYING.LIB
|
||||||
/%{_lib}/libcap-ng.so.*
|
%{_libdir}/libcap-ng.so.*
|
||||||
|
%{_libdir}/libdrop_ambient.so.*
|
||||||
|
%attr(0644,root,root) %{_mandir}/man7/*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%attr(0644,root,root) %{_mandir}/man3/*
|
%attr(0644,root,root) %{_mandir}/man3/*
|
||||||
%attr(0644,root,root) %{_includedir}/cap-ng.h
|
%attr(0644,root,root) %{_includedir}/cap-ng.h
|
||||||
%{_libdir}/libcap-ng.so
|
%{_libdir}/libcap-ng.so
|
||||||
|
%{_libdir}/libdrop_ambient.so
|
||||||
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
|
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
|
||||||
%{_libdir}/pkgconfig/libcap-ng.pc
|
%{_libdir}/pkgconfig/libcap-ng.pc
|
||||||
|
|
||||||
@ -103,26 +89,131 @@ make check
|
|||||||
%{python3_sitearch}/capng.py*
|
%{python3_sitearch}/capng.py*
|
||||||
|
|
||||||
%files utils
|
%files utils
|
||||||
%{!?_licensedir:%global license %%doc}
|
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%attr(0755,root,root) %{_bindir}/*
|
%attr(0755,root,root) %{_bindir}/*
|
||||||
%attr(0644,root,root) %{_mandir}/man8/*
|
%attr(0644,root,root) %{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Mar 18 2021 Zoltan Fridrich <zfridric@redhat.com> 0.7.11-1
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.8.4-6
|
||||||
resolves: rhbz#1939386 - Rebase libcap-ng to version 0.7.11
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
Resolves: RHEL-64018
|
||||||
|
|
||||||
* Tue Nov 05 2019 Marek Tamaskovic <mtamasko@redhat.com> 0.7.9-5
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.8.4-5
|
||||||
resolves: rhbz#1740775 - segfault after dlclose
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
* Tue Jan 08 2019 Steve Grubb <sgrubb@redhat.com> 0.7.9-4
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-4
|
||||||
resolves: rhbz#1599364 - filecap fails of files with no capabilities
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
* Thu Aug 09 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-3
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-3
|
||||||
resolves: rhbz#1599364 - filecap fails of files with no capabilities
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
* Thu Jun 07 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-2
|
* Thu Jan 04 2024 Steve Grubb <sgrubb@redhat.com> 0.8.4-2
|
||||||
- Drop python2 bindings (#1588449)
|
- Remove python bindings global exception handler
|
||||||
|
|
||||||
|
* Wed Dec 20 2023 Steve Grubb <sgrubb@redhat.com> 0.8.4-1
|
||||||
|
- New upstream bugfix release
|
||||||
|
- Drop libcap-ng-0.8.3-apply-disable.patch since things should be fixed
|
||||||
|
|
||||||
|
* Mon Sep 04 2023 Steve Grubb <sgrubb@redhat.com> 0.8.3-8
|
||||||
|
- Add function annotations to warn on unused results
|
||||||
|
- SPDX Migration
|
||||||
|
|
||||||
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> 0.8.3-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.8.3-6
|
||||||
|
- Rebuilt for Python 3.12
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Dec 20 2022 Steve Grubb <sgrubb@redhat.com> 0.8.3-4
|
||||||
|
- BuildRequires python-setuptools
|
||||||
|
- SPDX Migration
|
||||||
|
|
||||||
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.8.3-2
|
||||||
|
- Rebuilt for Python 3.11
|
||||||
|
|
||||||
|
* Tue Mar 29 2022 Steve Grubb <sgrubb@redhat.com> 0.8.3-1
|
||||||
|
- New upstream bugfix release
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Dec 22 2021 Steve Grubb <sgrubb@redhat.com> 0.8.2-8
|
||||||
|
- Update apply-disable patch
|
||||||
|
|
||||||
|
* Wed Sep 22 2021 Steve Grubb <sgrubb@redhat.com> 0.8.2-7
|
||||||
|
- Drop .la and .a libraries
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.2-5
|
||||||
|
- Rebuilt for Python 3.10
|
||||||
|
|
||||||
|
* Tue Feb 02 2021 Steve Grubb <sgrubb@redhat.com> 0.8.2-4
|
||||||
|
- Adjust syslog warning for bad use of capng_apply
|
||||||
|
|
||||||
|
* Sat Jan 30 2021 Steve Grubb <sgrubb@redhat.com> 0.8.2-3
|
||||||
|
- Add syslog warning for bad use of capng_apply
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Dec 09 2020 Steve Grubb <sgrubb@redhat.com> 0.8.2-1
|
||||||
|
- New upstream bugfix release
|
||||||
|
|
||||||
|
* Fri Nov 20 2020 Steve Grubb <sgrubb@redhat.com> 0.8.1-2
|
||||||
|
- Add temporary patch disabling bounding set error codes
|
||||||
|
|
||||||
|
* Wed Nov 18 2020 Steve Grubb <sgrubb@redhat.com> 0.8.1-1
|
||||||
|
- New upstream bugfix release
|
||||||
|
|
||||||
|
* Tue Sep 08 2020 Steve Grubb <sgrubb@redhat.com> 0.8-1
|
||||||
|
- New upstream feature release
|
||||||
|
|
||||||
|
* Sun Aug 23 2020 Steve Grubb <sgrubb@redhat.com> 0.7.11-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.10-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.10-3
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.10-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Oct 01 2019 Steve Grubb <sgrubb@redhat.com> 0.7.10-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.7.9-9
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Mar 8 2019 Joe Orton <jorton@redhat.com> - 0.7.9-7
|
||||||
|
- fix crash on dlclose due to atfork handler (#1680481)
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Oct 16 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-5
|
||||||
|
- Remove python2 bindings (#1634889)
|
||||||
|
|
||||||
|
* Thu Aug 09 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-4
|
||||||
|
- Fix bug where filecap may not show capabilities
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.9-2
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
* Wed Feb 07 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-1
|
* Wed Feb 07 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-1
|
||||||
- New upstream bugfix release
|
- New upstream bugfix release
|
Loading…
Reference in New Issue
Block a user