diff -Nru mb2md-3.20/debian/changelog mb2md-3.20/debian/changelog --- mb2md-3.20/debian/changelog 2014-08-10 12:44:03.000000000 +0000 +++ mb2md-3.20/debian/changelog 2014-09-01 00:25:06.000000000 +0000 @@ -1,3 +1,11 @@ +mb2md (3.20-7) unstable; urgency=medium + + * Team upload + * Only prepend working directory to relative paths + (Closes: #759912) + + -- David Bremner Sun, 31 Aug 2014 17:24:47 -0700 + mb2md (3.20-6) unstable; urgency=medium [ Axel Beckert ] diff -Nru mb2md-3.20/debian/patches/fix-path-expansion.patch mb2md-3.20/debian/patches/fix-path-expansion.patch --- mb2md-3.20/debian/patches/fix-path-expansion.patch 2014-08-10 12:11:52.000000000 +0000 +++ mb2md-3.20/debian/patches/fix-path-expansion.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -Description: Make source and destination path expansion behave more like users expect it -Bug-Debian: http://bugs.debian.org/594049 -Author: Axel Beckert - -Index: mb2md/mb2md-3.20.pl -=================================================================== ---- mb2md.orig/mb2md-3.20.pl 2013-10-16 14:41:39.000000000 +0200 -+++ mb2md/mb2md-3.20.pl 2013-10-16 16:52:21.000000000 +0200 -@@ -411,6 +411,7 @@ - my $dest = undef; - my $strip_ext = undef; - my $use_cl = undef; # defines whether we use the Content-Length: header if present -+my $pwd = `pwd`; chomp($pwd); - - # if option "-c" is given, we use the Content-Length: header if present - # dangerous! may be unreliable, as the whole CL stuff is a bad idea -@@ -443,7 +444,7 @@ - # it is a subdir of the users $home - # if it does start with a "/" then - # let's take $mbroot as a absolut path -- $opts{s} = "$homedir/$opts{s}" if ($opts{s} !~ /^\//); -+ $opts{s} = "$homedir/$opts{s}" if ($opts{s} !~ m(^[/.])); - - # check if the given source is a mbox file - if (-f $opts{s}) -@@ -493,13 +494,13 @@ - - # if the destination is relative to the home dir, - # check that the home dir exists --die("Fatal: home dir $homedir doesn't exist.\n") if ($dest !~ /^\// && ! -e $homedir); -+die("Fatal: home dir $homedir doesn't exist.\n") if ($dest !~ m(^[/.]) && ! -e $homedir); - - # - # form the destination value - # slap the home dir on the front of the dest if the dest does not begin - # with a '/' --$dest = "$homedir/$dest" if ($dest !~ /^\//); -+$dest = "$homedir/$dest" if ($dest !~ m(^[/.])); - # get rid of trailing /'s - $dest =~ s/\/$//; - -@@ -754,6 +755,7 @@ - # Change to the target mailbox directory. - - chdir "$maildir" ; -+ $mbox = "$pwd/$mbox"; - - # Converts a Mbox to multiple files - # in a Maildir. diff -Nru mb2md-3.20/debian/patches/Make-source-and-destination-path-expansion-behave-mo.patch mb2md-3.20/debian/patches/Make-source-and-destination-path-expansion-behave-mo.patch --- mb2md-3.20/debian/patches/Make-source-and-destination-path-expansion-behave-mo.patch 1970-01-01 00:00:00.000000000 +0000 +++ mb2md-3.20/debian/patches/Make-source-and-destination-path-expansion-behave-mo.patch 2014-09-01 00:25:06.000000000 +0000 @@ -0,0 +1,56 @@ +From: Debian Perl Group +Date: Sat, 30 Aug 2014 17:12:45 -0700 +Subject: Make source and destination path expansion behave more like users + expect it + +Bug-Debian: http://bugs.debian.org/594049 +Author: Axel Beckert +--- + mb2md-3.20.pl | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/mb2md-3.20.pl b/mb2md-3.20.pl +index 2945254..d18d224 100644 +--- a/mb2md-3.20.pl ++++ b/mb2md-3.20.pl +@@ -411,6 +411,7 @@ my $mbfile = undef; # this is an mbox file + my $dest = undef; + my $strip_ext = undef; + my $use_cl = undef; # defines whether we use the Content-Length: header if present ++my $pwd = `pwd`; chomp($pwd); + + # if option "-c" is given, we use the Content-Length: header if present + # dangerous! may be unreliable, as the whole CL stuff is a bad idea +@@ -443,7 +444,7 @@ elsif (defined($opts{s})) + # it is a subdir of the users $home + # if it does start with a "/" then + # let's take $mbroot as a absolut path +- $opts{s} = "$homedir/$opts{s}" if ($opts{s} !~ /^\//); ++ $opts{s} = "$homedir/$opts{s}" if ($opts{s} !~ m(^[/.])); + + # check if the given source is a mbox file + if (-f $opts{s}) +@@ -493,13 +494,13 @@ if(defined($opts{l})) + + # if the destination is relative to the home dir, + # check that the home dir exists +-die("Fatal: home dir $homedir doesn't exist.\n") if ($dest !~ /^\// && ! -e $homedir); ++die("Fatal: home dir $homedir doesn't exist.\n") if ($dest !~ m(^[/.]) && ! -e $homedir); + + # + # form the destination value + # slap the home dir on the front of the dest if the dest does not begin + # with a '/' +-$dest = "$homedir/$dest" if ($dest !~ /^\//); ++$dest = "$homedir/$dest" if ($dest !~ m(^[/.])); + # get rid of trailing /'s + $dest =~ s/\/$//; + +@@ -754,6 +755,7 @@ sub convert + # Change to the target mailbox directory. + + chdir "$maildir" ; ++ $mbox = "$pwd/$mbox" if ($mbox !~ m(^[/.])); + + # Converts a Mbox to multiple files + # in a Maildir. diff -Nru mb2md-3.20/debian/patches/series mb2md-3.20/debian/patches/series --- mb2md-3.20/debian/patches/series 2014-08-10 12:26:21.000000000 +0000 +++ mb2md-3.20/debian/patches/series 2014-09-01 00:25:06.000000000 +0000 @@ -1,4 +1,4 @@ -fix-path-expansion.patch fix-dash-r-option.patch better-separator-line-detection.patch fix-uw-imap-misspellings.patch +Make-source-and-destination-path-expansion-behave-mo.patch