summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--debian/control3
-rw-r--r--debian/copyright2
-rw-r--r--debian/patches/1706463645.FILE5_45-79-ged96f0ee.recognize-unified-diff-output-joerg-jenderek.patch82
-rw-r--r--debian/patches/series1
5 files changed, 91 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index b5884eb..a24c439 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+file (1:5.45-3) unstable; urgency=medium
+
+ * Cherry-pick "Recognize unified diff output". Closes: #1063522
+
+ -- Christoph Biedl <debian.axhn@manchmal.in-ulm.de> Fri, 01 Mar 2024 18:30:40 +0100
+
file (1:5.45-2.1~progress7.99u1) graograman-backports; urgency=medium
* Uploading to graograman-backports, remaining changes:
diff --git a/debian/control b/debian/control
index a999532..ba43ef9 100644
--- a/debian/control
+++ b/debian/control
@@ -32,8 +32,7 @@ Description: Recognize the type of data in a file using "magic" numbers
Package: libmagic1
Architecture: any
-Pre-Depends:
- ${misc:Pre-Depends},
+Pre-Depends: ${misc:Pre-Depends},
Depends: ${misc:Depends}, ${shlibs:Depends},
libmagic-mgc (= ${binary:Version}),
Suggests:
diff --git a/debian/copyright b/debian/copyright
index 8c5885f..47e297c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -74,7 +74,7 @@ Files:
debian/*
Copyright:
2007-2013 Daniel Baumann <mail@daniel-baumann.ch>
- 2014-2023 Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+ 2014-2024 Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
License: BSD-2-Clause-alike
License: BSD-2-Clause-alike
diff --git a/debian/patches/1706463645.FILE5_45-79-ged96f0ee.recognize-unified-diff-output-joerg-jenderek.patch b/debian/patches/1706463645.FILE5_45-79-ged96f0ee.recognize-unified-diff-output-joerg-jenderek.patch
new file mode 100644
index 0000000..2200612
--- /dev/null
+++ b/debian/patches/1706463645.FILE5_45-79-ged96f0ee.recognize-unified-diff-output-joerg-jenderek.patch
@@ -0,0 +1,82 @@
+Subject: Recognize unified diff output (Joerg Jenderek)
+Origin: FILE5_45-79-ged96f0ee <https://github.com/file/file/commit/FILE5_45-79-ged96f0ee>
+Upstream-Author: Christos Zoulas <christos@zoulas.com>
+Date: Sun Jan 28 17:40:45 2024 +0000
+Bug-Debian: https://bugs.debian.org/1063522
+
+--- a/magic/Magdir/diff
++++ b/magic/Magdir/diff
+@@ -9,25 +9,67 @@
+ >&0 search/1024 \n---\040 context diff output text
+ !:mime text/x-diff
+ 0 search/1 Only\040in\040 diff output text
++# diff output text output text (strength=38=38+0) after unified diff output (strength=131=38+93)
++#!:strength +0
+ !:mime text/x-diff
++#!:mime text/x-patch
++!:ext diff
+ 0 search/1 Common\040subdirectories:\040 diff output text
+ !:mime text/x-diff
+
++# URL: https://en.wikipedia.org/wiki/Diff#Extensions
++# Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/diff-rcs.trid.xml
++# Note: called "RCS/CVS diff output" by TrID
++# and "Differences between files" by shared MIME-info database from freedesktop.org
+ 0 search/1 Index: RCS/CVS diff output text
++# RCS/CVS diff output text (strength=36=36+0) after unified diff output (strength=131=38+93)
++#!:strength +0
+ !:mime text/x-diff
++#!:mime text/x-patch
++!:ext diff/patch
+
+ # bsdiff: file(1) magic for bsdiff(1) output
+ 0 string/b BSDIFF40 bsdiff(1) patch file
+
+
+ # unified diff
+-0 search/4096 ---\040
+->&0 search/1024 \n
+->>&0 search/1 +++\040
+->>>&0 search/1024 \n
+->>>>&0 search/1 @@ unified diff output text
++# URL: http://fileformats.archiveteam.org/wiki/Unified_diff
++# https://en.wikipedia.org/wiki/Diff_utility#Unified_format
++# Reference: https://www.artima.com/weblogs/viewpost.jsp?thread=164293
++# http://mark0.net/download/triddefs_xml.7z/defs/d/diff-unified.trid.xml
++# Note: called "unified diff output" by TrID and
++# "Differences between files" by shared MIME-info database from freedesktop.org
++# use b flag to forces the test to be done for binary files (non ASCII text like with Ctrl-D Ctrl-V Ctrl-Z)
++0 search/4096/b ---\040
++!:strength + 93
++>0 use diff-unified
++# most samples are just pure ASCII text like: ShellR64.patch
++0 search/11054 ---\040
++# unified diff (strength=131=38+93) before
++# HTML document text (strength=170,90,71,53,52,51,49) POSIX shell script (fix-qt5.6-build.patch strength=130 ./commands)
++# JavaScript source (strength=112,84,81,80,79,78,72,69) C++ source (strength=71,70,69,68,67,54),
++# Python script (strength=69,67,63,60,58,57,56,54,52,37)LaTeX document text (strength=62,56,55,51,43)
++# TeX document (strength=51,38) C source (strength=41,39,37)
++# exported SGML document (strength=39,28) diff output text (strength=38=38+0)
++# Pascal source (strength=37) RCS/CVS diff (strength=36=36+0),
++# Algol 68 source (strength=?) CSV ASCII text (strength=?)
++!:strength + 93
++>0 use diff-unified
++# check for 3 characteristic lines of unified diff
++0 name diff-unified
++>0 search/11084 +++\040
++>>&0 search/1024 \n
++# at signs line sometimes other (with 2 space chars before) like: indent-header.patch
++>>>&0 search/2 @@\040- unified diff output text
+ !:mime text/x-diff
+-!:strength + 90
++#!:mime text/x-patch
++# https://file-extension.net/seeker/file_extension_dif file_extension_pch file_extension_rej
++!:ext diff/patch/dif/pch/rej
++# GRR: mainly for debugging purpose for variants with text before real diff output
++>>>>0 string !---\040
++>>>>>0 string x \b, 1st line "%s"
++>>>>>>&1 string x \b, 2nd line "%s"
++>>>>>>>&1 string x \b, 3rd line "%s"
+
+ # librsync -- the library for network deltas
+ #
diff --git a/debian/patches/series b/debian/patches/series
index b6152e1..af113de 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
# cherry-picked commits. Keep in upstream's chronological order
1690555105.FILE5_45-1-g218fdf81.deal-with-32-bit-time-t.patch
+1706463645.FILE5_45-79-ged96f0ee.recognize-unified-diff-output-joerg-jenderek.patch
# patches that should go upstream
upstream.disable.att3b.patch