Your message dated Sun, 01 May 2016 11:50:55 +0000
with message-id <[email protected]>
and subject line Bug#804211: fixed in mime-support 3.60
has caused the Debian Bug report #804211,
regarding mime-support: Please add decoding and encoding support for xz
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
804211: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804211
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mime-support
Version: 3.59
Severity: wishlist
Tags: patch


Dear Maintainers,

could you please add decoding and encoding support for xz archives?  I
attach a patch that works for me.

Kind regards,
Nicolas
diff --git a/run-mailcap b/run-mailcap
index 2c25e9a..27c9cd0 100755
--- a/run-mailcap
+++ b/run-mailcap
@@ -43,9 +43,9 @@ sub Usage {
     print STDERR "  any standard mime type designation in the form <class>/<subtype> -- if\n";
     print STDERR "  not specified, it will be determined from the filename extension\n\n";
     print STDERR "Encoding:\n";
-    print STDERR "  how the file (and type) has been encoded (only \"gzip\", \"bzip\", \"bzip2\"\n";
-    print STDERR "  and \"compress\" are supported) -- if not specified, it will be determined\n";
-    print STDERR "  from the filename extension\n\n";
+    print STDERR "  how the file (and type) has been encoded (only \"gzip\", \"bzip\", \"bzip2,\"\n";
+    print STDERR "  \"xz\" and \"compress\" are supported) -- if not specified, it will be\n";
+    print STDERR "   determined from the filename extension\n\n";
 
     exit ($error ? 1 : 0);
 }
@@ -59,6 +59,7 @@ sub EncodingForFile {
     if ($file =~ m/\.gz$/)  { $encoding = "gzip";       }
     if ($file =~ m/\.bz$/)  { $encoding = "bzip";       }
     if ($file =~ m/\.bz2$/) { $encoding = "bzip2";      }
+    if ($file =~ m/\.xz$/)  { $encoding = "xz";         }
     if ($file =~ m/\.Z$/)   { $encoding = "compress";   }
 
     print STDERR " - file \"$file\" has encoding \"$encoding\"\n" if $debug && $encoding;
@@ -210,6 +211,12 @@ sub DecodeFile {
         } else {
             $res = system "bzip2 -dc <\Q$efile\E >\Q$tmpfile\E";
         }
+    } elsif ($encoding eq "xz") {
+        if ($efile eq '-') {
+            $res = system "xz -d >\Q$tmpfile\E";
+        } else {
+            $res = system "xz -dc <\Q$efile\E >\Q$tmpfile\E";
+        }
     } elsif ($encoding eq "compress") {
         if ($efile eq '-') {
             $res = system "uncompress >\Q$tmpfile\E";
@@ -246,6 +253,12 @@ sub EncodeFile {
         } else {
             $res = system "gzip -c \Q$dfile\E >\Q$efile\E";
         }
+    } elsif ($encoding eq "xz") {
+        if ($efile eq '-') {
+            $res = system "xz < \Q$dfile\E";
+        } else {
+            $res = system "xz < \Q$dfile\E >\Q$efile\E";
+        }
     } elsif ($encoding eq "compress") {
         if ($efile eq '-') {
             $res = system "compress <\Q$dfile\E";
diff --git a/run-mailcap.man b/run-mailcap.man
index 156ee7c..5232508 100644
--- a/run-mailcap.man
+++ b/run-mailcap.man
@@ -41,7 +41,9 @@ are
 .B bzip
 (.bz),
 .B bzip2
-(.bz2), and
+(.bz2),
+.B xz
+(.xz), and
 .B compress
 (.Z).  A filename of "-" can be used to mean "standard input", but
 then a mime-type

--- End Message ---
--- Begin Message ---
Source: mime-support
Source-Version: 3.60

We believe that the bug you reported is fixed in the latest version of
mime-support, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Charles Plessy <[email protected]> (supplier of updated mime-support package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 01 May 2016 20:20:22 +0900
Source: mime-support
Binary: mime-support
Architecture: source
Version: 3.60
Distribution: unstable
Urgency: medium
Maintainer: Mime-Support Maintainers <[email protected]>
Changed-By: Charles Plessy <[email protected]>
Description:
 mime-support - MIME files 'mime.types' & 'mailcap', and support programs
Closes: 802753 804211 810587
Changes:
 mime-support (3.60) unstable; urgency=medium
 .
   5f9811a Add decoding and encoding support for xz.
           Thanks to Nicolas Schier <[email protected]> (Closes: #804211)
   67c43e3 Removed bzip support.
   13cbcc7 Recommend bzip2 and xz-utils, since run-mailcap uses them.
   d2b5636 Escape a left curly bracket with a backslash.
           (Warning since Perl 5.22, Closes: #810587)
   fe8d90a Added text/markdown. (Closes: #802753)
   bcf08d8 Conforms to Policy version 3.9.8.
   3b341bf Use secure URIs in the VCS fields.
Checksums-Sha1:
 767a81506a83e7ca8a4a2592ddf3e87a764ebb69 1605 mime-support_3.60.dsc
 288f468e0800017f44670198e71bbd05f0b3c2be 36840 mime-support_3.60.tar.gz
Checksums-Sha256:
 1c3c61f6943b130ee6518facac394b733661975955b84af640b78fa354d7595d 1605 
mime-support_3.60.dsc
 f31d81f68dc007f56567cc14fb3b2effbd42d1dd087e414508e14e33d1a6a3a4 36840 
mime-support_3.60.tar.gz
Files:
 6ff77fbfa2d164a8ca70440561c11c25 1605 net standard mime-support_3.60.dsc
 7ca392d06916a465223a70fa629371b4 36840 net standard mime-support_3.60.tar.gz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJXJebAAAoJEMW9bI8ildUClu8QAJpDxcHf8ZQqSXoD/gUBKhtY
d0lhhIY8kOHFCuJbxklL04hFRqUlsIhrGD/PzfoFvh1KJB85kFRp9AYDfamRihOm
UiIe6k5HG74ZxyBWaZGxjIwGeL/P+EU1634uK7l6lXXa/KPXANTtoDOorU+BnhOc
xpzo7k2c4R3sBLDbAQFwJY8DqI+YqF4XGve1S0VxCSRbtD/ZLXzXwnR2D//swOwy
QZWeIdgxgD1o8h01y2h931bOFcN67gqEJi7KJ0Rc/V/psw0zv2NFkJS6DpGPKsRt
1ec7VKhoL8l/d47gh3uFpBNv/WxBNEZkfJRhjIfRHCh53LNhe3C3NlH4OK8FOcN1
pYdO7tqhRqKMjgyZc4ynDHNJL9yt+P3U/sPimxVscn36y2jqKFjWYnJJQnwYo4Sb
+uyX/b8UO7BDiH09L7K7AsnNVdg565lJtrYPikMIJSb7RaSHJ+JmOTI6ui+wPV0Q
F3+z45IdHCCplyrkI4PiGqnzR7WYSda7u8xw05/26jGOvAXGWzkNk877QIAe1q7g
y2B78zh8jIVkB4RLVz8JERj4tCr5jLF3NxikEvW4lLOBQ1k0OYUXuXh5x/29lT3W
IPxE23pTwNwZX8hbfvphZBE2QV12MqSucqYwmH4TwtHDrua4Cl4RDXWdUpEPJFgA
Mw0ZcpGhOPe/5pyFMPov
=CrC/
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to