Re: [gentoo-dev] [PATCH] cargo.eclass: add CARGO_TOML_DIR

2024-01-22 Thread Eli Schwartz
On 1/22/24 10:32 PM, orbea wrote:
> This is required when cargo_live_src_unpack needs to be find a
> Cargo.toml file in a directory other than ${S}
> 
> Signed-off-by: orbea 
> ---


Fairly confused why this email was posted to an existing thread instead
of a new one?

Anyway, I'm sure the change is very reasonable but it is difficult to
tell from an outside perspective just by reading the commit message --
which doesn't detail why your Cargo.toml would be in a directory other
than the one src_compile() starts off in.


-- 
Eli Schwartz


OpenPGP_0x84818A6819AF4A9B.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] [PATCH] cargo.eclass: add CARGO_TOML_DIR

2024-01-22 Thread Michał Górny
On Mon, 2024-01-22 at 19:32 -0800, orbea wrote:
> This is required when cargo_live_src_unpack needs to be find a
> Cargo.toml file in a directory other than ${S}
> 
> Signed-off-by: orbea 
> ---
>  eclass/cargo.eclass | 11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
> index 3bdbb5e3ec64..692623382c56 100644
> --- a/eclass/cargo.eclass
> +++ b/eclass/cargo.eclass
> @@ -116,6 +116,15 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
>  # other src_functions of this eclass.
>  # Note that cargo_gen_config is automatically called by cargo_src_unpack.
>  
> +# @ECLASS_VARIABLE: CARGO_TOML_DIR
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# Optional variable containing the directory path to the Cargo.toml file.
> +# Should be defined before calling cargo_live_src_unpack.
> +#
> +# This is required for live ebuilds when Cargo.toml in a directory other
> +# than ${S}.
> +
>  # @ECLASS_VARIABLE: myfeatures
>  # @DEFAULT_UNSET
>  # @DESCRIPTION:
> @@ -403,7 +412,7 @@ cargo_live_src_unpack() {
>   umask "${EVCS_UMASK}" || die "Bad options to umask: 
> ${EVCS_UMASK}"
>   fi
>  
> - pushd "${S}" > /dev/null || die
> + pushd "${CARGO_TOML_DIR:-$S}" > /dev/null || die

Please respect the current variable style.

>  
>   # Respect user settings before cargo_gen_config is called.
>   if [[ ! ${CARGO_TERM_COLOR} ]]; then

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-dev] [PATCH] cargo.eclass: add CARGO_TOML_DIR

2024-01-22 Thread orbea
This is required when cargo_live_src_unpack needs to be find a
Cargo.toml file in a directory other than ${S}

Signed-off-by: orbea 
---
 eclass/cargo.eclass | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 3bdbb5e3ec64..692623382c56 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -116,6 +116,15 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
 # other src_functions of this eclass.
 # Note that cargo_gen_config is automatically called by cargo_src_unpack.
 
+# @ECLASS_VARIABLE: CARGO_TOML_DIR
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Optional variable containing the directory path to the Cargo.toml file.
+# Should be defined before calling cargo_live_src_unpack.
+#
+# This is required for live ebuilds when Cargo.toml in a directory other
+# than ${S}.
+
 # @ECLASS_VARIABLE: myfeatures
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -403,7 +412,7 @@ cargo_live_src_unpack() {
umask "${EVCS_UMASK}" || die "Bad options to umask: 
${EVCS_UMASK}"
fi
 
-   pushd "${S}" > /dev/null || die
+   pushd "${CARGO_TOML_DIR:-$S}" > /dev/null || die
 
# Respect user settings before cargo_gen_config is called.
if [[ ! ${CARGO_TERM_COLOR} ]]; then
-- 
2.41.0




[gentoo-dev] Re: [PATCH] profiles: workaround sandbox bug with getcwd() configure test (gl_cv_func_getcwd_path_max)

2024-01-22 Thread Arsen Arsenović
Hi,

Sam James  writes:

> Workaround for sandbox bug which causes this gnulib configure test to take
> many real hours on slower machines, and certainly a huge amount of CPU hours
> on others.
>
> Spoof the same result as configure gets on a modern glibc & musl system for 
> now.
>
> Bug: https://bugs.gentoo.org/447970
> Closes: https://bugs.gentoo.org/922652
> Signed-off-by: Sam James 
> ---

Seems OK.

>  profiles/default/linux/make.defaults | 9 -
>  profiles/features/musl/make.defaults | 7 +++
>  2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/profiles/default/linux/make.defaults 
> b/profiles/default/linux/make.defaults
> index 74dd59d5d8179..4e21cd58fdf22 100644
> --- a/profiles/default/linux/make.defaults
> +++ b/profiles/default/linux/make.defaults
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2023 Gentoo Authors
> +# Copyright 1999-2024 Gentoo Authors
>  # Distributed under the terms of the GNU General Public License v2
>  #
>  # System-wide defaults for the Portage system
> @@ -54,3 +54,10 @@ LDFLAGS="-Wl,-O1 -Wl,--as-needed"
>  # Prevent automagic use of 64-bit time_t.
>  # https://bugs.gentoo.org/828001
>  enable_year2038="no"
> +
> +# Sam James  (2024-01-22)
> +# Workaround for sandbox bug which causes this gnulib configure test to take
> +# many real hours on slower machines, and certainly a huge amount of CPU 
> hours
> +# on others. Spoof the same result as configure gets on a modern glibc system
> +# for now. See bug #447970 and bug #922652.
> +gl_cv_func_getcwd_path_max="yes"
> diff --git a/profiles/features/musl/make.defaults 
> b/profiles/features/musl/make.defaults
> index 3078bdd61b09c..ca792276e3945 100644
> --- a/profiles/features/musl/make.defaults
> +++ b/profiles/features/musl/make.defaults
> @@ -17,3 +17,10 @@ FEATURES="-multilib-strict"
>  # that use a charset, it causes package collisons.
>  # Note: we use a full path for locale.alias for bug #799437
>  INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
> +
> +# Sam James  (2024-01-22)
> +# Workaround for sandbox bug which causes this gnulib configure test to take
> +# many real hours on slower machines, and certainly a huge amount of CPU 
> hours
> +# on others. Spoof the same result as configure gets on a modern musl system
> +# for now. See bug #447970 and bug #922652.
> +gl_cv_func_getcwd_path_max="no, but it is partly working"


--
Arsen Arsenović


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] profiles: workaround sandbox bug with getcwd() configure test (gl_cv_func_getcwd_path_max)

