#315 The manual invocation of ldconfig is not needed since Fedora 28
Closed 5 years ago by ngompa. Opened 5 years ago by jjelen.
jjelen/FedoraReview drop-ldconfig  into  master

file modified
-38
@@ -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

file modified
-1
@@ -378,7 +378,6 @@ 

                           ('pass', 'CheckSourceMD5'),

                           ('pending', 'CheckBundledLibs'),

                           ('fail', 'CheckBuildInMock'),

-                          ('pass', 'CheckLDConfig'),

                           ('pending', 'CheckBuildRequires'),

                           ('pending', 'CheckNoStaticExecutables'),

                           ('pass', 'CheckRPATH'),

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

@jjelen Could you please retarget this PR against the devel branch?

Is it possible to do that in this PR or should I open a new one?

You can edit this PR to change the target branch, I believe.

I did not find an option to change the target branch and the pagure is not loading for me the branch selection. But I see it is already somehow handled in the devel branch (but not released?), so I think we can close this (assuming the fedpkg will be updated soon).

Pull-Request has been closed by ngompa

5 years ago
Metadata