From: LaMont Jones Date: Sun, 8 Jul 2007 23:08:23 +0000 (-0600) Subject: v2.12r-13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24cd8f52ea0d366c41f881909b659113562c2031;p=util-linux v2.12r-13 --- diff --git a/debian/changelog b/debian/changelog index ef98a299..035ec244 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +util-linux (2.12r-13) unstable; urgency=low + + * NFS seems to not like 127.0.0.1 as a client ID for everyone. + Closes: #394941 + - 30nfs4-setclientid.dpatch by Steinar H. Gunderson + * Move hwclock.sh to 8 since localtime is now a file, not a symlink. + Adds Depends: tzdata (>=2006c-2) + Closes: #342887 + * ship rdev on amd64. Closes: #297789 + + -- LaMont Jones Tue, 31 Oct 2006 13:51:50 -0700 + util-linux (2.12r-12) unstable; urgency=low * drop hwclockfirst.sh, and put hwclock.sh back at 50. See #50572 and diff --git a/debian/control b/debian/control index e41275f1..a73b42db 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Pre-Depends: ${util-linux:Depends} Section: utils Priority: required Essential: yes -Depends: lsb-base (>= 3.0-6) +Depends: lsb-base (>= 3.0-6), tzdata (>=2006c-2) Suggests: util-linux-locales, kbd | console-tools, dosfstools Replaces: miscutils, setterm, fdisk, ${util-linux:Conflicts} Conflicts: setterm, fdisk, kbd (<< 1.05-3), console-tools (<< 1:0.2.3-21), ${util-linux:Conflicts} diff --git a/debian/patches/00list b/debian/patches/00list index 3e4e8069..6f6d4bc2 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,4 +1,5 @@ 10agetty +10amd64-rdev 10cal-widechar 10cfdisk 10cramfs-udebsize @@ -12,6 +13,7 @@ 20guesshelper 30nfs4 30nfs4-fix +30nfs4-setclientid #20xgethostname #50hurd 60_opt_O1 diff --git a/debian/patches/10amd64-rdev.dpatch b/debian/patches/10amd64-rdev.dpatch new file mode 100644 index 00000000..96ec7dd0 --- /dev/null +++ b/debian/patches/10amd64-rdev.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10-amd64-rdev.dpatch by Frederik Schüler +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: hacking "architecture detection" to get rdev on amd64 too. + +@DPATCH@ +--- util-linux/MCONFIG.old 2005-03-02 23:14:51.424457925 +0100 ++++ util-linux/MCONFIG 2005-03-02 23:22:06.749245047 +0100 +@@ -17,7 +17,7 @@ + # Select for CPU i386 if the binaries must be able to run on an intel 386 + # (by default i486 code is generated, see below) + CPU=$(shell uname -m) +-ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') ++ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/;s/x86_64/intel/') + + # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp + # will use PAM for authentication. Additionally, passwd will not be diff --git a/debian/patches/30nfs4-setclientid.dpatch b/debian/patches/30nfs4-setclientid.dpatch new file mode 100644 index 00000000..1229e448 --- /dev/null +++ b/debian/patches/30nfs4-setclientid.dpatch @@ -0,0 +1,105 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 30nfs4-setclientid.dpatch by Steinar H. Gunderson , +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Get a more sensible client ID; based on a patch by Neil +## DP: Brown found at: +## DP: http://linux-nfs.org/pipermail/nfsv4/2006-June/004462.html + +@DPATCH@ +--- a/mount/nfsmount.c ++++ b/mount/nfsmount.c +@@ -111,7 +111,7 @@ + + static int nfs_call_umount(clnt_addr_t *mnt_server, dirpath *argp); + +-int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int); ++int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int, struct sockaddr_in *caddr); + + /* Convert RPC errors into strings */ + void rpc_strerror(void) +@@ -118,7 +118,7 @@ int get_socket(struct sockaddr_in *saddr + */ + int + clnt_ping(struct sockaddr_in *saddr, const u_long prog, const u_long vers, +- const u_int prot) ++ const u_int prot, struct sockaddr_in *caddr) + { + CLIENT *clnt=NULL; + int sock, stat; +@@ -160,4 +160,13 @@ clnt_ping(struct sockaddr_in *saddr, con + clnt_destroy(clnt); + close(sock); ++ if (sock != -1) { ++ if (caddr) { ++ /* Get the address of our end of this connection */ ++ int len = sizeof(*caddr); ++ if (getsockname(sock, caddr, &len) != 0) ++ caddr->sin_family = 0; ++ } ++ close(sock); ++ } + if (stat != RPC_PROGVERSMISMATCH) + return 1; +--- a/mount/nfs4mount.c ++++ b/mount/nfs4mount.c +@@ -76,7 +76,7 @@ + #define NFS_PORT 2049 + #endif + +-extern int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int); ++extern int clnt_ping(struct sockaddr_in *, const u_long, const u_long, const u_int, struct sockaddr_in *caddr); + extern void rpc_strerror(void); + + struct { +@@ -189,9 +189,10 @@ int nfs4mount(const char *spec, const ch + static struct nfs4_mount_data data; + static char hostdir[1024]; + static char ip_addr[16] = "127.0.0.1"; +- static struct sockaddr_in server_addr; ++ static struct sockaddr_in server_addr, client_addr; + static int pseudoflavour[MAX_USER_FLAVOUR]; + int num_flavour = 0; ++ int ip_addr_in_opts = 0; + + char *hostname, *dirname, *old_opts; + char new_opts[1024]; +@@ -302,6 +303,7 @@ int nfs4mount(const char *spec, const ch + opteq+1); + strncpy(ip_addr,opteq+1, sizeof(ip_addr)); + ip_addr[sizeof(ip_addr)-1] = '\0'; ++ ip_addr_in_opts = 1; + } else if (!strcmp(opt, "sec")) { + num_flavour = parse_sec(opteq+1, pseudoflavour); + if (!num_flavour) +@@ -412,7 +414,18 @@ #endif + + data.version = NFS4_MOUNT_VERSION; + +- clnt_ping(&server_addr, NFS_PROGRAM, 4, data.proto); ++ client_addr.sin_family = 0; ++ client_addr.sin_addr.s_addr = 0; ++ clnt_ping(&server_addr, NFS_PROGRAM, 4, data.proto, &client_addr); ++ if (rpc_createerr.cf_stat == RPC_SUCCESS) { ++ if (!ip_addr_in_opts && ++ client_addr.sin_family != 0 && ++ client_addr.sin_addr.s_addr != 0) { ++ snprintf(ip_addr, sizeof(ip_addr), "%s", ++ inet_ntoa(client_addr.sin_addr)); ++ data.client_addr.len = strlen(ip_addr); ++ } ++ } + if (rpc_createerr.cf_stat) { + fprintf(stderr, "mount to NFS server '%s' failed.\n", data.hostname.data); + goto fail; +--- a/mount/nfsmount.c ++++ b/mount/nfsmount.c +@@ -376,7 +376,7 @@ probe_port(clnt_addr_t *server, + break; + } + saddr->sin_port = htons(p_port); +- if (clnt_ping(saddr, prog, *p_vers, *p_prot)) ++ if (clnt_ping(saddr, prog, *p_vers, *p_prot, NULL)) + goto out_ok; + if (!prot) { + if (*++p_prot) diff --git a/debian/postinst b/debian/postinst index 287a7137..3f9483e3 100644 --- a/debian/postinst +++ b/debian/postinst @@ -26,7 +26,7 @@ if [ "$(uname -s)" = "Linux" ]; then model=$(uname -m) if [ ${model%x} != "s390" ]; then update-rc.d -f hwclock.sh remove 2>/dev/null > /dev/null - update-rc.d hwclock.sh start 50 S . stop 25 0 6 . > /dev/null + update-rc.d hwclock.sh start 8 S . stop 25 0 6 . > /dev/null update-rc.d -f hwclockfirst.sh remove 2>/dev/null > /dev/null #update-rc.d hwclockfirst.sh start 18 S . > /dev/null fi diff --git a/debian/rules b/debian/rules index 7d6ae9b7..2a32c526 100755 --- a/debian/rules +++ b/debian/rules @@ -22,6 +22,7 @@ export arch = $(DEB_HOST_ARCH) version := $(shell sed -e '1{;s|^util-linux (\(.*\))\ .*|\1|;q;}' debian/changelog) fdisk_arch = $(findstring $(arch),alpha i386 powerpc ppc64 arm mips mipsel hppa ia64 hurd-i386 amd64 s390) +rdev_arch = $(findstring $(arch),i386 amd64) sparc = $(findstring $(arch),sparc sparc64) nohwclock = $(findstring $(arch),s390) @@ -155,7 +156,7 @@ SBINFILES := $(SBINFILES) fdisk/fdisk MAN8FILES := $(MAN8FILES) fdisk/fdisk.8 DOCFILES := $(DOCFILES) fdisk/README.fdisk endif -ifeq ($(arch),i386) +ifeq ($(arch),$(rdev_arch)) USBINFILES:= $(USBINFILES) sys-utils/rdev MAN8FILES := $(MAN8FILES) sys-utils/{rdev.8,vidmode.8} \ sys-utils/{ramsize.8,rootflags.8} @@ -182,7 +183,7 @@ binary-arch: checkroot build $(INITFILES) install $(UBINFILES2) debian/tmp/usr/bin ifneq ($(USBINFILES),) install -s $(USBINFILES) debian/tmp/usr/sbin -ifeq ($(arch), i386) +ifeq ($(arch),$(rdev_arch)) ln -s rdev debian/tmp/usr/sbin/ramsize ln -s rdev debian/tmp/usr/sbin/vidmode ln -s rdev debian/tmp/usr/sbin/rootflags