On Thu, Jun 17, 2021 at 5:17 PM Tom Stellard <tstellar@redhat.com> wrote:
On 6/16/21 10:58 PM, Tom Stellard wrote:
> On 6/16/21 2:11 PM, Charalampos Stratakis wrote:
>> On Wed, Jun 16, 2021 at 1:56 AM Tom Stellard <tstellar@redhat.com <mailto:tstellar@redhat.com>> wrote:
>>
>>     On 5/7/21 10:48 AM, Ben Cotton wrote:
>>      > https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild <https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild>
>>      >
>>      > == Summary ==
>>      > Enable broken RPATH detection
>>      > [https://docs.fedoraproject.org/en-US/packaging-guidelines/#_brp_buildroot_policy_scripts <https://docs.fedoraproject.org/en-US/packaging-guidelines/#_brp_buildroot_policy_scripts>
>>      > buildroot policy] script by default. This will make the RPM build fail
>>      > once a broken RPATH was detected within a binary or a shared library
>>      > file. An opt-out mechanism will be provided as well.
>>      >
>>      > == Owner ==
>>      > * Name: [[User:cstratak| Charalampos Stratakis]]
>>      > * Email: cstratak AT redhat.com <http://redhat.com>
>>      >
>>      >
>>
>>     Hi,
>>
>>     Was there any testing done to determine how much this script would increase
>>     build times?  I've noticed it takes quite a while on the kernel builds, and
>>     I'm curious what factors influence how long the script takes.  Is it
>>     number of binaries, binary sizes, etc?
>>
>>     -Tom
>>     _______________________________________________
>>     devel mailing list -- devel@lists.fedoraproject.org <mailto:devel@lists.fedoraproject.org>
>>     To unsubscribe send an email to devel-leave@lists.fedoraproject.org <mailto:devel-leave@lists.fedoraproject.org>
>>     Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ <https://docs.fedoraproject.org/en-US/project/code-of-conduct/>
>>     List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines <https://fedoraproject.org/wiki/Mailing_list_guidelines>
>>     List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org <https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org>
>>     Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure <https://pagure.io/fedora-infrastructure>
>>
>>
>> Hey Tom,
>>
>> Unfortunately no, a potential increase in build time was not taken into account at the time of the implementation of this change, as it never came up when considering other buildroot policy scripts as well.
>>
>> Here is the actual script that runs: https://github.com/rpm-software-management/rpm/blob/rpm-4.16.x/scripts/check-rpaths-worker <https://github.com/rpm-software-management/rpm/blob/rpm-4.16.x/scripts/check-rpaths-worker>
>>
>> Could you try and compare two scratch builds? One as is and one by adding |%global __brp_check_rpaths %{nil} |at the SPEC?|
>> |
>>
>
> Instead of doing two scratch builds, I just added:
> %global __brp_check_rpaths time /usr/lib/rpm/check-rpaths to the spec file
> and did a scratch build[1].
>
> The results on x86_64 were:
>
> real    13m51.517s
> user    8m53.216s
> sys    7m34.105s
>
> Overall build time for the scratch build was 88m37s, so  that means check-rpaths
> accounted for 15% of the build time.  I'm going to do some more tests on some
> of the larger packages I maintain (llvm and clang) and see what the impact is.
>

LLVM was ~2 minutes and clang ~30 seconds, so not that big of an impact.  The
kernel build might just be an outlier.

-Tom

> I do think it would be worth trying to profile the script and see if there is
> room for optimization.
>
> - Tom
>
> [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=70270039
>
>
>
>> Also adding here for completion that the script will also check for RUNPATH as of rpm 4.17: https://github.com/rpm-software-management/rpm/pull/1487/files <https://github.com/rpm-software-management/rpm/pull/1487/files>
>>
>> --
>> Regards,
>>
>> Charalampos Stratakis
>> Senior Software Engineer
>> Python Maintenance Team, Red Hat
>>
>> _______________________________________________
>> devel mailing list -- devel@lists.fedoraproject.org
>> To unsubscribe send an email to devel-leave@lists.fedoraproject.org
>> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
>> Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
>>
>


Optimization PR upstream: https://github.com/rpm-software-management/rpm/pull/1714

--
Regards,

Charalampos Stratakis
Senior Software Engineer
Python Maintenance Team, Red Hat