forked from pool/nss_wrapper
Accepting request 222159 from home:gladiac
This is a special library for creating testing environments. OBS-URL: https://build.opensuse.org/request/show/222159 OBS-URL: https://build.opensuse.org/package/show/devel:tools/nss_wrapper?expand=0&rev=1
This commit is contained in:
commit
ab60afe8c0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
nss_wrapper-1.0.1.tar.gz
Normal file
3
nss_wrapper-1.0.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c46498e1119bfc4bf8f7ce6db4b1bcff969043ab2ce04c54fdec29a2bf9034f2
|
||||||
|
size 35957
|
5
nss_wrapper.changes
Normal file
5
nss_wrapper.changes
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 13 10:09:46 UTC 2014 - asn@cryptomilk.org
|
||||||
|
|
||||||
|
- Initial package.
|
||||||
|
|
9
nss_wrapper.rpmlintrc
Normal file
9
nss_wrapper.rpmlintrc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# This is a special library only for testing purposes. You cannot link this
|
||||||
|
# library. It is only inteded to be used with LD_PRELOAD. This package is
|
||||||
|
# the devel package.
|
||||||
|
#
|
||||||
|
# Learn more at http://cwrap.org
|
||||||
|
#
|
||||||
|
addFilter("shlib-policy-name-error")
|
||||||
|
addFilter("shared-lib-calls-exit")
|
||||||
|
addFilter("devel-file-in-non-devel-package")
|
95
nss_wrapper.spec
Normal file
95
nss_wrapper.spec
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#
|
||||||
|
# spec file for package nss_wrapper
|
||||||
|
#
|
||||||
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: nss_wrapper
|
||||||
|
Version: 1.0.1
|
||||||
|
Release: 0
|
||||||
|
|
||||||
|
Summary: A wrapper for the user, group and hosts NSS API
|
||||||
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Url: http://cwrap.org/
|
||||||
|
|
||||||
|
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: libcmocka-devel
|
||||||
|
BuildRequires: netcfg
|
||||||
|
|
||||||
|
%description
|
||||||
|
There are projects which provide daemons needing to be able to create, modify
|
||||||
|
and delete Unix users. Or just switch user ids to interact with the system e.g.
|
||||||
|
a user space file server. To be able to test that you need the privilege to
|
||||||
|
modify the passwd and groups file. With nss_wrapper it is possible to define
|
||||||
|
your own passwd and groups file which will be used by software to act correctly
|
||||||
|
while under test.
|
||||||
|
|
||||||
|
If you have a client and server under test they normally use functions to
|
||||||
|
resolve network names to addresses (dns) or vice versa. The nss_wrappers allow
|
||||||
|
you to create a hosts file to setup name resolution for the addresses you use
|
||||||
|
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.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake \
|
||||||
|
-DUNIT_TESTING=ON \
|
||||||
|
%{_builddir}/%{name}-%{version}
|
||||||
|
|
||||||
|
%__make %{?jobs:-j%jobs} VERBOSE=1
|
||||||
|
|
||||||
|
%install
|
||||||
|
pushd build
|
||||||
|
%makeinstall
|
||||||
|
popd
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd build
|
||||||
|
%__make test
|
||||||
|
popd
|
||||||
|
|
||||||
|
%clean
|
||||||
|
%__rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc AUTHORS README ChangeLog COPYING
|
||||||
|
%{_bindir}/nss_wrapper.pl
|
||||||
|
%{_libdir}/libnss_wrapper.so*
|
||||||
|
%dir %{_libdir}/cmake
|
||||||
|
%{_libdir}/cmake/nss_wrapper-config-version.cmake
|
||||||
|
%{_libdir}/cmake/nss_wrapper-config.cmake
|
||||||
|
%dir %{_libdir}/pkgconfig
|
||||||
|
%{_libdir}/pkgconfig/nss_wrapper.pc
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user