2019-09-30 10:55:07 -04:00
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
|
|
|
|
|
|
Summary: Libcap-ng is a library used for posix capabilities programming
|
|
|
|
|
Name: libcap-ng
|
2022-10-29 10:39:14 +08:00
|
|
|
Version: 0.8.3
|
2024-04-08 09:26:47 +08:00
|
|
|
Release: 2
|
2019-09-30 10:55:07 -04:00
|
|
|
License: LGPLv2+ and GPLv2+
|
|
|
|
|
URL: http://people.redhat.com/sgrubb/libcap-ng
|
2020-09-09 10:49:42 +08:00
|
|
|
Source0: https://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
|
2022-10-19 18:03:00 +08:00
|
|
|
|
|
|
|
|
Patch1: backport-Make-Python-test-script-compatible-with-Python2-and-Python3.patch
|
2024-04-08 09:26:47 +08:00
|
|
|
Patch2: backport-Fix-the-syntax-error-in-cap-ng-c-50.patch
|
2022-10-19 18:03:00 +08:00
|
|
|
|
2019-09-30 10:55:07 -04:00
|
|
|
BuildRequires: gcc, kernel-headers >= 2.6.11, libattr-devel
|
|
|
|
|
Provides: %{name}-utils = %{version}-%{release}
|
|
|
|
|
Obsoletes: %{name}-utils < %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The libcap-ng library is intended to make programming with posix
|
|
|
|
|
capabilities much easier than the traditional libcap library.It
|
|
|
|
|
includes utilities that can analyse all currently running applications
|
|
|
|
|
and print out any capabilities and whether or not it has an open
|
|
|
|
|
ended bounding set.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development libraries and header files for %{name}
|
|
|
|
|
License: LGPLv2+
|
|
|
|
|
Requires: kernel-headers >= 2.6.11
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
The %{name}-devel package contains the files needed for developing
|
|
|
|
|
applications that need to use the %{name} library.
|
|
|
|
|
|
|
|
|
|
%package python3
|
|
|
|
|
Summary: Python3 bindings for libcap-ng library
|
|
|
|
|
License: LGPLv2+
|
|
|
|
|
BuildRequires: python3-devel swig
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description python3
|
|
|
|
|
The %{name}-python3 package contains the bindings so that %{name} and
|
|
|
|
|
can be used by python3 applications.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
|
|
%build
|
2020-10-29 10:21:50 +08:00
|
|
|
%configure --libdir=/%{_lib} --with-python=no --with-python3
|
2019-09-30 10:55:07 -04:00
|
|
|
make CFLAGS="%{optflags}" %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
|
|
# Move from %{_lib} to %{_libdir}
|
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
|
2021-12-24 16:45:46 +08:00
|
|
|
rm -f $RPM_BUILD_ROOT/%{_lib}/libdrop_ambient.so
|
2019-09-30 10:55:07 -04:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
|
VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
|
|
|
|
|
LIBNAME=$(basename $VLIBNAME)
|
|
|
|
|
ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
|
2021-12-24 16:45:46 +08:00
|
|
|
ln -s ../../%{_lib}/libdrop_ambient.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libdrop_ambient.so
|
2019-09-30 10:55:07 -04:00
|
|
|
mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
|
mv $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a $RPM_BUILD_ROOT%{_libdir}
|
2021-12-24 16:45:46 +08:00
|
|
|
mv $RPM_BUILD_ROOT/%{_lib}/libdrop_ambient.a $RPM_BUILD_ROOT%{_libdir}
|
2019-09-30 10:55:07 -04:00
|
|
|
|
|
|
|
|
%delete_la
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
make check
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
|
%license COPYING.LIB COPYING
|
|
|
|
|
%attr(0755,root,root) %{_bindir}/*
|
|
|
|
|
/%{_lib}/libcap-ng.so.*
|
2021-09-24 12:31:29 +08:00
|
|
|
/%{_lib}/libdrop_ambient.so.*
|
2019-09-30 10:55:07 -04:00
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%attr(0644,root,root) %{_includedir}/cap-ng.h
|
|
|
|
|
%{_libdir}/libcap-ng.so
|
|
|
|
|
%{_libdir}/libcap-ng.a
|
2021-12-24 16:45:46 +08:00
|
|
|
%{_libdir}/libdrop_ambient.so
|
|
|
|
|
%{_libdir}/libdrop_ambient.a
|
2019-09-30 10:55:07 -04:00
|
|
|
%attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
|
|
|
|
|
%{_libdir}/pkgconfig/libcap-ng.pc
|
|
|
|
|
|
|
|
|
|
%files python3
|
|
|
|
|
%attr(755,root,root) %{python3_sitearch}/*
|
|
|
|
|
%{python3_sitearch}/capng.py*
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%attr(0644,root,root) %{_mandir}/man3/*
|
2021-09-24 12:31:29 +08:00
|
|
|
%attr(0644,root,root) %{_mandir}/man7/*
|
2019-09-30 10:55:07 -04:00
|
|
|
%attr(0644,root,root) %{_mandir}/man8/*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-04-08 09:26:47 +08:00
|
|
|
* Mon Apr 8 2024 yixiangzhike <yixiangzhike007@163.com> - 0.8.3-2
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:backport upstream patch to fix syntax error
|
|
|
|
|
|
2022-10-29 10:39:14 +08:00
|
|
|
* Sat Oct 29 2022 yixiangzhike <yixiangzhike007@163.com> - 0.8.3-1
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:update to 0.8.3
|
|
|
|
|
|
2022-10-19 18:03:00 +08:00
|
|
|
* Wed Oct 19 2022 yixiangzhike <yixiangzhike007@163.com> - 0.8.2-2
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:make Python test script compatible with Python2 and Python3
|
|
|
|
|
|
2021-12-24 16:45:46 +08:00
|
|
|
* Fri Dec 24 2021 yixiangzhike <yixiangzhike007@163.com> - 0.8.2-1
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:update to 0.8.2
|
|
|
|
|
|
2021-09-24 12:31:29 +08:00
|
|
|
* Fri Sep 24 2021 fuanan <fuanan3@huawei.com> - 0.8.1-1
|
|
|
|
|
- update version to 0.8.1
|
|
|
|
|
|
2021-01-21 16:44:51 +08:00
|
|
|
* Thu Jan 21 2021 wangchen<wangchen137@huawei.com> - 0.7.11-1
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:update to 0.7.11
|
|
|
|
|
|
2020-10-29 10:21:50 +08:00
|
|
|
* Thu Oct 29 2020 wangchen<wangchen137@huawei.com> - 0.7.10-3
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:remove python2
|
|
|
|
|
|
2020-09-09 10:49:42 +08:00
|
|
|
* Wed Sep 9 2020 wangchen<wangchen137@huawei.com> - 0.7.10-2
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:modify the URL of Source0
|
|
|
|
|
|
2020-05-12 10:36:58 +08:00
|
|
|
* Thu Apr 16 2020 zhangchenfeng<zhangchenfeng1@huawei.com> - 0.7.10-1
|
|
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC: upgrade version to 0.7.10
|
|
|
|
|
|
|
|
|
|
* Sat Mar 21 2020 liufeng<liufeng111@huawei.com> - 0.7.9-8
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add patch
|
|
|
|
|
|
2020-01-07 14:51:38 +08:00
|
|
|
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.7.9-7
|
|
|
|
|
- Delete unused patch
|
|
|
|
|
|
2019-12-31 14:54:53 +08:00
|
|
|
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.7.9-6
|
|
|
|
|
- Delete unused patch
|
|
|
|
|
|
2019-09-30 10:55:07 -04:00
|
|
|
* Mon Sep 09 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.7.9-5
|
|
|
|
|
- Package init
|