public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed
@ 2023-12-30  5:07 Michał Górny
  2023-12-30  5:07 ` [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd Michał Górny
  2023-12-30 10:34 ` [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Ulrich Mueller
  0 siblings, 2 replies; 6+ messages in thread
From: Michał Górny @ 2023-12-30  5:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

Now that the module compression is conditional to USE=modules-compress,
we no longer need to allow it to fail gracefully.  If user enabled
the compression explicitly, they expect it to succeed.  If they don't
have the tools, they can always flip it off again.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/linux-mod-r1.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 67a4b64eb481..b6be4ba8a16d 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -860,9 +860,8 @@ _modules_process_compress() {
 		die "USE=modules-compress enabled but no MODULE_COMPRESS* configured"
 	fi
 
-	# could fail, assumes have commands that were needed for the kernel
 	einfo "Compressing modules (matching the kernel configuration) ..."
-	edob "${compress[@]}" -- "${@}"
+	edob "${compress[@]}" -- "${@}" || die
 }
 
 # @FUNCTION: _modules_process_depmod.d
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd
  2023-12-30  5:07 [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Michał Górny
@ 2023-12-30  5:07 ` Michał Górny
  2023-12-30 15:27   ` Ionen Wolkens
  2023-12-30 10:34 ` [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Ulrich Mueller
  1 sibling, 1 reply; 6+ messages in thread
From: Michał Górny @ 2023-12-30  5:07 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/linux-mod-r1.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index b6be4ba8a16d..4de2e3f89995 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -855,6 +855,9 @@ _modules_process_compress() {
 			compress=(gzip)
 		fi
 	elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
+		if ! type -P zstd &>/dev/null; then
+			die "zstd not found, please install app-arch/zstd or disable USE=modules-compress"
+		fi
 		compress=(zstd -qT"$(makeopts_jobs)" --rm)
 	else
 		die "USE=modules-compress enabled but no MODULE_COMPRESS* configured"
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed
  2023-12-30  5:07 [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Michał Górny
  2023-12-30  5:07 ` [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd Michał Górny
@ 2023-12-30 10:34 ` Ulrich Mueller
  2023-12-30 12:58   ` Michał Górny
  1 sibling, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2023-12-30 10:34 UTC (permalink / raw)
  To: Michał Górny; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

>>>>> On Sat, 30 Dec 2023, Michał Górny wrote:

> -	edob "${compress[@]}" -- "${@}"
> +	edob "${compress[@]}" -- "${@}" || die

Doesn't edob already die by itself?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed
  2023-12-30 10:34 ` [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Ulrich Mueller
@ 2023-12-30 12:58   ` Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2023-12-30 12:58 UTC (permalink / raw)
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Sat, 2023-12-30 at 11:34 +0100, Ulrich Mueller wrote:
> > > > > > On Sat, 30 Dec 2023, Michał Górny wrote:
> 
> > -	edob "${compress[@]}" -- "${@}"
> > +	edob "${compress[@]}" -- "${@}" || die
> 
> Doesn't edob already die by itself?

Oh, indeed it does.  I misread the comment above then.  I'll withdraw
this commit.  Nevertheless, I think the other one makes sense as it
hints people to install zstd.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd
  2023-12-30  5:07 ` [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd Michał Górny
@ 2023-12-30 15:27   ` Ionen Wolkens
  2023-12-30 16:15     ` Michał Górny
  0 siblings, 1 reply; 6+ messages in thread
From: Ionen Wolkens @ 2023-12-30 15:27 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

On Sat, Dec 30, 2023 at 06:07:16AM +0100, Michał Górny wrote:
> Signed-off-by: Michał Górny <mgorny@gentoo.org>
> ---
>  eclass/linux-mod-r1.eclass | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
> index b6be4ba8a16d..4de2e3f89995 100644
> --- a/eclass/linux-mod-r1.eclass
> +++ b/eclass/linux-mod-r1.eclass
> @@ -855,6 +855,9 @@ _modules_process_compress() {
>  			compress=(gzip)
>  		fi
>  	elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
> +		if ! type -P zstd &>/dev/null; then
> +			die "zstd not found, please install app-arch/zstd or disable USE=modules-compress"
> +		fi

As mentioned on IRC, I don't think we overly need an extra check just
for this. Users have explicitly enabled zstd-compression that they
needed for their kernel (meaning they at least had zstd), and if it
somehow dies with "zstd: command not found" I think it's
self-explanatory.

Hard for it to be missing even if it's not in @system too given portage
currently depends on it. Not to say it couldn't, or change.

>  		compress=(zstd -qT"$(makeopts_jobs)" --rm)
>  	else
>  		die "USE=modules-compress enabled but no MODULE_COMPRESS* configured"
> -- 
> 2.43.0
> 
> 

-- 
ionen

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd
  2023-12-30 15:27   ` Ionen Wolkens
@ 2023-12-30 16:15     ` Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2023-12-30 16:15 UTC (permalink / raw)
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

On Sat, 2023-12-30 at 10:27 -0500, Ionen Wolkens wrote:
> On Sat, Dec 30, 2023 at 06:07:16AM +0100, Michał Górny wrote:
> > Signed-off-by: Michał Górny <mgorny@gentoo.org>
> > ---
> >  eclass/linux-mod-r1.eclass | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
> > index b6be4ba8a16d..4de2e3f89995 100644
> > --- a/eclass/linux-mod-r1.eclass
> > +++ b/eclass/linux-mod-r1.eclass
> > @@ -855,6 +855,9 @@ _modules_process_compress() {
> >  			compress=(gzip)
> >  		fi
> >  	elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
> > +		if ! type -P zstd &>/dev/null; then
> > +			die "zstd not found, please install app-arch/zstd or disable USE=modules-compress"
> > +		fi
> 
> As mentioned on IRC, I don't think we overly need an extra check just
> for this. Users have explicitly enabled zstd-compression that they
> needed for their kernel (meaning they at least had zstd), and if it
> somehow dies with "zstd: command not found" I think it's
> self-explanatory.
> 
> Hard for it to be missing even if it's not in @system too given portage
> currently depends on it. Not to say it couldn't, or change.
> 

Very well, less patches, less waitin'.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-30 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-30  5:07 [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Michał Górny
2023-12-30  5:07 ` [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for missing zstd Michał Górny
2023-12-30 15:27   ` Ionen Wolkens
2023-12-30 16:15     ` Michał Górny
2023-12-30 10:34 ` [gentoo-dev] [PATCH 1/2] linux-mod-r1.eclass: Require the compression to succeed Ulrich Mueller
2023-12-30 12:58   ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox