--- /dev/null
+This package uses quilt, please see /usr/share/doc/quilt/README.source
+for further instructions.
--- /dev/null
+fuse-exfat (1.0.0-2.1) UNRELEASED; urgency=low
+
+ * Update years in debian/copyright.
+
+ -- Sven Hoexter <hoexter@debian.org> Fri, 25 Jan 2013 22:54:46 +0100
+
+fuse-exfat (1.0.0-2) unstable; urgency=low
+
+ * Build depend on quilt, use dh --with quilt.
+ * Add debian/patches/fix-fuse-read-write-return-r336.patch
+ Fixes "Operation not permitted" error reporting on empty files.
+ * Add debian/patches/fix-unexpected-removal-on-dir-move-r337.patch
+ Fixes unexpected removal of a directory if you move it into itself.
+
+ -- Sven Hoexter <hoexter@debian.org> Fri, 25 Jan 2013 22:48:16 +0100
+
+fuse-exfat (1.0.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Sven Hoexter <hoexter@debian.org> Tue, 23 Jan 2013 21:06:21 +0100
+
+fuse-exfat (0.9.8-3) experimental; urgency=low
+
+ * Revert the change from 0.9.8-2, the correct fix is
+ to assign CFLAGS to CCFLAGS so the correct set of common
+ flags will be picked up by scons.
+
+ -- Sven Hoexter <hoexter@debian.org> Thu, 25 Oct 2012 17:09:19 +0200
+
+fuse-exfat (0.9.8-2) experimental; urgency=low
+
+ * Build without -fPIE - hardening flags -pie.
+
+ -- Sven Hoexter <hoexter@debian.org> Thu, 25 Oct 2012 12:41:07 +0200
+
+fuse-exfat (0.9.8-1) experimental; urgency=low
+
+ * New upstream release.
+ * Dropped all patches - merged upstream.
+ * Dropped all usage of quilt - currently not required.
+ * No longer use CFLAGS as CCFLAGS, the SConstruct file
+ now honors CCFLAGS.
+
+ -- Sven Hoexter <hoexter@debian.org> Sun, 12 Aug 2012 20:05:10 +0200
+
+fuse-exfat (0.9.7-2) unstable; urgency=low
+
+ * Switch from dh compat level 8 to 9.
+ * Enable all hardening flags via DEB_BUILD_MAINT_OPTIONS.
+ * Export CFLAGS as CCFLAGS which is honored by the current
+ SConstruct file.
+ * Symlink mount.exfat-fuse to mount.exfat. This should ease the
+ integration with the automount functionality in thunar.
+ Thanks to Bob Valantin <valantin89@gmail.com>. (Closes: #673517)
+ * Add debian/patches/honor-cppflags - scons should use exported CPPFLAGS.
+ * Add debian/patches/utf16-fix - fix handling of characters beyond BMP.
+ Thanks to Vladimir Serbinenko <phcoder@gmail.com>. (Closes: #672898)
+ * Add build-dep on quilt, use dh quilt addon in debian/rules.
+ * Add README.source to reference quilt.
+
+ -- Sven Hoexter <hoexter@debian.org> Mon, 21 May 2012 21:18:39 +0200
+
+fuse-exfat (0.9.7-1) unstable; urgency=low
+
+ * New upstream release.
+ * Remove config.log, in the clean target (via override dh_auto_clean).
+ * Bump Standards-Version to 3.9.3 - no changes required.
+
+ -- Sven Hoexter <hoexter@debian.org> Fri, 09 Mar 2012 21:20:25 +0100
+
+fuse-exfat (0.9.6-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Sven Hoexter <hoexter@debian.org> Sat, 14 Jan 2012 18:20:33 +0100
+
+fuse-exfat (0.9.5-1) unstable; urgency=low
+
+ * Initial release. (Closes: #625611)
+
+ -- Sven Hoexter <hoexter@debian.org> Mon, 02 Jan 2012 12:58:18 +0100
--- /dev/null
+Source: fuse-exfat
+Section: otherosfs
+Priority: optional
+Maintainer: Sven Hoexter <hoexter@debian.org>
+Build-Depends: debhelper (>= 9), scons, libfuse-dev, quilt
+Standards-Version: 3.9.3
+Homepage: http://code.google.com/p/exfat/
+Vcs-Git: git://git.sven.stormbind.net/git/sven/fuse-exfat.git
+Vcs-Browser: http://git.sven.stormbind.net/?p=sven/fuse-exfat.git
+
+Package: exfat-fuse
+Architecture: linux-any kfreebsd-any
+Depends: ${shlibs:Depends}, ${misc:Depends}, fuse [linux-any], fuse4bsd [kfreebsd-any]
+Recommends: exfat-utils
+Description: read and write exFAT driver for FUSE
+ fuse-exfat is a read and write driver implementing
+ the extended file allocation table as a filesystem in userspace.
+ A mounthelper is provided unter the name mount.exfat-fuse.
--- /dev/null
+This work was packaged for Debian by:
+ Sven Hoexter <sven@timegate.de> on Thu, 29 Dec 2011 10:30:47 +0100
+
+It was downloaded from:
+ http://code.google.com/p/exfat/downloads/list
+
+Upstream Author:
+ Andrew Nayenko resver@gmail.com
+
+Copyright:
+ Copyright (C) 2010-2013 Andrew Nayenko
+
+License:
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ On any Debian system, you can find the complete text of the GNU GPL
+ (GNU General Public License) in the file "/usr/share/common-licenses/GPL-3".
+
+The Debian packaging is:
+ Copyright (C) 2011-2013 Sven Hoexter <sven@timegate.de>
+
+and is licensed under the GPL version 3, see "/usr/share/common-licenses/GPL-3".
--- /dev/null
+[DEFAULT]
+pristine-tar = True
--- /dev/null
+fuse/mount.exfat-fuse /sbin
--- /dev/null
+sbin/mount.exfat-fuse sbin/mount.exfat
+usr/share/man/man8/mount.exfat-fuse.8.gz usr/share/man/man8/mount.exfat.8.gz
--- /dev/null
+fuse/mount.exfat-fuse.8
--- /dev/null
+Fixed "Operation not permitted" error on reading an empty file: FUSE read/write
+ops should return a number of bytes actually read/written or -errno on error.
+Picked from upstream svn r336.
+Index: fuse-exfat/fuse/main.c
+===================================================================
+--- fuse-exfat.orig/fuse/main.c 2013-01-25 22:26:15.309086812 +0100
++++ fuse-exfat/fuse/main.c 2013-01-25 22:26:20.093086638 +0100
+@@ -155,19 +155,25 @@
+ static int fuse_exfat_read(const char* path, char* buffer, size_t size,
+ off_t offset, struct fuse_file_info* fi)
+ {
++ ssize_t ret;
++
+ exfat_debug("[%s] %s (%zu bytes)", __func__, path, size);
+- if (exfat_generic_pread(&ef, get_node(fi), buffer, size, offset) != size)
+- return EOF;
+- return size;
++ ret = exfat_generic_pread(&ef, get_node(fi), buffer, size, offset);
++ if (ret < 0)
++ return -EIO;
++ return ret;
+ }
+
+ static int fuse_exfat_write(const char* path, const char* buffer, size_t size,
+ off_t offset, struct fuse_file_info* fi)
+ {
++ ssize_t ret;
++
+ exfat_debug("[%s] %s (%zu bytes)", __func__, path, size);
+- if (exfat_generic_pwrite(&ef, get_node(fi), buffer, size, offset) != size)
+- return EOF;
+- return size;
++ ret = exfat_generic_pwrite(&ef, get_node(fi), buffer, size, offset);
++ if (ret < 0)
++ return -EIO;
++ return ret;
+ }
+
+ static int fuse_exfat_unlink(const char* path)
+Index: fuse-exfat/libexfat/io.c
+===================================================================
+--- fuse-exfat.orig/libexfat/io.c 2013-01-25 22:26:15.309086812 +0100
++++ fuse-exfat/libexfat/io.c 2013-01-25 22:26:20.093086638 +0100
+@@ -341,7 +341,7 @@
+ }
+ if (!ef->ro && !ef->noatime)
+ exfat_update_atime(node);
+- return size - remainder;
++ return MIN(size, node->size - offset) - remainder;
+ }
+
+ ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node,
--- /dev/null
+Fixed unexpected removal of a directory if it is moved into itself: return
+EINVAL in this situation. It also happens when trying to change directory name
+case.
+Picked from upstream svn r337.
+Index: fuse-exfat/libexfat/node.c
+===================================================================
+--- fuse-exfat.orig/libexfat/node.c 2013-01-25 22:12:09.529117673 +0100
++++ fuse-exfat/libexfat/node.c 2013-01-25 22:22:56.473094067 +0100
+@@ -905,6 +905,23 @@
+ exfat_put_node(ef, node);
+ return rc;
+ }
++
++ /* check that target is not a subdirectory of the source */
++ if (node->flags & EXFAT_ATTRIB_DIR)
++ {
++ struct exfat_node* p;
++
++ for (p = dir; p; p = p->parent)
++ if (node == p)
++ {
++ if (existing != NULL)
++ exfat_put_node(ef, existing);
++ exfat_put_node(ef, dir);
++ exfat_put_node(ef, node);
++ return -EINVAL;
++ }
++ }
++
+ if (existing != NULL)
+ {
+ /* remove target if it's not the same node as source */
--- /dev/null
+fix-fuse-read-write-return-r336.patch
+fix-unexpected-removal-on-dir-move-r337.patch
--- /dev/null
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export CCFLAGS = $(CFLAGS)
+
+%:
+ dh $@ --with quilt
+
+override_dh_auto_build:
+ scons
+
+override_dh_auto_clean:
+ scons -c
+ rm -f config.log
--- /dev/null
+version=3
+http://code.google.com/p/exfat/downloads/list?can=1 .*/fuse-exfat-(\d[\d\.]*)\.tar\.gz