bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Disable NFS translator & daemon when Sun RPC support is miss


From: Ludovic Courtès
Subject: Re: [PATCH] Disable NFS translator & daemon when Sun RPC support is missing
Date: Fri, 04 Nov 2011 21:40:32 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)

Hi Thomas,

Thanks for the quick reply.

Thomas Schwinge <thomas@schwinge.name> skribis:

> On Thu, 03 Nov 2011 23:12:52 +0100, ludo@gnu.org (Ludovic 
> =?iso-8859-1?Q?Court=E8s?=) wrote:
>> The patch below disables building of the NFS translator and daemon when
>> Sun/ONC RPC support is missing, as is the case with GNU libc 2.14+, and
>> until TI-RPC actually is actually buildable on GNU.
>> 
>> OK to apply?
>
> Thanks, and generally OK; some minor comments though.
>
> (And I'm assuming you have tested this.)

I did.

>> +# Whether TI-RPC or GNU libc's RPC support is available.
>> +HAVE_SUN_RPC = @HAVE_SUN_RPC@
>
> Let's just say ``Sun RPC'', or what is the proper name?

The historical name is “Sun RPC”; the standard but less widely used name
is “ONC RPC”: <http://tools.ietf.org/html/rfc1831.html>.

>> diff --git a/configure.in b/configure.in
>> index 1cf4daa..283e52c 100644
>> --- a/configure.in
>> +++ b/configure.in
>
> Will also need to commit an updated configure file in the same patch
> (removing the automatically regeneratable files is worth a different
> patch).

In the same patch, OK (I’d have done it in a separate patch to improve
readability and cherry-pickability.)

>> +# Check for Sun RPC headers.  Sun RPC support is no longer available
>> +# starting from GNU libc 2.14 and will be provided by TI-RPC.
>> +# However TI-RPC has yet to be ported to GNU/Hurd:
>> +# see <http://lists.debian.org/debian-hurd/2010/12/msg00007.html>.
>
> I suggest to move the ``Sun RPC support is no longer [...]'' text into
> (the largely outdated) README.CVS file, where other build requirements
> are documented.  As in the config.make.in hunk, we don't need
> specifically glibc or TI-RPC RPC support, but just some Sun RPC
> implementation.

OK.

>> +AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no])
>> +AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no])
>> +AC_SUBST([HAVE_SUN_RPC])
>
> In the TI-RPC case, we will need to link against an additional library, I
> assume?

Yes.

> If yes, are you able to make an educated guess and add support for
> that already now, to have it added to nfs and nfsd's link command
> lines?  (So that it'll just work once TI-RPC is built, and we don't
> have to revisit this issue then.)

TI-RPC has a pkg-config file but I thought we’d rather add a
PKG_CHECK_MODULES when we know TI-RPC is actually usable.  Until then,
just bailing out like this seemed reasonable.  WDYT?

> In that case also change the text above to ``Check for Sun RPC headers
> and libraries''.  Compare to PARTED_LIBS handling, but without the
> PARTED_FAIL stuff.  (Just no nfs and nfsd if no RPC implementation can
> be found.)

OK.

Below is an updated patch.

Thanks!

Ludo’.

diff --git a/Makefile b/Makefile
index ad187d0..e0ba052 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #
 #   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004,
-#   2006, 2009 Free Software Foundation, Inc.
+#   2006, 2009, 2011 Free Software Foundation, Inc.
 #
 #   This program is free software; you can redistribute it and/or
 #   modify it under the terms of the GNU General Public License as
@@ -35,13 +35,17 @@ lib-subdirs = libshouldbeinlibc libihash libiohelp libports 
libthreads \
 
 # Hurd programs
 prog-subdirs = auth proc exec init term \
-              ufs ext2fs isofs nfs tmpfs fatfs \
+              ufs ext2fs isofs tmpfs fatfs \
               storeio pflocal pfinet defpager mach-defpager \
-              login daemons nfsd boot console \
+              login daemons boot console \
               hostmux usermux ftpfs trans \
               console-client utils sutils ufs-fsck ufs-utils \
               benchmarks fstests
 
+ifeq ($(HAVE_SUN_RPC),yes)
+prog-subdirs += nfs nfsd
+endif
+
 # Other directories
 other-subdirs = hurd doc config release include
 
diff --git a/README.CVS b/README.CVS
index 781acde..92a2392 100644
--- a/README.CVS
+++ b/README.CVS
@@ -17,6 +17,13 @@ GNU Mach     at least 1.3
 GNU C library  CVS from 2004-03-09 or later
 GNU C compiler at least 3.3.2
 
+Optionally, a Sun RPC implementation is needed to build the NFS
+translator and daemon:
+
+GNU C library   at most 2.13
+TI-RPC          (currently fails to build on GNU, see
+                 <http://lists.debian.org/debian-hurd/2010/12/msg00007.html>.)
+
 Obviously, you also need somewhat recent versions of binutils, make,
 bash and some other tools.  No hard requirements are currently known
 for these, though.
diff --git a/config.make.in b/config.make.in
index 986ea2a..beb89d1 100644
--- a/config.make.in
+++ b/config.make.in
@@ -66,6 +66,9 @@ PARTED_LIBS = @PARTED_LIBS@
 LIBNCURSESW = @LIBNCURSESW@
 NCURSESW_INCLUDE = @NCURSESW_INCLUDE@
 
+# Whether Sun RPC support is available.
+HAVE_SUN_RPC = @HAVE_SUN_RPC@
+
 # Installation tools.
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/configure.in b/configure.in
index 1cf4daa..635242d 100644
--- a/configure.in
+++ b/configure.in
@@ -230,6 +230,11 @@ AC_MSG_RESULT($boot_store_types)
 # Check for ncursesw, which is needed for the console-curses client.
 hurd_LIB_NCURSESW
 
+# Check for Sun RPC headers and library.
+AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no])
+AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no])
+AC_SUBST([HAVE_SUN_RPC])
+
 if test -f ./$ac_unique_file; then
   # Configuring in source directory; don't create any Makefiles.
   makefiles=

reply via email to

[Prev in Thread] Current Thread [Next in Thread]