| |
@@ -37,44 +37,6 @@
|
| |
CheckBase.__init__(self, base, __file__)
|
| |
|
| |
|
| |
- class CheckLDConfig(CCppCheckBase):
|
| |
- '''
|
| |
- MUST: Every binary RPM package (or subpackage) which stores shared
|
| |
- library files (not just symlinks) in any of the dynamic linker's
|
| |
- default paths, must call ldconfig in %post and %postun.
|
| |
- '''
|
| |
- def __init__(self, base):
|
| |
- CCppCheckBase.__init__(self, base)
|
| |
- self.url = 'http://fedoraproject.org/wiki/Packaging' \
|
| |
- '/Guidelines#Shared_Libraries'
|
| |
- self.text = 'ldconfig called in %post and %postun if required.'
|
| |
- self.automatic = True
|
| |
- self.type = 'MUST'
|
| |
- self.sofiles_regex = r'/usr/(lib|lib64)/[\w\-]*\.so\.[0-9]'
|
| |
-
|
| |
- def is_applicable(self):
|
| |
- ''' check if this test is applicable '''
|
| |
- return bool(self.rpms.find_re(self.sofiles_regex))
|
| |
-
|
| |
- def run_on_applicable(self):
|
| |
- ''' Run the test, called if is_applicable() is True. '''
|
| |
- bad_pkgs = []
|
| |
- for pkg in self.spec.packages:
|
| |
- nvr = self.spec.get_package_nvr(pkg)
|
| |
- rpm = RpmFile(pkg, nvr.version, nvr.release)
|
| |
- if not self.rpms.find_re(self.sofiles_regex, pkg):
|
| |
- continue
|
| |
- if not rpm.post or '/sbin/ldconfig' not in rpm.post or \
|
| |
- not rpm.postun or '/sbin/ldconfig' not in rpm.postun:
|
| |
- bad_pkgs.append(pkg)
|
| |
- if bad_pkgs:
|
| |
- self.set_passed(self.FAIL,
|
| |
- '/sbin/ldconfig not called in '
|
| |
- + ', '.join(bad_pkgs))
|
| |
- else:
|
| |
- self.set_passed(self.PASS)
|
| |
-
|
| |
-
|
| |
class CheckHeaderFiles(CCppCheckBase):
|
| |
'''
|
| |
MUST: Header files must be in a -devel package
|
| |
The other solution might be to check for so files in non-standard locations,
as the change page propose.
But as now, this is just false-positive causing more harm than use for new packagers
https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets