From 2893cc56878af6eea87d7adc70d1772258c2676a Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Dec 13 2014 08:50:53 +0000 Subject: Ver. 17.4 Signed-off-by: Peter Lemenkov --- diff --git a/.gitignore b/.gitignore index 2861be6..72cea5d 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ otp_src_R14A.tar.gz /otp-OTP-17.2.2.tar.gz /otp-OTP-17.3.3.tar.gz /otp-OTP-17.3.4.tar.gz +/otp-OTP-17.4.tar.gz diff --git a/erlang.spec b/erlang.spec index 66fdfd8..6892e02 100644 --- a/erlang.spec +++ b/erlang.spec @@ -9,8 +9,8 @@ %endif Name: erlang -Version: 17.3.4 -Release: 3%{?dist} +Version: 17.4 +Release: 1%{?dist} Summary: General-purpose programming language and runtime environment Group: Development/Languages @@ -60,23 +60,14 @@ Patch5: otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch # Do not install erlang sources Patch6: otp-0006-Do-not-install-erlang-sources.patch # Fedora specific patch -# Added systemd notify support to EPMD -Patch7: otp-0007-Added-systemd-notify-support-to-EPMD.patch -# Fedora specific patch -# Install internal hrl files when necessary -Patch8: otp-0008-Install-internal-hrl-files-when-necessary.patch -# Fedora specific patch -# Expose NIF version -Patch9: otp-0009-Expose-NIF-version.patch -# Fedora specific patch # Split off webtool dependency from tools -Patch10: otp-0010-Split-off-webtool-dependency-from-tools.patch +Patch7: otp-0007-Split-off-webtool-dependency-from-tools.patch # Fedora specific patch # Introduce os:getenv/2 -Patch11: otp-0011-Introduce-os-getenv-2.patch +Patch8: otp-0008-Introduce-os-getenv-2.patch # Fedora specific patch # Patch removes support for SSLv3 protocol because it is proved -Patch12: otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch +Patch9: otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch # end of autogenerated patch tag list BuildRequires: lksctp-tools-devel @@ -902,12 +893,9 @@ Erlang mode for XEmacs (source lisp files). %patch4 -p1 -b .Do_not_install_Java_sources %patch5 -p1 -b .Do_not_install_nteventlog_and_related_doc_files_on_n %patch6 -p1 -b .Do_not_install_erlang_sources -%patch7 -p1 -b .Added_systemd_notify_support_to_EPMD -%patch8 -p1 -b .Install_internal_hrl_files_when_necessary -%patch9 -p1 -b .Expose_NIF_version -%patch10 -p1 -b .Split_off_webtool_dependency_from_tools -%patch11 -p1 -b .Introduce_os_getenv_2 -%patch12 -p1 -b .Patch_removes_support_for_SSLv3_protocol_because_it_ +%patch7 -p1 -b .Split_off_webtool_dependency_from_tools +%patch8 -p1 -b .Introduce_os_getenv_2 +%patch9 -p1 -b .Patch_removes_support_for_SSLv3_protocol_because_it_ # end of autogenerated prep patch list # FIXME we should come up with a better solution @@ -2228,6 +2216,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %changelog +* Fri Dec 12 2014 Peter Lemenkov - 17.4-1 +- Ver. 17.4 + * Mon Dec 01 2014 Peter Lemenkov - 17.3.4-3 - Disable SSLv3 (see rhbz #1169375) diff --git a/otp-0003-Do-not-install-C-sources.patch b/otp-0003-Do-not-install-C-sources.patch index 6499e4c..f89bcb7 100644 --- a/otp-0003-Do-not-install-C-sources.patch +++ b/otp-0003-Do-not-install-C-sources.patch @@ -46,10 +46,10 @@ index 5b36c19..470821e 100644 endif endif diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in -index 7d914a0..b013939 100644 +index 7c09b60..2c14f9e 100644 --- a/lib/erl_interface/src/Makefile.in +++ b/lib/erl_interface/src/Makefile.in -@@ -892,14 +892,14 @@ ifneq ($(EXE_TARGETS),) +@@ -904,14 +904,14 @@ ifneq ($(EXE_TARGETS),) $(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin" endif $(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src" diff --git a/otp-0004-Do-not-install-Java-sources.patch b/otp-0004-Do-not-install-Java-sources.patch index b5a48ff..65323fa 100644 --- a/otp-0004-Do-not-install-Java-sources.patch +++ b/otp-0004-Do-not-install-Java-sources.patch @@ -18,10 +18,10 @@ index 273614e..5b1fb57 100644 $(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 8ae1ca0..adaaf55 100644 +index ea3ab77..e95757e 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile -@@ -114,8 +114,6 @@ release release_docs release_tests release_html: +@@ -119,8 +119,6 @@ release release_docs release_tests release_html: $(V_at)$(MAKE) $(MFLAGS) RELEASE_PATH="$(RELEASE_PATH)" $(TARGET_MAKEFILE) $@_spec release_spec: opt diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch index cc923fb..9e0e3a9 100644 --- a/otp-0006-Do-not-install-erlang-sources.patch +++ b/otp-0006-Do-not-install-erlang-sources.patch @@ -171,7 +171,7 @@ index c185c15..68bacba 100644 $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) \ $(APPUP_TARGET) "$(RELSYSDIR)/ebin" diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile -index 90189dd..1e8f51d 100644 +index d61519f..bfdb0c9 100644 --- a/lib/debugger/src/Makefile +++ b/lib/debugger/src/Makefile @@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk @@ -268,18 +268,17 @@ index 377e593..668e278 100644 $(INSTALL_DIR) "$(RELSYSDIR)/include" $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile -index e6dab67..a5e147d 100644 +index 47aef10..78ddc74 100644 --- a/lib/eunit/src/Makefile +++ b/lib/eunit/src/Makefile -@@ -117,8 +117,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt +@@ -120,7 +120,6 @@ release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/ebin" $(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin" -- $(INSTALL_DIR) "$(RELSYSDIR)/src" + $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(PARSE_TRANSFORM) $(SOURCES) "$(RELSYSDIR)/src" + $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" $(INSTALL_DIR) "$(RELSYSDIR)/include" $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include" - diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile index f0200ca..86d3f74 100644 --- a/lib/gs/src/Makefile @@ -499,10 +498,10 @@ index b368b12..5eddaf0 100644 $(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin" diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile -index cb3c0a4..dbda2a2 100644 +index c7c70ad..3e1792f 100644 --- a/lib/kernel/src/Makefile +++ b/lib/kernel/src/Makefile -@@ -198,7 +198,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk +@@ -199,7 +199,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/src" @@ -694,7 +693,7 @@ index 88f8957..ab08a88 100644 $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" diff --git a/lib/otp_mibs/src/Makefile b/lib/otp_mibs/src/Makefile -index 4f03d02..756db7b 100644 +index 6096240..cbc41e6 100644 --- a/lib/otp_mibs/src/Makefile +++ b/lib/otp_mibs/src/Makefile @@ -95,8 +95,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk @@ -720,18 +719,17 @@ index 2ee2285..ea075ed 100644 $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" $(INSTALL_DIR) "$(RELSYSDIR)/include" diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile -index 6bf0af9..e501539 100644 +index 0282d63..5902da3 100644 --- a/lib/percept/src/Makefile +++ b/lib/percept/src/Makefile -@@ -93,8 +93,6 @@ docs: - include $(ERL_TOP)/make/otp_release_targets.mk +@@ -96,7 +96,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/src" + $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" + $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" # $(INSTALL_DIR) "$(RELSYSDIR)/include" # $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile index c1b3bc8..3d021cf 100644 --- a/lib/public_key/asn1/Makefile @@ -873,7 +871,7 @@ index 698c341..3344a0c 100644 $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" # $(INSTALL_DIR) "$(RELSYSDIR)/include" diff --git a/lib/ssh/src/Makefile b/lib/ssh/src/Makefile -index 04ce750..ef55c37 100644 +index 90d7110..e725c6c 100644 --- a/lib/ssh/src/Makefile +++ b/lib/ssh/src/Makefile @@ -135,7 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk @@ -886,7 +884,7 @@ index 04ce750..ef55c37 100644 $(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \ $(APPUP_TARGET) "$(RELSYSDIR)/ebin" diff --git a/lib/ssl/src/Makefile b/lib/ssl/src/Makefile -index 7c4c8ec..99efbe4 100644 +index 0c00a65..acec405 100644 --- a/lib/ssl/src/Makefile +++ b/lib/ssl/src/Makefile @@ -137,7 +137,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk @@ -924,7 +922,7 @@ index c9fbad8..2fc7f18 100644 release_docs_spec: diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile -index ab4dd4d..bcb1bc3 100644 +index 35bbad3..deb7caf 100644 --- a/lib/test_server/src/Makefile +++ b/lib/test_server/src/Makefile @@ -123,7 +123,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk @@ -932,7 +930,7 @@ index ab4dd4d..bcb1bc3 100644 release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" + $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src" $(INSTALL_DIR) "$(RELSYSDIR)/include" $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" diff --git a/lib/tools/src/Makefile b/lib/tools/src/Makefile diff --git a/otp-0007-Added-systemd-notify-support-to-EPMD.patch b/otp-0007-Added-systemd-notify-support-to-EPMD.patch deleted file mode 100644 index 8461024..0000000 --- a/otp-0007-Added-systemd-notify-support-to-EPMD.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Peter Lemenkov -Date: Fri, 6 Jun 2014 15:29:49 +0400 -Subject: [PATCH] Added systemd notify support to EPMD - -Signed-off-by: Peter Lemenkov - -Conflicts: - erts/configure.in - -diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c -index 9630e0c..dff9bc6 100644 ---- a/erts/epmd/src/epmd.c -+++ b/erts/epmd/src/epmd.c -@@ -593,9 +593,11 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval) - for(i=0; g->argv[i] != NULL; ++i) - free(g->argv[i]); - free(g->argv); -- } -- -- -+ } -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ sd_notifyf(0, "STATUS=Exited.\n" -+ "ERRNO=%i", exitval); -+#endif // HAVE_SYSTEMD_SD_DAEMON_H - exit(exitval); - } - -diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c -index 48fd7a5..18d898a 100644 ---- a/erts/epmd/src/epmd_srv.c -+++ b/erts/epmd/src/epmd_srv.c -@@ -399,8 +399,11 @@ void run(EpmdVars *g) - } - select_fd_set(g, listensock[i]); - } --#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H - } -+ sd_notifyf(0, "READY=1\n" -+ "STATUS=Processing port mapping requests...\n" -+ "MAINPID=%lu", (unsigned long) getpid()); - #endif - - dbg_tty_printf(g,2,"entering the main select() loop"); diff --git a/otp-0007-Split-off-webtool-dependency-from-tools.patch b/otp-0007-Split-off-webtool-dependency-from-tools.patch new file mode 100644 index 0000000..f2de8ac --- /dev/null +++ b/otp-0007-Split-off-webtool-dependency-from-tools.patch @@ -0,0 +1,40 @@ +From: Peter Lemenkov +Date: Sat, 8 Nov 2014 22:54:57 +0300 +Subject: [PATCH] Split off webtool dependency from tools + +Signed-off-by: Peter Lemenkov + +diff --git a/lib/tools/src/cover_web.erl b/lib/tools/src/cover_web.erl +index 69f2f3b..9085300 100644 +--- a/lib/tools/src/cover_web.erl ++++ b/lib/tools/src/cover_web.erl +@@ -50,14 +50,25 @@ + %%%---------------------------------------------------------------------- + %% Start webtool and webcover from erlang shell + start() -> +- webtool:start(), +- webtool:start_tools([],"app=webcover"), ++ try ++ % Disable automatic dependency picking up ++ erlang:apply(webtool, start, []), ++ erlang:apply(webtool, start_tools, [[],"app=webcover"]) ++ catch ++ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n") ++ end, + ok. + + %% Stop webtool and webcover from erlang shell + stop() -> +- webtool:stop_tools([],"app=webcover"), +- webtool:stop(). ++ try ++ % Disable automatic dependency picking up ++ erlang:apply(webtool, stop_tools, [[],"app=webcover"]), ++ erlang:apply(webtool, stop, []) ++ catch ++ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n") ++ end, ++ ok. + + + diff --git a/otp-0008-Install-internal-hrl-files-when-necessary.patch b/otp-0008-Install-internal-hrl-files-when-necessary.patch deleted file mode 100644 index 9badf49..0000000 --- a/otp-0008-Install-internal-hrl-files-when-necessary.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Peter Lemenkov -Date: Tue, 26 Aug 2014 13:53:49 +0400 -Subject: [PATCH] Install internal hrl files when necessary - -Sometimes we install *.erl files. Some these files include a private -*.hrl files, so in order to make these *.erl files usable we have to -install these private includes as well. - -Signed-off-by: Peter Lemenkov - -Conflicts: - lib/eunit/src/Makefile - lib/percept/src/Makefile - lib/test_server/src/Makefile - -diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile -index 1e8f51d..bfdb0c9 100644 ---- a/lib/debugger/src/Makefile -+++ b/lib/debugger/src/Makefile -@@ -63,7 +63,7 @@ MODULES= \ - - HRL_FILES= - --INTERNAL_HRL_FILES= dbg_ieval.hrl -+INTERNAL_HRL_FILES= dbg_ieval.hrl dbg_wx_filedialog_win.hrl - - ERL_FILES= $(MODULES:%=%.erl) - -diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile -index a5e147d..8483e28 100644 ---- a/lib/eunit/src/Makefile -+++ b/lib/eunit/src/Makefile -@@ -46,6 +46,8 @@ SOURCES= \ - - INCLUDE_FILES = eunit.hrl - -+INTERNAL_HRL_FILES= eunit_internal.hrl -+ - PARSE_TRANSFORM_BIN = $(PARSE_TRANSFORM:%.erl=$(EBIN)/%.$(EMULATOR)) - - TARGET_FILES= $(SOURCES:%.erl=$(EBIN)/%.$(EMULATOR)) -@@ -117,6 +119,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin" -+ $(INSTALL_DIR) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include" - -diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile -index dbda2a2..3e1792f 100644 ---- a/lib/kernel/src/Makefile -+++ b/lib/kernel/src/Makefile -@@ -122,6 +122,7 @@ HRL_FILES= ../include/file.hrl ../include/inet.hrl ../include/inet_sctp.hrl \ - ../include/net_address.hrl - - INTERNAL_HRL_FILES= application_master.hrl disk_log.hrl \ -+ erl_epmd.hrl hipe_ext_format.hrl \ - inet_dns.hrl inet_res.hrl \ - inet_boot.hrl inet_config.hrl inet_int.hrl \ - inet_dns_record_adts.hrl -diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile -index e501539..5902da3 100644 ---- a/lib/percept/src/Makefile -+++ b/lib/percept/src/Makefile -@@ -50,6 +50,8 @@ MODULES= \ - - #HRL_FILES= ../include/ - -+INTERNAL_HRL_FILES= egd.hrl percept.hrl -+ - ERL_FILES= $(MODULES:%=%.erl) - - TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET) -@@ -93,6 +95,8 @@ docs: - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -+ $(INSTALL_DIR) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - # $(INSTALL_DIR) "$(RELSYSDIR)/include" - # $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" -diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile -index bcb1bc3..deb7caf 100644 ---- a/lib/test_server/src/Makefile -+++ b/lib/test_server/src/Makefile -@@ -123,7 +123,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" diff --git a/otp-0008-Introduce-os-getenv-2.patch b/otp-0008-Introduce-os-getenv-2.patch new file mode 100644 index 0000000..6c48db2 --- /dev/null +++ b/otp-0008-Introduce-os-getenv-2.patch @@ -0,0 +1,63 @@ +From: Peter Lemenkov +Date: Sat, 8 Nov 2014 15:11:04 +0300 +Subject: [PATCH] Introduce os:getenv/2 + +Signed-off-by: Peter Lemenkov + +diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml +index 2b57e75..8b85f24 100644 +--- a/lib/kernel/doc/src/os.xml ++++ b/lib/kernel/doc/src/os.xml +@@ -100,6 +100,19 @@ DirOut = os:cmd("dir"), % on Win32 platform + + + ++ ++ Get the value of an environment variable ++ ++

