From 99f52366e9cd5d405a01ca45a5c26fa2af82e0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Thu, 26 Apr 2012 15:29:15 +0200 Subject: [PATCH] Build against qdbm and rebuild maps after updating --- ypserv.spec | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/ypserv.spec b/ypserv.spec index cb1caf1..bbac366 100644 --- a/ypserv.spec +++ b/ypserv.spec @@ -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 - 2.27-4 +- Build against qdbm and rebuild maps after updating + * Thu Apr 26 2012 Honza Horak - 2.27-3 - Added patch to handle crypt() returning NULL