[ypserv] Update to new upstream version, which fixes several bugs; Use Tokyo Cabinet as DBM and rebuild maps

Honza Horak hhorak at fedoraproject.org
Mon Jun 4 14:50:08 UTC 2012


commit ecf988feaec41466cba766ef0bce7e136969cd50
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Mon Jun 4 16:29:24 2012 +0200

    Update to new upstream version, which fixes several bugs; Use Tokyo Cabinet as DBM and rebuild maps after updating

 .gitignore                    |    1 +
 sources                       |    2 +-
 ypserv-2.19-inval-ports.patch |   64 --------------------
 ypserv-2.26-emptydomain.patch |   12 ----
 ypserv-2.26-errmsg.patch      |   21 -------
 ypserv-2.26-shadow.patch      |  133 -----------------------------------------
 ypserv-2.27-crypt.patch       |   52 ----------------
 ypserv.spec                   |   42 +++++++------
 8 files changed, 25 insertions(+), 302 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1239b90..bcbc75b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ ypserv-2.23.tar.bz2
 /ypserv-2.25.tar.bz2
 /ypserv-2.26.tar.bz2
 /ypserv-2.27.tar.bz2
+/ypserv-2.28.tar.bz2
diff --git a/sources b/sources
index 6cea417..27dee16 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fd9c43aec932a92be07b723c647b02a4  ypserv-2.27.tar.bz2
+ed64f489bab494218fc5c5942b95d5b6  ypserv-2.28.tar.bz2
diff --git a/ypserv.spec b/ypserv.spec
index 14ef17d..cf726c4 100644
--- a/ypserv.spec
+++ b/ypserv.spec
@@ -1,10 +1,10 @@
-%global first_qdbm_version 2.27-4
+%global first_tc_version 2.28-1
 
 Summary: The NIS (Network Information Service) server
 Url: http://www.linux-nis.org/nis/ypserv/index.html
 Name: ypserv
-Version: 2.27
-Release: 5%{?dist}
+Version: 2.28
+Release: 1%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2
@@ -15,7 +15,7 @@ Source4: rpc.yppasswdd.env
 Source5: yppasswdd-pre-setdomain
 
 Requires: gawk, make, portmap, bash >= 2.0
-Requires: qdbm
+Requires: tokyocabinet
 Requires(post): systemd-units
 Requires(preun): systemd-units
 Requires(postun): systemd-units
@@ -25,20 +25,15 @@ Patch0: ypserv-2.5-redhat.patch
 Patch1: ypserv-2.21-path.patch
 Patch2: ypserv-2.5-nfsnobody2.patch
 Patch3: ypserv-2.13-ypxfr-zeroresp.patch
-Patch4: ypserv-2.19-inval-ports.patch
 Patch5: ypserv-2.13-nonedomain.patch
 Patch6: ypserv-2.19-slp-warning.patch
 Patch7: ypserv-2.24-manfix.patch
 Patch8: ypserv-2.24-aliases.patch
 Patch9: ypserv-2.25-systemd.patch
-Patch12: ypserv-2.26-shadow.patch
-Patch13: ypserv-2.26-errmsg.patch
-Patch14: ypserv-2.26-emptydomain.patch
 Patch16: ypserv-2.27-confpost.patch
 Patch17: ypserv-2.27-cloexec.patch
-Patch18: ypserv-2.27-crypt.patch
 
-BuildRequires: qdbm-devel
+BuildRequires: tokyocabinet-devel
 BuildRequires: systemd-units
 BuildRequires: autoconf, automake
 
@@ -67,18 +62,13 @@ machines.
 %patch1 -p1 -b .path
 %patch2 -p1 -b .nfsnobody
 %patch3 -p1 -b .respzero
-%patch4 -p1 -b .ports
 %patch5 -p1 -b .nonedomain
 %patch6 -p1 -b .slp-warning
 %patch7 -p1 -b .manfix
 %patch8 -p1 -b .aliases
 %patch9 -p1 -b .systemd
-%patch12 -p1 -b .shadow
-%patch13 -p1 -b .errmsg
-%patch14 -p1 -b .emptydomain
 %patch16 -p1 -b .confpost
 %patch17 -p1 -b .cloexec
-%patch18 -p1 -b .crypt
 
 autoreconf
 
@@ -93,7 +83,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fpic"
 	--enable-checkroot \
 	--enable-fqdn \
 	--libexecdir=%{_libdir}/yp \
-	--with-dbmliborder=qdbm
+	--with-dbmliborder=tokyocabinet
 make
 
 %install
@@ -170,10 +160,20 @@ if [ "$1" -ge "1" ] ; then
     /bin/systemctl try-restart ypserv.service ypxfrd.service yppasswdd.service >/dev/null 2>&1 || :
 fi
 
-# after switching from gdbm to qdbm we need to rebuild maps
-%triggerpostun -- ypserv < %{first_qdbm_version}
+# After switching from gdbm to Tokyo Cabinet we need to rebuild maps
+# during update, but without pushing to slave servers
+# In case domainname is not set, but it is defined in 
+# /etc/sysconfig/network, we do the same work as service yppasswdd 
+# do before starting.
+# The original domainname value is set back in the end.
+%triggerpostun -- ypserv < %{first_tc_version}
+olddomain=`/bin/domainname`
+. /etc/sysconfig/network
+export NISDOMAIN
+%{scripts_path}/yppasswdd-pre-setdomain || :
 touch /var/yp/Makefile
-make -C /var/yp >&2 || :
+NOPUSH=true make -eC /var/yp >&2 || :
+/bin/domainname "$olddomain"
 
 %files
 %defattr(-,root,root)
@@ -191,6 +191,10 @@ make -C /var/yp >&2 || :
 %{_includedir}/*/*
 
 %changelog
+* Fri Jun 01 2012 Honza Horak <hhorak at redhat.com> - 2.28-1
+- Update to new upstream version, which fixes several bugs
+- Use Tokyo Cabinet as DBM and rebuild maps after updating
+
 * Mon May 14 2012 Honza Horak <hhorak at redhat.com> - 2.27-5
 - Checking if domainname is set moved from ypserv.service
   to yppasswdd.service


More information about the scm-commits mailing list