Returns the Value of the environment variable ++ VarName, or DefaultValue if the environment variable ++ is undefined.

++

If Unicode file name encoding is in effect (see the erl manual ++ page), the strings (both VarName and ++ Value) may contain characters with codepoints > 255.

++
++
++ + + Return the process identifier of the emulator process + +diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl +index 187fd00..8aaf13b 100644 +--- a/lib/kernel/src/os.erl ++++ b/lib/kernel/src/os.erl +@@ -26,7 +26,7 @@ + + %%% BIFs + +--export([getenv/0, getenv/1, getpid/0, putenv/2, timestamp/0, unsetenv/1]). ++-export([getenv/0, getenv/1, getenv/2, getpid/0, putenv/2, timestamp/0, unsetenv/1]). + + -spec getenv() -> [string()]. + +@@ -39,6 +39,19 @@ getenv() -> erlang:nif_error(undef). + getenv(_) -> + erlang:nif_error(undef). + ++-spec getenv(VarName, DefaultValue) -> Value when ++ VarName :: string(), ++ DefaultValue :: string(), ++ Value :: string(). ++ ++getenv(VarName, DefaultValue) -> ++ case os:getenv(VarName) of ++ false -> ++ DefaultValue; ++ Value -> ++ Value ++ end. ++ + -spec getpid() -> Value when + Value :: string(). + diff --git a/otp-0009-Expose-NIF-version.patch b/otp-0009-Expose-NIF-version.patch deleted file mode 100644 index 3448add..0000000 --- a/otp-0009-Expose-NIF-version.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Peter Lemenkov -Date: Sun, 2 Nov 2014 19:49:55 +0300 -Subject: [PATCH] Expose NIF version - -This patch allows checking for NIF API version in a way similar to -driver version. E.g. by calling erlang:system_info(nif_version). - -Signed-off-by: Peter Lemenkov - -diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml -index 8416839..81f98cb 100644 ---- a/erts/doc/src/erlang.xml -+++ b/erts/doc/src/erlang.xml -@@ -6133,6 +6133,11 @@ ok - erlang:system_info(multi_scheduling), and - erlang:system_info(schedulers).

