Summary: Next Generation of POSIX capabilities library
Summary(pl.UTF-8): Biblioteka POSIX capabilities nowej generacji
Name: libcap-ng
-Version: 0.7.9
-# 0.7.9 is broken, see https://github.com/stevegrubb/libcap-ng/issues/5
+Version: 0.7.10
Release: 0.2
License: LGPL v2.1+ (library), GPL v2+ (utilities)
Group: Libraries
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
-# Source0-md5: 2398d695508fab9ce33668c53a89b0e9
+# Source0-md5: 57dc267e2949cdecb651a929f9206572
Patch0: vserver.patch
+Patch1: unloadable.patch
URL: http://people.redhat.com/sgrubb/libcap-ng/
BuildRequires: attr-devel
BuildRequires: automake
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
# force regeneration after captab.h change in vserver patch
%{__rm} bindings/{python,python3}/capng.py
--- /dev/null
+From 3c42afac11c323fee5da7db771cd20d414fa265d Mon Sep 17 00:00:00 2001
+From: Rene Luria <rene.luria@infomaniak.com>
+Date: Sun, 9 Dec 2018 21:51:54 +0100
+Subject: [PATCH] Fix mark the DSOs as unloadable
+
+as suggested by Simon McVittie in
+https://github.com/stevegrubb/libcap-ng/issues/5 and Carlos O'Donell at
+https://sourceware.org/bugzilla/show_bug.cgi?id=13502 mark the DSOs as
+unloadable with -z nodelete to prevent crashes at fork
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904808
+
+Fix: https://github.com/stevegrubb/libcap-ng/issues/5
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5a66d4e..d46d02b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -34,5 +34,5 @@ noinst_HEADERS = captab.h
+ libcap_ng_la_SOURCES = cap-ng.c lookup_table.c
+ libcap_ng_la_LIBADD =
+ libcap_ng_la_DEPENDENCIES = $(libcap_ng_la_SOURCES) ../config.h
+-libcap_ng_la_LDFLAGS = -Wl,-z,relro
++libcap_ng_la_LDFLAGS = -Wl,-z,relro -Wl,-z,nodelete
+