libcap/libcap.spec

159 lines
5.0 KiB
RPMSpec

#
# spec file for package libcap (Version 1.10)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: libcap
License: BSD License and BSD-like
Group: System/Libraries
Autoreqprov: on
Summary: Library and Binaries for Capabilities (linux-privs) Support
Version: 1.10
Release: 4
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
#URL: http://www.kernel.org/
#Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 devel
Summary: Development files for libcap
Group: Development/Libraries/C and C++
Requires: glibc-devel %{name} = %{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.
%prep
%setup
%patch
%patch1
%patch2
%patch3 -p2
%patch4
%patch6
%patch7
%build
lib=%{_lib} make LDFLAGS= COPTFLAG="$RPM_OPT_FLAGS"
%install
make install FAKEROOT=$RPM_BUILD_ROOT LIBDIR=$RPM_BUILD_ROOT/%{_lib} MANDIR=$RPM_BUILD_ROOT%{_mandir}
cp -p %SOURCE3 .
cp -p %SOURCE4 ./README.libcap
cp -p %SOURCE5 .
rm $RPM_BUILD_ROOT%{_mandir}/man2/{capget,capset}.2*
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%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
%attr(755,root,root) /%{_lib}/libcap.so.*
/sbin/getpcaps
/sbin/setpcaps
/sbin/execcap
/sbin/sucap
%files devel
%defattr(-,root,root)
%dir %{_includedir}/sys
%{_includedir}/sys/capability.h
/%{_lib}/*.so
%{_mandir}/man3/*
%changelog -n libcap
* Wed Jan 24 2007 - tiwai@suse.de
- fix the access over array range in cap_extint.c (#237943).
* Tue Dec 19 2006 - tiwai@suse.de
- update to libcap-1.10 to support fscaps (#229722, FATE#301748)
* Wed May 24 2006 - schwab@suse.de
- Don't strip binaries.
* Thu May 11 2006 - tiwai@suse.de
- fix invalid calls of free() (#174561)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Aug 19 2005 - kukuk@suse.de
- Create -devel subpackage
* Thu Jun 23 2005 - meissner@suse.de
- use RPM_OPT_FLAGS.
* Wed May 25 2005 - tiwai@suse.de
- fixed memory leak (#85659)
* Wed Jan 19 2005 - tiwai@suse.de
- fixed compile warnings with gcc-4.0.
* Thu Mar 25 2004 - thomas@suse.de
- added EAL3 man-page patch
* Tue Jan 27 2004 - kukuk@suse.de
- Remove capget.2/capset.2 from package (version from man-pages
is newer).
* Sun Jan 11 2004 - adrian@suse.de
- add %%run_ldconfig
* Mon Feb 24 2003 - schwab@suse.de
- Don't include kernel headers, instead copy the contents here.
* Thu Feb 06 2003 - garloff@suse.de
- Avoid inclusion of glibc's linux/fs.h (it's broken) [#23324].
- Use BuildRoot.
* Wed Nov 27 2002 - coolo@suse.de
- link the library with the compiler so the depedencies
are tracked correctly (#21996)
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Wed Sep 04 2002 - sf@suse.de
- fix biarch error (added patch to Make.Rules)
* Sun Aug 11 2002 - kukuk@suse.de
- Remove kernel-source from neededforbuild
* Sat Apr 20 2002 - garloff@suse.de
- Include capfaq-0.2.txt
- Disable syscall wrapper (capset/capget); it's defined in glibc.
* Sat Apr 20 2002 - garloff@suse.de
- Compile syscall wrapper without -fPIC
* Tue Apr 09 2002 - ro@suse.de
- apply gcc-3 fixes only for gcc-3
* Mon Mar 25 2002 - stepan@suse.de
- remove -ansi, as it forbids inline. (gcc3)
- use -fpic for building libraries (gcc3)
* Wed Sep 05 2001 - ro@suse.de
- updated neededforbuild and updated specfile (man and doc relocation)
* Wed Sep 29 1999 - garloff@suse.de
- Initial check in of libcap.
- Kernel patches are provided within the docdir.