efi_runtime: enable KBUILD_MODPOST_WARN=y to workaround build failures
diff mbox series

Message ID 20190729230002.10592-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • efi_runtime: enable KBUILD_MODPOST_WARN=y to workaround build failures
Related show

Commit Message

Colin King July 29, 2019, 11 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

With newer kernels > 5.0, undefined variables now throw an error
rather than a warning.  Force the older warning behaviour so that
dkms builds can pass ADT build testing.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 efi_runtime/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Alex Hung July 31, 2019, 12:34 a.m. UTC | #1
Hi Colin,

Is this to solve the previous ADT issue from "[V3] efi_runtime: remove
efi_runtime dkms" (http://patchwork.ozlabs.org/patch/1136754/)?

I applied both patches and run ADT test by "sudo autopkgtest
./fwts_${RELEASE_VERSION}-0ubuntu1.dsc -- null" ($RELEASE_VERSION =
19.07.01 which is a test build), it doesn't return success. Is this
intentional?

On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> With newer kernels > 5.0, undefined variables now throw an error
> rather than a warning.  Force the older warning behaviour so that
> dkms builds can pass ADT build testing.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  efi_runtime/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> index ae868675..6ba369ce 100644
> --- a/efi_runtime/Makefile
> +++ b/efi_runtime/Makefile
> @@ -17,6 +17,7 @@
>  #
>
>  KVER ?= `uname -r`
> +KBUILD_MODPOST_WARN=y
>  obj-m += efi_runtime.o
>  all:
>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
> --
> 2.20.1
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
Colin King Aug. 2, 2019, 8:58 a.m. UTC | #2
On 31/07/2019 01:34, Alex Hung wrote:
> Hi Colin,
> 
> Is this to solve the previous ADT issue from "[V3] efi_runtime: remove
> efi_runtime dkms" (http://patchwork.ozlabs.org/patch/1136754/)?
> 
> I applied both patches and run ADT test by "sudo autopkgtest
> ./fwts_${RELEASE_VERSION}-0ubuntu1.dsc -- null" ($RELEASE_VERSION =
> 19.07.01 which is a test build), it doesn't return success. Is this
> intentional?

Hrm, I'm running it from the source as follows:

git clone git://kernel.ubuntu.com/hwe/fwts
cd fwts
sudo autopkgtest . -- null

and it works OK for me on ubuntu eoan, see attached log (captured using
'script')

Colin


> 
> On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com> wrote:
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> With newer kernels > 5.0, undefined variables now throw an error
>> rather than a warning.  Force the older warning behaviour so that
>> dkms builds can pass ADT build testing.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  efi_runtime/Makefile | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
>> index ae868675..6ba369ce 100644
>> --- a/efi_runtime/Makefile
>> +++ b/efi_runtime/Makefile
>> @@ -17,6 +17,7 @@
>>  #
>>
>>  KVER ?= `uname -r`
>> +KBUILD_MODPOST_WARN=y
>>  obj-m += efi_runtime.o
>>  all:
>>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
>> --
>> 2.20.1
>>
>>
>> --
>> fwts-devel mailing list
>> fwts-devel@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> 
> 
>
Colin King Aug. 2, 2019, 9:18 a.m. UTC | #3
On 02/08/2019 09:58, Colin Ian King wrote:
> On 31/07/2019 01:34, Alex Hung wrote:
>> Hi Colin,
>>
>> Is this to solve the previous ADT issue from "[V3] efi_runtime: remove
>> efi_runtime dkms" (http://patchwork.ozlabs.org/patch/1136754/)?
>>
>> I applied both patches and run ADT test by "sudo autopkgtest
>> ./fwts_${RELEASE_VERSION}-0ubuntu1.dsc -- null" ($RELEASE_VERSION =
>> 19.07.01 which is a test build), it doesn't return success. Is this
>> intentional?
> 
> Hrm, I'm running it from the source as follows:
> 
> git clone git://kernel.ubuntu.com/hwe/fwts
> cd fwts
> sudo autopkgtest . -- null
> 
> and it works OK for me on ubuntu eoan, see attached log (captured using
> 'script')
> 
> Colin

