Re: mock and kernel-rpm-macros package

2020-06-15 Thread Pavel Raiskup
On Sunday, June 14, 2020 8:23:01 PM CEST Quentin Barnes wrote:
> I've only tinkered a little with Koji many years ago.  I only use mock
> to build one-off RPMs, so I'm not sure how Koji's behavior differs from
> mock in this case.  Can you clarify or point me to docs to better
> understand your point?

Koji builds against different buildroot than Mock (by default, when
--enablerepo=local is _not_ used).  The difference is that Koji's
buildroot contains the build group.  Check this output:

  $ koji mock-config --target epel8-candidate --arch x86_64 | grep chroot_
  config_opts['chroot_setup_cmd'] = 'groupinstall build'

While mock's default config has the list of packages instead.

That dnf group isn't published in the mirrored repositories, so we can
not rely on its existence in default mock configuration.  The local
repository is not mirrored, thus it is pretty slow (and it may fail for
various reasons) so enabling that by default to bring the group into
transaction is not an option either.

> So it sounds like the correct approach is to not discuss the inclusion
> of 'kernel-rpm-macros' with this group, but to approach a different
> Fedora group.  Once they agree (or disagree) that decision will get
> reflected back here.  Right?

Discussing the original problem here is just fine, I think.  We just need
to forward the conclusion to Fedora/EPEL people.

> I'm not active in Fedora, so if anyone can suggest on what place and
> method (which email lists, IRC channels, BZ tickets, etc.) I should
> start this discussion with Fedora, please let me know.

You can try pull-request in [1] and e.g. discuss on devel list [2] or in
releng tracker [3].  If, for any reason, Fedora people think that
kernel-rpm-macros shouldn't be placed into minimal buildroot - we can
fallback to custom mock config as proposed before.

[1] https://src.fedoraproject.org/rpms/redhat-rpm-config
[2] https://lists.fedoraproject.org/archives/list/[email protected]/
[3] https://pagure.io/releng/issues

Pavel


___
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]


Re: mock and kernel-rpm-macros package

2020-06-14 Thread Quentin Barnes
On Fri, Jun 05, 2020 at 10:28:32PM +0200, Pavel Raiskup wrote:
> On Friday, June 5, 2020 4:43:20 PM CEST Quentin Barnes wrote:
> > On Wed, Jun 03, 2020 at 06:29:37PM +0200, Pavel Raiskup wrote:
> > > As long as the package isn't in default minimal buildroot, it is not 
> > > correct
> > > thing to just put the package into 'chroot_setup_cmd'.
> > 
> > Okay, let's break that down.  What do you consider the "rules" for what
> > packages should be part of 'chroot_setup_cmd'?
> 
> As I looked at the problem -- mock's default behavior should be the same
> as Koji's behavior, and vice versa.  As much as reasonably possible...
>
> Otherwise people will come and solve troubles that something works here,
> but doesn't work there..

I've only tinkered a little with Koji many years ago.  I only use
mock to build one-off RPMs, so I'm not sure how Koji's behavior
differs from mock in this case.  Can you clarify or point me to docs
to better understand your point?

> > As a mock user, my reverse engineering angle has told me that the
> > packages listed in the 'chroot_setup_cmd' macro are there for one of
> > two reasons.  Either:
> > 
> > 1) They are system packages provided by the OS that are used by most
> >package builds, and for good or ill, that way packages don't have
> >to list them as an explicit BuildRequires: dependency, but they
> >could have.  These are ones like tar, gcc, and make.
> > 
> > 2) They are system packages provided by the OS that are needed for
> >parsing or processing spec files.  These are ones like bash,
> >redhat-rpm-config, and rpm-build.
> 
> Agreed, except that mock is not the place to decide what will be in
> minimal buildroot.  That is per-distro decision.  Mock's defaults are just
> trying to mimic what is set per-distro.

I didn't realize that was published, at least for RHEL.  Years ago
as a RHEL customer, I asked our TAM (via a case ticket) what the
minimal set was, but was told they don't publish it publicly.

Back the week of the announcement of Red Hat usurping CentOS (2014),
I had a nice 1-on-1 chat with Johnny Hughes and how he has to
reverse engineer how Red Hat defines each major RHEL release's build
stages and environment.  He was hoping that after the adoption, that
build environment would be published openly and shared.  I'm not
sure that ever happened.

