Rebase to ypserv 4.0

Added IPv6 support
This commit is contained in:
Matej Muzila 2017-05-19 16:08:16 +02:00
parent 7f8247077d
commit 80bc104841
11 changed files with 76 additions and 57 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -1 +1 @@
21695231a816d150685eae870087291c ypserv-2.32.1.tar.bz2
SHA512 (ypserv-5bfba76.tar.gz) = 5d1db94d6c607fb2fead26fd887b3d3fd064c772a677b543454264e1f34b7c54b9fd9c60b369ed2b2c5598649aff8f2d4555cc0e3f6ea81222943575ee694430

View File

@ -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))

View File

@ -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 */

View File

@ -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

View File

@ -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],

View File

@ -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

View File

@ -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

10
ypserv-4.0-headers.patch Normal file
View File

@ -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 <netdb.h>
#include <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
+#include "yp.h"
#if defined (__NetBSD__) || (defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0))
/* <rpc/rpc.h> is missing the prototype */

12
ypserv-4.0-oldaddr.patch Normal file
View File

@ -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;

View File

@ -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 <mmuzila@redhat.com> - 4.0-2.20170331git5bfba76
- Rebase to ypserv 4.0
- Added IPv6 support
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.32.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild