Blame SPECS/nss_wrapper.spec

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