- -+ nif_version -+ -+

Returns a string containing the erlang NIF version -+ used by the runtime system. It will be on the form "<major ver>.<minor ver>".

-+
- otp_release - -

Returns a string containing the OTP release number of the -diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c -index 6efe9d9..da38eea 100644 ---- a/erts/emulator/beam/erl_bif_info.c -+++ b/erts/emulator/beam/erl_bif_info.c -@@ -27,6 +27,7 @@ - #include "erl_process.h" - #include "error.h" - #include "erl_driver.h" -+#include "erl_nif.h" - #include "bif.h" - #include "big.h" - #include "erl_version.h" -@@ -2459,6 +2460,13 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1) - ERL_DRV_EXTENDED_MINOR_VERSION); - hp = HAlloc(BIF_P, 2*n); - BIF_RET(buf_to_intlist(&hp, buf, n, NIL)); -+ } else if (ERTS_IS_ATOM_STR("nif_version", BIF_ARG_1)) { -+ char buf[42]; -+ int n = erts_snprintf(buf, 42, "%d.%d", -+ ERL_NIF_MAJOR_VERSION, -+ ERL_NIF_MINOR_VERSION); -+ hp = HAlloc(BIF_P, 2*n); -+ BIF_RET(buf_to_intlist(&hp, buf, n, NIL)); - } else if (ERTS_IS_ATOM_STR("smp_support", BIF_ARG_1)) { - #ifdef ERTS_SMP - BIF_RET(am_true); -diff --git a/erts/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl -index 336b618..081789f 100644 ---- a/erts/emulator/test/driver_SUITE.erl -+++ b/erts/emulator/test/driver_SUITE.erl -@@ -1199,8 +1199,8 @@ check_si_res(["sched_thrs", Value]) -> - ?line Value = integer_to_list(erlang:system_info(schedulers)); - - %% Data added in 3rd version of driver_system_info() (driver version 1.5) --check_si_res(["emu_nif_vsn", _Value]) -> -- true; -+check_si_res(["emu_nif_vsn", Value]) -> -+ ?line Value = erlang:system_info(nif_version); - - %% Data added in 4th version of driver_system_info() (driver version 3.1) - check_si_res(["dirty_sched", _Value]) -> -diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl -index 98d7a94..de6a773 100644 ---- a/erts/preloaded/src/erlang.erl -+++ b/erts/preloaded/src/erlang.erl -@@ -2251,6 +2251,7 @@ tuple_to_list(_Tuple) -> - (modified_timing_level) -> integer() | undefined; - (multi_scheduling) -> disabled | blocked | enabled; - (multi_scheduling_blockers) -> [PID :: pid()]; -+ (nif_version) -> string(); - (otp_release) -> string(); - (port_count) -> non_neg_integer(); - (port_limit) -> pos_integer(); -diff --git a/lib/runtime_tools/src/system_information.erl b/lib/runtime_tools/src/system_information.erl -index f541d6e..04cc33e 100644 ---- a/lib/runtime_tools/src/system_information.erl -+++ b/lib/runtime_tools/src/system_information.erl -@@ -371,6 +371,7 @@ erlang_system_info() -> - logical_processors_online, - logical_processors_available, - driver_version, -+ nif_version, - emu_args, - ethread_info, - beam_jump_table, -diff --git a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat -index 1893837..bdc510e 100644 ---- a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat -+++ b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat -@@ -9720,6 +9720,7 @@ - {logical_processors_online,4}, - {logical_processors_available,4}, - {driver_version,"2.1"}, -+ {nif_version,"1.1"}, - {taints,[]}]}, - {erts_compile_info, - [{ldflags,[]}, diff --git a/otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch b/otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch new file mode 100644 index 0000000..fa55663 --- /dev/null +++ b/otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch @@ -0,0 +1,100 @@ +From: Sergei Golovan +Date: Sun, 30 Nov 2014 20:20:41 +0300 +Subject: [PATCH] Patch removes support for SSLv3 protocol because it is proved + to be insecure and nobody should use it anymore. + + +diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml +index b53344e..b245621 100644 +--- a/lib/ssl/doc/src/ssl.xml ++++ b/lib/ssl/doc/src/ssl.xml +@@ -123,7 +123,7 @@ + +

