SHA256
3
0
forked from pool/libcap
libcap/libcap.spec
Takashi Iwai f932419bea Accepting request 921983 from home:polslinux:branches:Base:System
- update to 2.59:
  * Fixed a potential libcap memory leak by adding a destructor
  * Major improvement is that there is a path for Linux-PAM compliant
    applications to support setting Ambient vector Capabilities via pam_cap.so now
  * Added libcap cap_proc_root() API function
  * Added color support to captree
  * Fixed contrib/sucap/su to correctly handle the Inheritable flag
  * capsh enhancements
  * getcap -r / now generates readable output
  * The shared library objects: pam_cap.so, libcap.so and libpsx.so, are all now
    runnable as standalone binaries
  * The module pam_cap.so now contains support for a default=<IAB> module argument
  * Enhanced capsh --suggest to also compare against the capability value names
    and not just their descriptions
  * Added capsh --current support
  * Added a contrib/sucap/su.c pure-capabilities PAM implementation of su
  * Fix for a corner case infinite loop handling long strings
  * Added libcap cap_iab_compare() and cap_iab_get_pid() APIs
  * Added a Go utility, captree, to display the process (and thread) graph along with
    the POSIX.1e and IAB capabilities of each PID{TID} tree.

OBS-URL: https://build.opensuse.org/request/show/921983
OBS-URL: https://build.opensuse.org/package/show/Base:System/libcap?expand=0&rev=64
2021-09-30 08:46:24 +00:00

141 lines
4.4 KiB
RPMSpec

#
# spec file for package libcap
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: libcap
Version: 2.59
Release: 0
Summary: Library for Capabilities (linux-privs) Support
License: BSD-3-Clause AND GPL-2.0-only
Group: Development/Libraries/C and C++
URL: https://sites.google.com/site/fullycapable/
Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.xz
Source2: baselibs.conf
BuildRequires: fdupes
BuildRequires: glibc-devel-static
BuildRequires: pkgconfig
%description
Capabilities are a measure to limit the omnipotence of the superuser.
Currently a program started by root or setuid root has the power to do
anything. Capabilities (Linux-Privs) provide a more fine-grained access
control. Without kernel patches, you can use this library to drop
capabilities within setuid binaries. If you use patches, this can be
done automatically by the kernel.
%package -n libcap2
Summary: Library for Capabilities (linux-privs) Support
Group: System/Libraries
%description -n libcap2
Capabilities are a measure to limit the omnipotence of the superuser.
Currently a program started by root or setuid root has the power to do
anything. Capabilities (Linux-Privs) provide a more fine-grained access
control. Without kernel patches, you can use this library to drop
capabilities within setuid binaries. If you use patches, this can be
done automatically by the kernel.
%package -n libpsx2
Summary: Library for Capabilities (linux-privs) Support
Group: System/Libraries
%description -n libpsx2
Capabilities are a measure to limit the omnipotence of the superuser.
Currently a program started by root or setuid root has the power to do
anything. Capabilities (Linux-Privs) provide a more fine-grained access
control. Without kernel patches, you can use this library to drop
capabilities within setuid binaries. If you use patches, this can be
done automatically by the kernel.
%package devel
Summary: Development files for libcap
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libcap2 = %{version}
Requires: libpsx2 = %{version}
%description devel
Development files (Headers, libraries for static linking, etc) for
libcap.
libcap is a library for getting and setting POSIX.1e (formerly POSIX 6)
draft 15 capabilities.
Install libcap-devel if you want to develop or compile applications
using libcap.
%package progs
Summary: Libcap utility programs
Group: System/Filesystems
Requires: libcap2 = %{version}
%description progs
This package contains utility programs handling capabilities via
libcap.
%prep
%setup -q
%autopatch -p1
%build
%global _lto_cflags %{nil}
%global buildvariables RAISE_SETFCAP=no prefix=%{_prefix} lib=%{_lib} SHARED=yes LIBDIR=%{_libdir} SBINDIR=%{_sbindir} PKGCONFIGDIR=%{_libdir}/pkgconfig/ INCDIR=%{_includedir} MANDIR=%{_mandir} SHARED=yes COPTS="%{optflags}"
%make_build %{buildvariables}
%install
make install %{buildvariables} DESTDIR=%{buildroot}
find %{buildroot} -type f -name "*.la" -delete -print
# do not provide static libs
rm %{buildroot}%{_libdir}/libcap.a
%fdupes -s %{buildroot}
%check
%make_build %{buildvariables} test
%post -n libcap2 -p /sbin/ldconfig
%postun -n libcap2 -p /sbin/ldconfig
%post -n libpsx2 -p /sbin/ldconfig
%postun -n libpsx2 -p /sbin/ldconfig
%files -n libpsx2
%license License
%{_libdir}/libpsx.so.2*
%files -n libcap2
%license License
%{_libdir}/libcap.so.*
%files progs
%{_mandir}/man1/*
%{_mandir}/man8/*
%{_sbindir}/*
%files devel
%license License
%doc README CHANGELOG
%{_includedir}/sys/capability.h
%{_includedir}/sys/psx_syscall.h
%{_libdir}/*.so
%{_libdir}/libpsx.a
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/libpsx.pc
%{_mandir}/man3/*
%changelog