[rpmlint] add lua bytecode fix, explicitly require perl

Tom Callaway spot at fedoraproject.org
Mon Apr 1 14:27:18 UTC 2013


commit 0f810c91278771442f7cf856d7e609e72c7fff9d
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Mon Apr 1 10:30:39 2013 -0400

    add lua bytecode fix, explicitly require perl

 rpmlint-1.4-lua-bytecode-fix.patch |   22 ++++++++++++++++++++++
 rpmlint.spec                       |   12 +++++++++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/rpmlint-1.4-lua-bytecode-fix.patch b/rpmlint-1.4-lua-bytecode-fix.patch
new file mode 100644
index 0000000..39cdcad
--- /dev/null
+++ b/rpmlint-1.4-lua-bytecode-fix.patch
@@ -0,0 +1,22 @@
+diff -up rpmlint-1.4/BinariesCheck.py.luafix rpmlint-1.4/BinariesCheck.py
+--- rpmlint-1.4/BinariesCheck.py.luafix	2013-04-01 10:23:00.926765119 -0400
++++ rpmlint-1.4/BinariesCheck.py	2013-04-01 10:25:05.553760664 -0400
+@@ -231,7 +231,8 @@ class BinariesCheck(AbstractCheck.Abstra
+             is_elf = 'ELF' in pkgfile.magic
+             is_ar = 'current ar archive' in pkgfile.magic
+             is_ocaml_native = 'Objective caml native' in pkgfile.magic
+-            is_binary = is_elf or is_ar or is_ocaml_native
++            is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
++            is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode
+ 
+             if not is_binary:
+                 if reference_regex.search(fname):
+@@ -269,7 +270,7 @@ class BinariesCheck(AbstractCheck.Abstra
+             if pkg.arch == 'sparc' and sparc_regex.search(pkgfile.magic):
+                 printError(pkg, 'non-sparc32-binary', fname)
+ 
+-            if is_ocaml_native or fname.endswith('.o') or \
++            if is_ocaml_native or is_lua_bytecode or fname.endswith('.o') or \
+                     fname.endswith('.static'):
+                 continue
+ 
diff --git a/rpmlint.spec b/rpmlint.spec
index b9d12a8..8c7776e 100644
--- a/rpmlint.spec
+++ b/rpmlint.spec
@@ -1,6 +1,6 @@
 Name:           rpmlint
 Version:        1.4
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        Tool for checking common errors in RPM packages
 
 Group:          Development/Tools
@@ -23,6 +23,10 @@ Patch2: rpmlint-1.4-tighten-macro-regexp.patch
 # Fix handling of Ruby RI files as text files, they're always binary files.
 # http://rpmlint.zarb.org/cgi-bin/trac.cgi/ticket/569
 Patch3: rpmlint-1.4-ruby-ri-files-are-binary.patch
+# Fix lua binary detection
+# http://sourceforge.net/p/rpmlint/code/ci/be327c1
+Patch4: rpmlint-1.4-lua-bytecode-fix.patch
+
 BuildArch:      noarch
 BuildRequires:  python >= 2.4
 BuildRequires:  rpm-python >= 4.4
@@ -33,6 +37,7 @@ BuildRequires:  bash-completion
 %endif
 Requires:       rpm-python >= 4.4.2.2
 Requires:       python >= 2.4
+Requires:	perl
 %if ! 0%{?rhel}
 # python-magic and python-enchant are actually optional dependencies, but
 # they bring quite desirable features.  They're not available in RHEL/EPEL 5
@@ -60,6 +65,7 @@ and source packages as well as spec files can be checked.
 %patch1 -p1 -b .py3
 %patch2 -p1 -b .tighten-regexp
 %patch3 -p1 -b .ruby-ri-files
+%patch4 -p1 -b .luafix
 sed -i -e /MenuCheck/d Config.py
 cp -p config config.example
 install -pm 644 %{SOURCE2} CHANGES.package.old
@@ -110,6 +116,10 @@ make check
 
 
 %changelog
+* Mon Apr  1 2013 Tom Callaway <spot at fedoraproject.org> - 1.4-14
+- explicitly Require: perl (bz919865)
+- fix lua binary detection (bz919869)
+
 * Wed Mar  6 2013 Tom Callaway <spot at fedoraproject.org> - 1.4-13
 - update license list
 - exclude non-config files that live in /etc


More information about the scm-commits mailing list