Message ID | 20231204013722.2032205-1-masahiro.yamada@canonical.com |
---|---|
State | New |
Headers | show |
Series | [noble] UBUNTU: SAUCE: do not attempt to compress modules where no module exists | expand |
Already submitted/acked here https://lists.ubuntu.com/archives/kernel-team/2023-November/147197.html On 04-12-2023 02:37, Masahiro Yamada wrote: > When building the Ubuntu kernel from the terminal, you will encounter > a build error like follows: > > find debian/linux-tools-6.6.0-14 -name '*.ko' -print0 | xargs -0 -n1 -P 24 zstd -19 --quiet --rm > stdout is a console, aborting > make: *** [debian/rules.d/2-binary-arch.mk:802: binary-perarch] Error 123 > > This code is implemented in dh_all, so it is executed for all packages, > even though not all of them contain modules. > > Without the -r option, xargs runs the given command at least once. > 'zstd -19 --quiet --rm' reads from stdin, and writes to stdout, which > is a terminal. The zstd command gracefully errors out instead of messing > up the terminal. > > This issue may go unnoticed when you build the kernel in cbd or > launchpad, where the stdout is redirected to a logger. You can > observe garbled characters in a log file, at least. > > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com> > --- > > debian/rules.d/2-binary-arch.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > index 53fbb55c198a..f89efd270e1c 100644 > --- a/debian/rules.d/2-binary-arch.mk > +++ b/debian/rules.d/2-binary-arch.mk > @@ -568,7 +568,7 @@ define dh_all > dh_installdocs -p$(1) > dh_compress -p$(1) > # Compress kernel modules > - find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm > + find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -r -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm > dh_fixperms -p$(1) -X/boot/ > dh_shlibdeps -p$(1) $(shlibdeps_opts) > dh_installdeb -p$(1)
On Mon, Dec 4, 2023 at 7:21 PM Thibault Ferrante <thibault.ferrante@canonical.com> wrote: > > Already submitted/acked here https://lists.ubuntu.com/archives/kernel-team/2023-November/147197.html Thanks, I did not notice it. My work tree is based on noble/master-next, where it is committed yet. > On 04-12-2023 02:37, Masahiro Yamada wrote: > > When building the Ubuntu kernel from the terminal, you will encounter > > a build error like follows: > > > > find debian/linux-tools-6.6.0-14 -name '*.ko' -print0 | xargs -0 -n1 -P 24 zstd -19 --quiet --rm > > stdout is a console, aborting > > make: *** [debian/rules.d/2-binary-arch.mk:802: binary-perarch] Error 123 > > > > This code is implemented in dh_all, so it is executed for all packages, > > even though not all of them contain modules. > > > > Without the -r option, xargs runs the given command at least once. > > 'zstd -19 --quiet --rm' reads from stdin, and writes to stdout, which > > is a terminal. The zstd command gracefully errors out instead of messing > > up the terminal. > > > > This issue may go unnoticed when you build the kernel in cbd or > > launchpad, where the stdout is redirected to a logger. You can > > observe garbled characters in a log file, at least. > > > > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com> > > --- > > > > debian/rules.d/2-binary-arch.mk | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > > index 53fbb55c198a..f89efd270e1c 100644 > > --- a/debian/rules.d/2-binary-arch.mk > > +++ b/debian/rules.d/2-binary-arch.mk > > @@ -568,7 +568,7 @@ define dh_all > > dh_installdocs -p$(1) > > dh_compress -p$(1) > > # Compress kernel modules > > - find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm > > + find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -r -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm > > dh_fixperms -p$(1) -X/boot/ > > dh_shlibdeps -p$(1) $(shlibdeps_opts) > > dh_installdeb -p$(1) > > > -- > -- > Thibault
On Mon, 4 Dec 2023 at 14:47, Masahiro Yamada <masahiro.yamada@canonical.com> wrote: > > On Mon, Dec 4, 2023 at 7:21 PM Thibault Ferrante > <thibault.ferrante@canonical.com> wrote: > > > > Already submitted/acked here https://lists.ubuntu.com/archives/kernel-team/2023-November/147197.html > > > Thanks, I did not notice it. > > My work tree is based on noble/master-next, where > it is committed yet. Sorry for the delay in applying mailing list patches. Everything is now catching up, such that `cranky checkout noble:linux-unstable` aka https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/unstable -b master are now up to date noble/master-next is for the v6.6 kernel that is in-flight in noble-proposed. Unstable is the tip of development aka v6.7-rc > > > > > > > > > > On 04-12-2023 02:37, Masahiro Yamada wrote: > > > When building the Ubuntu kernel from the terminal, you will encounter > > > a build error like follows: > > > > > > find debian/linux-tools-6.6.0-14 -name '*.ko' -print0 | xargs -0 -n1 -P 24 zstd -19 --quiet --rm > > > stdout is a console, aborting > > > make: *** [debian/rules.d/2-binary-arch.mk:802: binary-perarch] Error 123 > > > > > > This code is implemented in dh_all, so it is executed for all packages, > > > even though not all of them contain modules. > > > > > > Without the -r option, xargs runs the given command at least once. > > > 'zstd -19 --quiet --rm' reads from stdin, and writes to stdout, which > > > is a terminal. The zstd command gracefully errors out instead of messing > > > up the terminal. > > > > > > This issue may go unnoticed when you build the kernel in cbd or > > > launchpad, where the stdout is redirected to a logger. You can > > > observe garbled characters in a log file, at least. > > > > > > Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com> > > > --- > > > > > > debian/rules.d/2-binary-arch.mk | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk > > > index 53fbb55c198a..f89efd270e1c 100644 > > > --- a/debian/rules.d/2-binary-arch.mk > > > +++ b/debian/rules.d/2-binary-arch.mk > > > @@ -568,7 +568,7 @@ define dh_all > > > dh_installdocs -p$(1) > > > dh_compress -p$(1) > > > # Compress kernel modules > > > - find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm > > > + find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -r -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm > > > dh_fixperms -p$(1) -X/boot/ > > > dh_shlibdeps -p$(1) $(shlibdeps_opts) > > > dh_installdeb -p$(1) > > > > > > -- > > -- > > Thibault > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 53fbb55c198a..f89efd270e1c 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -568,7 +568,7 @@ define dh_all dh_installdocs -p$(1) dh_compress -p$(1) # Compress kernel modules - find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm + find debian/$(1) -name '*.ko' -print0 | xargs -0 -n1 -r -P $(CONCURRENCY_LEVEL) zstd -19 --quiet --rm dh_fixperms -p$(1) -X/boot/ dh_shlibdeps -p$(1) $(shlibdeps_opts) dh_installdeb -p$(1)
When building the Ubuntu kernel from the terminal, you will encounter a build error like follows: find debian/linux-tools-6.6.0-14 -name '*.ko' -print0 | xargs -0 -n1 -P 24 zstd -19 --quiet --rm stdout is a console, aborting make: *** [debian/rules.d/2-binary-arch.mk:802: binary-perarch] Error 123 This code is implemented in dh_all, so it is executed for all packages, even though not all of them contain modules. Without the -r option, xargs runs the given command at least once. 'zstd -19 --quiet --rm' reads from stdin, and writes to stdout, which is a terminal. The zstd command gracefully errors out instead of messing up the terminal. This issue may go unnoticed when you build the kernel in cbd or launchpad, where the stdout is redirected to a logger. You can observe garbled characters in a log file, at least. Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com> --- debian/rules.d/2-binary-arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)