Subject: [edge] abuild: could it reset LD_{RUN_PATH,LIBRARY_PATH}?

From: Steffen Nurpmeso <[email-masked]>
Date: Fri, 21 Apr 2023 00:28:50 +0200

Hello.

I mean, strip these from the environment upon startup, so that the
diagnostic

  >>> ERROR: s-postgray*: Has /home/... in rpath
  >>> ERROR: s-postgray*: prepare_package failed
  >>> ERROR: s-postgray: rootpkg failed

would only come into play if the package itself mangles the stuff?

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

---

From: "alice" <[email-masked]>
Date: Fri, 21 Apr 2023 00:43:04 +0200

> would only come into play if the package itself mangles the stuff?

`abuild rootbld` strips the env already (in the recent release).

regular abuild doesn't clear any env vars (iirc).

---

From: Steffen Nurpmeso <[email-masked]>
Date: Fri, 21 Apr 2023 23:14:37 +0200

alice wrote in
 <CS1Y2V6FNWIJ.2KKN61M3TCZ2T@sumire>:
 |On Fri Apr 21, 2023 at 12:28 AM CEST, Steffen Nurpmeso wrote:
 |> Hello.
 |>
 |> I mean, strip these from the environment upon startup, so that the
 |> diagnostic
 |>
 |>>>> ERROR: s-postgray*: Has /home/... in rpath
 |>>>> ERROR: s-postgray*: prepare_package failed
 |>>>> ERROR: s-postgray: rootpkg failed
 |>
 |> would only come into play if the package itself mangles the stuff?
 |
 |`abuild rootbld` strips the env already (in the recent release).
 |
 |regular abuild doesn't clear any env vars (iirc).

Thank you alice, i will use this instead next time.

--steffen
|

---

From: Steffen Nurpmeso <[email-masked]>
Date: Fri, 21 Apr 2023 23:38:29 +0200

Steffen Nurpmeso wrote in
 <[email-masked]>:
 |alice wrote in
 | <CS1Y2V6FNWIJ.2KKN61M3TCZ2T@sumire>:
 ||On Fri Apr 21, 2023 at 12:28 AM CEST, Steffen Nurpmeso wrote:
 ||> I mean, strip these from the environment upon startup, so that the
 ||> diagnostic
 ||>
 ||>>>> ERROR: s-postgray*: Has /home/... in rpath
 ||>>>> ERROR: s-postgray*: prepare_package failed
 ||>>>> ERROR: s-postgray: rootpkg failed
 ||>
 ||> would only come into play if the package itself mangles the stuff?
 ||
 ||`abuild rootbld` strips the env already (in the recent release).
 ||
 ||regular abuild doesn't clear any env vars (iirc).
 |
 |Thank you alice, i will use this instead next time.

Uh!  That is tough!  I better write a little script instead.
(But great it works, i first was afraid i have to be root.)

--steffen
|

---

From: "alice" <[email-masked]>
Date: Sat, 22 Apr 2023 00:18:30 +0200

> (But great it works, i first was afraid i have to be root.)

in my general testing

#!/bin/sh
if [ -z "$_CLEAN" ]; then
   exec env -i \
      _CLEAN=1 \
      HOME="$HOME" \
      PATH="$PATH" \
      USER="$USER" \
      TERM="xterm" \
      ${ENV_YOU_KEEP:+ENV_YOU_KEEP="$ENV_YOU_KEEP"} \
      "$0" "$@"
fi

.... your commands here

is all you need to have a 'clean clean' environment for building most things