Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ae9a6af88 | ||
|
|
872f576cd4 |
22 changed files with 3014 additions and 2858 deletions
36
.gitignore
vendored
36
.gitignore
vendored
|
|
@ -1,7 +1,29 @@
|
|||
/*.src.rpm
|
||||
/*~
|
||||
/otp-OTP-*.tar.gz
|
||||
/otp_doc_html_R*.tar.gz
|
||||
/otp_doc_man_R*.tar.gz
|
||||
/otp_src_R*.readme
|
||||
/otp_src_R*.tar.gz
|
||||
otp_src_R14A.tar.gz
|
||||
/otp_src_R14B.tar.gz
|
||||
/otp_doc_html_R14B.tar.gz
|
||||
/otp_doc_man_R14B.tar.gz
|
||||
/otp_doc_html_R14B01.tar.gz
|
||||
/otp_doc_man_R14B01.tar.gz
|
||||
/otp_src_R14B01.tar.gz
|
||||
/otp_doc_html_R14B02.tar.gz
|
||||
/otp_doc_man_R14B02.tar.gz
|
||||
/otp_src_R14B02.tar.gz
|
||||
/otp_src_R14B03.tar.gz
|
||||
/otp_doc_html_R14B03.tar.gz
|
||||
/otp_doc_man_R14B03.tar.gz
|
||||
/otp_src_R14B04.tar.gz
|
||||
/otp_doc_html_R14B04.tar.gz
|
||||
/otp_doc_man_R14B04.tar.gz
|
||||
/otp_doc_html_R15B.tar.gz
|
||||
/otp_doc_man_R15B.tar.gz
|
||||
/otp_src_R15B.tar.gz
|
||||
/otp_doc_html_R15B01.tar.gz
|
||||
/otp_doc_man_R15B01.tar.gz
|
||||
/otp_src_R15B01.tar.gz
|
||||
/otp_doc_html_R15B02.tar.gz
|
||||
/otp_doc_man_R15B02.tar.gz
|
||||
/otp_src_R15B02.tar.gz
|
||||
/otp_doc_html_R15B03-1.tar.gz
|
||||
/otp_doc_man_R15B03-1.tar.gz
|
||||
/otp_src_R15B03-1.readme
|
||||
/otp_src_R15B03-1.tar.gz
|
||||
|
|
|
|||
25
epmd.service
25
epmd.service
|
|
@ -1,25 +0,0 @@
|
|||
[Unit]
|
||||
Description=Erlang Port Mapper Daemon
|
||||
After=network.target
|
||||
Requires=epmd.socket
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/epmd -systemd
|
||||
#ExecStop=/usr/bin/epmd -kill
|
||||
Type=notify
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
DeviceAllow=/dev/null rw
|
||||
PrivateTmp=true
|
||||
#CapabilityBoundingSet=
|
||||
NoNewPrivileges=true
|
||||
Restart=always
|
||||
LimitNPROC=1
|
||||
LimitFSIZE=0
|
||||
User=epmd
|
||||
Group=epmd
|
||||
|
||||
[Install]
|
||||
Also=epmd.socket
|
||||
WantedBy=multi-user.target
|
||||
|
||||
10
epmd.socket
10
epmd.socket
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=Erlang Port Mapper Daemon Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=4369
|
||||
Accept=false
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
[Unit]
|
||||
Description=Erlang Port Mapper Daemon
|
||||
After=network.target
|
||||
Requires=epmd@.socket
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/epmd -systemd
|
||||
#ExecStop=/usr/bin/epmd -kill
|
||||
Type=notify
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
DeviceAllow=/dev/null rw
|
||||
PrivateTmp=true
|
||||
#CapabilityBoundingSet=
|
||||
NoNewPrivileges=true
|
||||
Restart=always
|
||||
LimitNPROC=1
|
||||
LimitFSIZE=0
|
||||
User=epmd
|
||||
Group=epmd
|
||||
|
||||
[Install]
|
||||
Also=epmd@.socket
|
||||
WantedBy=multi-user.target
|
||||
|
||||
10
epmd@.socket
10
epmd@.socket
|
|
@ -1,10 +0,0 @@
|
|||
[Unit]
|
||||
Description=Erlang Port Mapper Daemon Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=%I
|
||||
Accept=false
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
|
||||
3494
erlang.spec
3494
erlang.spec
File diff suppressed because it is too large
Load diff
|
|
@ -4,12 +4,16 @@ Subject: [PATCH] Do not format man-pages and do not install miscellaneous
|
|||
utilities for dealing with man-pages.
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
erts/etc/common/Makefile.in | 4 ----
|
||||
erts/etc/unix/Install.src | 10 ----------
|
||||
2 files changed, 14 deletions(-)
|
||||
|
||||
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
|
||||
index 42af9c87dc..c017e0a4ed 100644
|
||||
index 83fe97d..f77b485 100644
|
||||
--- a/erts/etc/common/Makefile.in
|
||||
+++ b/erts/etc/common/Makefile.in
|
||||
@@ -552,10 +552,6 @@ endif
|
||||
@@ -568,10 +568,6 @@ endif
|
||||
ifneq ($(INSTALL_TOP_BIN),)
|
||||
$(INSTALL_PROGRAM) $(INSTALL_TOP_BIN) "$(RELEASE_PATH)"
|
||||
endif
|
||||
|
|
@ -17,17 +21,17 @@ index 42af9c87dc..c017e0a4ed 100644
|
|||
- $(INSTALL_DIR) "$(RELEASE_PATH)/misc"
|
||||
- $(INSTALL_SCRIPT) $(INSTALL_MISC) "$(RELEASE_PATH)/misc"
|
||||
-endif
|
||||
ifneq ($(INSTALL_SRC),)
|
||||
$(INSTALL_DIR) "$(RELEASE_PATH)/erts-$(VSN)/src"
|
||||
$(INSTALL_DATA) $(INSTALL_SRC) "$(RELEASE_PATH)/erts-$(VSN)/src"
|
||||
ifneq ($(INSTALL_ERL_OSE),)
|
||||
$(INSTALL_DIR) "$(RELEASE_PATH)/build_erl_ose"
|
||||
cd $(OSEETC) && $(TAR) erl_ose_$(SYSTEM_VSN).tar $(INSTALL_ERL_OSE)
|
||||
diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
|
||||
index b00dd09f1a..2147774f50 100644
|
||||
index 2dcd070..0bf82f1 100644
|
||||
--- a/erts/etc/unix/Install.src
|
||||
+++ b/erts/etc/unix/Install.src
|
||||
@@ -143,14 +143,5 @@ cp -p ../releases/%I_SYSTEM_VSN%/start_*.boot .
|
||||
cp -p ../releases/%I_SYSTEM_VSN%/no_dot_erlang.boot .
|
||||
@@ -143,14 +143,4 @@ cp -p ../releases/%I_SYSTEM_VSN%/start_*.boot .
|
||||
cp -p $Name.boot start.boot
|
||||
cp -p ../releases/%I_SYSTEM_VSN%/$Name.script start.script
|
||||
|
||||
-#
|
||||
-# Fixing the man pages
|
||||
-#
|
||||
|
|
@ -37,5 +41,5 @@ index b00dd09f1a..2147774f50 100644
|
|||
- cd "$ERL_ROOT"
|
||||
- ./misc/format_man_pages "$ERL_ROOT"
|
||||
-fi
|
||||
|
||||
-
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -3,17 +3,34 @@ Date: Thu, 25 Feb 2010 16:57:43 +0300
|
|||
Subject: [PATCH] Remove rpath
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
lib/crypto/c_src/Makefile.in | 2 +-
|
||||
lib/crypto/priv/Makefile | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
|
||||
index aedc9e7a13..b27c2aa01b 100644
|
||||
index ffd556c..80e95ef 100644
|
||||
--- a/lib/crypto/c_src/Makefile.in
|
||||
+++ b/lib/crypto/c_src/Makefile.in
|
||||
@@ -147,7 +147,7 @@ endif
|
||||
endif
|
||||
@@ -84,7 +84,7 @@ endif
|
||||
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
|
||||
|
||||
ifeq ($(DYNAMIC_OR_WIN_CRYPTO_LIB),yes)
|
||||
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
|
||||
-SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@
|
||||
+SSL_DED_LD_RUNTIME_LIBRARY_PATH =
|
||||
CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME)
|
||||
EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
|
||||
else
|
||||
SSL_DED_LD_RUNTIME_LIBRARY_PATH=
|
||||
diff --git a/lib/crypto/priv/Makefile b/lib/crypto/priv/Makefile
|
||||
index 0989f14..0d29444 100644
|
||||
--- a/lib/crypto/priv/Makefile
|
||||
+++ b/lib/crypto/priv/Makefile
|
||||
@@ -60,7 +60,7 @@ OBJS = $(OBJDIR)/crypto.o
|
||||
# ----------------------------------------------------
|
||||
|
||||
$(SO_NIFLIB): $(OBJS)
|
||||
- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \
|
||||
+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \
|
||||
-o $@ $^ -lcrypto
|
||||
|
||||
$(DLL_NIFLIB): $(OBJS)
|
||||
|
|
|
|||
|
|
@ -2,22 +2,26 @@ From: Peter Lemenkov <lemenkov@gmail.com>
|
|||
Date: Fri, 18 Jun 2010 23:41:33 +0400
|
||||
Subject: [PATCH] Do not install C sources
|
||||
|
||||
Don't install *.c and *.o files.
|
||||
|
||||
Excepts ones from the internal erl_interface. These
|
||||
API headers are necessary. See rhbz #818419 for the
|
||||
explanation why they're necessary for the low-level
|
||||
interaction with the Erlang nodes:
|
||||
|
||||
https://bugzilla.redhat.com/818419
|
||||
Don't install *.c and *.o files at all.
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
lib/asn1/c_src/Makefile | 2 --
|
||||
lib/crypto/c_src/Makefile.in | 3 ---
|
||||
lib/erl_interface/src/Makefile.in | 18 ------------------
|
||||
lib/ic/c_src/Makefile.in | 2 --
|
||||
lib/megaco/src/flex/Makefile.in | 2 +-
|
||||
lib/odbc/c_src/Makefile.in | 3 ---
|
||||
lib/os_mon/c_src/Makefile.in | 2 --
|
||||
lib/runtime_tools/c_src/Makefile.in | 2 --
|
||||
lib/tools/c_src/Makefile.in | 2 --
|
||||
9 files changed, 1 insertion(+), 35 deletions(-)
|
||||
|
||||
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
|
||||
index 82a6b6e87a..5f2fe8ba7d 100644
|
||||
index a73d01a..102d4fb 100644
|
||||
--- a/lib/asn1/c_src/Makefile
|
||||
+++ b/lib/asn1/c_src/Makefile
|
||||
@@ -137,8 +137,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
@@ -112,8 +112,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
release_spec: opt
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
|
||||
$(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib"
|
||||
|
|
@ -26,34 +30,75 @@ index 82a6b6e87a..5f2fe8ba7d 100644
|
|||
|
||||
release_docs_spec:
|
||||
|
||||
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
|
||||
index 80e95ef..c644ad2 100644
|
||||
--- a/lib/crypto/c_src/Makefile.in
|
||||
+++ b/lib/crypto/c_src/Makefile.in
|
||||
@@ -133,10 +133,7 @@ docs:
|
||||
include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
|
||||
release_spec: opt
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
|
||||
- $(INSTALL_DATA) $(NIF_MAKEFILE) "$(RELSYSDIR)/priv/obj"
|
||||
- $(INSTALL_PROGRAM) $(OBJS) "$(RELSYSDIR)/priv/obj"
|
||||
$(INSTALL_PROGRAM) $(NIF_LIB) "$(RELSYSDIR)/priv/lib"
|
||||
|
||||
release_docs_spec:
|
||||
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
|
||||
index fa1ea3cd39..b977b6afe5 100644
|
||||
index cb41391..9aeba86 100644
|
||||
--- a/lib/erl_interface/src/Makefile.in
|
||||
+++ b/lib/erl_interface/src/Makefile.in
|
||||
@@ -715,13 +715,11 @@ ifeq (@DYNAMIC_LIB@, yes)
|
||||
endif
|
||||
@@ -846,29 +846,11 @@ release: opt
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/include"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/lib"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/bin"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/auxdir"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/connect"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/decode"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/encode"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/epmd"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/legacy"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/misc"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/prog"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src/registry"
|
||||
$(INSTALL_DATA) $(HEADERS) "$(RELSYSDIR)/include"
|
||||
$(INSTALL_DATA) $(OBJ_TARGETS) "$(RELSYSDIR)/lib"
|
||||
ifneq ($(EXE_TARGETS),)
|
||||
$(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin"
|
||||
$(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src"
|
||||
endif
|
||||
- $(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src"
|
||||
- $(INSTALL_DATA) connect/*.[ch] "$(RELSYSDIR)/src/connect"
|
||||
- $(INSTALL_DATA) decode/*.[ch] "$(RELSYSDIR)/src/decode"
|
||||
- $(INSTALL_DATA) encode/*.[ch] "$(RELSYSDIR)/src/encode"
|
||||
- $(INSTALL_DATA) epmd/*.[ch] "$(RELSYSDIR)/src/epmd"
|
||||
- $(INSTALL_DATA) misc/*.[ch] "$(RELSYSDIR)/src/misc"
|
||||
- $(INSTALL_DATA) global/*.[ch] "$(RELSYSDIR)/src/global"
|
||||
- $(INSTALL_DATA) registry/*.[ch] "$(RELSYSDIR)/src/registry"
|
||||
- $(INSTALL_DATA) legacy/*.[ch] "$(RELSYSDIR)/src/legacy"
|
||||
- $(INSTALL_DATA) prog/*.[ch] "$(RELSYSDIR)/src/prog"
|
||||
+ $(INSTALL_DATA) connect/*.h "$(RELSYSDIR)/src/connect"
|
||||
+ $(INSTALL_DATA) decode/*.h "$(RELSYSDIR)/src/decode"
|
||||
+ $(INSTALL_DATA) encode/*.h "$(RELSYSDIR)/src/encode"
|
||||
+ $(INSTALL_DATA) epmd/*.h "$(RELSYSDIR)/src/epmd"
|
||||
+ $(INSTALL_DATA) misc/*.h "$(RELSYSDIR)/src/misc"
|
||||
|
||||
release_docs:
|
||||
|
||||
diff --git a/lib/ic/c_src/Makefile.in b/lib/ic/c_src/Makefile.in
|
||||
index de46ead..b30ce1e 100644
|
||||
--- a/lib/ic/c_src/Makefile.in
|
||||
+++ b/lib/ic/c_src/Makefile.in
|
||||
@@ -140,10 +140,8 @@ $(OBJDIR)/%.o: %.c
|
||||
include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
|
||||
release_spec: opt
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/include"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
|
||||
- $(INSTALL_DATA) ic.c ic_tmo.c "$(RELSYSDIR)/c_src"
|
||||
$(INSTALL_DATA) $(IDL_FILES) $(H_FILES) "$(RELSYSDIR)/include"
|
||||
$(INSTALL_DATA) $(LIBRARY) "$(RELSYSDIR)/priv/lib"
|
||||
|
||||
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
|
||||
index 3649e2c392..d8c5c68b99 100644
|
||||
index 69c2425..b36ef26 100644
|
||||
--- a/lib/megaco/src/flex/Makefile.in
|
||||
+++ b/lib/megaco/src/flex/Makefile.in
|
||||
@@ -251,7 +251,7 @@ release_spec: opt
|
||||
@@ -279,7 +279,7 @@ release_spec: opt
|
||||
$(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/flex"
|
||||
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
|
||||
ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
|
||||
|
|
@ -63,10 +108,10 @@ index 3649e2c392..d8c5c68b99 100644
|
|||
endif
|
||||
|
||||
diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
|
||||
index d1b26743a6..cf8faae1f5 100644
|
||||
index 026da39..3a568e4 100644
|
||||
--- a/lib/odbc/c_src/Makefile.in
|
||||
+++ b/lib/odbc/c_src/Makefile.in
|
||||
@@ -129,11 +129,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
@@ -128,11 +128,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
|
||||
release_spec: opt
|
||||
ifdef EXE_TARGET
|
||||
|
|
@ -79,15 +124,42 @@ index d1b26743a6..cf8faae1f5 100644
|
|||
endif
|
||||
|
||||
diff --git a/lib/os_mon/c_src/Makefile.in b/lib/os_mon/c_src/Makefile.in
|
||||
index 27b156a2c9..f11ff303b6 100644
|
||||
index 2b16789..1241014 100644
|
||||
--- a/lib/os_mon/c_src/Makefile.in
|
||||
+++ b/lib/os_mon/c_src/Makefile.in
|
||||
@@ -126,8 +126,6 @@ $(OBJDIR)/memsup.o: memsup.h
|
||||
include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
|
||||
@@ -131,8 +131,6 @@ ifeq ($(findstring vxworks_simso,$(TARGET)),vxworks_simso)
|
||||
release_spec:
|
||||
else
|
||||
release_spec: opt
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
|
||||
- $(INSTALL_DATA) $(C_FILES) "$(RELSYSDIR)/src"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv/bin"
|
||||
$(INSTALL_PROGRAM) $(TARGET_FILES) "$(RELSYSDIR)/priv/bin"
|
||||
endif
|
||||
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
|
||||
index 754e6cc..1c367ef 100644
|
||||
--- a/lib/runtime_tools/c_src/Makefile.in
|
||||
+++ b/lib/runtime_tools/c_src/Makefile.in
|
||||
@@ -193,9 +193,7 @@ docs:
|
||||
include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
|
||||
release_spec: opt
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
|
||||
- $(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj"
|
||||
$(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
|
||||
|
||||
release_docs_spec:
|
||||
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
|
||||
index 0382d32..f74eb5a 100644
|
||||
--- a/lib/tools/c_src/Makefile.in
|
||||
+++ b/lib/tools/c_src/Makefile.in
|
||||
@@ -188,8 +188,6 @@ include ../vsn.mk
|
||||
RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)
|
||||
|
||||
release_spec: all
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
|
||||
- $(INSTALL_DATA) $(EMEM_SRCS) $(EMEM_HEADERS) "$(RELSYSDIR)/c_src"
|
||||
ifneq ($(PROGS),)
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/bin"
|
||||
$(INSTALL_PROGRAM) $(PROGS) "$(RELSYSDIR)/bin"
|
||||
|
|
|
|||
|
|
@ -3,17 +3,34 @@ Date: Sat, 19 Jun 2010 09:25:18 +0400
|
|||
Subject: [PATCH] Do not install Java sources
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
lib/ic/java_src/com/ericsson/otp/ic/Makefile | 2 --
|
||||
lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile | 2 --
|
||||
2 files changed, 4 deletions(-)
|
||||
|
||||
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
|
||||
index 089cf4ab1a..404654a437 100644
|
||||
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
|
||||
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
|
||||
@@ -123,8 +123,6 @@ release release_docs release_tests release_html:
|
||||
$(V_at)$(MAKE) $(MFLAGS) RELEASE_PATH="$(RELEASE_PATH)" $(TARGET_MAKEFILE) $@_spec
|
||||
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Makefile b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
|
||||
index cf4c353..57f64d9 100644
|
||||
--- a/lib/ic/java_src/com/ericsson/otp/ic/Makefile
|
||||
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
|
||||
@@ -109,8 +109,6 @@ docs:
|
||||
include $(ERL_TOP)/make/otp_release_targets.mk
|
||||
|
||||
release_spec: opt
|
||||
- $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
|
||||
- $(V_at)$(INSTALL_DATA) $(JAVA_SRC) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
|
||||
$(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/priv"
|
||||
$(V_at)$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv"
|
||||
$(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/java_src/com/ericsson/otp/ic"
|
||||
- $(INSTALL_DATA) $(JAVA_FILES) "$(RELSYSDIR)/java_src/com/ericsson/otp/ic"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv"
|
||||
$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv"
|
||||
|
||||
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
|
||||
index 8ae63a1..8605a20 100644
|
||||
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
|
||||
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
|
||||
@@ -99,8 +99,6 @@ release release_docs release_tests release_html:
|
||||
$(MAKE) $(MFLAGS) RELEASE_PATH="$(RELEASE_PATH)" $(TARGET_MAKEFILE) $@_spec
|
||||
|
||||
release_spec: opt
|
||||
- $(INSTALL_DIR) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
|
||||
- $(INSTALL_DATA) $(JAVA_SRC) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/priv"
|
||||
$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv"
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@ Subject: [PATCH] Do not install nteventlog and related doc-files on non-win32
|
|||
systems
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
lib/os_mon/doc/src/Makefile | 7 ++++++-
|
||||
lib/os_mon/src/Makefile | 11 ++++++++++-
|
||||
2 files changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/os_mon/doc/src/Makefile b/lib/os_mon/doc/src/Makefile
|
||||
index 8e3882bfdc..ea999cf9c7 100644
|
||||
index 08fd23e..5606cfc 100644
|
||||
--- a/lib/os_mon/doc/src/Makefile
|
||||
+++ b/lib/os_mon/doc/src/Makefile
|
||||
@@ -31,11 +31,16 @@ APPLICATION=os_mon
|
||||
@@ -35,12 +35,17 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
|
||||
# Target Specs
|
||||
# ----------------------------------------------------
|
||||
XML_APPLICATION_FILES = ref_man.xml
|
||||
|
|
@ -21,40 +25,41 @@ index 8e3882bfdc..ea999cf9c7 100644
|
|||
XML_REF3_FILES = cpu_sup.xml \
|
||||
disksup.xml \
|
||||
memsup.xml \
|
||||
os_mon_mib.xml \
|
||||
os_sup.xml \
|
||||
- nteventlog.xml
|
||||
+ $(NTEVENTLOG_DOCFILE)
|
||||
|
||||
XML_REF6_FILES = os_mon_app.xml
|
||||
XML_REF6_FILES = os_mon_app.xml
|
||||
|
||||
diff --git a/lib/os_mon/src/Makefile b/lib/os_mon/src/Makefile
|
||||
index e28fb12548..ee32f3946f 100644
|
||||
index 864d7a0..79a4076 100644
|
||||
--- a/lib/os_mon/src/Makefile
|
||||
+++ b/lib/os_mon/src/Makefile
|
||||
@@ -34,7 +34,13 @@ RELSYSDIR = $(RELEASE_PATH)/lib/os_mon-$(VSN)
|
||||
@@ -33,8 +33,13 @@ RELSYSDIR = $(RELEASE_PATH)/lib/os_mon-$(VSN)
|
||||
# ----------------------------------------------------
|
||||
# Target Specs
|
||||
# ----------------------------------------------------
|
||||
-MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo nteventlog
|
||||
+ifeq ($(findstring win32,$(TARGET)),win32)
|
||||
+NTEVENTLOG=nteventlog
|
||||
+else
|
||||
+NTEVENTLOG=
|
||||
+endif
|
||||
+MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo \
|
||||
MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo \
|
||||
- nteventlog
|
||||
+ $(NTEVENTLOG)
|
||||
|
||||
INCLUDE=../include
|
||||
CSRC=../c_src
|
||||
@@ -78,7 +84,11 @@ docs:
|
||||
@@ -78,7 +83,11 @@ docs:
|
||||
# ----------------------------------------------------
|
||||
|
||||
$(APP_TARGET): $(APP_SRC) ../vsn.mk
|
||||
+ifeq ($(findstring win32,$(TARGET)),win32)
|
||||
$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
|
||||
sed -e 's;%VSN%;$(VSN);' $< > $@
|
||||
+else
|
||||
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);;s;,\s*nteventlog;;' $< > $@
|
||||
+ sed -e 's;%VSN%;$(VSN);;s;,\s*nteventlog;;' $< > $@
|
||||
+endif
|
||||
|
||||
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
|
||||
$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
|
||||
sed -e 's;%VSN%;$(VSN);' $< > $@
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Wed, 2 Aug 2017 16:12:19 +0300
|
||||
Subject: [PATCH] Add extra search directory
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
|
||||
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
|
||||
index 7327636751..2e92e77598 100644
|
||||
--- a/lib/kernel/src/code_server.erl
|
||||
+++ b/lib/kernel/src/code_server.erl
|
||||
@@ -90,11 +90,17 @@ init(Ref, Parent, [Root,Mode]) ->
|
||||
IPath =
|
||||
case Mode of
|
||||
interactive ->
|
||||
- LibDir = filename:append(Root, "lib"),
|
||||
- {ok,Dirs} = erl_prim_loader:list_dir(LibDir),
|
||||
- Paths = make_path(LibDir, Dirs),
|
||||
+ F = fun(R) ->
|
||||
+ LD = filename:append(R, "lib"),
|
||||
+ case erl_prim_loader:list_dir(LD) of
|
||||
+ error -> [];
|
||||
+ {ok, D} -> make_path(LD, D)
|
||||
+ end
|
||||
+ end,
|
||||
+ Paths = F(Root),
|
||||
+ SharedPaths = F("/usr/share/erlang"),
|
||||
UserLibPaths = get_user_lib_dirs(),
|
||||
- ["."] ++ UserLibPaths ++ Paths;
|
||||
+ ["."] ++ UserLibPaths ++ Paths ++ SharedPaths;
|
||||
_ ->
|
||||
[]
|
||||
end,
|
||||
21
otp-0006-Do-not-install-VxWorks-specific-docs.patch
Normal file
21
otp-0006-Do-not-install-VxWorks-specific-docs.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sat, 19 Jun 2010 11:26:04 +0400
|
||||
Subject: [PATCH] Do not install VxWorks-specific docs
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
erts/doc/src/Makefile | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile
|
||||
index da245d7..a494b3a 100644
|
||||
--- a/erts/doc/src/Makefile
|
||||
+++ b/erts/doc/src/Makefile
|
||||
@@ -55,7 +55,6 @@ XML_REF3_EFILES = \
|
||||
XML_REF3_FILES = \
|
||||
driver_entry.xml \
|
||||
erl_nif.xml \
|
||||
- erl_set_memory_block.xml \
|
||||
erl_driver.xml \
|
||||
erl_prim_loader.xml \
|
||||
erlang.xml \
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
From: Jan Pazdziora <jpazdziora@redhat.com>
|
||||
Date: Thu, 10 May 2018 18:35:02 +0200
|
||||
Subject: [PATCH] Avoid forking sed to get basename.
|
||||
|
||||
|
||||
diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src
|
||||
index 536fa139d9..4dcffbc4c8 100644
|
||||
--- a/erts/etc/unix/erl.src.src
|
||||
+++ b/erts/etc/unix/erl.src.src
|
||||
@@ -49,7 +49,7 @@ else
|
||||
fi
|
||||
BINDIR="$ROOTDIR/erts-%VSN%/bin"
|
||||
EMU=%EMULATOR%%EMULATOR_NUMBER%
|
||||
-PROGNAME=`basename "$0"`
|
||||
+PROGNAME=${0##*/}
|
||||
export EMU
|
||||
export ROOTDIR
|
||||
export BINDIR
|
||||
diff --git a/erts/etc/unix/start_erl.src b/erts/etc/unix/start_erl.src
|
||||
index 34e0369710..62e613bba1 100644
|
||||
--- a/erts/etc/unix/start_erl.src
|
||||
+++ b/erts/etc/unix/start_erl.src
|
||||
@@ -37,7 +37,7 @@ VSN=`awk '{print $2}' $DataFile`
|
||||
|
||||
BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin
|
||||
EMU=beam
|
||||
-PROGNAME=`echo $0 | sed 's/.*\///'`
|
||||
+PROGNAME=${0##*/}
|
||||
export EMU
|
||||
export ROOTDIR
|
||||
export BINDIR
|
||||
1125
otp-0007-Do-not-install-erlang-sources.patch
Normal file
1125
otp-0007-Do-not-install-erlang-sources.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,25 +0,0 @@
|
|||
From: Francois-Denis Gonthier <neumann@lostwebsite.net>
|
||||
Date: Thu, 20 Sep 2018 15:01:18 +0300
|
||||
Subject: [PATCH] Load man-pages from system-wide directory
|
||||
|
||||
Patch allows one to use standard man path with erl -man command.
|
||||
(Erlang manual pages are placed to /usr/share/man/ hierarchy
|
||||
as required by Debian policy.)
|
||||
|
||||
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
|
||||
index 888df87e35..14272f06c6 100644
|
||||
--- a/erts/etc/common/erlexec.c
|
||||
+++ b/erts/etc/common/erlexec.c
|
||||
@@ -716,8 +716,10 @@ int main(int argc, char **argv)
|
||||
error("-man not supported on Windows");
|
||||
#else
|
||||
argv[i] = "man";
|
||||
- erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir);
|
||||
- set_env("MANPATH", tmpStr);
|
||||
+ /*
|
||||
+ * Conform to erlang-manpages content.
|
||||
+ */
|
||||
+ putenv(strsave("MANSECT=3erl:1:5:7"));
|
||||
execvp("man", argv+i);
|
||||
error("Could not execute the 'man' command.");
|
||||
#endif
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Sun, 21 Nov 2010 00:17:49 +0300
|
||||
Subject: [PATCH] Ugly workaround for java-1.5.0-gcj which doesn't support
|
||||
UNICODE fully
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Fedora-Spec-Comment: Required only for el5, el6 on PowerPC
|
||||
Fedora-Spec-Before: %if 0%{?el4}%{?el5}%{?el6}
|
||||
Fedora-Spec-Before: %ifnarch %{ix86} x86_64
|
||||
Fedora-Spec-After: %endif
|
||||
Fedora-Spec-After: %endif
|
||||
---
|
||||
.../java_src/com/ericsson/otp/erlang/OtpErlangList.java | 14 +-------------
|
||||
.../java_src/com/ericsson/otp/erlang/OtpInputStream.java | 13 ++-----------
|
||||
2 files changed, 3 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
|
||||
index 3456fd7..86cd411 100644
|
||||
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
|
||||
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
|
||||
@@ -389,19 +389,7 @@ public class OtpErlangList extends OtpErlangObject implements
|
||||
*/
|
||||
|
||||
public String stringValue() throws OtpErlangException {
|
||||
- if (! isProper()) {
|
||||
- throw new OtpErlangException("Non-proper list: " + this);
|
||||
- }
|
||||
- final int[] values = new int[arity()];
|
||||
- for (int i = 0; i < values.length; ++i) {
|
||||
- final OtpErlangObject o = elementAt(i);
|
||||
- if (! (o instanceof OtpErlangLong)) {
|
||||
- throw new OtpErlangException("Non-integer term: " + o);
|
||||
- }
|
||||
- final OtpErlangLong l = (OtpErlangLong) o;
|
||||
- values[i] = l.intValue();
|
||||
- }
|
||||
- return new String(values, 0, values.length);
|
||||
+ throw new OtpErlangException("No UNICODE support in java-1.5.0-gcj");
|
||||
}
|
||||
|
||||
|
||||
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
|
||||
index b9b4348..c11702c 100644
|
||||
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
|
||||
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
|
||||
@@ -1074,17 +1074,8 @@ public class OtpInputStream extends ByteArrayInputStream {
|
||||
case OtpExternal.nilTag:
|
||||
return "";
|
||||
case OtpExternal.listTag: // List when unicode +
|
||||
- len = read4BE();
|
||||
- intbuf = new int[len];
|
||||
- for (int i = 0; i < len; i++) {
|
||||
- intbuf[i] = read_int();
|
||||
- if (! OtpErlangString.isValidCodePoint(intbuf[i])) {
|
||||
- throw new OtpErlangDecodeException
|
||||
- ("Invalid CodePoint: " + intbuf[i]);
|
||||
- }
|
||||
- }
|
||||
- read_nil();
|
||||
- return new String(intbuf, 0, intbuf.length);
|
||||
+ throw new OtpErlangDecodeException(
|
||||
+ "No UNICODE support in java-1.5.0-gcj");
|
||||
default:
|
||||
throw new OtpErlangDecodeException(
|
||||
"Wrong tag encountered, expected " + OtpExternal.stringTag
|
||||
|
|
@ -1,464 +0,0 @@
|
|||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Thu, 19 Jun 2025 13:17:52 +0200
|
||||
Subject: [PATCH] Add GDB tools
|
||||
|
||||
* https://github.com/erlang/otp-gdb-tools
|
||||
* Commit 7b864f58c534699e4124e31ecfda86041b941037.
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
|
||||
diff --git a/erts/etc/unix/gdb-tools/README.md b/erts/etc/unix/gdb-tools/README.md
|
||||
new file mode 100644
|
||||
index 0000000000..8a6cf92b1d
|
||||
--- /dev/null
|
||||
+++ b/erts/etc/unix/gdb-tools/README.md
|
||||
@@ -0,0 +1,42 @@
|
||||
+# Erlang/OTP GDB Tools
|
||||
+
|
||||
+This repository contains GDB tools that cannot
|
||||
+be part of the main Erlang/OTP repository for licensing
|
||||
+reasons. The tools are used when building and debugging
|
||||
+Erlang/OTP with gdb and are installed as needed by the
|
||||
+Erlang/OTP build system.
|
||||
+
|
||||
+Right now the only tool in this repository is the jit-reader
|
||||
+which is a plugin to gdb that allows it to read the stack of
|
||||
+Erlang processes when using the JIT. This allows commands
|
||||
+such as `backtrace` to show Erlang stackframes. For example:
|
||||
+
|
||||
+```
|
||||
+(gdb) bt
|
||||
+#0 0x00007fffa40005ee in global::call_bif_shared ()
|
||||
+#1 0x00007fffa411eaac in erl_eval:eval_lc1/7 () at erl_eval.erl:929
|
||||
+#2 0x00007fffa411e7bc in erl_eval:eval_lc/7 () at erl_eval.erl:917
|
||||
+#3 0x00007fffa4296528 in lists:map_1/2 () at lists.erl:2082
|
||||
+#4 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082
|
||||
+#5 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082
|
||||
+#6 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082
|
||||
+.....
|
||||
+#98 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082
|
||||
+#99 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082
|
||||
+#100 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082
|
||||
+#101 0x00007fffa42963d4 in lists:map/2 () at lists.erl:2077
|
||||
+#102 0x00007fffa411e45c in erl_eval:do_apply/7 () at erl_eval.erl:904
|
||||
+#103 0x00007fffa45f4c58 in shell:exprs/7 () at shell.erl:893
|
||||
+#104 0x00007fffa45f42c4 in shell:eval_exprs/7 () at shell.erl:849
|
||||
+#105 0x00007fffa45f3dac in shell:eval_loop/4 () at shell.erl:834
|
||||
+#106 0x00007fffa40024b8 in erts_beamasm:normal_exit/0-CodeInfoPrologue ()
|
||||
+Backtrace stopped: previous frame inner to this frame (corrupt stack?)
|
||||
+(gdb)
|
||||
+```
|
||||
+
|
||||
+## Updates of jit-reader
|
||||
+
|
||||
+When updating jit-reader you first need to update this repository
|
||||
+and push the new version here. Then you need to run
|
||||
+`./otp_build update_gdb_tools` in the Erlang/OTP repo for
|
||||
+it to use the correct commit.
|
||||
diff --git a/erts/etc/unix/gdb-tools/jit-reader.c b/erts/etc/unix/gdb-tools/jit-reader.c
|
||||
new file mode 100644
|
||||
index 0000000000..3c39c5540d
|
||||
--- /dev/null
|
||||
+++ b/erts/etc/unix/gdb-tools/jit-reader.c
|
||||
@@ -0,0 +1,386 @@
|
||||
+#include <gdb/jit-reader.h>
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdint.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+/* Useful links
|
||||
+ * - https://pwparchive.wordpress.com/2011/11/20/new-jit-interface-for-gdb/
|
||||
+ * - https://sourceware.org/gdb/current/onlinedocs/gdb/Custom-Debug-Info.html
|
||||
+ * - https://github.com/tetzank/asmjit-utilities
|
||||
+ * - https://github.com/bminor/binutils-gdb/blob/master/gdb/testsuite/gdb.base/jitreader.c
|
||||
+ */
|
||||
+
|
||||
+GDB_DECLARE_GPL_COMPATIBLE_READER
|
||||
+
|
||||
+#if 0
|
||||
+#define HARD_DEBUG
|
||||
+static FILE *log = NULL;
|
||||
+#define LOG(...) do { fprintf(log, ##__VA_ARGS__); fflush(log); } while(0)
|
||||
+#else
|
||||
+#define LOG(...)
|
||||
+#endif
|
||||
+
|
||||
+typedef enum {
|
||||
+ X64_RBP = 6, /* Frame pointer iff native frames are enabled */
|
||||
+ X64_RSP = 7, /* Stack pointer when using native stack */
|
||||
+ X64_R12 = 12, /* Stack pointer when using non-native stack */
|
||||
+ X64_R13 = 13, /* Current process */
|
||||
+ X64_RIP = 16
|
||||
+} X64Register;
|
||||
+
|
||||
+typedef enum {
|
||||
+ /* Return address only */
|
||||
+ ERTS_FRAME_LAYOUT_RA,
|
||||
+ /* Frame pointer, return address */
|
||||
+ ERTS_FRAME_LAYOUT_FP_RA
|
||||
+} ErtsFrameLayout;
|
||||
+
|
||||
+struct emulator_info {
|
||||
+ /* 0 = regular, 1 = frame pointers */
|
||||
+ int frame_layout;
|
||||
+ const void *normal_exit;
|
||||
+};
|
||||
+
|
||||
+struct erlang_module_info {
|
||||
+ uint64_t base_address;
|
||||
+ uint32_t range_count;
|
||||
+ uint32_t code_size;
|
||||
+ /* Module name, including null terminator. */
|
||||
+ uint16_t name_length;
|
||||
+ char name[];
|
||||
+ /* array of range_info structures */
|
||||
+};
|
||||
+
|
||||
+struct range_info {
|
||||
+ uint32_t start_offset;
|
||||
+ uint32_t end_offset;
|
||||
+ uint32_t line_count;
|
||||
+ /* Range name, including null terminator. */
|
||||
+ uint16_t name_length;
|
||||
+ char name[];
|
||||
+ /* array of line_info structures */
|
||||
+};
|
||||
+
|
||||
+struct line_info {
|
||||
+ uint32_t start_offset;
|
||||
+ uint32_t line_number;
|
||||
+ /* File name, including null terminator. */
|
||||
+ uint16_t file_length;
|
||||
+ char file[];
|
||||
+};
|
||||
+
|
||||
+enum debug_info_header {
|
||||
+ DEBUG_INFO_HEADER_EMULATOR = 0,
|
||||
+ DEBUG_INFO_HEADER_MODULE = 1,
|
||||
+};
|
||||
+
|
||||
+struct debug_info {
|
||||
+ enum debug_info_header header;
|
||||
+ union {
|
||||
+ struct emulator_info emu;
|
||||
+ struct erlang_module_info mod;
|
||||
+ } payload;
|
||||
+};
|
||||
+
|
||||
+typedef struct range {
|
||||
+ GDB_CORE_ADDR start;
|
||||
+ GDB_CORE_ADDR end;
|
||||
+#ifdef HARD_DEBUG
|
||||
+ char *name;
|
||||
+#endif
|
||||
+} range;
|
||||
+
|
||||
+typedef struct priv {
|
||||
+ range *ranges;
|
||||
+ int num_ranges;
|
||||
+ ErtsFrameLayout frame_layout;
|
||||
+ const void *normal_exit;
|
||||
+} priv;
|
||||
+
|
||||
+static enum gdb_status read_module_info(struct gdb_reader_funcs *self,
|
||||
+ struct gdb_symbol_callbacks *cb,
|
||||
+ struct erlang_module_info *module_info) {
|
||||
+ struct gdb_object *obj = cb->object_open(cb);
|
||||
+ GDB_CORE_ADDR mod_start, mod_end;
|
||||
+ char *symfile = (char*)module_info;
|
||||
+ priv *priv = self->priv_data;
|
||||
+
|
||||
+ symfile += sizeof(*module_info) + module_info->name_length;
|
||||
+
|
||||
+ mod_start = module_info->base_address;
|
||||
+ mod_end = mod_start + module_info->code_size;
|
||||
+
|
||||
+ priv->ranges = realloc(priv->ranges, (priv->num_ranges + 1) * sizeof(range));
|
||||
+ priv->ranges[priv->num_ranges].start = mod_start;
|
||||
+ priv->ranges[priv->num_ranges].end = mod_end;
|
||||
+#ifdef HARD_DEBUG
|
||||
+ priv->ranges[priv->num_ranges].name = strdup(module_info->name);
|
||||
+#endif
|
||||
+ priv->num_ranges += 1;
|
||||
+
|
||||
+ LOG("Add module `%s` (0x%lx, 0x%lx)\r\n",
|
||||
+ module_info->name, mod_start, mod_end);
|
||||
+
|
||||
+ for (int range = 0; range < module_info->range_count; range++) {
|
||||
+ struct range_info *range_info;
|
||||
+ struct gdb_symtab *symtab;
|
||||
+ GDB_CORE_ADDR begin, end;
|
||||
+
|
||||
+ range_info = (struct range_info *)symfile;
|
||||
+ symfile += sizeof(*range_info) + range_info->name_length;
|
||||
+
|
||||
+ begin = mod_start + range_info->start_offset;
|
||||
+ end = mod_start + range_info->end_offset;
|
||||
+
|
||||
+ LOG("Add range `%s` (0x%lx, 0x%lx), %u lines\r\n",
|
||||
+ range_info->name,
|
||||
+ begin, end,
|
||||
+ range_info->line_count);
|
||||
+
|
||||
+ /* A bug in GDB < 9 forces us to open and close the symtab for each
|
||||
+ * iteration. */
|
||||
+ symtab = cb->symtab_open(cb, obj, module_info->name);
|
||||
+ cb->block_open(cb, symtab, NULL, begin, end, range_info->name);
|
||||
+ cb->symtab_close(cb, symtab);
|
||||
+
|
||||
+ for (int line = 0; line < range_info->line_count; line++) {
|
||||
+ struct gdb_line_mapping line_mapping;
|
||||
+ struct line_info *line_info;
|
||||
+
|
||||
+ line_info = (struct line_info *)symfile;
|
||||
+ symfile += sizeof(*line_info) + line_info->file_length;
|
||||
+
|
||||
+ line_mapping.pc = mod_start + line_info->start_offset;
|
||||
+ line_mapping.line = line_info->line_number;
|
||||
+
|
||||
+ LOG("\t%s:%u\r\n", line_info->file, line_info->line_number);
|
||||
+
|
||||
+ /* The symbol table must be opened and closed on every single line
|
||||
+ * for file names to work properly, as there is no other way to
|
||||
+ * tell GDB that a certain line belongs to a different file than
|
||||
+ * the rest of the table. Sigh. */
|
||||
+ symtab = cb->symtab_open(cb, obj, line_info->file);
|
||||
+
|
||||
+ cb->block_open(cb, symtab, NULL, line_mapping.pc, end,
|
||||
+ range_info->name);
|
||||
+ cb->line_mapping_add(cb, symtab, 1, &line_mapping);
|
||||
+ cb->symtab_close(cb, symtab);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ cb->object_close(cb, obj);
|
||||
+
|
||||
+ return GDB_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+static enum gdb_status read_emulator_info(struct gdb_reader_funcs *self,
|
||||
+ struct gdb_symbol_callbacks *cb,
|
||||
+ struct emulator_info *emulator_info) {
|
||||
+ priv *priv = self->priv_data;
|
||||
+
|
||||
+ priv->frame_layout = emulator_info->frame_layout;
|
||||
+ priv->normal_exit = emulator_info->normal_exit;
|
||||
+
|
||||
+ LOG("initialize: frame layout = %i\r\n", priv->frame_layout);
|
||||
+
|
||||
+ return GDB_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+static enum gdb_status read_debug_info(struct gdb_reader_funcs *self,
|
||||
+ struct gdb_symbol_callbacks *cb,
|
||||
+ void *memory, long memory_sz) {
|
||||
+ struct debug_info *debug_info = memory;
|
||||
+
|
||||
+ (void)memory_sz;
|
||||
+
|
||||
+ switch (debug_info->header) {
|
||||
+ case DEBUG_INFO_HEADER_EMULATOR:
|
||||
+ return read_emulator_info(self, cb, &debug_info->payload.emu);
|
||||
+ case DEBUG_INFO_HEADER_MODULE:
|
||||
+ return read_module_info(self, cb, &debug_info->payload.mod);
|
||||
+ }
|
||||
+
|
||||
+ return GDB_FAIL;
|
||||
+}
|
||||
+
|
||||
+static void regfree(struct gdb_reg_value *reg) {
|
||||
+ free(reg);
|
||||
+}
|
||||
+
|
||||
+static struct range *get_range(priv *priv, GDB_CORE_ADDR rip) {
|
||||
+ for (int i = 0; i < priv->num_ranges; i++) {
|
||||
+ if (rip >= priv->ranges[i].start && rip < priv->ranges[i].end) {
|
||||
+ return &priv->ranges[i];
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static enum gdb_status unwind(struct gdb_reader_funcs *self,
|
||||
+ struct gdb_unwind_callbacks *cb) {
|
||||
+ GDB_CORE_ADDR rbp, rsp, rip;
|
||||
+ struct range *range;
|
||||
+ priv *priv;
|
||||
+
|
||||
+ rbp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RBP)->value;
|
||||
+ rsp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RSP)->value;
|
||||
+ rip = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RIP)->value;
|
||||
+
|
||||
+ priv = self->priv_data;
|
||||
+ range = get_range(priv, rip);
|
||||
+
|
||||
+ /* Check that rip points to one of the addresses that we handle */
|
||||
+ if (range) {
|
||||
+ struct gdb_reg_value *prev_rbp, *prev_rsp, *prev_rip;
|
||||
+
|
||||
+ prev_rbp = malloc(sizeof(struct gdb_reg_value) + sizeof(char*));
|
||||
+ prev_rsp = malloc(sizeof(struct gdb_reg_value) + sizeof(char*));
|
||||
+ prev_rip = malloc(sizeof(struct gdb_reg_value) + sizeof(char*));
|
||||
+
|
||||
+ LOG("UNWIND match %s: rbp: 0x%lx rsp: 0x%lx rip: 0x%lx \r\n",
|
||||
+ range->name, rbp, rsp, rip);
|
||||
+
|
||||
+ prev_rbp->free = ®free;
|
||||
+ prev_rbp->defined = 1;
|
||||
+ prev_rbp->size = sizeof(char*);
|
||||
+ prev_rsp->free = ®free;
|
||||
+ prev_rsp->defined = 1;
|
||||
+ prev_rsp->size = sizeof(char*);
|
||||
+ prev_rip->free = ®free;
|
||||
+ prev_rip->defined = 1;
|
||||
+ prev_rip->size = sizeof(char*);
|
||||
+
|
||||
+ if (priv->frame_layout == ERTS_FRAME_LAYOUT_FP_RA) {
|
||||
+ /* Frame pointers are enabled, which means that rbp will point to
|
||||
+ * where we stored the previous frames rbp. Also the previous
|
||||
+ * frames address will be at rbp + 8 and the previous frames rsp
|
||||
+ * will be rbp + 16.
|
||||
+ *
|
||||
+ * 0x00: <- prev_rsp
|
||||
+ * 0x08: prev call addr
|
||||
+ * 0x10: prev rbp <- curr rbp
|
||||
+ * 0x18: current frame
|
||||
+ * 0x20: <- curr rip */
|
||||
+ cb->target_read(rbp + 1 * sizeof(char*), &prev_rip->value,
|
||||
+ sizeof(char*));
|
||||
+ cb->target_read(rbp + 0 * sizeof(char*), &prev_rbp->value,
|
||||
+ sizeof(char*));
|
||||
+ *(GDB_CORE_ADDR*)prev_rsp->value = rbp + sizeof(char*[2]);
|
||||
+ } else {
|
||||
+ /* Normal frame layout, we need to scan the stack. */
|
||||
+ cb->target_read(rsp, &prev_rip->value, sizeof(char*));
|
||||
+
|
||||
+ for (rsp += sizeof(char*); ; rsp += sizeof(char*)) {
|
||||
+ cb->target_read(rsp, &prev_rip->value, sizeof(char*));
|
||||
+
|
||||
+ LOG("rsp: 0x%lx rip: 0x%lx\r\n",
|
||||
+ rsp, *(GDB_CORE_ADDR*)prev_rip->value);
|
||||
+
|
||||
+ /* Check if it is a cp */
|
||||
+ if ((*(GDB_CORE_ADDR*)prev_rip->value & 0x3) == 0) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ *(GDB_CORE_ADDR*)prev_rsp->value = rsp;
|
||||
+ *(GDB_CORE_ADDR*)prev_rbp->value = rsp - sizeof(char*);
|
||||
+ }
|
||||
+
|
||||
+ if (*(GDB_CORE_ADDR*)prev_rip->value == (uintptr_t)priv->normal_exit) {
|
||||
+ LOG("Normal exit\r\n");
|
||||
+ *(GDB_CORE_ADDR*)prev_rsp->value = 0;
|
||||
+ *(GDB_CORE_ADDR*)prev_rbp->value = 0;
|
||||
+ } else {
|
||||
+ LOG("UNWIND prev: rbp: 0x%lx rsp: 0x%lx rip: 0x%lx\r\n",
|
||||
+ *(GDB_CORE_ADDR*)prev_rbp->value,
|
||||
+ *(GDB_CORE_ADDR*)prev_rsp->value,
|
||||
+ *(GDB_CORE_ADDR*)prev_rip->value);
|
||||
+ }
|
||||
+
|
||||
+ cb->reg_set(cb, X64_RIP, prev_rip);
|
||||
+ cb->reg_set(cb, X64_RSP, prev_rsp);
|
||||
+ cb->reg_set(cb, X64_RBP, prev_rbp);
|
||||
+
|
||||
+ return GDB_SUCCESS;
|
||||
+ }
|
||||
+
|
||||
+ LOG("UNWIND no match: rbp: 0x%lx rsp: 0x%lx rip: 0x%lx\r\n", rbp, rsp, rip);
|
||||
+ return GDB_FAIL;
|
||||
+}
|
||||
+
|
||||
+static struct gdb_frame_id get_frame_id(struct gdb_reader_funcs *self,
|
||||
+ struct gdb_unwind_callbacks *cb){
|
||||
+ struct gdb_frame_id frame = {0, 0};
|
||||
+ GDB_CORE_ADDR rbp, rsp, rip;
|
||||
+ struct range *range;
|
||||
+ priv *priv;
|
||||
+
|
||||
+ rbp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RBP)->value;
|
||||
+ rsp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RSP)->value;
|
||||
+ rip = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RIP)->value;
|
||||
+
|
||||
+ priv = self->priv_data;
|
||||
+ range = get_range(priv, rip);
|
||||
+
|
||||
+ LOG("FRAME: rip: 0x%lx rsp: 0x%lx rbp: 0x%lx \r\n", rip, rsp, rbp);
|
||||
+
|
||||
+ if (range) {
|
||||
+ frame.code_address = rip;
|
||||
+
|
||||
+ if (priv->frame_layout == ERTS_FRAME_LAYOUT_FP_RA) {
|
||||
+ frame.stack_address = rbp + sizeof(char*);
|
||||
+ } else {
|
||||
+ GDB_CORE_ADDR prev_rip;
|
||||
+
|
||||
+ for (rsp += sizeof(char*); ; rsp += sizeof(char*)) {
|
||||
+ cb->target_read(rsp, &prev_rip, sizeof(char*));
|
||||
+
|
||||
+ LOG("rsp: 0x%lx rip: 0x%lx\r\n", rsp, prev_rip);
|
||||
+
|
||||
+ /* Check if it is a cp */
|
||||
+ if ((prev_rip & 0x3) == 0) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ frame.stack_address = rsp;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ LOG("FRAME: code_address: 0x%lx stack_address: 0x%lx\r\n",
|
||||
+ frame.code_address, frame.stack_address);
|
||||
+
|
||||
+ return frame;
|
||||
+}
|
||||
+
|
||||
+static void destroy(struct gdb_reader_funcs *self){
|
||||
+ free(self);
|
||||
+}
|
||||
+
|
||||
+struct gdb_reader_funcs *gdb_init_reader(void){
|
||||
+ struct gdb_reader_funcs *funcs = malloc(sizeof(struct gdb_reader_funcs));
|
||||
+ priv *priv_data = malloc(sizeof(priv));
|
||||
+
|
||||
+ priv_data->num_ranges = 1;
|
||||
+ priv_data->ranges = malloc(sizeof(range));
|
||||
+ priv_data->ranges[0].start = 0;
|
||||
+ priv_data->ranges[0].end = 0;
|
||||
+
|
||||
+ funcs->reader_version = GDB_READER_INTERFACE_VERSION;
|
||||
+ funcs->priv_data = priv_data;
|
||||
+
|
||||
+ funcs->read = read_debug_info;
|
||||
+ funcs->unwind = unwind;
|
||||
+ funcs->get_frame_id = get_frame_id;
|
||||
+ funcs->destroy = destroy;
|
||||
+
|
||||
+#ifdef HARD_DEBUG
|
||||
+ log = fopen("/tmp/jit-reader.log","w+");
|
||||
+ if (!log) fprintf(stderr,"Could not open /tmp/jit-reader.log");
|
||||
+#endif
|
||||
+
|
||||
+ return funcs;
|
||||
+}
|
||||
diff --git a/erts/etc/unix/gdb-tools/jit-reader.mk b/erts/etc/unix/gdb-tools/jit-reader.mk
|
||||
new file mode 100644
|
||||
index 0000000000..8ef0bccec2
|
||||
--- /dev/null
|
||||
+++ b/erts/etc/unix/gdb-tools/jit-reader.mk
|
||||
@@ -0,0 +1,9 @@
|
||||
+EXTRA_LIBS = $(BINDIR)/jit-reader.so
|
||||
+
|
||||
+jit-reader: $(EXTRA_LIBS)
|
||||
+
|
||||
+$(OBJDIR)/jit-reader.o: $(GDB_TOOLS)/jit-reader.c $(GDB_TOOLS)/jit-reader.h
|
||||
+ $(V_CC) $(DED_CFLAGS) -I$(ETC) -o $@ -c $<
|
||||
+
|
||||
+$(BINDIR)/jit-reader.so: $(OBJDIR)/jit-reader.o
|
||||
+ $(V_LD) $(DED_LDFLAGS) -o $@ $^
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Tue, 26 Jun 2012 15:16:39 +0400
|
||||
Subject: [PATCH] Restore installation of a n internal erl_interface API
|
||||
headers
|
||||
|
||||
See rhbz #818419 for the explanation why they're necessary for low-level
|
||||
interaction with Erlang nodes:
|
||||
|
||||
https://bugzilla.redhat.com/818419
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
---
|
||||
lib/erl_interface/src/Makefile.in | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
|
||||
index 9aeba86..708d0a1 100644
|
||||
--- a/lib/erl_interface/src/Makefile.in
|
||||
+++ b/lib/erl_interface/src/Makefile.in
|
||||
@@ -846,11 +846,29 @@ release: opt
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/include"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/lib"
|
||||
$(INSTALL_DIR) "$(RELSYSDIR)/bin"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/auxdir"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/connect"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/decode"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/encode"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/epmd"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/legacy"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/misc"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/prog"
|
||||
+ $(INSTALL_DIR) "$(RELSYSDIR)/src/registry"
|
||||
$(INSTALL_DATA) $(HEADERS) "$(RELSYSDIR)/include"
|
||||
$(INSTALL_DATA) $(OBJ_TARGETS) "$(RELSYSDIR)/lib"
|
||||
ifneq ($(EXE_TARGETS),)
|
||||
$(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin"
|
||||
endif
|
||||
+ $(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src"
|
||||
+ $(INSTALL_DATA) connect/*.h "$(RELSYSDIR)/src/connect"
|
||||
+ $(INSTALL_DATA) decode/*.h "$(RELSYSDIR)/src/decode"
|
||||
+ $(INSTALL_DATA) encode/*.h "$(RELSYSDIR)/src/encode"
|
||||
+ $(INSTALL_DATA) epmd/*.h "$(RELSYSDIR)/src/epmd"
|
||||
+ $(INSTALL_DATA) misc/*.h "$(RELSYSDIR)/src/misc"
|
||||
+ $(INSTALL_DATA) registry/*.h "$(RELSYSDIR)/src/registry"
|
||||
+ $(INSTALL_DATA) legacy/*.h "$(RELSYSDIR)/src/legacy"
|
||||
+ $(INSTALL_DATA) prog/*.h "$(RELSYSDIR)/src/prog"
|
||||
|
||||
release_docs:
|
||||
|
||||
|
|
@ -6,17 +6,28 @@
|
|||
#
|
||||
# otp-get-patches.sh updates the erlang.spec and otp-00*.patch
|
||||
# files in the git index. After an otp-get-patches.sh run, you
|
||||
# will need to review the staged git changes, possibly adapt the
|
||||
# 'Release:' and '%changelog' parts of erlang.spec, and can then
|
||||
# will need to review the stage git changes, possibly adapt the
|
||||
# Release: and %changelog parts of erlang spec, and can then
|
||||
# "git commit" everything.
|
||||
#
|
||||
# Caution: Leave the four special comment lines untouched in the
|
||||
# spec file, as otp-get-patches.sh requires them and will only
|
||||
# touch the parts of erlang.spec between the respective start/end
|
||||
# comment pair:
|
||||
# touch erlang.spec between the respective start/end pair:
|
||||
#
|
||||
# # start of autogenerated patch tag list
|
||||
# # end of autogenerated patch tag list
|
||||
# # start of autogenerated prep patch list
|
||||
# # end of autogenerated prep patch list
|
||||
#
|
||||
# The following special comment lines in the git commit messages
|
||||
# will be interpreted:
|
||||
#
|
||||
# Fedora-Spec-Comment: This patch only applies to EL6 builds
|
||||
# Fedora-Spec-Before: %if 0%?el6}
|
||||
# Fedora-Spec-After: %endif
|
||||
#
|
||||
# If there is no "Fedora-Spec-Comment:" line, we will use
|
||||
# "Fedora specific patch".
|
||||
|
||||
# Command line parsing
|
||||
otp_dir="${1:?'Fatal: otp git repo dir required'}"
|
||||
|
|
@ -30,36 +41,51 @@ tmpdir="$(mktemp -d --tmpdir="$PWD")"
|
|||
|
||||
# Generate patch files
|
||||
pushd "$otp_dir"
|
||||
git format-patch -N --no-signature --no-stat -o "$tmpdir" "${otp_upstream}..${otp_fedora}" > "$tmpdir/patch-list.txt"
|
||||
git format-patch -N -o "$tmpdir" "${otp_upstream}..${otp_fedora}" > "$tmpdir/patch-list.txt"
|
||||
popd
|
||||
|
||||
test -s "$tmpdir/patch-list.txt"
|
||||
|
||||
# Process patch files
|
||||
echo "# start of autogenerated patch tag list" > "$tmpdir/patch-list-tags.txt"
|
||||
echo "# start of autogenerated prep patch list" > "$tmpdir/patch-list-prep.txt"
|
||||
n=1
|
||||
while read patch
|
||||
do
|
||||
otppatch="$(dirname "$patch")/otp-$(basename "$patch")"
|
||||
${SED-sed} -e '1d' -e '/^-- $/,$d' "$patch" > "$otppatch"
|
||||
rm -f "$patch"
|
||||
comment="$(sed -n 's/^Fedora-Spec-Comment:\s*//p' "$otppatch")"
|
||||
if test "x$comment" = "x"; then comment="Fedora specific patch"; fi
|
||||
echo "# ${comment}" >> "$tmpdir/patch-list-tags.txt"
|
||||
echo "# $(sed -n 's/^Subject: \[PATCH\] //p' "$otppatch")" >> "$tmpdir/patch-list-tags.txt"
|
||||
echo "Patch$n: $(basename "$otppatch")" >> "$tmpdir/patch-list-tags.txt"
|
||||
base="$(basename "$patch" ".patch" | sed 's/^00[0-9][0-9]-//')"
|
||||
backupext=".$(echo -n "$base" | tr -c -s '[:alnum:]' '_')"
|
||||
sed -n 's/^Fedora-Spec-Before:\s*//p' "$otppatch" >> "$tmpdir/patch-list-prep.txt"
|
||||
echo "%patch$n -p1 -b ${backupext}" >> "$tmpdir/patch-list-prep.txt"
|
||||
sed -n 's/^Fedora-Spec-After:\s*//p' "$otppatch" >> "$tmpdir/patch-list-prep.txt"
|
||||
n=$(($n + 1))
|
||||
done < "$tmpdir/patch-list.txt"
|
||||
echo "# end of autogenerated patch tag list" >> "$tmpdir/patch-list-tags.txt"
|
||||
echo "# end of autogenerated prep patch list" >> "$tmpdir/patch-list-prep.txt"
|
||||
|
||||
# Create updated spec file
|
||||
specfile="erlang.spec"
|
||||
newspec1="${tmpdir}/${specfile}.new1"
|
||||
newspec2="${tmpdir}/${specfile}.new2"
|
||||
sed '/^# start of autogenerated patch tag list$/,$d' "$specfile" > "$newspec1"
|
||||
cat "$tmpdir/patch-list-tags.txt" >> "$newspec1"
|
||||
sed '1,/^# end of autogenerated patch tag list/d' "$specfile" >> "$newspec1"
|
||||
sed '/^# start of autogenerated prep patch list$/,$d' "$newspec1" > "$newspec2"
|
||||
cat "$tmpdir/patch-list-prep.txt" >> "$newspec2"
|
||||
sed '1,/^# end of autogenerated prep patch list/d' "$newspec1" >> "$newspec2"
|
||||
|
||||
# Actually put all changes into git index
|
||||
git rm -f otp-00*.patch
|
||||
mv "$tmpdir/otp-00"*.patch .
|
||||
git add otp-00*.patch
|
||||
mv -f "$newspec1" "$specfile"
|
||||
mv -f "$newspec2" "$specfile"
|
||||
git add "$specfile"
|
||||
|
||||
rm -rf "$tmpdir"
|
||||
|
|
|
|||
|
|
@ -1,174 +0,0 @@
|
|||
import glob
|
||||
import os
|
||||
import re
|
||||
import rpm
|
||||
import sys
|
||||
|
||||
ts = rpm.TransactionSet()
|
||||
|
||||
packages = []
|
||||
for arg in sys.argv[1:]:
|
||||
packages += glob.glob(arg)
|
||||
|
||||
erlang_provides = {}
|
||||
erlang_requires = {}
|
||||
|
||||
package_names = []
|
||||
package_headers = {}
|
||||
|
||||
##
|
||||
## Custom tweaks begins here
|
||||
##
|
||||
|
||||
# These packages should be marked as noarch
|
||||
package_noarch = [
|
||||
"emacs-erlang",
|
||||
"emacs-erlang-el",
|
||||
"erlang-doc"]
|
||||
|
||||
# These are additional Requires which cannot be picked up automatically (yet).
|
||||
# TODO these should be added automatically
|
||||
package_additional_requires = {
|
||||
"emacs-erlang": ["emacs-common-erlang = %{version}-%{release}", "emacs(bin) >= %{_emacs_version}" ],
|
||||
"emacs-erlang-el": ["emacs-erlang = %{version}-%{release}"],
|
||||
"erlang-dialyzer": ["graphviz"],
|
||||
"erlang-erl_interface": ["%{name}-erts%{?_isa} = %{version}-%{release}"],
|
||||
# This library (lksctp-tools) is dlopened so it can't be picked
|
||||
# up automatically by the RPM dependency checker
|
||||
"erlang-erts": ["lksctp-tools"],
|
||||
"erlang-gs": ["tk"],
|
||||
# Stores files/links in /usr/share/java so has to depend on jpackage-utils
|
||||
"erlang-ic": ["jpackage-utils"],
|
||||
# Stores files/links in /usr/share/java so has to depend on jpackage-utils
|
||||
"erlang-jinterface": ["%{name}-erts%{?_isa} = %{version}-%{release}", "jpackage-utils"],
|
||||
"erlang-wx": ["mesa-libGL", "mesa-libGLU"],
|
||||
}
|
||||
|
||||
package_additional_buildrequires = {
|
||||
"emacs-erlang": ["emacs", "emacs-el"],
|
||||
"erlang-crypto": ["openssl-devel"],
|
||||
"erlang-diameter": ["ed"],
|
||||
|
||||
# BEWARE. No fop for EPEL5, and only for x86/x86_64 in EPEL6,
|
||||
# so we cannot regenerate docs here. (Un)Fortunately we dropped
|
||||
# support for EPEL6 and older versions.
|
||||
# FIXME add bootstrap condition first.
|
||||
"erlang-doc": ["fop", "libxslt"],
|
||||
|
||||
"erlang-erts": ["lksctp-tools-devel", "m4", "ncurses-devel", "zlib-devel"],
|
||||
"erlang-gs": ["tcl-devel", "tk-devel"],
|
||||
|
||||
# in EPEL6 on arches different from %{ix86} x86_64 we have to
|
||||
# use java-devel-gcj, so technically this requirement makes it
|
||||
# impossible to build Java support there. (Un)Fortunately we
|
||||
# already dropped full support for EPEL6 and older versions.
|
||||
"erlang-ic": ["java-devel"],
|
||||
"erlang-jinterface": ["java-devel"],
|
||||
|
||||
"erlang-odbc": ["unixODBC-devel"],
|
||||
}
|
||||
|
||||
package_additional_obsoletes = {
|
||||
"erlang-erts": [
|
||||
"erlang-appmon",
|
||||
"erlang-docbuilder",
|
||||
"erlang-inviso",
|
||||
"erlang-pman",
|
||||
"erlang-toolbar",
|
||||
"erlang-tv"],
|
||||
}
|
||||
|
||||
##
|
||||
## Custom tweaks ends here
|
||||
##
|
||||
|
||||
# To match 'erlang(asn1ct_eval_ext:transform_to_EXTERNAL1994/1)'
|
||||
prog = re.compile("^erlang(.*:.*/\d+)")
|
||||
rpmmask = re.compile(".*\.rpm")
|
||||
|
||||
# iterate over all rpms
|
||||
for package in sorted([p for p in packages if rpmmask.match(p)]):
|
||||
|
||||
# A tricky part. We are processing packages, rebuilt with
|
||||
# %{__erlang_provides_requires}. Otherwise we won't get information
|
||||
# about imports/exports (until we learn how to parse Erlang BEAM file
|
||||
# headers with Python.
|
||||
fd = os.open(package, os.O_RDONLY)
|
||||
h = ts.hdrFromFdno(fd)
|
||||
os.close(fd)
|
||||
|
||||
rpm_name = h[rpm.RPMTAG_NAME]
|
||||
|
||||
# Let's calculate provides
|
||||
# We'll create dictionary to speedup future use
|
||||
# FIXME duplicate provides
|
||||
local_provides = [p for p in h[rpm.RPMTAG_PROVIDENAME] if prog.match(p)]
|
||||
erlang_provides.update({k: rpm_name for k in local_provides})
|
||||
|
||||
# Let's calculate requires
|
||||
erlang_requires.update({rpm_name: [r for r in h[rpm.RPMTAG_REQUIRENAME] if prog.match(r) and not r in local_provides]})
|
||||
|
||||
package_headers.update({rpm_name: h})
|
||||
|
||||
package_names.append(rpm_name)
|
||||
|
||||
namemask = re.compile("^erlang-[a-zA-Z0-9_]*$")
|
||||
|
||||
print "### BEGIN OF AUTOGENERATED LIST ###"
|
||||
print ""
|
||||
|
||||
for name in package_names:
|
||||
h = package_headers[name]
|
||||
|
||||
if name == "erlang-doc":
|
||||
# Additional ifdef just for this sub-package (see below)
|
||||
print "%if %{with doc}"
|
||||
|
||||
if namemask.match(name):
|
||||
print "%%package %s" % name.replace("erlang-", "")
|
||||
else:
|
||||
print "%%package -n %s" % name
|
||||
|
||||
print "Summary: %s" % h[rpm.RPMTAG_SUMMARY]
|
||||
print "Group: %s" % h[rpm.RPMTAG_GROUP]
|
||||
|
||||
rawdeps = [erlang_provides.get(r, "Error: missing requires: %s" % r) for r in erlang_requires[name]]
|
||||
|
||||
deps = set()
|
||||
dependency_add = deps.add
|
||||
[x for x in rawdeps if not (x in deps or dependency_add(x))]
|
||||
|
||||
# Additional BuildRequires (if any):
|
||||
for br in package_additional_buildrequires.get(name, []):
|
||||
print "BuildRequires: %s" % br
|
||||
|
||||
# Add basic autogenerated Requires:
|
||||
for r in sorted(deps):
|
||||
#Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
|
||||
print "Requires: %s%%{?_isa} = %%{version}-%%{release}" % r.replace("erlang-", "%{name}-")
|
||||
|
||||
# Add custom additional Requires (if any):
|
||||
for r in package_additional_requires.get(name, []):
|
||||
print "Requires: %s" % r
|
||||
|
||||
# Add custom additional Obsoletes (if any):
|
||||
for os in package_additional_obsoletes.get(name, []):
|
||||
print "Obsoletes: %s" % os
|
||||
|
||||
if name in package_noarch:
|
||||
print "BuildArch: noarch"
|
||||
|
||||
print ""
|
||||
if namemask.match(name):
|
||||
print "%%description %s" % name.replace("erlang-", "")
|
||||
else:
|
||||
print "%%description -n %s" % name
|
||||
print "%s" % h[rpm.RPMTAG_DESCRIPTION]
|
||||
|
||||
if name == "erlang-doc":
|
||||
# Additional ifdef just for this sub-package (see above)
|
||||
print "%endif"
|
||||
|
||||
print ""
|
||||
|
||||
print "### END OF AUTOGENERATED LIST ###"
|
||||
5
sources
5
sources
|
|
@ -1 +1,4 @@
|
|||
SHA512 (otp-OTP-26.2.5.16.tar.gz) = 4e973be7e8ccad196d59759108a521535b0f046268eb0406f789a50f411fa27c9c11fcfb61a7218605bf1b32921bb52c52fc7c99917e1acfc0d3ed09437129b2
|
||||
18ba57d24085a77c01bf05f5bc0e6fb5 otp_doc_html_R15B03-1.tar.gz
|
||||
1d7ace92e8cf41abbee1dba8192b7d5f otp_doc_man_R15B03-1.tar.gz
|
||||
f299c8af6f54e4b767fbba100b18acf2 otp_src_R15B03-1.readme
|
||||
eccd1e6dda6132993555e088005019f2 otp_src_R15B03-1.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue