From fd0e3c2bcef7f876c9f21a4789d6a72c5c865d4b Mon Sep 17 00:00:00 2001 From: Matej Muzila Date: Thu, 7 Jun 2018 16:51:39 +0200 Subject: [PATCH] Fix man pages --- ypbind-2.5-helpman.patch | 148 ++++++++++++++++++++++++++++++++++++ ypbind-helpman.patch | 160 --------------------------------------- ypbind.spec | 9 ++- 3 files changed, 154 insertions(+), 163 deletions(-) create mode 100644 ypbind-2.5-helpman.patch delete mode 100644 ypbind-helpman.patch diff --git a/ypbind-2.5-helpman.patch b/ypbind-2.5-helpman.patch new file mode 100644 index 0000000..1d5c663 --- /dev/null +++ b/ypbind-2.5-helpman.patch @@ -0,0 +1,148 @@ +diff -up ypbind-mt-2.5/man/ypbind.8.xml.helpman ypbind-mt-2.5/man/ypbind.8.xml +--- ypbind-mt-2.5/man/ypbind.8.xml.helpman 2018-06-04 15:30:38.000000000 +0200 ++++ ypbind-mt-2.5/man/ypbind.8.xml 2018-06-07 16:16:56.967024495 +0200 +@@ -39,21 +39,33 @@ + + + ypbind +- -c +- -d -debug +- -verbose +- -n -forground +- -broadcast +- -broken-server +- -ypset +- -ypsetme +- -no-ping ++ ++ -broadcast ++ -ypset ++ -ypsetme ++ + -f configfile ++ -no-ping ++ -broken-server + -local-only +- -ping-interval ping-interval ++ ++ ++ -ping-interval ping-interval ++ -i ping-interval ++ ++ ++ -d -debug ++ -v -verbose ++ -n -foreground ++ -p port + + + ypbind ++ -c ++ -f configfile ++ ++ ++ ypbind + --version + + +@@ -88,6 +100,8 @@ + + Unless the option + ++or ++ + is used, ypbind detaches itself from the controlling terminal and puts + itself into background. + ypbind +@@ -132,6 +146,57 @@ If the file does not exist or if there a + ypbind + exit. + ++ ++In Fedora we use systemd for starting services. We need to finish starting ++process of ypbind service not before service is fully ++started, which means ypbind daemon is prepared to answer. ++There is a test script /usr/libexec/ypbind-post-waitbind ++used in ypbind.service, that waits for ypbind daemon to be ++fully connected to NIS server and waits by default up to 45s. Sometimes this ++is not enough, because network set up can take longer than 45s during boot, so ++starting ypbind.service fails. User can increase the timeout by setting an ++environment variable NISTIMEOUT in /etc/sysconfig/ypbind. ++For example NISTIMEOUT=180 means ypbind will wait up to 180 ++seconds for binding to a NIS server. Another option is to enable ++NetworkManager-wait- online.service, which will make ypbind ++to wait until network is properly set up. ++ ++ ++ ++In case something needs to be changed in the ypbind.service, it is adviced not ++to change the ypbind.service directly, but rather to create a new file under ++/etc/systemd/system/ypbind.service.d/, i.e. if we need to ++start ypbind before service foo.service, we can create file ++/etc/systemd/system/ypbind.service.d/wait-foo.conf with ++the following content: ++ ++ ++ ++ ++[Service] ++Before=foo.service ++ ++ ++ ++If you need to pass other arguments to ypbind daemon withing ++systemd unit file, you can set these arguments as OTHER_YPBIND_OPTS environment ++variable in /etc/sysconfig/ypbind. For example in order to ++set a fixed port ypbind should run on, you can specify ++OTHER_YPBIND_OPTS="-p 876" in /etc/sysconfig/ypbind. ++ ++ ++ ++DHCP client by defualt changes /etc/yp.conf in case DHCP ++server sends NIS configuration in the respond. In that case ++/etc/dhcp/dhclient.d/nis.sh changes ++/etc/yp.conf according such configuration and creates a ++back-up copy of the original configuration file into ++/var/lib/dhclient/nis.conf.predhclient.$interface. In ++order to disable changing /etc/yp.conf by DHCP client, add ++PEERNIS=no into /etc/sysconfig/network. ++ ++ ++ + + + +@@ -256,6 +321,15 @@ With this options another frequency in s + + + ++ port ++ ++Lets ++ypbind ++listen on a specified port number, rather than asking portmapper to assingn a ++port for it. ++ ++ ++ + + + Prints the version number +diff -up ypbind-mt-2.5/man/yp.conf.5.xml.helpman ypbind-mt-2.5/man/yp.conf.5.xml +--- ypbind-mt-2.5/man/yp.conf.5.xml.helpman 2018-06-07 16:29:01.853560699 +0200 ++++ ypbind-mt-2.5/man/yp.conf.5.xml 2018-06-07 16:33:59.302833043 +0200 +@@ -97,6 +97,14 @@ + first the given servers before falling back to broadcasting + for a running server. + ++ ++ Content of /etc/yp.conf can be changed by DHCP client, ++ for more info see ++ ++ ypbind ++ 8 ++ . ++ + + + diff --git a/ypbind-helpman.patch b/ypbind-helpman.patch deleted file mode 100644 index a02af07..0000000 --- a/ypbind-helpman.patch +++ /dev/null @@ -1,160 +0,0 @@ -diff -up ypbind-mt-1.37.2/man/ypbind.8.helpman ypbind-mt-1.37.2/man/ypbind.8 ---- ypbind-mt-1.37.2/man/ypbind.8.helpman 2013-11-06 16:02:42.000000000 +0100 -+++ ypbind-mt-1.37.2/man/ypbind.8 2014-08-15 10:40:21.261195488 +0200 -@@ -31,9 +31,11 @@ - ypbind \- NIS binding process - .SH "SYNOPSIS" - .HP \w'\fBypbind\fR\ 'u --\fBypbind\fR [\-c] [\-d | \-debug] [\-verbose] [\-n | \-forground] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-rebind\-interval] [\-no\-dbus] -+\fBypbind\fR [\-broadcast\ |\ \-ypset\ |\ \-ypsetme] [\-c] [\-f\ \fIconfigfile\fR] [\-no\-ping] [\-broken\-server] [\-local\-only] [\-i\ |\ \-ping\-interval\ \fIping\-interval\fR] [\-r\ |\ \-rebind\-interval\ \fIrebind\-interval\fR] [\-d\ |\ \-debug] [\-v\ |\ \-verbose] [\-n\ |\ \-foreground] [\-p\ \fIport\fR] [\-log\ \fIlog\-options\fR] [\-no\-dbus] - .HP \w'\fBypbind\fR\ 'u - \fBypbind\fR \-\-version -+.HP \w'\fBypbind\fR\ 'u -+\fBypbind\fR \-\-help - .SH "DESCRIPTION" - .PP - \fBypbind\fR -@@ -58,6 +60,8 @@ will send a ping to all servers and bind - .PP - Unless the option - \fB\-debug\fR -+or -+\fB\-foreground\fR - is used, ypbind detaches itself from the controlling terminal and puts itself into background\&. - \fBypbind\fR - uses -@@ -103,7 +107,64 @@ will behave as usual and assumes there i - \fBypbind\fR - will reread all configuration files, registers at the local portmapper and try to search NIS servers\&. If NetworkManager drops a connection, - \fBypbind\fR --will unregister from portmapper\&. -+will unregister from portmapper\&. Option -+\fB\-no\-dbus\fR -+disables this feature and -+\fBypbind\fR -+behaves like no NetworkManager is running at startup. Also in case one of the NIS servers -+\fBypbind\fR -+is configured to connect to is a localhost, -+\fBypbind\fR -+behaves like it is a working network connection. -+.PP -+In Fedora we use -+\fBsystemd\fR -+for starting services. We need to finish starting process of -+\fBypbind\fR -+service not before service is fully started, which means -+\fBypbind\fR -+daemon is prepared to answer. There is a test script /usr/libexec/ypbind-post-waitbind used in -+\fBypbind.service\fR, -+that waits for -+\fBypbind\fR -+daemon to be fully connected to NIS server and waits by default up to 45s. Sometimes this is not enough, because network set up can take longer than 45s during boot, so starting -+\fBypbind.service\fR -+fails. User can increase the -+\fBtimeout\fR -+by setting an environment variable -+\fBNISTIMEOUT\fR -+in /etc/sysconfig/ypbind. For example NISTIMEOUT=180 means ypbind will wait up to 180 seconds for binding to a NIS server. -+Another option is to enable NetworkManager-wait-online.service, which will make -+\fBypbind\fR -+to wait until network is properly set up. -+.PP -+In case something needs to be changed in the -+\fBypbind.service\fR, -+it is adviced not to change the -+\fBypbind.service\fR -+directly, but rather to create a new file under /etc/systemd/system/ypbind.service.d/\&, i.e. if we need to start -+\fBypbind\fR -+before service foo.service, we can create file /etc/systemd/system/ypbind.service.d/wait-foo.conf with the following content: -+ -+ [Service] -+ Before=foo.service -+.PP -+If you need to pass other arguments to -+\fBypbind\fR -+daemon withing systemd unit file, you can set these arguments as -+\fBOTHER_YPBIND_OPTS\fR -+environment variable in /etc/sysconfig/ypbind. For example in order to set a fixed port ypbind should run on, you can specify OTHER_YPBIND_OPTS="-p 876" in /etc/sysconfig/ypbind\&. -+.PP -+DHCP client by defualt changes -+\fB/etc/yp.conf\fR -+in case DHCP server sends NIS configuration in the respond. In that case /etc/dhcp/dhclient.d/nis.sh changes -+\fB/etc/yp.conf\fR -+according such configuration and creates a back\-up copy of the original configuration file into /var/lib/dhclient/nis.conf.predhclient.$interface. -+In order to disable changing -+\fB/etc/yp.conf\fR -+by DHCP client, add -+\fBPEERNIS=no\fR -+into /etc/sysconfig/network. - .SH "OPTIONS" - .PP - \fB\-broadcast\fR -@@ -200,6 +261,15 @@ The default value for - to check, if a NIS server is still reachable, is 20 seconds\&. With this options another frequency in seconds can be specified\&. - .RE - .PP -+\fB\-p port\fR -+.RS 4 -+Lets -+\fBypbind\fR -+listen on a specified -+\fBport\fR -+number, rather than asking portmapper to assing a port for it\&. -+.RE -+.PP - \fB\-r\fR, \fB\-rebind\-interval\fR - .RS 4 - The default value for -@@ -207,6 +277,13 @@ The default value for - to search for the fastest NIS server is 900 seconds (15 minutes)\&. With this options another frequency in seconds can be specified\&. - .RE - .PP -+\fB\-log\fR log\-options -+.RS 4 -+Allows to log special events\&. -+\fBlog\-options\fR -+is a logical sum of values for particular events \- 1 for logging rpc calls, 2 for logging broken server calls, 4 for logging server changes\&. -+.RE -+.PP - \fB\-no\-dbus\fR - .RS 4 - Disables DBUS support if compiled in\&. -diff -up ypbind-mt-1.37.2/man/yp.conf.5.helpman ypbind-mt-1.37.2/man/yp.conf.5 ---- ypbind-mt-1.37.2/man/yp.conf.5.helpman 2013-04-09 14:31:05.000000000 +0200 -+++ ypbind-mt-1.37.2/man/yp.conf.5 2014-08-15 10:38:21.610870737 +0200 -@@ -74,6 +74,10 @@ If no other server is given or all of th - If for a specific domain the broadcast option and fixed server are given, - \fBypbind\-mt\fR - tries at first the given servers before falling back to broadcasting for a running server\&. -+.PP -+Content of -+\fB/etc/yp.conf\fR -+can be changed by DHCP client, for more info see \fBypbind\fR(8). - .SH "SEE ALSO" - .PP - \fBypbind\fR(8) -diff -up ypbind-mt-1.37.2/src/ypbind-mt.c.helpman ypbind-mt-1.37.2/src/ypbind-mt.c ---- ypbind-mt-1.37.2/src/ypbind-mt.c.helpman 2013-04-09 16:03:47.000000000 +0200 -+++ ypbind-mt-1.37.2/src/ypbind-mt.c 2014-08-15 10:38:21.610870737 +0200 -@@ -513,12 +513,17 @@ usage (int ret) - output = stdout; - - fputs (_("Usage:\n"), output); -- fputs (_("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile]\n\t [-no-ping] [-broken-server] [-local-only] [-i ping-interval]\n\t [-r rebind-interval] [-debug] [-verbose] [-n | -foreground]\n"), output); -+ fputs ("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile] [-no-ping]\n" -+ "\t [-broken-server] [-local-only] [-i | -ping-interval ping-interval]\n" -+ "\t [-r | -rebind-interval rebind-interval] [-d | -debug] [-v | -verbose]\n" -+ "\t [-n | -foreground] [-p port] [-log log-options]", output); - #ifdef USE_DBUS_NM -- fputs (_("\t [-no-dbus]\n"), output); -+ fputs (" [-no-dbus]", output); - #endif -- fputs (_("\typbind -c [-f configfile]\n"), output); -- fputs (_("\typbind --version\n"), output); -+ fputs ("\n", output); -+ fputs ("\typbind -c [-f configfile]\n", output); -+ fputs ("\typbind --version\n", output); -+ fputs ("\typbind --help\n", output); - exit (ret); - } - diff --git a/ypbind.spec b/ypbind.spec index 6b4f8eb..575fce8 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -2,7 +2,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Epoch: 3 Version: 2.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: https://github.com/thkukuk/ypbind-mt/archive/v%{version}.tar.gz#/ypbind-mt-%{version}.tar.gz @@ -16,7 +16,7 @@ Source5: ypbind-post-waitbind # 'ypbind-mt' would allow us to drop it. Patch1: ypbind-1.11-gettextdomain.patch # Not sent to upstream. -Patch2: ypbind-helpman.patch +Patch2: ypbind-2.5-helpman.patch Patch3: ypbind-systemdso.patch Patch4: ypbind-2.4-gettext_version.patch # This is for /bin/systemctl @@ -56,7 +56,7 @@ also need to install the ypserv package to a machine on your network. %prep %setup -q -n ypbind-mt-%{version} %patch1 -p1 -b .gettextdomain -#%patch2 -p1 -b .helpman +%patch2 -p1 -b .helpman #%patch3 -p1 -b .systemdso %patch4 -b .gettext_version @@ -112,6 +112,9 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind %license COPYING %changelog +* Thu Jun 07 2018 Matej Mužila - 3:2.5-2 +- Fix man pages + * Tue Jun 05 2018 Matej Mužila - 3:2.5-1 - Update to version 2.5