[Glibc-bsd-commits] r3509 - in trunk/freebsd-utils/debian: . local/include local/include/netinet patches

Robert Millan rmh at alioth.debian.org
Wed Jun 29 15:15:27 UTC 2011


Author: rmh
Date: 2011-06-29 15:15:27 +0000 (Wed, 29 Jun 2011)
New Revision: 3509

Added:
   trunk/freebsd-utils/debian/freebsd-nfs-client.install
   trunk/freebsd-utils/debian/freebsd-nfs-client.manpages
   trunk/freebsd-utils/debian/freebsd-nfs-client.nfsiod.init
   trunk/freebsd-utils/debian/freebsd-nfs-common.install
   trunk/freebsd-utils/debian/freebsd-nfs-common.manpages
   trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.lockd.init
   trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.statd.init
   trunk/freebsd-utils/debian/freebsd-nfs-server.install
   trunk/freebsd-utils/debian/freebsd-nfs-server.manpages
   trunk/freebsd-utils/debian/freebsd-nfs-server.mountd.init
   trunk/freebsd-utils/debian/freebsd-nfs-server.nfsd.init
   trunk/freebsd-utils/debian/local/include/netinet/
   trunk/freebsd-utils/debian/local/include/netinet/in.h
   trunk/freebsd-utils/debian/patches/035_nfs.diff
   trunk/freebsd-utils/debian/patches/036_nfs_glibc.diff
Modified:
   trunk/freebsd-utils/debian/changelog
   trunk/freebsd-utils/debian/control
   trunk/freebsd-utils/debian/copyright
   trunk/freebsd-utils/debian/freebsd-utils.manpages
   trunk/freebsd-utils/debian/patches/series
   trunk/freebsd-utils/debian/rules
