diff -Nru loop-aes-utils-2.16.2/debian/changelog loop-aes-utils-2.16.2/debian/changelog --- loop-aes-utils-2.16.2/debian/changelog 2010-03-30 13:58:21.000000000 +0100 +++ loop-aes-utils-2.16.2/debian/changelog 2011-04-24 16:02:37.000000000 +0100 @@ -1,3 +1,11 @@ +loop-aes-utils (2.16.2-1ubuntu1) natty; urgency=low + + * Backport mount/umount --no-canonicalize option from util-linux + (LP: #727220). + * Backport umount --fake option from util-linux. + + -- Colin Watson Sun, 24 Apr 2011 16:02:36 +0100 + loop-aes-utils (2.16.2-1) unstable; urgency=low * New util-linux upstream release diff -Nru loop-aes-utils-2.16.2/debian/control loop-aes-utils-2.16.2/debian/control --- loop-aes-utils-2.16.2/debian/control 2010-03-30 13:58:21.000000000 +0100 +++ loop-aes-utils-2.16.2/debian/control 2011-04-24 16:02:19.000000000 +0100 @@ -1,7 +1,8 @@ Source: loop-aes-utils Section: admin Priority: optional -Maintainer: Debian Loop-AES Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Loop-AES Team Uploaders: Max Vozeler Build-Depends: debhelper (>= 7), gettext, libblkid-dev, uuid-dev, libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], pkg-config Standards-Version: 3.8.4 diff -Nru loop-aes-utils-2.16.2/debian/patches/no-canonicalize.patch loop-aes-utils-2.16.2/debian/patches/no-canonicalize.patch --- loop-aes-utils-2.16.2/debian/patches/no-canonicalize.patch 1970-01-01 01:00:00.000000000 +0100 +++ loop-aes-utils-2.16.2/debian/patches/no-canonicalize.patch 2011-04-24 15:53:46.000000000 +0100 @@ -0,0 +1,161 @@ +Description: Add --no-canonicalize option to mount/umount + Backported from util-linux. Needed for fuse. +Author: Karel Zak +Author: Miklos Szeredi +Bug-Ubuntu: https://bugs.launchpad.net/bugs/727220 +Forwarded: not-needed +Last-Update: 2011-04-24 + +Index: b/mount/mount.8 +=================================================================== +--- a/mount/mount.8 ++++ b/mount/mount.8 +@@ -449,6 +449,14 @@ + .I /etc + is on a read-only filesystem. + .TP ++.B \-\-no\-canonicalize ++Don't canonicalize paths. The mount command canonicalizes all paths ++(from command line or fstab) and stores canonicalized paths to the ++.I /etc/mtab ++file. This option can be used together with the ++.B \-f ++flag for already canonicalized absolute paths. ++.TP + .B \-s + Tolerate sloppy mount options rather than failing. This will ignore + mount options not supported by a filesystem type. Not all filesystems +Index: b/mount/mount.c +=================================================================== +--- a/mount/mount.c ++++ b/mount/mount.c +@@ -1876,6 +1876,7 @@ + { "make-rslave", 0, 0, 141 }, + { "make-rprivate", 0, 0, 142 }, + { "make-runbindable", 0, 0, 143 }, ++ { "no-canonicalize", 0, 0, 144 }, + { "internal-only", 0, 0, 'i' }, + { NULL, 0, 0, 0 } + }; +@@ -2168,7 +2169,9 @@ + case 143: + mounttype = (MS_UNBINDABLE | MS_REC); + break; +- ++ case 144: ++ nocanonicalize = 1; ++ break; + case '?': + default: + usage (stderr, EX_USAGE); +@@ -2207,7 +2210,8 @@ + + if (restricted && + (types || options || readwrite || nomtab || mount_all || +- fake || mounttype || (argc + specseen) != 1)) { ++ nocanonicalize || fake || mounttype || ++ (argc + specseen) != 1)) { + die (EX_USAGE, _("mount: only root can do that")); + } + +Index: b/mount/sundries.c +=================================================================== +--- a/mount/sundries.c ++++ b/mount/sundries.c +@@ -21,6 +21,7 @@ + + int mount_quiet; + int verbose; ++int nocanonicalize; + char *progname; + + char * +@@ -270,9 +271,9 @@ + { + char *res; + +- if (path == NULL) ++ if (!path) + return NULL; +- if (is_pseudo_fs(path)) ++ if (nocanonicalize || is_pseudo_fs(path)) + return xstrdup(path); + + res = canonicalize_path(path); +@@ -283,8 +284,14 @@ + + char *canonicalize (const char *path) + { +- char *res = canonicalize_path(path); ++ char *res; + ++ if (!path) ++ return NULL; ++ else if (nocanonicalize) ++ return xstrdup(path); ++ ++ res = canonicalize_path(path); + if (!res) + die(EX_SYSERR, _("not enough memory")); + return res; +Index: b/mount/sundries.h +=================================================================== +--- a/mount/sundries.h ++++ b/mount/sundries.h +@@ -16,6 +16,7 @@ + /* global mount, umount, and losetup variables */ + extern int mount_quiet; + extern int verbose; ++extern int nocanonicalize; + extern char *progname; + + #define streq(s, t) (strcmp ((s), (t)) == 0) +Index: b/mount/umount.8 +=================================================================== +--- a/mount/umount.8 ++++ b/mount/umount.8 +@@ -119,6 +119,11 @@ + and cleanup all references to the filesystem as soon as it is not busy + anymore. + (Requires kernel 2.4.11 or later.) ++.TP ++.B \-\-no\-canonicalize ++Don't canonicalize paths. For more details about this option see the ++.B mount(8) ++man page. + + .SH "THE LOOP DEVICE" + The +Index: b/mount/umount.c +=================================================================== +--- a/mount/umount.c ++++ b/mount/umount.c +@@ -380,6 +380,8 @@ + { "version", 0, 0, 'V' }, + { "read-only", 0, 0, 'r' }, + { "types", 1, 0, 't' }, ++ ++ { "no-canonicalize", 0, 0, 144 }, + { NULL, 0, 0, 0 } + }; + +@@ -665,6 +667,9 @@ + case 'i': + external_allowed = 0; + break; ++ case 144: ++ nocanonicalize = 1; ++ break; + case 0: + break; + case '?': +@@ -682,7 +687,8 @@ + } + } + +- if (restricted && (all || types || nomtab || force || remount)) { ++ if (restricted && ++ (all || types || nomtab || force || remount || nocanonicalize)) { + die (2, _("umount: only root can do that")); + } + diff -Nru loop-aes-utils-2.16.2/debian/patches/series loop-aes-utils-2.16.2/debian/patches/series --- loop-aes-utils-2.16.2/debian/patches/series 2010-03-30 13:58:38.000000000 +0100 +++ loop-aes-utils-2.16.2/debian/patches/series 2011-04-24 16:00:57.000000000 +0100 @@ -1,2 +1,4 @@ loop-aes-v3.2h.diff debian-changes-2.16.2-1 +no-canonicalize.patch +umount-fake.patch diff -Nru loop-aes-utils-2.16.2/debian/patches/umount-fake.patch loop-aes-utils-2.16.2/debian/patches/umount-fake.patch --- loop-aes-utils-2.16.2/debian/patches/umount-fake.patch 1970-01-01 01:00:00.000000000 +0100 +++ loop-aes-utils-2.16.2/debian/patches/umount-fake.patch 2011-04-24 15:54:45.000000000 +0100 @@ -0,0 +1,86 @@ +Description: Add --fake option to umount + Needed for fuse. +Author: Miklos Szeredi +Forwarded: not-needed +Last-Update: 2011-04-24 + +Index: b/mount/umount.8 +=================================================================== +--- a/mount/umount.8 ++++ b/mount/umount.8 +@@ -124,6 +124,13 @@ + Don't canonicalize paths. For more details about this option see the + .B mount(8) + man page. ++.TP ++.B \-\-fake ++Causes everything to be done except for the actual system call; this ++``fakes'' unmounting the filesystem. It can be used to remove ++entries from ++.I /etc/mtab ++that were unmounted earlier with the -n option. + + .SH "THE LOOP DEVICE" + The +Index: b/mount/umount.c +=================================================================== +--- a/mount/umount.c ++++ b/mount/umount.c +@@ -81,6 +81,9 @@ + int complained_err = 0; + char *complained_dev = NULL; + ++/* True for fake umount (--fake). */ ++static int fake = 0; ++ + /* + * check_special_umountprog() + * If there is a special umount program for this type, exec it. +@@ -187,7 +190,7 @@ + const char *opts, struct mntentchn *mc) { + int umnt_err = 0; + int isroot; +- int res; ++ int res = 0; + int status; + const char *loopdev; + +@@ -209,6 +212,10 @@ + if (check_special_umountprog(spec, node, type, &status)) + return status; + ++ /* Skip the actual umounting for --fake */ ++ if (fake) ++ goto writemtab; ++ + if (lazy) { + res = umount2 (node, MNT_DETACH); + if (res < 0) +@@ -382,6 +389,7 @@ + { "types", 1, 0, 't' }, + + { "no-canonicalize", 0, 0, 144 }, ++ { "fake", 0, 0, 145 }, + { NULL, 0, 0, 0 } + }; + +@@ -670,6 +678,9 @@ + case 144: + nocanonicalize = 1; + break; ++ case 145: ++ fake = 1; ++ break; + case 0: + break; + case '?': +@@ -688,7 +699,8 @@ + } + + if (restricted && +- (all || types || nomtab || force || remount || nocanonicalize)) { ++ (all || types || nomtab || force || remount || nocanonicalize || ++ fake)) { + die (2, _("umount: only root can do that")); + } +