File BinariesCheck_fix_chroot_check_on_non_x86.patch of Package rpmlint

diff --git a/usr/share/rpmlint/BinariesCheck.py b/tmp/BinariesCheck.py
index 6e50c03..460c003 100644
--- a/BinariesCheck.py
+++ b/BinariesCheck.py
@@ -64,8 +64,6 @@ class BinaryInfo:
     setuid_call_regex = create_regexp_call(['setresuid', 'seteuid', 'setuid'])
     setgroups_call_regex = create_regexp_call(['initgroups', 'setgroups'])
     chroot_call_regex = create_regexp_call('chroot')
-    # 401eb8:   e8 c3 f0 ff ff          callq  400f80 <chdir@plt>
-    objdump_call_regex = re.compile(b'callq?\s(.*)')
 
     forbidden_functions = Config.getOption("WarnOnFunction")
     if forbidden_functions:
@@ -109,6 +107,12 @@ class BinaryInfo:
         self.mktemp = False
 
         is_debug = path.endswith('.debug')
+        if pkg.arch in ['armv6hl', 'armv7hl', 'aarch64']:
+            # 10450:   ebffffec        bl      10408 <chroot@plt>
+            BinaryInfo.objdump_call_regex = re.compile(b'\sbl\s+(.*)')
+        else: # x86_64, ix86
+            # 401eb8:   e8 c3 f0 ff ff          callq  400f80 <chdir@plt>
+            BinaryInfo.objdump_call_regex = re.compile(b'callq?\s(.*)')
 
         cmd = ['env', 'LC_ALL=C', 'readelf', '-W', '-S', '-l', '-d', '-s']
         cmd.append(path)
@@ -234,6 +238,11 @@ class BinaryInfo:
             # check if chroot is near chdir (since otherwise, chroot is called
             # without chdir)
             if self.chroot and self.chdir:
+                if pkg.arch in ['ppc', 'ppc64', 'ppc64le']:
+                    # On PPC, it is to difficult to find the actual invocations
+                    # of chroot/chdir, if both exist assume chroot is fine
+                    self.chroot_near_chdir = True
+                    pass
                 p = subprocess.Popen(
                     ['env', 'LC_ALL=C', 'objdump', '-d', path],
                     stdout=subprocess.PIPE, bufsize=-1)
openSUSE Build Service is sponsored by