Blame SPECS/nss_wrapper.spec

88fb4a
Name:           nss_wrapper
88fb4a
Version:        1.1.5
88fb4a
Release:        3%{?dist}
88fb4a
88fb4a
License:        BSD
88fb4a
Summary:        A wrapper for the user, group and hosts NSS API
88fb4a
Url:            https://cwrap.org/
88fb4a
88fb4a
Source0:        https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
88fb4a
Source1:        https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc
88fb4a
Source2:        nss_wrapper.keyring
88fb4a
88fb4a
BuildRequires:  cmake
88fb4a
BuildRequires:  gcc
88fb4a
BuildRequires:  gnupg2
88fb4a
BuildRequires:  libcmocka-devel
88fb4a
BuildRequires:  perl-generators
88fb4a
88fb4a
Recommends:     cmake
88fb4a
Recommends:     pkgconfig
88fb4a
88fb4a
%description
88fb4a
There are projects which provide daemons needing to be able to create, modify
88fb4a
and delete Unix users. Or just switch user ids to interact with the system e.g.
88fb4a
a user space file server. To be able to test that you need the privilege to
88fb4a
modify the passwd and groups file. With nss_wrapper it is possible to define
88fb4a
your own passwd and groups file which will be used by software to act correctly
88fb4a
while under test.
88fb4a
88fb4a
If you have a client and server under test they normally use functions to
88fb4a
resolve network names to addresses (dns) or vice versa. The nss_wrappers allow
88fb4a
you to create a hosts file to setup name resolution for the addresses you use
88fb4a
with socket_wrapper.
88fb4a
88fb4a
To use it set the following environment variables:
88fb4a
88fb4a
LD_PRELOAD=libuid_wrapper.so
88fb4a
NSS_WRAPPER_PASSWD=/path/to/passwd
88fb4a
NSS_WRAPPER_GROUP=/path/to/group
88fb4a
NSS_WRAPPER_HOSTS=/path/to/host
88fb4a
88fb4a
This package doesn't have a devel package cause this project is for
88fb4a
development/testing.
88fb4a
88fb4a
%prep
88fb4a
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
88fb4a
%autosetup -p1
88fb4a
88fb4a
%build
88fb4a
if test ! -e "obj"; then
88fb4a
    mkdir obj
88fb4a
fi
88fb4a
pushd obj
88fb4a
%cmake \
88fb4a
  -DUNIT_TESTING=ON \
88fb4a
  %{_builddir}/%{name}-%{version}
88fb4a
88fb4a
make %{?_smp_mflags} VERBOSE=1
88fb4a
popd
88fb4a
88fb4a
%install
88fb4a
pushd obj
88fb4a
make DESTDIR=%{buildroot} install
88fb4a
88fb4a
sed -i '1 s|/usr/bin/env\ perl|/usr/bin/perl|' %{buildroot}%{_bindir}/nss_wrapper.pl
88fb4a
88fb4a
popd
88fb4a
88fb4a
%ldconfig_scriptlets
88fb4a
88fb4a
%check
88fb4a
pushd obj
88fb4a
make test
88fb4a
popd
88fb4a
88fb4a
%files
88fb4a
%doc AUTHORS README ChangeLog
88fb4a
%license LICENSE
88fb4a
%{_bindir}/nss_wrapper.pl
88fb4a
%{_libdir}/libnss_wrapper.so*
88fb4a
%dir %{_libdir}/cmake/nss_wrapper
88fb4a
%{_libdir}/cmake/nss_wrapper/nss_wrapper-config-version.cmake
88fb4a
%{_libdir}/cmake/nss_wrapper/nss_wrapper-config.cmake
88fb4a
%{_libdir}/pkgconfig/nss_wrapper.pc
88fb4a
%{_mandir}/man1/nss_wrapper.1*
88fb4a
88fb4a
%changelog
88fb4a
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.5-3
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
88fb4a
88fb4a
* Thu Dec 13 2018 Andreas Schneider <asn@redhat.com> - 1.1.5-1
88fb4a
- resolves: #1340724 - Use Recommends for cmake and pkgconfig
88fb4a
88fb4a
* Fri Nov 02 2018 Andreas Schneider <asn@redhat.com> - 1.1.5-1
88fb4a
- Update to version 1.1.5
88fb4a
88fb4a
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-5
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
88fb4a
88fb4a
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-4
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
88fb4a
88fb4a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-3
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
88fb4a
88fb4a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
88fb4a
88fb4a
* Wed Mar 23 2016 Andreas Schneider <asn@redhat.com> - 1.1.3-1
88fb4a
- Update to version 1.1.3
88fb4a
  * Added support for BSD 'struct passwd' members
88fb4a
  * Replaced strcpy() with snprintf()
88fb4a
  * Fixed segfault while reloading hosts file
88fb4a
  * Fixed issue where are not fault tolerant if an alias has already
88fb4a
    been added
88fb4a
  * Fixed nss_wrapper build on Solaris
88fb4a
88fb4a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
88fb4a
88fb4a
* Fri Nov 20 2015 Andreas Schneider <asn@redhat.com> - 1.1.0-1
88fb4a
- Update to version 1.1.0
88fb4a
  * Added support for initgroups()
88fb4a
  * Added support for shadow files (getspnam(), etc.)
88fb4a
  * Improved support for multi address handling in getaddrinfo()
88fb4a
  * Improved file parser
88fb4a
  * Fixed compilation on machines without IPv4 support
88fb4a
  * Fixed service string sanity check in getaddrinfo() (bso #11501)
88fb4a
  * Fixed AI_NUMERICHOST handling in getaddrinfo() (bso #11477)
88fb4a
88fb4a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
88fb4a
88fb4a
* Mon Dec 15 2014 Michael Adam <madam@redhat.com> - 1.0.3-2
88fb4a
- Fix format of changelog entries.
88fb4a
- Require cmake.
88fb4a
- Don't own _libdir/pkgconfig, and require pkgconfig instead.
88fb4a
88fb4a
* Thu Sep 11 2014 Andreas Schneider <asn@redhat.com> - 1.0.3-1
88fb4a
- Update to version 1.0.3.
88fb4a
88fb4a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
88fb4a
88fb4a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
88fb4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
88fb4a
88fb4a
* Wed Apr 09 2014 Andreas Schneider <asn@redhat.com> - 1.0.2-1
88fb4a
- Update to version 1.0.2.
88fb4a
88fb4a
* Fri Mar 14 2014 Andreas Schneider <asn@redhat.com> - 1.0.1-3
88fb4a
- resolves: #1075932 - Fix segfault in 'getent hosts'.
88fb4a
88fb4a
* Tue Feb 11 2014 Andreas Schneider <asn@redhat.com> - 1.0.1-2
88fb4a
- resolves: #1060906 - Fedora package.
88fb4a
- Remove Group
88fb4a
- Remove glibc-devel build requirement
88fb4a
- Do not create a subpackage.
88fb4a
88fb4a
* Tue Feb 04 2014 Andreas Schneider <asn@redhat.com> - 1.0.1-1
88fb4a
- Update to version 1.0.1
88fb4a
  * Added --libs to pkg-config.
88fb4a
  * Added nss_wrapper-config.cmake
88fb4a
  * Fixed a bug packaging the obj directory.
88fb4a
88fb4a
* Mon Feb 03 2014 Andreas Schneider <asn@redhat.com> - 1.0.0-1
88fb4a
- Initial version 1.0.0