Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 bup (0.25~rc2-2) unstable; urgency=low
 .
   * Fold bup-fuse and bup-web back into the main 'bup' package at the
     suggestion of the Debian FTP Masters.
   * Demote the Depends on python-fuse (for 'bup fuse') and python-tornado
     (for 'bup web') to Recommends, since these scripts have import guards
     and will print a proper error message if these packages aren't installed.
Author: Robert S. Edmonds <edmonds@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- bup-0.25~rc2.orig/Makefile
+++ bup-0.25~rc2/Makefile
@@ -1,5 +1,5 @@
 OS:=$(shell uname | sed 's/[-_].*//')
-CFLAGS := -Wall -O2 -Werror $(PYINCLUDE) $(CFLAGS)
+CFLAGS := -Wall -O2 $(PYINCLUDE) $(CFLAGS)
 SOEXT:=.so
 
 ifeq ($(OS),CYGWIN)
@@ -8,7 +8,7 @@ endif
 
 default: all
 
-all: bup Documentation/all
+all: bup
 	t/configure-sampledata --setup
 
 bup: lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds
@@ -74,7 +74,7 @@ lib/bup/_helpers$(SOEXT): \
 .PHONY: lib/bup/_version.py
 lib/bup/_version.py:
 	rm -f $@ $@.new
-	./format-subst.pl $@.pre >$@.new
+	./debian/gen_version_py.sh >$@.new
 	mv $@.new $@
 
 runtests: all runtests-python runtests-cmdline
--- bup-0.25~rc2.orig/Documentation/bup-tag.md
+++ bup-0.25~rc2/Documentation/bup-tag.md
@@ -18,7 +18,7 @@ bup tag -d \<tag name\>
 
 `bup tag` lists, creates or deletes a tag in the bup repository.
 
-A tag is an easy way to retreive a specific commit. It can be used to mark a
+A tag is an easy way to retrieve a specific commit. It can be used to mark a
 specific backup for easier retrieval later.
 
 When called without any arguments, the command lists all tags that can
--- bup-0.25~rc2.orig/cmd/fuse-cmd.py
+++ bup-0.25~rc2/cmd/fuse-cmd.py
@@ -6,7 +6,7 @@ try:
     import fuse
 except ImportError:
     log('bup: error: The python "fuse" module is missing.\n' +
-        'To use bup fuse, first install the python-fuse package.\n')
+        'Please install it in order to use bup fuse.\n')
     sys.exit(1)
 
 
--- bup-0.25~rc2.orig/cmd/web-cmd.py
+++ bup-0.25~rc2/cmd/web-cmd.py
@@ -1,10 +1,15 @@
 #!/usr/bin/env python
 import sys, stat, urllib, mimetypes, posixpath, time
-import tornado.httpserver
-import tornado.ioloop
-import tornado.web
 from bup import options, git, vfs
 from bup.helpers import *
+try:
+    import tornado.httpserver
+    import tornado.ioloop
+    import tornado.web
+except ImportError:
+    log('bup: error: The python "tornado" module is missing.\n' +
+        'Please install it in order to use bup web.\n')
+    sys.exit(1)
 
 handle_ctrl_c()
 
--- bup-0.25~rc2.orig/config/configure.inc
+++ bup-0.25~rc2/config/configure.inc
@@ -655,7 +655,7 @@ EOF
     AC_PROG_CPP
     AC_PROG_INSTALL
 
-    ac_os=`uname -s | sed 's/[-_].*//'`
+    ac_os=`uname -s | sed 's/[-_].*//' | sed 's,/,,'`
     _os=`echo $ac_os | tr '[a-z]' '[A-Z]'`
     AC_DEFINE OS_$_os	1
     eval OS_${_os}=1
--- bup-0.25~rc2.orig/config/configure
+++ bup-0.25~rc2/config/configure
@@ -49,7 +49,11 @@ AC_CHECK_HEADERS unistd.h
 AC_CHECK_HEADERS linux/fs.h
 AC_CHECK_HEADERS sys/ioctl.h
 
-AC_CHECK_FUNCS utimensat 
+# on GNU/kFreeBSD utimensat is defined in the GNU libc
+# but won't work
+if [ -z "$OS_GNUKFREEBSD" ]; then
+   AC_CHECK_FUNCS utimensat
+fi
 AC_CHECK_FUNCS utimes
 AC_CHECK_FUNCS lutimes
 
--- bup-0.25~rc2.orig/lib/bup/_version.py.pre
+++ bup-0.25~rc2/lib/bup/_version.py.pre
@@ -1,4 +1,4 @@
 
