Build against qdbm and rebuild maps after updating

This commit is contained in:
Honza Horák 2012-04-26 15:29:15 +02:00
parent a71b90837c
commit 99f52366e9
1 changed files with 18 additions and 4 deletions

View File

@ -1,8 +1,10 @@
%global first_qdbm_version 2.27-4
Summary: The NIS (Network Information Service) server
Url: http://www.linux-nis.org/nis/ypserv/index.html
Name: ypserv
Version: 2.27
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2
@ -13,6 +15,7 @@ Source4: rpc.yppasswdd.env
Source5: ypserv-pre-setdomain
Requires: gawk, make, portmap, bash >= 2.0
Requires: qdbm
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@ -35,7 +38,7 @@ Patch16: ypserv-2.27-confpost.patch
Patch17: ypserv-2.27-cloexec.patch
Patch18: ypserv-2.27-crypt.patch
BuildRequires: compat-gdbm-devel
BuildRequires: qdbm-devel
BuildRequires: systemd-units
BuildRequires: autoconf, automake
@ -86,7 +89,11 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC"
%else
export CFLAGS="$RPM_OPT_FLAGS -fpic"
%endif
%configure --enable-checkroot --enable-fqdn --libexecdir=%{_libdir}/yp
%configure \
--enable-checkroot \
--enable-fqdn \
--libexecdir=%{_libdir}/yp \
--with-dbmliborder=qdbm
make
%install
@ -162,7 +169,11 @@ if [ "$1" -ge "1" ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
fi
exit 0
# after switching from gdbm to qdbm we need to rebuild maps
%triggerpostun -- ypserv < %{first_qdbm_version}
touch /var/yp/Makefile
make -C /var/yp >&2 || :
%files
%defattr(-,root,root)
@ -180,6 +191,9 @@ exit 0
%{_includedir}/*/*
%changelog
* Thu Apr 26 2012 Honza Horak <hhorak@redhat.com> - 2.27-4
- Build against qdbm and rebuild maps after updating
* Thu Apr 26 2012 Honza Horak <hhorak@redhat.com> - 2.27-3
- Added patch to handle crypt() returning NULL