How to use the rpmlint.readelfparser.ReadelfParser function in rpmlint

To help you get started, we’ve selected a few rpmlint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rpm-software-management / rpmlint / test / test_readelf_parser.py View on Github external
def readelfparser(path, system_path=None):
    if system_path is None:
        system_path = path
    return ReadelfParser(get_full_path(path), system_path)
github rpm-software-management / rpmlint / rpmlint / checks / BinariesCheck.py View on Github external
def run_elf_checks(self, pkg, pkgfile_path, path):
        self.readelf_parser = ReadelfParser(pkgfile_path, path)
        failed_reason = self.readelf_parser.parsing_failed_reason()
        if failed_reason:
            self.output.add_info('E', pkg, 'readelf-failed', path, failed_reason)
            return

        if not self.readelf_parser.is_archive:
            self.ldd_parser = LddParser(pkgfile_path, path)
            failed_reason = self.ldd_parser.parsing_failed_reason
            if failed_reason:
                self.output.add_info('E', pkg, 'ldd-failed', path, failed_reason)
                return

            self.objdump_parser = ObjdumpParser(pkgfile_path, path)
            failed_reason = self.objdump_parser.parsing_failed_reason
            if failed_reason:
                self.output.add_info('E', pkg, 'objdump-failed', path, failed_reason)