From: LaMont Jones Date: Sun, 8 Jul 2007 23:08:52 +0000 (-0600) Subject: v2.12r-16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaab37299119e6162816c6d79e62c7f16520d73e;p=util-linux v2.12r-16 --- diff --git a/debian/changelog b/debian/changelog index 22467d39..94a74365 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +util-linux (2.12r-16) unstable; urgency=low + + * actually apply 30swsusp-resume. And support userspace sw susp too. + Closes: #406204 + * Fix off-by-one issue in agetty -I. Closes: #392445 + * Drop extraneous "again" from hwclock.sh and remove references to + hwclockfirst.sh. Closes: #396755 + * Drop PAGE_SIZE usage completely, use sysconf(_SC_PAGESIZE). + * Make intr the default for NFS v2 & v3 mounts in addition to being the + default for NFS v4. Thanks to Tollef Fog Heen for the idea. + + -- LaMont Jones Wed, 17 Jan 2007 11:57:35 -0700 + util-linux (2.12r-15) unstable; urgency=low * New amd64 rdev patch. Closes: #396842 diff --git a/debian/control b/debian/control index a73b42db..87ac76f3 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: base Priority: required Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4-1), gettext, zlib1g-dev, libblkid-dev, uuid-dev, dpatch, dpkg-dev (>=1.13.12) Maintainer: LaMont Jones -Standards-Version: 3.6.2.0 +Standards-Version: 3.7.2.0 Package: util-linux Architecture: any diff --git a/debian/hwclock.sh b/debian/hwclock.sh index 9f3d47f5..75882d32 100644 --- a/debian/hwclock.sh +++ b/debian/hwclock.sh @@ -16,10 +16,6 @@ # before changing this file. You risk serious clock # misbehaviour otherwise. -FIRST=no # debian/rules sets this to 'yes' when creating hwclockfirst.sh - -[ "X$FIRST" = "Xyes" ] && AGAIN="" || AGAIN=" again" - # Set this to any options you might need to give to hwclock, such # as machine hardware clock type for Alphas. HWCLOCKPARS= @@ -36,12 +32,6 @@ hwclocksh() case "$UTC" in no|"") GMT="--localtime" UTC="" - if [ "X$FIRST" = "Xyes" ] && [ ! -r /etc/localtime ]; then - if [ -z "$TZ" ]; then - log_action_msg "System clock was not updated at this time" - return 1 - fi - fi ;; yes) GMT="--utc" UTC="--utc" @@ -61,56 +51,37 @@ hwclocksh() echo "0.0 0 0.0" > /etc/adjtime fi - if [ "$FIRST" != yes ]; then - # Uncomment the hwclock --adjust line below if you want - # hwclock to try to correct systematic drift errors in the - # Hardware Clock. - # - # WARNING: If you uncomment this option, you must either make - # sure *nothing* changes the Hardware Clock other than - # hwclock --systohc, or you must delete /etc/adjtime - # every time someone else modifies the Hardware Clock. - # - # Common "vilains" are: ntp, MS Windows, the BIOS Setup - # program. - # - # WARNING: You must remember to invalidate (delete) - # /etc/adjtime if you ever need to set the system clock - # to a very different value and hwclock --adjust is being - # used. - # - # Please read /usr/share/doc/util-linux/README.Debian.hwclock - # before enablig hwclock --adjust. + # Uncomment the hwclock --adjust line below if you want + # hwclock to try to correct systematic drift errors in the + # Hardware Clock. + # + # WARNING: If you uncomment this option, you must either make + # sure *nothing* changes the Hardware Clock other than + # hwclock --systohc, or you must delete /etc/adjtime + # every time someone else modifies the Hardware Clock. + # + # Common "vilains" are: ntp, MS Windows, the BIOS Setup + # program. + # + # WARNING: You must remember to invalidate (delete) + # /etc/adjtime if you ever need to set the system clock + # to a very different value and hwclock --adjust is being + # used. + # + # Please read /usr/share/doc/util-linux/README.Debian.hwclock + # before enablig hwclock --adjust. - #hwclock --adjust $GMT $BADYEAR - : - fi + #hwclock --adjust $GMT $BADYEAR + : if [ "$HWCLOCKACCESS" != no ]; then - log_action_msg "Setting the system clock$AGAIN." + log_action_msg "Setting the system clock." # Copies Hardware Clock time to System Clock using the correct # timezone for hardware clocks in local time, and sets kernel # timezone. DO NOT REMOVE. /sbin/hwclock --hctosys $GMT $HWCLOCKPARS $BADYEAR - if [ "$FIRST" = yes ]; then - # Copies Hardware Clock time to System Clock using the correct - # timezone for hardware clocks in local time, and sets kernel - # timezone. DO NOT REMOVE. - if [ -z "$TZ" ]; then - /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS $BADYEAR - else - TZ="$TZ" /sbin/hwclock --noadjfile --hctosys $GMT $HWCLOCKPARS $BADYEAR - fi - - if /sbin/hwclock --show $GMT $HWCLOCKPARS $BADYEAR 2>&1 > /dev/null | - grep -q '^The Hardware Clock registers contain values that are either invalid'; then - echo "Invalid system date -- setting to 1/1/2002" - /sbin/hwclock --set --date '1/1/2002 00:00:00' $GMT $HWCLOCKPARS $BADYEAR - fi - fi - # Announce the local time. verbose_log_action_msg "System Clock set. Local time: `date $UTC`" else @@ -118,9 +89,6 @@ hwclocksh() fi ;; stop|restart|reload|force-reload) - if [ "X$FIRST" = "Xyes" ]; then - return 0 - fi # # Updates the Hardware Clock with the System Clock time. # This will *override* any changes made to the Hardware Clock. diff --git a/debian/patches/00list b/debian/patches/00list index 6f6d4bc2..ebf9130a 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -13,8 +13,11 @@ 20guesshelper 30nfs4 30nfs4-fix +30nfs4-intr-default 30nfs4-setclientid +30swsusp-resume #20xgethostname #50hurd 60_opt_O1 65_llseek-syscall +65page_size diff --git a/debian/patches/10agetty.dpatch b/debian/patches/10agetty.dpatch index c0fe283e..e40ef9a2 100755 --- a/debian/patches/10agetty.dpatch +++ b/debian/patches/10agetty.dpatch @@ -7,9 +7,9 @@ ## DP: code trying to interoperate better with gdm. @DPATCH@ -diff -urNad util-linux/login-utils/agetty.c /tmp/dpep.hTGWc1/util-linux/login-utils/agetty.c ---- util-linux/login-utils/agetty.c 2004-12-15 17:12:15.678862928 -0700 -+++ /tmp/dpep.hTGWc1/util-linux/login-utils/agetty.c 2004-12-15 17:15:56.246450201 -0700 +diff -urNad 2.12r-16~/login-utils/agetty.c 2.12r-16/login-utils/agetty.c +--- 2.12r-16~/login-utils/agetty.c 2006-12-19 09:02:16.000000000 -0700 ++++ 2.12r-16/login-utils/agetty.c 2007-01-09 11:21:56.000000000 -0700 @@ -30,6 +30,8 @@ #include #include @@ -19,6 +19,15 @@ diff -urNad util-linux/login-utils/agetty.c /tmp/dpep.hTGWc1/util-linux/login-ut #include "xstrncpy.h" #include "nls.h" +@@ -402,7 +404,7 @@ + while (isascii(c = getopt(argc, argv, "I:LH:f:hil:mt:wn"))) { + switch (c) { + case 'I': +- if (!(op->initstring = malloc(strlen(optarg)))) { ++ if (!(op->initstring = malloc(strlen(optarg)+1))) { + error(_("can't malloc initstring")); + break; + } @@ -652,6 +654,91 @@ if ((st.st_mode & S_IFMT) != S_IFCHR) error(_("/dev/%s: not a character device"), tty); diff --git a/debian/patches/10amd64-rdev.dpatch b/debian/patches/10amd64-rdev.dpatch old mode 100644 new mode 100755 diff --git a/debian/patches/30nfs4-intr-default.dpatch b/debian/patches/30nfs4-intr-default.dpatch new file mode 100755 index 00000000..1479102e --- /dev/null +++ b/debian/patches/30nfs4-intr-default.dpatch @@ -0,0 +1,40 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 30nfs4-intr-default.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad 2.12r-16~/mount/nfs.5 2.12r-16/mount/nfs.5 +--- 2.12r-16~/mount/nfs.5 2007-01-17 10:36:22.000000000 -0700 ++++ 2.12r-16/mount/nfs.5 2007-01-17 10:39:37.000000000 -0700 +@@ -214,7 +214,7 @@ + .I intr + If an NFS file operation has a major timeout and it is hard mounted, + then allow signals to interupt the file operation and cause it to +-return EINTR to the calling program. The default is to not ++return EINTR to the calling program. The default is to + allow file operations to be interrupted. + .TP 1.5i + .I posix +@@ -395,7 +395,7 @@ + .I intr + If an NFS file operation has a major timeout and it is hard mounted, + then allow signals to interupt the file operation and cause it to +-return EINTR to the calling program. The default is to not ++return EINTR to the calling program. The default is to + allow file operations to be interrupted. + .TP 1.5i + .I nocto +diff -urNad 2.12r-16~/mount/nfsmount.c 2.12r-16/mount/nfsmount.c +--- 2.12r-16~/mount/nfsmount.c 2007-01-17 10:36:23.000000000 -0700 ++++ 2.12r-16/mount/nfsmount.c 2007-01-17 10:38:45.000000000 -0700 +@@ -572,7 +572,7 @@ + char *mounthost = NULL; + char cbuf[128]; + +- data->flags = 0; ++ data->flags = NFS_MOUNT_INTR; + *bg = 0; + + len = strlen(new_opts); diff --git a/debian/patches/30nfs4-setclientid.dpatch b/debian/patches/30nfs4-setclientid.dpatch old mode 100644 new mode 100755 diff --git a/debian/patches/30swsusp-resume.dpatch b/debian/patches/30swsusp-resume.dpatch old mode 100644 new mode 100755 index fe02711b..e05a6748 --- a/debian/patches/30swsusp-resume.dpatch +++ b/debian/patches/30swsusp-resume.dpatch @@ -10,7 +10,7 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/get_label_uuid.c /tmp/dpep-work.5ak7Cm/util-linux/mount/get_label_uuid.c --- ./mount/get_label_uuid.c 2004-12-22 08:44:32.000000000 -0700 +++ /tmp/dpep-work.5ak7Cm/util-linux/mount/get_label_uuid.c 2005-12-06 11:54:33.000000000 -0700 -@@ -93,7 +93,24 @@ +@@ -93,7 +93,25 @@ } return 0; } @@ -25,7 +25,8 @@ diff -urNad --exclude=CVS --exclude=.svn ./mount/get_label_uuid.c /tmp/dpep-work + if (lseek(fd, 0, SEEK_SET) == 0 + && read(fd, buf, n) == n + && (strncmp(buf+n-10, "S1SUSPEND", 9)==0 || -+ strncmp(buf+n-10, "S2SUSPEND", 9)==0) ++ strncmp(buf+n-10, "S2SUSPEND", 9)==0 || ++ strncmp(buf+n-10, "ULSUSPEND", 9)==0) + && p->version == 1) { + store_uuid(uuid, p->uuid); + store_label(label, p->volume_name, 16); diff --git a/debian/patches/65page_size.dpatch b/debian/patches/65page_size.dpatch new file mode 100755 index 00000000..7f60778d --- /dev/null +++ b/debian/patches/65page_size.dpatch @@ -0,0 +1,50 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 99page_size.dpatch by Adam Conrad +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad util-linux-2.12r~/disk-utils/fsck.cramfs.c util-linux-2.12r/disk-utils/fsck.cramfs.c +--- util-linux-2.12r~/disk-utils/fsck.cramfs.c 2006-10-13 00:24:33.000000000 +1000 ++++ util-linux-2.12r/disk-utils/fsck.cramfs.c 2006-10-13 00:24:46.000000000 +1000 +@@ -76,7 +76,6 @@ + + #define PAD_SIZE 512 + +-#include + #ifdef PAGE_SIZE + #define PAGE_CACHE_SIZE ((int) PAGE_SIZE) + #elif defined __ia64__ +diff -urNad util-linux-2.12r~/disk-utils/mkswap.c util-linux-2.12r/disk-utils/mkswap.c +--- util-linux-2.12r~/disk-utils/mkswap.c 2004-12-22 04:21:24.000000000 +1100 ++++ util-linux-2.12r/disk-utils/mkswap.c 2006-10-13 00:24:34.000000000 +1000 +@@ -48,17 +48,6 @@ + #include + #endif + +-/* Try to get PAGE_SIZE from libc or kernel includes */ +-#ifdef HAVE_sys_user_h +- /* Note: says: for gdb only */ +-#include /* for PAGE_SIZE and PAGE_SHIFT */ +-#else +-#ifdef HAVE_asm_page_h +-#include /* for PAGE_SIZE and PAGE_SHIFT */ +- /* we also get PAGE_SIZE via getpagesize() */ +-#endif +-#endif +- + #ifndef _IO + /* pre-1.3.45 */ + #define BLKGETSIZE 0x1260 +@@ -166,9 +155,7 @@ + static void + init_signature_page(void) { + +-#ifdef PAGE_SIZE +- defined_pagesize = PAGE_SIZE; +-#endif ++ defined_pagesize = sysconf(_SC_PAGESIZE); + kernel_pagesize = getpagesize(); + pagesize = kernel_pagesize; + diff --git a/debian/rules b/debian/rules index 2a32c526..387d5852 100755 --- a/debian/rules +++ b/debian/rules @@ -62,7 +62,6 @@ clean: unpatch find . -name '*.orig' -print0 | xargs -0r rm find . -name '*.rej' -print0 | xargs -0r rm rm -rf debian/tmp* debian/files* debian/substvars po/messages - rm -f debian/hwclockfirst.sh rm -rf $(CFDISK_PO_DIR) # Architecture independant stuff @@ -76,7 +75,7 @@ SBINFILES = disk-utils/mkswap ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) ifneq ($(arch),$(nohwclock)) -INITFILES = debian/hwclock.sh # debian/hwclockfirst.sh +INITFILES = debian/hwclock.sh SBINFILES += hwclock/hwclock endif BINFILES += sys-utils/dmesg @@ -164,9 +163,6 @@ endif install: -debian/hwclockfirst.sh: debian/hwclock.sh - sed '/^FIRST/s/no/yes/; s/hwclock\.sh/hwclockfirst.sh/g' debian/hwclock.sh > debian/hwclockfirst.sh - binary-indep: checkroot build binary-arch $(checkdir) # This assumes non-native, and only one hyphen in the version number.