2024-01-22 Thread David Seifert
On Mon, 2024-01-22 at 16:14 +, Sam James wrote:
> Workaround for sandbox bug which causes this gnulib configure test to
> take
> many real hours on slower machines, and certainly a huge amount of CPU
> hours
> on others.
> 
> Spoof the same result as configure gets on a modern glibc & musl
> system for now.
> 
> Bug: https://bugs.gentoo.org/447970
> Closes: https://bugs.gentoo.org/922652
> Signed-off-by: Sam James 
> ---
>  profiles/default/linux/make.defaults | 9 -
>  profiles/features/musl/make.defaults | 7 +++
>  2 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/profiles/default/linux/make.defaults
> b/profiles/default/linux/make.defaults
> index 74dd59d5d8179..4e21cd58fdf22 100644
> --- a/profiles/default/linux/make.defaults
> +++ b/profiles/default/linux/make.defaults
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2023 Gentoo Authors
> +# Copyright 1999-2024 Gentoo Authors
>  # Distributed under the terms of the GNU General Public License v2
>  #
>  # System-wide defaults for the Portage system
> @@ -54,3 +54,10 @@ LDFLAGS="-Wl,-O1 -Wl,--as-needed"
>  # Prevent automagic use of 64-bit time_t.
>  # https://bugs.gentoo.org/828001
>  enable_year2038="no"
> +
> +# Sam James  (2024-01-22)
> +# Workaround for sandbox bug which causes this gnulib configure test
> to take
> +# many real hours on slower machines, and certainly a huge amount of
> CPU hours
> +# on others. Spoof the same result as configure gets on a modern
> glibc system
> +# for now. See bug #447970 and bug #922652.
> +gl_cv_func_getcwd_path_max="yes"
> diff --git a/profiles/features/musl/make.defaults
> b/profiles/features/musl/make.defaults
> index 3078bdd61b09c..ca792276e3945 100644
> --- a/profiles/features/musl/make.defaults
> +++ b/profiles/features/musl/make.defaults
> @@ -17,3 +17,10 @@ FEATURES="-multilib-strict"
>  # that use a charset, it causes package collisons.
>  # Note: we use a full path for locale.alias for bug #799437
>  INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
> +
> +# Sam James  (2024-01-22)
> +# Workaround for sandbox bug which causes this gnulib configure test
> to take
> +# many real hours on slower machines, and certainly a huge amount of
> CPU hours
> +# on others. Spoof the same result as configure gets on a modern musl
> system
> +# for now. See bug #447970 and bug #922652.
> +gl_cv_func_getcwd_path_max="no, but it is partly working"

LGTM



[gentoo-dev] [PATCH] profiles: workaround sandbox bug with getcwd() configure test (gl_cv_func_getcwd_path_max)

2024-01-22 Thread Sam James
Workaround for sandbox bug which causes this gnulib configure test to take
many real hours on slower machines, and certainly a huge amount of CPU hours
on others.

Spoof the same result as configure gets on a modern glibc & musl system for now.

Bug: https://bugs.gentoo.org/447970
Closes: https://bugs.gentoo.org/922652
Signed-off-by: Sam James 
---
 profiles/default/linux/make.defaults | 9 -
 profiles/features/musl/make.defaults | 7 +++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/profiles/default/linux/make.defaults 
b/profiles/default/linux/make.defaults
index 74dd59d5d8179..4e21cd58fdf22 100644
--- a/profiles/default/linux/make.defaults
+++ b/profiles/default/linux/make.defaults
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 #
 # System-wide defaults for the Portage system
@@ -54,3 +54,10 @@ LDFLAGS="-Wl,-O1 -Wl,--as-needed"
 # Prevent automagic use of 64-bit time_t.
 # https://bugs.gentoo.org/828001
 enable_year2038="no"
+
+# Sam James  (2024-01-22)
+# Workaround for sandbox bug which causes this gnulib configure test to take
+# many real hours on slower machines, and certainly a huge amount of CPU hours
+# on others. Spoof the same result as configure gets on a modern glibc system
+# for now. See bug #447970 and bug #922652.
+gl_cv_func_getcwd_path_max="yes"
diff --git a/profiles/features/musl/make.defaults 
b/profiles/features/musl/make.defaults
index 3078bdd61b09c..ca792276e3945 100644
--- a/profiles/features/musl/make.defaults
+++ b/profiles/features/musl/make.defaults
@@ -17,3 +17,10 @@ FEATURES="-multilib-strict"
 # that use a charset, it causes package collisons.
 # Note: we use a full path for locale.alias for bug #799437
 INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
+
+# Sam James  (2024-01-22)
+# Workaround for sandbox bug which causes this gnulib configure test to take
+# many real hours on slower machines, and certainly a huge amount of CPU hours
+# on others. Spoof the same result as configure gets on a modern musl system
+# for now. See bug #447970 and bug #922652.
+gl_cv_func_getcwd_path_max="no, but it is partly working"
-- 
2.43.0