+util-linux (2.12r-1) unstable; urgency=low
+
+ * New upstream verison and maintainer.
+ - cfdisk: fix a segfault with ReiserFS partitions
+ - umount: disallow -r option for non-root users (CAN-2005-2876)
+ - sfdisk: document -G option in --help output
+ - updated translations: ca, et, fr
+ - sfdisk: add -G option (Andries Brouwer)
+ - updated translations: de, es, ru, sv, tr, nl
+ * split cfdisk into its own udeb. Closes: #243094, #314368
+ * Really move hwclockfirst.sh back to S18 where it belongs.
+ Put hwclock.sh at S22. See #50572.
+ * Missing line break in hwclock.sh. Closes: #337955
+ * Include swap-suspend patch from Ubuntu.
+ * Fix variable name typo in hwclock.sh. Closes: #340232
+ * Add CPU=$(arch) to make call for building on amd64/i386 mixed systems.
+ Closes: #305907
+ * Cleanup lsb_init function usage.
+
+ -- LaMont Jones <lamont@debian.org> Wed, 7 Dec 2005 08:52:21 -0700
+
+util-linux (2.12p-8) unstable; urgency=high
+
+ * if /etc/adjtime is a dangling symlink, don't use it in hwclock*.sh
+ * Applited patch by Max Vozeler to fix a local privilege escalation
+ vulnerability in umount -r [debian/patches/51security_CAN-2005-2876.dpatch]
+ Closes: #328141, #329063
+
+ -- LaMont Jones <lamont@debian.org> Wed, 21 Sep 2005 08:36:17 -0600
+
+util-linux (2.12p-7) unstable; urgency=low
+
+ * Fix non-posix typo in hwclock.sh. Closes: #323872
+
+ -- LaMont Jones <lamont@debian.org> Thu, 18 Aug 2005 19:27:51 -0600
+
util-linux (2.12p-6) unstable; urgency=low
* Use helper program in mount for guessed FS types too. Thanks to Manish
Source: util-linux
Section: base
Priority: required
+Depends: lsb-base (>= 3.0-6)
Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4-1), gettext, zlib1g-dev, libblkid-dev, uuid-dev, dpatch
Maintainer: LaMont Jones <lamont@debian.org>
Standards-Version: 3.5.6.0
Architecture: alpha amd64 arm hppa i386 ia64 mips mipsel powerpc hurd-i386 sparc s390
Priority: extra
Section: debian-installer
+Depends: ${fdisk-udeb:Depends}
+Description: Partition a hard drive (manual)
+ fdisk package
+
+Package: cfdisk-udeb
+Architecture: alpha amd64 arm hppa i386 ia64 mips mipsel powerpc hurd-i386 s390
+Priority: extra
+Section: debian-installer
Depends: ${cfdisk-udeb:Depends}
-Description: Partition a hard drive (manual, cfdisk)
+Description: Partition a hard drive (cfdisk)
Cfdisk package
This package was put together by Guy Maor <maor@debian.org> and later
maintained by Sean 'Shaleh' Perry <shaleh@debian.org>, and Adrian Bunk
-<bunk@fs.tum.de>.
+<bunk@stusta.de>.
The current maintainer is LaMont Jones <lamont@debian.org>.
-It was downloaded from ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/util-linux/
+It was downloaded from:
+ ftp://ftp.us.kernel.org/pub/linux/utils/util-linux/
+and previously was at
+ ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/util-linux/
Upstream maintainers include:
+Maintainer: Adrian Bunk <bunk@fs.tum.de>
Maintainer: Andries Brouwer <aeb@cwi.nl>
Maintainer address: util-linux@math.uio.no
Maintainer of getopt: Frodo Looijaard <frodol@dds.nl>
[ ! -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; }
+. /lib/lsb/init-functions
+verbose_log_action_msg() { [ "$VERBOSE" = no ] || log_action_msg $@; }
[ "$GMT" = "-u" ] && UTC="yes"
case "$UTC" in
UTC=""
if [ "X$FIRST" = "Xyes" ] && [ ! -r /etc/localtime ]; then
if [ -z "$TZ" ]; then
- log_warning_msg "System clock was not updated at this time."
+ log_action_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 ;;
+ *) log_action_msg "Unknown UTC setting: \"$UTC\""; exit 1 ;;
esac
case "$BADYEAR" in
no|"") BADYEAR="" ;;
yes) BADYEAR="--badyear" ;;
- *) log_failure_msg "unknown BADYEAR setting: \"$BADYEAR\""; exit 1 ;;
+ *) log_action_msg "unknown BADYEAR setting: \"$BADYEAR\""; exit 1 ;;
esac
case "$1" in
start)
- if [ ! -f /etc/adjtime ]; then
+ if [ ! -f /etc/adjtime ] && [ ! -e /etc/adjtime ]; then
echo "0.0 0 0.0" > /etc/adjtime
fi
fi
if [ "$HWCLOCKACCESS" != no ]; then
- log_begin_msg "Setting the System Clock using the Hardware Clock as reference"
+ log_daemon_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 $HWCLOCPARS $BADYEAR
+ /sbin/hwclock --hctosys $GMT $HWCLOCKPARS $BADYEAR
if [ "$FIRST" = yes ]; then
# Copies Hardware Clock time to System Clock using the correct
fi
# Announce the local time.
- log_verbose_success_msg "System Clock set. Local time: `date $UTC`"
+ verbose_log_action_msg "System Clock set. Local time: `date $UTC`"
else
- log_verbose_warning_msg "Not setting System Clock"
+ verbose_log_action_msg "Not setting System Clock"
fi
log_end_msg 0
;;
# clock will not be carried across reboots.
#
if [ "$HWCLOCKACCESS" != no ]; then
- log_begin_msg "Saving the System Clock time to the Hardware Clock"
+ log_daemon_msg "Saving the system clock"
if [ "$GMT" = "-u" ]; then
GMT="--utc"
fi
- /sbin/hwclock --systohc $GMT $HWCLOCPARS $BADYEAR
- log_verbose_success_msg "Hardware Clock updated to `date`."
+ /sbin/hwclock --systohc $GMT $HWCLOCKPARS $BADYEAR
+ verbose_log_action_msg "Hardware Clock updated to `date`"
else
- log_verbose_warning_msg "Not saving System Clock"
+ verbose_log_action_msg "Not saving System Clock"
fi
+ log_end_msg 0
;;
show)
if [ "$HWCLOCKACCESS" != no ]; then
- /sbin/hwclock --show $GMT $HWCLOCPARS $BADYEAR
+ /sbin/hwclock --show $GMT $HWCLOCKPARS $BADYEAR
fi
;;
*)
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10cramfs-udebsize.dpatch by LaMont Jones <lamont@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: malloc the output buffer, instead of statically creating it.
+
+@DPATCH@
+diff -urNad --exclude=CVS --exclude=.svn ./disk-utils/fsck.cramfs.c /tmp/dpep-work.XLCGO2/util-linux/disk-utils/fsck.cramfs.c
+--- ./disk-utils/fsck.cramfs.c 2005-12-06 11:57:59.000000000 -0700
++++ /tmp/dpep-work.XLCGO2/util-linux/disk-utils/fsck.cramfs.c 2005-12-06 11:59:18.000000000 -0700
+@@ -95,7 +95,7 @@
+ static unsigned long read_buffer_block = ~0UL;
+
+ /* Uncompressing data structures... */
+-static char outbuffer[PAGE_CACHE_SIZE*2];
++static char *outbuffer;
+ z_stream stream;
+
+ #endif /* INCLUDE_FS_TESTS */
+@@ -464,6 +464,8 @@
+ int c; /* for getopt */
+ int start = 0;
+
++ outbuffer=(char*)malloc(PAGE_CACHE_SIZE*2);
++
+ if (argc)
+ progname = argv[0];
+
--- /dev/null
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30swsusp-resume.dpatch by Jeff Bailey <jbailey@ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: agetty changes in Debian. The biggest part is switching from
+## DP: termio to termios. The only other thing is a block of turned-off
+## DP: code trying to interoperate better with gdm.
+
+@DPATCH@
+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 @@
+ }
+ return 0;
+ }
+-
++
++static int
++is_swsuspend_partition(int fd, char **label, char *uuid) {
++ int n = getpagesize();
++ char *buf = xmalloc(n);
++ struct swap_header_v1_2 *p = (struct swap_header_v1_2 *) buf;
++
++ 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)
++ && p->version == 1) {
++ store_uuid(uuid, p->uuid);
++ store_label(label, p->volume_name, 16);
++ return 1;
++ }
++ return 0;
++}
+
+ /*
+ * Get both label and uuid.
+@@ -126,6 +143,8 @@
+
+ if (is_v1_swap_partition(fd, label, uuid))
+ goto done;
++ if (is_swsuspend_partition(fd, label, uuid))
++ goto done;
+
+ if (lseek(fd, 1024, SEEK_SET) == 1024
+ && read(fd, (char *) &e2sb, sizeof(e2sb)) == sizeof(e2sb)
+diff -urNad --exclude=CVS --exclude=.svn ./mount/swapon.c /tmp/dpep-work.5ak7Cm/util-linux/mount/swapon.c
+--- ./mount/swapon.c 2004-12-22 08:44:32.000000000 -0700
++++ /tmp/dpep-work.5ak7Cm/util-linux/mount/swapon.c 2005-12-06 11:54:33.000000000 -0700
+@@ -11,6 +11,9 @@
+ #include <mntent.h>
+ #include <errno.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
++#include <sys/wait.h>
++#include <fcntl.h>
+ #include "xmalloc.h"
+ #include "swap_constants.h"
+ #include "swapargs.h"
+@@ -22,6 +25,7 @@
+
+ #define _PATH_FSTAB "/etc/fstab"
+ #define PROC_SWAPS "/proc/swaps"
++#define PATH_MKSWAP "/sbin/mkswap"
+
+ #define SWAPON_NEEDS_TWO_ARGS
+
+@@ -164,6 +168,84 @@
+ return 0 ;
+ }
+
++/*
++ * It's better do swsuspend detection by follow routine than
++ * include huge mount_guess_fstype.o to swapon. We need only
++ * swsuspend and no the others filesystems.
++ */
++#ifdef HAVE_LIBBLKID
++static int
++swap_is_swsuspend(const char *device) {
++ const char *type = blkid_get_tag_value(blkid, "TYPE", device);
++
++ if (type && strcmp(type, "swsuspend")==0)
++ return 0;
++ return 1;
++}
++#else
++static int
++swap_is_swsuspend(const char *device) {
++ int fd, re = 1, n = getpagesize() - 10;
++ char buf[10];
++
++ fd = open(device, O_RDONLY);
++ if (fd < 0)
++ return -1;
++
++ if (lseek(fd, n, SEEK_SET) >= 0 &&
++ read(fd, buf, sizeof buf) == sizeof buf &&
++ (memcmp("S1SUSPEND", buf, 9)==0 ||
++ memcmp("S2SUSPEND", buf, 9)==0))
++ re = 0;
++
++ close(fd);
++ return re;
++}
++#endif
++
++/* calls mkswap */
++static int
++swap_reinitialize(const char *device) {
++ const char *label = mount_get_volume_label_by_spec(device);
++ pid_t pid;
++
++ switch((pid=fork())) {
++ case -1: /* fork error */
++ fprintf(stderr, _("%s: cannot fork: %s\n"),
++ progname, strerror(errno));
++ return -1;
++
++ case 0: /* child */
++ if (label && *label)
++ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL);
++ else
++ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL);
++ exit(1); /* error */
++
++ default: /* parent */
++ {
++ int status;
++ int ret;
++
++ do {
++ if ((ret = waitpid(pid, &status, 0)) < 0
++ && errno == EINTR)
++ continue;
++ else if (ret < 0) {
++ fprintf(stderr, _("%s: waitpid: %s\n"),
++ progname, strerror(errno));
++ return -1;
++ }
++ } while (0);
++
++ /* mkswap returns: 0=suss, 1=error */
++ if (WIFEXITED(status) && WEXITSTATUS(status)==0)
++ return 0; /* ok */
++ }
++ }
++ return -1; /* error */
++}
++
+ static int
+ do_swapon(const char *orig_special, int prio) {
+ int status;
+@@ -187,6 +269,18 @@
+ return -1;
+ }
+
++ /* We have to reinitialize swap with old (=useless) software suspend
++ * data. The problem is that if we don't do it, then we get data
++ * corruption the next time with suspended on.
++ */
++ if (swap_is_swsuspend(special)==0) {
++ fprintf(stdout, _("%s: %s: software suspend data detected. "
++ "Reinitializing the swap.\n"),
++ progname, special);
++ if (swap_reinitialize(special) < 0)
++ return -1;
++ }
++
+ /* people generally dislike this warning - now it is printed
+ only when `verbose' is set */
+ if (verbose) {
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 22 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 22 S . > /dev/null
+ update-rc.d hwclockfirst.sh start 18 S . > /dev/null
fi
fi
build: patch
$(checkdir)
./configure
- $(MAKE) all arch=$(arch) SUBDIRS="${SUBDIRS}"
+ $(MAKE) all CPU=$(arch) arch=$(arch) SUBDIRS="${SUBDIRS}"
# $(MAKE) disk-utils/raw - this is done above if linux/raw.h exists
touch build
ifeq ($(arch),$(fdisk_arch))
# Do the udeb
- install -d debian/tmp-fdisk-udeb/usr/sbin
- install -d debian/tmp-fdisk-udeb/DEBIAN
- install -m 755 fdisk/cfdisk fdisk/fdisk fdisk/sfdisk \
- debian/tmp-fdisk-udeb/usr/sbin
+ install -d debian/tmp-{c,}fdisk-udeb/usr/sbin
+ install -d debian/tmp-{c,}fdisk-udeb/DEBIAN
+ install -m 755 fdisk/cfdisk debian/tmp-cfdisk-udeb/usr/sbin
+ install -m 755 fdisk/fdisk fdisk/sfdisk debian/tmp-fdisk-udeb/usr/sbin
strip --remove-section=.comment --remove-section=.note \
- debian/tmp-fdisk-udeb/usr/sbin/*
+ debian/tmp-{c,}fdisk-udeb/usr/sbin/*
# Generate a po translations needed for cfdisk
mkdir $(CFDISK_PO_DIR)
LANG=`basename $$po | cut -f1 -d.` ; \
msgmerge $$po $(CFDISK_POT) > $(CFDISK_PO_DIR)/$$LANG.po ; \
msgfmt $(CFDISK_PO_DIR)/$$LANG.po -o $(CFDISK_PO_DIR)/$$LANG.gmo ; \
- mkdir -p debian/tmp-fdisk-udeb/usr/share/locale/$$LANG/LC_MESSAGES ; \
- cp $(CFDISK_PO_DIR)/$$LANG.gmo debian/tmp-fdisk-udeb/usr/share/locale/$$LANG/LC_MESSAGES/util-linux.mo ; \
+ mkdir -p debian/tmp-cfdisk-udeb/usr/share/locale/$$LANG/LC_MESSAGES ; \
+ cp $(CFDISK_PO_DIR)/$$LANG.gmo debian/tmp-cfdisk-udeb/usr/share/locale/$$LANG/LC_MESSAGES/util-linux.mo ; \
done
ls debian/tmp-fdisk-udeb/usr/sbin/* | xargs dpkg-shlibdeps -pfdisk-udeb
dpkg-gencontrol -isp -pfdisk-udeb -Pdebian/tmp-fdisk-udeb -fdebian/files~
dpkg-distaddfile fdisk-udeb_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(arch).udeb debian-installer extra
dpkg --build debian/tmp-fdisk-udeb ../fdisk-udeb_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(arch).udeb
+
+ ls debian/tmp-cfdisk-udeb/usr/sbin/* | xargs dpkg-shlibdeps -pcfdisk-udeb
+ dpkg-gencontrol -isp -pcfdisk-udeb -Pdebian/tmp-cfdisk-udeb -fdebian/files~
+ dpkg-distaddfile cfdisk-udeb_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(arch).udeb debian-installer extra
+ dpkg --build debian/tmp-cfdisk-udeb ../cfdisk-udeb_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(arch).udeb
endif
ifeq ($(arch),$(sparc))
# Do the udeb