[Rpm-maint] [rpm-software-management/rpm] scripts/brp-strip: Rectify parallel stripping logic (PR #2149)

Shreenidhi Shedi notifications at github.com
Wed Aug 10 16:30:08 UTC 2022


brp-strip script runs strip command on deliverables paralley and if
deliverables are hard linked inside buildroot, it will create
contention.

One good example for such package is git.
https://github.com/vmware/photon/blob/master/SPECS/git/git.spec

```
Sample output:
$ rpm -ql git | grep libexec | xargs ls -li
668153 -rwxr-xr-x  137 root root 3401056 Aug  2 08:30 /usr/libexec/git-core/git
668153 -rwxr-xr-x  137 root root 3401056 Aug  2 08:30 /usr/libexec/git-core/git-add
787238 -rwxr-xr-x    1 root root   47770 Aug  2 08:30 /usr/libexec/git-core/git-add--interactive
668153 -rwxr-xr-x  137 root root 3401056 Aug  2 08:30 /usr/libexec/git-core/git-am
```

Hence we need to identify and discard hardlinks and use a single
instance of the elf file to run strip command.

This is done by running a crafted command to get inode of files and
removing duplicate inodes from the result.

RH bug link:
https://bugzilla.redhat.com/show_bug.cgi?id=1959049

Signed-off-by: Shreenidhi Shedi <sshedi at vmware.com>
Co-authored-by: Dweep Advani <dadvani at vmware.com>
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2149

-- Commit Summary --

  * scripts/brp-strip: Rectify parallel stripping logic

-- File Changes --

    M scripts/brp-strip (22)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2149.patch
https://github.com/rpm-software-management/rpm/pull/2149.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2149
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2149 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220810/83296e07/attachment.html>


More information about the Rpm-maint mailing list