forked from pool/rpmlint
Dirk Mueller
2764482b3b
0001-Handle-post-scripts-that-contain-non-ascii-character.patch OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=515
35 lines
1.6 KiB
Diff
35 lines
1.6 KiB
Diff
From 9140901be1ab2c41df6ec7b21bd68e2e695b201f Mon Sep 17 00:00:00 2001
|
|
From: Dirk Mueller <dirk@dmllr.de>
|
|
Date: Thu, 28 Sep 2017 23:59:34 +0200
|
|
Subject: [PATCH] Execute chroot tests also on x86 rpms
|
|
|
|
x86 and x86_64 are reasonably similar, so this is safe
|
|
to do.
|
|
---
|
|
BinariesCheck.py | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
Index: rpmlint-rpmlint-1.10/BinariesCheck.py
|
|
===================================================================
|
|
--- rpmlint-rpmlint-1.10.orig/BinariesCheck.py
|
|
+++ rpmlint-rpmlint-1.10/BinariesCheck.py
|
|
@@ -223,7 +223,8 @@ class BinaryInfo(object):
|
|
# without chdir)
|
|
# Currently this implementation works only on x86_64 due to reliance
|
|
# on x86_64 specific assembly. Skip it on other architectures
|
|
- if pkg.arch == 'x86_64' and self.chroot and self.chdir:
|
|
+ if ((pkg.arch.endswith('86') or pkg.arch == 'x86_64') and
|
|
+ self.chroot and self.chdir):
|
|
p = subprocess.Popen(('objdump', '-d', path),
|
|
stdout=subprocess.PIPE, bufsize=-1,
|
|
env=dict(os.environ, LC_ALL="C"))
|
|
@@ -578,7 +579,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
|
printError(pkg, 'missing-call-to-setgroups-before-setuid',
|
|
fname)
|
|
|
|
- if pkg.arch == 'x86_64' and bin_info.chroot:
|
|
+ if ((pkg.arch.endswith('86') or pkg.arch == 'x86_64') and bin_info.chroot):
|
|
if not bin_info.chdir or not bin_info.chroot_near_chdir:
|
|
printError(pkg, 'missing-call-to-chdir-with-chroot', fname)
|
|
|