Also tried  sudo autopkgtest ./fwts_19.07.00-0ubuntu2.dsc  -- null and
it works fine (see log).

Colin

> 
> 
>>
>> On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com> wrote:
>>>
>>> From: Colin Ian King <colin.king@canonical.com>
>>>
>>> With newer kernels > 5.0, undefined variables now throw an error
>>> rather than a warning.  Force the older warning behaviour so that
>>> dkms builds can pass ADT build testing.
>>>
>>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>>> ---
>>>  efi_runtime/Makefile | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
>>> index ae868675..6ba369ce 100644
>>> --- a/efi_runtime/Makefile
>>> +++ b/efi_runtime/Makefile
>>> @@ -17,6 +17,7 @@
>>>  #
>>>
>>>  KVER ?= `uname -r`
>>> +KBUILD_MODPOST_WARN=y
>>>  obj-m += efi_runtime.o
>>>  all:
>>>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
>>> --
>>> 2.20.1
>>>
>>>
>>> --
>>> fwts-devel mailing list
>>> fwts-devel@lists.ubuntu.com
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
>>
>>
>>
> 
>
Alex Hung Aug. 2, 2019, 6:18 p.m. UTC | #4
I tried eoan (daily build iso dated 2019-07-26 07:48) and without following
git clone git://kernel.ubuntu.com/hwe/fwts.git
 - Install eoan, run sudo apt date && sudo apt upgrade
 - Install some other apps
 - git clone git://kernel.ubuntu.com/hwe/fwts.git
 - cd fwts
 - pwclient git-am 1136754 1138706
 - sudo autopkgtest . -- null

However, I still got the same result "SKIP no tests in this package",
and "echo $?" returns 8.

Without the two patches, the "echo $?" return 0

The log file is attached.


On Fri, Aug 2, 2019 at 3:18 AM Colin Ian King <colin.king@canonical.com> wrote:
>
> On 02/08/2019 09:58, Colin Ian King wrote:
> > On 31/07/2019 01:34, Alex Hung wrote:
> >> Hi Colin,
> >>
> >> Is this to solve the previous ADT issue from "[V3] efi_runtime: remove
> >> efi_runtime dkms" (http://patchwork.ozlabs.org/patch/1136754/)?
> >>
> >> I applied both patches and run ADT test by "sudo autopkgtest
> >> ./fwts_${RELEASE_VERSION}-0ubuntu1.dsc -- null" ($RELEASE_VERSION =
> >> 19.07.01 which is a test build), it doesn't return success. Is this
> >> intentional?
> >
> > Hrm, I'm running it from the source as follows:
> >
> > git clone git://kernel.ubuntu.com/hwe/fwts
> > cd fwts
> > sudo autopkgtest . -- null
> >
> > and it works OK for me on ubuntu eoan, see attached log (captured using
> > 'script')
> >
> > Colin
>
> Also tried  sudo autopkgtest ./fwts_19.07.00-0ubuntu2.dsc  -- null and
> it works fine (see log).
>
> Colin
>
> >
> >
> >>
> >> On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com> wrote:
> >>>
> >>> From: Colin Ian King <colin.king@canonical.com>
> >>>
> >>> With newer kernels > 5.0, undefined variables now throw an error
> >>> rather than a warning.  Force the older warning behaviour so that
> >>> dkms builds can pass ADT build testing.
> >>>
> >>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> >>> ---
> >>>  efi_runtime/Makefile | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> >>> index ae868675..6ba369ce 100644
> >>> --- a/efi_runtime/Makefile
> >>> +++ b/efi_runtime/Makefile
> >>> @@ -17,6 +17,7 @@
> >>>  #
> >>>
> >>>  KVER ?= `uname -r`
> >>> +KBUILD_MODPOST_WARN=y
> >>>  obj-m += efi_runtime.o
> >>>  all:
> >>>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
> >>> --
> >>> 2.20.1
> >>>
> >>>
> >>> --
> >>> fwts-devel mailing list
> >>> fwts-devel@lists.ubuntu.com
> >>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> >>
> >>
> >>
> >
> >
>


--
Cheers,
Alex Hung
Colin King Aug. 3, 2019, 6:40 p.m. UTC | #5
On 31/07/2019 01:34, Alex Hung wrote:
> Hi Colin,
> 
> Is this to solve the previous ADT issue from "[V3] efi_runtime: remove
> efi_runtime dkms" (http://patchwork.ozlabs.org/patch/1136754/)?

OK, I can clearly see what's going on. I'll try and clear up the confusion.

My fix is to address a modpost issue with kernels > 5.0, I've just
dialed back the failure message to a warning messages on arches that
don't link because the arch does not support UEFI.  My fix is nothing to
do with Ivan's fix in any way.

I had to add my patch to the packaging to get it through ADT testing
with 5.2 kernels, see
https://launchpad.net/ubuntu/+source/fwts/19.07.00-0ubuntu2

The build was working for me because I didn't have Ivan's patch. I
expect if you just use my patch you will see a successful built too.

Colin

> 
> I applied both patches and run ADT test by "sudo autopkgtest
> ./fwts_${RELEASE_VERSION}-0ubuntu1.dsc -- null" ($RELEASE_VERSION =
> 19.07.01 which is a test build), it doesn't return success. Is this
> intentional?
> 
> On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com> wrote:
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> With newer kernels > 5.0, undefined variables now throw an error
>> rather than a warning.  Force the older warning behaviour so that
>> dkms builds can pass ADT build testing.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  efi_runtime/Makefile | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
>> index ae868675..6ba369ce 100644
>> --- a/efi_runtime/Makefile
>> +++ b/efi_runtime/Makefile
>> @@ -17,6 +17,7 @@
>>  #
>>
>>  KVER ?= `uname -r`
>> +KBUILD_MODPOST_WARN=y
>>  obj-m += efi_runtime.o
>>  all:
>>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
>> --
>> 2.20.1
>>
>>
>> --
>> fwts-devel mailing list
>> fwts-devel@lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> 
> 
>
Alex Hung Aug. 3, 2019, 6:42 p.m. UTC | #6
Ok, thanks! I kinda asked about it but it might not very clear.

On Sat, Aug 3, 2019, 12:40 PM Colin Ian King <colin.king@canonical.com>
wrote:

