diff -u -r --unified=4 tar-1.19/src/common.h tar-1.19-patched/src/common.h
--- tar-1.19/src/common.h	2007-09-26 23:42:25.000000000 +0200
+++ tar-1.19-patched/src/common.h	2007-11-01 17:09:11.000000000 +0100
@@ -141,8 +141,14 @@
 
 /* Specified name of compression program, or "gzip" as implied by -z.  */
 GLOBAL const char *use_compress_program_option;
 
+/* User passed z option on command line */
+GLOBAL bool z_option_used;
+
+/* Archive name (f option) ends in ".bz2" */
+GLOBAL bool archive_is_bz2;
+
 GLOBAL bool dereference_option;
 
 /* Print a message if not all links are dumped */
 GLOBAL int check_links_option;

diff -u -r --unified=4 tar-1.19/src/tar.c tar-1.19-patched/src/tar.c
--- tar-1.19/src/tar.c	2007-09-26 23:36:58.000000000 +0200
+++ tar-1.19-patched/src/tar.c	2007-11-01 17:20:18.000000000 +0100
@@ -18,8 +18,11 @@
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+/* Patch from http://www.winterdrache.de applied to select bzip2 if 
+   z parameter specified but extension is .bz2 */
+
 #include <system.h>
 
 #include <fnmatch.h>
 #include <argp.h>
@@ -1262,8 +1265,13 @@
 	archive_name_array = x2nrealloc (archive_name_array,
 					 &allocated_archive_names,
 					 sizeof (archive_name_array[0]));
 
+      {
+           ssize_t len=strlen(arg);
+           if (len>=4 && strcmp(arg+len-4,".bz2")==0) archive_is_bz2 = true;
+      }
+
       archive_name_array[archive_names++] = arg;
       break;
 
     case 'F':
@@ -1491,8 +1499,9 @@
       break;
 
     case 'z':
       set_use_compress_program_option ("gzip");
+      z_option_used = true;
       break;
 
     case 'Z':
       set_use_compress_program_option ("compress");
@@ -2081,8 +2093,10 @@
   if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_HELP,
 		  &idx, &args))
     exit (TAREXIT_FAILURE);
 
+    /* if z was specified but filename ends in bz2, then use bzip2 */
+    if (z_option_used && archive_is_bz2) use_compress_program_option="bzip2";
 
   /* Special handling for 'o' option:
 
      GNU tar used to say "output old format".
