--- BinariesCheck.py +++ BinariesCheck.py @@ -153,6 +153,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck): binary=0 binary_in_usr_lib=0 has_usr_lib_file=0 + file_in_lib64=0 res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '') if res: @@ -161,10 +162,13 @@ class BinariesCheck(AbstractCheck.AbstractCheck): multi_pkg=0 for f in files: - if usr_lib_regex.search(f) and not usr_lib_exception_regex.search(f) and not stat.S_ISDIR(files[f][0]): + if stat.S_ISREG(files[f][0]) and usr_lib_regex.search(f) and not usr_lib_exception_regex.search(f): has_usr_lib_file=f break + if stat.S_ISREG(files[f][0]) and (f.startswith("/usr/lib64") or f.startswith("/lib64")): + file_in_lib64=1 + for i in info: is_elf = string.find(i[1], 'ELF') != -1 is_ar = string.find(i[1], 'current ar archive') != -1 @@ -316,9 +320,12 @@ class BinariesCheck(AbstractCheck.AbstractCheck): printError(pkg, 'incoherent-version-in-name', version) if pkg.arch != 'noarch' and not multi_pkg: - if binary == 0: + if binary == 0 and not file_in_lib64: printError(pkg, 'no-binary') + if pkg.arch == 'noarch' and file_in_lib64: + printError(pkg, 'noarch-with-lib64') + if has_usr_lib_file and not binary_in_usr_lib: printError(pkg, 'only-non-binary-in-usr-lib') @@ -343,6 +350,11 @@ FHS and the FSSTND forbid this.''', # 'non-sparc32-binary', # '', +'noarch-with-lib64', +'''This package is marked as noarch but installs files into lib64. +Not all architectures have this in path, so the package can't be +noarch.''', + 'invalid-soname', '''The soname of the library is neither of the form lib.so. or lib-.so.''',