sslsocket() - opaque to the user.

+ +-

protocol() = sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'

++

protocol() = tlsv1 | 'tlsv1.1' | 'tlsv1.2'

+ +

ciphers() = [ciphersuite()] | string() (according to old API)

+ +diff --git a/lib/ssl/doc/src/ssl_app.xml b/lib/ssl/doc/src/ssl_app.xml +index 43cb393..ff12e04 100644 +--- a/lib/ssl/doc/src/ssl_app.xml ++++ b/lib/ssl/doc/src/ssl_app.xml +@@ -47,10 +47,10 @@ +

+

Note that the environment parameters can be set on the command line, + for instance,

+-

erl ... -ssl protocol_version '[sslv3, tlsv1]' .... ++

erl ... -ssl protocol_version '[tlsv1.1, tlsv1]' .... +

+ +- ]]>. ++ ]]>. + +

Protocol that will be supported by started clients and + servers. If this option is not set it will default to all +@@ -58,6 +58,9 @@ + Note that this option may be overridden by the version option + to ssl:connect/[2,3] and ssl:listen/2. +

++

For Debian GNU/Linux distribution the sslv3 protocol was ++ disabled due to its security issues. ++

+
+ + ]]> +diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl +index 75efb64..155fa81 100644 +--- a/lib/ssl/src/ssl_internal.hrl ++++ b/lib/ssl/src/ssl_internal.hrl +@@ -67,8 +67,8 @@ + -define(TRUE, 0). + -define(FALSE, 1). + +--define(ALL_SUPPORTED_VERSIONS, ['tlsv1.2', 'tlsv1.1', tlsv1, sslv3]). +--define(MIN_SUPPORTED_VERSIONS, ['tlsv1.1', tlsv1, sslv3]). ++-define(ALL_SUPPORTED_VERSIONS, ['tlsv1.2', 'tlsv1.1', tlsv1]). ++-define(MIN_SUPPORTED_VERSIONS, ['tlsv1.1', tlsv1]). + -define(ALL_DATAGRAM_SUPPORTED_VERSIONS, ['dtlsv1.2', dtlsv1]). + -define(MIN_DATAGRAM_SUPPORTED_VERSIONS, ['dtlsv1.2', dtlsv1]). + +diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl +index 6aab35d..1511abd 100644 +--- a/lib/ssl/src/ssl_record.hrl ++++ b/lib/ssl/src/ssl_record.hrl +@@ -144,6 +144,7 @@ + %% }). + + -define(LOWEST_MAJOR_SUPPORTED_VERSION, 3). ++-define(LOWEST_MINOR_SUPPORTED_VERSION, 1). + + + -record(generic_stream_cipher, { +diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl +index f50ea22..aa4fc8d 100644 +--- a/lib/ssl/src/tls_record.erl ++++ b/lib/ssl/src/tls_record.erl +@@ -276,14 +276,20 @@ supported_protocol_versions([_|_] = Vsns) -> + %%-------------------------------------------------------------------- + -spec is_acceptable_version(tls_version()) -> boolean(). + is_acceptable_version({N,_}) +- when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION -> ++ when N > ?LOWEST_MAJOR_SUPPORTED_VERSION -> ++ true; ++is_acceptable_version({N,M}) ++ when N == ?LOWEST_MAJOR_SUPPORTED_VERSION andalso M >= ?LOWEST_MINOR_SUPPORTED_VERSION -> + true; + is_acceptable_version(_) -> + false. + + -spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean(). + is_acceptable_version({N,_} = Version, Versions) +- when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION -> ++ when N > ?LOWEST_MAJOR_SUPPORTED_VERSION -> ++ lists:member(Version, Versions); ++is_acceptable_version({N,M} = Version, Versions) ++ when N == ?LOWEST_MAJOR_SUPPORTED_VERSION andalso M >= ?LOWEST_MINOR_SUPPORTED_VERSION -> + lists:member(Version, Versions); + is_acceptable_version(_,_) -> + false. diff --git a/otp-0010-Split-off-webtool-dependency-from-tools.patch b/otp-0010-Split-off-webtool-dependency-from-tools.patch deleted file mode 100644 index f2de8ac..0000000 --- a/otp-0010-Split-off-webtool-dependency-from-tools.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Peter Lemenkov -Date: Sat, 8 Nov 2014 22:54:57 +0300 -Subject: [PATCH] Split off webtool dependency from tools - -Signed-off-by: Peter Lemenkov - -diff --git a/lib/tools/src/cover_web.erl b/lib/tools/src/cover_web.erl -index 69f2f3b..9085300 100644 ---- a/lib/tools/src/cover_web.erl -+++ b/lib/tools/src/cover_web.erl -@@ -50,14 +50,25 @@ - %%%---------------------------------------------------------------------- - %% Start webtool and webcover from erlang shell - start() -> -- webtool:start(), -- webtool:start_tools([],"app=webcover"), -+ try -+ % Disable automatic dependency picking up -+ erlang:apply(webtool, start, []), -+ erlang:apply(webtool, start_tools, [[],"app=webcover"]) -+ catch -+ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n") -+ end, - ok. - - %% Stop webtool and webcover from erlang shell - stop() -> -- webtool:stop_tools([],"app=webcover"), -- webtool:stop(). -+ try -+ % Disable automatic dependency picking up -+ erlang:apply(webtool, stop_tools, [[],"app=webcover"]), -+ erlang:apply(webtool, stop, []) -+ catch -+ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n") -+ end, -+ ok. - - - diff --git a/otp-0011-Introduce-os-getenv-2.patch b/otp-0011-Introduce-os-getenv-2.patch deleted file mode 100644 index 6c48db2..0000000 --- a/otp-0011-Introduce-os-getenv-2.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Peter Lemenkov -Date: Sat, 8 Nov 2014 15:11:04 +0300 -Subject: [PATCH] Introduce os:getenv/2 - -Signed-off-by: Peter Lemenkov - -diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml -index 2b57e75..8b85f24 100644 ---- a/lib/kernel/doc/src/os.xml -+++ b/lib/kernel/doc/src/os.xml -@@ -100,6 +100,19 @@ DirOut = os:cmd("dir"), % on Win32 platform -
-
- -+ -+ Get the value of an environment variable -+ -+

Returns the Value of the environment variable -+ VarName, or DefaultValue if the environment variable -+ is undefined.

-+

If Unicode file name encoding is in effect (see the erl manual -+ page), the strings (both VarName and -+ Value) may contain characters with codepoints > 255.

-+
-+
-+ - - Return the process identifier of the emulator process - -diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl -index 187fd00..8aaf13b 100644 ---- a/lib/kernel/src/os.erl -+++ b/lib/kernel/src/os.erl -@@ -26,7 +26,7 @@ - - %%% BIFs - ---export([getenv/0, getenv/1, getpid/0, putenv/2, timestamp/0, unsetenv/1]). -+-export([getenv/0, getenv/1, getenv/2, getpid/0, putenv/2, timestamp/0, unsetenv/1]). - - -spec getenv() -> [string()]. - -@@ -39,6 +39,19 @@ getenv() -> erlang:nif_error(undef). - getenv(_) -> - erlang:nif_error(undef). - -+-spec getenv(VarName, DefaultValue) -> Value when -+ VarName :: string(), -+ DefaultValue :: string(), -+ Value :: string(). -+ -+getenv(VarName, DefaultValue) -> -+ case os:getenv(VarName) of -+ false -> -+ DefaultValue; -+ Value -> -+ Value -+ end. -+ - -spec getpid() -> Value when - Value :: string(). - diff --git a/otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch b/otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch deleted file mode 100644 index 584fa59..0000000 --- a/otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch +++ /dev/null @@ -1,100 +0,0 @@ -From: Sergei Golovan -Date: Sun, 30 Nov 2014 20:20:41 +0300 -Subject: [PATCH] Patch removes support for SSLv3 protocol because it is proved - to be insecure and nobody should use it anymore. - - -diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml -index f14d0b8..3a768e9 100644 ---- a/lib/ssl/doc/src/ssl.xml -+++ b/lib/ssl/doc/src/ssl.xml -@@ -123,7 +123,7 @@ - -

sslsocket() - opaque to the user.

- --

protocol() = sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'

-+

protocol() = tlsv1 | 'tlsv1.1' | 'tlsv1.2'

- -

ciphers() = [ciphersuite()] | string() (according to old API)

- -diff --git a/lib/ssl/doc/src/ssl_app.xml b/lib/ssl/doc/src/ssl_app.xml -index 43cb393..ff12e04 100644 ---- a/lib/ssl/doc/src/ssl_app.xml -+++ b/lib/ssl/doc/src/ssl_app.xml -@@ -47,10 +47,10 @@ -

-

Note that the environment parameters can be set on the command line, - for instance,

--

erl ... -ssl protocol_version '[sslv3, tlsv1]' .... -+

erl ... -ssl protocol_version '[tlsv1.1, tlsv1]' .... -

- -- ]]>. -+ ]]>. - -

