forked from pool/libcap
This commit is contained in:
committed by
Git OBS Bridge
parent
812c01ac4d
commit
b2424f50c6
81
libcap.spec
81
libcap.spec
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package libcap (Version 1.10)
|
||||
# spec file for package libcap (Version 2.08)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@@ -12,26 +12,17 @@
|
||||
|
||||
|
||||
Name: libcap
|
||||
BuildRequires: fdupes libattr-devel
|
||||
License: BSD 3-Clause
|
||||
Group: System/Libraries
|
||||
AutoReqProv: on
|
||||
Summary: Library for Capabilities (linux-privs) Support
|
||||
Version: 1.10
|
||||
Release: 72
|
||||
Source: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/old/kernel-2.4/libcap-1.10.tar.bz2
|
||||
Source3: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/uid-proc.patch
|
||||
Source4: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/old/kernel-2.4/README
|
||||
Source5: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/capfaq-0.2.txt.gz
|
||||
Patch: libcap-%{version}.diff
|
||||
# Patch1: gcc3.diff
|
||||
Patch2: header.patch
|
||||
Patch1: libcap-shlib-fix.diff
|
||||
Patch3: libcap.eal3.diff
|
||||
Patch4: libcap-gcc-warning-fixes.diff
|
||||
Patch6: libcap-invalid-free-fix.diff
|
||||
Patch7: libcap-array-range-fix.diff
|
||||
Version: 2.08
|
||||
Release: 2
|
||||
Source: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.bz2
|
||||
Patch: libcap-dynamic-link.diff
|
||||
Patch1: libcap.eal3.diff
|
||||
#URL: http://www.kernel.org/
|
||||
#Prefix: /usr
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@@ -44,11 +35,26 @@ done automatically by the kernel.
|
||||
|
||||
|
||||
|
||||
%package -n libcap2
|
||||
License: BSD 3-Clause
|
||||
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
|
||||
License: BSD 3-Clause
|
||||
Summary: Development files for libcap
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: glibc-devel %{name} = %{version}
|
||||
Requires: glibc-devel libcap2 = %{version}
|
||||
|
||||
%description devel
|
||||
Development files (Headers, libraries for static linking, etc) for
|
||||
@@ -74,53 +80,46 @@ libcap.
|
||||
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%setup -q
|
||||
%patch
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3 -p2
|
||||
%patch4
|
||||
%patch6
|
||||
%patch7
|
||||
cp -p %SOURCE3 .
|
||||
cp -p %SOURCE4 ./README.libcap
|
||||
cp -p %SOURCE5 .
|
||||
%patch1 -p2
|
||||
|
||||
%build
|
||||
lib=%{_lib} make LDFLAGS= COPTFLAG="$RPM_OPT_FLAGS"
|
||||
lib=%{_lib} make %{?jobs:-j %jobs} LDFLAGS= COPTFLAG="$RPM_OPT_FLAGS"
|
||||
|
||||
%install
|
||||
make install FAKEROOT=$RPM_BUILD_ROOT LIBDIR=$RPM_BUILD_ROOT/%{_lib} MANDIR=$RPM_BUILD_ROOT%{_mandir}
|
||||
make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=$RPM_BUILD_ROOT/%{_lib} MANDIR=$RPM_BUILD_ROOT%{_mandir}
|
||||
# move *.so file to libdir and relink
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/*.so
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
ln -s /%{_lib}/libcap.so.1 $RPM_BUILD_ROOT%{_libdir}/libcap.so
|
||||
rm $RPM_BUILD_ROOT%{_mandir}/man2/{capget,capset}.2*
|
||||
ln -s /%{_lib}/libcap.so.2 $RPM_BUILD_ROOT%{_libdir}/libcap.so
|
||||
%fdupes -s $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%post -n libcap2 -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%postun -n libcap2 -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%files -n libcap2
|
||||
%defattr(-,root,root)
|
||||
%attr(755,root,root) /%{_lib}/libcap.so.*
|
||||
|
||||
%files progs
|
||||
%defattr(-,root,root)
|
||||
%doc %{_mandir}/man3/*
|
||||
/sbin/getpcaps
|
||||
/sbin/setpcaps
|
||||
/sbin/execcap
|
||||
/sbin/sucap
|
||||
%doc %{_mandir}/man8/*
|
||||
/sbin/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc License README CHANGELOG uid-proc.patch README.libcap capfaq-0.2.txt.gz
|
||||
#%doc fcaps-2.2.9-990610.patch.bz2 fcap-module-990613.tar.bz2
|
||||
%doc License README CHANGELOG
|
||||
%{_includedir}/sys/capability.h
|
||||
%{_libdir}/*.so
|
||||
%doc %{_mandir}/man2/*
|
||||
%doc %{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 23 2008 tiwai@suse.de
|
||||
- updated to libcap-2.08
|
||||
properly supporting the recent 2.6 kernels
|
||||
* Thu Apr 10 2008 ro@suse.de
|
||||
- added baselibs.conf file to build xxbit packages
|
||||
for multilib support
|
||||
|
Reference in New Issue
Block a user