From 80bc1048415d8ed80252b37308828b99d85632d6 Mon Sep 17 00:00:00 2001 From: Matej Muzila Date: Fri, 19 May 2017 16:08:16 +0200 Subject: [PATCH] Rebase to ypserv 4.0 Added IPv6 support --- .gitignore | 2 ++ sources | 2 +- ypserv-2.13-nonedomain.patch | 2 +- ypserv-2.13-ypxfr-zeroresp.patch | 4 +-- ypserv-2.19-slp-warning.patch | 6 ++-- ypserv-2.24-aliases.patch | 8 ++--- ypserv-2.24-manfix.patch | 28 ------------------ ypserv-2.5-redhat.patch | 9 +++--- ypserv-4.0-headers.patch | 10 +++++++ ypserv-4.0-oldaddr.patch | 12 ++++++++ ypserv.spec | 50 +++++++++++++++++++++++--------- 11 files changed, 76 insertions(+), 57 deletions(-) create mode 100644 ypserv-4.0-headers.patch create mode 100644 ypserv-4.0-oldaddr.patch diff --git a/.gitignore b/.gitignore index 3756f7b..cc8f29e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ ypserv-2.23.tar.bz2 /ypserv-2.31.tar.bz2 /ypserv-2.32.tar.bz2 /ypserv-2.32.1.tar.bz2 +/ypserv-ypserv-4.0.tar.gz +/ypserv-5bfba76.tar.gz diff --git a/sources b/sources index a315fe6..d03d59e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -21695231a816d150685eae870087291c ypserv-2.32.1.tar.bz2 +SHA512 (ypserv-5bfba76.tar.gz) = 5d1db94d6c607fb2fead26fd887b3d3fd064c772a677b543454264e1f34b7c54b9fd9c60b369ed2b2c5598649aff8f2d4555cc0e3f6ea81222943575ee694430 diff --git a/ypserv-2.13-nonedomain.patch b/ypserv-2.13-nonedomain.patch index b1f2a7f..b822169 100644 --- a/ypserv-2.13-nonedomain.patch +++ b/ypserv-2.13-nonedomain.patch @@ -2,7 +2,7 @@ diff -up ./scripts/ypMakefile.in.nonedomain ./scripts/ypMakefile.in --- ./scripts/ypMakefile.in.nonedomain 2013-05-06 18:30:46.772434725 +0200 +++ ./scripts/ypMakefile.in 2013-05-06 18:31:59.429495323 +0200 @@ -106,10 +106,18 @@ NETMASKS = $(YPSRCDIR)/netmasks - YPSERVERS = $(YPDIR)/ypservers # List of all NIS servers for a domain + YPSERVERS = $(YPDIR)/ypservers # List of all NIS slave servers target: Makefile +ifeq ($(shell /bin/domainname), (none)) diff --git a/ypserv-2.13-ypxfr-zeroresp.patch b/ypserv-2.13-ypxfr-zeroresp.patch index 33c6623..0b06549 100644 --- a/ypserv-2.13-ypxfr-zeroresp.patch +++ b/ypserv-2.13-ypxfr-zeroresp.patch @@ -2,8 +2,8 @@ diff -up ./ypxfr/ypxfr.c.ypxfr-zeroresp ./ypxfr/ypxfr.c --- ./ypxfr/ypxfr.c.ypxfr-zeroresp 2013-04-10 16:43:21.000000000 +0200 +++ ./ypxfr/ypxfr.c 2013-05-06 18:31:36.875476520 +0200 @@ -415,6 +415,7 @@ ypxfr (char *map, char *source_host, cha - struct hostent *h; - int sock, result; + time_t masterOrderNum; + int result; + memset(&resp_val, '\0', sizeof(resp_val)); /* Name of the map file */ diff --git a/ypserv-2.19-slp-warning.patch b/ypserv-2.19-slp-warning.patch index 6104c7b..8f1fd04 100644 --- a/ypserv-2.19-slp-warning.patch +++ b/ypserv-2.19-slp-warning.patch @@ -2,12 +2,12 @@ diff -up ./etc/ypserv.conf.slp-warning ./etc/ypserv.conf --- ./etc/ypserv.conf.slp-warning 2006-10-12 13:03:32.000000000 +0200 +++ ./etc/ypserv.conf 2013-05-06 18:32:16.581509617 +0200 @@ -13,9 +13,9 @@ - files: 30 - # Should we register ypserv with SLP ? + # Should we register ypserv with SLP? Only available if SLP support + # is compiled in. Deprecated functionality. -slp: no +# slp: no - # After how many seconds we should re-register ypserv with SLP ? + # After how many seconds we should re-register ypserv with SLP? -slp_timeout: 3600 +# slp_timeout: 3600 diff --git a/ypserv-2.24-aliases.patch b/ypserv-2.24-aliases.patch index 05af70e..57ee0e1 100644 --- a/ypserv-2.24-aliases.patch +++ b/ypserv-2.24-aliases.patch @@ -2,8 +2,8 @@ diff -up ypserv-2.32/acinclude.m4.aliases ypserv-2.32/acinclude.m4 --- ypserv-2.32/acinclude.m4.aliases 2005-04-07 14:38:44.000000000 +0200 +++ ypserv-2.32/acinclude.m4 2013-11-18 09:57:05.082162773 +0100 @@ -92,3 +92,18 @@ AC_DEFUN([TYPE_SOCKLEN_T], - AC_DEFINE([socklen_t], [int], [Define if socklen_t is missing]) - fi + fi + AC_MSG_RESULT($ac_cv___attribute__) ]) + + @@ -30,5 +30,5 @@ diff -up ypserv-2.32/configure.ac.aliases ypserv-2.32/configure.ac -AC_PATH_PROG(ALIASES, aliases, /etc/mail/aliases, /etc/mail:/etc) +FIND_ALIASES_PATH(/etc/aliases) - - + dnl Should we use a gethostbyname after gethostname to use FQDN ? default yes + AC_ARG_ENABLE(fqdn, AS_HELP_STRING([--disable-fqdn], diff --git a/ypserv-2.24-manfix.patch b/ypserv-2.24-manfix.patch index 75258c8..4cf2454 100644 --- a/ypserv-2.24-manfix.patch +++ b/ypserv-2.24-manfix.patch @@ -1,31 +1,3 @@ -diff -up ypserv-2.32/rpc.yppasswdd/rpc.yppasswdd.8.manfix ypserv-2.32/rpc.yppasswdd/rpc.yppasswdd.8 ---- ypserv-2.32/rpc.yppasswdd/rpc.yppasswdd.8.manfix 2013-04-10 10:30:53.000000000 +0200 -+++ ypserv-2.32/rpc.yppasswdd/rpc.yppasswdd.8 2013-11-18 09:47:11.982160697 +0100 -@@ -53,6 +53,15 @@ customized for that NIS domain\. If no s - \fBMakefile\fR - is found, the scripts uses the generic one in - \fI/var/yp\fR\. -+.PP -+It is possible to pass -+\fBOPTIONS\fR -+to -+\fBrpc.yppasswdd\fR -+using the environment variable -+YPPASSWDD_ARGS -+and this variable can be set in -+\fB/etc/sysconfig/yppasswdd\fR\&. - .SH "OPTIONS" - .PP - The following options are available: -@@ -186,6 +195,8 @@ version\ 3\. Better still, look at - \fI/etc/passwd\fR - - \fI/etc/shadow\fR -+ -+\fI/etc/sysconfig/yppasswdd\fR - .SH "SEE ALSO" - .PP - diff -up ypserv-2.32/rpc.ypxfrd/rpc.ypxfrd.8.manfix ypserv-2.32/rpc.ypxfrd/rpc.ypxfrd.8 --- ypserv-2.32/rpc.ypxfrd/rpc.ypxfrd.8.manfix 2013-04-10 10:30:53.000000000 +0200 +++ ypserv-2.32/rpc.ypxfrd/rpc.ypxfrd.8 2013-11-18 09:47:11.982160697 +0100 diff --git a/ypserv-2.5-redhat.patch b/ypserv-2.5-redhat.patch index 1f73123..78d7d55 100644 --- a/ypserv-2.5-redhat.patch +++ b/ypserv-2.5-redhat.patch @@ -1,7 +1,6 @@ -diff -up ./scripts/ypMakefile.in.redhat ./scripts/ypMakefile.in ---- ./scripts/ypMakefile.in.redhat 2012-01-27 15:53:03.000000000 +0100 -+++ ./scripts/ypMakefile.in 2013-05-06 18:28:38.558327612 +0200 -@@ -109,8 +109,8 @@ target: Makefile +--- ./scripts/ypMakefile.in.redhat 2017-03-31 16:43:23.318556329 +0200 ++++ ./scripts/ypMakefile.in 2017-03-31 16:49:27.917561370 +0200 +@@ -107,8 +107,8 @@ target: Makefile # If you don't want some of these maps built, feel free to comment # them out from this list. @@ -9,6 +8,6 @@ diff -up ./scripts/ypMakefile.in.redhat ./scripts/ypMakefile.in - shadow publickey # networks ethers bootparams printcap \ +all: passwd group hosts rpc services netid protocols mail \ + # netgrp shadow publickey networks ethers bootparams printcap \ - # amd.home auto.master auto.home auto.local passwd.adjunct \ + # amd.home autofs passwd.adjunct \ # timezone locale netmasks diff --git a/ypserv-4.0-headers.patch b/ypserv-4.0-headers.patch new file mode 100644 index 0000000..320558d --- /dev/null +++ b/ypserv-4.0-headers.patch @@ -0,0 +1,10 @@ +--- makedbm/makedbm.c.headers 2017-02-21 13:57:23.933293831 +0100 ++++ makedbm/makedbm.c 2017-02-21 13:57:48.141286207 +0100 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include "yp.h" + + #if defined (__NetBSD__) || (defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)) + /* is missing the prototype */ diff --git a/ypserv-4.0-oldaddr.patch b/ypserv-4.0-oldaddr.patch new file mode 100644 index 0000000..448b675 --- /dev/null +++ b/ypserv-4.0-oldaddr.patch @@ -0,0 +1,12 @@ +--- ypserv-5bfba760283060087aefeb417342bcc66d349b2e/lib/access.c.oldaddr 2017-04-07 13:23:34.403404792 +0200 ++++ ypserv-5bfba760283060087aefeb417342bcc66d349b2e/lib/access.c 2017-04-07 13:32:07.315466530 +0200 +@@ -151,6 +151,9 @@ copy_netbuf (struct netbuf *src) + static int + cmp_netbuf (struct netbuf *nbuf1, struct netbuf *nbuf2) + { ++ if (nbuf1 == NULL || nbuf2 == NULL) ++ return 1; ++ + if (nbuf1->len != nbuf2->len) + return 1; + diff --git a/ypserv.spec b/ypserv.spec index 6ef021c..0779001 100644 --- a/ypserv.spec +++ b/ypserv.spec @@ -1,13 +1,18 @@ -%global first_tc_version 2.29-2 + %global first_tc_version 2.29-2 + +%global commit0 5bfba760283060087aefeb417342bcc66d349b2e +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Summary: The NIS (Network Information Service) server Url: http://www.linux-nis.org/nis/ypserv/index.html Name: ypserv -Version: 2.32.1 -Release: 7%{?dist} +Version: 4.0 +Release: 2.1.20170331git%{shortcommit0}%{?dist} License: GPLv2 Group: System Environment/Daemons -Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2 +#Source0: http://www.linux-nis.org/download/ypserv/ypserv-%{version}.tar.bz2 +#Source0: https://github.com/thkukuk/ypserv/archive/ypserv-%{version}.tar.gz#/ypserv-ypserv-%{version}.tar.gz +Source0: https://github.com/thkukuk/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz Source1: ypserv.service Source2: yppasswdd.service Source3: ypxfrd.service @@ -34,11 +39,17 @@ Patch8: ypserv-2.27-confpost.patch Patch9: ypserv-2.29-relro.patch Patch10: ypserv-2.31-netgrprecur.patch Patch11: ypserv-2.32-systemdso.patch +Patch12: ypserv-4.0-headers.patch +Patch13: ypserv-4.0-oldaddr.patch BuildRequires: tokyocabinet-devel BuildRequires: systemd BuildRequires: autoconf, automake BuildRequires: systemd-devel +BuildRequires: libnsl2-devel +BuildRequires: libtirpc-devel +BuildRequires: docbook-style-xsl +BuildRequires: libxslt %description The Network Information Service (NIS) is a system that provides @@ -57,21 +68,25 @@ need to install the yp-tools and ypbind packages on any NIS client machines. %prep -%setup -q + +%setup -n %{name}-%{commit0} + %patch0 -p1 -b .redhat -%patch1 -p1 -b .path +#%patch1 -p1 -b .path %patch2 -p1 -b .nfsnobody %patch3 -p1 -b .respzero %patch4 -p1 -b .nonedomain %patch5 -p1 -b .slp-warning -%patch6 -p1 -b .manfix +#%patch6 -p1 -b .manfix %patch7 -p1 -b .aliases %patch8 -p1 -b .confpost -%patch9 -p1 -b .relro +#%patch9 -p1 -b .relro %patch10 -p1 -b .netgrprecur -%patch11 -p1 -b .systemdso +#%patch11 -p1 -b .systemdso +%patch12 -b .headers +%patch13 -p1 -b .oldaddr -autoreconf +autoreconf -i %build cp etc/README etc/README.etc @@ -80,16 +95,21 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC" %else export CFLAGS="$RPM_OPT_FLAGS -fpic" %endif + + %configure \ --enable-checkroot \ --enable-fqdn \ --libexecdir=%{_libdir}/yp \ - --with-dbmliborder=tokyocabinet + --with-dbmliborder=tokyocabinet \ + -localstatedir=%{_localstatedir} + make %install #make install ROOT=$RPM_BUILD_ROOT -%makeinstall libexecdir=$RPM_BUILD_ROOT%{_libdir}/yp INSTALL_PROGRAM=install +#%make_install libexecdir=$RPM_BUILD_ROOT%{_libdir}/yp INSTALL_PROGRAM=install +%make_install mkdir -p $RPM_BUILD_ROOT%{_unitdir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} mkdir -p $RPM_BUILD_ROOT%{_libexecdir} @@ -220,12 +240,16 @@ fi %config(noreplace) /var/yp/* %{_unitdir}/* %{_libexecdir}/* -%{_libdir}/yp +%{_libdir}/yp/* %{_sbindir}/* %{_mandir}/*/* %{_includedir}/rpcsvc %changelog +* Thu Apr 6 2017 Matej Mužila - 4.0-2.20170331git5bfba76 +- Rebase to ypserv 4.0 +- Added IPv6 support + * Fri Feb 05 2016 Fedora Release Engineering - 2.32.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild