Re: debug_package when using go_generate_buildrequires

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/20/21 16:02, Bob Mauchin wrote:


On Mon, 20 Dec 2021, 14:09 Panu Matilainen, <pmatilai@xxxxxxxxxx <mailto:pmatilai@xxxxxxxxxx>> wrote:

    On 12/20/21 01:39, Robert-André Mauchin wrote:
     > On 12/6/21 12:42, Mikel Olasagasti wrote:
     >> Hi all,
     >>
     >> I was updating some golang specs I've and switching them to use
     >> go_generate_buildrequires.
     >>
     >> I realized that some specs that are using it fail to build if
    `%global
     >> debug_package %{nil}` is not set. Same spec with all BuildRequires
     >> defined works just fine.
     >>
     >> Example:
     >>
     >> - Full spec (go2rpm):
     >>
    https://mikel.olasagasti.info/tmp/fedora/golang-github-alecaivazis-survey-2.spec
    <https://mikel.olasagasti.info/tmp/fedora/golang-github-alecaivazis-survey-2.spec>

     >>
     >> - go_generate_buildrequires spec:
     >>
    https://raw.githubusercontent.com/mikelolasagasti/github-cli/main/golang-github-alecaivazis-survey-2.spec
    <https://raw.githubusercontent.com/mikelolasagasti/github-cli/main/golang-github-alecaivazis-survey-2.spec>

     >>
     >>
     >> - Full spec build:
     >> https://koji.fedoraproject.org/koji/taskinfo?taskID=79642572
    <https://koji.fedoraproject.org/koji/taskinfo?taskID=79642572>
     >> - go_generate_buildrequires build:
     >> https://koji.fedoraproject.org/koji/taskinfo?taskID=79642147
    <https://koji.fedoraproject.org/koji/taskinfo?taskID=79642147>
     >>
     >> Is this expected?
     >> Is adding `%global debug_package %{nil}` correct or good
    practice for
     >> this scenario?
     >>
     >> Kind regards,
     >> Mikel Olasagasti (mikelo2)
     >
     > Hello,
     >
     > Yes this is an issue I have noticed but I don't know where/what
    causes it.
     >
     > I know that if we have a %build section it will cause the debug
    info to
     > be looked for. It does it too with %generate_buildrequires and I
    think
     > it shouldn't, but I don't know if this is a behavior triggered by
    rpm
     > itself or is it triggered somewhere else during the build process?
     >
     > CC Panu and Devel to weigh in.
     >
     > In the meantime, as long as you don't have a %build section and
    thus do
     > not produce a binaries, you can use %global debug_package %{nil}

    Having to disable debug packages practically always indicates a bug in
    the package - either packaging, upstream or both.

    Typical causes for "error: Empty %files file
    <...>/debugsourcefiles.list" are missing debug info in the build (eg -g
    flag of gcc) and building outside the designated build directory.
    Unfortunately diagnosing these from rpm isn't easy.

    "%global debug_package %{nil}" is always a workaround and never a fix.

              - Panu -

     >
     > Best regards,
     >
     > Robert-André
     >


Yes I know, but not in this case as go libraries are noarch.
The problem that when we add the %generate_buildrequires section, it triggers the detection of the debug info. Without it, the detection of debug info is skipped so the package builds normally. I don't know what is the expected behavior.

Okay, this wasn't quite so clear in the initial context. %generate_buildrequires should not trigger the debuginfo machinery, that's a bug of some sort. Please file a ticket at https://github.com/rpm-software-management/rpm

	- Panu -
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux