Commit 2f7606c7 authored by Brian White's avatar Brian White

git-debimport mime-support_3.9-1.tar.gz

parent fac53e72
File deleted
File deleted
mime-support (3.9-1) unstable; urgency=low
* made temp file namesunique (Bug#50576)
* fixed problem with decoded file not being removed
-- Brian White <bcwhite@pobox.com> Thu, 18 Nov 1999 21:35:56 -0500
mime-support (3.8-1) unstable; urgency=low
* quote filenames during encode/decode to handle shell metacharacters (Bug#42022)
* add 'text/mathml' mime.type (Bug#47699)
-- Brian White <bcwhite@pobox.com> Fri, 29 Oct 1999 07:23:53 -0400
mime-support (3.7-1) unstable; urgency=low
* fixed problem with run-mailcap extracting tests from mailcap (Bug#39877)
* added support for bzip/bzip2 (Bug#42022)
-- Brian White <bcwhite@pobox.com> Fri, 27 Aug 1999 14:27:44 -0400
mime-support (3.6-1) unstable; urgency=low
* remove dependancy on perl; perl-base is sufficient (Bug#41510)
* fixed documentation (Bug#30822)
* made /var/lib/mime/mime-support-compat a conffile (Bug#41148)
* fixed some lintian errors (Bug#41618)
* removed work files from tarball (Bug#41623)
* remove decompressed files when done (Bug#34696)
* now read mime.types from /usr/share/etc and /usr/local/etc (Bug#34731)
* remove all back-ticks from %{...} substitutions
* re-enable "install-mime is obsolete" warning
* send 'test' output to /dev/null
* add new mime types
-- Brian White <bcwhite@pobox.com> Tue, 20 Jul 1999 20:43:28 -0400
mime-support (3.5-1) frozen unstable; urgency=low
* fix ordering problem
......
......@@ -2,3 +2,4 @@
/etc/mailcap
/etc/mailcap.order
/var/lib/mime/mime-db
/var/lib/mime/mime-support-compat
......@@ -6,7 +6,6 @@ Standards-Version: 2.4.1.0
Package: mime-support
Architecture: all
Depends: perl | perl-base
Conflicts: a2ps(<<4.10.4)
Description: MIME files 'mime.types' & 'mailcap', and support programs
As these files can be used by all MIME compliant programs, they
......
......@@ -38,8 +38,8 @@ binary-indep:
install -m 644 update-mime.man debian/tmp/usr/man/man8/update-mime.8
install -m 755 run-mailcap debian/tmp/usr/bin/
install -m 644 run-mailcap.man debian/tmp/usr/man/man1/run-mailcap.1
# install -m 644 rfcs/rfc1521.txt debian/tmp/usr/doc/$(package)/
# install -m 644 rfcs/rfc1522.txt debian/tmp/usr/doc/$(package)/
install -m 644 rfcs/rfc1521.txt debian/tmp/usr/doc/$(package)/
install -m 644 rfcs/rfc1522.txt debian/tmp/usr/doc/$(package)/
install -m 644 rfcs/rfc1524.txt debian/tmp/usr/doc/$(package)/
install -m 644 debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
install -m 644 debian/README debian/tmp/usr/doc/$(package)/copyright
......@@ -49,9 +49,10 @@ binary-indep:
install -m 755 playdsp debian/tmp/usr/lib/mime/
install -m 644 mailcap.entries debian/tmp/usr/lib/mime/packages/mime-support
install -m 755 debian/postinst debian/tmp/DEBIAN/postinst
install -m 755 debian/conffiles debian/tmp/DEBIAN/conffiles
install -m 644 debian/conffiles debian/tmp/DEBIAN/conffiles
cd debian/tmp/usr/man; gzip -9fv */*
cd debian/tmp/usr/doc/$(package); gzip -9v *
cd debian/tmp/usr/doc/$(package); gunzip copyright.gz
cd debian/tmp/usr/bin; ln -s run-mailcap see
cd debian/tmp/usr/bin; ln -s run-mailcap edit
cd debian/tmp/usr/bin; ln -s run-mailcap compose
......@@ -60,8 +61,8 @@ binary-indep:
cd debian/tmp/usr/man/man1; ln -s run-mailcap.1.gz edit.1.gz
cd debian/tmp/usr/man/man1; ln -s run-mailcap.1.gz compose.1.gz
cd debian/tmp/usr/man/man1; ln -s run-mailcap.1.gz print.1.gz
# cd debian/tmp/usr/doc/$(package); ln -s rfc1521.txt.gz mime-1.txt.gz
# cd debian/tmp/usr/doc/$(package); ln -s rfc1522.txt.gz mime-2.txt.gz
cd debian/tmp/usr/doc/$(package); ln -s rfc1521.txt.gz mime-1.txt.gz
cd debian/tmp/usr/doc/$(package); ln -s rfc1522.txt.gz mime-2.txt.gz
cd debian/tmp/usr/doc/$(package); ln -s rfc1524.txt.gz mailcap.txt.gz
cd debian/tmp/usr/lib/mime/packages; ln -s /var/lib/mime/mime-support-compat mime-support-compat
touch debian/tmp/var/lib/mime/mime-support-compat;
......
......@@ -506,7 +506,7 @@ $A{noparmcheck} = -1;
#
# Look for parameter parsing flags (i.e. "--noparmcheck")
#
$strictparms = 0;
$strictparms = 1;
foreach (@ARGV) {
/^--noparmcheck$/ and $strictparms = 0;
}
......
###############################################################################
#
# MIME types and the extensions that represent them
# MIME-TYPES and the extensions that represent them
#
# This file is part of the "mime-support" package. Please send email (not a
# bug report) to the maintainer if you would like new types and/or extensions
# to be added.
# bug report) to mime-support@packages.debian.org if you would like new types
# and/or extensions to be added.
#
# Note: Compression schemes like "gzip", "bzip", and "compress" are not
# actually "mime-types". They are "encodings" and hence must _not_ have
# entries in this file to map their extensions. The "mime-type" of an
# encoded file refers to the type of data that has been encoded, not the
# type of the encoding.
#
###############################################################################
......@@ -38,8 +44,8 @@ application/wita
application/wordperfect5.1 wp5
application/zip zip
application/x-123 wk
application/x-Wingz wz
application/x-bcpio bcpio
application/x-chess-pgn pgn
application/x-core
application/x-cpio cpio
application/x-csh
......@@ -59,7 +65,7 @@ application/x-kdelnk
application/x-latex latex
application/x-maker frm maker frame fm fb book fbdoc
application/x-mif mif
application/x-msdos-program com exe bat
application/x-msdos-program com exe bat dll
application/x-netcdf nc cdf
application/x-ns-proxy-autoconfig pac
application/x-object o
......@@ -85,12 +91,14 @@ application/x-troff-me me
application/x-troff-ms ms
application/x-ustar ustar
application/x-wais-source src
application/x-wingz wz
audio/basic au snd
audio/midi mid midi
audio/mpeg mpga mpega mp2 mp3
audio/mpegurl m3u
audio/x-aiff aif aiff aifc
audio/x-gsm gsm
audio/x-pn-realaudio ra rm ram
audio/x-pn-realaudio-plugin rpm
audio/x-wav wav
......@@ -132,6 +140,7 @@ multipart/parallel
text/comma-separated-values csv
text/english
text/html html htm
text/mathml mml
text/plain txt
text/richtext rtx
text/tab-separated-values tsv
......
......@@ -11,16 +11,16 @@
$debug=0;
$etcmailcap="/etc/mailcap";
$usrmailcap="$ENV{HOME}/.mailcap";
$etcmimetyp="/etc/mime.types";
$shrmimetyp="/usr/share/etc/mime.types";
$locmimetyp="/usr/local/etc/mime.types";
$usrmimetyp="$ENV{HOME}/.mime.types";
%patterntypes =
(
'(^|/)crontab[^/]+$' => 'text/x-crontab', #'
'/man\d*/' => 'application/x-troff-man',
'/man\d*/' => 'application/x-troff-man', #'
'\.\d[^\.]*$' => 'application/x-troff-man', #'
);
......@@ -39,9 +39,9 @@ sub Usage {
print STDERR " any standard mime type designation in the form <class>/<subtype> -- if\n";
print STDERR " not specified 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\" and \"compress\" are\n";
print STDERR " supported) -- if not specified will be determined from the filename\n";
print STDERR " extension\n\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 will be determined from\n";
print STDERR " the filename extension\n\n";
exit ($error ? 1 : 0);
}
......@@ -53,6 +53,8 @@ sub EncodingForFile {
my $encoding;
if ($file =~ m/\.gz$/) { $encoding = "gzip"; }
if ($file =~ m/\.bz$/) { $encoding = "bzip"; }
if ($file =~ m/\.bz2$/) { $encoding = "bzip2"; }
if ($file =~ m/\.Z$/) { $encoding = "compress"; }
print " - file '$file' has encoding '$encoding'\n" if $debug && $encoding;
......@@ -115,9 +117,16 @@ sub TempFile {
my($name) = @_;
my $tmpfile;
$tmpfile = $ENV{TMPDIR};
$tmpfile = "/tmp" unless $tmpfile;
$tmpfile.= "/$name";
# $tmpfile = POSIX::tmpnam($name);
# unlink($tmpfile);
$tmpfile = `tempfile --mode=600`;
chomp($tmpfile);
# $tmpfile = $ENV{TMPDIR};
# $tmpfile = "/tmp" unless $tmpfile;
# $tmpfile.= "/$name";
# unlink($tmpfile);
return $tmpfile;
}
......@@ -133,7 +142,6 @@ sub SaveStdin {
$tmp =~ s|%s|$tmpfile|;
$tmpfile = $tmp;
}
unlink($tmpfile);
open(TMPFILE,">$tmpfile") || die "Error: could not write '$tmpfile' -- $!\n";
while (<STDIN>) {
print TMPFILE $_;
......@@ -163,15 +171,27 @@ sub DecodeFile {
if ($encoding eq "gzip") {
if ($efile eq '-') {
$res = system "gzip -d >$tmpfile";
$res = system "gzip -d >\Q$tmpfile\E";
} else {
$res = system "gzip -dc \Q$efile\E >\Q$tmpfile\E";
}
} elsif ($encoding eq "bzip") {
if ($efile eq '-') {
$res = system "bzip -d >\Q$tmpfile\E";
} else {
$res = system "gzip -dc $efile >$tmpfile";
$res = system "bzip -dc <\Q$efile\E >\Q$tmpfile\E";
}
} elsif ($encoding eq "bzip2") {
if ($efile eq '-') {
$res = system "bzip2 -d >\Q$tmpfile\E";
} else {
$res = system "bzip2 -dc <\Q$efile\E >\Q$tmpfile\E";
}
} elsif ($encoding eq "compress") {
if ($efile eq '-') {
$res = system "uncompress >$tmpfile";
$res = system "uncompress >\Q$tmpfile\E";
} else {
$res = system "uncompress <$efile >$tmpfile";
$res = system "uncompress <\Q$efile\E >\Q$tmpfile\E";
}
} else {
die "Fatal: unknown encoding '$encoding' at";
......@@ -198,15 +218,15 @@ sub EncodeFile {
if ($encoding eq "gzip") {
if ($efile eq '-') {
$res = system "gzip -c $dfile";
$res = system "gzip -c \Q$dfile\E";
} else {
$res = system "gzip -c $dfile >$efile";
$res = system "gzip -c \Q$dfile\E >\Q$efile\E";
}
} elsif ($encoding eq "compress") {
if ($efile eq '-') {
$res = system "compress <$dfile";
$res = system "compress <\Q$dfile\E";
} else {
$res = system "compress <$dfile >$efile";
$res = system "compress <\Q$dfile\E >\Q$efile\E";
}
} else {
die "Fatal: unknown encoding '$encoding' at";
......@@ -229,6 +249,8 @@ sub ExtensionMimetype {
unless ($donemimetypes) {
ReadMimetypes($usrmimetyp);
ReadMimetypes($locmimetyp);
ReadMimetypes($shrmimetyp);
ReadMimetypes($etcmimetyp);
$donemimetypes = 1;
}
......@@ -384,9 +406,13 @@ foreach (@files) {
next if (!$comm || $comm =~ m!(^|/)false$!i);
print " - program to execute: $comm\n" if $debug;
if ($match =~ m/;\s*test=(.*?)\s*;/) {
print " - running test: $1\n" if $debug;
next if (system $1);
if ($match =~ m/;\s*test=(.*?)\s*($|;)/) {
my $test;
print " - running test: $1 " if $debug;
$test = system "$1 >/dev/null 2>&1";
$test >>= 8;
print " (result=$test)\n" if $debug;
next if $test;
}
my $tmpfile;
......@@ -409,12 +435,12 @@ foreach (@files) {
$comm =~ s/([^%])%s/$1$file/g;
} else {
if ($comm =~ m/\|/) {
$comm =~ s/\|/<$file \|/;
$comm =~ s/\|/<\Q$file\E \|/;
} else {
$comm .= " <$file";
$comm .= " <\Q$file\E";
}
if ($action eq 'edit' || $action eq 'compose') {
$comm .= " >$file";
$comm .= " >\Q$file\E";
}
}
} else {
......@@ -426,9 +452,10 @@ foreach (@files) {
}
}
$comm =~ s/([^%])%t/$1$type/g;
$comm =~ s/([^%])%F/$1/g;
$comm =~ s/%{.*?}/$1/g;
$comm =~ s!([^%])%t!$1$type!g;
$comm =~ s!([^%])%F!$1!g;
$comm =~ s!%{(.*?)}!$_="'$ENV{$1}'";s/\`//g;$_!ge;
$comm =~ s!\'\'!\'!g;
print " - executing: $comm\n" if $debug;
$res = system $comm;
......@@ -448,9 +475,13 @@ foreach (@files) {
next;
}
if ($code && ($action eq 'edit' || $action eq 'compose')) {
$file = EncodeFile($file,$efile,$code);
unlink $file if $file;
if ($code) {
if ($action eq 'edit' || $action eq 'compose') {
my $file = EncodeFile($file,$efile,$code);
unlink $file if $file;
} else {
unlink $file;
}
}
}
......
......@@ -13,12 +13,10 @@ file
[<mime-type>:[<encoding>:]]<filename> [...]
The
.B see
,
.B edit
,
.BR see ,
.BR edit ,
.B compose
, and
and
.B print
versions are just aliases that default to the view, edit, compose, and
print actions (respectively).
......@@ -33,12 +31,6 @@ following to your shell startup:
csh ~/.login setenv PAGER /usr/bin/see
setenv EDITOR /usr/bin/edit
You can make this your default editor by adding the following to your
shell startup:
shell file line to add
~~~~~ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.SH DESCRIPTION
.PP
.B run-mailcap
......@@ -65,15 +57,12 @@ All options are in the form --<opt>=<value>.
.TP
.BI \-\-action=<action>
Performs the specified action on the files. Valid actions are
.I view
,
.I compose
,
.I composetyped
,
.IR view ,
.IR compose ,
.IR composetyped ,
.I edit
, and
.I print.
and
.IR print .
If no action is specified, the action will be determined by how the
program was called.
.TP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment