SHA256
1
0
forked from pool/libcap
libcap/libcap.spec
Takashi Iwai 6da5c4781b Accepting request 762391 from home:pluskalm:branches:Base:System
- Update to version 2.30:
  * BUGFIX: arm and i386 fixes C and Go setgroups choice - used
    wrong syscall in 2.29.
  * cleaned up make clean and make install to actually work as
    intended
  * updated Gentoo libpsx.pc file from Lars Wendler
  * refactored the way libpsx linkage with libcap performed mutual
    discovery.
  * Previously (2.28) libpsx had an API call overridden by libcap
    using weak linkage function in libpsx. In 2.30 this is reversed,
    namely libpsx provides the stronger function and libcap has a
    weak "no-op" version.
  * a bit more consistency in handling the 'all' sets in libcap
    (C) and libcap/cap (Go). Namely, they both dynamically discover
    the number of capabilities named by the kernel and use this as
    the definition of 'all' for the current runtime.
    + libcap (C) exports cap_max_bit() to export the number of
      supported capabilities
    + libcap/cap (Go) exports cap.MaxBits() for this same value.
- For changes for older releases see:
  * https://sites.google.com/site/fullycapable/release-notes-for-libcap
- Add glibc-static-devel as build requirement as tests need it
- Install libpsx.a as it seems to be needed in some cases:
  * https://bugs.gentoo.org/703912

OBS-URL: https://build.opensuse.org/request/show/762391
OBS-URL: https://build.opensuse.org/package/show/Base:System/libcap?expand=0&rev=31
2020-01-10 16:37:07 +00:00

124 lines
3.7 KiB
RPMSpec

#
# spec file for package libcap
#
# Copyright (c) 2020 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.30
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 devel
Summary: Development files for libcap
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libcap2 = %{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
%description progs
This package contains utility programs handling capabilities via
libcap.
%prep
%setup -q
%build
make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \
INCDIR=%{_includedir} MANDIR=%{_mandir} DYNAMIC=yes DEBUG="-g %{optflags}"
%install
make install RAISE_SETFCAP=no \
DESTDIR=%{buildroot} \
LIBDIR=/%{_libdir} \
SBINDIR=/%{_sbindir} \
INCDIR=/%{_includedir} \
MANDIR=/%{_mandir}/ \
PKGCONFIGDIR=%{_libdir}/pkgconfig/
find %{buildroot} -type f -name "*.la" -delete -print
# do not provide static libs
rm %{buildroot}%{_libdir}/libcap.a
%fdupes -s %{buildroot}
%check
make test
%post -n libcap2 -p /sbin/ldconfig
%postun -n libcap2 -p /sbin/ldconfig
%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