Log:
Add NFS client and server support packages.  (Closes: #629543)

Modified: trunk/freebsd-utils/debian/changelog
===================================================================
--- trunk/freebsd-utils/debian/changelog	2011-06-29 14:18:51 UTC (rev 3508)
+++ trunk/freebsd-utils/debian/changelog	2011-06-29 15:15:27 UTC (rev 3509)
@@ -1,3 +1,9 @@
+freebsd-utils (8.2+ds2-1) UNRELEASED; urgency=low
+
+  * Add NFS client and server support packages.  (Closes: #629543)
+
+ -- Robert Millan <rmh at debian.org>  Wed, 29 Jun 2011 17:14:59 +0200
+
 freebsd-utils (8.2+ds1-2) unstable; urgency=low
 
   * Fix broken usb.conf.  It needs to be generated using usbdevs from

Modified: trunk/freebsd-utils/debian/control
===================================================================
--- trunk/freebsd-utils/debian/control	2011-06-29 14:18:51 UTC (rev 3508)
+++ trunk/freebsd-utils/debian/control	2011-06-29 15:15:27 UTC (rev 3509)
@@ -5,7 +5,7 @@
 Uploaders: Aurelien Jarno <aurel32 at debian.org>, Guillem Jover <guillem at debian.org>, Robert Millan <rmh at debian.org>
 Build-Depends: debhelper (>= 7), po-debconf, freebsd-buildutils, sharutils,
  flex | flex-old,
- kfreebsd-kernel-headers (>= 0.54),
+ kfreebsd-kernel-headers (>= 0.56),
 # libc0.1-dev (>= 2.11.2-3): ifconfig
  libc0.1-dev (>= 2.11.2-3),
  libbsd-dev (>= 0.3.0), pkg-config,
@@ -24,13 +24,15 @@
 # libgeom-dev : ccdconfig
  libgeom-dev,
 # libsbuf-dev: ifconfig, mdconfig
- libsbuf-dev (>= 8.2), libsbuf-dev (>= 8.2-2) | kfreebsd-kernel-headers (<< 0.56),
+ libsbuf-dev (>= 8.2-2),
 # libcam-dev: camcontrol
  libcam-dev (>= 8.2),
 # libedit-dev: pppctl
  libedit-dev,
 # libexpat1-dev: ifconfig
  libexpat1-dev,
+# libtirpc-dev: mount_nfs, mountd, nfsd, rpc.lockd, rpc.statd
+ libtirpc-dev,
 Vcs-Browser: http://svn.debian.org/wsvn/glibc-bsd/trunk/freebsd-utils/
 Vcs-Svn: svn://svn.debian.org/glibc-bsd/trunk/freebsd-utils/
 Standards-Version: 3.9.2
@@ -118,6 +120,37 @@
  .
  This is a minimal package for use in debian-installer.
 
+Package: freebsd-nfs-client
+Section: net
+Priority: standard
+Architecture: kfreebsd-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: freebsd-nfs-common
+Replaces: freebsd-utils (<= 8.2+ds1-1)
+Description: FreeBSD client utility needed for NFS on GNU/kFreeBSD
+ This package provides FreeBSD client utility needed for NFS on
+ Debian GNU/kFreeBSD.
+
+Package: freebsd-nfs-server
+Section: net
+Priority: optional
+Architecture: kfreebsd-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, freebsd-nfs-common
+Provides: nfs-server, nfs-kernel-server
+Description: FreeBSD server utilities needed for NFS on GNU/kFreeBSD
+ This package provides FreeBSD utilities needed for NFS server on
+ Debian GNU/kFreeBSD.
+
+Package: freebsd-nfs-common
+Section: net
+Priority: standard
+Architecture: kfreebsd-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, rpcbind
+Provides: nfs-common
+Description: NFS support files common to client and server
+ Use this package on any machine that uses NFS, either as client or
+ server.
+
 # FIXME:
 # - add jail
 # - add ppp (ppp, pppd)

Modified: trunk/freebsd-utils/debian/copyright
===================================================================
--- trunk/freebsd-utils/debian/copyright	2011-06-29 14:18:51 UTC (rev 3508)
+++ trunk/freebsd-utils/debian/copyright	2011-06-29 15:15:27 UTC (rev 3509)
@@ -2846,3 +2846,234 @@
     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    
+    --
+
+    Copyright (C) 1986 Sun Microsystems, Inc.
+
+    Copyr 1987 Sun Micro
+    
+    Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+    unrestricted use provided that this legend is included on all tape
+    media and as a part of the software program in whole or part.  Users
+    may copy or modify Sun RPC without charge, but are not authorized
+    to license or distribute it to anyone else except as part of a product or
+    program developed by the user.
+    
+    SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+    WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+    
+    Sun RPC is provided with no support and without any obligation on the
+    part of Sun Microsystems, Inc. to assist in its use, correction,
+    modification or enhancement.
+    
+    SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+    INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+    OR ANY PART THEREOF.
+    
+    In no event will Sun Microsystems, Inc. be liable for any lost revenue
+    or profits or other special, indirect and consequential damages, even if
+    Sun has been advised of the possibility of such damages.
+    
+    Sun Microsystems, Inc.
+    2550 Garcia Avenue
+    Mountain View, California  94043
+
+    --
+
+    @(#) Copyright (c) 1989, 1993
+    	The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1989, 1993
+         The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1989, 1991, 1993
+        The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1992, 1993
+        The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1994
+         The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1994
+         The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1995
+         The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1989, 1991, 1993
+        The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1992, 1993, 1994, 1995
+        The Regents of the University of California.  All rights reserved.
+
+    Copyright (c) 1989, 1993
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1992, 1993, 1994
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1989, 1993, 1995
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1989, 1993
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1989, 1993, 1994
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1989, 1993, 1995
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1989, 1991, 1993
+        The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Rick Macklem at The University of Guelph.
+
+    Copyright (c) 1989, 1993
+         The Regents of the University of California.  All rights reserved.
+    
+    This code is derived from software contributed to Berkeley by
+    Herb Hasler and Rick Macklem at The University of Guelph.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    4. Neither the name of the University nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+    
+    THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+    --
+
+    Copyright (c) 2008 Isilon Inc http://www.isilon.com/
+    Authors: Doug Rabson <dfr at rabson.org>
+    Developed with Red Inc: Alfred Perlstein <alfred at freebsd.org>
+
+    Copyright (c) 1999 Martin Blapp
+    All rights reserved.
+
+    Copyright (c) 2009 Rick Macklem, University of Guelph
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    
+    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+    --
+
+    Copyright (c) 2001 Andrew P. Lentvorski, Jr.
+    Copyright (c) 2000 Manuel Bouyer.
+
+    Copyright (c) 1995 A.R.Gordon, andrew.gordon at net-tel.co.uk
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    3. All advertising materials mentioning features or use of this software
+       must display the following acknowledgement:
+        This product includes software developed by the University of
+        California, Berkeley and its contributors.
+    4. Neither the name of the University nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+    
+    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+    --
+
+    Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
+    
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+    1. Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    3. Berkeley Software Design Inc's name may not be used to endorse or
+       promote products derived from this software without specific prior
+       written permission.
+    
+    THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``AS IS'' AND
+    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+    ARE DISCLAIMED.  IN NO EVENT SHALL BERKELEY SOFTWARE DESIGN INC BE LIABLE
+    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+    OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.

Added: trunk/freebsd-utils/debian/freebsd-nfs-client.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-client.install	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-client.install	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,2 @@
+sbin/mount_nfs/mount_nfs		/sbin
+sbin/nfsiod/nfsiod			/sbin

Added: trunk/freebsd-utils/debian/freebsd-nfs-client.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-client.manpages	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-client.manpages	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,2 @@
+sbin/mount_nfs/mount_nfs.8
+sbin/nfsiod/nfsiod.8

Added: trunk/freebsd-utils/debian/freebsd-nfs-client.nfsiod.init
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-client.nfsiod.init	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-client.nfsiod.init	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,127 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		nfsiod
+# Required-Start:	$network $local_fs
+# Required-Stop:	$network $local_fs
+# Should-Start:		$syslog
+# Should-Stop:		$syslog
+# Default-Start:	2 3 4 5 S
+# Default-Stop:		0 1 6
+# Short-Description:	local NFS asynchronous I/O server
+### END INIT INFO
+
+PATH=/sbin:/bin
+DESC="local NFS asynchronous I/O server"
+NAME=nfsiod
+DAEMON=/sbin/nfsiod
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

Added: trunk/freebsd-utils/debian/freebsd-nfs-common.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-common.install	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-common.install	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,2 @@
+usr.sbin/rpc.statd/rpc.statd		/usr/sbin
+usr.sbin/rpc.lockd/rpc.lockd		/usr/sbin

Added: trunk/freebsd-utils/debian/freebsd-nfs-common.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-common.manpages	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-common.manpages	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,2 @@
+usr.sbin/rpc.statd/rpc.statd.8
+usr.sbin/rpc.lockd/rpc.lockd.8

Added: trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.lockd.init
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.lockd.init	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.lockd.init	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,125 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		rpc.lockd
+# Required-Start:	rpc.statd $remote_fs
+# Required-Stop:	rpc.statd $remote_fs
+# Default-Start:	2 3 4 5 S
+# Default-Stop:		0 1 6
+# Short-Description:	NFS file locking daemon
+### END INIT INFO
+
+PATH=/sbin:/bin
+DESC="NFS file locking daemon"
+NAME=rpc.lockd
+DAEMON=/usr/sbin/rpc.lockd
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

Added: trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.statd.init
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.statd.init	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-common.rpc.statd.init	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,127 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		rpc.statd
+# Required-Start:	$network $time $remote_fs
+# Required-Stop:	$network $time $remote_fs
+# Should-Start:		$syslog
+# Should-Stop:		$syslog
+# Default-Start:	2 3 4 5 S
+# Default-Stop:		0 1 6
+# Short-Description:	host status monitoring daemon
+### END INIT INFO
+
+PATH=/sbin:/bin
+DESC="host status monitoring daemon"
+NAME=rpc.statd
+DAEMON=/usr/sbin/rpc.statd
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

Added: trunk/freebsd-utils/debian/freebsd-nfs-server.install
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-server.install	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-server.install	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,2 @@
+usr.sbin/mountd/mountd			/usr/sbin
+usr.sbin/nfsd/nfsd			/usr/sbin

Added: trunk/freebsd-utils/debian/freebsd-nfs-server.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-server.manpages	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-server.manpages	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,4 @@
+usr.sbin/mountd/mountd.8
+usr.sbin/mountd/exports.5
+usr.sbin/mountd/netgroup.5
+usr.sbin/nfsd/nfsd.8

Added: trunk/freebsd-utils/debian/freebsd-nfs-server.mountd.init
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-server.mountd.init	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-server.mountd.init	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,127 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		mountd
+# Required-Start:	$network $remote_fs
+# Required-Stop:	$network $remote_fs
+# Should-Start:		$syslog
+# Should-Stop:		$syslog
+# Default-Start:	2 3 4 5 S
+# Default-Stop:		0 1 6
+# Short-Description:	NFS mount request daemon
+### END INIT INFO
+
+PATH=/sbin:/bin
+DESC="NFS mount request daemon"
+NAME=mountd
+DAEMON=/usr/sbin/mountd
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

Added: trunk/freebsd-utils/debian/freebsd-nfs-server.nfsd.init
===================================================================
--- trunk/freebsd-utils/debian/freebsd-nfs-server.nfsd.init	                        (rev 0)
+++ trunk/freebsd-utils/debian/freebsd-nfs-server.nfsd.init	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,131 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		nfsd
+# Required-Start:	$remote_fs rpc.lockd rpc.statd rpcbind $time
+# Required-Stop:	$remote_fs rpc.lockd rpc.statd rpcbind $time
+# Should-Start:		$syslog
+# Should-Stop:		$syslog
+# Default-Start:	2 3 4 5 S
+# Default-Stop:		0 1 6
+# Short-Description:	Kernel NFS server support
+# Description:		NFS is a popular protocol for file sharing across
+#			TCP/IP networks. This service provides NFS server
+#			functionality, which is configured via the
+#			/etc/exports file.
+### END INIT INFO
+
+PATH=/sbin:/bin
+DESC="NFS server"
+NAME=nfsd
+DAEMON=/usr/sbin/nfsd
+DAEMON_ARGS=""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+case "$1" in
+  start)
+    log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+  ;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) log_end_msg 0 ;;
+		2) log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

Modified: trunk/freebsd-utils/debian/freebsd-utils.manpages
===================================================================
--- trunk/freebsd-utils/debian/freebsd-utils.manpages	2011-06-29 14:18:51 UTC (rev 3508)
+++ trunk/freebsd-utils/debian/freebsd-utils.manpages	2011-06-29 15:15:27 UTC (rev 3509)
@@ -17,7 +17,6 @@
 sbin/mount_hpfs/mount_hpfs.8
 sbin/mount/mount.8
 sbin/mount_msdosfs/mount_msdosfs.8
-sbin/mount_nfs/mount_nfs.8
 sbin/mount_ntfs/mount_ntfs.8
 sbin/mount_nullfs/mount_nullfs.8
 sbin/mount_reiserfs/mount_reiserfs.8

Added: trunk/freebsd-utils/debian/local/include/netinet/in.h
===================================================================
--- trunk/freebsd-utils/debian/local/include/netinet/in.h	                        (rev 0)
+++ trunk/freebsd-utils/debian/local/include/netinet/in.h	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,4 @@
+#include_next <netinet/in.h>
+#ifndef IPPORT_MAX
+#define IPPORT_MAX 65535
+#endif

Added: trunk/freebsd-utils/debian/patches/035_nfs.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/035_nfs.diff	                        (rev 0)
+++ trunk/freebsd-utils/debian/patches/035_nfs.diff	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,479 @@
+--- a/sbin/mount_nfs/mount_nfs.c
++++ b/sbin/mount_nfs/mount_nfs.c
+@@ -130,7 +130,6 @@
+ 	TRYRET_LOCALERR		/* Local failure. */
+ };
+ 
+-static int	fallback_mount(struct iovec *iov, int iovlen, int mntflags);
+ static int	sec_name_to_num(char *sec);
+ static char	*sec_num_to_name(int num);
+ static int	getnfsargs(char *, struct iovec **iov, int *iovlen);
+@@ -150,7 +149,6 @@
+ 	int c;
+ 	struct iovec *iov;
+ 	int mntflags, num, iovlen;
+-	int osversion;
+ 	char *name, *p, *spec, *fstype;
+ 	char mntpath[MAXPATHLEN], errmsg[255];
+ 	char hostname[MAXHOSTNAMELEN + 1], *gssname, gssn[MAXHOSTNAMELEN + 50];
+@@ -421,25 +419,14 @@
+ 	build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1);
+ 	build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
+ 
+-	/*
+-	 * XXX:
+-	 * Backwards compatibility routines for older kernels.
+-	 * Remove this and fallback_mount() code when we do not need to support
+-	 * NFS mounts against older kernels which still need
+-	 * struct nfs_args to be passed in via nmount().
+-	 */
+-	osversion = getosreldate();
+-	if (osversion >= 702100) {
+-		if (nmount(iov, iovlen, mntflags))
+-			err(1, "%s, %s", mntpath, errmsg);
+-	} else {
+-		if (fallback_mount(iov, iovlen, mntflags))
++        if (nmount(iov, iovlen, mntflags)) {
+ 			err(1, "%s, %s", mntpath, errmsg);
+ 	}
+ 
+ 	exit(0);
+ }
+ 
++#if 0
+ static int
+ findopt(struct iovec *iov, int iovlen, const char *name,
+     char **valuep, int *lenp)
+@@ -661,16 +648,23 @@
+ 
+ 	return nmount(newiov, newiovlen, mntflags);
+ }
++#endif
+ 
+ static int
+ sec_name_to_num(char *sec)
+ {
++#ifdef RPCSEC_GSS_KRB5
+ 	if (!strcmp(sec, "krb5"))
+ 		return (RPCSEC_GSS_KRB5);
++#endif
++#ifdef RPCSEC_GSS_KRB5I
+ 	if (!strcmp(sec, "krb5i"))
+ 		return (RPCSEC_GSS_KRB5I);
++#endif
++#ifdef RPCSEC_GSS_KRB5P
+ 	if (!strcmp(sec, "krb5p"))
+ 		return (RPCSEC_GSS_KRB5P);
++#endif
+ 	if (!strcmp(sec, "sys"))
+ 		return (AUTH_SYS);
+ 	return (-1);
+@@ -680,12 +674,18 @@
+ sec_num_to_name(int flavor)
+ {
+ 	switch (flavor) {
++#ifdef RPCSEC_GSS_KRB5
+ 	case RPCSEC_GSS_KRB5:
+ 		return ("krb5");
++#endif
++#ifdef RPCSEC_GSS_KRB5I
+ 	case RPCSEC_GSS_KRB5I:
+ 		return ("krb5i");
++#endif
++#ifdef RPCSEC_GSS_KRB5P
+ 	case RPCSEC_GSS_KRB5P:
+ 		return ("krb5p");
++#endif
+ 	case AUTH_SYS:
+ 		return ("sys");
+ 	}
+@@ -830,9 +830,11 @@
+ 	freeaddrinfo(ai_nfs);
+ 
+ 	build_iovec(iov, iovlen, "hostname", nam, (size_t)-1);
++#if 0
+ 	/* Add mounted file system to PATH_MOUNTTAB */
+ 	if (!add_mtab(hostp, spec))
+ 		warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec);
++#endif
+ 	return (1);
+ }
+ 
+--- a/sbin/mount_nfs/Makefile
++++ b/sbin/mount_nfs/Makefile
+@@ -4,6 +4,7 @@
+ 
+ PROG=	mount_nfs
+ SRCS=	mount_nfs.c getmntopts.c mounttab.c
++LDADD=	-ltirpc
+ MAN=	mount_nfs.8
+ MLINKS=	mount_nfs.8 mount_newnfs.8
+ 
+--- a/usr.sbin/mountd/Makefile
++++ b/usr.sbin/mountd/Makefile
+@@ -6,12 +6,12 @@
+ MAN=	exports.5 netgroup.5 mountd.8
+ 
+ MOUNT=  ${.CURDIR}/../../sbin/mount
+-CFLAGS+= -I${MOUNT}
++CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys
+ WARNS?= 2
+ 
+ .PATH: ${MOUNT}
+ 
+ DPADD=	${LIBUTIL}
+-LDADD=	-lutil
++LDADD=	-ltirpc -lbsd
+ 
+ .include <bsd.prog.mk>
+--- a/usr.sbin/mountd/mountd.c
++++ b/usr.sbin/mountd/mountd.c
+@@ -1926,12 +1926,18 @@
+ 
+ 		if (!strcmp(seclist, "sys"))
+ 			flavor = AUTH_SYS;
++#ifdef RPCSEC_GSS_KRB5
+ 		else if (!strcmp(seclist, "krb5"))
+ 			flavor = RPCSEC_GSS_KRB5;
++#endif
++#ifdef RPCSEC_GSS_KRB5I
+ 		else if (!strcmp(seclist, "krb5i"))
+ 			flavor = RPCSEC_GSS_KRB5I;
++#endif
++#ifdef RPCSEC_GSS_KRB5P
+ 		else if (!strcmp(seclist, "krb5p"))
+ 			flavor = RPCSEC_GSS_KRB5P;
++#endif
+ 		else {
+ 			if (cp)
+ 				*cp = savedc;
+--- a/usr.sbin/nfsd/Makefile
++++ b/usr.sbin/nfsd/Makefile
+@@ -3,6 +3,8 @@
+ 
+ PROG=	nfsd
+ MAN=	nfsd.8 nfsv4.4 stablerestart.5
++CFLAGS+= -I${.CURDIR}/../../sys
++LDADD=   -ltirpc -lbsd
+ 
+ WARNS?=	6
+ 
+--- a/usr.sbin/nfsd/nfsd.c
++++ b/usr.sbin/nfsd/nfsd.c
+@@ -849,13 +849,13 @@
+ }
+ 
+ void
+-nonfs(__unused int signo)
++nonfs(int signo)
+ {
+ 	syslog(LOG_ERR, "missing system call: NFS not available");
+ }
+ 
+ void
+-reapchild(__unused int signo)
++reapchild(int signo)
+ {
+ 	pid_t pid;
+ 	int i;
+@@ -890,7 +890,7 @@
+  * Cleanup master after SIGUSR1.
+  */
+ void
+-cleanup(__unused int signo)
++cleanup(int signo)
+ {
+ 	nfsd_exit(0);
+ }
+@@ -899,7 +899,7 @@
+  * Cleanup child after SIGUSR1.
+  */
+ void
+-child_cleanup(__unused int signo)
++child_cleanup(int signo)
+ {
+ 	exit(0);
+ }
+--- a/usr.sbin/rpc.lockd/Makefile
++++ b/usr.sbin/rpc.lockd/Makefile
+@@ -4,24 +4,26 @@
+ PROG=	rpc.lockd
+ MAN=	rpc.lockd.8
+ MLINKS=	rpc.lockd.8 lockd.8
+-SRCS=	kern.c nlm_prot_svc.c lockd.c lock_proc.c lockd_lock.c
++SRCS=	kern.c nlm_prot_svc.c nlm_prot_xdr.c lockd.c lock_proc.c lockd_lock.c sm_inter_xdr.c
+ 
+-CFLAGS+= -I. -I${DESTDIR}/usr/include/rpcsvc
++CFLAGS+= -I. -I${.CURDIR}/../../include/rpcsvc
+ #WARNS?= 2
+ 
+ DPADD=	${LIBRPCSVC} ${LIBUTIL}
+-LDADD=	-lrpcsvc -lutil
++LDADD=	-ltirpc -lbsd
+ 
+-CLEANFILES= nlm_prot_svc.c nlm_prot.h test
++CLEANFILES= nlm_prot_svc.c nlm_prot_xdr.c nlm_prot.h test
+ 
+-RPCSRC= ${DESTDIR}/usr/include/rpcsvc/nlm_prot.x
++RPCSRC= ${.CURDIR}/../../include/rpcsvc/nlm_prot.x
+ RPCGEN= rpcgen -L -C
+ 
++.PATH: ../rpc.statd
++
+ nlm_prot_svc.c: ${RPCSRC}
+ 	${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
+ 
+-nlm_prot.h: ${RPCSRC}
+-	${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
++nlm_prot_xdr.c: ${RPCSRC}
++	${RPCGEN} -c -o ${.TARGET} ${RPCSRC}
+ 
+ test: ${.CURDIR}/test.c
+ 	cc -o test ${.CURDIR}/test.c -lrpcsvc
+--- a/usr.sbin/rpc.lockd/lockd.c
++++ b/usr.sbin/rpc.lockd/lockd.c
+@@ -187,8 +187,7 @@
+ 		kernel_lockd = TRUE;
+ 	}
+ 	if (kernel_lockd) {
+-		if (getosreldate() >= 800040)
+-			kernel_lockd_client = TRUE;
++                kernel_lockd_client = TRUE;
+ 	}
+ 
+ 	(void)rpcb_unset(NLM_PROG, NLM_SM, NULL);
+@@ -807,7 +806,7 @@
+ 		ret = callrpc("localhost", SM_PROG, SM_VERS, SM_UNMON_ALL,
+ 		    (xdrproc_t)xdr_my_id, &id, (xdrproc_t)xdr_sm_stat, &stat);
+ 		if (ret == RPC_PROGUNAVAIL) {
+-			syslog(LOG_WARNING, "%lu %s", SM_PROG,
++			syslog(LOG_WARNING, "%u %s", SM_PROG,
+ 			    clnt_sperrno(ret));
+ 			sleep(2);
+ 			continue;
+@@ -816,7 +815,7 @@
+ 	} while (0);
+ 
+ 	if (ret != 0) {
+-		syslog(LOG_ERR, "%lu %s", SM_PROG, clnt_sperrno(ret));
++		syslog(LOG_ERR, "%u %s", SM_PROG, clnt_sperrno(ret));
+ 		exit(1);
+ 	}
+ 
+--- a/usr.sbin/rpc.lockd/lock_proc.c
++++ b/usr.sbin/rpc.lockd/lock_proc.c
+@@ -770,7 +770,7 @@
+  */
+ void *
+ nlm_cancel_res_1_svc(arg, rqstp)
+-	nlm_res *arg __unused;
++	nlm_res *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	if (debug_level)
+@@ -803,7 +803,7 @@
+  */
+ void *
+ nlm_granted_res_1_svc(arg, rqstp)
+-	nlm_res *arg __unused;
++	nlm_res *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	if (debug_level)
+@@ -902,7 +902,7 @@
+  */
+ void *
+ nlm_free_all_3_svc(arg, rqstp)
+-	nlm_notify *arg __unused;
++	nlm_notify *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	static char dummy;
+@@ -1260,7 +1260,7 @@
+  */
+ void *
+ nlm4_cancel_res_4_svc(arg, rqstp)
+-	nlm4_res *arg __unused;
++	nlm4_res *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	if (debug_level)
+@@ -1275,7 +1275,7 @@
+  */
+ void *
+ nlm4_unlock_res_4_svc(arg, rqstp)
+-	nlm4_res *arg __unused;
++	nlm4_res *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	if (debug_level)
+@@ -1290,7 +1290,7 @@
+  */
+ void *
+ nlm4_granted_res_4_svc(arg, rqstp)
+-	nlm4_res *arg __unused;
++	nlm4_res *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	if (debug_level)
+@@ -1389,7 +1389,7 @@
+  */
+ void *
+ nlm4_free_all_4_svc(arg, rqstp)
+-	struct nlm4_notify *arg __unused;
++	struct nlm4_notify *arg;
+ 	struct svc_req *rqstp;
+ {
+ 	static char dummy;
+@@ -1407,7 +1407,7 @@
+ void *
+ nlm_sm_notify_0_svc(arg, rqstp)
+ 	struct nlm_sm_status *arg;
+-	struct svc_req *rqstp __unused;
++	struct svc_req *rqstp;
+ {
+ 	static char dummy;
+ 	notify(arg->mon_name, arg->state);
+--- a/usr.sbin/rpc.lockd/lockd_lock.c
++++ b/usr.sbin/rpc.lockd/lockd_lock.c
+@@ -1176,8 +1176,8 @@
+ 
+ enum hwlock_status
+ test_hwlock(fl, conflicting_fl)
+-	const struct file_lock *fl __unused;
+-	struct file_lock **conflicting_fl __unused;
++	const struct file_lock *fl;
++	struct file_lock **conflicting_fl;
+ {
+ 
+ 	/*
+@@ -1891,7 +1891,7 @@
+  */
+ 
+ struct nlm4_holder *
+-testlock(struct nlm4_lock *lock, bool_t exclusive, int flags __unused)
++testlock(struct nlm4_lock *lock, bool_t exclusive, int flags)
+ {
+ 	struct file_lock test_fl, *conflicting_fl;
+ 
+@@ -1991,7 +1991,7 @@
+ 
+ /* unlock a filehandle */
+ enum nlm_stats
+-unlock(nlm4_lock *lock, const int flags __unused)
++unlock(nlm4_lock *lock, const int flags)
+ {
+ 	struct file_lock fl;
+ 	enum nlm_stats err;
+@@ -2187,7 +2187,7 @@
+ void
+ send_granted(fl, opcode)
+ 	struct file_lock *fl;
+-	int opcode __unused;
++	int opcode;
+ {
+ 	CLIENT *cli;
+ 	static char dummy;
+--- a/usr.sbin/rpc.lockd/kern.c
++++ b/usr.sbin/rpc.lockd/kern.c
+@@ -51,8 +51,9 @@
+ #include <syslog.h>
+ #include <unistd.h>
+ #include <netdb.h>
++#include <signal.h>
+ 
+-#include "nlm_prot.h"
++#include <nlm_prot.h>
+ #include <nfs/nfsproto.h>
+ #include <nfs/nfs_lock.h>
+ 
+--- a/usr.sbin/rpc.statd/Makefile
++++ b/usr.sbin/rpc.statd/Makefile
+@@ -2,22 +2,25 @@
+ 
+ PROG=	rpc.statd
+ MAN=	rpc.statd.8
+-SRCS=	file.c sm_inter_svc.c sm_inter.h statd.c procs.c
++SRCS=	file.c sm_inter_svc.c sm_inter_xdr.c sm_inter.h statd.c procs.c
+ 
+ CFLAGS+= -I.
+ #WARNS?= 2
+ 
+ DPADD=	${LIBRPCSVC}
+-LDADD=	-lrpcsvc
++LDADD=	-ltirpc -lbsd
+ 
+-CLEANFILES= sm_inter_svc.c sm_inter.h
++CLEANFILES= sm_inter_svc.c sm_inter_xdr.c sm_inter.h
+ 
+-RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm_inter.x
++RPCSRC= ${.CURDIR}/../../include/rpcsvc/sm_inter.x
+ RPCGEN= rpcgen -L -C
+ 
+ sm_inter_svc.c: ${RPCSRC}
+ 	${RPCGEN} -m -o ${.TARGET} ${RPCSRC}
+ 
++sm_inter_xdr.c: ${RPCSRC}
++	${RPCGEN} -c -o ${.TARGET} ${RPCSRC}
++
+ sm_inter.h: ${RPCSRC}
+ 	${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
+ 
+--- a/usr.sbin/rpc.statd/procs.c
++++ b/usr.sbin/rpc.statd/procs.c
+@@ -257,7 +257,7 @@
+ 		earlier call to sm_mon_1
+ */
+ 
+-struct sm_stat *sm_unmon_1_svc(mon_id *arg, struct svc_req *req __unused)
++struct sm_stat *sm_unmon_1_svc(mon_id *arg, struct svc_req *req)
+ {
+   static sm_stat res;
+   HostInfo *hp;
+@@ -295,7 +295,7 @@
+ 		host and program number.
+ */
+ 
+-struct sm_stat *sm_unmon_all_1_svc(my_id *arg, struct svc_req *req __unused)
++struct sm_stat *sm_unmon_all_1_svc(my_id *arg, struct svc_req *req)
+ {
+   static sm_stat res;
+   HostInfo *hp;
+@@ -332,7 +332,7 @@
+ 		and inform all hosts on the monitor list.
+ */
+ 
+-void *sm_simu_crash_1_svc(void *v __unused, struct svc_req *req __unused)
++void *sm_simu_crash_1_svc(void *v, struct svc_req *req)
+ {
+   static char dummy;
+   int work_to_do;
+@@ -377,7 +377,7 @@
+ 		that modify the list.
+ */
+ 
+-void *sm_notify_1_svc(stat_chge *arg, struct svc_req *req __unused)
++void *sm_notify_1_svc(stat_chge *arg, struct svc_req *req)
+ {
+   struct timeval timeout = { 20, 0 };	/* 20 secs timeout		*/
+   CLIENT *cli;
+--- a/usr.sbin/rpc.statd/statd.c
++++ b/usr.sbin/rpc.statd/statd.c
+@@ -55,6 +55,8 @@
+ #include <unistd.h>
+ #include "statd.h"
+ 
++extern void sm_prog_1(struct svc_req *rqstp, register SVCXPRT *transp);
++
+ int debug = 0;		/* Controls syslog() calls for debug messages	*/
+ 
+ char **hosts, *svcport_str = NULL;
+@@ -446,7 +448,7 @@
+ 		children to exit when they have done their work.
+ */
+ 
+-static void handle_sigchld(int sig __unused)
++static void handle_sigchld(int sig)
+ {
+   int pid, status;
+   pid = wait4(-1, &status, WNOHANG, (struct rusage*)0);

Added: trunk/freebsd-utils/debian/patches/036_nfs_glibc.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/036_nfs_glibc.diff	                        (rev 0)
+++ trunk/freebsd-utils/debian/patches/036_nfs_glibc.diff	2011-06-29 15:15:27 UTC (rev 3509)
@@ -0,0 +1,159 @@
+
+This stuff could be moved to glibc (or some other library).  See #629556 and #630843.
+
+--- a/sbin/nfsiod/Makefile
++++ b/sbin/nfsiod/Makefile
+@@ -2,7 +2,10 @@
+ # $FreeBSD$
+ 
+ PROG=	nfsiod
++SRCS=	nfsiod.c getvfsbyname.c
+ WARNS?=	6
+ MAN=	nfsiod.8
+ 
++.PATH: ${.CURDIR}/../../extra
++
+ .include <bsd.prog.mk>
+--- /dev/null
++++ b/extra/getvfsbyname.c
+@@ -0,0 +1,70 @@
++/*
++ * Copyright (c) 1995
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++#include <stddef.h>
++#include <sys/mount.h>
++#include <sys/sysctl.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <string.h>
++
++/*
++ * Given a filesystem name, determine if it is resident in the kernel,
++ * and if it is resident, return its xvfsconf structure.
++ */
++int
++getvfsbyname(fsname, vfcp)
++	const char *fsname;
++	struct xvfsconf *vfcp;
++{
++	struct xvfsconf *xvfsp;
++	size_t buflen;
++	int cnt, i;
++
++	if (sysctlbyname("vfs.conflist", NULL, &buflen, NULL, 0) < 0)
++		return (-1);
++	xvfsp = malloc(buflen);
++	if (xvfsp == NULL)
++		return (-1);
++	if (sysctlbyname("vfs.conflist", xvfsp, &buflen, NULL, 0) < 0) {
++		free(xvfsp);
++		return (-1);
++	}
++	cnt = buflen / sizeof(struct xvfsconf);
++	for (i = 0; i < cnt; i++) {
++		if (strcmp(fsname, xvfsp[i].vfc_name) == 0) {
++			memcpy(vfcp, xvfsp + i, sizeof(struct xvfsconf));
++			free(xvfsp);
++			return (0);
++		}
++	}
++	free(xvfsp);
++	errno = ENOENT;
++	return (-1);
++}
+--- a/usr.sbin/mountd/Makefile
++++ b/usr.sbin/mountd/Makefile
+@@ -2,14 +2,14 @@
+ # $FreeBSD$
+ 
+ PROG=	mountd
+-SRCS=	mountd.c getmntopts.c
++SRCS=	mountd.c getmntopts.c getvfsbyname.c nfssvc.c
+ MAN=	exports.5 netgroup.5 mountd.8
+ 
+ MOUNT=  ${.CURDIR}/../../sbin/mount
+ CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys
+ WARNS?= 2
+ 
+-.PATH: ${MOUNT}
++.PATH: ${MOUNT} ${.CURDIR}/../../extra
+ 
+ DPADD=	${LIBUTIL}
+ LDADD=	-ltirpc -lbsd
+--- /dev/null
++++ b/extra/nfssvc.c
+@@ -0,0 +1,7 @@
++#include <sys/syscall.h>
++
++int
++nfssvc (int a, void *b)
++{
++  return syscall (SYS_nfssvc, a, b);
++}
+--- a/usr.sbin/nfsd/Makefile
++++ b/usr.sbin/nfsd/Makefile
+@@ -2,10 +2,13 @@
+ # $FreeBSD$
+ 
+ PROG=	nfsd
++SRCS=	nfsd.c nfssvc.c
+ MAN=	nfsd.8 nfsv4.4 stablerestart.5
+ CFLAGS+= -I${.CURDIR}/../../sys
+ LDADD=   -ltirpc -lbsd
+ 
++.PATH: ${.CURDIR}/../../extra
++
+ WARNS?=	6
+ 
+ .include <bsd.prog.mk>
+--- a/usr.sbin/rpc.lockd/Makefile
++++ b/usr.sbin/rpc.lockd/Makefile
+@@ -4,7 +4,7 @@
+ PROG=	rpc.lockd
+ MAN=	rpc.lockd.8
+ MLINKS=	rpc.lockd.8 lockd.8
+-SRCS=	kern.c nlm_prot_svc.c nlm_prot_xdr.c lockd.c lock_proc.c lockd_lock.c sm_inter_xdr.c
++SRCS=	kern.c nlm_prot_svc.c nlm_prot_xdr.c lockd.c lock_proc.c lockd_lock.c sm_inter_xdr.c nlm_syscall.c
+ 
+ CFLAGS+= -I. -I${.CURDIR}/../../include/rpcsvc
+ #WARNS?= 2
+--- /dev/null
++++ b/usr.sbin/rpc.lockd/nlm_syscall.c
+@@ -0,0 +1,11 @@
++#include <sys/syscall.h>
++
++#ifndef SYS_nlm_syscall
++#define SYS_nlm_syscall		154
++#endif
++
++int
++nlm_syscall (int a, int b, int c, char **d)
++{
++  return syscall (SYS_nlm_syscall, a, b, c, d);
++}

Modified: trunk/freebsd-utils/debian/patches/series
===================================================================
--- trunk/freebsd-utils/debian/patches/series	2011-06-29 14:18:51 UTC (rev 3508)
+++ trunk/freebsd-utils/debian/patches/series	2011-06-29 15:15:27 UTC (rev 3509)
@@ -31,3 +31,5 @@
 032_libbsd_overlay.diff
 033_devd_usb.diff
 034_devd_pci.diff
+035_nfs.diff
+036_nfs_glibc.diff

Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules	2011-06-29 14:18:51 UTC (rev 3508)
+++ trunk/freebsd-utils/debian/rules	2011-06-29 15:15:27 UTC (rev 3509)
@@ -6,7 +6,7 @@
 #export DH_VERBOSE=1
 
 CFLAGS = -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D__va_list=__builtin_va_list \
-	$(shell pkg-config --cflags libbsd-overlay)
+	$(shell pkg-config --cflags libbsd-overlay) -isystem /usr/include/tirpc
 CXXFLAGS = $(CFLAGS)
 
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
@@ -28,15 +28,26 @@
 PATH := /usr/lib/freebsd:$(PATH)
 DESTDIR = $(CURDIR)/debian/tmp
 PMAKE = COPTS="$(CFLAGS)" CFLAGS="$(CFLAGS) \
-        -I$(CURDIR)/debian/local/include -lbsd" \
+        -I$(CURDIR)/debian/local/include -I$(CURDIR)/include -lbsd" \
         NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO NO_SHARED=NO \
         DESTDIR=$(DESTDIR) make
 
+RPCHDRS=include/rpcsvc/nfs_prot.h include/rpcsvc/nlm_prot.h \
+	include/rpcsvc/mount.h include/rpcsvc/sm_inter.h \
+	sys/kgssapi/gssd.h
+
+.SUFFIXES: .x .h
+
+.x.h:
+	rpcgen -h -DWANT_NFS3 $< -o $@
+
 build: build-arch build-indep
 
 get-orig-source:
 	rm -rf $(ORIGDIR)
-	mkdir -p $(ORIGDIR)/sys/kern $(ORIGDIR)/sys/dev/usb $(ORIGDIR)/etc
+	mkdir -p $(ORIGDIR)/sys/kern $(ORIGDIR)/sys/dev/usb $(ORIGDIR)/etc \
+		$(ORIGDIR)/include/rpcsvc \
+		$(ORIGDIR)/sys/kgssapi
 	for i in sbin/dmesg sbin/sysctl usr.bin/kdump usr.bin/ktrace \
 		 usr.sbin/jail bin/chflags \
 		 sbin/devd etc/devd.conf etc/devd sys/dev/usb/usbdevs \
@@ -48,14 +59,24 @@
 		 usr.sbin/ppp usr.sbin/pppctl usr.sbin/arp usr.bin/mkuzip \
 		 sbin/ipfw contrib/pf sbin/pfctl usr.sbin/authpf sys/contrib/pf/net \
 		 sbin/mount_std sbin/umount sbin/mount_autofs sbin/mount_cd9660 \
-		 sbin/mount_ext2fs sbin/mount_hpfs sbin/mount_msdosfs sbin/mount_nfs \
+		 sbin/mount_ext2fs sbin/mount_hpfs sbin/mount_msdosfs \
 		 sbin/mount_ntfs sbin/mount_nullfs sbin/mount_udf sbin/mount_unionfs \
 		 sbin/mount_reiserfs sbin/mount \
 		 sbin/mdconfig sbin/ccdconfig sbin/swapon sbin/atacontrol sbin/camcontrol \
 		 sbin/gbde sbin/geom bin/kenv \
 		 usr.sbin/kbdcontrol usr.sbin/vidcontrol share/syscons \
 		 sbin/savecore sbin/dumpon \
-		 sys/kern/syscalls.c etc/pf.os ; do \
+		 sys/kern/syscalls.c etc/pf.os \
+		 usr.sbin/mountd usr.sbin/rpc.statd usr.sbin/rpc.lockd \
+		 usr.sbin/gssd usr.sbin/nfsd usr.sbin/nfscbd \
+		 usr.sbin/nfsdumpstate usr.sbin/nfsuserd usr.sbin/nfsrevoke \
+		 sbin/nfsiod \
+		 sbin/mount_nfs \
+		 include/rpcsvc/nfs_prot.x include/rpcsvc/sm_inter.x \
+		 include/rpcsvc/nlm_prot.x include/rpcsvc/mount.x \
+		 sys/kgssapi/gssd.x \
+		 usr.bin/showmount \
+	; do \
 	    svn export $(SVN)/$$i $(ORIGDIR)/$$i ; \
 	done
 	tar --numeric-owner --owner 0 --group 0 -czf ../$(TARNAME) $(ORIGDIR)
@@ -66,10 +87,10 @@
 	$(MAKE) -C lib
 	touch $@
 
-build-arch: freebsd-utils gbde geli kbdcontrol vidcontrol kldutils freebsd-net-tools
+build-arch: freebsd-utils gbde geli kbdcontrol vidcontrol kldutils freebsd-net-tools freebsd-nfs-utils
 
 freebsd-utils: freebsd-utils-stamp
-freebsd-utils-stamp:
+freebsd-utils-stamp: $(RPCHDRS)
 #	$(PMAKE) -C bin/chflags
 	$(PMAKE) -C bin/kenv
 	$(PMAKE) -C sbin/atacontrol
@@ -147,6 +168,22 @@
 	$(PMAKE) -C usr.sbin/pppctl
 	touch $@
 
+freebsd-nfs-utils: freebsd-nfs-utils-stamp
+freebsd-nfs-utils-stamp: lib-stamp
+#	$(PMAKE) -C usr.bin/showmount
+	$(PMAKE) -C sbin/mount_nfs
+	$(PMAKE) -C sbin/nfsiod
+#	$(PMAKE) -C usr.sbin/gssd
+#	$(PMAKE) -C usr.sbin/nfscbd
+#	$(PMAKE) -C usr.sbin/nfsuserd
+#	$(PMAKE) -C usr.sbin/nfsrevoke
+#	$(PMAKE) -C usr.sbin/nfsdumpstate
+	$(PMAKE) -C usr.sbin/rpc.statd
+	$(PMAKE) -C usr.sbin/rpc.lockd
+	$(PMAKE) -C usr.sbin/mountd
+	$(PMAKE) -C usr.sbin/nfsd
+	touch $@
+
 build-indep: build-indep-stamp
 build-indep-stamp:
 	touch $@
@@ -211,6 +248,19 @@
 	$(PMAKE) -C usr.sbin/authpf clean
 	$(PMAKE) -C usr.sbin/pppctl clean
 
+	$(PMAKE) -C sbin/nfsiod clean
+	$(PMAKE) -C usr.sbin/gssd clean
+	$(PMAKE) -C usr.sbin/nfscbd clean
+	$(PMAKE) -C usr.sbin/nfsuserd clean
+	$(PMAKE) -C usr.sbin/nfsrevoke clean
+	$(PMAKE) -C usr.sbin/nfsdumpstate clean
+	$(PMAKE) -C usr.sbin/rpc.statd clean
+	$(PMAKE) -C usr.sbin/rpc.lockd clean
+	$(PMAKE) -C usr.sbin/mountd clean
+	$(PMAKE) -C usr.sbin/nfsd clean
+
+	$(RM) $(RPCHDRS)
+
 	rm -f *stamp
 	dh_clean
 
@@ -245,6 +295,11 @@
 	dh_installinit -pfreebsd-utils --name=devd -- start 03 S . stop 01 0 1 6 .
 	dh_installinit -pkldutils --no-start -- start 12 S .
 	dh_installinit -pkbdcontrol -- start 20 S .
+	dh_installinit -pfreebsd-nfs-common --name=rpc.lockd -- start 20 2 3 4 5 S . stop 20 0 1 6 .
+	dh_installinit -pfreebsd-nfs-common --name=rpc.statd -- start 20 2 3 4 5 S . stop 20 0 1 6 .
+	dh_installinit -pfreebsd-nfs-client --name=nfsiod -- start 20 2 3 4 5 S . stop 20 0 1 6 .
+	dh_installinit -pfreebsd-nfs-server --name=mountd -- start 20 2 3 4 5 S . stop 80 0 1 6 .
+	dh_installinit -pfreebsd-nfs-server --name=nfsd -- start 20 2 3 4 5 S . stop 80 0 1 6 .
 #	dh_installcron
 #	dh_installinfo
 	dh_installman




More information about the Glibc-bsd-commits mailing list