[-]
[+]
|
Changed |
_service:tar_git:nfs-utils.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils.spec
^
|
|
[-]
[+]
|
Added |
_service:tar_git:systemd-Makefile.am.patch
^
|
@@ -0,0 +1,31 @@
+diff --git a/systemd/Makefile.am b/systemd/Makefile.am
+index 650ad25c..e7f5d818 100644
+--- a/systemd/Makefile.am
++++ b/systemd/Makefile.am
+@@ -12,7 +12,9 @@ unit_files = \
+ rpc-statd-notify.service \
+ rpc-statd.service \
+ \
+- proc-fs-nfsd.mount \
++ proc-fs-nfsd.mount
++
++rpc_pipefs_mount_file = \
+ var-lib-nfs-rpc_pipefs.mount
+
+ if CONFIG_NFSV4
+@@ -51,8 +53,7 @@ man5_MANS = nfs.conf.man
+ man7_MANS = nfs.systemd.man
+ EXTRA_DIST = $(unit_files) $(man5_MANS) $(man7_MANS)
+
+-unit_dir = /usr/lib/systemd/system
+-generator_dir = /usr/lib/systemd/system-generators
++generator_dir = $(unitdir)/../system-generators
+
+ EXTRA_PROGRAMS = nfs-server-generator rpc-pipefs-generator
+ genexecdir = $(generator_dir)
+@@ -75,4 +76,5 @@ genexec_PROGRAMS = nfs-server-generator rpc-pipefs-generator
+ install-data-hook: $(unit_files)
+ mkdir -p $(DESTDIR)/$(unitdir)
+ cp $(unit_files) $(DESTDIR)/$(unitdir)
++ cp $(rpc_pipefs_mount_file) $(DESTDIR)/$(unitdir)/$(rpc_pipefsmount)
+ endif
|
|
Changed |
_service
^
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/.gitignore
^
|
@@ -61,8 +61,6 @@
tools/locktest/testlk
tools/getiversion/getiversion
tools/nfsconf/nfsconf
-tools/nfsrahead/nfsrahead
-tools/nfsrahead/99-nfs_bdi.rules
support/export/mount.h
support/export/mount_clnt.c
support/export/mount_xdr.c
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/bsdsignals.m4
^
|
@@ -2,13 +2,13 @@
AC_DEFUN([AC_BSD_SIGNALS], [
AC_MSG_CHECKING(for BSD signal semantics)
AC_CACHE_VAL(knfsd_cv_bsd_signals,
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ [AC_TRY_RUN([
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
static int counter = 0;
- static void handler(int num) { counter++; }
+ static RETSIGTYPE handler(int num) { counter++; }
int main()
{
@@ -23,7 +23,8 @@
kill(getpid(), SIGHUP); kill(getpid(), SIGHUP);
return (counter == 2)? 0 : 1;
}
- ]])],[knfsd_cv_bsd_signals=yes],[knfsd_cv_bsd_signals=no],[
+ ], knfsd_cv_bsd_signals=yes, knfsd_cv_bsd_signals=no,
+ [
case "$host_os" in
*linux*) knfsd_cv_bsd_signals=no;;
*bsd*) knfsd_cv_bsd_signals=yes;;
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/kerberos5.m4
^
|
@@ -6,7 +6,7 @@
AC_DEFUN([AC_KERBEROS_V5],[
AC_MSG_CHECKING(for Kerberos v5)
AC_ARG_WITH(krb5,
- [AS_HELP_STRING([--with-krb5=DIR],[use Kerberos v5 installation in DIR])],
+ [AC_HELP_STRING([--with-krb5=DIR], [use Kerberos v5 installation in DIR])],
[ case "$withval" in
yes|no)
krb5_with=""
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/libblkid.m4
^
|
@@ -5,14 +5,15 @@
[
saved_LIBS="$LIBS"
LIBS=-lblkid
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ AC_TRY_RUN([
#include <blkid/blkid.h>
int main()
{
int vers = blkid_get_library_version(0, 0);
return vers >= 140 ? 0 : 1;
}
- ]])],[libblkid_cv_is_recent=yes],[libblkid_cv_is_recent=no],[libblkid_cv_is_recent=unknown])
+ ], [libblkid_cv_is_recent=yes], [libblkid_cv_is_recent=no],
+ [libblkid_cv_is_recent=unknown])
LIBS="$saved_LIBS"])
AC_MSG_RESULT($libblkid_cv_is_recent)
])dnl
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/libsqlite3.m4
^
|
@@ -14,7 +14,7 @@
[
saved_LIBS="$LIBS"
LIBS=-lsqlite3
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ AC_TRY_RUN([
#include <stdio.h>
#include <sqlite3.h>
int main()
@@ -24,7 +24,8 @@
return vers != SQLITE_VERSION_NUMBER ||
vers < 3003000;
}
- ]])],[libsqlite3_cv_is_recent=yes],[libsqlite3_cv_is_recent=no],[libsqlite3_cv_is_recent=unknown])
+ ], [libsqlite3_cv_is_recent=yes], [libsqlite3_cv_is_recent=no],
+ [libsqlite3_cv_is_recent=unknown])
LIBS="$saved_LIBS"])
AC_MSG_RESULT($libsqlite3_cv_is_recent)
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/libtirpc.m4
^
|
@@ -37,7 +37,8 @@
AC_DEFUN([AC_LIBTIRPC_OLD], [
AC_ARG_WITH([tirpcinclude],
- [AS_HELP_STRING([--with-tirpcinclude=DIR],[use TI-RPC headers in DIR])],
+ [AC_HELP_STRING([--with-tirpcinclude=DIR],
+ [use TI-RPC headers in DIR])],
[tirpc_header_dir=$withval],
[tirpc_header_dir=/usr/include/tirpc])
@@ -49,9 +50,9 @@
dnl Also must have the headers installed where we expect
dnl to look for headers; add -I compiler option if found
AS_IF([test "$has_libtirpc" = "yes"],
- [AC_CHECK_FILE([${tirpc_header_dir}/netconfig.h],
- [AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])],
- [has_libtirpc="no"])])
+ [AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
+ [AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])],
+ [has_libtirpc="no"])])
dnl Now set $LIBTIRPC accordingly
AS_IF([test "$has_libtirpc" = "yes"],
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/nfs-utils.m4
^
|
@@ -2,12 +2,13 @@
AC_DEFUN([AC_GNULIBC],[
AC_MSG_CHECKING(for GNU libc2)
AC_CACHE_VAL(knfsd_cv_glibc2,
- [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+ [AC_TRY_CPP([
#include <features.h>
#if !defined(__GLIBC__)
# error Nope
#endif
- ]])],[knfsd_cv_glibc2=yes],[knfsd_cv_glibc2=no])])
+ ],
+ knfsd_cv_glibc2=yes, knfsd_cv_glibc2=no)])
AC_MSG_RESULT($knfsd_cv_glibc2)
if test $knfsd_cv_glibc2 = yes; then
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/aclocal/rpcsec_vers.m4
^
|
@@ -2,7 +2,7 @@
AC_DEFUN([AC_RPCSEC_VERSION], [
AC_ARG_WITH([gssglue],
- [AS_HELP_STRING([--with-gssglue],[Use libgssglue for GSS support])])
+ [AC_HELP_STRING([--with-gssglue], [Use libgssglue for GSS support])])
if test x"$with_gssglue" = x"yes"; then
PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.3])
AC_CHECK_LIB([gssglue], [gss_set_allowable_enctypes])
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/configure.ac
^
|
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_INIT([linux nfs-utils],[2.6.2],[linux-nfs@vger.kernel.org],[nfs-utils])
+AC_INIT([linux nfs-utils],[2.5.4],[linux-nfs@vger.kernel.org],[nfs-utils])
AC_CANONICAL_BUILD([])
AC_CANONICAL_HOST([])
AC_CONFIG_MACRO_DIR(aclocal)
@@ -14,29 +14,33 @@
dnl * Define the set of applicable options
dnl *************************************************************
AC_ARG_WITH(release,
- [AS_HELP_STRING([--with-release=XXX],[set release to XXX [1]])],
+ [AC_HELP_STRING([--with-release=XXX], [set release to XXX [1]])],
RELEASE=$withval,
RELEASE=1)
AC_SUBST(RELEASE)
AC_ARG_WITH(statedir,
- [AS_HELP_STRING([--with-statedir=/foo],[use state dir /foo @<:@default=/var/lib/nfs@:>@])],
+ [AC_HELP_STRING([--with-statedir=/foo],
+ [use state dir /foo @<:@default=/var/lib/nfs@:>@])],
statedir=$withval,
statedir=/var/lib/nfs)
AC_SUBST(statedir)
AC_ARG_WITH(nfsconfig,
- [AS_HELP_STRING([--with-nfsconfig=/config/file],[use general config file /config/file @<:@default=/etc/nfs.conf@:>@])],
+ [AC_HELP_STRING([--with-nfsconfig=/config/file],
+ [use general config file /config/file @<:@default=/etc/nfs.conf@:>@])],
nfsconfig=$withval,
nfsconfig=/etc/nfs.conf)
AC_SUBST(nfsconfig)
AC_ARG_WITH(statdpath,
- [AS_HELP_STRING([--with-statdpath=/foo],[define the statd state dir as /foo instead of the NFS statedir @<:@default=/var/lib/nfs@:>@])],
+ [AC_HELP_STRING([--with-statdpath=/foo],
+ [define the statd state dir as /foo instead of the NFS statedir @<:@default=/var/lib/nfs@:>@])],
statdpath=$withval,
statdpath=$statedir
)
AC_SUBST(statdpath)
AC_ARG_WITH(statduser,
- [AS_HELP_STRING([--with-statduser=rpcuser],[statd to run under @<:@rpcuser or nobody@:>@
- ])],
+ [AC_HELP_STRING([--with-statduser=rpcuser],
+ [statd to run under @<:@rpcuser or nobody@:>@]
+ )],
statduser=$withval,
if test "x$cross_compiling" = "xno"; then
if grep -s '^rpcuser:' /etc/passwd > /dev/null; then
@@ -49,8 +53,9 @@
fi)
AC_SUBST(statduser)
AC_ARG_WITH(start-statd,
- [AS_HELP_STRING([--with-start-statd=scriptname],[When an nfs filesystems is mounted with locking, run this script
- ])],
+ [AC_HELP_STRING([--with-start-statd=scriptname],
+ [When an nfs filesystems is mounted with locking, run this script]
+ )],
startstatd=$withval,
startstatd=/usr/sbin/start-statd
)
@@ -58,7 +63,8 @@
AC_DEFINE_UNQUOTED(START_STATD, "$startstatd", [Define this to a script which can start statd on mount])
unitdir=/usr/lib/systemd/system
AC_ARG_WITH(systemd,
- [AS_HELP_STRING([--with-systemd@<:@=unit-dir-path@:>@],[install systemd unit files @<:@Default: no, and path defaults to /usr/lib/systemd/system if not given@:>@])],
+ [AC_HELP_STRING([--with-systemd@<:@=unit-dir-path@:>@],
+ [install systemd unit files @<:@Default: no, and path defaults to /usr/lib/systemd/system if not given@:>@])],
if test "$withval" != "no" ; then
use_systemd=1
if test "$withval" != "yes" ; then
@@ -71,20 +77,9 @@
AM_CONDITIONAL(INSTALL_SYSTEMD, [test "$use_systemd" = 1])
AC_SUBST(unitdir)
-modprobedir=/usr/lib/modprobe.d
-AC_ARG_WITH(modprobedir,
- [AS_HELP_STRING([--with-modprobedir@<:@=modprobe-dir-path@:>@],[install modprobe config files @<:@Default: /usr/lib/modprobe.d@:>@])],
- if test "$withval" != "no" ; then
- modprobedir=$withval
- else
- modprobedir=
- fi
- )
- AM_CONDITIONAL(INSTALL_MODPROBEDIR, [test -n "$modprobedir"])
- AC_SUBST(modprobedir)
-
AC_ARG_ENABLE(nfsv4,
- [AS_HELP_STRING([--disable-nfsv4],[disable support for NFSv4 @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-nfsv4],
+ [disable support for NFSv4 @<:@default=no@:>@])],
enable_nfsv4=$enableval,
enable_nfsv4=yes)
if test "$enable_nfsv4" = yes; then
@@ -98,7 +93,8 @@
AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
AC_ARG_ENABLE(nfsv41,
- [AS_HELP_STRING([--disable-nfsv41],[disable support for NFSv41 @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-nfsv41],
+ [disable support for NFSv41 @<:@default=no@:>@])],
enable_nfsv41=$enableval,
enable_nfsv41=yes)
if test "$enable_nfsv41" = yes; then
@@ -115,7 +111,8 @@
AM_CONDITIONAL(CONFIG_NFSV41, [test "$enable_nfsv41" = "yes"])
AC_ARG_ENABLE(gss,
- [AS_HELP_STRING([--disable-gss],[disable client support for rpcsec_gss @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-gss],
+ [disable client support for rpcsec_gss @<:@default=no@:>@])],
enable_gss=$enableval,
enable_gss=yes)
if test "$enable_gss" = yes; then
@@ -129,7 +126,8 @@
AM_CONDITIONAL(CONFIG_GSS, [test "$enable_gss" = "yes"])
AC_ARG_ENABLE(svcgss,
- [AS_HELP_STRING([--enable-svcgss],[enable building svcgssd for rpcsec_gss server support @<:@default=no@:>@])],
+ [AC_HELP_STRING([--enable-svcgss],
+ [enable building svcgssd for rpcsec_gss server support @<:@default=no@:>@])],
enable_svcgss=$enableval,
enable_svcgss=no)
if test "$enable_gss" = yes -a "$enable_svcgss" = yes; then
@@ -143,12 +141,12 @@
AM_CONDITIONAL(CONFIG_SVCGSS, [test "$enable_svcgss" = "yes"])
AC_ARG_ENABLE(kprefix,
- [AS_HELP_STRING([--enable-kprefix],[install progs as rpc.knfsd etc])],
+ [AC_HELP_STRING([--enable-kprefix], [install progs as rpc.knfsd etc])],
test "$enableval" = "yes" && kprefix=k,
kprefix=)
AC_SUBST(kprefix)
AC_ARG_WITH(rpcgen,
- [AS_HELP_STRING([--with-rpcgen=internal],[use internal rpcgen instead of system one])],
+ [AC_HELP_STRING([--with-rpcgen=internal], [use internal rpcgen instead of system one])],
rpcgen_path=$withval,
rpcgen_path=yes )
rpcgen_cflags=-Werror=strict-prototypes
@@ -168,31 +166,30 @@
AC_SUBST(RPCGEN_PATH)
AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = "internal"])
AC_ARG_ENABLE(uuid,
- [AS_HELP_STRING([--disable-uuid],[Exclude uuid support to avoid buggy libblkid. @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-uuid],
+ [Exclude uuid support to avoid buggy libblkid. @<:@default=no@:>@])],
if test "$enableval" = "yes" ; then choose_blkid=yes; else choose_blkid=no; fi,
choose_blkid=default)
AC_ARG_ENABLE(mount,
- [AS_HELP_STRING([--disable-mount],[Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-mount],
+ [Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])],
enable_mount=$enableval,
enable_mount=yes)
AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])
if test "$enable_mount" = yes; then
AC_ARG_ENABLE(libmount-mount,
- [AS_HELP_STRING([--enable-libmount-mount],[Link mount.nfs with libmount @<:@default=no@:>@])],
+ [AC_HELP_STRING([--enable-libmount-mount],
+ [Link mount.nfs with libmount @<:@default=no@:>@])],
enable_libmount=$enableval,
enable_libmount=no)
else
enable_libmount=no
fi
-AC_ARG_ENABLE(sbin-override,
- [AS_HELP_STRING([--disable-sbin-override],[Don't force nfsdcltrack and mount helpers into /sbin: always honour --sbindir])],
- enable_sbin_override=$enableval,
- enable_sbin_override=yes)
- AM_CONDITIONAL(CONFIG_SBIN_OVERRIDE, [test "$enable_sbin_override" = "yes"])
AC_ARG_ENABLE(junction,
- [AS_HELP_STRING([--enable-junction],[enable support for NFS junctions @<:@default=no@:>@])],
+ [AC_HELP_STRING([--enable-junction],
+ [enable support for NFS junctions @<:@default=no@:>@])],
enable_junction=$enableval,
enable_junction=no)
if test "$enable_junction" = yes; then
@@ -204,11 +201,13 @@
AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])
AC_ARG_ENABLE(tirpc,
- [AS_HELP_STRING([--disable-tirpc],[disable use of TI-RPC library @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-tirpc],
+ [disable use of TI-RPC library @<:@default=no@:>@])],
enable_tirpc=$enableval,
enable_tirpc=yes)
AC_ARG_ENABLE(ipv6,
- [AS_HELP_STRING([--disable-ipv6],[disable support for IPv6 @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-ipv6],
+ [disable support for IPv6 @<:@default=no@:>@])],
enable_ipv6=$enableval,
enable_ipv6=yes)
if test "$enable_ipv6" = yes; then
@@ -221,7 +220,8 @@
if test "$enable_mount" = yes; then
AC_ARG_ENABLE(mountconfig,
- [AS_HELP_STRING([--disable-mountconfig],[disable mount to use a configuration file @<:@default=no@:>@])],
+ [AC_HELP_STRING([--disable-mountconfig],
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/nfs.conf
^
|
@@ -5,10 +5,6 @@
[general]
# pipefs-directory=/var/lib/nfs/rpc_pipefs
#
-[nfsrahead]
-# nfs=15000
-# nfs4=16000
-#
[exports]
# rootdir=/export
#
@@ -72,6 +68,7 @@
# lease-time=90
# udp=n
# tcp=y
+# vers2=n
# vers3=y
# vers4=y
# vers4.0=y
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/support/export/v4clients.c
^
|
@@ -8,7 +8,6 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/inotify.h>
-#include <sys/stat.h>
#include <errno.h>
#include "export.h"
@@ -24,11 +23,6 @@
void v4clients_init(void)
{
- struct stat sb;
-
- if (!stat("/proc/fs/nfsd/clients", &sb) == 0 ||
- !S_ISDIR(sb.st_mode))
- return;
if (clients_fd >= 0)
return;
clients_fd = inotify_init1(IN_NONBLOCK);
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/support/nfs/cacheio.c
^
|
@@ -213,6 +213,7 @@
void
cache_flush(void)
{
+ struct stat stb;
int c;
char stime[32];
char path[200];
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/support/nfs/rpcdispatch.c
^
|
@@ -26,13 +26,12 @@
void *argp, void *resp)
{
struct rpc_dentry *dent;
- int rq_vers = (int)rqstp->rq_vers;
- if (rq_vers < 1 || rq_vers > nvers) {
+ if (((int)rqstp->rq_vers) > nvers) {
svcerr_progvers(transp, 1, nvers);
return;
}
- dtable += (rq_vers - 1);
+ dtable += (rqstp->rq_vers - 1);
if (rqstp->rq_proc > dtable->nproc) {
svcerr_noproc(transp);
return;
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/support/nfsidmap/idmapd.conf.5
^
|
@@ -198,8 +198,8 @@
.TP
.B Group-Name-No-Prefix-Regex
Case-insensitive regular expression to exclude groups from adding and removing the prefix set by
-.BR Group-Name-Prefix .
-The regular expression must match both the remote and local group names. Multiple expressions may be concatenated with '|'.
+.B Group-Name-Prefix
+. The regular expression must match both the remote and local group names. Multiple expressions may be concatenated with '|'.
(Default: none)
.\"
.\" -------------------------------------------------------------------
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/support/nfsidmap/nss.c
^
|
@@ -365,8 +365,10 @@
out_buf:
free(buf);
out_name:
- free(localname);
- free(ref_name);
+ if (dostrip)
+ free(localname);
+ if (get_reformat_group())
+ free(ref_name);
out:
return err;
}
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/support/nfsidmap/regex.c
^
|
@@ -157,7 +157,6 @@
IDMAP_LOG(4, ("regexp_getpwnam: name '%s' mapped to '%s'",
name, localname));
- free(localname);
*err_p = 0;
return pw;
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/systemd/Makefile.am
^
|
@@ -2,8 +2,6 @@
MAINTAINERCLEANFILES = Makefile.in
-modprobe_files = 50-nfs.conf
-
unit_files = \
nfs-client.target \
rpc_pipefs.target \
@@ -14,9 +12,7 @@
rpc-statd-notify.service \
rpc-statd.service \
\
- proc-fs-nfsd.mount
-
-rpc_pipefs_mount_file = \
+ proc-fs-nfsd.mount \
var-lib-nfs-rpc_pipefs.mount
if CONFIG_NFSV4
@@ -53,9 +49,10 @@
man5_MANS = nfs.conf.man
man7_MANS = nfs.systemd.man
-EXTRA_DIST = $(unit_files) $(modprobe_files) $(man5_MANS) $(man7_MANS)
+EXTRA_DIST = $(unit_files) $(man5_MANS) $(man7_MANS)
-generator_dir = $(unitdir)/../system-generators
+unit_dir = /usr/lib/systemd/system
+generator_dir = /usr/lib/systemd/system-generators
EXTRA_PROGRAMS = nfs-server-generator rpc-pipefs-generator
genexecdir = $(generator_dir)
@@ -75,14 +72,7 @@
if INSTALL_SYSTEMD
genexec_PROGRAMS = nfs-server-generator rpc-pipefs-generator
-install-data-hook: $(unit_files) $(modprobe_files)
+install-data-hook: $(unit_files)
mkdir -p $(DESTDIR)/$(unitdir)
cp $(unit_files) $(DESTDIR)/$(unitdir)
- cp $(rpc_pipefs_mount_file) $(DESTDIR)/$(unitdir)/$(rpc_pipefsmount)
-else
-install-data-hook: $(modprobe_files)
-endif
-if INSTALL_MODPROBEDIR
- mkdir -p $(DESTDIR)$(modprobedir)
- cp $(modprobe_files) $(DESTDIR)$(modprobedir)
endif
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/systemd/nfs.conf.man
^
|
@@ -171,6 +171,7 @@
.BR lease-time ,
.BR udp ,
.BR tcp ,
+.BR vers2 ,
.BR vers3 ,
.BR vers4 ,
.BR vers4.0 ,
@@ -294,17 +295,6 @@
.B debug=
is recognized.
-.TP
-.B nfsrahead
-Recognized values:
-.BR nfs ,
-.BR nfsv4 ,
-.BR default .
-
-See
-.BR nfsrahead (5)
-for deatils.
-
.SH FILES
.TP 10n
.I /etc/nfs.conf
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/systemd/rpc-pipefs-generator.c
^
|
@@ -21,19 +21,18 @@
#include "conffile.h"
#include "systemd.h"
-#define RPC_PIPEFS_DEFAULT NFS_STATEDIR "/rpc_pipefs"
+#define RPC_PIPEFS_DEFAULT "/var/lib/nfs/rpc_pipefs"
static int generate_mount_unit(const char *pipefs_path, const char *pipefs_unit,
const char *dirname)
{
char *path;
FILE *f;
- size_t size = (strlen(dirname) + 1 + strlen(pipefs_unit) + 1);
- path = malloc(size);
+ path = malloc(strlen(dirname) + 1 + strlen(pipefs_unit));
if (!path)
return 1;
- snprintf(path, size, "%s/%s", dirname, pipefs_unit);
+ sprintf(path, "%s/%s", dirname, pipefs_unit);
f = fopen(path, "w");
if (!f)
{
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/systemd/rpc-statd.service
^
|
@@ -5,7 +5,7 @@
Requires=nss-lookup.target rpcbind.socket
Wants=network-online.target
Wants=rpc-statd-notify.service
-After=network-online.target nss-lookup.target rpcbind.service
+After=network-online.target nss-lookup.target rpcbind.socket
PartOf=nfs-utils.service
IgnoreOnIsolate=yes
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/tests/t0001-statd-basic-mon-unmon.sh
^
|
@@ -21,9 +21,8 @@
. ./test-lib.sh
-# This test needs root privileges and /dev/log
+# This test needs root privileges
check_root
-check_dev_log
start_statd
if [ $? -ne 0 ]; then
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/tests/test-lib.sh
^
|
@@ -37,15 +37,6 @@
fi
}
-# Most tests require /dev/log. Skip the test if it doesn't exist in this
-# environment.
-check_dev_log() {
- if ! [ -e /dev/log ]; then
- echo "*** Skipping this tests as it requires /dev/log ***"
- exit 77
- fi
-}
-
# is lockd registered as a service?
lockd_registered() {
rpcinfo -p | grep -q nlockmgr
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/tools/Makefile.am
^
|
@@ -12,6 +12,6 @@
OPTDIRS += nfsdclddb
endif
-SUBDIRS = locktest rpcdebug nlmtest mountstats nfs-iostat rpcctl nfsdclnts nfsrahead $(OPTDIRS)
+SUBDIRS = locktest rpcdebug nlmtest mountstats nfs-iostat nfsdclnts $(OPTDIRS)
MAINTAINERCLEANFILES = Makefile.in
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/tools/mountstats/mountstats.py
^
|
@@ -482,11 +482,8 @@
count = stats[1]
if count != 0:
print('%s:' % stats[0])
- ops_pcnt = 0
- if sends != 0:
- ops_pcnt = (count * 100) / sends
print('\t%d ops (%d%%)' % \
- (count, ops_pcnt), end=' ')
+ (count, ((count * 100) / sends)), end=' ')
retrans = stats[2] - count
if retrans != 0:
print('\t%d retrans (%d%%)' % (retrans, ((retrans * 100) / count)), end=' ')
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/tools/rpcgen/rpc_main.c
^
|
@@ -62,12 +62,6 @@
#define EXTEND 1 /* alias for TRUE */
#define DONT_EXTEND 0 /* alias for FALSE */
-#ifdef __APPLE__
-# if __DARWIN_ONLY_64_BIT_INO_T
-# define stat64 stat
-# endif
-#endif
-
struct commandline
{
int cflag; /* xdr C routines */
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/blkmapd/device-discovery.c
^
|
@@ -63,7 +63,7 @@
#define EVENT_SIZE (sizeof(struct inotify_event))
#define EVENT_BUFSIZE (1024 * EVENT_SIZE)
-#define RPCPIPE_DIR NFS_STATEDIR "/rpc_pipefs"
+#define RPCPIPE_DIR "/var/lib/nfs/rpc_pipefs"
#define PID_FILE "/run/blkmapd.pid"
#define CONF_SAVE(w, f) do { \
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/gssd/gssd.c
^
|
@@ -1016,7 +1016,7 @@
keytabfile = s;
s = conf_get_str("gssd", "cred-cache-directory");
if (s)
- ccachedir = strdup(s);
+ ccachedir = s;
s = conf_get_str("gssd", "preferred-realm");
if (s)
preferred_realm = s;
@@ -1070,8 +1070,7 @@
keytabfile = optarg;
break;
case 'd':
- free(ccachedir);
- ccachedir = strdup(optarg);
+ ccachedir = optarg;
break;
case 't':
context_timeout = atoi(optarg);
@@ -1134,6 +1133,7 @@
}
if (ccachedir) {
+ char *ccachedir_copy;
char *ptr;
for (ptr = ccachedir, i = 2; *ptr; ptr++)
@@ -1141,7 +1141,8 @@
i++;
ccachesearch = malloc(i * sizeof(char *));
- if (!ccachesearch) {
+ ccachedir_copy = strdup(ccachedir);
+ if (!ccachedir_copy || !ccachesearch) {
printerr(0, "malloc failure\n");
exit(EXIT_FAILURE);
}
@@ -1273,7 +1274,6 @@
free(preferred_realm);
free(ccachesearch);
- free(ccachedir);
return rc < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/gssd/gssd.h
^
|
@@ -39,7 +39,7 @@
#include <pthread.h>
#ifndef GSSD_PIPEFS_DIR
-#define GSSD_PIPEFS_DIR NFS_STATEDIR "/rpc_pipefs"
+#define GSSD_PIPEFS_DIR "/var/lib/nfs/rpc_pipefs"
#endif
#define DNOTIFY_SIGNAL (SIGRTMIN + 3)
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/gssd/krb5_util.c
^
|
@@ -673,8 +673,8 @@
*c = tolower(*c);
if (get_verbosity() && strcmp(inhost, outhost))
- printerr(1, "%s(0x%0lx): inhost '%s' different than outhost '%s'\n",
- __func__, tid, inhost, outhost);
+ printerr(1, "%s(0x%0lx): inhost '%s' different than outhost'%s'\n",
+ inhost, outhost);
retval = 0;
out:
@@ -1129,12 +1129,6 @@
*str = '\0';
*ret_princname = strdup(princstring);
*ret_realm = strdup(str+1);
- if (!*ret_princname || !*ret_realm) {
- free(*ret_princname);
- free(*ret_realm);
- *ret_princname = NULL;
- *ret_realm = NULL;
- }
}
k5_free_unparsed_name(context, princstring);
}
@@ -1356,19 +1350,15 @@
if (retval)
continue;
if (i + 1 > listsize) {
- char **tmplist;
listsize += listinc;
- tmplist = (char **)
+ l = (char **)
realloc(l, listsize * sizeof(char *));
- if (tmplist == NULL) {
- gssd_free_krb5_machine_cred_list(l);
+ if (l == NULL) {
retval = ENOMEM;
goto out_lock;
}
- l = tmplist;
}
if ((l[i++] = strdup(ple->ccname)) == NULL) {
- gssd_free_krb5_machine_cred_list(l);
retval = ENOMEM;
goto out_lock;
}
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/gssd/svcgssd.c
^
|
@@ -211,6 +211,9 @@
rpc_verbosity = conf_get_num("svcgssd", "RPC-Verbosity", rpc_verbosity);
idmap_verbosity = conf_get_num("svcgssd", "IDMAP-Verbosity", idmap_verbosity);
+ /* We don't need the config anymore */
+ conf_cleanup();
+
while ((opt = getopt(argc, argv, "fivrnp:")) != -1) {
switch (opt) {
case 'f':
@@ -295,9 +298,9 @@
(const gss_OID)GSS_C_NT_HOSTBASED_SERVICE);
if (status == FALSE) {
printerr(0, "unable to obtain root (machine) credentials\n");
- printerr(0, "do you have a keytab entry for %s in"
- "/etc/krb5.keytab?\n",
- principal ? principal : "nfs/<your.host>@<YOUR.REALM>");
+ printerr(0, "do you have a keytab entry for "
+ "nfs/<your.host>@<YOUR.REALM> in "
+ "/etc/krb5.keytab?\n");
exit(1);
}
} else {
@@ -325,9 +328,6 @@
daemon_ready();
- /* We don't need the config anymore */
- conf_cleanup();
-
nfs4_init_name_mapping(NULL); /* XXX: should only do this once */
rc = event_base_dispatch(evbase);
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/gssd/svcgssd.man
^
|
@@ -61,19 +61,6 @@
option. If set to any other value, that is used like the
.B -p
option.
-.TP
-.B verbosity
-Value which is equivalent to the number of
-.BR -v .
-.TP
-.B rpc-verbosity
-Value which is equivalent to the number of
-.BR -r .
-.TP
-.B idmap-verbosity
-Value which is equivalent to the number of
-.BR -i .
-
.SH SEE ALSO
.BR rpc.gssd(8),
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/gssd/svcgssd_krb5.c
^
|
@@ -46,7 +46,7 @@
#include "gss_oids.h"
#include "err_util.h"
#include "svcgssd_krb5.h"
-#include "version.h"
+#include "../mount/version.h"
#define MYBUFLEN 1024
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/idmapd/idmapd.c
^
|
@@ -73,7 +73,7 @@
#include "nfslib.h"
#ifndef PIPEFS_DIR
-#define PIPEFS_DIR NFS_STATEDIR "/rpc_pipefs/"
+#define PIPEFS_DIR "/var/lib/nfs/rpc_pipefs/"
#endif
#ifndef NFSD_DIR
@@ -474,7 +474,7 @@
event_free(svrdirev);
event_base_free(evbase);
- return 0;
+ return 1;
}
static void
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/idmapd/idmapd.man
^
|
@@ -24,13 +24,13 @@
upcalls, by translating user and group IDs to names, and vice versa.
.Pp
The system derives the
-.Em user
+.I user
part of the string by performing a password or group lookup.
The lookup mechanism is configured in
.Pa /etc/idmapd.conf
.Pp
By default, the
-.Em domain
+.I domain
part of the string is the system's DNS domain name.
It can also be specified in
.Pa /etc/idmapd.conf
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/Makefile.am
^
|
@@ -1,10 +1,8 @@
## Process this file with automake to produce Makefile.in
-# These binaries go in /sbin (not /usr/sbin), unless CONFIG_SBIN_OVERRIDE
-# is disabled as may be appropriate when /sbin is a symlink.
-# Note that we don't use "if CONFIG_SBIN_OVERRIDE" as that
-# causes autotools to notice the override and disable it.
-@CONFIG_SBIN_OVERRIDE_TRUE@sbindir = /sbin
+# These binaries go in /sbin (not /usr/sbin), and that cannot be
+# overridden at config time.
+sbindir = /sbin
man8_MANS = mount.nfs.man umount.nfs.man
man5_MANS = nfs.man
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/configfile.c
^
|
@@ -71,7 +71,7 @@
int mnt_alias_sz = (sizeof(mnt_alias_tab)/sizeof(mnt_alias_tab[0]));
static const char *version_keys[] = {
- "v3", "v4", "vers", "nfsvers", "minorversion", NULL
+ "v2", "v3", "v4", "vers", "nfsvers", "minorversion", NULL
};
static int strict;
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/mount.nfs.man
^
|
@@ -27,7 +27,7 @@
.BR mount.nfs4
must be used for mounting NFSv4 file systems while
.BR mount.nfs
-must be used for NFSv3.
+must be used for NFSv3 and v2.
.SH OPTIONS
.TP
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/network.c
^
|
@@ -97,7 +97,7 @@
};
static const char *nfs_version_opttbl[] = {
- "v2", /* no longer supported */
+ "v2",
"v3",
"v4",
"vers",
@@ -429,6 +429,10 @@
if (resvp) {
if (bindresvport(so, &laddr) < 0)
goto err_bindresvport;
+ } else {
+ cc = bind(so, SAFE_SOCKADDR(&laddr), namelen);
+ if (cc < 0)
+ goto err_bind;
}
if (type == SOCK_STREAM || (conn && type == SOCK_DGRAM)) {
cc = connect_to(so, SAFE_SOCKADDR(saddr), namelen,
@@ -460,6 +464,17 @@
close(so);
return RPC_ANYSOCK;
+err_bind:
+ rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+ rpc_createerr.cf_error.re_errno = errno;
+ if (verbose) {
+ nfs_error(_("%s: Unable to bind to %s socket: errno %d (%s)\n"),
+ progname, p_prot == IPPROTO_UDP ? _("UDP") : _("TCP"),
+ errno, strerror(errno));
+ }
+ close(so);
+ return RPC_ANYSOCK;
+
err_connect:
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = errno;
@@ -1275,7 +1290,7 @@
else if (found < 0)
return 1;
else if (found <= 2 ) {
- /* v3, v4 */
+ /* v2, v3, v4 */
version_val = version_key + 1;
version->v_mode = V_SPECIFIC;
} else if (found > 2 ) {
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/nfs.man
^
|
@@ -12,7 +12,7 @@
to allow file sharing between systems residing
on a local area network.
Depending on kernel configuration, the Linux NFS client may
-support NFS versions 3, 4.0, 4.1, or 4.2.
+support NFS versions 2, 3, 4.0, 4.1, or 4.2.
.P
The
.BR mount (8)
@@ -416,19 +416,6 @@
option may also be used by some pNFS drivers to decide how many
connections to set up to the data servers.
.TP 1.5i
-.BR max_connect= n
-While
-.BR nconnect
-option sets a limit on the number of connections that can be established
-to a given server IP,
-.BR max_connect
-option allows the user to specify maximum number of connections to different
-server IPs that belong to the same NFSv4.1+ server (session trunkable
-connections) up to a limit of 16. When client discovers that it established
-a client ID to an already existing server, instead of dropping the newly
-created network transport, the client will add this new connection to the
-list of available transports for that RPC client.
-.TP 1.5i
.BR rdirplus " / " nordirplus
Selects whether to use NFS v3 or v4 READDIRPLUS requests.
If this option is not specified, the NFS client uses READDIRPLUS requests
@@ -568,13 +555,6 @@
and <kernel_source>/Documentation/filesystems/caching
for detail on how to configure the FS-Cache facility.
Default value is nofsc.
-.TP 1.5i
-.B sloppy
-The
-.B sloppy
-option is an alternative to specifying
-.BR mount.nfs " -s " option.
-
.SS "Options for NFS versions 2 and 3 only"
Use these options, along with the options in the above subsection,
for NFS versions 2 and 3 only.
@@ -954,6 +934,11 @@
.BR nfsmount.conf(5)
for details.
.SH EXAMPLES
+To mount an export using NFS version 2,
+use the
+.B nfs
+file system type and specify the
+.B nfsvers=2
mount option.
To mount using NFS version 3,
use the
@@ -980,6 +965,13 @@
server:/export /mnt nfs defaults 0 0
.fi
.P
+Here is an example from an /etc/fstab file for an NFS version 2 mount over UDP.
+.P
+.nf
+.ta 8n +16n +6n +6n +30n
+ server:/export /mnt nfs nfsvers=2,proto=udp 0 0
+.fi
+.P
This example shows how to mount using NFS version 4 over TCP
with Kerberos 5 mutual authentication.
.P
@@ -1072,7 +1064,7 @@
can safely be allowed to default to the largest values supported by
both client and server, independent of the network's MTU size.
.SS "Using the mountproto mount option"
-This section applies only to NFS version 3 mounts
+This section applies only to NFS version 2 and version 3 mounts
since NFS version 4 does not use a separate protocol for mount
requests.
.P
@@ -1475,7 +1467,7 @@
mount option.
.SS "Using file locks with NFS"
The Network Lock Manager protocol is a separate sideband protocol
-used to manage file locks in NFS version 3.
+used to manage file locks in NFS version 2 and version 3.
To support lock recovery after a client or server reboot,
a second sideband protocol --
known as the Network Status Manager protocol --
@@ -1895,6 +1887,8 @@
.br
RFC 793 for the TCP specification.
.br
+RFC 1094 for the NFS version 2 specification.
+.br
RFC 1813 for the NFS version 3 specification.
.br
RFC 1832 for the XDR specification.
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/nfsmount.conf
^
|
@@ -28,7 +28,7 @@
# This statically named section defines global mount
# options that can be applied on all NFS mount.
#
-# Protocol Version [3,4]
+# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Defaultvers=4
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/nfsmount.conf.man
^
|
@@ -1,4 +1,4 @@
-.\" @(#)nfsmount.conf.5"
+."@(#)nfsmount.conf.5"
.TH NFSMOUNT.CONF 5 "16 December 2020"
.SH NAME
nfsmount.conf - Configuration file for NFS mounts
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mount/stropts.c
^
|
@@ -339,25 +339,16 @@
static int nfs_insert_sloppy_option(struct mount_options *options)
{
- if (linux_version_code() < MAKE_VERSION(2, 6, 27))
+ if (!sloppy || linux_version_code() < MAKE_VERSION(2, 6, 27))
return 1;
- if (po_contains(options, "sloppy")) {
- po_remove_all(options, "sloppy");
- sloppy++;
- }
-
- if (sloppy) {
- if (po_insert(options, "sloppy") == PO_FAILED)
- return 0;
- }
-
+ if (po_insert(options, "sloppy") == PO_FAILED)
+ return 0;
return 1;
}
static int nfs_set_version(struct nfsmount_info *mi)
{
-
if (!nfs_nfs_version(mi->type, mi->options, &mi->version))
return 0;
@@ -973,9 +964,7 @@
if ((result = nfs_try_mount_v3v2(mi, FALSE)))
return result;
- if (errno != EBUSY && errno != EACCES)
- errno = olderrno;
-
+ errno = olderrno;
return result;
}
@@ -1019,6 +1008,7 @@
}
switch (mi->version.major) {
+ case 2:
case 3:
result = nfs_try_mount_v3v2(mi, FALSE);
break;
@@ -1249,14 +1239,6 @@
if (!nfs_validate_options(mi))
return EX_FAIL;
- /*
- * NFS v2 has been deprecated
- */
- if (mi->version.major == 2) {
- mount_error(mi->spec, mi->node, EOPNOTSUPP);
- return EX_FAIL;
- }
-
/*
* Avoid retry and negotiation logic when remounting
*/
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mountd/mountd.man
^
|
@@ -286,9 +286,10 @@
section include
.BR TCP ,
.BR UDP ,
+.BR vers2 ,
.BR vers3 ", and"
.B vers4
-which each have the same meaning as given by
+which each have same same meaning as given by
.BR rpc.nfsd (8).
.SH TCP_WRAPPERS SUPPORT
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/mountd/rmtab.c
^
|
@@ -233,9 +233,6 @@
m->ml_directory = strdup(rep->r_path);
if (m->ml_hostname == NULL || m->ml_directory == NULL) {
- free(m->ml_hostname);
- free(m->ml_directory);
- free(m);
mountlist_freeall(mlist);
mlist = NULL;
xlog(L_ERROR, "%s: memory allocation failed",
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsd/nfsd.c
^
|
@@ -226,6 +226,7 @@
}
/* FALLTHRU */
case 3:
+ case 2:
NFSCTL_VERUNSET(versbits, c);
break;
default:
@@ -250,6 +251,7 @@
minorvers = minorversset = minormask;
/* FALLTHRU */
case 3:
+ case 2:
NFSCTL_VERSET(versbits, c);
break;
default:
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsd/nfsd.man
^
|
@@ -57,7 +57,7 @@
.B rpc.nfsd
does not offer certain versions of NFS. The current version of
.B rpc.nfsd
-can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
+can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
.TP
.B \-s " or " \-\-syslog
By default,
@@ -84,7 +84,7 @@
.B rpc.nfsd
offer certain versions of NFS. The current version of
.B rpc.nfsd
-can support major NFS versions 3,4 and the minor versions 4.0, 4.1 and 4.2.
+can support major NFS versions 2,3,4 and the minor versions 4.0, 4.1 and 4.2.
.TP
.B \-L " or " \-\-lease-time seconds
Set the lease-time used for NFSv4. This corresponds to how often
@@ -156,6 +156,8 @@
.B TCP
Enable or disable TCP support.
.TP
+.B vers2
+.TP
.B vers3
.TP
.B vers4
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsd/nfssvc.c
^
|
@@ -25,7 +25,7 @@
#include "nfslib.h"
#include "xlog.h"
#include "nfssvc.h"
-#include "version.h"
+#include "../mount/version.h"
#ifndef NFSD_FS_DIR
#define NFSD_FS_DIR "/proc/fs/nfsd"
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsdcld/nfsdcld.c
^
|
@@ -45,7 +45,7 @@
#include "cld.h"
#include "cld-internal.h"
#include "sqlite.h"
-#include "version.h"
+#include "../mount/version.h"
#include "conffile.h"
#include "legacy.h"
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsdcltrack/Makefile.am
^
|
@@ -1,11 +1,8 @@
## Process this file with automake to produce Makefile.in
-# These binaries go in /sbin (not /usr/sbin) as the kernel "knows" the
-# /sbin name. If /sbin is a symlink, CONFIG_SBIN_OVERRIDE can be
-# disabled to install in /usr/sbin anyway.
-# Note that we don't use "if CONFIG_SBIN_OVERRIDE" as that
-# causes autotools to notice the override and disable it.
-@CONFIG_SBIN_OVERRIDE_TRUE@sbindir = /sbin
+# These binaries go in /sbin (not /usr/sbin), and that cannot be
+# overridden at config time. The kernel "knows" the /sbin name.
+sbindir = /sbin
man8_MANS = nfsdcltrack.man
EXTRA_DIST = $(man8_MANS)
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsdcltrack/nfsdcltrack.c
^
|
@@ -33,7 +33,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
-#include <inttypes.h>
#include <unistd.h>
#include <libgen.h>
#include <sys/inotify.h>
@@ -508,7 +507,7 @@
{
int ret;
char *tail;
- uint64_t gracetime;
+ time_t gracetime;
ret = sqlite_prepare_dbh(storagedir);
@@ -526,7 +525,7 @@
if (*tail)
return -EINVAL;
- xlog(D_GENERAL, "%s: grace done. gracetime=%"PRIu64, __func__, gracetime);
+ xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime);
ret = sqlite_remove_unreclaimed(gracetime);
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsdcltrack/sqlite.c
^
|
@@ -46,7 +46,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
-#include <inttypes.h>
#include <unistd.h>
#include <sqlite3.h>
#include <linux/limits.h>
@@ -540,12 +539,12 @@
* remove any client records that were not reclaimed since grace_start.
*/
int
-sqlite_remove_unreclaimed(uint64_t grace_start)
+sqlite_remove_unreclaimed(time_t grace_start)
{
int ret;
char *err = NULL;
- ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %"PRIu64,
+ ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld",
grace_start);
if (ret < 0) {
return ret;
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsdcltrack/sqlite.h
^
|
@@ -26,7 +26,7 @@
int sqlite_remove_client(const unsigned char *clname, const size_t namelen);
int sqlite_check_client(const unsigned char *clname, const size_t namelen,
const bool has_session);
-int sqlite_remove_unreclaimed(const uint64_t grace_start);
+int sqlite_remove_unreclaimed(const time_t grace_start);
int sqlite_query_reclaiming(const time_t grace_start);
#endif /* _SQLITE_H */
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils-2.5.4+git2.tar.bz2/upstream/utils/nfsidmap/nfsidmap.man
^
|
@@ -2,7 +2,7 @@
.\"@(#)nfsidmap(8) - The NFS idmapper upcall program
.\"
.\" Copyright (C) 2010 Bryan Schumaker <bjschuma@netapp.com>
-.TH nfsidmap 8 "1 October 2010"
+.TH nfsidmap 5 "1 October 2010"
.SH NAME
nfsidmap \- The NFS idmapper upcall program
.SH SYNOPSIS
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/install-dep
^
|
@@ -1,21 +0,0 @@
-#!/bin/bash
-#install dependencies for compiling from source code
-
-#RHEL/Fedora/CentOS-Stream/Rocky
-command -v dnf >/dev/null || command -v yum >/dev/null && {
- yum install -y automake libtool make gcc rpcgen libtirpc-devel libevent-devel sqlite-devel device-mapper-devel \
- libblkid-devel krb5-devel libuuid-devel
-}
-
-#Debian/ubuntu
-command -v apt >/dev/null && {
- apt install -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 --ignore-missing -y \
- autotools-dev automake make libtool pkg-config libtirpc-dev libevent-dev libsqlite3-dev \
- libdevmapper-dev libblkid-dev libkrb5-dev libkeyutils-dev uuid-dev
-}
-
-#openSUSE Leap
-command -v zypper >/dev/null && {
- zypper in --no-recommends -y automake libtool make gcc rpcgen libtirpc-devel libevent-devel sqlite-devel \
- device-mapper-devel libblkid-devel krb5-devel libuuid-devel
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/support/include/version.h
^
|
-(symlink to ../../utils/mount/version.h)
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/systemd/50-nfs.conf
^
|
@@ -1,16 +0,0 @@
-# Ensure all NFS systctl settings get applied when modules load
-
-# sunrpc module supports "sunrpc.*" sysctls
-install sunrpc /sbin/modprobe --ignore-install sunrpc $CMDLINE_OPTS && { /sbin/sysctl -q --pattern sunrpc --system; exit 0; }
-
-# rpcrdma module supports sunrpc.svc_rdma.*
-install rpcrdma /sbin/modprobe --ignore-install rpcrdma $CMDLINE_OPTS && { /sbin/sysctl -q --pattern sunrpc.svc_rdma --system; exit 0; }
-
-# lockd module supports "fs.nfs.nlm*" and "fs.nfs.nsm*" sysctls
-install lockd /sbin/modprobe --ignore-install lockd $CMDLINE_OPTS && { /sbin/sysctl -q --pattern fs.nfs.n[sl]m --system; exit 0; }
-
-# nfsv4 module supports "fs.nfs.*" sysctls (nfs_callback_tcpport and idmap_cache_timeout)
-install nfsv4 /sbin/modprobe --ignore-install nfsv4 $CMDLINE_OPTS && { /sbin/sysctl -q --pattern 'fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout)' --system; exit 0; }
-
-# nfs module supports "fs.nfs.*" sysctls
-install nfs /sbin/modprobe --ignore-install nfs $CMDLINE_OPTS && { /sbin/sysctl -q --pattern fs.nfs --system; exit 0; }
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/systemd/rpc_pipefs.target.in
^
|
@@ -1,3 +0,0 @@
-[Unit]
-Requires=@_rpc_pipefsmount@
-After=@_rpc_pipefsmount@
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/systemd/var-lib-nfs-rpc_pipefs.mount.in
^
|
@@ -1,10 +0,0 @@
-[Unit]
-Description=RPC Pipe File System
-DefaultDependencies=no
-After=systemd-tmpfiles-setup.service
-Conflicts=umount.target
-
-[Mount]
-What=sunrpc
-Where=@_statedir@/rpc_pipefs
-Type=rpc_pipefs
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/nfsrahead/99-nfs.rules
^
|
@@ -1 +0,0 @@
-SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="/usr/libexec/nfsrahead %k", ATTR{read_ahead_kb}="%c"
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/nfsrahead/99-nfs.rules.in
^
|
@@ -1 +0,0 @@
-SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="_libexecdir_/nfsrahead %k", ATTR{read_ahead_kb}="%c"
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/nfsrahead/Makefile.am
^
|
@@ -1,16 +0,0 @@
-libexec_PROGRAMS = nfsrahead
-nfsrahead_SOURCES = main.c
-nfsrahead_LDFLAGS= -lmount
-nfsrahead_LDADD = ../../support/nfs/libnfsconf.la
-
-man5_MANS = nfsrahead.man
-EXTRA_DIST = $(man5_MANS)
-
-udev_rulesdir = /usr/lib/udev/rules.d/
-udev_rules_DATA = 99-nfs.rules
-
-99-nfs.rules: 99-nfs.rules.in $(builddefs)
- $(SED) "s|_libexecdir_|@libexecdir@|g" 99-nfs.rules.in > $@
-
-clean-local:
- $(RM) 99-nfs.rules
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/nfsrahead/main.c
^
|
@@ -1,192 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <libmount/libmount.h>
-#include <sys/sysmacros.h>
-
-#include "xlog.h"
-#include "conffile.h"
-
-#ifndef MOUNTINFO_PATH
-#define MOUNTINFO_PATH "/proc/self/mountinfo"
-#endif
-
-#define CONF_NAME "nfsrahead"
-#define NFS_DEFAULT_READAHEAD 128
-
-/* Device information from the system */
-struct device_info {
- char *device_number;
- dev_t dev;
- char *mountpoint;
- char *fstype;
-};
-
-/* Convert a string in the format n:m to a device number */
-static int fill_device_number(struct device_info *info)
-{
- char *s = strdup(info->device_number), *p;
- char *maj_s, *min_s;
- unsigned int maj, min;
- int err = -EINVAL;
-
- maj_s = p = s;
- for ( ; *p != ':' && *p != '\0'; p++)
- ;
-
- if (*p == '\0')
- goto out_free;
-
- err = 0;
- *p = '\0';
- min_s = p + 1;
-
- maj = strtol(maj_s, NULL, 10);
- min = strtol(min_s, NULL, 10);
-
- info->dev = makedev(maj, min);
-out_free:
- free(s);
- return err;
-}
-
-#define sfree(ptr) if (ptr) free(ptr)
-
-/* device_info maintenance */
-static void init_device_info(struct device_info *di, const char *device_number)
-{
- di->device_number = strdup(device_number);
- di->dev = 0;
- di->mountpoint = NULL;
- di->fstype = NULL;
-}
-
-
-static void free_device_info(struct device_info *di)
-{
- sfree(di->mountpoint);
- sfree(di->fstype);
- sfree(di->device_number);
-}
-
-static int get_mountinfo(const char *device_number, struct device_info *device_info, const char *mountinfo_path)
-{
- int ret = 0;
- struct libmnt_table *mnttbl;
- struct libmnt_fs *fs;
- char *target;
-
- init_device_info(device_info, device_number);
- if ((ret = fill_device_number(device_info)) < 0)
- goto out_free_device_info;
-
- mnttbl = mnt_new_table();
-
- if ((ret = mnt_table_parse_file(mnttbl, mountinfo_path)) < 0) {
- xlog(D_GENERAL, "Failed to parse %s\n", mountinfo_path);
- goto out_free_tbl;
- }
-
- if ((fs = mnt_table_find_devno(mnttbl, device_info->dev, MNT_ITER_FORWARD)) == NULL) {
- ret = ENOENT;
- goto out_free_tbl;
- }
-
- if ((target = (char *)mnt_fs_get_target(fs)) == NULL) {
- ret = ENOENT;
- goto out_free_fs;
- }
-
- device_info->mountpoint = strdup(target);
- target = (char *)mnt_fs_get_fstype(fs);
- if (target)
- device_info->fstype = strdup(target);
-
-out_free_fs:
- mnt_free_fs(fs);
-out_free_tbl:
- mnt_free_table(mnttbl);
-out_free_device_info:
- free(device_info->device_number);
- device_info->device_number = NULL;
- return ret;
-}
-
-static int get_device_info(const char *device_number, struct device_info *device_info)
-{
- int ret = ENOENT;
- for (int retry_count = 0; retry_count < 10 && ret != 0; retry_count++)
- ret = get_mountinfo(device_number, device_info, MOUNTINFO_PATH);
-
- return ret;
-}
-
-static int conf_get_readahead(const char *kind) {
- int readahead = 0;
-
- if((readahead = conf_get_num(CONF_NAME, kind, -1)) == -1)
- readahead = conf_get_num(CONF_NAME, "default", NFS_DEFAULT_READAHEAD);
-
- return readahead;
-}
-
-int main(int argc, char **argv)
-{
- int ret = 0, retry, opt;
- struct device_info device;
- unsigned int readahead = 128, log_level, log_stderr = 0;
-
-
- log_level = D_ALL & ~D_GENERAL;
- while((opt = getopt(argc, argv, "dF")) != -1) {
- switch (opt) {
- case 'd':
- log_level = D_ALL;
- break;
- case 'F':
- log_stderr = 1;
- break;
- }
- }
-
- conf_init_file(NFS_CONFFILE);
-
- xlog_stderr(log_stderr);
- xlog_syslog(~log_stderr);
- xlog_config(log_level, 1);
- xlog_open(CONF_NAME);
-
- // xlog_err causes the system to exit
- if ((argc - optind) != 1)
- xlog_err("expected the device number of a BDI; is udev ok?");
-
- for (retry = 0; retry <= 10; retry++ )
- if ((ret = get_device_info(argv[optind], &device)) == 0)
- break;
-
- if (ret != 0) {
- xlog(D_GENERAL, "unable to find device %s\n", argv[optind]);
- goto out;
- }
-
- if (strncmp("nfs", device.fstype, 3) != 0) {
- xlog(D_GENERAL,
- "not setting readahead for non supported fstype %s on device %s\n",
- device.fstype, argv[optind]);
- ret = -EINVAL;
- goto out;
- }
-
- readahead = conf_get_readahead(device.fstype);
-
- xlog(D_FAC7, "setting %s readahead to %d\n", device.mountpoint, readahead);
-
- printf("%d\n", readahead);
-
-out:
- free_device_info(&device);
- return ret;
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/nfsrahead/nfsrahead.man
^
|
@@ -1,72 +0,0 @@
-.\" Manpage for nfsrahead.
-.nh
-.ad l
-.TH man 5 "08 Mar 2022" "1.0" "nfsrahead man page"
-.SH NAME
-
-nfsrahead \- Configure the readahead for NFS mounts
-
-.SH SYNOPSIS
-
-nfsrahead [-F] [-d] <device>
-
-.SH DESCRIPTION
-
-\fInfsrahead\fR is a tool intended to be used with udev to set the \fIread_ahead_kb\fR parameter of NFS mounts, according to the configuration file (see \fICONFIGURATION\fR). \fIdevice\fR is the device number for the NFS backing device as provided by the kernel.
-
-.SH OPTIONS
-.TP
-.B -F
-Send messages to
-.I stderr
-instead of
-.I syslog
-
-.TP
-.B -d
-Increase the debugging level.
-
-.SH CONFIGURATION
-.I nfsrahead
-is configured in
-.IR /etc/nfs.conf ,
-in the section titled
-.IR nfsrahead .
-It accepts the following configurations.
-
-.TP
-.B nfs=<value>
-The readahead value applied to NFSv3 mounts.
-
-.TP
-.B nfs4=<value>
-The readahead value applied to NFSv4 mounts.
-
-.TP
-.B default=<value>
-The default configuration when none of the configurations above is set.
-
-.SH EXAMPLE CONFIGURATION
-[nfsrahead]
-.br
-nfs=15000 # readahead of 15000 for NFSv3 mounts
-.br
-nfs4=16000 # readahead of 16000 for NFSv4 mounts
-.br
-default=128 # default is 128
-
-.SH SEE ALSO
-
-.BR mount.nfs (8),
-.BR nfs (5),
-.BR nfs.conf (5),
-.BR udev (7),
-.BR bcc-readahead (8)
-
-.SH BUGS
-
-No known bugs.
-
-.SH AUTHOR
-
-Thiago Rafael Becker <trbecker@gmail.com>
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/rpcctl/Makefile.am
^
|
@@ -1,13 +0,0 @@
-## Process this file with automake to produce Makefile.in
-PYTHON_FILES = rpcctl.py
-
-man8_MANS = rpcctl.man
-
-EXTRA_DIST = $(man8_MANS) $(PYTHON_FILES)
-
-all-local: $(PYTHON_FILES)
-
-install-data-hook:
- $(INSTALL) -m 755 rpcctl.py $(DESTDIR)$(sbindir)/rpcctl
-
-MAINTAINERCLEANFILES=Makefile.in
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/rpcctl/rpcctl.man
^
|
@@ -1,67 +0,0 @@
-.\"
-.\" rpcctl(8)
-.\"
-.TH rpcctl 8 "15 Feb 2022"
-.SH NAME
-rpcctl \- Displays SunRPC connection information
-.SH SYNOPSIS
-.nf
-.BR rpcctl " [ \fB\-h \fR| \fB\-\-help \fR] { \fBclient \fR| \fBswitch \fR| \fBxprt \fR}"
-.P
-.BR "rpcctl client" " \fR[ \fB\-h \fR| \fB\-\-help \fR] { \fBshow \fR}"
-.BR "rpcctl client show " "\fR[ \fB\-h \f| \fB\-\-help \fR] [ \fIXPRT \fR]"
-.P
-.BR "rpcctl switch" " \fR[ \fB\-h \fR| \fB\-\-help \fR] { \fBset \fR| \fBshow \fR}"
-.BR "rpcctl switch set" " \fR[ \fB\-h \fR| \fB\-\-help \fR] \fISWITCH \fBdstaddr \fINEWADDR"
-.BR "rpcctl switch show" " \fR[ \fB\-h \fR| \fB\-\-help \fR] [ \fISWITCH \fR]"
-.P
-.BR "rpcctl xprt" " \fR[ \fB\-h \fR| \fB\-\-help \fR] { \fBremove \fR| \fBset \fR| \fBshow \fR}"
-.BR "rpcctl xprt remove" " \fR[ \fB\-h \fR| \fB\-\-help \fR] \fIXPRT"
-.BR "rpcctl xprt set" " \fR[ \fB\-h \fR| \fB\-\-help \fR] \fIXPRT \fR{ \fBdstaddr \fINEWADDR \fR| \fBoffline \fR| \fBonline \fR}"
-.BR "rpcctl xprt show" " \fR[ \fB\-h \fR| \fB\-\-help \fR] [ \fIXPRT \fR]"
-.fi
-.SH DESCRIPTION
-.RB "The " rpcctl " command displays information collected in the SunRPC sysfs files about the system's SunRPC objects.
-.P
-.SS rpcctl client \fR- \fBCommands operating on RPC clients
-.IP "\fBshow \fR[ \fICLIENT \fR] \fB(default)"
-Show detailed information about the RPC clients on this system.
-If \fICLIENT \fRwas provided, then only show information about a single RPC client.
-.P
-.SS rpcctl switch \fR- \fBCommands operating on groups of transports
-.IP "\fBset \fISWITCH \fBdstaddr \fINEWADDR"
-Change the destination address of all transports in the \fISWITCH \fRto \fINEWADDR\fR.
-\fINEWADDR \fRcan be an IP address, DNS name, or anything else resolvable by \fBgethostbyname\fR(3).
-.IP "\fBshow \fR[ \fISWITCH \fR] \fB(default)"
-Show detailed information about groups of transports on this system.
-If \fISWITCH \fRwas provided, then only show information about a single transport group.
-.P
-.SS rpcctl xprt \fR- \fBCommands operating on individual transports
-.IP "\fBremove \fIXPRT"
-Removes the specified \fIXPRT \fRfrom the system.
-Note that "main" transports cannot be removed.
-.P
-.IP "\fBset \fIXPRT \fBdstaddr \fINEWADDR"
-Change the destination address of the specified \fIXPRT \fR to \fINEWADDR\fR.
-\fINEWADDR \fRcan be an IP address, DNS name, or anything else resolvable by \fBgethostbyname\fR(3).
-.P
-.IP "\fBset \fIXPRT \fBoffline"
-Sets the specified \fIXPRT\fR's state to offline.
-.P
-.IP "\fBset \fIXPRT \fBonline"
-Sets the specified \fIXPRT\fR's state to online.
-.IP "\fBshow \fR[ \fIXPRT \fR] \fB(default)"
-Show detailed information about this system's transports.
-If \fIXPRT \fRwas provided, then only show information about a single transport.
-.SH EXAMPLES
-.IP "\fBrpcctl switch show switch-2"
-Show details about the RPC switch named "switch-2".
-.IP "\fBrpcctl xprt remove xprt-4"
-Remove the xprt named "xprt-4" from the system.
-.IP "\fBrpcctl xprt set xprt-3 dstaddr https://linux-nfs.org
-Change the dstaddr of the xprt named "xprt-3" to point to linux-nfs.org
-.SH DIRECTORY
-.TP
-.B /sys/kernel/sunrpc/
-.SH AUTHOR
-Anna Schumaker <Anna.Schumaker@Netapp.com>
|
[-]
[+]
|
Deleted |
_service:tar_git:nfs-utils-2.6.2+git3.tar.bz2/upstream/tools/rpcctl/rpcctl.py
^
|
@@ -1,262 +0,0 @@
-#!/usr/bin/python3
-import argparse
-import collections
-import errno
-import os
-import pathlib
-import socket
-import sys
-
-with open("/proc/mounts", 'r') as f:
- mount = [ line.split()[1] for line in f if "sysfs" in line ]
- if len(mount) == 0:
- print("ERROR: sysfs is not mounted")
- sys.exit(1)
-
-sunrpc = pathlib.Path(mount[0]) / "kernel" / "sunrpc"
-if not sunrpc.is_dir():
- print("ERROR: sysfs does not have sunrpc directory")
- sys.exit(1)
-
-def read_addr_file(path):
- try:
- with open(path, 'r') as f:
- return f.readline().strip()
- except:
- return "(enoent)"
-
-def write_addr_file(path, newaddr):
- with open(path, 'w') as f:
- f.write(newaddr)
- return read_addr_file(path)
-
-def read_info_file(path):
- res = collections.defaultdict(int)
- try:
- with open(path) as info:
- lines = [ l.split("=", 1) for l in info if "=" in l ]
- res.update({ key:int(val.strip()) for (key, val) in lines })
- finally:
- return res
-
-
-class Xprt:
- def __init__(self, path):
- self.path = path
- self.name = path.stem.rsplit("-", 1)[0]
- self.type = path.stem.split("-")[2]
- self.info = read_info_file(path / "xprt_info")
- self.dstaddr = read_addr_file(path / "dstaddr")
- self.srcaddr = read_addr_file(path / "srcaddr")
- self.read_state()
-
- def __lt__(self, rhs):
- return self.name < rhs.name
-
- def _xprt(self):
- main = ", main" if self.info.get("main_xprt") else ""
- return f"{self.name}: {self.type}, {self.dstaddr}, " \
- f"port {self.info['dst_port']}, state <{self.state}>{main}"
-
- def _src_reqs(self):
- return f" Source: {self.srcaddr}, port {self.info['src_port']}, " \
- f"Requests: {self.info['num_reqs']}"
-
- def _cong_slots(self):
- return f" Congestion: cur {self.info['cur_cong']}, win {self.info['cong_win']}, " \
- f"Slots: min {self.info['min_num_slots']}, max {self.info['max_num_slots']}"
-
- def _queues(self):
- return f" Queues: binding {self.info['binding_q_len']}, " \
- f"sending {self.info['sending_q_len']}, pending {self.info['pending_q_len']}, " \
- f"backlog {self.info['backlog_q_len']}, tasks {self.info['tasks_queuelen']}"
-
- def __str__(self):
- if not self.path.exists():
- return f"{self.name}: has been removed"
- return "\n".join([self._xprt(), self._src_reqs(),
- self._cong_slots(), self._queues() ])
-
- def read_state(self):
- if self.path.exists():
- with open(self.path / "xprt_state") as f:
- self.state = ','.join(f.readline().split()[1:])
-
- def small_str(self):
- main = " [main]" if self.info.get("main_xprt") else ""
- return f"{self.name}: {self.type}, {self.dstaddr}{main}"
-
- def set_dstaddr(self, newaddr):
- self.dstaddr = write_addr_file(self.path / "dstaddr", newaddr)
-
- def set_state(self, state):
- if self.info.get("main_xprt"):
- raise Exception(f"Main xprts cannot be set {state}")
- with open(self.path / "xprt_state", 'w') as f:
- f.write(state)
- self.read_state()
-
- def remove(self):
- if self.info.get("main_xprt"):
- raise Exception("Main xprts cannot be removed")
- self.set_state("offline")
- self.set_state("remove")
-
- def add_command(subparser):
- parser = subparser.add_parser("xprt", help="Commands for individual xprts")
- parser.set_defaults(func=Xprt.show, xprt=None)
- subparser = parser.add_subparsers()
-
- remove = subparser.add_parser("remove", help="Remove an xprt")
- remove.add_argument("xprt", metavar="XPRT", nargs=1,
- help="Name of the xprt to remove")
- remove.set_defaults(func=Xprt.set_property, property="remove")
-
- show = subparser.add_parser("show", help="Show xprts")
- show.add_argument("xprt", metavar="XPRT", nargs='?',
- help="Name of a specific xprt to show")
- show.set_defaults(func=Xprt.show)
-
- set = subparser.add_parser("set", help="Change an xprt property")
- set.add_argument("xprt", metavar="XPRT", nargs=1,
- help="Name of a specific xprt to modify")
- subparser = set.add_subparsers(required=True)
- online = subparser.add_parser("online", help="Set an xprt online")
- online.set_defaults(func=Xprt.set_property, property="online")
- offline = subparser.add_parser("offline", help="Set an xprt offline")
- offline.set_defaults(func=Xprt.set_property, property="offline")
- dstaddr = subparser.add_parser("dstaddr", help="Change an xprt's dstaddr")
- dstaddr.add_argument("newaddr", metavar="NEWADDR", nargs=1,
- help="The new address for the xprt")
- dstaddr.set_defaults(func=Xprt.set_property, property="dstaddr")
-
- def get_by_name(name):
- glob = f"**/{name}-*" if name else "**/xprt-*"
- res = [ Xprt(x) for x in (sunrpc / "xprt-switches").glob(glob) ]
- if name and len(res) == 0:
- raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT),
- f"{sunrpc / 'xprt-switches' / glob}")
- return sorted(res)
-
- def show(args):
- for xprt in Xprt.get_by_name(args.xprt):
- print(xprt)
-
- def set_property(args):
- for xprt in Xprt.get_by_name(args.xprt[0]):
- if args.property == "dstaddr":
- xprt.set_dstaddr(socket.gethostbyname(args.newaddr[0]))
- elif args.property == "remove":
- xprt.remove()
- else:
- xprt.set_state(args.property)
- print(xprt)
-
-
-class XprtSwitch:
- def __init__(self, path, sep=":"):
- self.path = path
- self.name = path.stem
- self.info = read_info_file(path / "xprt_switch_info")
- self.xprts = sorted([ Xprt(p) for p in self.path.iterdir() if p.is_dir() ])
- self.sep = sep
-
- def __lt__(self, rhs):
- return self.name < rhs.name
-
- def __str__(self):
- switch = f"{self.name}{self.sep} " \
- f"xprts {self.info['num_xprts']}, " \
- f"active {self.info['num_active']}, " \
- f"queue {self.info['queue_len']}"
- xprts = [ f" {x.small_str()}" for x in self.xprts ]
- return "\n".join([ switch ] + xprts)
-
- def add_command(subparser):
- parser = subparser.add_parser("switch", help="Commands for xprt switches")
- parser.set_defaults(func=XprtSwitch.show, switch=None)
- subparser = parser.add_subparsers()
-
- show = subparser.add_parser("show", help="Show xprt switches")
- show.add_argument("switch", metavar="SWITCH", nargs='?',
- help="Name of a specific switch to show")
- show.set_defaults(func=XprtSwitch.show)
-
- set = subparser.add_parser("set", help="Change an xprt switch property")
- set.add_argument("switch", metavar="SWITCH", nargs=1,
- help="Name of a specific xprt switch to modify")
- subparser = set.add_subparsers(required=True)
- dstaddr = subparser.add_parser("dstaddr", help="Change an xprt switch's dstaddr")
- dstaddr.add_argument("newaddr", metavar="NEWADDR", nargs=1,
- help="The new address for the xprt switch")
- dstaddr.set_defaults(func=XprtSwitch.set_property, property="dstaddr")
-
- def get_by_name(name):
- xprt_switches = sunrpc / "xprt-switches"
- if name:
- return [ XprtSwitch(xprt_switches / name) ]
- return [ XprtSwitch(f) for f in sorted(xprt_switches.iterdir()) ]
-
|
[-]
[+]
|
Changed |
_service:tar_git:nfs-utils.yaml
^
|
@@ -1,7 +1,6 @@
Name: nfs-utils
Summary: NFS client and server daemons
-Version: 2.6.2
-Release: 0
+Version: 2.5.4
Group: System
License: GPLv2
Sources:
@@ -12,11 +11,7 @@
%{summary}.
%if "%{?vendor}" == "chum"
- Note that in order to use NFS, you need a kernel that supports it.
- Some SailfishOS devices do, some do not. The Gemini for example does, the XPeria 10III does not.
-
PackageName: NFS Utils
- PackagerName: nephros
Categories:
- Network
- Filesystem
@@ -26,9 +21,9 @@
Help: https://wiki.linux-nfs.org/wiki/index.php/Nfsv4_configuration
Bugtracker: https://bugzilla.linux-nfs.org
%endif
-#Patches:
-# # from 2.5.5_rcX: do not hardcode systemd paths:
-# - systemd-Makefile.am.patch
+Patches:
+ # from 2.5.5_rcX: do not hardcode systemd paths:
+ - systemd-Makefile.am.patch
SetupOptions: -q -n %{name}-%{version}/upstream
ConfigOptions:
- '--with-gnu-ld'
@@ -53,7 +48,6 @@
# libnfsidmap
- libtirpc
- uuid
- - mount
- systemd
Files:
@@ -65,9 +59,6 @@
- '%{_unitdir}/*'
- '%{_systemdgeneratordir}/*'
- '%{_sharedstatedir}/nfs'
- - '%{_udevrulesdir}/99-nfs.rules'
- - '%{_prefix}/lib/modprobe.d/50-nfs.conf'
- - '%{_libexecdir}/nfsrahead'
SubPackages:
- Name: doc
Summary: Documentation files for %{name}
|