From: LaMont Jones Date: Sun, 8 Jul 2007 22:59:22 +0000 (-0600) Subject: v2.12p-6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b2efb620fc0b1cd6483981fa929f9a03c4bb662;p=util-linux v2.12p-6 --- diff --git a/debian/bsdutils.postinst b/debian/bsdutils.postinst index 270ae643..b50b46e5 100644 --- a/debian/bsdutils.postinst +++ b/debian/bsdutils.postinst @@ -1 +1,6 @@ #!/bin/sh -e + +if [ -L /usr/doc/bsdutils ] ; then + rm -f /usr/doc/bsdutils +fi + diff --git a/debian/changelog b/debian/changelog index a2978641..bbea17fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,54 @@ +util-linux (2.12p-6) unstable; urgency=low + + * Use helper program in mount for guessed FS types too. Thanks to Manish + Singh and Fabio Massimo Di Nitto. Adds: 20guesshelper.dpatch + * Remove /usr/doc links on install. Closes: #322806, #322816 + * Fix /usr/bin/pg pager alternative. Closes: #323204 + * Overhaul hwclock.sh and hwclockfirst.sh. Closes: #286948, #251479 + * Resync with Ubuntu, changes by Martin.Pitt@ubuntu.com: Closes: #323463 + debian/patches/60_opt_O1.dpatch: + - MCONFIG, configure: Build with -O1 instead of -O2 to work around cfdisk + segfault. + - Yay for upstream build systems which do not support specifying CFLAGS or + OPT without breaking. + + -- LaMont Jones Wed, 17 Aug 2005 16:14:29 -0600 + +util-linux (2.12p-5) unstable; urgency=low + + * Merge changes from ubuntu + - closes #319143 + * Build-Depend: libslang2-dev. Closes: #315634 + + -- LaMont Jones Thu, 21 Jul 2005 12:08:23 -0600 + +util-linux (2.12p-4ubuntu4) breezy; urgency=low + + * dpkg-architecture says DEB_HOST_GNU_SYSTEM is "linux-gnu" now, not + "linux". Take account of this, and add compatibility code for old + dpkg-architecture (closes: Ubuntu #11012). + + -- Colin Watson Sat, 21 May 2005 12:03:36 +0100 + +util-linux (2.12p-4ubuntu3) breezy; urgency=low + + * Don't special case sparc, it has umount2. + + -- Jeff Bailey Fri, 20 May 2005 11:48:24 +0000 + +util-linux (2.12p-4ubuntu2) breezy; urgency=low + + * Run hwclockfirst.sh after modules load, so that rtc is loaded. + + -- LaMont Jones Thu, 12 May 2005 10:24:42 -0600 + +util-linux (2.12p-4ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + * correct shutdown message from hwclock.sh + + -- LaMont Jones Fri, 15 Apr 2005 18:01:57 -0600 + util-linux (2.12p-4) unstable; urgency=low * Depend on newer libblkid1. @@ -11,6 +62,18 @@ util-linux (2.12p-3) unstable; urgency=low -- LaMont Jones Tue, 8 Feb 2005 13:45:34 -0700 +util-linux (2.12p-2ubuntu2) hoary; urgency=low + + * Update dependencies for new libblkid1 + + -- LaMont Jones Thu, 17 Mar 2005 11:12:42 -0700 + +util-linux (2.12p-2ubuntu1) hoary; urgency=low + + * Resync with Debian. + + -- LaMont Jones Sat, 25 Dec 2004 08:12:38 -0700 + util-linux (2.12p-2) unstable; urgency=low * Really fix man page in alternatives. Closes: #145647 @@ -18,6 +81,12 @@ util-linux (2.12p-2) unstable; urgency=low -- LaMont Jones Sat, 25 Dec 2004 08:08:12 -0700 +util-linux (2.12p-1ubuntu1) hoary; urgency=low + + * Resync with Debian. Closes warty #3366, 4784 + + -- LaMont Jones Fri, 24 Dec 2004 15:27:32 -0700 + util-linux (2.12p-1) unstable; urgency=low * New upstream version. (2.12p) @@ -41,6 +110,12 @@ util-linux (2.12p-1) unstable; urgency=low -- LaMont Jones Fri, 24 Dec 2004 14:38:23 -0700 +util-linux (2.12m-1ubuntu1) hoary; urgency=low + + * Resync with Debian. + + -- LaMont Jones Mon, 20 Dec 2004 10:55:20 -0700 + util-linux (2.12m-1) unstable; urgency=low * New upstream version @@ -51,6 +126,12 @@ util-linux (2.12m-1) unstable; urgency=low -- LaMont Jones Mon, 20 Dec 2004 10:46:16 -0700 +util-linux (2.12l-1ubuntu1) hoary; urgency=low + + * Resync with debian + + -- LaMont Jones Wed, 15 Dec 2004 17:22:52 -0700 + util-linux (2.12l-1) unstable; urgency=low * New upstream version, shrinking the size of the Debian diff. @@ -65,6 +146,12 @@ util-linux (2.12l-1) unstable; urgency=low -- LaMont Jones Wed, 15 Dec 2004 17:27:44 -0700 +util-linux (2.12k-2ubuntu1) hoary; urgency=low + + * Resync with Debian + + -- LaMont Jones Wed, 15 Dec 2004 11:32:45 -0700 + util-linux (2.12k-2) unstable; urgency=low * Switch to dpatch. @@ -73,6 +160,12 @@ util-linux (2.12k-2) unstable; urgency=low -- LaMont Jones Wed, 15 Dec 2004 10:43:29 -0700 +util-linux (2.12k-1ubuntu1) hoary; urgency=low + + * Resync with Debian + + -- LaMont Jones Mon, 13 Dec 2004 16:55:15 -0700 + util-linux (2.12k-1) unstable; urgency=low * New upstream version. @@ -81,6 +174,12 @@ util-linux (2.12k-1) unstable; urgency=low -- LaMont Jones Mon, 13 Dec 2004 16:50:57 -0700 +util-linux (2.12j-3ubuntu1) hoary; urgency=low + + * Resync with Debian + + -- LaMont Jones Fri, 10 Dec 2004 07:23:03 -0700 + util-linux (2.12j-3) unstable; urgency=low * umount -l "" does bad things. Don't do let the user do that. @@ -88,18 +187,36 @@ util-linux (2.12j-3) unstable; urgency=low -- LaMont Jones Fri, 10 Dec 2004 07:11:02 -0700 +util-linux (2.12j-2ubuntu1) hoary; urgency=low + + * resync with Debian + + -- LaMont Jones Tue, 7 Dec 2004 11:01:29 -0700 + util-linux (2.12j-2) unstable; urgency=low * uninitialized variable. Closes: #284597 -- LaMont Jones Tue, 7 Dec 2004 10:52:55 -0700 +util-linux (2.12j-1ubuntu1) hoary; urgency=low + + * resync with Debian + + -- LaMont Jones Mon, 6 Dec 2004 03:55:55 -0700 + util-linux (2.12j-1) unstable; urgency=low * New upstream version -- LaMont Jones Mon, 6 Dec 2004 03:29:45 -0700 +util-linux (2.12h-4ubuntu1) hoary; urgency=low + + * resync with debian. + + -- LaMont Jones Thu, 2 Dec 2004 22:37:16 -0700 + util-linux (2.12h-4) unstable; urgency=low * mkswap on a file was broken. Thanks to Bas Zoetekouw @@ -108,12 +225,31 @@ util-linux (2.12h-4) unstable; urgency=low -- LaMont Jones Thu, 2 Dec 2004 10:42:04 -0700 +util-linux (2.12h-3ubuntu1) hoary; urgency=low + + * Resync with debian. + Fix mount segv. Closes: Warty#3153 + + -- LaMont Jones Wed, 3 Nov 2004 10:44:22 -0700 + util-linux (2.12h-3) unstable; urgency=low * Fix mount segv's. Closes: #279306 -- LaMont Jones Wed, 3 Nov 2004 10:09:43 -0700 +util-linux (2.12h-2ubuntu2) hoary; urgency=medium + + * Fix unterminated string in hwclock.sh (thanks, Jones Lee). + + -- Colin Watson Tue, 2 Nov 2004 22:29:24 +0000 + +util-linux (2.12h-2ubuntu1) hoary; urgency=low + + * Re-sync with Debian. + + -- LaMont Jones Sat, 30 Oct 2004 21:14:51 -0600 + util-linux (2.12h-2) unstable; urgency=low * Cleanup the changelog entry in the uploaded package, to reduce panic. diff --git a/debian/control b/debian/control index 92d906ea..7fe63ebd 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: util-linux Section: base Priority: required -Build-Depends: libncurses5-dev, slang1-utf8-dev (>=1.4.9), gettext, zlib1g-dev, libblkid-dev, uuid-dev, dpatch +Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4-1), gettext, zlib1g-dev, libblkid-dev, uuid-dev, dpatch Maintainer: LaMont Jones Standards-Version: 3.5.6.0 diff --git a/debian/hwclock.sh b/debian/hwclock.sh index e9629b35..a7025636 100644 --- a/debian/hwclock.sh +++ b/debian/hwclock.sh @@ -16,75 +16,108 @@ # before changing this file. You risk serious clock # misbehaviour otherwise. +FIRST=no # debian/rules sets this to 'yes' when creating hwclockfirst.sh + +# Set this to any options you might need to give to hwclock, such +# as machine hardware clock type for Alphas. +HWCLOCKPARS= + +[ ! -x /sbin/hwclock ] && exit 0 . /etc/default/rcS + +log_begin_msg () { echo -n "$@"; } +log_success_msg () { echo "$@"; } +log_failure_msg () { echo "$@"; } +log_warning_msg () { echo "$@"; } +log_end_msg () { if [ "$1" == 0 ]; then echo "."; fi; } +log_verbose_success_msg() { if [ "$VERBOSE" != no ]; then echo; echo $@; fi; } +log_verbose_warning_msg() { if [ "$VERBOSE" != no ]; then echo; echo $@; fi; } + [ "$GMT" = "-u" ] && UTC="yes" case "$UTC" in - no|"") GMT="--localtime" ;; - yes) GMT="--utc" ;; - *) echo "$0: unknown UTC setting: \"$UTC\"" >&2 ;; + no|"") GMT="--localtime" + UTC="" + if [ "X$FIRST" = "Xyes" ] && [ ! -r /etc/localtime ]; then + if [ -z "$TZ" ]; then + log_warning_msg "System clock was not updated at this time." + exit 1 + fi + fi + ;; + yes) GMT="--utc" + UTC="--utc" + ;; + *) log_failure_msg "Unknown UTC setting: \"$UTC\""; exit 1 ;; esac case "$BADYEAR" in - no|"") BADYEAR="" ;; - yes) BADYEAR="--badyear" ;; - *) echo "$0: unknown BADYEAR setting: \"$BADYEAR\"" >&2 ;; + no|"") BADYEAR="" ;; + yes) BADYEAR="--badyear" ;; + *) log_failure_msg "unknown BADYEAR setting: \"$BADYEAR\""; exit 1 ;; esac case "$1" in start) - if [ ! -f /etc/adjtime ] - then - echo "0.0 0 0.0" > /etc/adjtime + if [ ! -f /etc/adjtime ]; then + echo "0.0 0 0.0" > /etc/adjtime fi - # 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 + 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. - if [ "$HWCLOCKACCESS" != no ] - then - if [ "$VERBOSE" != no ] - then - echo - echo "Setting the System Clock using the Hardware Clock as reference..." - fi - # 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 $BADYEAR - # - # Now that /usr/share/zoneinfo should be available, - # announce the local time. - # - if [ "$VERBOSE" != no ] - then - echo "System Clock set. Local time: `date`" - echo + #hwclock --adjust $GMT $BADYEAR + : + fi + + if [ "$HWCLOCKACCESS" != no ]; then + log_begin_msg "Setting the System Clock using the Hardware Clock as reference" + + # 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 $HWCLOCPARS $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. + log_verbose_success_msg "System Clock set. Local time: `date $UTC`" else - if [ "$VERBOSE" != no ] - then - echo "Not setting System Clock" - fi + log_verbose_warning_msg "Not setting System Clock" fi + log_end_msg 0 ;; stop|restart|reload|force-reload) # @@ -94,36 +127,26 @@ case "$1" in # WARNING: If you disable this, any changes to the system # clock will not be carried across reboots. # - if [ "$HWCLOCKACCESS" != no ] - then - if [ "$VERBOSE" != no ] - then - echo "Saving the System Clock time to the Hardware Clock..." - fi - [ "$GMT" = "-u" ] && GMT="--utc" - /sbin/hwclock --systohc $GMT $BADYEAR - if [ "$VERBOSE" != no ] - then - echo "Hardware Clock updated to `date`." + if [ "$HWCLOCKACCESS" != no ]; then + log_begin_msg "Saving the System Clock time to the Hardware Clock" + if [ "$GMT" = "-u" ]; then + GMT="--utc" fi + /sbin/hwclock --systohc $GMT $HWCLOCPARS $BADYEAR + log_verbose_success_msg "Hardware Clock updated to `date`." else - if [ "$VERBOSE" != no ] - then - echo "Not saving System Clock" - fi + log_verbose_warning_msg "Not saving System Clock" fi ;; show) - if [ "$HWCLOCKACCESS" != no ] - then - /sbin/hwclock --show $GMT $BADYEAR + if [ "$HWCLOCKACCESS" != no ]; then + /sbin/hwclock --show $GMT $HWCLOCPARS $BADYEAR fi ;; *) - echo "Usage: hwclock.sh {start|stop|reload|force-reload|show}" >&2 - echo " start sets kernel (system) clock from hardware (RTC) clock" >&2 - echo " stop and reload set hardware (RTC) clock from kernel (system) clock" >&2 + log_success_msg "Usage: hwclock.sh {start|stop|reload|force-reload|show}" + log_success_msg " start sets kernel (system) clock from hardware (RTC) clock" + log_success_msg " stop and reload set hardware (RTC) clock from kernel (system) clock" exit 1 ;; esac - diff --git a/debian/mount.postinst b/debian/mount.postinst index 270ae643..6407fa9d 100644 --- a/debian/mount.postinst +++ b/debian/mount.postinst @@ -1 +1,5 @@ #!/bin/sh -e + +if [ -L /usr/doc/mount ] ; then + rm -f /usr/doc/mount +fi diff --git a/debian/patches/00list b/debian/patches/00list index ada431c6..8298c6b9 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,10 +1,13 @@ -10agetty.dpatch -10cal-widechar.dpatch -10cfdisk.dpatch -10debian.dpatch -10fstab.dpatch -10license.dpatch -10misc.dpatch -10mount.dpatch -#20xgethostname.dpatch -#50hurd.dpatch +10agetty +10cal-widechar +10cfdisk +10debian +10fstab +10license +10misc +10mount +10sparcumount +20guesshelper +#20xgethostname +#50hurd +60_opt_O1 diff --git a/debian/patches/10sparcumount.dpatch b/debian/patches/10sparcumount.dpatch new file mode 100644 index 00000000..3da3a85c --- /dev/null +++ b/debian/patches/10sparcumount.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10sparcumount.dpatch by Jeff Bailey +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Sparc and Arm have umount2 in glibc. + +@DPATCH@ +--- util-linux/mount/umount.c 2005-05-20 11:39:07.000000000 +0000 ++++ util-linux/mount/umount.c 2005-05-20 11:39:15.000000000 +0000 +@@ -31,7 +31,7 @@ + #include + #endif + +-#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) ++#if defined(MNT_FORCE) + /* Interesting ... it seems libc knows about MNT_FORCE and presumably + about umount2 as well -- need not do anything */ + #else /* MNT_FORCE */ diff --git a/debian/patches/20guesshelper.dpatch b/debian/patches/20guesshelper.dpatch new file mode 100644 index 00000000..637a6932 --- /dev/null +++ b/debian/patches/20guesshelper.dpatch @@ -0,0 +1,197 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20guesshelper.dpatch by LaMont Jones +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: If /sbin/mount.${FSTYPE} exists, use it as a helper program to mount +## DP: the filesystem. + +@DPATCH@ +diff -urNad util-linux/mount/mount.c /tmp/dpep.EXkuMo/util-linux/mount/mount.c +--- util-linux/mount/mount.c 2005-08-16 11:48:18.000000000 -0600 ++++ /tmp/dpep.EXkuMo/util-linux/mount/mount.c 2005-08-16 11:48:35.000000000 -0600 +@@ -468,6 +468,61 @@ + } + + /* ++ * check_special_mountprog() ++ * If there is a special mount program for this type, exec it. ++ * returns: 0: no exec was done, 1: exec was done, status has result ++ */ ++ ++static int ++check_special_mountprog(const char *spec, const char *node, const char *type, ++ int flags, char *extra_opts, int *status) { ++ char mountprog[120]; ++ struct stat statbuf; ++ int res; ++ ++ if (!external_allowed) ++ return 0; ++ ++ if (type && strlen(type) < 100) { ++ sprintf(mountprog, "/sbin/mount.%s", type); ++ if (stat(mountprog, &statbuf) == 0) { ++ res = fork(); ++ if (res == 0) { ++ const char *oo, *mountargs[10]; ++ int i = 0; ++ ++ setuid(getuid()); ++ setgid(getgid()); ++ oo = fix_opts_string (flags, extra_opts, NULL); ++ mountargs[i++] = mountprog; ++ mountargs[i++] = spec; ++ mountargs[i++] = node; ++ if (nomtab) ++ mountargs[i++] = "-n"; ++ if (verbose) ++ mountargs[i++] = "-v"; ++ if (oo && *oo) { ++ mountargs[i++] = "-o"; ++ mountargs[i++] = oo; ++ } ++ mountargs[i] = NULL; ++ execv(mountprog, (char **) mountargs); ++ exit(1); /* exec failed */ ++ } else if (res != -1) { ++ int st; ++ wait(&st); ++ *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR); ++ return 1; ++ } else { ++ int errsv = errno; ++ error(_("mount: cannot fork: %s"), strerror(errsv)); ++ } ++ } ++ } ++ return 0; ++} ++ ++/* + * guess_fstype_and_mount() + * Mount a single file system. Guess the type when unknown. + * returns: 0: OK, -1: error in errno, 1: other error +@@ -476,9 +531,11 @@ + */ + static int + guess_fstype_and_mount(const char *spec, const char *node, const char **types, +- int flags, char *mount_opts) { ++ int flags, char *mount_opts, int *special, int *status) { + struct mountargs args = { spec, node, NULL, flags & ~MS_NOSYS, mount_opts }; +- ++ ++ *special = 0; ++ + if (*types && strcasecmp (*types, "auto") == 0) + *types = NULL; + +@@ -487,10 +544,16 @@ + + if (!*types && !(flags & MS_REMOUNT)) { + *types = guess_fstype(spec); +- if (*types && !strcmp(*types, "swap")) { +- error(_("%s looks like swapspace - not mounted"), spec); +- *types = NULL; +- return 1; ++ if (*types) { ++ if (!strcmp(*types, "swap")) { ++ error(_("%s looks like swapspace - not mounted"), spec); ++ *types = NULL; ++ return 1; ++ } else if (check_special_mountprog(spec, node, *types, flags, ++ mount_opts, status)) { ++ *special = 1; ++ return 0; ++ } + } + } + +@@ -726,61 +789,6 @@ + } + + /* +- * check_special_mountprog() +- * If there is a special mount program for this type, exec it. +- * returns: 0: no exec was done, 1: exec was done, status has result +- */ +- +-static int +-check_special_mountprog(const char *spec, const char *node, const char *type, +- int flags, char *extra_opts, int *status) { +- char mountprog[120]; +- struct stat statbuf; +- int res; +- +- if (!external_allowed) +- return 0; +- +- if (type && strlen(type) < 100) { +- sprintf(mountprog, "/sbin/mount.%s", type); +- if (stat(mountprog, &statbuf) == 0) { +- res = fork(); +- if (res == 0) { +- const char *oo, *mountargs[10]; +- int i = 0; +- +- setuid(getuid()); +- setgid(getgid()); +- oo = fix_opts_string (flags, extra_opts, NULL); +- mountargs[i++] = mountprog; +- mountargs[i++] = spec; +- mountargs[i++] = node; +- if (nomtab) +- mountargs[i++] = "-n"; +- if (verbose) +- mountargs[i++] = "-v"; +- if (oo && *oo) { +- mountargs[i++] = "-o"; +- mountargs[i++] = oo; +- } +- mountargs[i] = NULL; +- execv(mountprog, (char **) mountargs); +- exit(1); /* exec failed */ +- } else if (res != -1) { +- int st; +- wait(&st); +- *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR); +- return 1; +- } else { +- int errsv = errno; +- error(_("mount: cannot fork: %s"), strerror(errsv)); +- } +- } +- } +- return 0; +-} +- +-/* + * try_mount_one() + * Try to mount one file system. When "bg" is 1, this is a retry + * in the background. One additional exit code EX_BG is used here. +@@ -792,7 +800,7 @@ + static int + try_mount_one (const char *spec0, const char *node0, const char *types0, + const char *opts0, int freq, int pass, int bg, int ro) { +- int res = 0, status; ++ int res = 0, status, special; + int mnt5_res = 0; /* only for gcc */ + int mnt_err; + int flags; +@@ -868,9 +876,15 @@ + + block_signals (SIG_BLOCK); + +- if (!fake) ++ if (!fake) { + mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS, +- mount_opts); ++ mount_opts, &special, &status); ++ ++ if (special) { ++ res = status; ++ goto out; ++ } ++ } + + if (fake || mnt5_res == 0) { + /* Mount succeeded, report this (if verbose) and write mtab entry. */ diff --git a/debian/patches/60_opt_O1.dpatch b/debian/patches/60_opt_O1.dpatch new file mode 100644 index 00000000..5e4be2b6 --- /dev/null +++ b/debian/patches/60_opt_O1.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 60_opt_O1.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Build with -O1 to work around cfdisk segfault + +@DPATCH@ +diff -urNad util-linux-2.12p/configure /tmp/dpep.54ETBp/util-linux-2.12p/configure +--- util-linux-2.12p/configure 2004-12-20 23:20:35.000000000 +0100 ++++ /tmp/dpep.54ETBp/util-linux-2.12p/configure 2005-08-15 15:13:57.000000000 +0200 +@@ -58,7 +58,7 @@ + echo >> defines.h + + CC=${CC-cc} +-CFLAGS=${CFLAGS-"-O2"} ++CFLAGS=${CFLAGS-"-O1"} + LDFLAGS=${LDFLAGS-"-s"} + echo CC=$CC >> make_include + echo CFLAGS=$CFLAGS >> make_include +diff -urNad util-linux-2.12p/MCONFIG /tmp/dpep.54ETBp/util-linux-2.12p/MCONFIG +--- util-linux-2.12p/MCONFIG 2005-08-15 15:12:29.000000000 +0200 ++++ /tmp/dpep.54ETBp/util-linux-2.12p/MCONFIG 2005-08-15 15:13:49.000000000 +0200 +@@ -138,12 +138,12 @@ + CPUTAIL=486 + endif + CPUOPT= $(CPUHEAD)$(CPUTAIL) +- OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer ++ OPT= -pipe -O1 $(CPUOPT) -fomit-frame-pointer + else + ifeq "$(ARCH)" "arm" + OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer + else +- OPT= -O2 -fomit-frame-pointer ++ OPT= -O1 -fomit-frame-pointer + endif + endif + diff --git a/debian/postinst b/debian/postinst index 1bea47c4..9961f994 100644 --- a/debian/postinst +++ b/debian/postinst @@ -8,7 +8,7 @@ install-info --quiet --section "Development" "Development" \ /usr/share/info/ipc.info.gz update-alternatives --install /usr/bin/pager pager /bin/more 50 \ --slave /usr/share/man/man1/pager.1.gz pager.1.gz /usr/share/man/man1/more.1.gz -update-alternatives --install /usr/bin/pager pager /bin/pg 10 \ +update-alternatives --install /usr/bin/pager pager /usr/bin/pg 10 \ --slave /usr/share/man/man1/pager.1.gz pager.1.gz /usr/share/man/man1/pg.1.gz # @@ -28,10 +28,14 @@ if [ "$(uname -s)" = "Linux" ]; 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 -f hwclockfirst.sh remove 2>/dev/null > /dev/null - update-rc.d hwclockfirst.sh start 18 S . > /dev/null + update-rc.d hwclockfirst.sh start 22 S . > /dev/null fi fi if [ -x /usr/sbin/update-mime ]; then update-mime fi + +if [ -L /usr/doc/util-linux ] ; then + rm -f /usr/doc/util-linux +fi diff --git a/debian/rules b/debian/rules index 996e9d8f..e6bef32e 100755 --- a/debian/rules +++ b/debian/rules @@ -13,6 +13,11 @@ ifndef DEB_HOST_GNU_SYSTEM DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) endif +ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +# Take account of old dpkg-architecture output. +DEB_HOST_GNU_SYSTEM := linux-gnu +endif + export arch = $(DEB_HOST_ARCH) version := $(shell sed -e '1{;s|^util-linux (\(.*\))\ .*|\1|;q;}' debian/changelog) @@ -27,13 +32,13 @@ endif ifeq ($(arch),$(sparc)) SUBDIRS += fdisk endif -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) ifneq ($(arch),$(nohwclock)) SUBDIRS += hwclock endif endif -ifneq ($(DEB_HOST_GNU_SYSTEM),linux) +ifneq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) util-linux_Conflicts = getty endif @@ -56,6 +61,7 @@ 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 @@ -67,7 +73,7 @@ UBINFILES = sys-utils/{ipcs,ipcrm,setsid} \ getopt/getopt text-utils/{rev,line,pg} SBINFILES = disk-utils/mkswap -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) ifneq ($(arch),$(nohwclock)) INITFILES = debian/hwclock.sh debian/hwclockfirst.sh SBINFILES += hwclock/hwclock @@ -80,7 +86,7 @@ endif UBINFILES2= misc-utils/chkdupexe # debian/fdformat # don't strip these -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) MOUNTBINFILES = mount/mount mount/umount MOUNTSBINFILES = mount/swapon mount/losetup endif @@ -100,7 +106,7 @@ MAN1FILES = text-utils/{pg,more,line,rev}.1 misc-utils/{namei.1,mcookie.1} \ misc-utils/{chkdupexe.1,setterm.1,whereis.1,ddate.1} \ sys-utils/arch.1 getopt/getopt.1 MAN8FILES = sys-utils/{ipcrm.8,ipcs.8,setsid.8} disk-utils/mkswap.8 -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) ifneq ($(arch),$(nohwclock)) MAN8FILES += hwclock/hwclock.8 endif @@ -112,19 +118,19 @@ endif EXAMPLES = fdisk/sfdisk.examples getopt/getopt-{test,parse}.{ba,tc}sh -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) EXAMPLES += debian/fstab.example2 endif INFOFILES = sys-utils/ipc.info -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) DOCFILES = login-utils/{README.getty,README.modems-with-agetty,README.poeigl} ifneq ($(arch),$(nohwclock)) DOCFILES += debian/README.Debian.hwclock endif endif -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) MOUNTMAN5FILES = mount/fstab.5 mount/nfs.5 MOUNTMAN8FILES = mount/losetup.8 mount/swapoff.8 mount/umount.8 \ mount/mount.8 mount/swapon.8 @@ -139,7 +145,7 @@ ifeq ($(arch),$(fdisk_arch)) SBINFILES := $(SBINFILES) fdisk/{cfdisk,fdisk,sfdisk} MAN8FILES := $(MAN8FILES) fdisk/{cfdisk.8,fdisk.8,sfdisk.8} DOCFILES := $(DOCFILES) fdisk/README.{c,}fdisk -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) USBINFILES:= $(USBINFILES) sys-utils/{tunelp,cytune} MAN8FILES := $(MAN8FILES) sys-utils/{tunelp.8,cytune.8} endif @@ -157,13 +163,16 @@ 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. dpkg-gencontrol -isp -putil-linux-locales -Pdebian/tmp-util-linux-locales -VUpstream=$$(sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog) dpkg --build debian/tmp-util-linux-locales .. -binary-arch: checkroot build +binary-arch: checkroot build $(INITFILES) rm -rf debian/tmp* install -d debian/tmp/{DEBIAN,bin,sbin,etc/init.d,usr/{bin,sbin,lib/mime/packages,share/{locale/{ca,cs,da,de,es,et,fi,fr,it,ja,nl,pt_BR,sl,sv,tr}/LC_MESSAGES,man/{man1,man8},info,$(PACKAGE),doc/$(PACKAGE)/examples,lintian/overrides}}} @@ -199,7 +208,7 @@ ifeq ($(DEB_HOST_GNU_SYSTEM),gnu) (cd debian/tmp/sbin ; mv mkswap mkswap.linux) (cd debian/tmp/usr/share/man/man8 ; mv mkswap.8 mkswap.linux.8) endif -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) (cd debian/tmp/sbin ; mv agetty getty) (cd debian/tmp/usr/share/man/man8 ; mv agetty.8 getty.8) ifneq ($(arch), $(nohwclock)) @@ -220,7 +229,7 @@ endif install -m 644 debian/mime.$(PACKAGE) debian/tmp/usr/lib/mime/packages/$(PACKAGE) install -m 644 debian/copyright debian/tmp/usr/share/doc/$(PACKAGE)/copyright install debian/{preinst,postinst,prerm,postrm} debian/tmp/DEBIAN/ -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) ifneq ($(arch),$(nohwclock)) install -m 644 debian/conffiles debian/tmp/DEBIAN/ endif @@ -277,7 +286,7 @@ ifeq ($(arch),$(sparc)) dpkg --build debian/tmp-fdisk-udeb ../fdisk-udeb_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(arch).udeb endif -ifeq ($(DEB_HOST_GNU_SYSTEM),linux) +ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu) # Mount install -d debian/tmp-mount/{DEBIAN,bin,sbin,usr/share/{man/{man8,man5},doc/mount/examples}} install -m 4755 -o root -s $(MOUNTBINFILES) debian/tmp-mount/bin/. diff --git a/debian/util-linux-locales.postinst b/debian/util-linux-locales.postinst index 58005942..802aa39c 100644 --- a/debian/util-linux-locales.postinst +++ b/debian/util-linux-locales.postinst @@ -1 +1,5 @@ #! /bin/sh -e + +if [ -L /usr/doc/util-linux-locales ] ; then + rm -f /usr/doc/util-linux-locales +fi