999-conglomeration.dpatch 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 999-conglomeration.dpatch by Michael Piefel <piefel@debian.org>
  3. ##
  4. ## DP: Needs to be broken out (FIXME).
  5. @DPATCH@
  6. diff -Naur file-4.20.orig/magic/magic.mime file-4.20/magic/magic.mime
  7. --- file-4.20.orig/magic/magic.mime 2007-01-25 22:10:35.000000000 +0000
  8. +++ file-4.20/magic/magic.mime 2007-03-27 12:23:14.000000000 +0000
  9. @@ -156,9 +156,7 @@
  10. # Creative Labs AUDIO stuff
  11. # Standard MIDI data
  12. -0 string MThd audio/unknown
  13. -#>9 byte >0 (format %d)
  14. -#>11 byte >1 using %d channels
  15. +0 string MThd audio/midi
  16. # Creative Music (CMF) data
  17. 0 string CTMF audio/unknown
  18. # SoundBlaster instrument data
  19. @@ -273,7 +271,7 @@
  20. 0 string #!/usr/bin/awk application/x-awk
  21. 0 string #!\ /usr/bin/awk application/x-awk
  22. # update to distinguish from *.vcf files by Joerg Jenderek: joerg dot jenderek at web dot de
  23. -0 regex BEGIN[[:space:]]*[{] application/x-awk
  24. +#0 regex BEGIN[[:space:]]*[{] application/x-awk
  25. # For Larry Wall's perl language. The ``eval'' line recognizes an
  26. # outrageously clever hack for USG systems.
  27. @@ -298,7 +296,7 @@
  28. # because it tries to uncompress it to figure out what's inside.
  29. # standard unix compress
  30. -0 string \037\235 application/x-compress
  31. +#0 string \037\235 application/x-compress
  32. # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
  33. 0 string \037\213 application/x-gzip
  34. @@ -400,18 +398,15 @@
  35. #------------------------------------------------------------------------------
  36. # html: file(1) magic for HTML (HyperText Markup Language) docs
  37. #
  38. -# from Daniel Quinlan <quinlan@yggdrasil.com>
  39. +# from Michael Piefel <piefel@debian.org>
  40. #
  41. -0 string \<HEAD text/html
  42. -0 string \<head text/html
  43. -0 string \<TITLE text/html
  44. -0 string \<title text/html
  45. -0 string \<html text/html
  46. -0 string \<HTML text/html
  47. +0 string/cB \<!DOCTYPE\ html text/html
  48. +0 string/cb \<head text/html
  49. +0 string/cb \<title text/html
  50. +0 string/bc \<html text/html
  51. 0 string \<!-- text/html
  52. -0 string \<h1 text/html
  53. -0 string \<H1 text/html
  54. -0 string/c \<!doctype\ html text/html
  55. +0 string/c \<h1 text/html
  56. +
  57. #------------------------------------------------------------------------------
  58. # images: file(1) magic for image formats (see also "c-lang" for XPM bitmaps)
  59. @@ -474,7 +469,7 @@
  60. 0 beshort 0xffd8 image/jpeg
  61. # PC bitmaps (OS/2, Windoze BMP files) (Greg Roelofs, newt@uchicago.edu)
  62. -0 string BM image/bmp
  63. +0 string BM image/x-ms-bmp
  64. #>14 byte 12 (OS/2 1.x format)
  65. #>14 byte 64 (OS/2 2.x format)
  66. #>14 byte 40 (Windows 3.x format)
  67. @@ -706,8 +701,10 @@
  68. #------------------------------------------------------------------------------
  69. # Hierarchical Data Format, used to facilitate scientific data exchange
  70. # specifications at http://hdf.ncsa.uiuc.edu/
  71. -0 belong 0x0e031301 Hierarchical Data Format (version 4) data
  72. -0 string \211HDF\r\n\032 Hierarchical Data Format (version 5) data
  73. +#Hierarchical Data Format (version 4) data
  74. +0 belong 0x0e031301 application/x-hdf
  75. +#Hierarchical Data Format (version 5) data
  76. +0 string \211HDF\r\n\032 application/x-hdf
  77. # Adobe Photoshop
  78. 0 string 8BPS image/x-photoshop
  79. @@ -777,21 +774,25 @@
  80. # Debian has entries for the old PGP formats:
  81. # pgp: file(1) magic for Pretty Good Privacy
  82. # see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
  83. -0 beshort 0x9900 text/PGP key public ring
  84. -0 beshort 0x9501 text/PGP key security ring
  85. -0 beshort 0x9500 text/PGP key security ring
  86. -0 beshort 0xa600 text/PGP encrypted data
  87. -0 string -----BEGIN\040PGP text/PGP armored data
  88. ->15 string PUBLIC\040KEY\040BLOCK- public key block
  89. ->15 string MESSAGE- message
  90. ->15 string SIGNED\040MESSAGE- signed message
  91. ->15 string PGP\040SIGNATURE- signature
  92. -0 beshort 0x8501 data
  93. +#text/PGP key public ring
  94. +0 beshort 0x9900 application/pgp
  95. +#text/PGP key security ring
  96. +0 beshort 0x9501 application/pgp
  97. +#text/PGP key security ring
  98. +0 beshort 0x9500 application/pgp
  99. +#text/PGP encrypted data
  100. +0 beshort 0xa600 application/pgp-encrypted
  101. +#text/PGP armored data
  102. +##public key block
  103. +2 string ---BEGIN\ PGP\ PUBLIC\ KEY\ BLOCK- application/pgp-keys
  104. +0 string -----BEGIN\040PGP\40MESSAGE- application/pgp
  105. +0 string -----BEGIN\040PGP\40SIGNATURE- application/pgp-signature
  106. #
  107. # GnuPG Magic:
  108. -#
  109. -0 beshort 0x9901 text/GnuPG key public ring
  110. -0 beshort 0x8501 text/OpenPGP data
  111. +#text/GnuPG key public ring
  112. +0 beshort 0x9901 application/pgp
  113. +#text/OpenPGP data
  114. +0 beshort 0x8501 application/pgp-encrypted
  115. # flash: file(1) magic for Macromedia Flash file format
  116. #
  117. @@ -951,3 +952,9 @@
  118. #
  119. 128 string DICM application/dicom
  120. +
  121. +# Gnumeric spreadsheet
  122. +# This entry is only semi-helpful, as Gnumeric compresses its files, so
  123. +# they will ordinarily reported as "compressed", but at least -z helps
  124. +39 string =<gmr:Workbook application/x-gnumeric
  125. +
  126. diff -Naur file-4.20.orig/src/file.c file-4.20/src/file.c
  127. --- file-4.20.orig/src/file.c 2007-01-25 21:05:46.000000000 +0000
  128. +++ file-4.20/src/file.c 2007-03-27 12:23:14.000000000 +0000
  129. @@ -352,7 +352,7 @@
  130. }
  131. magic_close(magic);
  132. - return 0;
  133. + return magic->haderr ? -1 : 0;
  134. }
  135. diff -Naur file-4.20.orig/src/fsmagic.c file-4.20/src/fsmagic.c
  136. --- file-4.20.orig/src/fsmagic.c 2007-01-12 17:40:53.000000000 +0000
  137. +++ file-4.20/src/fsmagic.c 2007-03-27 12:23:14.000000000 +0000
  138. @@ -92,7 +92,8 @@
  139. if (file_printf(ms, "cannot open `%s' (%s)",
  140. fn, strerror(errno)) == -1)
  141. return -1;
  142. - return 1;
  143. + ms->haderr++;
  144. + return -1;
  145. }
  146. if ((ms->flags & MAGIC_MIME) != 0) {