From: Neil Brown Subject: [PATCH] - Adjust man pages for mountd/statd to match configuration options. Date: Tue, 30 Oct 2007 12:34:37 +1100 Message-ID: <18214.35373.27736.378763@notabene.brown> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Steve Dickson To: nfs@lists.sourceforge.net Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2-new.sourceforge.net with esmtp (Exim 4.43) id 1Img09-0007eh-NY for nfs@lists.sourceforge.net; Mon, 29 Oct 2007 18:34:41 -0700 Received: from ns2.suse.de ([195.135.220.15] helo=mx2.suse.de) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1Img0E-0006tP-Pw for nfs@lists.sourceforge.net; Mon, 29 Oct 2007 18:34:47 -0700 List-Id: "Discussion of NFS under Linux development, interoperability, and testing." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfs-bounces@lists.sourceforge.net Errors-To: nfs-bounces@lists.sourceforge.net Someone mentioned to me that if you configure nfs-utils without TCP_WRAPPERS, the man pages still say it is available. This sort of thing has bothered me on and off before so I thought I would do something about it. i.e. modify the man pages based on the config. The following git-patch does this, but I would welcome review as I'm not a very experiences automake hacker. Running "autogen.sh" reports: utils/mountd/Makefile.am:29: `%'-style pattern rules are a GNU make extension utils/statd/Makefile.am:66: `%'-style pattern rules are a GNU make extension Should we care? Is there a better way? NeilBrown (patch can be cherry-picked from git://neil.brown.name/nfs-utils/) >From be806a06d414603e0930c61d1576d47f46ff064c Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 30 Oct 2007 12:18:34 +1100 Subject: [PATCH] Make man pages configurable and exclude TCP_WRAPPERS notes where appropriate. This patch makes mountd.man and statd.man able to be modified based on configuration, and removes the TCP_WRAPPERS section when that feature is not configured in. --- aclocal/tcp-wrappers.m4 | 1 + utils/mountd/Makefile.am | 10 ++++++++++ utils/mountd/{mountd.man => mountd.man.in} | 2 ++ utils/statd/Makefile.am | 10 ++++++++++ utils/statd/{statd.man => statd.man.in} | 2 ++ 5 files changed, 25 insertions(+), 0 deletions(-) rename utils/mountd/{mountd.man => mountd.man.in} (99%) rename utils/statd/{statd.man => statd.man.in} (99%) diff --git a/aclocal/tcp-wrappers.m4 b/aclocal/tcp-wrappers.m4 index 35ac8e0..d76c65d 100644 --- a/aclocal/tcp-wrappers.m4 +++ b/aclocal/tcp-wrappers.m4 @@ -51,4 +51,5 @@ AC_DEFUN([AC_TCP_WRAPPERS],[ AC_SUBST(LIBWRAP) AC_SUBST(HAVE_LIBWRAP) AC_SUBST(HAVE_TCP_WRAPPER) + AM_CONDITIONAL(USE_TCP_WRAPPERS, [test $HAVE_TCP_WRAPPER = 1]) ]) diff --git a/utils/mountd/Makefile.am b/utils/mountd/Makefile.am index 1e76cf8..63a441b 100644 --- a/utils/mountd/Makefile.am +++ b/utils/mountd/Makefile.am @@ -19,6 +19,16 @@ mountd_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \ MAINTAINERCLEANFILES = Makefile.in +MAN_SED = +if USE_TCP_WRAPPERS +MAN_SED += -e 's/USE_TCP_WRAP/yes/' +else +MAN_SED += -e 's/USE_TCP_WRAP/no/' +endif + +%.man : %.man.in + sed $(MAN_SED) < $< > $@ + ####################################################################### # The following allows the current practice of having # daemons renamed during the install to include RPCPREFIX diff --git a/utils/mountd/mountd.man b/utils/mountd/mountd.man.in similarity index 99% rename from utils/mountd/mountd.man rename to utils/mountd/mountd.man.in index 4276663..6ed1bef 100644 --- a/utils/mountd/mountd.man +++ b/utils/mountd/mountd.man.in @@ -166,6 +166,7 @@ the server. Note that the 'primary' group id is not affected so a command on the client will still be effective. This function requires a Linux Kernel with version at least 2.6.21. +.if 'USE_TCP_WRAP'no' .ig .SH TCP_WRAPPERS SUPPORT This .B rpc.mountd @@ -187,6 +188,7 @@ For further information please have a look at the and .BR hosts_access (5) manual pages. +.. .SH SEE ALSO .BR rpc.nfsd (8), diff --git a/utils/statd/Makefile.am b/utils/statd/Makefile.am index 8a3ba4e..2efb9f9 100644 --- a/utils/statd/Makefile.am +++ b/utils/statd/Makefile.am @@ -56,6 +56,16 @@ MAINTAINERCLEANFILES = Makefile.in CLEANFILES = $(GENFILES) +MAN_SED = +if USE_TCP_WRAPPERS +MAN_SED += -e 's/USE_TCP_WRAP/yes/' +else +MAN_SED += -e 's/USE_TCP_WRAP/no/' +endif + +%.man : %.man.in + sed $(MAN_SED) < $< > $@ + ####################################################################### # The following allows the current practice of having # daemons renamed during the install to include RPCPREFIX diff --git a/utils/statd/statd.man b/utils/statd/statd.man.in similarity index 99% rename from utils/statd/statd.man rename to utils/statd/statd.man.in index e8be9f3..d30159c 100644 --- a/utils/statd/statd.man +++ b/utils/statd/statd.man.in @@ -144,6 +144,7 @@ to print out version information and exit. +.if 'USE_TCP_WRAP'no' .ig .SH TCP_WRAPPERS SUPPORT This .B rpc.statd @@ -165,6 +166,7 @@ For further information please have a look at the and .BR hosts_access (5) manual pages. +.. .SH SIGNALS .BR SIGUSR1 -- 1.5.3.4 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs