Bug 1476840 - Execute /snin/ldconfig in %trigger scriptlets and other cleanups
Summary: Execute /snin/ldconfig in %trigger scriptlets and other cleanups
Keywords:
Status: CLOSED DUPLICATE of bug 1476839
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-31 15:02 UTC by Tomasz Kłoczko
Modified: 2017-07-31 15:08 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-31 15:08:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomasz Kłoczko 2017-07-31 15:02:34 UTC
Summary changes (copy from %changelog):

* Mon Jul 31 2017 Tomasz Kłoczko <kloczek> - 2.25.90-31
- added execute /sbin/ldcofig in %%transfiletriggerin and
  %%transfiletriggerpostun and removed %%post/%%postun with /sbin/ldconfig
  executions as those scripttlets are no longer needed
  %%verify(not md5 size mtime) if %%ghost is used
- remove in %%files redundant %%config(missingok,noreplace) and
  %%verify(not md5 size mtime) if %%ghost is used
- remove Group, %%defatr and %%clean (official Fedora Packaging Policy)
- remove redundant %%ifing

Additional comments:
* With introduction %%transfiletriggerin and %%transfiletriggerpostun will be possible dramatically reduce number of scrip lets executed during multiple packages installation or upgrade. Every package which installs/upgrades/removes some libraries are executing /sbin/ldconfig in %post and %postun. With %triggers all those execution can be removed and post install/upgrade/remove %trigger package will be executed at the end of the whole sequence of packages changes.
This will:
 - reduce overall time of packages installation/upgrades/removes
 - reduce number of dependencies from /sbin/ldconfig

If this patch will be commited it can be added massive change in all packages (on trunk only) to start remove execution /sbin/ldconfig in %post/postun.
In mean time this will no generate any conflicts with any packages which will be executing ldconfig in those scriptlets.

* None of the spec file subpackages headers needs to be surrounded by %f .. %endif if those packages are conditional. Only exact packages %files sections needs to be withing %if .. %endif

* %ghost disables checking content of the file because such content and digest is not included in the binary package. By this weakening file verification policy by add %%verify(not md5 size mtime) is completely redundant because %ghost disables this by default. Fragments from rpm source code from lib/verify.c:

    if (fileAttrs & RPMFILE_GHOST)
        flags &= ~(RPMVERIFY_FILEDIGEST | RPMVERIFY_FILESIZE |
                   RPMVERIFY_MTIME | RPMVERIFY_LINKTO);

The same is %%config(missingok,noreplace).

Attached patches are generated from my cloned git repo.

Comment 1 Tomasz Kłoczko 2017-07-31 15:08:53 UTC

*** This bug has been marked as a duplicate of bug 1476839 ***


Note You need to log in before you can comment on or make changes to this bug.