diff -Nru kgb-bot-1.33/debian/changelog kgb-bot-1.33/debian/changelog
--- kgb-bot-1.33/debian/changelog	2014-08-06 23:03:03.000000000 +0300
+++ kgb-bot-1.33/debian/changelog	2014-11-15 21:03:06.000000000 +0200
@@ -1,3 +1,10 @@
+kgb-bot (1.33-2) unstable; urgency=medium
+
+  * add patch fixing tests in build environments where the current user has no
+    full name (Closes: #769239 -- FTBFS)
+
+ -- Damyan Ivanov <dmn@debian.org>  Sat, 15 Nov 2014 19:03:05 +0000
+
 kgb-bot (1.33-1) unstable; urgency=medium
 
   * TestBot: set $ENV{USER} to getpwuid($>) to fix discrepancy when running
diff -Nru kgb-bot-1.33/debian/patches/fix-username-in-tests.patch kgb-bot-1.33/debian/patches/fix-username-in-tests.patch
--- kgb-bot-1.33/debian/patches/fix-username-in-tests.patch	1970-01-01 02:00:00.000000000 +0200
+++ kgb-bot-1.33/debian/patches/fix-username-in-tests.patch	2014-11-15 19:32:22.000000000 +0200
@@ -0,0 +1,73 @@
+Description: Fix tests when the building user has no full name
+ Since some time the build environment in pbuilder is such that the user
+ running the build process lacks full name in its gecos information. This
+ uncovered a bug in the tests, which do not handle this situation gracefuly.
+ This patch fixes the tests that match the generated commit notifications with
+ the expectations of the test is such a way as to mimic the behaviour of the
+ code which generates the notifications, which takes care of the missing full
+ name gracefuly.
+Author: Damyan Ivanov <dmn@debian.org>
+Origin: upstream
+Bug-Debian: https://bugs.debian.org/769239
+
+--- a/t/57-client-git-squash-tags.t
++++ b/t/57-client-git-squash-tags.t
+@@ -181,7 +181,9 @@ push_ok;
+ 
+ $commit = $c->describe_commit;
+ 
+-TestBot->expect( "#test 03${TestBot::USER_NAME} (03${TestBot::USER})"
++TestBot->expect( "#test "
++        . ( $TestBot::USER_NAME ? "03${TestBot::USER_NAME} " : '' )
++        . "(03${TestBot::USER})"
+         . ' 12test/06there'
+         . ' Pushed 05tag-1, 05tag-2, 6 other tags and 05tag-9' );
+ 
+--- a/t/54-client-git-squash.t
++++ b/t/54-client-git-squash.t
+@@ -189,7 +189,8 @@ ok( !ref($commit), 'squashed commit is a
+ 
+ my $commit_id = shift @{ $commits{master} };
+ 
+-TestBot->expect( "#test 03${TestBot::USER_NAME} "
++TestBot->expect( "#test "
++        . ( $TestBot::USER_NAME ? "03${TestBot::USER_NAME} " : '' )
+         . "(03${TestBot::USER}) 05master $commit_id "
+         . "12test/06there 3 commits pushed, "
+         . " 101 file changed, 032(+)" );
+@@ -209,7 +210,9 @@ ok( defined($commit), 'squashed new bran
+ ok( !ref($commit), 'squashed commit is a plain string' )
+     or BAIL_OUT "will fail with $commit anyway";
+ 
+-TestBot->expect( "#test 03${TestBot::USER_NAME} (03${TestBot::USER}) "
++TestBot->expect( "#test "
++        . ( $TestBot::USER_NAME ? "03${TestBot::USER_NAME} " : '' )
++        . "(03${TestBot::USER}) "
+         . "05feature "
+         . $commit_id
+         . " 12test/06there New branch with 2 commits pushed, "
+--- a/t/55-client-git-merges-ff.t
++++ b/t/55-client-git-merges-ff.t
+@@ -214,7 +214,8 @@ is( $commit->branch, $b1 );
+ is( $commit->log,    'fast forward' );
+ 
+ TestBot->expect( "#test "
+-        . "03${TestBot::USER_NAME} (03${TestBot::USER})"
++        . ( $TestBot::USER_NAME ? "03${TestBot::USER_NAME} " : '' )
++        . "(03${TestBot::USER})"
+         . " 05develop "
+         . $commit->id
+         . " 12test/06there "
+--- a/t/56-client-git-ff-merge-2.t
++++ b/t/56-client-git-ff-merge-2.t
+@@ -198,7 +198,9 @@ is( $commit->branch, 'master' );
+ is( $commit->id,     $c1 );
+ is( $commit->log,    "fast forward" );
+ 
+-TestBot->expect( "#test 03${TestBot::USER_NAME} (03${TestBot::USER}) 05master "
++TestBot->expect( "#test "
++        . ( $TestBot::USER_NAME ? "03${TestBot::USER_NAME} " : '' )
++        . "(03${TestBot::USER}) 05master "
+         . $commit->id
+         . ' 12test/06there fast forward * 14http://scm.host.org/there/master/?commit='
+         . $commit->id
diff -Nru kgb-bot-1.33/debian/patches/series kgb-bot-1.33/debian/patches/series
--- kgb-bot-1.33/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
+++ kgb-bot-1.33/debian/patches/series	2014-11-15 19:58:11.000000000 +0200
@@ -0,0 +1 @@
+fix-username-in-tests.patch
