diff mbox series

[focal] builddeb: allow selection of .deb compressor

Message ID 20230724082347.3315676-1-masahiro.yamada@canonical.com
State New
Headers show
Series [focal] builddeb: allow selection of .deb compressor | expand

Commit Message

Masahiro Yamada July 24, 2023, 8:23 a.m. UTC
From: Michał Mirosław <mirq-linux@rere.qmqm.pl>

[ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]

Select deb compression using KDEB_COMPRESS make variable. This allows to
use gzip compression for local or test builds, and that's way faster
than now-default xz compression.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
---

This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.


 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Bader July 24, 2023, 9:57 a.m. UTC | #1
On 24.07.23 10:23, Masahiro Yamada wrote:
> From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> 
> [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
> 
> Select deb compression using KDEB_COMPRESS make variable. This allows to
> use gzip compression for local or test builds, and that's way faster
> than now-default xz compression.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> ---
> 
> This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
> 
> 
>   scripts/package/builddeb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index c4c580f547ef..b68aaeece7c9 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -43,7 +43,7 @@ create_package() {
>   
>   	# Create the package
>   	dpkg-gencontrol -p$pname -P"$pdir"
> -	dpkg --build "$pdir" ..
> +	dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
>   }
>   
>   version=$KERNELRELEASE

Rejected for the following reasons:
- not following SRU policy 
(https://wiki.ubuntu.com/KernelTeam/KernelUpdates)
- also not sure Focal was already using xz

-Stefan
Dimitri John Ledkov July 24, 2023, 2:31 p.m. UTC | #2
Hi,

On Mon, 24 Jul 2023 at 09:24, Masahiro Yamada
<masahiro.yamada@canonical.com> wrote:
>
> From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>
> [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
>
> Select deb compression using KDEB_COMPRESS make variable. This allows to
> use gzip compression for local or test builds, and that's way faster
> than now-default xz compression.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> ---
>
> This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
>

However in Ubuntu, we don't use this ever, and should not be using it,
as that does not at all produce any sort of packages we like or want.

Can you please explain how or why you are using these upstream scripts
that do not produce neither Ubuntu nor Debian compliant kernel.deb
packages that correctly integrate with our OS?

>
>  scripts/package/builddeb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index c4c580f547ef..b68aaeece7c9 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -43,7 +43,7 @@ create_package() {
>
>         # Create the package
>         dpkg-gencontrol -p$pname -P"$pdir"
> -       dpkg --build "$pdir" ..
> +       dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
>  }
>
>  version=$KERNELRELEASE
Masahiro Yamada July 25, 2023, 1:23 a.m. UTC | #3
On Mon, Jul 24, 2023 at 11:32 PM Dimitri John Ledkov
<dimitri.ledkov@canonical.com> wrote:
>
> Hi,
>
> On Mon, 24 Jul 2023 at 09:24, Masahiro Yamada
> <masahiro.yamada@canonical.com> wrote:
> >
> > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> >
> > [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
> >
> > Select deb compression using KDEB_COMPRESS make variable. This allows to
> > use gzip compression for local or test builds, and that's way faster
> > than now-default xz compression.
> >
> > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> > ---
> >
> > This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
> >
>
> However in Ubuntu, we don't use this ever, and should not be using it,
> as that does not at all produce any sort of packages we like or want.
>
> Can you please explain how or why you are using these upstream scripts
> that do not produce neither Ubuntu nor Debian compliant kernel.deb
> packages that correctly integrate with our OS?


It is true that 'make bindeb-pkg' is unofficial in Ubuntu,
but it is useful to build a linux-image deb package incrementally.

I had a kernel micro-talk "Fast rebuilding kernel packages"
in Prague back in May.

Please see Page 11 of the slide PDF if you are interested.

KDEB_COMPRESS is available in jammy or later.

I locally apply this patch to focal variants.


Again, it is just an unofficial tip to work efficiently.
It is understandable if this is rejected,
but I thought it could be acceptable as it is just
one-liner backport from the mainline.




>
> >
> >  scripts/package/builddeb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > index c4c580f547ef..b68aaeece7c9 100755
> > --- a/scripts/package/builddeb
> > +++ b/scripts/package/builddeb
> > @@ -43,7 +43,7 @@ create_package() {
> >
> >         # Create the package
> >         dpkg-gencontrol -p$pname -P"$pdir"
> > -       dpkg --build "$pdir" ..
> > +       dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
> >  }
> >
> >  version=$KERNELRELEASE
>
>
>
> --
> okurrr,
>
> Dimitri
Masahiro Yamada July 25, 2023, 2:18 a.m. UTC | #4
On Tue, Jul 25, 2023 at 10:23 AM Masahiro Yamada
<masahiro.yamada@canonical.com> wrote:
>
> On Mon, Jul 24, 2023 at 11:32 PM Dimitri John Ledkov
> <dimitri.ledkov@canonical.com> wrote:
> >
> > Hi,
> >
> > On Mon, 24 Jul 2023 at 09:24, Masahiro Yamada
> > <masahiro.yamada@canonical.com> wrote:
> > >
> > > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > >
> > > [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
> > >
> > > Select deb compression using KDEB_COMPRESS make variable. This allows to
> > > use gzip compression for local or test builds, and that's way faster
> > > than now-default xz compression.
> > >
> > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> > > ---
> > >
> > > This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
> > >
> >
> > However in Ubuntu, we don't use this ever, and should not be using it,
> > as that does not at all produce any sort of packages we like or want.
> >
> > Can you please explain how or why you are using these upstream scripts
> > that do not produce neither Ubuntu nor Debian compliant kernel.deb
> > packages that correctly integrate with our OS?
>
>
> It is true that 'make bindeb-pkg' is unofficial in Ubuntu,
> but it is useful to build a linux-image deb package incrementally.
>
> I had a kernel micro-talk "Fast rebuilding kernel packages"
> in Prague back in May.
>
> Please see Page 11 of the slide PDF if you are interested.
>
> KDEB_COMPRESS is available in jammy or later.
>
> I locally apply this patch to focal variants.
>
>
> Again, it is just an unofficial tip to work efficiently.
> It is understandable if this is rejected,
> but I thought it could be acceptable as it is just
> one-liner backport from the mainline.



BTW, this is kind of official in Debian
because 'make deb-pkg' is documented in
Debian Administrator's Handbook.

https://debian-handbook.info/browse/stable/sect.kernel-compilation.html#sect.kernel-build


I do not know if it is documented somewhere in Ubuntu doc,
but I can install a package created by 'make (bin)deb-pkg'.




>
>
>
> >
> > >
> > >  scripts/package/builddeb | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > > index c4c580f547ef..b68aaeece7c9 100755
> > > --- a/scripts/package/builddeb
> > > +++ b/scripts/package/builddeb
> > > @@ -43,7 +43,7 @@ create_package() {
> > >
> > >         # Create the package
> > >         dpkg-gencontrol -p$pname -P"$pdir"
> > > -       dpkg --build "$pdir" ..
> > > +       dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
> > >  }
> > >
> > >  version=$KERNELRELEASE
> >
> >
> >
> > --
> > okurrr,
> >
> > Dimitri
Guo-Rong Koh July 25, 2023, 3:28 a.m. UTC | #5
On Tue, 2023-07-25 at 11:18 +0900, Masahiro Yamada wrote:
> On Tue, Jul 25, 2023 at 10:23 AM Masahiro Yamada
> <masahiro.yamada@canonical.com> wrote:
> > 
> > On Mon, Jul 24, 2023 at 11:32 PM Dimitri John Ledkov
> > <dimitri.ledkov@canonical.com> wrote:
> > > 
> > > Hi,
> > > 
> > > On Mon, 24 Jul 2023 at 09:24, Masahiro Yamada
> > > <masahiro.yamada@canonical.com> wrote:
> > > > 
> > > > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > > > 
> > > > [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
> > > > 
> > > > Select deb compression using KDEB_COMPRESS make variable. This
> > > > allows to
> > > > use gzip compression for local or test builds, and that's way
> > > > faster
> > > > than now-default xz compression.
> > > > 
> > > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> > > > ---
> > > > 
> > > > This is not a bug-fix, but this is useful to speed-up 'make
> > > > bindeb-pkg'.
> > > > 
> > > 
> > > However in Ubuntu, we don't use this ever, and should not be
> > > using it,
> > > as that does not at all produce any sort of packages we like or
> > > want.
> > > 
> > > Can you please explain how or why you are using these upstream
> > > scripts
> > > that do not produce neither Ubuntu nor Debian compliant
> > > kernel.deb
> > > packages that correctly integrate with our OS?
> > 
> > 
> > It is true that 'make bindeb-pkg' is unofficial in Ubuntu,
> > but it is useful to build a linux-image deb package incrementally.
> > 
> > I had a kernel micro-talk "Fast rebuilding kernel packages"
> > in Prague back in May.
> > 
> > Please see Page 11 of the slide PDF if you are interested.
> > 
> > KDEB_COMPRESS is available in jammy or later.
> > 
> > I locally apply this patch to focal variants.
> > 
> > 
> > Again, it is just an unofficial tip to work efficiently.
> > It is understandable if this is rejected,
> > but I thought it could be acceptable as it is just
> > one-liner backport from the mainline.
> 
> 
> 
> BTW, this is kind of official in Debian
> because 'make deb-pkg' is documented in
> Debian Administrator's Handbook.
> 
> https://debian-handbook.info/browse/stable/sect.kernel-
> compilation.html#sect.kernel-build
> 
> 
> I do not know if it is documented somewhere in Ubuntu doc,
> but I can install a package created by 'make (bin)deb-pkg'.

@xnox
This is a development vs delivery question.

IoT developers are frequently in need of fast iterative development
cycles for hardware enablement.

If the patch can help improve that cycle _without_ impacting normal
kernel delivery and/or packaging, then I ask it be considered for
inclusion.

regards,
Guo-Rong
Masahiro Yamada July 28, 2023, 11:30 a.m. UTC | #6
On Mon, Jul 24, 2023 at 6:57 PM Stefan Bader <stefan.bader@canonical.com> wrote:
>
> On 24.07.23 10:23, Masahiro Yamada wrote:
> > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> >
> > [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
> >
> > Select deb compression using KDEB_COMPRESS make variable. This allows to
> > use gzip compression for local or test builds, and that's way faster
> > than now-default xz compression.
> >
> > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> > ---
> >
> > This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
> >
> >
> >   scripts/package/builddeb | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > index c4c580f547ef..b68aaeece7c9 100755
> > --- a/scripts/package/builddeb
> > +++ b/scripts/package/builddeb
> > @@ -43,7 +43,7 @@ create_package() {
> >
> >       # Create the package
> >       dpkg-gencontrol -p$pname -P"$pdir"
> > -     dpkg --build "$pdir" ..
> > +     dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
> >   }
> >
> >   version=$KERNELRELEASE
>
> Rejected for the following reasons:
> - not following SRU policy
> (https://wiki.ubuntu.com/KernelTeam/KernelUpdates)

Could you tell me which policy rejects this patch?

Is it a style problem, or is this patch itself unacceptable?



> - also not sure Focal was already using xz

I am afraid you are misunderstanding.

The build host does not need to be focal
(or does not need to be even Ubuntu).

This is useful when you build a debian package
in a mainline way.

See my replies to Dimitry.




>
> -Stefan
Stefan Bader July 31, 2023, 7:18 a.m. UTC | #7
On 28.07.23 13:30, Masahiro Yamada wrote:
> On Mon, Jul 24, 2023 at 6:57 PM Stefan Bader <stefan.bader@canonical.com> wrote:
>>
>> On 24.07.23 10:23, Masahiro Yamada wrote:
>>> From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>>>
>>> [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
>>>
>>> Select deb compression using KDEB_COMPRESS make variable. This allows to
>>> use gzip compression for local or test builds, and that's way faster
>>> than now-default xz compression.
>>>
>>> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>>> Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
>>> ---
>>>
>>> This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
>>>
>>>
>>>    scripts/package/builddeb | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
>>> index c4c580f547ef..b68aaeece7c9 100755
>>> --- a/scripts/package/builddeb
>>> +++ b/scripts/package/builddeb
>>> @@ -43,7 +43,7 @@ create_package() {
>>>
>>>        # Create the package
>>>        dpkg-gencontrol -p$pname -P"$pdir"
>>> -     dpkg --build "$pdir" ..
>>> +     dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
>>>    }
>>>
>>>    version=$KERNELRELEASE
>>
>> Rejected for the following reasons:
>> - not following SRU policy
>> (https://wiki.ubuntu.com/KernelTeam/KernelUpdates)
> 
> Could you tell me which policy rejects this patch?

Changes need to fix an actual bug. This is not a bug. And as you say not 
relevant to us. So it does not qualify as a stable release update.

-Stefan

> 
> Is it a style problem, or is this patch itself unacceptable?
> 
> 
> 
>> - also not sure Focal was already using xz
> 
> I am afraid you are misunderstanding.
> 
> The build host does not need to be focal
> (or does not need to be even Ubuntu).
> 
> This is useful when you build a debian package
> in a mainline way.
> 
> See my replies to Dimitry.
> 
> 
> 
> 
>>
>> -Stefan
Dimitri John Ledkov July 31, 2023, 12:57 p.m. UTC | #8
SRU policy is documented at
https://wiki.ubuntu.com/StableReleaseUpdates#High-impact_bugs

On Mon, 31 Jul 2023 at 08:19, Stefan Bader <stefan.bader@canonical.com> wrote:
>
> On 28.07.23 13:30, Masahiro Yamada wrote:
> > On Mon, Jul 24, 2023 at 6:57 PM Stefan Bader <stefan.bader@canonical.com> wrote:
> >>
> >> On 24.07.23 10:23, Masahiro Yamada wrote:
> >>> From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> >>>
> >>> [ Upstream commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 ]
> >>>
> >>> Select deb compression using KDEB_COMPRESS make variable. This allows to
> >>> use gzip compression for local or test builds, and that's way faster
> >>> than now-default xz compression.
> >>>
> >>> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> >>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> >>> Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> >>> ---
> >>>
> >>> This is not a bug-fix, but this is useful to speed-up 'make bindeb-pkg'.
> >>>
> >>>
> >>>    scripts/package/builddeb | 2 +-
> >>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> >>> index c4c580f547ef..b68aaeece7c9 100755
> >>> --- a/scripts/package/builddeb
> >>> +++ b/scripts/package/builddeb
> >>> @@ -43,7 +43,7 @@ create_package() {
> >>>
> >>>        # Create the package
> >>>        dpkg-gencontrol -p$pname -P"$pdir"
> >>> -     dpkg --build "$pdir" ..
> >>> +     dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
> >>>    }
> >>>
> >>>    version=$KERNELRELEASE
> >>
> >> Rejected for the following reasons:
> >> - not following SRU policy
> >> (https://wiki.ubuntu.com/KernelTeam/KernelUpdates)
> >
> > Could you tell me which policy rejects this patch?
>
> Changes need to fix an actual bug. This is not a bug. And as you say not
> relevant to us. So it does not qualify as a stable release update.
>
> -Stefan
>
> >
> > Is it a style problem, or is this patch itself unacceptable?
> >
> >
> >
> >> - also not sure Focal was already using xz
> >
> > I am afraid you are misunderstanding.
> >
> > The build host does not need to be focal
> > (or does not need to be even Ubuntu).
> >
> > This is useful when you build a debian package
> > in a mainline way.
> >
> > See my replies to Dimitry.
> >
> >
> >
> >
> >>
> >> -Stefan
>
> --
> - Stefan
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox series

Patch

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c4c580f547ef..b68aaeece7c9 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -43,7 +43,7 @@  create_package() {
 
 	# Create the package
 	dpkg-gencontrol -p$pname -P"$pdir"
-	dpkg --build "$pdir" ..
+	dpkg-deb ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
 }
 
 version=$KERNELRELEASE