-COMMIT='53ffc4d336b06b3cecac0d817d192d22cb75a1bd'
-NAMES=' (tag: bup-0.25-rc2, master)'
-DATE='2013-07-31 11:34:30 -0500'
+COMMIT='e84896a3c37af887cca505d01cf37e8f7bbe44df'
+NAMES=' (HEAD, debian)'
+DATE='2013-08-10 17:13:49 -0400'
--- bup-0.25~rc2.orig/lib/bup/_helpers.c
+++ bup-0.25~rc2/lib/bup/_helpers.c
@@ -170,59 +170,58 @@ static PyObject *firstword(PyObject *sel
 
 #define BLOOM2_HEADERLEN 16
 
-typedef struct {
-    uint32_t high;
-    unsigned char low;
-} bits40_t;
-
-static void to_bloom_address_bitmask4(const bits40_t *buf,
+static void to_bloom_address_bitmask4(const unsigned char *buf,
 	const int nbits, uint64_t *v, unsigned char *bitmask)
 {
     int bit;
+    uint32_t high;
     uint64_t raw, mask;
 
+    memcpy(&high, buf, 4);
     mask = (1<<nbits) - 1;
-    raw = (((uint64_t)ntohl(buf->high)) << 8) | buf->low;
+    raw = (((uint64_t)ntohl(high) << 8) | buf[4]);
     bit = (raw >> (37-nbits)) & 0x7;
     *v = (raw >> (40-nbits)) & mask;
     *bitmask = 1 << bit;
 }
 
-static void to_bloom_address_bitmask5(const uint32_t *buf,
+static void to_bloom_address_bitmask5(const unsigned char *buf,
 	const int nbits, uint32_t *v, unsigned char *bitmask)
 {
     int bit;
+    uint32_t high;
     uint32_t raw, mask;
 
+    memcpy(&high, buf, 4);
     mask = (1<<nbits) - 1;
-    raw = ntohl(*buf);
+    raw = ntohl(high);
     bit = (raw >> (29-nbits)) & 0x7;
     *v = (raw >> (32-nbits)) & mask;
     *bitmask = 1 << bit;
 }
 
-#define BLOOM_SET_BIT(name, address, itype, otype) \
-static void name(unsigned char *bloom, const void *buf, const int nbits)\
+#define BLOOM_SET_BIT(name, address, otype) \
+static void name(unsigned char *bloom, const unsigned char *buf, const int nbits)\
 {\
     unsigned char bitmask;\
     otype v;\
-    address((itype *)buf, nbits, &v, &bitmask);\
+    address(buf, nbits, &v, &bitmask);\
     bloom[BLOOM2_HEADERLEN+v] |= bitmask;\
 }
-BLOOM_SET_BIT(bloom_set_bit4, to_bloom_address_bitmask4, bits40_t, uint64_t)
-BLOOM_SET_BIT(bloom_set_bit5, to_bloom_address_bitmask5, uint32_t, uint32_t)
+BLOOM_SET_BIT(bloom_set_bit4, to_bloom_address_bitmask4, uint64_t)
+BLOOM_SET_BIT(bloom_set_bit5, to_bloom_address_bitmask5, uint32_t)
 
 
-#define BLOOM_GET_BIT(name, address, itype, otype) \
-static int name(const unsigned char *bloom, const void *buf, const int nbits)\
+#define BLOOM_GET_BIT(name, address, otype) \
+static int name(const unsigned char *bloom, const unsigned char *buf, const int nbits)\
 {\
     unsigned char bitmask;\
     otype v;\
-    address((itype *)buf, nbits, &v, &bitmask);\
+    address(buf, nbits, &v, &bitmask);\
     return bloom[BLOOM2_HEADERLEN+v] & bitmask;\
 }
-BLOOM_GET_BIT(bloom_get_bit4, to_bloom_address_bitmask4, bits40_t, uint64_t)
-BLOOM_GET_BIT(bloom_get_bit5, to_bloom_address_bitmask5, uint32_t, uint32_t)
+BLOOM_GET_BIT(bloom_get_bit4, to_bloom_address_bitmask4, uint64_t)
+BLOOM_GET_BIT(bloom_get_bit5, to_bloom_address_bitmask5, uint32_t)
 
 
 static PyObject *bloom_add(PyObject *self, PyObject *args)
--- bup-0.25~rc2.orig/lib/bup/t/tmetadata.py
+++ bup-0.25~rc2/lib/bup/t/tmetadata.py
@@ -244,7 +244,7 @@ from bup.metadata import xattr
 if xattr:
     @wvtest
     def test_handling_of_incorrect_existing_linux_xattrs():
-        if not is_superuser():
+        if not is_superuser() or detect_fakeroot():
             WVMSG('skipping test -- not superuser')
             return
         setup_testfs()
