On Wed, Jun 3, 2020 at 12:54 PM Vít Ondruch <[email protected]> wrote: > > > Dne 03. 06. 20 v 13:22 Neal Gompa napsal(a): > > On Wed, Jun 3, 2020 at 5:59 AM Vít Ondruch <[email protected]> wrote: > >> > >> Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a): > >>> I author a kmod rpm package that uses the %kernel_module_package > >>> macro. That macro used to be in the /usr/lib/rpm/redhat/macros > >>> file, but was moved in RHEL 8 and later versions of Fedora to > >>> the /usr/lib/rpm/macros.d/macros.kmp file which is owned by the > >>> "kernel-rpm-macros" package. > >>> > >>> If I attempt to build my packages on these later systems with mock, > >>> they break imediately even when just trying to create the srpm > >>> because the %kernel_module_package macro is undefined leading to > >>> a spec file parse error. > >>> > >>> What I need help with is understanding where the bug is and the best > >>> way to fix it. > >>> > >>> I would think that either: 1) my spec file needs to be updated in > >>> some way to mitigate this change > >> > >> It could be as easy as replacing: > >> > >> ~~~ > >> > >> %kernel_module_package > >> > >> ~~~ > >> > >> > >> by > >> > >> > >> ~~~ > >> > >> %{?kernel_module_package} > >> > >> ~~~ > >> > >> > >> This should allow to build the SRPM and later when binary RPM is build, > >> there have to be `BR: kernel-rpm-macros`. > >> > > Unfortunately, that's not good enough. The %kernel_module_package > > macro defines BRs > > > This is bummer. > > > > and a subpackage. > > > But not this. I don't think you need subpackage to build SRPM. > > What precisely are these BRs? Isn't there a way to implement it > differently, without this functionality? I mean if the choice is between > installing "kernel-rpm-macros" for every package build or adding > manually few BRs for a few packages, then the choice should be obvious. >
The macro puts the BRs inside of subpackage definitions because it will auto-generate kernel flavor subpackages for kmod builds. That detail is marginally immaterial to the overall discussion here, but that's why I pointed it out. Also, arguably, these macros should have _never_ been split out of redhat-rpm-config to begin with. -- 真実はいつも一つ!/ Always, there's only one truth! _______________________________________________ buildsys mailing list -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected]