> > If these aren't the reasons for why there are packages in
> > 'chroot_setup_cmd', can someone better state what they are?
> > (A possible alternate meta-rule for the 'chroot_setup_cmd' macro for
> > RHEL/CentOS mock configs could say be feature eqivalent to Fedora's
> > @buildsys-build yum group?)
> 
> Exactly, that is my understanding.  The list of packages is given by the
> "build" group which only exists "internally" and isn't shipped in
> mirrored (public) set of repositories.

That makes sense.

> Btw., for internal build group, you probably could try:
> $ mock -r epel-8-x86_64 --enablerepo local --install @build
> 
> > In my list of reasons, the kernel-rpm-macros package obviously falls
> > into category #2.
> 
> Did you try to ask Fedora to put that package to the "default" epel
> minimal buildroot set of packages?

Ah!  I had noticed before my last reply that 'kernel-rpm-macros' was
not in Fedora's @sys-build list where a lot of the other '*-srpm-macros'
rpms with their droppings in /usr/lib/rpm/macros.d/* were.  It looked
like to me this was an oversight and 'kernel-rpm-macros' should be in
that list.

So it sounds like the correct approach is to not discuss the
inclusion of 'kernel-rpm-macros' with this group, but to approach a
different Fedora group.  Once they agree (or disagree) that decision
will get reflected back here.  Right?

I'm not active in Fedora, so if anyone can suggest on what place and
method (which email lists, IRC channels, BZ tickets, etc.) I should
start this discussion with Fedora, please let me know.

> Pavel
> 
> > > Pavel
> > 
> > Quentin

Quentin
___
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]


Re: mock and kernel-rpm-macros package

2020-06-05 Thread Pavel Raiskup
On Friday, June 5, 2020 4:43:20 PM CEST Quentin Barnes wrote:
> On Wed, Jun 03, 2020 at 06:29:37PM +0200, Pavel Raiskup wrote:
> > On Wednesday, June 3, 2020 5:05:32 PM CEST Quentin Barnes wrote:
> > > On Tue, Jun 02, 2020 at 11:19:11PM +0200, Miroslav Such?? wrote:
> > > > Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > > > > 2) the "kernel-rpm-macros"
> > > > > package needs to be added to the @buildsys-build group for Fedora
> > > > 
> > > > That should be a final solution.
> > > > Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".
> > > > 
> > > > > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > > > > CentOS/RHEL).
> > > > 
> > > > This is quick'n'dirty hack to unblock you for local builds and for 
> > > > testing.
> > > 
> > > I meant that CentOS/RHEL doesn't have a @buildsys-build.  Instead, it
> > > uses a hardcoded list.  For CentOS/RHEL, the equivalent fix would be
> > > to update their hardcoded list.
> > 
> > At least in Fedora, I checked few Koji builds for EPEL 8 and I don't see
> > kernel-rpm-macros in the buildroot installation transactions.  So it is not 
> > in
> > the build group.
> > 
> > As long as the package isn't in default minimal buildroot, it is not correct
> > thing to just put the package into 'chroot_setup_cmd'.
> 
> Okay, let's break that down.  What do you consider the "rules" for what
> packages should be part of 'chroot_setup_cmd'?

As I looked at the problem -- mock's default behavior should be the same
as Koji's behavior, and vice versa.  As much as reasonably possible...

Otherwise people will come and solve troubles that something works here,
but doesn't work there..

> As a mock user, my reverse engineering angle has told me that the
> packages listed in the 'chroot_setup_cmd' macro are there for one of
> two reasons.  Either:
> 
> 1) They are system packages provided by the OS that are used by most
>package builds, and for good or ill, that way packages don't have
>to list them as an explicit BuildRequires: dependency, but they
>could have.  These are ones like tar, gcc, and make.
> 
> 2) They are system packages provided by the OS that are needed for
>parsing or processing spec files.  These are ones like bash,
>redhat-rpm-config, and rpm-build.

Agreed, except that mock is not the place to decide what will be in
minimal buildroot.  That is per-distro decision.  Mock's defaults are just
trying to mimic what is set per-distro.

> If these aren't the reasons for why there are packages in
> 'chroot_setup_cmd', can someone better state what they are?
> (A possible alternate meta-rule for the 'chroot_setup_cmd' macro for
> RHEL/CentOS mock configs could say be feature eqivalent to Fedora's
> @buildsys-build yum group?)

Exactly, that is my understanding.  The list of packages is given by the
"build" group which only exists "internally" and isn't shipped in
mirrored (public) set of repositories.

Btw., for internal build group, you probably could try:
$ mock -r epel-8-x86_64 --enablerepo local --install @build

> In my list of reasons, the kernel-rpm-macros package obviously falls
> into category #2.

Did you try to ask Fedora to put that package to the "default" epel
minimal buildroot set of packages?

> For RHEL, 8 adding back the %kernel_module_package (and kmodtool and
> others) by adding kernel-rpm-macros rpm to chroot_setup_cmd is to
> recover lost functionality.
> 
> As mentioned, before RHEL 8 (and current Fedoras), %kernel_module_package
> macro was provided by /usr/lib/rpm/redhat/macros in the already
> included redhat-rpm-config package.  Parts of redhat-rpm-config got
> spun off into kernel-rpm-macros.  (As Neal pointed out in another
> post, whether that should have been done or not by Red Hat or
> Fedora devs is another issue, but it was done.)  My request to add
> kernel-rpm-macros to chroot_setup_cmd is to simply restore previous
> functionality now missing by that OS change.

Yes, I don't claim it shouldn't be there ... I just claim that it should
be first in the Koji Fedora buildroots.

> If feature-parity among supported OSes is not a goal of mock, then I'd
> better understand the reason for leaving in this breaking change.

It is not.  When using mock, you basically "train" your builds for Fedora
locally.  It doesn't make much sense to succeed locally, and then submit
the build to Koji and fail...

Perhaps we can think about `fedora-kmod-rawhide-x86_64.cfg` config file if
there's no other option.

> > Plain mock would behave differently from koji from this POV.
>
> I'm not following what you mean.  I can read several possible
> interpretations in your phrasing.  Could you explain further to clarify?

Just the above ^^^.

> > I'm not sure how the package is supposed to work, but perhaps you can take a
> > look at `chroot_additional_packages` mock config option, to work-around 
> > things.
> 
> How which package is supposed to work?

I mean, I don't know how those macros are to be used.

Re: mock and kernel-rpm-macros package

2020-06-05 Thread Quentin Barnes
On Wed, Jun 03, 2020 at 06:29:37PM +0200, Pavel Raiskup wrote:
> On Wednesday, June 3, 2020 5:05:32 PM CEST Quentin Barnes wrote:
> > On Tue, Jun 02, 2020 at 11:19:11PM +0200, Miroslav Such?? wrote:
> > > Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > > > 2) the "kernel-rpm-macros"
> > > > package needs to be added to the @buildsys-build group for Fedora
> > > 
> > > That should be a final solution.
> > > Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".
> > > 
> > > > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > > > CentOS/RHEL).
> > > 
> > > This is quick'n'dirty hack to unblock you for local builds and for 
> > > testing.
> > 
> > I meant that CentOS/RHEL doesn't have a @buildsys-build.  Instead, it
> > uses a hardcoded list.  For CentOS/RHEL, the equivalent fix would be
> > to update their hardcoded list.
> 
> At least in Fedora, I checked few Koji builds for EPEL 8 and I don't see
> kernel-rpm-macros in the buildroot installation transactions.  So it is not in
> the build group.
> 
> As long as the package isn't in default minimal buildroot, it is not correct
> thing to just put the package into 'chroot_setup_cmd'.

Okay, let's break that down.  What do you consider the "rules" for what
packages should be part of 'chroot_setup_cmd'?

As a mock user, my reverse engineering angle has told me that the
packages listed in the 'chroot_setup_cmd' macro are there for one of
two reasons.  Either:

1) They are system packages provided by the OS that are used by most
   package builds, and for good or ill, that way packages don't have
   to list them as an explicit BuildRequires: dependency, but they
   could have.  These are ones like tar, gcc, and make.

2) They are system packages provided by the OS that are needed for
   parsing or processing spec files.  These are ones like bash,
   redhat-rpm-config, and rpm-build.

If these aren't the reasons for why there are packages in
'chroot_setup_cmd', can someone better state what they are?

(A possible alternate meta-rule for the 'chroot_setup_cmd' macro for
RHEL/CentOS mock configs could say be feature eqivalent to Fedora's
@buildsys-build yum group?)

In my list of reasons, the kernel-rpm-macros package obviously falls
into category #2.

For RHEL, 8 adding back the %kernel_module_package (and kmodtool and
others) by adding kernel-rpm-macros rpm to chroot_setup_cmd is to
recover lost functionality.

As mentioned, before RHEL 8 (and current Fedoras), %kernel_module_package
macro was provided by /usr/lib/rpm/redhat/macros in the already
included redhat-rpm-config package.  Parts of redhat-rpm-config got
spun off into kernel-rpm-macros.  (As Neal pointed out in another
post, whether that should have been done or not by Red Hat or
Fedora devs is another issue, but it was done.)  My request to add
kernel-rpm-macros to chroot_setup_cmd is to simply restore previous
functionality now missing by that OS change.

If feature-parity among supported OSes is not a goal of mock, then
I'd better understand the reason for leaving in this breaking change.

> Plain mock would behave
> differently from koji from this POV.

I'm not following what you mean.  I can read several possible
interpretations in your phrasing.  Could you explain further to
clarify?

> I'm not sure how the package is supposed to work, but perhaps you can take a
> look at `chroot_additional_packages` mock config option, to work-around 
> things.

How which package is supposed to work?

> Pavel

Quentin
___
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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Neal Gompa
On Wed, Jun 3, 2020 at 12:54 PM Vít Ondruch  wrote:
>
>
> Dne 03. 06. 20 v 13:22 Neal Gompa napsal(a):
> > On Wed, Jun 3, 2020 at 5:59 AM Vít Ondruch  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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Vít Ondruch

Dne 03. 06. 20 v 13:22 Neal Gompa napsal(a):
> On Wed, Jun 3, 2020 at 5:59 AM Vít Ondruch  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.


Vít


>  Without the macro working as
> designed (where the macros already exist in the buildroot), kernel
> modules cannot be successfully built.
>
>
>
___
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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Pavel Raiskup
On Wednesday, June 3, 2020 5:05:32 PM CEST Quentin Barnes wrote:
> On Tue, Jun 02, 2020 at 11:19:11PM +0200, Miroslav Such?? wrote:
> > Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > > 2) the "kernel-rpm-macros"
> > > package needs to be added to the @buildsys-build group for Fedora
> > 
> > That should be a final solution.
> > Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".
> > 
> > > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > > CentOS/RHEL).
> > 
> > This is quick'n'dirty hack to unblock you for local builds and for testing.
> 
> I meant that CentOS/RHEL doesn't have a @buildsys-build.  Instead, it
> uses a hardcoded list.  For CentOS/RHEL, the equivalent fix would be
> to update their hardcoded list.

At least in Fedora, I checked few Koji builds for EPEL 8 and I don't see
kernel-rpm-macros in the buildroot installation transactions.  So it is not in
the build group.

As long as the package isn't in default minimal buildroot, it is not correct
thing to just put the package into 'chroot_setup_cmd'.  Plain mock would behave
differently from koji from this POV.

I'm not sure how the package is supposed to work, but perhaps you can take a
look at `chroot_additional_packages` mock config option, to work-around things.

Pavel



> > 
> > -- 
> > Miroslav Suchy, RHCA
> > Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys
> > ___
> > 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]
> 
> Quentin
> ___
> 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]
> 



___
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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Quentin Barnes
On Tue, Jun 02, 2020 at 11:19:11PM +0200, Miroslav Such?? wrote:
> Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > 2) the "kernel-rpm-macros"
> > package needs to be added to the @buildsys-build group for Fedora
> 
> That should be a final solution.

Agreed that the lists should be very cautiously updated.  However,
when the choice is available, the best solution for solving the
problem should be the one used.

> Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".

There is no need for such an explicit package dependency to exist
since there is no necessary dependency of fedora-rpm-macros on
kernel-rpm-macros.  The only reason for it to exist is to work
around this mock packaging build problem.  It's not reasonable to
introduce one error to compensate for another one when there are
other, less problematic options.  You could more easily try to
blame it on RPM for not having a "BuildRequires(pre):" feature.  It
still comes down to mock has to support the RPM subsystem and the
supported OSes with all their current limitations.

> > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > CentOS/RHEL).
> 
> This is quick'n'dirty hack to unblock you for local builds and for testing.
> 
> -- 
> Miroslav Suchy, RHCA
> Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys
> ___
> 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]

Quentin
___
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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Quentin Barnes
On Tue, Jun 02, 2020 at 11:19:11PM +0200, Miroslav Such?? wrote:
> Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > 2) the "kernel-rpm-macros"
> > package needs to be added to the @buildsys-build group for Fedora
> 
> That should be a final solution.
> Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".
> 
> > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > CentOS/RHEL).
> 
> This is quick'n'dirty hack to unblock you for local builds and for testing.

I meant that CentOS/RHEL doesn't have a @buildsys-build.  Instead, it
uses a hardcoded list.  For CentOS/RHEL, the equivalent fix would be
to update their hardcoded list.

> 
> -- 
> Miroslav Suchy, RHCA
> Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys
> ___
> 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]

Quentin
___
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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Neal Gompa
On Wed, Jun 3, 2020 at 5:59 AM Vít Ondruch  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 and a subpackage. Without the macro working as
designed (where the macros already exist in the buildroot), kernel
modules cannot be successfully built.



-- 
真実はいつも一つ!/ 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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Vít Ondruch

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`.


Vít


> , or 2) the "kernel-rpm-macros"
> package needs to be added to the @buildsys-build group for Fedora
> (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> CentOS/RHEL).
>
> For now, I've just been hacking mock cfg files to workaround this
> issue.
>
> What are people's thoughts on this problem?
>
> If I do need to tweak the spec file, if someone could point me to
> an example of how, that would be appreciated.
>
> Quentin
> ___
> 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]
___
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]


Re: mock and kernel-rpm-macros package

2020-06-03 Thread Vít Ondruch

Dne 02. 06. 20 v 23:19 Miroslav Suchý napsal(a):
> Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
>> 2) the "kernel-rpm-macros"
>> package needs to be added to the @buildsys-build group for Fedora
> That should be a final solution.
> Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".


Installing some package to every build root should be always the last
possible solution.


Vít


>
>> (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
>> CentOS/RHEL).
> This is quick'n'dirty hack to unblock you for local builds and for testing.
>
___
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]


Re: mock and kernel-rpm-macros package

2020-06-02 Thread Pavel Raiskup
On Wednesday, June 3, 2020 8:00:21 AM CEST Pavel Raiskup wrote:
> As long as it isn't enough to put "Requires: kernel-rpm-macros" to the
> packages that need it,

Sorry, I meant BuildRequires: here of course.

Pavel


___
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]


Re: mock and kernel-rpm-macros package

2020-06-02 Thread Pavel Raiskup
On Tuesday, June 2, 2020 11:21:07 PM CEST Neal Gompa wrote:
> On Tue, Jun 2, 2020 at 5:19 PM Miroslav Suchý  wrote:
> >
> > Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > > 2) the "kernel-rpm-macros"
> > > package needs to be added to the @buildsys-build group for Fedora
> >
> > That should be a final solution.
> > Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".
> >
> > > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > > CentOS/RHEL).
> >
> > This is quick'n'dirty hack to unblock you for local builds and for testing.
> 
> This needs to be done in mock configs for everyone, because it's
> completely broken without that package being pulled in. I had to do a
> similar trick to get the wireguard kmod package to build for EL8
> too...

As long as it isn't enough to put "Requires: kernel-rpm-macros" to the packages
that need it, and it simply has to be in minimal buildroot => the only sane way
is to ask redhat-rpm-config maintainers to set "Requires: kernel-rpm-macros".

Pavel


___
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]


Re: mock and kernel-rpm-macros package

2020-06-02 Thread Neal Gompa
On Tue, Jun 2, 2020 at 5:19 PM Miroslav Suchý  wrote:
>
> Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> > 2) the "kernel-rpm-macros"
> > package needs to be added to the @buildsys-build group for Fedora
>
> That should be a final solution.
> Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".
>
> > (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> > CentOS/RHEL).
>
> This is quick'n'dirty hack to unblock you for local builds and for testing.

This needs to be done in mock configs for everyone, because it's
completely broken without that package being pulled in. I had to do a
similar trick to get the wireguard kmod package to build for EL8
too...



-- 
真実はいつも一つ!/ 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]


Re: mock and kernel-rpm-macros package

2020-06-02 Thread Miroslav Suchý
Dne 02. 06. 20 v 23:02 Quentin Barnes napsal(a):
> 2) the "kernel-rpm-macros"
> package needs to be added to the @buildsys-build group for Fedora

That should be a final solution.
Variant is that `fedora-rpm-macros` will requires "kernel-rpm-macros".

> (or added to the "config_opts['chroot_setup_cmd']=..." cfg line for
> CentOS/RHEL).

This is quick'n'dirty hack to unblock you for local builds and for testing.

-- 
Miroslav Suchy, RHCA
Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys
___
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]