2006-12-19 23:24:01 +01:00
|
|
|
#
|
2011-09-21 10:46:46 +02:00
|
|
|
# spec file for package libcap
|
2006-12-19 23:24:01 +01:00
|
|
|
#
|
2020-08-11 12:37:27 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2006-12-19 23:24:01 +01:00
|
|
|
#
|
2008-08-07 01:22:24 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-12-16 17:09:25 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 23:24:01 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: libcap
|
2020-11-15 17:29:16 +01:00
|
|
|
Version: 2.44
|
2020-01-10 17:37:07 +01:00
|
|
|
Release: 0
|
2007-04-17 00:36:46 +02:00
|
|
|
Summary: Library for Capabilities (linux-privs) Support
|
2019-12-16 17:09:25 +01:00
|
|
|
License: BSD-3-Clause AND GPL-2.0-only
|
2017-01-02 09:55:28 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2020-01-10 17:37:07 +01:00
|
|
|
URL: https://sites.google.com/site/fullycapable/
|
2015-02-16 09:13:36 +01:00
|
|
|
Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.xz
|
2009-12-26 12:17:42 +01:00
|
|
|
Source2: baselibs.conf
|
2020-11-15 17:29:16 +01:00
|
|
|
Patch: 0001-Allow-a-dying-thread-to-participate-in-the-psx-mecha.patch
|
2010-06-11 10:25:48 +02:00
|
|
|
BuildRequires: fdupes
|
2020-01-10 17:37:07 +01:00
|
|
|
BuildRequires: glibc-devel-static
|
|
|
|
BuildRequires: pkgconfig
|
2006-12-19 23:24:01 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2008-05-05 00:54:23 +02:00
|
|
|
%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.
|
|
|
|
|
2020-11-15 12:39:13 +01:00
|
|
|
%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.
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-19 23:24:01 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for libcap
|
|
|
|
Group: Development/Libraries/C and C++
|
2013-02-01 13:04:59 +01:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libcap2 = %{version}
|
2006-12-19 23:24:01 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2007-04-17 00:36:46 +02:00
|
|
|
%package progs
|
|
|
|
Summary: Libcap utility programs
|
|
|
|
Group: System/Filesystems
|
|
|
|
|
|
|
|
%description progs
|
|
|
|
This package contains utility programs handling capabilities via
|
|
|
|
libcap.
|
|
|
|
|
2006-12-19 23:24:01 +01:00
|
|
|
%prep
|
2008-05-05 00:54:23 +02:00
|
|
|
%setup -q
|
2020-11-15 17:29:16 +01:00
|
|
|
%patch -p1
|
2020-01-10 17:37:07 +01:00
|
|
|
|
2006-12-19 23:24:01 +01:00
|
|
|
%build
|
2020-01-13 14:18:27 +01:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2015-02-16 09:13:36 +01:00
|
|
|
make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \
|
2020-11-15 17:29:16 +01:00
|
|
|
INCDIR=%{_includedir} MANDIR=%{_mandir} SHARED=yes DEBUG="-g %{optflags}"
|
2006-12-19 23:24:01 +01:00
|
|
|
|
|
|
|
%install
|
2015-02-16 09:13:36 +01:00
|
|
|
make install RAISE_SETFCAP=no \
|
|
|
|
DESTDIR=%{buildroot} \
|
2016-08-30 15:33:41 +02:00
|
|
|
LIBDIR=/%{_libdir} \
|
|
|
|
SBINDIR=/%{_sbindir} \
|
|
|
|
INCDIR=/%{_includedir} \
|
|
|
|
MANDIR=/%{_mandir}/ \
|
|
|
|
PKGCONFIGDIR=%{_libdir}/pkgconfig/
|
2020-01-10 17:37:07 +01:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2016-08-30 15:33:41 +02:00
|
|
|
# do not provide static libs
|
|
|
|
rm %{buildroot}%{_libdir}/libcap.a
|
2017-02-01 12:00:58 +01:00
|
|
|
|
2020-01-10 17:37:07 +01:00
|
|
|
%fdupes -s %{buildroot}
|
2006-12-19 23:24:01 +01:00
|
|
|
|
2020-01-10 17:37:07 +01:00
|
|
|
%check
|
|
|
|
make test
|
2006-12-19 23:24:01 +01:00
|
|
|
|
2020-01-10 17:37:07 +01:00
|
|
|
%post -n libcap2 -p /sbin/ldconfig
|
2008-05-05 00:54:23 +02:00
|
|
|
%postun -n libcap2 -p /sbin/ldconfig
|
2006-12-19 23:24:01 +01:00
|
|
|
|
2020-11-15 17:29:16 +01:00
|
|
|
%ifarch aarch64
|
2020-11-15 12:39:13 +01:00
|
|
|
%post -n libpsx2 -p /sbin/ldconfig
|
|
|
|
%postun -n libpsx2 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n libpsx2
|
|
|
|
%license License
|
|
|
|
%{_libdir}/libpsx.so.2*
|
2020-11-15 17:29:16 +01:00
|
|
|
%endif
|
2020-11-15 12:39:13 +01:00
|
|
|
|
2008-05-05 00:54:23 +02:00
|
|
|
%files -n libcap2
|
2018-02-26 10:45:49 +01:00
|
|
|
%license License
|
2016-08-30 15:33:41 +02:00
|
|
|
%{_libdir}/libcap.so.*
|
2007-04-17 00:36:46 +02:00
|
|
|
|
|
|
|
%files progs
|
2010-12-02 15:57:01 +01:00
|
|
|
%{_mandir}/man1/*
|
2008-08-07 01:22:24 +02:00
|
|
|
%{_mandir}/man8/*
|
2015-02-16 09:13:36 +01:00
|
|
|
%{_sbindir}/*
|
2006-12-19 23:24:01 +01:00
|
|
|
|
|
|
|
%files devel
|
2018-02-26 10:45:49 +01:00
|
|
|
%license License
|
|
|
|
%doc README CHANGELOG
|
2007-04-17 00:36:46 +02:00
|
|
|
%{_includedir}/sys/capability.h
|
2020-01-10 17:37:07 +01:00
|
|
|
%{_includedir}/sys/psx_syscall.h
|
2007-04-17 00:36:46 +02:00
|
|
|
%{_libdir}/*.so
|
2020-01-10 17:37:07 +01:00
|
|
|
%{_libdir}/libpsx.a
|
2015-02-16 09:13:36 +01:00
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
2020-01-10 17:37:07 +01:00
|
|
|
%{_libdir}/pkgconfig/libpsx.pc
|
2008-08-07 01:22:24 +02:00
|
|
|
%{_mandir}/man3/*
|
2007-04-17 00:36:46 +02:00
|
|
|
|
|
|
|
%changelog
|