File 7041-otp-Get-rid-of-dyn_erl.patch of Package erlang
From 87f4c4fec7b4b0cd3927b6a8219473e5182fd989 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Wed, 21 Jan 2026 10:16:14 +0100
Subject: [PATCH] otp: Get rid of dyn_erl
---
Makefile.in | 2 -
erts/etc/common/Makefile.in | 9 -
erts/etc/unix/cerl.src | 38 +-
erts/etc/unix/dyn_erl.c | 412 ---------------------
erts/etc/unix/erl.src.src | 42 +--
erts/etc/unix/start.src | 42 +--
lib/reltool/doc/guides/reltool_examples.md | 4 +-
lib/reltool/src/reltool_target.erl | 39 +-
lib/sasl/test/systools_SUITE.erl | 2 +-
lib/stdlib/doc/src/peer.md | 2 +-
lib/stdlib/test/peer_SUITE.erl | 25 +-
11 files changed, 92 insertions(+), 525 deletions(-)
delete mode 100644 erts/etc/unix/dyn_erl.c
diff --git a/Makefile.in b/Makefile.in
index dc20f98583..c694932643 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -593,8 +593,6 @@ $(BOOTSTRAP_ROOT)/bootstrap/bin/erl: $(ERL_TOP)/erts/etc/unix/erl.src.src $(BOOT
@sed -e "s;%FINAL_ROOTDIR%;$(BOOTSTRAP_ROOT)/bootstrap;" \
-e "s;\$$ROOTDIR/erts-.*/bin;$(ERL_TOP)/bin/$(TARGET);" \
-e "s;EMU=.*;EMU=beam$(TYPEMARKER);" \
- -e "s;%DYN_ERL_PATH%;../../bin/$(TARGET)/dyn_erl;" \
- -e "s;%DYN_ROOTDIR_BASE_EXT%;/bootstrap;" \
$(ERL_TOP)/erts/etc/unix/erl.src.src > \
$(BOOTSTRAP_ROOT)/bootstrap/bin/erl
@chmod 755 $(BOOTSTRAP_ROOT)/bootstrap/bin/erl
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
index 77685b9f68..07e8d22dea 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
@@ -199,7 +199,6 @@ INSTALL_EMBEDDED_PROGS += \
$(BINDIR)/ct_run@EXEEXT@ \
$(BINDIR)/run_erl@EXEEXT@ \
$(BINDIR)/to_erl@EXEEXT@ \
- $(BINDIR)/dyn_erl@EXEEXT@ \
$(BINDIR)/erl_call@EXEEXT@
INSTALL_EMBEDDED_DATA = $(UXETC)/start.src $(UXETC)/start_erl.src
INSTALL_TOP = Install
@@ -272,7 +271,6 @@ endif
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/run_erl.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/to_erl.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/typer.o
- rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/dyn_erl.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/safe_string.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/run_erl.o
rm -f $(ERL_TOP)/erts/obj*/$(TARGET)/to_erl.o
@@ -458,11 +456,6 @@ $(BINDIR)/to_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/to_erl.o
$(OBJDIR)/to_erl.o: $(ETC)/to_erl.c $(RC_GENERATED)
$(V_CC) $(CFLAGS) -o $@ -c $(ETC)/to_erl.c
-# dyn_erl
-$(BINDIR)/dyn_erl: $(OBJDIR)/safe_string.o $(OBJDIR)/dyn_erl.o
- $(V_LD) $(LDFLAGS) -o $@ $(OBJDIR)/safe_string.o $(OBJDIR)/dyn_erl.o
-$(OBJDIR)/dyn_erl.o: $(UXETC)/dyn_erl.c $(RC_GENERATED)
- $(V_CC) $(CFLAGS) -o $@ -c $(UXETC)/dyn_erl.c
$(OBJDIR)/safe_string.o: $(ETC)/safe_string.c $(RC_GENERATED)
$(V_CC) $(CFLAGS) -o $@ -c $(ETC)/safe_string.c
@@ -520,8 +513,6 @@ erl.src: $(UXETC)/erl.src.src ../../vsn.mk $(TARGET)/Makefile
$(vsn_verbose)sed -e 's;%EMULATOR%;$(EMULATOR);' \
-e 's;%EMULATOR_NUMBER%;$(EMULATOR_NUMBER);' \
-e 's;%VSN%;$(VSN);' \
- -e 's;%DYN_ERL_PATH%;../erts-$(VSN)/bin/dyn_erl;' \
- -e 's;%DYN_ROOTDIR_BASE_EXT%;;' \
$(UXETC)/erl.src.src > erl.src
# ----------------------------------------------------
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 7202a76fdf..0fa8edc1db 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -121,26 +121,28 @@ run_asan=no
run_rr=no
skip_erlexec=no
-prog="$0"
-progdir="`dirname ${prog}`"
-dyn_erl_path="${progdir}/%DYN_ERL_PATH%"
-if [ -f "$dyn_erl_path" ]
-then
- dyn_rootdir=`${dyn_erl_path} --realpath`
- dyn_rootdir=`dirname ${dyn_rootdir}`
- dyn_rootdir=`dirname ${dyn_rootdir}`
-else
- dyn_rootdir=""
-fi
+absolute_parent() {
+ DIR=$(dirname "${1}");
+ (cd "$DIR" && pwd -P || echo "/");
+}
-# Default rootdir
-ROOTDIR=%SRC_ROOTDIR%
+find_rootdir() {
+ CANDIDATE="${1}";
+ while
+ CANDIDATE=$(absolute_parent "$CANDIDATE");
+ [ "$CANDIDATE" != "/" ] && [ ! -d "$CANDIDATE/erts-%VSN%" ];
+ do :; done;
-if [ "$dyn_rootdir" != "$ROOTDIR" ] && [ "$dyn_rootdir" != "" ]
-then
- # It is likely that the files have been copied or moved
- ROOTDIR="$dyn_rootdir"
-fi
+ if [ "$CANDIDATE" != "/" ]
+ then
+ # It is likely that the files have been copied or moved
+ echo "$CANDIDATE";
+ else
+ echo "${2}";
+ fi
+}
+
+ROOTDIR=$(find_rootdir "$0" "%SRC_ROOTDIR%")
BINDIR="$ROOTDIR/bin/`$ROOTDIR/make/autoconf/config.guess`"
TARGET=%TARGET%
diff --git a/erts/etc/unix/dyn_erl.c b/erts/etc/unix/dyn_erl.c
deleted file mode 100644
index 022cce463e..0000000000
--- a/erts/etc/unix/dyn_erl.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * %CopyrightBegin%
- *
- * Copyright Ericsson AB 2009-2021. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * %CopyrightEnd%
- */
-
-/*
- * This is a C version of the erl Bourne shell script
- */
-
-#include "etc_common.h"
-
-#define BOOL int
-#define TRUE 1
-#define FALSE 0
-#define PATHSEP ":"
-#define DIRSEP "/"
-#define DIRSEPCHAR '/'
-
-static void
-error(char* format, ...)
-{
- char sbuf[1024];
- va_list ap;
-
- va_start(ap, format);
- vsprintf(sbuf, format, ap);
- va_end(ap);
- fprintf(stderr, "erl: %s\n", sbuf);
- exit(1);
-}
-
-/*
- * Variables.
- */
-
-/*
- * Manage memory
- */
-
-static void *
-emalloc(size_t size)
-{
- void *p = malloc(size);
- if (p == NULL)
- error("Insufficient memory");
- return p;
-}
-
-/*
-static void *
-erealloc(void *p, size_t size)
-{
- void *res = realloc(p, size);
- if (res == NULL)
- error("Insufficient memory");
- return res;
-}
-*/
-
-static void
-efree(void *p)
-{
- free(p);
-}
-
-static char*
-strsave(char* string)
-{
- char* p = emalloc(strlen(string)+1);
- strcpy(p, string);
- return p;
-}
-
-/*
- * Manage environment variables
- */
-
-static char *
-get_env(char *key)
-{
- return getenv(key);
-}
-
-static void
-set_env(char *key, char *value)
-{
- size_t size = strlen(key) + 1 + strlen(value) + 1;
- char *str = emalloc(size);
- sprintf(str, "%s=%s", key, value);
- if (putenv(str) != 0)
- error("putenv(\"%s\") failed!", str);
-#ifdef HAVE_COPYING_PUTENV
- efree(str);
-#endif
-}
-
-// /* A realpath look alike */
-// static char *
-// follow_symlinks(const char *path, char *resolved_path)
-// {
-// char tmp[PATH_MAX];
-// int len;
-//
-// strcpy(resolved_path, path);
-//
-// for (;;) {
-// len = readlink(resolved_path, tmp, PATH_MAX);
-//
-// if (len == -1) {
-// if (errno == EINVAL) {
-// /* Not a symbolic link. use the original name */
-// break;
-// } else {
-// return NULL;
-// }
-// } else {
-// tmp[len] = '\0';
-// strcpy(resolved_path, tmp);
-// }
-// }
-//
-// return resolved_path;
-// }
-
-/*
- * Find absolute path to this program
- */
-
-static char *
-find_prog(char *origpath)
-{
- char relpath[PATH_MAX];
- char abspath[PATH_MAX];
-
- strcpy(relpath, origpath);
-
- if (strstr(relpath, DIRSEP) == NULL) {
- /* Just a base name */
- char *envpath;
-
- envpath = get_env("PATH");
- if (envpath) {
- /* Try to find the executable in the path */
- char dir[PATH_MAX];
- char *beg = envpath;
- char *end;
- int sz;
- DIR *dp; /* Pointer to directory structure. */
- struct dirent* dirp; /* Pointer to directory entry. */
- BOOL look_for_sep = TRUE;
-
- while (look_for_sep) {
- end = strstr(beg, PATHSEP);
- if (end != NULL) {
- sz = end - beg;
- strncpy(dir, beg, sz);
- dir[sz] = '\0';
- } else {
- sz = strlen(beg);
- strcpy(dir, beg);
- look_for_sep = FALSE;
- }
- beg = end + 1;
-
- dp = opendir(dir);
- if (dp != NULL) {
- while (TRUE) {
- dirp = readdir(dp);
- if (dirp == NULL) {
- closedir(dp);
- /* Try next directory in path */
- break;
- }
-
- if (strcmp(origpath, dirp->d_name) == 0) {
- /* Wow. We found the executable. */
- strcpy(relpath, dir);
- strcat(relpath, DIRSEP);
- strcat(relpath, dirp->d_name);
- closedir(dp);
- look_for_sep = FALSE;
- break;
- }
- }
- }
- }
- }
- }
-
- if (!realpath(relpath, abspath)) {
- error("Cannot determine real path to erl");
- }
-
- return strdup(abspath);
-}
-
-/*
- * Find bindir
- */
-
-static void
-copy_latest_vsn(char *latest_vsn, char *next_vsn)
-{
- char *lp;
- char *np;
- BOOL greater;
-
- if (latest_vsn[0] == '\0') {
- strcpy(latest_vsn, next_vsn);
- return;
- }
-
- /* Find vsn */
- for (lp = latest_vsn+strlen(latest_vsn)-1 ;lp > latest_vsn && *lp != DIRSEPCHAR; --lp)
- ;
-
- /* lp =+ length("erts-"); */
- for (np = next_vsn+strlen(next_vsn)-1 ;np > next_vsn && *np != DIRSEPCHAR; --np)
- ;
-
- /* np =+ length("erts-"); */
- while (TRUE) {
- if (*lp != *np || *lp == '\0') {
- if (*np > *lp) {
- greater = TRUE;
- } else {
- greater = FALSE;
- }
-
- /* Find next dot or eos */
- while (*lp != '\0' && *np != '\0') {
- lp++;
- np++;
- if (*np == '.' && *lp == '.') {
- break;
- }
- if (*np == '\0' && *lp == '\0') {
- break;
- }
- if (*lp == '.' || *lp == '\0') {
- greater = TRUE;
- }
- if (*np == '.' || *np == '\0') {
- greater = FALSE;
- }
- }
- if (greater) {
- strcpy(latest_vsn, next_vsn);
- }
- return;
- }
- ++lp;
- ++np;
- }
-}
-
-static char *
-find_erts_vsn(char *erl_top)
-{
- /* List install dir and look for latest erts-vsn */
- DIR *dp; /* Pointer to directory structure. */
- struct dirent* dirp; /* Pointer to directory entry. */
- char latest_vsn[PATH_MAX]; /* Latest erts-vsn directory name. */
-
- dp = opendir(erl_top);
- if (dp == NULL) {
- return NULL;
- }
-
- latest_vsn[0] = '\0';
- for (;;) {
- dirp = readdir(dp);
- if (dirp == NULL) {
- closedir(dp);
- break;
- }
- if (strncmp("erts-", dirp->d_name, 5) == 0) {
- copy_latest_vsn(latest_vsn, dirp->d_name);
- }
- }
-
- if (latest_vsn[0] == '\0') {
- return NULL;
- } else {
- char *p = malloc((strlen(erl_top)+1+strlen(latest_vsn)+4+1)*sizeof(char));
- strcpy(p,erl_top);
- strcat(p,DIRSEP);
- strcat(p,latest_vsn);
- strcat(p,DIRSEP);
- strcat(p,"bin");
- return p;
- }
-}
-
-static char *
-find_bindir(char *erlpath)
-{
- /* Assume that the path to erl is absolute and
- * that it is not a symbolic link*/
-
- char *p;
- char *p2;
- char buffer[PATH_MAX];
-
- strcpy(buffer, erlpath);
-
- /* Chop of base name*/
- for (p = buffer+strlen(buffer)-1 ;p >= buffer && *p != DIRSEPCHAR; --p)
- ;
- *p = '\0';
- p--;
-
- /* Check if dir path is like ...\buffer\erts-vsn\bin */
- for (;p >= buffer && *p != DIRSEPCHAR; --p)
- ;
- p--;
- for (p2 = p;p2 >= buffer && *p2 != DIRSEPCHAR; --p2)
- ;
- p2++;
- if (strncmp(p2, "erts-", 5) == 0) {
- p = strsave(buffer);
- return p;
- }
-
- /* Assume that dir path is like ...\buffer\bin */
- *++p ='\0'; /* chop off bin dir */
-
- p = find_erts_vsn(buffer);
- if (p == NULL) {
- return strsave(buffer);
- } else {
- return p;
- }
-}
-
-/*
- * main
- */
-
-int
-main(int argc, char **argv)
-{
- char *p;
- char *abspath;
- char *bindir; /* Location of executables. */
- char rootdir[PATH_MAX]; /* Root location of Erlang installation. */
- char progname[PATH_MAX]; /* Name of this program. */
- char erlexec[PATH_MAX]; /* Path to erlexec */
-
- if (argc == 2 && strcmp(argv[1], "--realpath") == 0) {
- abspath = find_prog(argv[0]);
- /* Remove program name from output */
- for (p = abspath+strlen(abspath)-1;p >= abspath && *p != '/'; --p)
- ;
- *p = '\0';
- printf("%s", abspath);
- efree(abspath);
- return 0;
- }
- /* Determine progname */
- abspath = find_prog(argv[0]);
- strcpy(progname, abspath);
- for (p = progname+strlen(progname)-1;p >= progname && *p != '/'; --p)
- ;
-
- /* Determine bindir */
- bindir = find_bindir(abspath);
-
- /* Determine rootdir */
- strcpy(rootdir, bindir);
- for (p = rootdir+strlen(rootdir)-1;p >= rootdir && *p != '/'; --p)
- ;
- p--;
- for (;p >= rootdir && *p != '/'; --p)
- ;
- *p ='\0';
-
- /* Update environment */
- set_env("EMU", "beam");
- set_env("PROGNAME", progname);
- set_env("BINDIR", bindir);
- set_env("ROOTDIR", rootdir);
-
- /* Invoke erlexec */
- strcpy(erlexec, bindir);
- strcat(erlexec, DIRSEP);
- strcat(erlexec, "erlexec");
-
- efree(abspath);
- efree(bindir);
-
- execvp(erlexec, argv);
- error("Error %d executing \'%s\'.", errno, erlexec);
- return 2;
-}
diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src
index 83079bc771..6167b167b2 100644
--- a/erts/etc/unix/erl.src.src
+++ b/erts/etc/unix/erl.src.src
@@ -20,35 +20,35 @@
#
# %CopyrightEnd%
#
-prog="$0"
-progdir=`dirname "${prog}"`
-dyn_erl_path="${progdir}/%DYN_ERL_PATH%"
-if [ ! -f "$dyn_erl_path" ]
-then
- dyn_erl_path="${progdir}/dyn_erl"
-fi
-if [ -f "$dyn_erl_path" ]
-then
- dyn_rootdir=`"${dyn_erl_path}" --realpath`
- dyn_rootdir=`dirname "${dyn_rootdir}"`
- dyn_rootdir=`dirname "${dyn_rootdir}"`
- dyn_rootdir="${dyn_rootdir}%DYN_ROOTDIR_BASE_EXT%"
-else
- dyn_rootdir=""
-fi
+absolute_parent() {
+ DIR=$(dirname "${1}");
+ (cd "$DIR" && pwd -P || echo "/");
+}
-if [ -z "$ERL_ROOTDIR" ]
-then
- ROOTDIR="%FINAL_ROOTDIR%"
- if [ "$dyn_rootdir" != "$ROOTDIR" ] && [ "$dyn_rootdir" != "" ]
+find_rootdir() {
+ CANDIDATE="${1}";
+ while
+ CANDIDATE=$(absolute_parent "$CANDIDATE");
+ [ "$CANDIDATE" != "/" ] && [ ! -d "$CANDIDATE/erts-%VSN%" ];
+ do :; done;
+
+ if [ "$CANDIDATE" != "/" ]
then
# It is likely that the files have been copied or moved
- ROOTDIR="$dyn_rootdir"
+ echo "$CANDIDATE";
+ else
+ echo "${2}";
fi
+}
+
+if [ -z "$ERL_ROOTDIR" ]
+then
+ ROOTDIR=$(find_rootdir "$0" "%FINAL_ROOTDIR%")
else
ROOTDIR="$ERL_ROOTDIR"
fi
+
BINDIR="$ROOTDIR/erts-%VSN%/bin"
EMU=%EMULATOR%%EMULATOR_NUMBER%
PROGNAME=`basename "$0"`
diff --git a/erts/etc/unix/start.src b/erts/etc/unix/start.src
index 050b1c2f2c..83059e860f 100644
--- a/erts/etc/unix/start.src
+++ b/erts/etc/unix/start.src
@@ -27,22 +27,27 @@
#
# Usage: start [Data]
#
-prog="$0"
-progdir="`dirname ${prog}`"
-dyn_erl_path="${progdir}/../erts-%VSN%/bin/dyn_erl"
-if [ ! -f "$dyn_erl_path" ]
-then
- dyn_erl_path="${progdir}/dyn_erl"
-fi
-if [ -f "$dyn_erl_path" ]
-then
- dyn_rootdir=`${dyn_erl_path} --realpath`
- dyn_rootdir=`dirname ${dyn_rootdir}`
- dyn_rootdir=`dirname ${dyn_rootdir}`
-else
- dyn_rootdir=""
-fi
+absolute_parent() {
+ DIR=$(dirname "${1}");
+ (cd "$DIR" && pwd -P || echo "/");
+}
+
+find_rootdir() {
+ CANDIDATE="${1}";
+ while
+ CANDIDATE=$(absolute_parent "$CANDIDATE");
+ [ "$CANDIDATE" != "/" ] && [ ! -d "$CANDIDATE/erts-%VSN%" ];
+ do :; done;
+
+ if [ "$CANDIDATE" != "/" ]
+ then
+ # It is likely that the files have been copied or moved
+ echo "$CANDIDATE";
+ else
+ echo "${2}";
+ fi
+}
if touch /var/log 2>/dev/null;
then
@@ -59,12 +64,7 @@ fi
if [ -z "$ERL_ROOTDIR" ]
then
- ROOTDIR="%FINAL_ROOTDIR%"
- if [ "$dyn_rootdir" != "$ROOTDIR" ] && [ "$dyn_rootdir" != "" ]
- then
- # It is likely that the files have been copied or moved
- ROOTDIR="$dyn_rootdir"
- fi
+ ROOTDIR=$(find_rootdir "$0" "%FINAL_ROOTDIR%")
else
ROOTDIR="$ERL_ROOTDIR"
fi
diff --git a/lib/reltool/doc/src/reltool_examples.xml b/lib/reltool/doc/src/reltool_examples.xml
index 0a0834be4e..dd3bc967ad 100644
--- a/lib/reltool/doc/src/reltool_examples.xml
+++ b/lib/reltool/doc/src/reltool_examples.xml
@@ -409,7 +409,7 @@ Eshell V10.0 (abort with ^G)
{copy_file,"ct_run","erts-10.0/bin/ct_run"},
{copy_file,"dialyzer","erts-10.0/bin/dialyzer"},
{copy_file,"run_erl","erts-10.0/bin/run_erl"},
- {copy_file,"erl","erts-10.0/bin/dyn_erl"},
+ {copy_file,"erl","erts-10.0/bin/erl"},
{copy_file,"to_erl","erts-10.0/bin/to_erl"},
{copy_file,"epmd","erts-10.0/bin/epmd"},
{copy_file,"erlc","erts-10.0/bin/erlc"},
@@ -450,7 +450,7 @@ Eshell V10.0 (abort with ^G)
{copy_file,"dialyzer"},
{copy_file,"beam.smp"},
{copy_file,"run_erl"},
- {copy_file,"erl","erts-10.0/bin/dyn_erl"},
+ {copy_file,"erl"},
{copy_file,"to_erl"},
{copy_file,"epmd"},
{copy_file,"erl_child_setup"},
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl
index baeae88052..f99e1042c7 100644
--- a/lib/reltool/src/reltool_target.erl
+++ b/lib/reltool/src/reltool_target.erl
@@ -870,8 +870,8 @@ strip_sys_files(Relocatable, SysFiles, Apps, ExclRegexps) ->
reltool_utils:throw_error("This system is not installed. "
"The directory ~ts is missing.",
[Erts#app.label]);
- _ when File =:= Erts#app.label ->
- replace_dyn_erl(Relocatable, Spec);
+ _ when File =:= Erts#app.label ->
+ true;
"erts-" ++ _ ->
false;
_ ->
@@ -884,41 +884,6 @@ strip_sys_files(Relocatable, SysFiles, Apps, ExclRegexps) ->
["releases", "lib", "bin"]),
{ExclRegexps2, SysFiles3}.
-replace_dyn_erl(false, _ErtsSpec) ->
- true;
-replace_dyn_erl(true, {create_dir, ErtsDir, ErtsFiles}) ->
- [{create_dir, _, BinFiles}] =
- safe_lookup_spec("bin", ErtsFiles),
- case lookup_spec("dyn_erl", BinFiles) of
- [] ->
- case lookup_spec("erl.ini", BinFiles) of
- [] ->
- true;
- [{copy_file, ErlIni}] ->
- %% Remove Windows .ini file
- BinFiles2 = lists:keydelete(ErlIni, 2, BinFiles),
- ErtsFiles2 =
- lists:keyreplace("bin",
- 2,
- ErtsFiles,
- {create_dir, "bin", BinFiles2}),
- {true, {create_dir, ErtsDir, ErtsFiles2}}
- end;
- [{copy_file, DynErlExe}] ->
- %% Replace erl with dyn_erl
- ErlExe = "erl" ++ filename:extension(DynErlExe),
- BinFiles2 = lists:keydelete(DynErlExe, 2, BinFiles),
- DynErlExe2 = filename:join([ErtsDir, "bin", DynErlExe]),
- BinFiles3 = lists:keyreplace(ErlExe,
- 2,
- BinFiles2,
- {copy_file, ErlExe, DynErlExe2}),
- ErtsFiles2 = lists:keyreplace("bin",
- 2,
- ErtsFiles,
- {create_dir, "bin", BinFiles3}),
- {true, {create_dir, ErtsDir, ErtsFiles2}}
- end.
spec_bin_files(Sys, AllSysFiles, StrippedSysFiles, RelFiles, InclRegexps) ->
[{create_dir, ErtsLabel, ErtsFiles}] =
diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl
index 156a4b27b5..19c7833269 100644
--- a/lib/sasl/test/systools_SUITE.erl
+++ b/lib/sasl/test/systools_SUITE.erl
@@ -1116,7 +1116,7 @@ erts_tar(Config) ->
{Default, Ignored} =
case os:type() of
{unix,_} ->
- {["beam.smp","dyn_erl","epmd","erl","erl_call","erl_child_setup",
+ {["beam.smp","epmd","erl","erl_call","erl_child_setup",
"erlexec","erl.src","escript","heart","inet_gethost","run_erl",
"start","start_erl.src","start.src","to_erl"],
["ct_run","dialyzer","erlc","typer","yielding_c_fun"]};
diff --git a/lib/stdlib/doc/src/peer.xml b/lib/stdlib/doc/src/peer.xml
index 69d8872486..eabb9de5b5 100644
--- a/lib/stdlib/doc/src/peer.xml
+++ b/lib/stdlib/doc/src/peer.xml
@@ -236,7 +236,7 @@ build_image(Dir) ->
"COPY lambda.tar.gz /tmp\n"
"RUN tar -zxvf /tmp/lambda.tar.gz -C /opt/lambda\n"
"ENTRYPOINT [\"/opt/lambda/erts-" ++ erlang:system_info(version) ++
- "/bin/dyn_erl\", \"-boot\", \"/opt/lambda/releases/1.0.0/start\","
+ "/bin/erl\", \"-boot\", \"/opt/lambda/releases/1.0.0/start\","
" \"-kernel\", \"inet_dist_listen_min\", \"4445\","
" \"-erl_epmd_port\", \"4445\","
" \"-setcookie\", \"secret\"]\n",
diff --git a/lib/stdlib/test/peer_SUITE.erl b/lib/stdlib/test/peer_SUITE.erl
index bbb2bf2b61..0c3a021dcd 100644
--- a/lib/stdlib/test/peer_SUITE.erl
+++ b/lib/stdlib/test/peer_SUITE.erl
@@ -1,3 +1,26 @@
+%%
+%% %CopyrightBegin%
+%%
+%% SPDX-License-Identifier: Apache-2.0
+%%
+%% Copyright WhatsApp Inc. and its affiliates. All rights reserved.
+%% Copyright Ericsson AB 2022-2026. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+
%%% @doc
%%% Smoke tests for peer node controller
%%% @end
@@ -599,7 +622,7 @@ build_image(Dir) ->
"WORKDIR /opt/lambda\n"
"COPY lambda.tar.gz /tmp\n"
"RUN tar -zxvf /tmp/lambda.tar.gz -C /opt/lambda\n"
- "ENTRYPOINT [\"/opt/lambda/erts-" ++ erlang:system_info(version) ++ "/bin/dyn_erl\", \"-boot\", \"/opt/lambda/releases/1.0.0/start\"]\n",
+ "ENTRYPOINT [\"/opt/lambda/erts-" ++ erlang:system_info(version) ++ "/bin/erl\", \"-boot\", \"/opt/lambda/releases/1.0.0/start\"]\n",
ok = file:write_file(BuildScript, Dockerfile),
Output = os:cmd("docker build -t lambda " ++ Dir),
ct:log("Build result: ~s~n", [Output]).
--
2.51.0