From 2be5fc4be2ff1742263588625c44880e011987be Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Mon, 24 Aug 2020 22:32:30 +0200 Subject: [PATCH] - updated to 2.7.2 - updated bcroadcast patch - removed outdated pthread,dbus patches (old dbus/NM support is gone) - build with libtirpc/libnsl 1.x for IPv6 support --- ypbind-mt-broadcast.patch | 31 +++++++---------------- ypbind-mt-dbus.patch | 14 ----------- ypbind-mt-pthread.patch | 13 ---------- ypbind-mt.spec | 52 +++++++++++++++++++++------------------ 4 files changed, 37 insertions(+), 73 deletions(-) delete mode 100644 ypbind-mt-dbus.patch delete mode 100644 ypbind-mt-pthread.patch diff --git a/ypbind-mt-broadcast.patch b/ypbind-mt-broadcast.patch index 334b978..e77698d 100644 --- a/ypbind-mt-broadcast.patch +++ b/ypbind-mt-broadcast.patch @@ -1,10 +1,9 @@ ---- ypbind-mt-1.29.90/src/ypbind-mt.c.orig 2009-05-21 09:20:22.398319048 +0200 -+++ ypbind-mt-1.29.90/src/ypbind-mt.c 2009-05-21 09:29:30.811996217 +0200 -@@ -297,25 +297,6 @@ - return 0; +--- ypbind-mt-2.7.2/src/ypbind-mt.c.orig 2020-08-23 11:51:33.486799040 +0200 ++++ ypbind-mt-2.7.2/src/ypbind-mt.c 2020-08-23 12:04:20.965974582 +0200 +@@ -274,24 +274,6 @@ } -- + -/* Load the configuration, exiting if there's an error */ -static void -load_config_or_exit(void) @@ -15,7 +14,7 @@ - stderr); - fprintf (stderr, - _("Add a NIS server to the %s configuration file,\n"), -- configfile); +- DEFAULT_CONFIG_FILE); - fputs (_("or start ypbind with the -broadcast option.\n"), - stderr); - exit (1); @@ -26,28 +25,16 @@ /* Create a pidfile on startup */ static void create_pidfile (void) -@@ -803,21 +784,9 @@ +@@ -853,9 +835,9 @@ exit (1); } - if (!use_broadcast) -- { --#ifdef USE_DBUS_NM -- /* If we don't use DBUS, exit with an error if we cannot load the -- config. Else load the config, maybe there is a network already -- running. */ -- if (disable_dbus) -- load_config_or_exit (); -- else -- load_config (0); --#else -- load_config_or_exit (); --#endif -- } +- load_config_or_exit (); - else -+ if (!use_broadcast && load_config (1)) ++ if (!use_broadcast && (load_config (0) != 0)) + use_broadcast = 1; + if (use_broadcast) - add_server (domain, NULL, 0); + add_server (domain, NULL); unlink_bindingdir (); diff --git a/ypbind-mt-dbus.patch b/ypbind-mt-dbus.patch deleted file mode 100644 index 9c5caad..0000000 --- a/ypbind-mt-dbus.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -burNp ypbind-mt-1.22/src/ypbind_dbus_nm.c ypbind-mt-1.22-dud/src/ypbind_dbus_nm.c ---- ypbind-mt-1.22/src/ypbind_dbus_nm.c 2007-02-14 14:01:57.000000000 +0100 -+++ ypbind-mt-1.22-dud/src/ypbind_dbus_nm.c 2009-02-26 14:47:50.072823141 +0100 -@@ -50,6 +50,10 @@ typedef enum NMState { - - #endif - -+#ifndef NM_DBUS_SIGNAL_STATE_CHANGE -+#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" -+#endif -+ - #include "ypbind.h" - #include "log_msg.h" - #include "local.h" diff --git a/ypbind-mt-pthread.patch b/ypbind-mt-pthread.patch deleted file mode 100644 index 137d947..0000000 --- a/ypbind-mt-pthread.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- ypbind-mt-1.6/src/ypbind-mt.c.pthread-pidfile Wed Aug 2 16:46:57 2000 -+++ ypbind-mt-1.6/src/ypbind-mt.c Wed Aug 2 16:46:58 2000 -@@ -318,6 +318,10 @@ - sigset_t sigs_to_catch; - int caught; - -+#if USE_PIDFILE -+ create_pidfile (); -+#endif /* USE_PIDFILE */ -+ - sigemptyset (&sigs_to_catch); - sigaddset (&sigs_to_catch, SIGCHLD); - sigaddset (&sigs_to_catch, SIGTERM); diff --git a/ypbind-mt.spec b/ypbind-mt.spec index b7d938b..9799691 100644 --- a/ypbind-mt.spec +++ b/ypbind-mt.spec @@ -4,29 +4,36 @@ Summary(pl.UTF-8): Demon NIS przyłączający klientów NIS do domeny NIS Summary(pt_BR.UTF-8): Processo de ligação NIS Summary(zh_CN.UTF-8): NIS 服务器 Name: ypbind-mt -Version: 1.37.1 -Release: 2 -License: GPL +Version: 2.7.2 +Release: 1 +License: GPL v2 Group: Networking/Daemons -Source0: http://www.linux-nis.org/download/ypbind-mt//%{name}-%{version}.tar.bz2 -# Source0-md5: 8af8d35e7b9a7fcc3a1576697a04bd82 +#Source0Download: https://github.com/thkukuk/ypbind-mt/releases +Source0: https://github.com/thkukuk/ypbind-mt/releases/download/v%{version}/%{name}-%{version}.tar.xz +# Source0-md5: 130ddec4c31192cbefefc66d9d8ffbd8 Source1: ypbind.init Source2: yp.conf -Patch0: %{name}-pthread.patch -Patch1: %{name}-broadcast.patch -Patch2: %{name}-dbus.patch +Patch0: %{name}-broadcast.patch URL: http://www.linux-nis.org/ -BuildRequires: autoconf -BuildRequires: automake +BuildRequires: autoconf >= 2.50 +BuildRequires: automake >= 1.6 BuildRequires: bison -BuildRequires: dbus-devel -BuildRequires: dbus-glib-devel -BuildRequires: gettext-tools +BuildRequires: docbook-dtd43-xml +BuildRequires: gettext-tools >= 0.19 +BuildRequires: libnsl-devel >= 1.0.4 +BuildRequires: libtirpc-devel >= 1.0.1 +BuildRequires: libxslt-progs +BuildRequires: pkgconfig BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: systemd-devel >= 1:209 +BuildRequires: tar >= 1:1.22 +BuildRequires: xz Requires(post,preun): /sbin/chkconfig +Requires: libnsl >= 1.0.4 +Requires: libtirpc >= 1.0.1 Requires: nss_nis -Requires: portmap Requires: rc-scripts >= 0.4.1.5 +Requires: rpcbind Requires: yp-tools Provides: ypbind Obsoletes: ypbind @@ -76,19 +83,15 @@ agirem como clientes NIS. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 - -cat m4/jh_path_xml_catalog.m4 >> acinclude.m4 -rm -rf m4 %build %{__gettextize} -%{__aclocal} +%{__aclocal} -I m4 %{__autoconf} +%{__autoheader} %{__automake} -%configure \ - --disable-slp +%configure + %{__make} %install @@ -120,7 +123,8 @@ fi %defattr(644,root,root,755) %doc README %attr(755,root,root) %{_sbindir}/ypbind -%attr(754,root,root) /etc/rc.d/init.d/* +%attr(754,root,root) /etc/rc.d/init.d/ypbind %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/yp.conf -%{_mandir}/man[58]/* +%{_mandir}/man5/yp.conf.5* +%{_mandir}/man8/ypbind.8* %dir /var/yp/binding -- 2.44.0