uid_wrapper/uid_wrapper.spec

82 lines
2.2 KiB
RPMSpec
Raw Normal View History

2019-11-29 16:59:34 +08:00
Name: uid_wrapper
2023-02-14 10:40:12 +08:00
Version: 1.3.0
2022-07-14 17:05:51 +08:00
Release: 1
2019-11-29 16:59:34 +08:00
Summary: A wrapper for privilege separation
License: GPLv3+
URL: http://cwrap.org/
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
2023-02-14 10:40:12 +08:00
Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc
Source2: uid_wrapper.keyring
2019-11-29 16:59:34 +08:00
2023-02-14 10:40:12 +08:00
BuildRequires: cmake libcmocka-devel >= 1.1.0 gcc gnupg2 pkgconfig
2019-11-29 16:59:34 +08:00
%description
Some projects, such as a file server, need privilege separation to be able to switch
to the user who owns the files and do file operations on their behalf. uid_wrapper
convincingly lies to the application, letting it believe it is operating as root and
even switching between UIDs and GIDs as needed. You can start any application making
it believe it is running as root.
If you load the uid_wrapper and enable it with setting UID_WRAPPER=1 all setuid() and
setgid() calls will work, even as a normal user.
It is possible to start your application as fake root with setting UID_WRAPPER_ROOT=1.
Enable debugging of uid_wrapper itself by setting the UID_WRAPPER_DEBUGLEVEL variable.
%package help
Summary: Help package for %{name}
%description help
This package contains some man help files for %{name}.
%prep
2023-02-14 10:40:12 +08:00
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
2019-11-29 16:59:34 +08:00
%autosetup -n %{name}-%{version} -p1
%build
install -d obj
cd obj
%cmake -DUNIT_TESTING=ON %{_builddir}/%{name}-%{version}
%make_build VERBOSE=1
%install
cd obj
%make_install
2023-02-14 10:40:12 +08:00
2019-11-29 16:59:34 +08:00
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%check
cd obj
make test || find Testing -name "*.log" | xargs cat
%files
2023-02-14 10:40:12 +08:00
%doc AUTHORS README.md CHANGELOG
2019-11-29 16:59:34 +08:00
%{_libdir}/libuid_wrapper.so*
2023-02-14 10:40:12 +08:00
%dir %{_libdir}/cmake
2019-11-29 16:59:34 +08:00
%{_libdir}/cmake/uid_wrapper/*
2023-02-14 10:40:12 +08:00
%dir %{_libdir}/pkgconfig
2019-11-29 16:59:34 +08:00
%{_libdir}/pkgconfig/uid_wrapper.pc
%files help
%{_mandir}/man1/uid_wrapper.1*
%changelog
2023-02-14 10:40:12 +08:00
* Tue Feb 14 2023 lilong <lilong@kylinos.cn> - 1.3.0-1
- Upgrade to 1.3.0
2022-07-14 17:05:51 +08:00
* Wed Jul 20 2022 zhangfan <zhangfan4@kylinos.cn> - 1.2.9-1
- Update to 1.2.9
* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 1.2.4-5
- Completing build dependencies to fix gcc compiler missing error
2019-11-29 16:59:34 +08:00
* Wed Nov 20 2019 lingsheng <lingsheng@huawei.com> - 1.2.4-4
- Package init