f0d4bb
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
f0d4bb
f0d4bb
Summary: An alternate posix capabilities library
f0d4bb
Name: libcap-ng
15e195
Version: 0.7.11
15e195
Release: 1%{?dist}
f0d4bb
License: LGPLv2+
f0d4bb
URL: http://people.redhat.com/sgrubb/libcap-ng
f0d4bb
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
15e195
Patch1: libcap-ng-0.8-vararg-support.patch
15e195
Patch2: libcap-ng-0.8.1-procfs-lastcap.patch
15e195
Patch3: libcap-ng-0.8.1-signed-unsigned-fix.patch
15e195
Patch4: libcap-ng-0.8.2-improve-lastcap-check.patch
15e195
BuildRequires: autoconf automake libtool
f0d4bb
BuildRequires: gcc
28ef38
BuildRequires: kernel-headers >= 2.6.11
f0d4bb
BuildRequires: libattr-devel
f0d4bb
f0d4bb
%description
f0d4bb
Libcap-ng is a library that makes using posix capabilities easier
f0d4bb
f0d4bb
%package devel
f0d4bb
Summary: Header files for libcap-ng library
f0d4bb
License: LGPLv2+
f0d4bb
Requires: kernel-headers >= 2.6.11
f0d4bb
Requires: %{name} = %{version}-%{release}
f0d4bb
Requires: pkgconfig
f0d4bb
f0d4bb
%description devel
f0d4bb
The libcap-ng-devel package contains the files needed for developing
f0d4bb
applications that need to use the libcap-ng library.
f0d4bb
f0d4bb
%package python3
f0d4bb
Summary: Python3 bindings for libcap-ng library
f0d4bb
License: LGPLv2+
f0d4bb
BuildRequires: python3-devel swig
f0d4bb
Requires: %{name} = %{version}-%{release}
f0d4bb
f0d4bb
%description python3
f0d4bb
The libcap-ng-python3 package contains the bindings so that libcap-ng
f0d4bb
and can be used by python3 applications.
f0d4bb
f0d4bb
%package utils
f0d4bb
Summary: Utilities for analyzing and setting file capabilities
f0d4bb
License: GPLv2+
f0d4bb
Requires: %{name} = %{version}-%{release}
f0d4bb
f0d4bb
%description utils
f0d4bb
The libcap-ng-utils package contains applications to analyze the
f0d4bb
posix capabilities of all the program running on a system. It also
f0d4bb
lets you set the file system based capabilities.
f0d4bb
f0d4bb
%prep
f0d4bb
%setup -q
15e195
%patch1 -p1 -b .vararg-support
15e195
%patch2 -p1 -b .procfs-lastcap
15e195
%patch3 -p1 -b .signed-unsigned-fix
15e195
%patch4 -p1 -b .improve-lastcap-check
f0d4bb
f0d4bb
%build
15e195
autoreconf -fiv
f0d4bb
%configure --libdir=/%{_lib} --with-python=no --with-python3
f0d4bb
make CFLAGS="%{optflags}" %{?_smp_mflags}
f0d4bb
f0d4bb
%install
f0d4bb
make DESTDIR="${RPM_BUILD_ROOT}" INSTALL='install -p' install
f0d4bb
f0d4bb
# Move the symlink
f0d4bb
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
f0d4bb
mkdir -p $RPM_BUILD_ROOT%{_libdir}
f0d4bb
VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
f0d4bb
LIBNAME=$(basename $VLIBNAME)
f0d4bb
ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
f0d4bb
f0d4bb
# Move the pkgconfig file
f0d4bb
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
f0d4bb
f0d4bb
# Remove a couple things so they don't get picked up
f0d4bb
rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.la
f0d4bb
rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a
f0d4bb
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.a
f0d4bb
rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.la
f0d4bb
f0d4bb
%check
f0d4bb
make check
f0d4bb
f0d4bb
%ldconfig_scriptlets
f0d4bb
f0d4bb
%files
f0d4bb
%{!?_licensedir:%global license %%doc}
f0d4bb
%license COPYING.LIB
f0d4bb
/%{_lib}/libcap-ng.so.*
f0d4bb
f0d4bb
%files devel
f0d4bb
%attr(0644,root,root) %{_mandir}/man3/*
f0d4bb
%attr(0644,root,root) %{_includedir}/cap-ng.h
f0d4bb
%{_libdir}/libcap-ng.so
f0d4bb
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
f0d4bb
%{_libdir}/pkgconfig/libcap-ng.pc
f0d4bb
f0d4bb
%files python3
f0d4bb
%attr(755,root,root) %{python3_sitearch}/*
f0d4bb
%{python3_sitearch}/capng.py*
f0d4bb
f0d4bb
%files utils
f0d4bb
%{!?_licensedir:%global license %%doc}
f0d4bb
%license COPYING
f0d4bb
%attr(0755,root,root) %{_bindir}/*
f0d4bb
%attr(0644,root,root) %{_mandir}/man8/*
f0d4bb
f0d4bb
%changelog
15e195
* Thu Mar 18 2021 Zoltan Fridrich <zfridric@redhat.com> 0.7.11-1
15e195
resolves: rhbz#1939386 - Rebase libcap-ng to version 0.7.11
15e195
28ef38
* Tue Nov 05 2019 Marek Tamaskovic <mtamasko@redhat.com> 0.7.9-5
28ef38
resolves: rhbz#1740775 - segfault after dlclose
28ef38
f0d4bb
* Tue Jan 08 2019 Steve Grubb <sgrubb@redhat.com> 0.7.9-4
f0d4bb
resolves: rhbz#1599364 - filecap fails of files with no capabilities
f0d4bb
f0d4bb
* Thu Aug 09 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-3
f0d4bb
resolves: rhbz#1599364 - filecap fails of files with no capabilities
f0d4bb
15e195
* Thu Jun 07 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-2
f0d4bb
- Drop python2 bindings (#1588449)
f0d4bb
f0d4bb
* Wed Feb 07 2018 Steve Grubb <sgrubb@redhat.com> 0.7.9-1
f0d4bb
- New upstream bugfix release
f0d4bb
f0d4bb
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.8-9
f0d4bb
- Switch to %%ldconfig_scriptlets
f0d4bb
f0d4bb
* Fri Jan 05 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.7.8-8
f0d4bb
- Update Python 2 dependency declarations to new packaging standards
f0d4bb
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
f0d4bb
f0d4bb
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.7.8-7
f0d4bb
- Add Provides for the old name without %%_isa
f0d4bb
f0d4bb
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.7.8-6
f0d4bb
- Python 2 binary package renamed to python2-libcap-ng
f0d4bb
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
f0d4bb
f0d4bb
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-5
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f0d4bb
f0d4bb
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-4
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f0d4bb
f0d4bb
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.8-3
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f0d4bb
f0d4bb
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.7.8-2
f0d4bb
- Rebuild for Python 3.6
f0d4bb
f0d4bb
* Sun Jul 24 2016 Steve Grubb <sgrubb@redhat.com> 0.7.8-1
f0d4bb
- New upstream bugfix release
f0d4bb
f0d4bb
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-5
f0d4bb
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f0d4bb
f0d4bb
* Wed Feb 03 2016 Steve Grubb <sgrubb@redhat.com> 0.7.7-4
f0d4bb
- use python site arch macros (#1303610)
f0d4bb
f0d4bb
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-3
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
f0d4bb
f0d4bb
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.7-2
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f0d4bb
f0d4bb
* Wed May 13 2015 Steve Grubb <sgrubb@redhat.com> 0.7.7-1
f0d4bb
- New upstream bugfix release
f0d4bb
f0d4bb
* Fri May 08 2015 Steve Grubb <sgrubb@redhat.com> 0.7.6-1
f0d4bb
- New upstream release adding python3 support
f0d4bb
f0d4bb
* Thu May 07 2015 Steve Grubb <sgrubb@redhat.com> 0.7.5-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-7
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f0d4bb
f0d4bb
* Thu Jul 17 2014 Tom Callaway <spot@fedoraproject.org> - 0.7.4-6
f0d4bb
- fix license handling
f0d4bb
f0d4bb
* Mon Jun 23 2014 Kyle McMartin <kyle@redhat.com> 0.7.4-5
f0d4bb
- Clamp CAP_LAST_CAP at /proc/sys/kernel/cap_last_cap's value in the
f0d4bb
  Python bindings test if possible, otherwise use the value from
f0d4bb
  <linux/capability.h> since the kernel now has 37 capabilities upstream,
f0d4bb
  but our builders are not that up to date.
f0d4bb
f0d4bb
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.4-4
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f0d4bb
f0d4bb
* Wed May 07 2014 Steve Grubb <sgrubb@redhat.com> 0.7.4-3
f0d4bb
- Add PR_SET_NO_NEW_PRIVS call back to capng_lock
f0d4bb
f0d4bb
* Wed Apr 30 2014 Steve Grubb <sgrubb@redhat.com> 0.7.4-2
f0d4bb
- Remove PR_SET_NO_NEW_PRIVS call in capng_lock
f0d4bb
f0d4bb
* Thu Apr 24 2014 Steve Grubb <sgrubb@redhat.com> 0.7.4-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Thu Nov 14 2013 Steve Grubb <sgrubb@redhat.com> 0.7.3-6
f0d4bb
- Rebuild to pickup current CAP_LAST_CAP
f0d4bb
f0d4bb
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.3-5
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f0d4bb
f0d4bb
* Tue Jul 02 2013 Karsten Hopp <karsten@redhat.com> 0.7.3-4
f0d4bb
- bump release and rebuild to fix dependencies on PPC
f0d4bb
f0d4bb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.3-3
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f0d4bb
f0d4bb
* Wed Dec 19 2012 Steve Grubb <sgrubb@redhat.com> 0.7.3-2
f0d4bb
- Remove useless code in pscap causing EBADFD
f0d4bb
f0d4bb
* Fri Nov 09 2012 Steve Grubb <sgrubb@redhat.com> 0.7.3-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Wed Oct 24 2012 Steve Grubb <sgrubb@redhat.com> 0.7.1-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Tue Jul 24 2012 Steve Grubb <sgrubb@redhat.com> 0.7-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.6-3
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f0d4bb
f0d4bb
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.6-2
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f0d4bb
f0d4bb
* Fri Jun 24 2011 Steve Grubb <sgrubb@redhat.com> 0.6.6-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-2
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f0d4bb
f0d4bb
* Wed Nov 03 2010 Steve Grubb <sgrubb@redhat.com> 0.6.5-1
f0d4bb
- New upstream release fixing 2.6.36 kernel header issue
f0d4bb
f0d4bb
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.4-4
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
f0d4bb
f0d4bb
* Thu Jun 17 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-3
f0d4bb
- Only open regular files in filecap
f0d4bb
f0d4bb
* Mon May 24 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-2
f0d4bb
- In utils subpackage added a requires statement.
f0d4bb
f0d4bb
* Thu May 06 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-1
f0d4bb
- New upstream release fixing multi-threading issue
f0d4bb
f0d4bb
* Wed Apr 28 2010 Steve Grubb <sgrubb@redhat.com> 0.6.3-2
f0d4bb
- filecap shows full capabilities if a file has any
f0d4bb
f0d4bb
* Thu Mar 11 2010 Steve Grubb <sgrubb@redhat.com> 0.6.3-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Tue Feb 16 2010 Steve Grubb <sgrubb@redhat.com> 0.6.2-4
f0d4bb
- Use global macro and require pkgconfig for devel subpackage
f0d4bb
f0d4bb
* Fri Oct 09 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-3
f0d4bb
- Apply patch to retain setpcap only if clearing bounding set
f0d4bb
f0d4bb
* Sat Oct 03 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-2
f0d4bb
- Apply patch correcting pscap and netcap acct detection
f0d4bb
f0d4bb
* Mon Sep 28 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Sun Jul 26 2009 Steve Grubb <sgrubb@redhat.com> 0.6.1-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
f0d4bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f0d4bb
f0d4bb
* Mon Jun 29 2009 Steve Grubb <sgrubb@redhat.com> 0.6-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Sun Jun 21 2009 Steve Grubb <sgrubb@redhat.com> 0.5.1-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Fri Jun 19 2009 Steve Grubb <sgrubb@redhat.com> 0.5-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Fri Jun 12 2009 Steve Grubb <sgrubb@redhat.com> 0.4.2-1
f0d4bb
- New upstream release
f0d4bb
f0d4bb
* Fri Jun 12 2009 Steve Grubb <sgrubb@redhat.com> 0.4.1-1
f0d4bb
- Initial build.
f0d4bb