Browse Source

Cherry-pick fix to support file 5.41

Christoph Biedl 2 years ago
parent
commit
fe6b585fe7

+ 19 - 0
debian/patches/1634888852.0.4.24-3-g0ae7e7c.support-file-5-41.patch

@@ -0,0 +1,19 @@
+Subject: Support file 5.41
+Origin: 0.4.24-3-g0ae7e7c <https://github.com/ahupp/python-magic/commit/0.4.24-3-g0ae7e7c>
+Upstream-Author: Martin Liska <mliska@suse.cz>
+Date: Fri Oct 22 09:47:32 2021 +0200
+
+    In https://github.com/file/file/commit/7d9b0f0d853957ad88dae0f440fecd58d2740ca7,
+    the MIME was changed for Python bytecode.
+
+--- a/test/test.py
++++ b/test/test.py
+@@ -90,7 +90,7 @@
+         try:
+             m = magic.Magic(mime=True)
+             self.assert_values(m, {
+-                'magic._pyc_': ('application/octet-stream', 'text/x-bytecode.python'),
++                'magic._pyc_': ('application/octet-stream', 'text/x-bytecode.python', 'application/x-bytecode.python'),
+                 'test.pdf': 'application/pdf',
+                 'test.gz': ('application/gzip', 'application/x-gzip'),
+                 'test.snappy.parquet': 'application/octet-stream',

+ 1 - 0
debian/patches/series

@@ -1,4 +1,5 @@
 # cherry-picked from upstream. Keep in chronological order
+1634888852.0.4.24-3-g0ae7e7c.support-file-5-41.patch
 
 # patches that should go upstream