package init
This commit is contained in:
commit
5280fa826f
BIN
nss_wrapper-1.1.3.tar.gz
Normal file
BIN
nss_wrapper-1.1.3.tar.gz
Normal file
Binary file not shown.
75
nss_wrapper.spec
Normal file
75
nss_wrapper.spec
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
Name: nss_wrapper
|
||||||
|
Version: 1.1.3
|
||||||
|
Release: 2
|
||||||
|
License: BSD
|
||||||
|
Summary: A wrapper for the user, group and hosts NSS API
|
||||||
|
Url: https://cwrap.org/
|
||||||
|
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: cmake libcmocka-devel
|
||||||
|
Requires: cmake pkgconfig
|
||||||
|
|
||||||
|
%description
|
||||||
|
Some projects provide daemons that need to be able to create,
|
||||||
|
modify, and delete Unix users. Or just switch user ID to interact
|
||||||
|
with the system e.g.User space file server. To be able to test whether
|
||||||
|
the user needs to modify the privileges of the passwd and groups files.
|
||||||
|
Use nss_wrapper to define your own passwd and groups files, and nss_wrapper
|
||||||
|
will use them to perform the correct operation in the test.
|
||||||
|
If you have clients and servers to test, you usually use functions to resolve
|
||||||
|
network names to addresses (dns) and vice versa. nss_wrappers allows
|
||||||
|
you to create a hosts file to set name resolution for addresses used
|
||||||
|
with socket_wrapper
|
||||||
|
|
||||||
|
To use it set the following environment variables:
|
||||||
|
|
||||||
|
LD_PRELOAD=libuid_wrapper.so
|
||||||
|
NSS_WRAPPER_PASSWD=/path/to/passwd
|
||||||
|
NSS_WRAPPER_GROUP=/path/to/group
|
||||||
|
NSS_WRAPPER_HOSTS=/path/to/host
|
||||||
|
|
||||||
|
This package doesn't have a devel package cause this project is for
|
||||||
|
development/testing.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Introduce how to use nss_wrapper
|
||||||
|
|
||||||
|
%description help
|
||||||
|
User's Manual for nss_wrapper
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
%cmake -DUNIT_TESTING=ON %{_builddir}/%{name}-%{version}
|
||||||
|
%make_build VERBOSE=1
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd build
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%check
|
||||||
|
cd build
|
||||||
|
make test
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc AUTHORS COPYING
|
||||||
|
%{_bindir}/nss_wrapper.pl
|
||||||
|
%{_libdir}/libnss_wrapper.so*
|
||||||
|
%dir %{_libdir}/cmake/nss_wrapper
|
||||||
|
%{_libdir}/cmake/nss_wrapper/*.cmake
|
||||||
|
%{_libdir}/pkgconfig/nss_wrapper.pc
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%doc README ChangeLog
|
||||||
|
%{_mandir}/man1/nss_wrapper.1*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Nov 28 2019 yangjian<yangjian79@huawei.com> - 1.1.3-2
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user