--- fuse-2.8.4.orig/debian/libfuse-dev.install
+++ fuse-2.8.4/debian/libfuse-dev.install
@@ -0,0 +1,5 @@
+usr/include/*
+usr/lib/pkgconfig/*
+usr/lib/lib*.a
+usr/lib/lib*.so
+usr/lib/lib*.la
--- fuse-2.8.4.orig/debian/fuse-utils.postinst
+++ fuse-2.8.4/debian/fuse-utils.postinst
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+
+
+case "$1" in
+ configure|upgrade)
+
+ # Create fuse group
+ echo "creating fuse group..."
+ getent group fuse >/dev/null || addgroup --system fuse
+
+ # Detect if udev is active
+ udev=0
+ if [ -d /dev/.udev/ ]; then
+ udev=1
+ fi
+ # Create device node with the right perms
+ if [ ${udev} -eq 0 ]; then
+ if [ -x /sbin/MAKEDEV ]; then
+ # Call makedev and fix perms
+ cd /dev && MAKEDEV fuse
+ chgrp fuse /dev/fuse
+ else
+ echo "MAKEDEV not installed, skipping device node creation."
+ fi
+ else
+ # Udev is active, nothing to do.
+ echo "udev active, skipping device node creation."
+ fi
+
+ test -f /etc/default/fuse-utils && rm -f /etc/default/fuse-utils
+
+ if ! dpkg-statoverride --list /usr/bin/fusermount >/dev/null; then
+ chown root:fuse /usr/bin/fusermount
+ chmod 4754 /usr/bin/fusermount
+ fi
+
+ chown root:fuse /etc/fuse.conf
+ chmod 0640 /etc/fuse.conf
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- fuse-2.8.4.orig/debian/README.source
+++ fuse-2.8.4/debian/README.source
@@ -0,0 +1,38 @@
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To get the fully patched source after unpacking the source package, cd
+to the root level of the source package and run:
+
+ debian/rules patch
+
+Removing a patch is as simple as removing its entry from the
+debian/patches/00list file, and please also remove the patch file
+itself.
+
+Creating a new patch is done with "dpatch-edit-patch patch XX_patchname"
+where you should replace XX with a new number and patchname with a
+descriptive shortname of the patch. You can then simply edit all the
+files your patch wants to edit, and then simply "exit 0" from the shell
+to actually create the patch file.
+
+To tweak an already existing patch, call "dpatch-edit-patch XX_patchname"
+and replace XX_patchname with the actual filename from debian/patches
+you want to use.
+
+To clean up afterwards again, "debian/rules unpatch" will do the
+work for you - or you can of course choose to call
+"fakeroot debian/rules clean" all together.
+
+
+---
+
+this documentation is part of dpatch package, and may be used by
+packages using dpatch to comply with policy on README.source. This
+documentation is meant to be useful to users who are not proficient in
+dpatch in doing work with dpatch-based packages. Please send any
+improvements to the BTS of dpatch package.
+
+original text by Gerfried Fuchs, edited by Junichi Uekawa <dancer@debian.org>
+10 Aug 2008.
--- fuse-2.8.4.orig/debian/compat
+++ fuse-2.8.4/debian/compat
@@ -0,0 +1 @@
+5
--- fuse-2.8.4.orig/debian/NEWS.Debian
+++ fuse-2.8.4/debian/NEWS.Debian
@@ -0,0 +1,37 @@
+fuse (2.6.5-2) unstable; urgency=low
+
+ The fuse-source package is back. Even though fuse comes with all recent
+ 2.6 kernels, some software (i.e. ntfs-3g) needs the most recent fuse API
+ to enable all its features.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Thu, 17 May 2007 12:56:42 +0200
+
+fuse (2.5.3-4) unstable; urgency=low
+
+ Since this version there won't be separate fuse-source package.
+ This module is available in all recent kernels and these kernels are
+ going to be default for Etch.
+
+ -- Bartosz Fenski <fenio@debian.org> Fri, 1 Sep 2006 10:34:32 +0200
+
+fuse (2.4.2-1) unstable; urgency=low
+
+ fuse-utils doesn't use debconf questions to handle creation of group
+ able to use setuid fusermount anymore. Due to some bugs (#307627, #342826,
+ #310964, #306281, #307624) it's not possible to safety remove previously
+ created groups and ensure that everything is going to work after that.
+
+ Thus I simply dropped debconf related part of packaging scripts. It's
+ up to you to clean left mess.
+
+ These files were used previously to handle creation of group and may be
+ interesting for you:
+
+ /etc/group
+
+ If you used default values then you can simply remove /etc/default/fuse
+ file and everything should work fine.
+
+ Sorry for inconvieniences.
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 2 Feb 2006 01:28:40 +0100
--- fuse-2.8.4.orig/debian/fuse-utils.manpages
+++ fuse-2.8.4/debian/fuse-utils.manpages
@@ -0,0 +1 @@
+debian/fusermount.1
--- fuse-2.8.4.orig/debian/postrm.modules.in
+++ fuse-2.8.4/debian/postrm.modules.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ remove)
+ dpkg-divert --package fuse-modules-@KERNEL@ --remove --rename --divert /lib/modules/@KERNEL@/kernel/fs/fuse/fuse.ko.linux /lib/modules/@KERNEL@/kernel/fs/fuse/fuse.ko
+ ;;
+
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- fuse-2.8.4.orig/debian/control.modules.in
+++ fuse-2.8.4/debian/control.modules.in
@@ -0,0 +1,27 @@
+Source: fuse
+Section: misc
+Priority: optional
+Maintainer: Bartosz Fenski <fenio@debian.org>
+Uploaders: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: fuse-modules-_KVERS_
+Architecture: any
+Depends: fuse-utils, linux-modules-_KVERS_ | linux-image-_KVERS_
+Provides: fuse-modules
+Description: Filesystem in USErspace kernel module (kernel _KVERS_)
+ Simple interface for userspace programs to export a virtual filesystem to
+ the linux kernel.
+ .
+ This package contains the compiled kernel modules for _KVERS_
+ .
+ If you have compiled your own kernel, you will most likely need to build
+ your own fuse-modules. The fuse-source package has been provided for use
+ with the Debian's module-assistant or kernel-package utilities to produce a
+ version of fuse-modules for your kernel.
+ .
+ Please notice thant fuse is already available in current 2.6 Linux kernel.
+ However you may need a newer version than the one shipped with your kernel.
+ .
+ Homepage: http://fuse.sourceforge.net/
--- fuse-2.8.4.orig/debian/watch
+++ fuse-2.8.4/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/fuse/fuse-([0-9\.]+)\.tar\.gz
--- fuse-2.8.4.orig/debian/copyright
+++ fuse-2.8.4/debian/copyright
@@ -0,0 +1,36 @@
+This package was debianized by Bartosz Fenski <fenio@debian.org> on
+Sun, 21 Mar 2004 23:34:32 +0200.
+
+The previous maintainer was Roland Bauerschmidt <rb@debian.org>.
+
+It was downloaded from http://fuse.sourceforge.net/
+
+Upstream Author: Miklos Szeredi <mszeredi@inf.bme.hu>
+
+Copyright:
+
+Copyright 2001-2006 Miklos Szeredi <mszeredi@inf.bme.hu>
+
+License:
+( beware that the following doesn't apply to library
+ which license is mentioned at the end of this file )
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file `/usr/share/common-licenses/GPL'.
+
+License of library:
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published
+by the Free Software Foundation, version 2.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in the file `/usr/share/common-licenses/LGPL-2'.
+
+On Debian systems, the complete text of the GNU Library (now Lesser) public
+license can be found in the file /usr/share/common-licenses/LGPL
--- fuse-2.8.4.orig/debian/libfuse-dev.examples
+++ fuse-2.8.4/debian/libfuse-dev.examples
@@ -0,0 +1,2 @@
+example/*.c
+debian/pkgfiles/libfuse-dev/Makefile
--- fuse-2.8.4.orig/debian/fuse-utils.install
+++ fuse-2.8.4/debian/fuse-utils.install
@@ -0,0 +1,2 @@
+usr/bin/fusermount
+sbin/mount.fuse
--- fuse-2.8.4.orig/debian/fuse-utils.udev
+++ fuse-2.8.4/debian/fuse-utils.udev
@@ -0,0 +1 @@
+KERNEL=="fuse", GROUP="fuse"
--- fuse-2.8.4.orig/debian/fuse-utils.fuse.init
+++ fuse-2.8.4/debian/fuse-utils.fuse.init
@@ -0,0 +1,112 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: fuse
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: S
+# Default-Stop: 0 6
+# Short-Description: Filesystem in userspace
+# Description: This file load all what's needed to make fuse work fine
+### END INIT INFO
+
+# Author: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="filesystem in userspace"
+NAME=fuse
+SCRIPTNAME=/etc/init.d/$NAME
+MOUNTPOINT=/sys/fs/fuse/connections
+
+# Gracefully exit if the package has been removed.
+test -x `which fusermount` || exit 0
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+. /lib/lsb/init-functions
+
+do_start()
+{
+ # Return
+ # 0 if fuse has been started
+ # 1 if kernel module load failed
+ # 2 if fusectl filesystem mount failed
+ if ! grep -qw fuse /proc/filesystems; then
+ modprobe fuse >/dev/null 2>&1 || return 1
+ # Dirty fix for #473545
+ #
+ # In fact the postinst script will fail at the first
+ # install if you don't have fuse kernel module loaded.
+ # (module not loaded -> no /dev/fuse -> postinst noop)
+ # Let's fix it their for now, if someone has a better idea
+ # please re-open #473545.
+ test -e /dev/fuse && chgrp fuse /dev/fuse
+ fi
+ if grep -qw fusectl /proc/filesystems && \
+ ! grep -qw $MOUNTPOINT /proc/mounts; then
+ mount -t fusectl fusectl $MOUNTPOINT >/dev/null 2>&1 || \
+ return 2
+ fi
+}
+
+do_stop()
+{
+ # Return
+ # 0 if fuse has been stopped
+ # 1 if fusectl filesystem umount failed
+ # 2 if kernel module unload failed
+ # 3 if fuse filesystems unmount failed
+ if grep -qw $MOUNTPOINT /proc/mounts; then
+ umount $MOUNTPOINT >/dev/null 2>&1 || \
+ return 1
+ fi
+ umount -at fuseblk >/dev/null 2>&1 || return 3
+ umount -at fuse >/dev/null 2>&1 || return 3
+ if grep -qw "^fuse" /proc/modules; then
+ rmmod fuse >/dev/null 2>&1 || return 2
+ fi
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|2|3) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 1) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|2|3)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
--- fuse-2.8.4.orig/debian/control
+++ fuse-2.8.4/debian/control
@@ -0,0 +1,47 @@
+Source: fuse
+Section: libs
+Priority: optional
+Maintainer: Bartosz Fenski <fenio@debian.org>
+Uploaders: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+Build-Depends: debhelper (>= 5.0.37), autotools-dev, dpatch, lsb-base (>= 3.0-6), bzip2, libselinux1-dev [!kfreebsd-amd64 !kfreebsd-i386] | libselinux-dev [!kfreebsd-amd64 !kfreebsd-i386]
+Homepage: http://fuse.sourceforge.net/
+Standards-Version: 3.8.2
+
+Package: fuse-utils
+Section: utils
+Depends: ${shlibs:Depends}, ${misc:Depends}, libfuse2 (= ${binary:Version}), sed (>= 4), adduser, udev | makedev (>= 2.3.1-80)
+Architecture: avr32 alpha amd64 armel hppa i386 ia64 lpia m68k mips mipsel powerpc ppc64 s390 s390x sh4 sparc sparc64
+Description: Filesystem in USErspace (utilities)
+ Simple interface for userspace programs to export a virtual
+ filesystem to the Linux kernel.
+ .
+ This package contains the fusermount utility which is necessary to
+ mount fuse filesystems.
+ .
+ This utility is setuid by default. Use dpkg-statoverride if you want
+ to change that.
+
+Package: libfuse-dev
+Section: libdevel
+Architecture: any
+Depends: libfuse2 (= ${binary:Version}), ${misc:Depends}, libselinux1-dev [!kfreebsd-amd64 !kfreebsd-i386] | libselinux-dev [!kfreebsd-amd64 !kfreebsd-i386]
+Suggests: fuse-utils
+Description: Filesystem in USErspace (development files)
+ Simple interface for userspace programs to export a virtual
+ filesystem to the Linux kernel.
+ .
+ This package contains the files necessary to write applications in C
+ or C++ using fuse.
+
+Package: libfuse2
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: fuse-utils (<< ${binary:Version})
+Suggests: fuse-utils
+Description: Filesystem in USErspace library
+ Simple interface for userspace programs to export a virtual
+ filesystem to the Linux kernel.
+ .
+ This package contains the files necessary to write applications in C
+ or C++ using fuse.
--- fuse-2.8.4.orig/debian/README.Debian
+++ fuse-2.8.4/debian/README.Debian
@@ -0,0 +1,27 @@
+fuse for Debian
+---------------
+
+Please note that to be able to mount any filesystems based on FUSE, you
+have to load fuse module first. If you're using 2.6.14 or newer kernels,
+fuse should be already included and you don't need to build it yourself.
+
+Simply try `modprobe fuse`.
+
+To use fusermount, you must be able to execute this command as a root,
+so you have to be a member of the group which has proper permissions.
+fusermount binary comes with 4750 permission and root:fuse owners, so
+to able to use fusermount, you should give access to user fenio like so:
+
+ adduser fenio fuse
+
+Now fenio would need to log off and on again for the group membership to come
+into effect. Then, he can use the fusermount as expected.
+
+Please avoid working as root just to be able to use fusermount. The above
+procedure is not complicated and Just Works (tm), and it's a lot safer!
+
+If you still want to use it as a root you can remove suid bit from
+/usr/bin/fusermount binary. Use dpkg-statoverride for that. Otherwise your
+changes will be overwritten every time during upgrade of fuse-utils.
+
+ -- Bartosz Fenski <fenio@debian.org>, Fri, 25 Dec 2004 16:56:10 +0200
--- fuse-2.8.4.orig/debian/libfuse2.install
+++ fuse-2.8.4/debian/libfuse2.install
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
--- fuse-2.8.4.orig/debian/fuse.conf
+++ fuse-2.8.4/debian/fuse.conf
@@ -0,0 +1,9 @@
+# Set the maximum number of FUSE mounts allowed to non-root users.
+# The default is 1000.
+#
+#mount_max = 1000
+
+# Allow non-root users to specify the 'allow_other' or 'allow_root'
+# mount options.
+#
+#user_allow_other
--- fuse-2.8.4.orig/debian/fuse-utils.preinst
+++ fuse-2.8.4/debian/fuse-utils.preinst
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+# Skip if there's no previous version
+if [ ! -z $2 ]; then
+ if dpkg --compare-versions $2 lt 2.6.2-1; then
+ stat=`dpkg-statoverride --list /usr/bin/fusermount || true`
+ if [ "$stat" = "root fuse 4754 /usr/bin/fusermount" ]; then
+ dpkg-statoverride --remove /usr/bin/fusermount;
+ elif [ "$stat" = "root fuse 4750 /usr/bin/fusermount" ]; then
+ dpkg-statoverride --remove /usr/bin/fusermount;
+ fi
+ fi
+ if dpkg --compare-versions $2 ge 2.6.2-1; then
+ update-rc.d -f fuse-utils remove >/dev/null 2>&1 || true
+ rm -f /etc/init.d/fuse-utils
+ fi
+ # Remove doc directory, replaced by symlinks (See: #429424, #445414)
+ if dpkg --compare-versions $2 lt 2.7.0-3; then
+ test -d /usr/share/doc/fuse-utils && rm -rf /usr/share/doc/fuse-utils
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
--- fuse-2.8.4.orig/debian/fuse-utils.postrm
+++ fuse-2.8.4/debian/fuse-utils.postrm
@@ -0,0 +1,20 @@
+#!/bin/bash -e
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+
+case $1 in
+ purge|remove)
+ ;;
+
+ failed-upgrade|upgrade|abort-upgrade)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- fuse-2.8.4.orig/debian/preinst.modules.in
+++ fuse-2.8.4/debian/preinst.modules.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ install)
+ dpkg-divert --package fuse-modules-@KERNEL@ --add --rename --divert /lib/modules/@KERNEL@/kernel/fs/fuse/fuse.ko.linux /lib/modules/@KERNEL@/kernel/fs/fuse/fuse.ko
+ ;;
+
+ upgrade|abort-upgrade)
+
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- fuse-2.8.4.orig/debian/changelog
+++ fuse-2.8.4/debian/changelog
@@ -0,0 +1,599 @@
+fuse (2.8.4-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Update and re-enenable 001-GNU_kFreeBSD patch to fix FTBFS on
+ GNU/kFreeBSD. (Closes: #590274)
+ Updated patch by Petr Salinger, thanks.
+
+ -- Michael Biebl <biebl@debian.org> Sat, 18 Sep 2010 22:11:07 +0200
+
+fuse (2.8.4-1) unstable; urgency=low
+
+ * New upstream version.
+ - ACK previous non-maintainer upload (559478)
+ - fixes problems with gvfs (585648)
+ * Added sparc64 to supported archs (560987)
+
+ -- Bartosz Fenski <fenio@debian.org> Mon, 19 Jul 2010 18:57:27 +0200
+
+fuse (2.8.1-1.2) unstable; urgency=high
+
+ * Non-maintainer upload by the Security Team.
+ * Fixed CVE-2009-3297: race condition in fusermount (Closes: #567633)
+
+ -- Giuseppe Iuculano <iuculano@debian.org> Sun, 31 Jan 2010 22:23:35 +0100
+
+fuse (2.8.1-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Apply patch from Petr Salinger to fix FTBFS on GNU/kFreeBSD (Closes:
+ #552600)
+ * Apply patch from Vagrant Cascadian to run MAKEDEV only if found
+ (Closes: #550334, #553015)
+ * Invoke dh_makeshlibs with an appropriately strict dependency
+ (Closes: #557143)
+
+ -- Simon McVittie <smcv@debian.org> Fri, 04 Dec 2009 17:24:05 +0000
+
+fuse (2.8.1-1) unstable; urgency=low
+
+ * New upstream version (Closes: #543176)
+ - fixes missing fuse_reply_bmap (Closes: #531329)
+ * Fixes problem with udev (Closes: #543271, #473545)
+ * Changed order of dependencies udev/makedev (Closes: #546867)
+ * Correctly uses MAKEDEV and doesn't mess with udev anymore (Closes: #534572)
+ * Doesn't use libulockmgr patch anymore, fixed upstream.
+ * Shipped with README.Source file.
+
+ -- Bartosz Fenski <fenio@debian.org> Sun, 25 Oct 2009 17:05:03 +0100
+
+fuse (2.7.4-2) unstable; urgency=low
+
+ * Ack previous NMU, thanks.
+ * Initscript LSB headers now depend on $remote_fs (Closes: #533028).
+ * Install fusermount with restricted permissions to avoid a race condition
+ during package installation (Closes: #502300).
+ * Bump Standards-Version.
+ * Merge Aurelien Jarno's patch to support GNU/kFreeBSD (Closes: #528537).
+ * Add missing pthread link for libulockmgr.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Wed, 01 Jul 2009 21:00:52 +0200
+
+fuse (2.7.4-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Only reload udev when /etc/init.d/udev exists.
+ Closes: #499352
+
+ -- Thomas Viehmann <tv@beamnet.de> Thu, 02 Oct 2008 22:54:11 +0200
+
+fuse (2.7.4-1) unstable; urgency=low
+
+ * Ack NMU from Thomas Viehmann, thanks.
+ * New upstream release.
+ * Really fix /dev/fuse to use fuse group (Closes: #473545).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Tue, 16 Sep 2008 09:43:52 +0200
+
+fuse (2.7.3-5.1) unstable; urgency=low
+
+ * Non-maintainer upload coordinated with Bartosz..
+ * Unmount filesystems of type fuse and fuseblk in
+ fuse-utils.fuse.init on stop. Closes: #470512.
+ Analysis by Yogesh Rananavare, thanks!
+
+ -- Thomas Viehmann <tv@beamnet.de> Fri, 12 Sep 2008 19:25:07 +0200
+
+fuse (2.7.3-5) unstable; urgency=low
+
+ * Drop fuse-source package for the stale release (Closes: #485909).
+ * Fix lintian 'patch-modifying-debian-files' error.
+ * Bump Standards-Version to 3.8.0.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Sun, 10 Aug 2008 17:55:28 +0200
+
+fuse (2.7.3-4) unstable; urgency=low
+
+ * Fix device node group after first-time-install (Closes: #473545).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Tue, 01 Apr 2008 23:00:49 +0200
+
+fuse (2.7.3-3) unstable; urgency=low
+
+ * Really fix the fuse-utils.postinst issue (Closes: #470485).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Mon, 17 Mar 2008 20:17:58 +0100
+
+fuse (2.7.3-2) unstable; urgency=medium
+
+ * Improve udev detection, sorry for the inconvenience (Closes: #470485).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Sun, 16 Mar 2008 15:29:03 +0100
+
+fuse (2.7.3-1) unstable; urgency=low
+
+ * New upstream release.
+ * Fix postinst script udev detection (Closes: #470485).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Wed, 12 Mar 2008 21:18:46 +0100
+
+fuse (2.7.2-1) unstable; urgency=low
+
+ * New upstream release.
+ * Bump Standards-Version to 3.7.3.
+ * Drop 002-Fix_umounting_when_mtab_is_a_symlink patch, fixed upstream.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Sat, 05 Jan 2008 02:35:33 +0100
+
+fuse (2.7.1-2) unstable; urgency=low
+
+ * Add 002-Fix_umounting_when_mtab_is_a_symlink patch (Closes: #448855).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Fri, 23 Nov 2007 15:27:17 +0100
+
+fuse (2.7.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * Fix debian/copyright: library is LGPL v2 only.
+ * Use new dpkg 'homepage' field.
+ * Do not ignore make distclean error anymore.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Sun, 28 Oct 2007 12:25:18 +0100
+
+fuse (2.7.0-3) unstable; urgency=low
+
+ * Really fix issues when upgrading /usr/share/doc/fuse-utils to a symlink (Closes: #445414).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Sat, 13 Oct 2007 21:23:14 +0200
+
+fuse (2.7.0-2) unstable; urgency=low
+
+ * Do not include dpatch.make in fuse-source rules (Closes: #443702).
+ * Drop ucf dependency, useless (Closes: #439079).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Mon, 01 Oct 2007 19:22:53 +0200
+
+fuse (2.7.0-1) unstable; urgency=low
+
+ * New upstream release:
+ - Build against 2.6.22 linux kernel (Closes: #434327).
+ * Build depends on libselinux1-dev | libselinux-dev, libfuse-dev depends on it too (Closes: #434225).
+ * Umount all fuse mouted filesystems before unloading kernel module (Closes: #411143), thanks to Javier Merino for his patch.
+ * Improve NEWS.Debian (Closes: #433927), thanks to Tomas Pospisek for fixing my crap english.
+ * Capitalize 'Linux' in long description (Closes: #434109).
+ * Drop 002-Allow_standalone_examples_build and 003-Typo_in_fuse.h_comments, fixed upstream.
+ * Drop 001-Fix_bashism_in_mount.fuse, mount.fuse is not a bash script anymore.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Tue, 24 Jul 2007 10:26:13 +0200
+
+fuse (2.6.5-3) unstable; urgency=low
+
+ * Fix typo in fuse-source package.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Sat, 30 Jun 2007 12:16:19 +0200
+
+fuse (2.6.5-2) unstable; urgency=low
+
+ * The 'RE-INTRODUCE FUSE-SOURCE' release.
+ - Build fuse-source package again (Closes: #414499).
+ * Fix bashism in mount.fuse (Closes: #424435).
+ * Improve example Makefile.
+ * Fixe typo in fuse.h comments (Closes: #424871).
+ * Remove 'doc' directory of < 2.6.5-1 fuse-utils package (replaced by symlink) (Closes: #429424).
+ * Install sample fuse.conf in /etc (Closes: #429666).
+ * Update debian/watch.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Thu, 17 May 2007 12:56:42 +0200
+
+fuse (2.6.5-1) unstable; urgency=low
+
+ * New upstream release :
+ - Drop 001-Fix_bashism_in_mount.fuse patch, fixed upstream.
+ - Drop 002-Handle_spaces_in_paths patch, fixed upstream.
+ - Drop 003-Mount-fusectl_fs_with_fusectl_type, fixed upstream.
+ * Make debian/rules more 'human redable'.
+ * Rewrite docs handling.
+ * Add all missing files to libfuse-dev's examples.
+ Write a standalone Makefile (Closes: #382316, #423237).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Wed, 02 May 2007 09:21:21 +0200
+
+fuse (2.6.3-4) unstable; urgency=low
+
+ * Update fuse init script to REALLY mount fusectl filesystem with fusectl
+ type (Closes: #417945).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Fri, 20 Apr 2007 08:53:02 +0200
+
+fuse (2.6.3-3) unstable; urgency=low
+
+ * Skip preinst if there's no previous installed version (Closes: #417640).
+ * Handle spaces in paths (Closes: #417834).
+ * Mount fusectl filesystem with fusectl type (Closes: #417945).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Tue, 10 Apr 2007 21:06:39 +0200
+
+fuse (2.6.3-2) unstable; urgency=low
+
+ * The 'BUGFIX' release.
+ * Fix preinst script :
+ - dpkg-statoverride --list is not fatal anymore.
+ - Use dpkg --compare-version to define if override should be removed.
+ * Fix postrm script to handle 'abort-upgrade' (Closes: #413799).
+ * Make debian/rules look better (drop arch-indep stuff).
+ * Handle patches with a patch system (dpatch).
+ * Do not remove init_script from source tree (makes re-build fail).
+ * Fix init script installation, wrong runlevels, wrong name.
+ * Fix bashism in mount.fuse (Closes: #413403).
+ * Change fuse node group with chgrp if udev is not present (Closes: #413437).
+ * Write a new init script, lsb-compliant (Closes: #413394).
+ * Bump compat to 5.
+ * Improve control:
+ - Two space before homepage,
+ - Drop versionned suggests,
+ - Switch to ${binary:Version},
+ - Add ${misc:Depends}.
+ * Remove fuse-utils.postrm (noop).
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Thu, 8 Mar 2007 22:10:31 +0100
+
+fuse (2.6.3-1) unstable; urgency=HIGH
+
+ * Urgency set to HIGH as it fixes a critical and a serious bug.
+ * Added myself to uploaders in agreement with Bartosz.
+ * New upstream release (Closes: #409554, #410032).
+ * Create a versioned shlibs file (Closes: #409644).
+ * Fix package version in fuse-utils.postinst and do not remove override in
+ postrm (Closes: #388693).
+ * Add watch file.
+
+ -- Adam Cécile (Le_Vert) <gandalf@le-vert.net> Wed, 7 Feb 2007 10:35:29 +0100
+
+fuse (2.6.2-1) unstable; urgency=low
+
+ * New upstream release. (Closes: #398709, #397364)
+ - includes init script which hopefully fixes problems with creation
+ of fuse device. (Closes: #393126)
+ - works ok on read only root filesystem. (Closes: #393693)
+ * Contains Sam Morris's patches. Thanks! (Closes: #388693)
+ * Does not remove fuse group again. (Closes: #388266)
+ * Makes fusermount world readable. (Closes: #386736)
+ * ACK NMU thanks! (Closes: #404904)
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 30 Jan 2007 22:32:38 +0100
+
+fuse (2.5.3-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Run MAKEDEV only if it exists, and do not depend on the symlink in /dev
+ (closes: #385696).
+
+ -- martin f. krafft <madduck@debian.org> Sat, 9 Sep 2006 21:07:01 +0200
+
+fuse (2.5.3-4) unstable; urgency=low
+
+ * The 'Getting rid of fuse-source package' release.
+ * Since Etch will include kernels that support fuse module ot of the box
+ from this release there won't be fuse-source package, thus I'm closing
+ bugs related to building/loading modules.
+ (Closes: #341739, #369993, #306016, #345492)
+ * libfuse2 conflicts with previous versions of fuse-utils. (Closes: #381880)
+ * Handling of failed udevcontrol invocation. (Closes: #383076)
+ * Bumped Standards-Version to 3.7.2 (no changes needed).
+
+ -- Bartosz Fenski <fenio@debian.org> Fri, 1 Sep 2006 10:19:58 +0200
+
+fuse (2.5.3-3) unstable; urgency=low
+
+ * ACK previous NMU. Thanks to Faidon Liambotis. (Closes: #372142)
+ * Uses dh_installmodules instead of hand-made script. (Closes: #381766)
+ * Reloads udev rules during installation. (Closes: #368674)
+ * Includes notice that fuse is available in recent kernels. (Closes: #369993)
+
+ -- Bartosz Fenski <fenio@debian.org> Mon, 14 Aug 2006 13:29:31 +0200
+
+fuse (2.5.3-2) unstable; urgency=low
+
+ * Doesn't fail on install. (Closes: #365117, #364968, #364832, #365016)
+
+ -- Bartosz Fenski <fenio@debian.org> Sat, 29 Apr 2006 17:28:18 +0200
+
+fuse (2.5.3-1) unstable; urgency=low
+
+ * New upstream release.
+ * Moved from groupdel to delgroup. (Closes: #360991, #364106)
+ * Uses dpkg-statoverride to change fusermount owner. (Closes: #361519)
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 11 Apr 2006 15:11:11 +0200
+
+fuse (2.5.2-4) unstable; urgency=low
+
+ * Fix for wrong chown line in postinst. (Closes: #358564)
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 23 Mar 2006 12:03:16 +0100
+
+fuse (2.5.2-3) unstable; urgency=low
+
+ * Sets suid bit for fusermount binary. (Closes: #354748)
+ * Creates /dev/fuse or /dev/.static/dev/fuse device. (Closes: #334526)
+ * Creates fuse group and chowns /dev/fuse for it. (Closes: #353703)
+ * Removes /etc/default/fuse-utils file. (Closes: #351387)
+ * Removed po-debconf from build dependencies.
+ * Removed ucf from fuse-utils dependencies.
+ * Updated README files.
+
+ -- Bartosz Fenski <fenio@debian.org> Wed, 22 Mar 2006 14:27:10 +0100
+
+fuse (2.5.2-2) unstable; urgency=low
+
+ * Revert versioned symbol change incorporated in 2.5.x. (Closes: #352631)
+
+ -- Bartosz Fenski <fenio@debian.org> Wed, 22 Feb 2006 20:53:39 +0100
+
+fuse (2.5.2-1) unstable; urgency=low
+
+ * New upstream version. (Closes: #351172)
+ * Fixes FTBFS because of mount.fuse installation problems. (Closes: #351214)
+ * Minor update in fusermount manual.
+
+ -- Bartosz Fenski <fenio@debian.org> Fri, 3 Feb 2006 13:54:27 +0100
+
+fuse (2.5.1-1) unstable; urgency=low
+
+ * New upstream version. (Closes: #350659)
+ * The 'Goodbye debconf' release.
+ - reorganization of all packaging scripts to get rid of debconf stuff.
+ - doesn't handle creation of group anymore, so
+ (Closes: #307627, #342826, #310964, #306281, #307624)
+ * ACK previous NMU. (Closes: #339688, #340398, #298829)
+ * Handles creation/remove of fuse device. (Closes: #334639, #297505)
+ * Since now fuse-source depends on either module-assistant
+ or kernel-package. (Closes: #326742)
+ * Includes mount.fuse script. (Closes: #343702, #334381)
+ * Doesn't use debconf templates anymore. (Closes: #337568, #337572, #340796)
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 2 Feb 2006 01:08:40 +0100
+
+fuse (2.4.1-0.1) unstable; urgency=high
+
+ * Non-maintainer upload (waited long enough to see simple but ugly bugs to
+ be fixed)
+ * applied patch from Miklos Szeredi to fix interpretation of special chars
+ in fusermount (see CVE-2005-3531 for details, closes: #340398)
+ * New upstream version with minor bugfixes, resolves FTBFS problems with
+ rlog and encfs (closes: #339688)
+ * made fuse-utils just Recommend fuse-module and Suggest fuse-source
+ (because kernel 2.6.14 packages provide FUSE and because this automatism
+ has never worked as expected and has been PITA instead! closes: #298829)
+
+ -- Eduard Bloch <blade@debian.org> Thu, 29 Dec 2005 12:31:26 +0100
+
+fuse (2.4.0-1) unstable; urgency=low
+
+ * New upstream version.
+ * ACK previous NMU. (Closes: #325993)
+ * Test if ucf is installed before using it. (Closes: #330791)
+ * Added debconf-2.0 dependency. (Closes: #331828)
+ * Set fusermount binary permission to 4755 instead of 4754.
+
+ -- Bartosz Fenski <fenio@debian.org> Fri, 14 Oct 2005 18:35:12 +0200
+
+fuse (2.3.0-4.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * run 'dpkg-statoverride --remove ...' at remove time (closes:
+ #325993)
+
+ -- Jonas Meurer <mejo@debian.org> Mon, 3 Oct 2005 00:40:58 +0200
+
+fuse (2.3.0-4) unstable; urgency=low
+
+ * Added info about fuse-source in fuse-utils. (Closes: #322549)
+ * Fixed building issues with m-a tool. (Closes: #321935, #310764)
+ * From now we depend on module-assistant.
+
+ -- Bartosz Fenski <fenio@debian.org> Mon, 15 Aug 2005 22:32:58 +0200
+
+fuse (2.3.0-3) unstable; urgency=low
+
+ * Added is_true function to postrm script (Closes: #316735)
+ * Added adduser to dependencies (Closes: #320837)
+ * Bumped Standards-Version (no changes needed).
+
+ -- Bartosz Fenski <fenio@debian.org> Sat, 6 Aug 2005 18:18:30 +0200
+
+fuse (2.3.0-2) unstable; urgency=high
+
+ * Fixes problems with building as non-root (Closes: #310764)
+
+ -- Bartosz Fenski <fenio@debian.org> Sun, 19 Jun 2005 18:43:11 +0200
+
+fuse (2.3.0-1) unstable; urgency=high
+
+ * New upstream version.
+ - fixes security bug (Closes: #311634)
+ * Added Vietnamese debconf translation by Clytie Siddall (Closes: #311750)
+
+ -- Bartosz Fenski <fenio@debian.org> Mon, 6 Jun 2005 13:01:12 +0200
+
+fuse (2.2.1-5) unstable; urgency=low
+
+ * Now allows to be built as non-root (Closes: #306016)
+ Thanks for Guido Trotter for spotting this.
+ * Applied patch provided by Euan MacGregor (Closes: #298825)
+ Should fix problems with dpkg-statoverride.
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 26 Apr 2005 11:43:18 +0200
+
+fuse (2.2.1-4) unstable; urgency=high
+
+ * Urgency high, cause we still need previous fixes in sarge.
+ Current ones are important too.
+ * Added debhelper dependency to fuse-source (Closes: #303916)
+ Thanks to tillo for reporting this.
+ * Raised priority of debconf questions to avoid silent remove of groups.
+ Thanks to Tom Verbreyt for reporting this (Closes: #303954)
+
+ -- Bartosz Fenski <fenio@debian.org> Sun, 10 Apr 2005 11:43:11 +0200
+
+fuse (2.2.1-3) unstable; urgency=high
+
+ * Urgency high, we need this fix in sarge.
+ * Added 'ucf' dependency for fuse-utils (Closes: #303621)
+ Thanks to Steve Garcia for spotting this.
+
+ -- Bartosz Fenski <fenio@debian.org> Sat, 9 Apr 2005 10:54:12 +0200
+
+fuse (2.2.1-2) unstable; urgency=low
+
+ * Added explicit version of sed to fuse-utils dependencies (Closes: #300375)
+ Thanks to Iisak Kuusela for reporting this.
+ * Fixed compilation issues without module-assistant (Closes: #300954)
+ Thanks to Jeff Bonham for reporting this. Also README.Debian file has
+ been added to fuse-source package to describe this kind of build.
+ * New debconf translations:
+ - French (Closes: #299761)
+ Thanks to Jean-Luc Coulon.
+ - Czech (Closes: #300364)
+ Thanks to Miroslav Kure.
+ - Brazilian Portuguese (Closes: #300826)
+ Thanks to Felipe Augusto van de Wiel.
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 24 Mar 2005 21:59:11 +0100
+
+fuse (2.2.1-1) unstable; urgency=high
+
+ * New upstream bugfix release.
+ Urgency high due to security fix (Closes: #299339)
+
+ -- Bartosz Fenski <fenio@debian.org> Sun, 13 Mar 2005 20:02:11 +0100
+
+fuse (2.2-3) unstable; urgency=low
+
+ * Added --with-kernel switch to configure call (Closes: #298844)
+ * Added postinst depmod call (Closes: #298845)
+ Thanks for Eduard Bloch for above reports.
+
+ -- Bartosz Fenski <fenio@debian.org> Thu, 10 Mar 2005 19:23:11 +0100
+
+fuse (2.2-2) unstable; urgency=low
+
+ * Added overlooked information about licensing of library.
+
+ -- Bartosz Fenski <fenio@debian.org> Mon, 7 Mar 2005 18:22:12 +0100
+
+fuse (2.2-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Bartosz Fenski <fenio@debian.org> Sun, 6 Feb 2005 17:36:34 +0100
+
+fuse (2.1-5) unstable; urgency=low
+
+ * Now module works with 2.6.10 kernel (Closes: #291842)
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 25 Jan 2005 14:42:31 +0100
+
+fuse (2.1-4) unstable; urgency=low
+
+ * Now building with -v switch to make sure that bugs will be closed
+ automatically.
+ * This is still new upstream release so (Closes: #288387)
+
+ -- Bartosz Fenski <fenio@debian.org> Tue, 11 Jan 2005 13:28:32 +0100
+
+fuse (2.1-3) unstable; urgency=low
+
+ * s/fenio@o2.pl/fenio@debian.org/
+
+ -- Bartosz Fenski <fenio@debian.org> Sat, 1 Jan 2005 23:08:31 +0100
+
+fuse (2.1-2) unstable; urgency=low
+
+ * Corrected an upload error, which dumped the polish debconf translation.
+ Please excuse.
+
+ -- martin f. krafft <madduck@debian.org> Sun, 26 Dec 2004 13:09:49 +0100
+
+fuse (2.1-1) unstable; urgency=low
+
+ * New upstream version.
+ - supports shared library (Closes: #147792)
+ * Added debconf question about setuid (Closes: #280501)
+ * Totally rewritten debian/* stuff with module-assistant in mind.
+ - fuse-source doesn't contain util/libs (Closes: #278109)
+ - repeated building should work fine now (Closes: #273362)
+ - m-a can detect kernel version properly (Closes: #270843)
+ - kernel module now only recommends kernel-image (Closes: #281694)
+
+ -- Bartosz Fenski <fenio@o2.pl> Thu, 11 Nov 2004 18:45:32 +0100
+
+fuse (1.3-1) unstable; urgency=low
+
+ * New upstream version.
+ * debian/*.control:
+ - added terminal newlines at the end of file
+ - added missing urls to homepage
+ - added MJ Ray as an uploader
+ * debian/rules:
+ - some ordering changes to remove config.(sub|guess) files from diff.gz
+
+ -- Bartosz Fenski <fenio@o2.pl> Sat, 17 Jul 2004 21:45:12 +0200
+
+fuse (1.2-1) unstable; urgency=low
+
+ * New upstream version.
+ * debian/control:
+ - added Section for sources
+ - changed Section: from devel to libdevel for libfuse0-dev
+ * Added debian/watch file.
+ * debian/copyright:
+ - distinguished copyright from license
+ * debian/rules:
+ - some fixes were made to support 2.6 kernels (Closes: #235128)
+
+ -- Bartosz Fenski <fenio@o2.pl> Thu, 24 Jun 2004 15:29:13 +0200
+
+fuse (1.1-2) unstable; urgency=low
+
+ * added original README.Debian file
+ * debian/copyright:
+ - added information about previous maintainer
+
+ -- Bartosz Fenski <fenio@o2.pl> Mon, 29 Mar 2004 07:44:23 +0100
+
+fuse (1.1-1) unstable; urgency=low
+
+ * New maintainer. Thanks Roland for your contribution.
+ * New upstream release (Closes: #235128, #206195)
+ * Added manual page contributed by Bastian Kleineidam.
+ Thanks for providing it. (Closes: #235176)
+ * FUSE 1.1 doesn't include .cvsignore files (Closes: #235091)
+ * We don't compress examples (Closes: #147791)
+ * debian/control:
+ - bumped standards version
+ - added homepage
+ * debian/rules: many fixes/additions partially fetched from Bastian's
+ packages. Thanks goes to him once again.
+ * debian/docs: added some new files
+ * debian/*: replaced name of maintainer
+
+ -- Bartosz Fenski <fenio@o2.pl> Sun, 21 Mar 2004 23:10:33 +0200
+
+fuse (1.0-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/genchanges.sh: Only run gpg/pgp if available. Closes: #209358.
+ * debian/fuse-module.control: Fixed typo (fuse-module instead of
+ fule-module). Closes: #212576.
+
+ -- Roland Bauerschmidt <rb@debian.org> Tue, 7 Oct 2003 18:00:23 +0200
+
+fuse (0.95-1) unstable; urgency=low
+
+ * Initial Release.
+ * Adapted lots of stuff from the pcmcia-cs package to build module
+ packages properly.
+
+ -- Roland Bauerschmidt <rb@debian.org> Sun, 7 Apr 2002 19:56:20 +0200
+
--- fuse-2.8.4.orig/debian/rules
+++ fuse-2.8.4/debian/rules
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Dpatch system
+include /usr/share/dpatch/dpatch.make
+
+# Some variables I'll use below
+DESTDIR = $(CURDIR)/debian/tmp
+DOCS = Filesystems FAQ NEWS README README.NFS doc/* debian/README.Debian debian/NEWS.Debian
+
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+CFLAGS += -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+config.status: configure patch-stamp
+ dh_testdir
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+ CFLAGS="$(CFLAGS)" \
+ ./configure --host=$(DEB_HOST_GNU_TYPE) \
+ --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr \
+ --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info \
+ --disable-kernel-module \
+ --disable-example
+
+build: build-stamp
+build-stamp: config.status
+ $(MAKE)
+ touch $@
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp config.log
+ [ ! -f example/Makefile ] || $(MAKE) distclean -C example
+ [ ! -f Makefile ] || $(MAKE) distclean
+ dh_clean config.guess config.sub
+
+install-arch:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -s
+ dh_installdirs -s
+ $(MAKE) install DESTDIR=$(DESTDIR)
+ dh_install -s --source=debian/tmp
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+ install -D -m0640 $(CURDIR)/debian/fuse.conf \
+ $(CURDIR)/debian/fuse-utils/etc/fuse.conf
+endif
+
+binary-arch: build install-arch
+ dh_testdir -s
+ dh_testroot -s
+ dh_installchangelogs -s ChangeLog
+ dh_installdocs -plibfuse2 $(DOCS)
+ dh_installdocs -plibfuse-dev $(DOCS)
+ dh_installexamples -s
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+ for PKG in fuse-utils; do \
+ rm -rf debian/$$PKG/usr/share/doc/$$PKG; \
+ cd debian/$$PKG/usr/share/doc/ && ln -s libfuse2 $$PKG; \
+ done
+endif
+ dh_installman -s
+ dh_installudev
+ dh_link -s
+ dh_strip -s
+ dh_compress -s -Xusr/share/doc/libfuse-dev/examples/
+ dh_fixperms -s
+ dh_installdebconf -s
+ dh_installinit -s --name=fuse -- start 34 S . stop 41 0 6 .
+ dh_makeshlibs -s -V "libfuse2 (>= 2.8.1)"
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s
+ dh_md5sums -s
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+ chmod 0755 debian/fuse-utils/usr/bin/fusermount
+endif
+ dh_builddeb -s
+
+binary-indep:
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install
--- fuse-2.8.4.orig/debian/fusermount.1
+++ fuse-2.8.4/debian/fusermount.1
@@ -0,0 +1,32 @@
+.TH FUSERMOUNT 1 "3 February 2006"
+.SH NAME
+fusermount \- mount FUSE filesystems
+.SH SYNOPSIS
+\fBfusermount\fP [\fIoptions\fP] \fImountpoint\fP
+.SH DESCRIPTION
+A virtual FUSE filesystem will be created on the mount point.
+.SH OPTIONS
+.TP
+\fB-h\fP
+print help
+.TP
+\fB-V\fP
+print version
+.TP
+\fB-o opt[,opt...]\fP
+mount options
+.TP
+\fB-u\fP
+unmount
+.TP
+\fB-q\fP
+quiet
+.TP
+\fB-z\fP
+lazy unmount (works even if resource is still busy)
+.SH AUTHOR
+This manpage was originally written by Bastian Kleineidam
+<calvin@debian.org> for the Debian distribution of fuse-utils.
+Updated by Bartosz Fenski <fenio@debian.org>.
+
+The main author of FUSE is Miklos Szeredi <mszeredi@inf.bme.hu>.
--- fuse-2.8.4.orig/debian/patches/00list
+++ fuse-2.8.4/debian/patches/00list
@@ -0,0 +1,4 @@
+#000-Build_system_do_not_install_init_script
+001-GNU_kFreeBSD
+#002-Missing_pthread_link_on_libulockmgr
+#003-CVE-2009-3297
--- fuse-2.8.4.orig/debian/patches/00patch-opts
+++ fuse-2.8.4/debian/patches/00patch-opts
@@ -0,0 +1 @@
+patch_opts="-g0 -f -Z --no-backup-if-mismatch"
--- fuse-2.8.4.orig/debian/patches/002-Missing_pthread_link_on_libulockmgr
+++ fuse-2.8.4/debian/patches/002-Missing_pthread_link_on_libulockmgr
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 002-Missing_pthread_link_on_libulockmgr
+## by Petr Salinger <Petr.Salinger@seznam.cz>
+##
+## DP: See patch title
+
+@DPATCH@
+diff -Nur fuse-2.7.4.orig/lib/Makefile.am fuse-2.7.4/lib/Makefile.am
+--- fuse-2.7.4.orig/lib/Makefile.am 2008-07-25 20:17:21.000000000 +0200
++++ fuse-2.7.4/lib/Makefile.am 2009-07-03 23:43:04.933014527 +0200
+@@ -38,6 +38,6 @@
+ -Wl,--version-script,$(srcdir)/fuse_versionscript
+
+ libulockmgr_la_SOURCES = ulockmgr.c
+-libulockmgr_la_LDFLAGS = -version-number 1:0:1
++libulockmgr_la_LDFLAGS = -pthread -version-number 1:0:1
+
+ EXTRA_DIST = fuse_versionscript
+diff -Nur fuse-2.7.4.orig/lib/Makefile.in fuse-2.7.4/lib/Makefile.in
+--- fuse-2.7.4.orig/lib/Makefile.in 2008-07-25 20:19:22.000000000 +0200
++++ fuse-2.7.4/lib/Makefile.in 2009-07-03 23:42:52.247000319 +0200
+@@ -234,7 +234,7 @@
+ -Wl,--version-script,$(srcdir)/fuse_versionscript
+
+ libulockmgr_la_SOURCES = ulockmgr.c
+-libulockmgr_la_LDFLAGS = -version-number 1:0:1
++libulockmgr_la_LDFLAGS = -pthread -version-number 1:0:1
+ EXTRA_DIST = fuse_versionscript
+ all: all-am
+
--- fuse-2.8.4.orig/debian/patches/000-Build_system_do_not_install_init_script
+++ fuse-2.8.4/debian/patches/000-Build_system_do_not_install_init_script
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 000-Build_system_do_not_install_init_script
+## by Bartosz Fenski <fenio@debian.org>
+##
+## DP: Upstream build system should not run update-rc.d.
+## DP: Disable it!
+
+@DPATCH@
+
+--- fuse-2.6.3.orig/util/Makefile.in
++++ fuse-2.6.3/util/Makefile.in
+@@ -502,7 +502,7 @@
+ $(INSTALL_PROGRAM) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
+ @if test -x /usr/sbin/update-rc.d; then \
+ echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \
+- /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
++ # /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
+ fi
+
+ install-data-local:
--- fuse-2.8.4.orig/debian/patches/001-GNU_kFreeBSD
+++ fuse-2.8.4/debian/patches/001-GNU_kFreeBSD
@@ -0,0 +1,116 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 001-GNU_kFreeBSD
+## by Aurelien Jarno <aurel32@debian.org>
+##
+## DP: GNU/kFreeBSD support
+
+@DPATCH@
+
+diff --git a/include/fuse_common.h b/include/fuse_common.h
+index c263f6f..2d18346 100644
+--- a/include/fuse_common.h
++++ b/include/fuse_common.h
+@@ -261,7 +261,7 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
+ * ----------------------------------------------------------- */
+
+ #if FUSE_USE_VERSION < 26
+-# ifdef __FreeBSD__
++# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ # if FUSE_USE_VERSION < 25
+ # error On FreeBSD API version 25 or greater must be used
+ # endif
+diff --git a/include/fuse_compat.h b/include/fuse_compat.h
+index 225276f..56b6c13 100644
+--- a/include/fuse_compat.h
++++ b/include/fuse_compat.h
+@@ -65,7 +65,7 @@ struct fuse *fuse_setup_compat25(int argc, char *argv[],
+
+ void fuse_teardown_compat22(struct fuse *fuse, int fd, char *mountpoint);
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+ #include <sys/statfs.h>
+
+ struct fuse_operations_compat22 {
+diff --git a/include/fuse_lowlevel_compat.h b/include/fuse_lowlevel_compat.h
+index aba45e6..d8c7108 100644
+--- a/include/fuse_lowlevel_compat.h
++++ b/include/fuse_lowlevel_compat.h
+@@ -72,7 +72,7 @@ size_t fuse_dirent_size(size_t namelen);
+ char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
+ off_t off);
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+
+ #include <sys/statfs.h>
+
+diff --git a/lib/fuse.c b/lib/fuse.c
+index 95cf50b..83c406c 100644
+--- a/lib/fuse.c
++++ b/lib/fuse.c
+@@ -954,7 +954,7 @@ static inline void fuse_prepare_interrupt(struct fuse *f, fuse_req_t req,
+ fuse_do_prepare_interrupt(req, d);
+ }
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+
+ static int fuse_compat_open(struct fuse_fs *fs, const char *path,
+ struct fuse_file_info *fi)
+@@ -3721,7 +3721,7 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
+ if (!f->conf.ac_attr_timeout_set)
+ f->conf.ac_attr_timeout = f->conf.attr_timeout;
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ /*
+ * In FreeBSD, we always use these settings as inode numbers
+ * are needed to make getcwd(3) work.
+@@ -3897,7 +3897,7 @@ void fuse_register_module(struct fuse_module *mod)
+ fuse_modules = mod;
+ }
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+
+ static struct fuse *fuse_new_common_compat(int fd, const char *opts,
+ const struct fuse_operations *op,
+diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
+index c519bfb..40d7293 100644
+--- a/lib/fuse_lowlevel.c
++++ b/lib/fuse_lowlevel.c
+@@ -1734,7 +1734,7 @@ int fuse_req_getgroups(fuse_req_t req, int size, gid_t list[])
+ }
+ #endif
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+
+ static void fill_open_compat(struct fuse_open_out *arg,
+ const struct fuse_file_info_compat *f)
+diff --git a/lib/fuse_session.c b/lib/fuse_session.c
+index 3758627..dd1311f 100644
+--- a/lib/fuse_session.c
++++ b/lib/fuse_session.c
+@@ -200,6 +200,6 @@ void fuse_chan_destroy(struct fuse_chan *ch)
+ free(ch);
+ }
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+ FUSE_SYMVER(".symver fuse_chan_new_compat24,fuse_chan_new@FUSE_2.4");
+ #endif
+diff --git a/lib/helper.c b/lib/helper.c
+index 3d0db4a..107174e 100644
+--- a/lib/helper.c
++++ b/lib/helper.c
+@@ -357,7 +357,7 @@ int fuse_version(void)
+
+ #include "fuse_compat.h"
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+
+ struct fuse *fuse_setup_compat22(int argc, char *argv[],
+ const struct fuse_operations_compat22 *op,
--- fuse-2.8.4.orig/debian/patches/003-CVE-2009-3297.dpatch
+++ fuse-2.8.4/debian/patches/003-CVE-2009-3297.dpatch
@@ -0,0 +1,492 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 003-CVE-2009-3297.dpatch by Giuseppe Iuculano <iuculano@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: CVE-2009-3297
+
+@DPATCH@
+diff -urNad fuse~/lib/mount.c fuse/lib/mount.c
+--- fuse~/lib/mount.c 2009-01-28 10:46:45.000000000 +0100
++++ fuse/lib/mount.c 2010-01-31 22:21:15.000000000 +0100
+@@ -290,7 +290,7 @@
+ }
+
+ if (geteuid() == 0) {
+- fuse_mnt_umount("fuse", mountpoint, 1);
++ fuse_mnt_umount("fuse", mountpoint, mountpoint, 1);
+ return;
+ }
+
+diff -urNad fuse~/lib/mount_util.c fuse/lib/mount_util.c
+--- fuse~/lib/mount_util.c 2008-07-10 21:35:39.000000000 +0200
++++ fuse/lib/mount_util.c 2010-01-31 22:21:15.000000000 +0100
+@@ -119,18 +119,19 @@
+ return res;
+ }
+
+-int fuse_mnt_umount(const char *progname, const char *mnt, int lazy)
++int fuse_mnt_umount(const char *progname, const char *abs_mnt,
++ const char *rel_mnt, int lazy)
+ {
+ int res;
+ int status;
+ sigset_t blockmask;
+ sigset_t oldmask;
+
+- if (!mtab_needs_update(mnt)) {
+- res = umount2(mnt, lazy ? 2 : 0);
++ if (!mtab_needs_update(abs_mnt)) {
++ res = umount2(rel_mnt, lazy ? 2 : 0);
+ if (res == -1)
+ fprintf(stderr, "%s: failed to unmount %s: %s\n",
+- progname, mnt, strerror(errno));
++ progname, abs_mnt, strerror(errno));
+ return res;
+ }
+
+@@ -150,7 +151,7 @@
+ if (res == 0) {
+ sigprocmask(SIG_SETMASK, &oldmask, NULL);
+ setuid(geteuid());
+- execl("/bin/umount", "/bin/umount", "-i", mnt,
++ execl("/bin/umount", "/bin/umount", "-i", rel_mnt,
+ lazy ? "-l" : NULL, NULL);
+ fprintf(stderr, "%s: failed to execute /bin/umount: %s\n",
+ progname, strerror(errno));
+diff -urNad fuse~/lib/mount_util.h fuse/lib/mount_util.h
+--- fuse~/lib/mount_util.h 2007-12-12 13:58:00.000000000 +0100
++++ fuse/lib/mount_util.h 2010-01-31 22:21:15.000000000 +0100
+@@ -10,7 +10,8 @@
+
+ int fuse_mnt_add_mount(const char *progname, const char *fsname,
+ const char *mnt, const char *type, const char *opts);
+-int fuse_mnt_umount(const char *progname, const char *mnt, int lazy);
++int fuse_mnt_umount(const char *progname, const char *abs_mnt,
++ const char *rel_mnt, int lazy);
+ char *fuse_mnt_resolve_path(const char *progname, const char *orig);
+ int fuse_mnt_check_empty(const char *progname, const char *mnt,
+ mode_t rootmode, off_t rootsize);
+diff -urNad fuse~/util/fusermount.c fuse/util/fusermount.c
+--- fuse~/util/fusermount.c 2009-07-02 14:48:53.000000000 +0200
++++ fuse/util/fusermount.c 2010-01-31 22:21:15.000000000 +0100
+@@ -26,6 +26,7 @@
+ #include <sys/fsuid.h>
+ #include <sys/socket.h>
+ #include <sys/utsname.h>
++#include <sched.h>
+
+ #define FUSE_COMMFD_ENV "_FUSE_COMMFD"
+
+@@ -37,6 +38,12 @@
+ #ifndef MS_DIRSYNC
+ #define MS_DIRSYNC 128
+ #endif
++#ifndef MS_REC
++#define MS_REC 16384
++#endif
++#ifndef MS_SLAVE
++#define MS_SLAVE (1<<19)
++#endif
+
+ static const char *progname;
+
+@@ -74,77 +81,336 @@
+ }
+
+ #ifndef IGNORE_MTAB
++/*
++ * Make sure that /etc/mtab is checked and updated atomically
++ */
++static int lock_umount(void)
++{
++ const char *mtab_lock = _PATH_MOUNTED ".fuselock";
++ int mtablock;
++ int res;
++ struct stat mtab_stat;
++
++ /* /etc/mtab could be a symlink to /proc/mounts */
++ if (lstat(_PATH_MOUNTED, &mtab_stat) == 0 && S_ISLNK(mtab_stat.st_mode))
++ return -1;
++
++ mtablock = open(mtab_lock, O_RDWR | O_CREAT, 0600);
++ if (mtablock == -1) {
++ fprintf(stderr, "%s: unable to open fuse lock file: %s\n",
++ progname, strerror(errno));
++ return -1;
++ }
++ res = lockf(mtablock, F_LOCK, 0);
++ if (res < 0) {
++ fprintf(stderr, "%s: error getting lock: %s\n", progname,
++ strerror(errno));
++ close(mtablock);
++ return -1;
++ }
++
++ return mtablock;
++}
++
++static void unlock_umount(int mtablock)
++{
++ lockf(mtablock, F_ULOCK, 0);
++ close(mtablock);
++}
++
+ static int add_mount(const char *source, const char *mnt, const char *type,
+ const char *opts)
+ {
+ return fuse_mnt_add_mount(progname, source, mnt, type, opts);
+ }
+
+-static int unmount_fuse(const char *mnt, int quiet, int lazy)
++static int may_unmount(const char *mnt, int quiet)
+ {
+- if (getuid() != 0) {
+- struct mntent *entp;
+- FILE *fp;
+- const char *user = NULL;
+- char uidstr[32];
+- unsigned uidlen = 0;
+- int found;
+- const char *mtab = _PATH_MOUNTED;
++ struct mntent *entp;
++ FILE *fp;
++ const char *user = NULL;
++ char uidstr[32];
++ unsigned uidlen = 0;
++ int found;
++ const char *mtab = _PATH_MOUNTED;
+
+- user = get_user_name();
+- if (user == NULL)
+- return -1;
++ user = get_user_name();
++ if (user == NULL)
++ return -1;
+
+- fp = setmntent(mtab, "r");
+- if (fp == NULL) {
+- fprintf(stderr,
+- "%s: failed to open %s: %s\n", progname, mtab,
+- strerror(errno));
+- return -1;
+- }
++ fp = setmntent(mtab, "r");
++ if (fp == NULL) {
++ fprintf(stderr, "%s: failed to open %s: %s\n", progname, mtab,
++ strerror(errno));
++ return -1;
++ }
+
+- uidlen = sprintf(uidstr, "%u", getuid());
++ uidlen = sprintf(uidstr, "%u", getuid());
+
+- found = 0;
+- while ((entp = getmntent(fp)) != NULL) {
+- if (!found && strcmp(entp->mnt_dir, mnt) == 0 &&
+- (strcmp(entp->mnt_type, "fuse") == 0 ||
+- strcmp(entp->mnt_type, "fuseblk") == 0 ||
+- strncmp(entp->mnt_type, "fuse.", 5) == 0 ||
+- strncmp(entp->mnt_type, "fuseblk.", 8) == 0)) {
+- char *p = strstr(entp->mnt_opts, "user=");
+- if (p &&
+- (p == entp->mnt_opts || *(p-1) == ',') &&
+- strcmp(p + 5, user) == 0) {
+- found = 1;
+- break;
+- }
+- /* /etc/mtab is a link pointing to
+- /proc/mounts: */
+- else if ((p =
+- strstr(entp->mnt_opts, "user_id=")) &&
+- (p == entp->mnt_opts ||
+- *(p-1) == ',') &&
+- strncmp(p + 8, uidstr, uidlen) == 0 &&
+- (*(p+8+uidlen) == ',' ||
+- *(p+8+uidlen) == '\0')) {
+- found = 1;
+- break;
+- }
++ found = 0;
++ while ((entp = getmntent(fp)) != NULL) {
++ if (!found && strcmp(entp->mnt_dir, mnt) == 0 &&
++ (strcmp(entp->mnt_type, "fuse") == 0 ||
++ strcmp(entp->mnt_type, "fuseblk") == 0 ||
++ strncmp(entp->mnt_type, "fuse.", 5) == 0 ||
++ strncmp(entp->mnt_type, "fuseblk.", 8) == 0)) {
++ char *p = strstr(entp->mnt_opts, "user=");
++ if (p &&
++ (p == entp->mnt_opts || *(p-1) == ',') &&
++ strcmp(p + 5, user) == 0) {
++ found = 1;
++ break;
++ }
++ /* /etc/mtab is a link pointing to
++ /proc/mounts: */
++ else if ((p =
++ strstr(entp->mnt_opts, "user_id=")) &&
++ (p == entp->mnt_opts ||
++ *(p-1) == ',') &&
++ strncmp(p + 8, uidstr, uidlen) == 0 &&
++ (*(p+8+uidlen) == ',' ||
++ *(p+8+uidlen) == '\0')) {
++ found = 1;
++ break;
+ }
+ }
+- endmntent(fp);
++ }
++ endmntent(fp);
+
+- if (!found) {
+- if (!quiet)
+- fprintf(stderr,
+- "%s: entry for %s not found in %s\n",
+- progname, mnt, mtab);
+- return -1;
++ if (!found) {
++ if (!quiet)
++ fprintf(stderr,
++ "%s: entry for %s not found in %s\n",
++ progname, mnt, mtab);
++ return -1;
++ }
++
++ return 0;
++}
++
++/*
++ * Check whether the file specified in "fusermount -u" is really a
++ * mountpoint and not a symlink. This is necessary otherwise the user
++ * could move the mountpoint away and replace it with a symlink
++ * pointing to an arbitrary mount, thereby tricking fusermount into
++ * unmounting that (umount(2) will follow symlinks).
++ *
++ * This is the child process running in a separate mount namespace, so
++ * we don't mess with the global namespace and if the process is
++ * killed for any reason, mounts are automatically cleaned up.
++ *
++ * First make sure nothing is propagated back into the parent
++ * namespace by marking all mounts "slave".
++ *
++ * Then bind mount parent onto a stable base where the user can't move
++ * it around. Use "/tmp", since it will almost certainly exist, but
++ * anything similar would do as well.
++ *
++ * Finally check /proc/mounts for an entry matching the requested
++ * mountpoint. If it's found then we are OK, and the user can't move
++ * it around within the parent directory as rename() will return EBUSY.
++ */
++static int check_is_mount_child(void *p)
++{
++ const char **a = p;
++ const char *last = a[0];
++ const char *mnt = a[1];
++ int res;
++ const char *procmounts = "/proc/mounts";
++ int found;
++ FILE *fp;
++ struct mntent *entp;
++
++ res = mount("", "/", "", MS_SLAVE | MS_REC, NULL);
++ if (res == -1) {
++ fprintf(stderr, "%s: failed to mark mounts slave: %s\n",
++ progname, strerror(errno));
++ return 1;
++ }
++
++ res = mount(".", "/tmp", "", MS_BIND | MS_REC, NULL);
++ if (res == -1) {
++ fprintf(stderr, "%s: failed to bind parent to /tmp: %s\n",
++ progname, strerror(errno));
++ return 1;
++ }
++
++ fp = setmntent(procmounts, "r");
++ if (fp == NULL) {
++ fprintf(stderr, "%s: failed to open %s: %s\n", progname,
++ procmounts, strerror(errno));
++ return 1;
++ }
++
++ found = 0;
++ while ((entp = getmntent(fp)) != NULL) {
++ if (strncmp(entp->mnt_dir, "/tmp/", 5) == 0 &&
++ strcmp(entp->mnt_dir + 5, last) == 0) {
++ found = 1;
++ break;
+ }
+ }
++ endmntent(fp);
+
+- return fuse_mnt_umount(progname, mnt, lazy);
++ if (!found) {
++ fprintf(stderr, "%s: %s not mounted\n", progname, mnt);
++ return 1;
++ }
++
++ return 0;
++}
++
++static pid_t clone_newns(void *a)
++{
++ long long buf[16384];
++ size_t stacksize = sizeof(buf) / 2;
++ char *stack = ((char *) buf) + stacksize;
++
++#ifdef __ia64__
++ extern int __clone2(int (*fn)(void *),
++ void *child_stack_base, size_t stack_size,
++ int flags, void *arg, pid_t *ptid,
++ void *tls, pid_t *ctid);
++
++ return __clone2(check_is_mount_child, stack, stacksize, CLONE_NEWNS, a,
++ NULL, NULL, NULL);
++#else
++ return clone(check_is_mount_child, stack, CLONE_NEWNS, a);
++#endif
++}
++
++static int check_is_mount(const char *last, const char *mnt)
++{
++ pid_t pid, p;
++ int status;
++ const char *a[2] = { last, mnt };
++
++ pid = clone_newns((void *) a);
++ if (pid == (pid_t) -1) {
++ fprintf(stderr, "%s: failed to clone namespace: %s\n",
++ progname, strerror(errno));
++ return -1;
++ }
++ p = waitpid(pid, &status, __WCLONE);
++ if (p == (pid_t) -1) {
++ fprintf(stderr, "%s: waitpid failed: %s\n",
++ progname, strerror(errno));
++ return -1;
++ }
++ if (!WIFEXITED(status)) {
++ fprintf(stderr, "%s: child terminated abnormally (status %i)\n",
++ progname, status);
++ return -1;
++ }
++ if (WEXITSTATUS(status) != 0)
++ return -1;
++
++ return 0;
++}
++
++static int chdir_to_parent(char *copy, const char **lastp, int *currdir_fd)
++{
++ char *tmp;
++ const char *parent;
++ char buf[65536];
++ int res;
++
++ tmp = strrchr(copy, '/');
++ if (tmp == NULL || tmp[1] == '\0') {
++ fprintf(stderr, "%s: internal error: invalid abs path: <%s>\n",
++ progname, copy);
++ return -1;
++ }
++ if (tmp != copy) {
++ *tmp = '\0';
++ parent = copy;
++ *lastp = tmp + 1;
++ } else if (tmp[1] != '\0') {
++ *lastp = tmp + 1;
++ parent = "/";
++ } else {
++ *lastp = ".";
++ parent = "/";
++ }
++
++ *currdir_fd = open(".", O_RDONLY);
++ if (*currdir_fd == -1) {
++ fprintf(stderr,
++ "%s: failed to open current directory: %s\n",
++ progname, strerror(errno));
++ return -1;
++ }
++
++ res = chdir(parent);
++ if (res == -1) {
++ fprintf(stderr, "%s: failed to chdir to %s: %s\n",
++ progname, parent, strerror(errno));
++ return -1;
++ }
++
++ if (getcwd(buf, sizeof(buf)) == NULL) {
++ fprintf(stderr, "%s: failed to obtain current directory: %s\n",
++ progname, strerror(errno));
++ return -1;
++ }
++ if (strcmp(buf, parent) != 0) {
++ fprintf(stderr, "%s: mountpoint moved (%s -> %s)\n", progname,
++ parent, buf);
++ return -1;
++
++ }
++
++ return 0;
++}
++
++static int unmount_fuse_locked(const char *mnt, int quiet, int lazy)
++{
++ int currdir_fd = -1;
++ char *copy;
++ const char *last;
++ int res;
++
++ if (getuid() != 0) {
++ res = may_unmount(mnt, quiet);
++ if (res == -1)
++ return -1;
++ }
++
++ copy = strdup(mnt);
++ if (copy == NULL) {
++ fprintf(stderr, "%s: failed to allocate memory\n", progname);
++ return -1;
++ }
++
++ res = chdir_to_parent(copy, &last, &currdir_fd);
++ if (res == -1)
++ goto out;
++
++ res = check_is_mount(last, mnt);
++ if (res == -1)
++ goto out;
++
++ res = fuse_mnt_umount(progname, mnt, last, lazy);
++
++out:
++ free(copy);
++ if (currdir_fd != -1) {
++ fchdir(currdir_fd);
++ close(currdir_fd);
++ }
++
++ return res;
++}
++
++static int unmount_fuse(const char *mnt, int quiet, int lazy)
++{
++ int res;
++ int mtablock = lock_umount();
++
++ res = unmount_fuse_locked(mnt, quiet, lazy);
++ unlock_umount(mtablock);
++
++ return res;
+ }
+
+ static int count_fuse_fs(void)
+@@ -186,7 +452,7 @@
+
+ static int unmount_fuse(const char *mnt, int quiet, int lazy)
+ {
+- return fuse_mnt_umount(progname, mnt, lazy);
++ return fuse_mnt_umount(progname, mnt, mnt, lazy);
+ }
+ #endif /* IGNORE_MTAB */
+
--- fuse-2.8.4.orig/debian/pkgfiles/libfuse-dev/Makefile
+++ fuse-2.8.4/debian/pkgfiles/libfuse-dev/Makefile
@@ -0,0 +1,13 @@
+CFLAGS := -Wall $(shell pkg-config fuse --cflags)
+LDFLAGS := $(shell pkg-config fuse --libs)
+
+targets = fusexmp fusexmp_fh hello hello_ll null
+
+all: $(targets)
+
+fusexmp_fh: fusexmp_fh.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -lulockmgr $< -o $@
+
+clean:
+ rm -f *.o
+ rm -f $(targets)