Related: #772651 - drop undocumented non-upstream file-5.10-strength.patch

This commit is contained in:
Kamil Dudka 2017-02-23 15:51:41 +01:00
parent 4f5041c146
commit 4e24eb1631
2 changed files with 4 additions and 63 deletions

View File

@ -1,61 +0,0 @@
From 8c3f1e3f479ff35b89f4b1c699753f4f107bfa02 Mon Sep 17 00:00:00 2001
From: Jan Kaluza <jkaluza@redhat.com>
Date: Thu, 16 Oct 2014 10:38:15 +0200
Subject: [PATCH] file-5.10-strength.patch
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
magic/Magdir/python | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/magic/Magdir/python b/magic/Magdir/python
index d954ee6..52796ba 100644
--- a/magic/Magdir/python
+++ b/magic/Magdir/python
@@ -43,20 +43,24 @@
# from module.submodule import func1, func2
0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
!:mime text/x-python
+!:strength + 15
# def __init__ (self, ...):
0 search/4096 def\ __init__
>&0 search/64 self Python script text executable
!:mime text/x-python
+!:strength + 15
# comments
-#0 search/4096 '''
-#>&0 regex .*'''$ Python script text executable
-#!:mime text/x-python
+0 search/4096 '''
+>&0 regex .*'''$ Python script text executable
+!:mime text/x-python
+!:strength + 15
-#0 search/4096 """
-#>&0 regex .*"""$ Python script text executable
-#!:mime text/x-python
+0 search/4096 """
+>&0 regex .*"""$ Python script text executable
+!:mime text/x-python
+!:strength + 15
# try:
# except: or finally:
@@ -66,8 +70,10 @@
!:mime text/x-python
>&0 search/4096 finally: Python script text executable
!:mime text/x-python
+!:strength + 15
# def name(args, args):
-0 regex \^(\ |\\t){0,50}def\ {1,50}[a-zA-Z]{1,100}
->&0 regex \ {0,50}\\(([a-zA-Z]|,|\ ){1,255}\\):$ Python script text executable
+0 regex \^(\ |\\t)*def\ +[a-zA-Z]+
+>&0 regex \ *\\(([a-zA-Z]|,|\ )*\\):$ Python script text executable
!:mime text/x-python
+!:strength + 15
--
2.5.5

View File

@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.30
Release: 3%{?dist}
Release: 4%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@ -14,7 +14,6 @@ Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
Patch0: file-localmagic.patch
# sent upstream
Patch1: file-5.10-strength.patch
Patch3: file-4.17-rpm-name.patch
Patch4: file-5.04-volume_key.patch
Patch5: file-5.04-man-return-code.patch
@ -193,6 +192,9 @@ cd %{py3dir}
%endif
%changelog
* Thu Feb 23 2017 Kamil Dudka <kdudka@redhat.com> - 5.30-4
- drop undocumented non-upstream file-5.10-strength.patch (#772651)
* Tue Feb 14 2017 Kamil Dudka <kdudka@redhat.com> - 5.30-3
- restore compatibility with certain RPM scripts