fix the JavaScript detection (#2029975)
This commit is contained in:
parent
41b34e83c7
commit
0be129eb87
41
file-5.41-javascript-magic.patch
Normal file
41
file-5.41-javascript-magic.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From f687fa2b92cd923173126614516c1d07894affb3 Mon Sep 17 00:00:00 2001
|
||||
From: Christos Zoulas <christos@zoulas.com>
|
||||
Date: Wed, 8 Dec 2021 13:42:00 +0000
|
||||
Subject: [PATCH] Don't use search; interpreters need to be always in the first
|
||||
line. Fixes strength issue (general #! in commands ranked higher).
|
||||
|
||||
---
|
||||
magic/Magdir/javascript | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/magic/Magdir/javascript b/magic/Magdir/javascript
|
||||
index 7fa9d9d40..1e29c5e8e 100644
|
||||
--- a/magic/Magdir/javascript
|
||||
+++ b/magic/Magdir/javascript
|
||||
@@ -1,19 +1,19 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
-# $File: javascript,v 1.2 2019/08/05 10:34:26 christos Exp $
|
||||
+# $File: javascript,v 1.3 2021/12/08 13:42:00 christos Exp $
|
||||
# javascript: magic for javascript and node.js scripts.
|
||||
#
|
||||
-0 search/1/w #!/bin/node Node.js script text executable
|
||||
+0 string/w #!/bin/node Node.js script text executable
|
||||
!:mime application/javascript
|
||||
-0 search/1/w #!/usr/bin/node Node.js script text executable
|
||||
+0 string/w #!/usr/bin/node Node.js script text executable
|
||||
!:mime application/javascript
|
||||
-0 search/1/w #!/bin/nodejs Node.js script text executable
|
||||
+0 string/w #!/bin/nodejs Node.js script text executable
|
||||
!:mime application/javascript
|
||||
-0 search/1/w #!/usr/bin/nodejs Node.js script text executable
|
||||
+0 string/w #!/usr/bin/nodejs Node.js script text executable
|
||||
!:mime application/javascript
|
||||
-0 search/1 #!/usr/bin/env\ node Node.js script text executable
|
||||
+0 string #!/usr/bin/env\ node Node.js script text executable
|
||||
!:mime application/javascript
|
||||
-0 search/1 #!/usr/bin/env\ nodejs Node.js script text executable
|
||||
+0 string #!/usr/bin/env\ nodejs Node.js script text executable
|
||||
!:mime application/javascript
|
||||
# Hermes by Facebook https://hermesengine.dev/
|
||||
# https://github.com/facebook/hermes/blob/master/include/hermes/\
|
||||
@ -15,7 +15,7 @@
|
||||
Summary: Utility for determining file types
|
||||
Name: file
|
||||
Version: 5.41
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: BSD
|
||||
Source0: http://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
||||
|
||||
@ -26,6 +26,9 @@ Patch0: file-localmagic.patch
|
||||
Patch1: file-4.17-rpm-name.patch
|
||||
Patch2: file-5.04-volume_key.patch
|
||||
|
||||
# Upstream commit: https://github.com/file/file/commit/f687fa2b92cd9231
|
||||
Patch3: file-5.41-javascript-magic.patch
|
||||
|
||||
URL: https://www.darwinsys.com/file/
|
||||
Requires: file-libs%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: zlib-devel
|
||||
@ -208,6 +211,9 @@ make -C tests check
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Dec 08 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 5.41-2
|
||||
- fix the JavaScript detection (#2029975)
|
||||
|
||||
* Tue Oct 19 2021 Vincent Mihalkovic <vmihalko@redhat.com> - 5.41-1
|
||||
- update to new version 5.41
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user