File 0194-erts-escript-and-tools-should-not-read-boot-files-in.patch of Package erlang

From 77f5635cb893d6a7d0b83358df4305cc642849c0 Mon Sep 17 00:00:00 2001
From: Fredrik Frantzen <frazze@erlang.org>
Date: Fri, 7 Nov 2025 09:07:57 +0100
Subject: [PATCH 4/4] erts: escript and tools should not read boot files in CWD

---
 erts/etc/common/dialyzer.c | 2 +-
 erts/etc/common/erlc.c     | 2 +-
 erts/etc/common/escript.c  | 2 +-
 erts/etc/common/typer.c    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/erts/etc/common/dialyzer.c b/erts/etc/common/dialyzer.c
index e356167b40..f01e73f05d 100644
--- a/erts/etc/common/dialyzer.c
+++ b/erts/etc/common/dialyzer.c
@@ -252,7 +252,7 @@ int main(int argc, char** argv)
     }
 
     PUSH("+B");
-    PUSH2("-boot", "no_dot_erlang");
+    PUSH2("-boot", "$ROOT/no_dot_erlang");
     PUSH3("-run", "dialyzer", "plain_cl");
     PUSH("-extra");
 
diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c
index b89afed79a..5cc7f7a2e5 100644
--- a/erts/etc/common/erlc.c
+++ b/erts/etc/common/erlc.c
@@ -962,7 +962,7 @@ start_compile_server(char* node_name, char** argv)
             eargv[eargc++] = *argv++;
         }
     }
-    PUSH2("-boot", "no_dot_erlang");
+    PUSH2("-boot", "$ROOT/no_dot_erlang");
     PUSH2("-sname", node_name);
     PUSH2("-setcookie", "erlc_compile_server_cookie");
     PUSH("-hidden");
diff --git a/erts/etc/common/escript.c b/erts/etc/common/escript.c
index 9d84cb9b8f..3b69619a72 100644
--- a/erts/etc/common/escript.c
+++ b/erts/etc/common/escript.c
@@ -513,7 +513,7 @@ main(int argc, char** argv)
 
     PUSH("+B");
     PUSH("-noshell");
-    PUSH2("-boot", "no_dot_erlang");
+    PUSH2("-boot", "$ROOT/no_dot_erlang");
 
     /*
      * Read options from the %%! row in the script and add them as args
diff --git a/erts/etc/common/typer.c b/erts/etc/common/typer.c
index e05f1cb19e..250222d4c9 100644
--- a/erts/etc/common/typer.c
+++ b/erts/etc/common/typer.c
@@ -179,7 +179,7 @@ main(int argc, char** argv)
     }
 
     PUSH("+B");
-    PUSH2("-boot", "no_dot_erlang");
+    PUSH2("-boot", "$ROOT/no_dot_erlang");
     PUSH3("-run", "typer", "start");
     PUSH("-extra");
 
-- 
2.51.0

openSUSE Build Service is sponsored by