> On 31/07/2019 01:34, Alex Hung wrote:
> > Hi Colin,
> >
> > Is this to solve the previous ADT issue from "[V3] efi_runtime: remove
> > efi_runtime dkms" (http://patchwork.ozlabs.org/patch/1136754/)?
>
> OK, I can clearly see what's going on. I'll try and clear up the confusion.
>
> My fix is to address a modpost issue with kernels > 5.0, I've just
> dialed back the failure message to a warning messages on arches that
> don't link because the arch does not support UEFI.  My fix is nothing to
> do with Ivan's fix in any way.
>
> I had to add my patch to the packaging to get it through ADT testing
> with 5.2 kernels, see
> https://launchpad.net/ubuntu/+source/fwts/19.07.00-0ubuntu2
>
> The build was working for me because I didn't have Ivan's patch. I
> expect if you just use my patch you will see a successful built too.
>
> Colin
>
> >
> > I applied both patches and run ADT test by "sudo autopkgtest
> > ./fwts_${RELEASE_VERSION}-0ubuntu1.dsc -- null" ($RELEASE_VERSION =
> > 19.07.01 which is a test build), it doesn't return success. Is this
> > intentional?
> >
> > On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com>
> wrote:
> >>
> >> From: Colin Ian King <colin.king@canonical.com>
> >>
> >> With newer kernels > 5.0, undefined variables now throw an error
> >> rather than a warning.  Force the older warning behaviour so that
> >> dkms builds can pass ADT build testing.
> >>
> >> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> >> ---
> >>  efi_runtime/Makefile | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> >> index ae868675..6ba369ce 100644
> >> --- a/efi_runtime/Makefile
> >> +++ b/efi_runtime/Makefile
> >> @@ -17,6 +17,7 @@
> >>  #
> >>
> >>  KVER ?= `uname -r`
> >> +KBUILD_MODPOST_WARN=y
> >>  obj-m += efi_runtime.o
> >>  all:
> >>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
> >> --
> >> 2.20.1
> >>
> >>
> >> --
> >> fwts-devel mailing list
> >> fwts-devel@lists.ubuntu.com
> >> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
> >
> >
> >
>
>
Ivan Aug. 5, 2019, 9:46 a.m. UTC | #7
On 7/30/19 7:00 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> With newer kernels > 5.0, undefined variables now throw an error
> rather than a warning.  Force the older warning behaviour so that
> dkms builds can pass ADT build testing.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   efi_runtime/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> index ae868675..6ba369ce 100644
> --- a/efi_runtime/Makefile
> +++ b/efi_runtime/Makefile
> @@ -17,6 +17,7 @@
>   #
>   
>   KVER ?= `uname -r`
> +KBUILD_MODPOST_WARN=y
>   obj-m += efi_runtime.o
>   all:
>   	make -C /lib/modules/$(KVER)/build M=`pwd` modules
> 


Thanks Colin,
Acked-by: Ivan Hu <ivan.hu@canonical.com>
Alex Hung Aug. 6, 2019, 2:38 a.m. UTC | #8
On 2019-07-29 5:00 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> With newer kernels > 5.0, undefined variables now throw an error
> rather than a warning.  Force the older warning behaviour so that
> dkms builds can pass ADT build testing.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  efi_runtime/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> index ae868675..6ba369ce 100644
> --- a/efi_runtime/Makefile
> +++ b/efi_runtime/Makefile
> @@ -17,6 +17,7 @@
>  #
>  
>  KVER ?= `uname -r`
> +KBUILD_MODPOST_WARN=y
>  obj-m += efi_runtime.o
>  all:
>  	make -C /lib/modules/$(KVER)/build M=`pwd` modules
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Alex Hung Aug. 7, 2019, 4:54 p.m. UTC | #9
Hi Colin,

Is this patch a fix for
https://bugs.launchpad.net/ubuntu/+source/fwts/+bug/1836407?

On Mon, Jul 29, 2019 at 5:00 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> With newer kernels > 5.0, undefined variables now throw an error
> rather than a warning.  Force the older warning behaviour so that
> dkms builds can pass ADT build testing.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  efi_runtime/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
> index ae868675..6ba369ce 100644
> --- a/efi_runtime/Makefile
> +++ b/efi_runtime/Makefile
> @@ -17,6 +17,7 @@
>  #
>
>  KVER ?= `uname -r`
> +KBUILD_MODPOST_WARN=y
>  obj-m += efi_runtime.o
>  all:
>         make -C /lib/modules/$(KVER)/build M=`pwd` modules
> --
> 2.20.1
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel

Patch
diff mbox series

diff --git a/efi_runtime/Makefile b/efi_runtime/Makefile
index ae868675..6ba369ce 100644
--- a/efi_runtime/Makefile
+++ b/efi_runtime/Makefile
@@ -17,6 +17,7 @@ 
 #
 
 KVER ?= `uname -r`
+KBUILD_MODPOST_WARN=y
 obj-m += efi_runtime.o
 all:
 	make -C /lib/modules/$(KVER)/build M=`pwd` modules