Protocol that will be supported by started clients and - servers. If this option is not set it will default to all -@@ -58,6 +58,9 @@ - Note that this option may be overridden by the version option - to ssl:connect/[2,3] and ssl:listen/2. -

-+

For Debian GNU/Linux distribution the sslv3 protocol was -+ disabled due to its security issues. -+

-
- - ]]> -diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl -index 85724de..14013a4 100644 ---- a/lib/ssl/src/ssl_internal.hrl -+++ b/lib/ssl/src/ssl_internal.hrl -@@ -64,8 +64,8 @@ - -define(TRUE, 0). - -define(FALSE, 1). - ---define(ALL_SUPPORTED_VERSIONS, ['tlsv1.2', 'tlsv1.1', tlsv1, sslv3]). ---define(MIN_SUPPORTED_VERSIONS, ['tlsv1.1', tlsv1, sslv3]). -+-define(ALL_SUPPORTED_VERSIONS, ['tlsv1.2', 'tlsv1.1', tlsv1]). -+-define(MIN_SUPPORTED_VERSIONS, ['tlsv1.1', tlsv1]). - -define(ALL_DATAGRAM_SUPPORTED_VERSIONS, ['dtlsv1.2', dtlsv1]). - -define(MIN_DATAGRAM_SUPPORTED_VERSIONS, ['dtlsv1.2', dtlsv1]). - -diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl -index 6aab35d..1511abd 100644 ---- a/lib/ssl/src/ssl_record.hrl -+++ b/lib/ssl/src/ssl_record.hrl -@@ -144,6 +144,7 @@ - %% }). - - -define(LOWEST_MAJOR_SUPPORTED_VERSION, 3). -+-define(LOWEST_MINOR_SUPPORTED_VERSION, 1). - - - -record(generic_stream_cipher, { -diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl -index f50ea22..aa4fc8d 100644 ---- a/lib/ssl/src/tls_record.erl -+++ b/lib/ssl/src/tls_record.erl -@@ -276,14 +276,20 @@ supported_protocol_versions([_|_] = Vsns) -> - %%-------------------------------------------------------------------- - -spec is_acceptable_version(tls_version()) -> boolean(). - is_acceptable_version({N,_}) -- when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION -> -+ when N > ?LOWEST_MAJOR_SUPPORTED_VERSION -> -+ true; -+is_acceptable_version({N,M}) -+ when N == ?LOWEST_MAJOR_SUPPORTED_VERSION andalso M >= ?LOWEST_MINOR_SUPPORTED_VERSION -> - true; - is_acceptable_version(_) -> - false. - - -spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean(). - is_acceptable_version({N,_} = Version, Versions) -- when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION -> -+ when N > ?LOWEST_MAJOR_SUPPORTED_VERSION -> -+ lists:member(Version, Versions); -+is_acceptable_version({N,M} = Version, Versions) -+ when N == ?LOWEST_MAJOR_SUPPORTED_VERSION andalso M >= ?LOWEST_MINOR_SUPPORTED_VERSION -> - lists:member(Version, Versions); - is_acceptable_version(_,_) -> - false. diff --git a/sources b/sources index 6327b7c..b22e8a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -81aa75b5613b7db6f3761f848695e816 otp-OTP-17.3.4.tar.gz +0d06e7d3802d63992535116e4d37c1a4 otp-OTP-17.4.tar.gz