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().
+
From 918fdf26b715336be8386b8c865b32ac34d84535 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Mon, 1 Dec 2014 17:13:00 +0300
Subject: [PATCH 011/305] Disable SSLv3
See rhbz #1169375 for further details:
https://bugzilla.redhat.com/1169375
Signed-off-by: Peter Lemenkov
---
erlang.spec | 9 +-
...pport-for-SSLv3-protocol-because-it-.patch | 100 ++++++++++++++++++
2 files changed, 108 insertions(+), 1 deletion(-)
create mode 100644 otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
diff --git a/erlang.spec b/erlang.spec
index eff8714..66fdfd8 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -10,7 +10,7 @@
Name: erlang
Version: 17.3.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -74,6 +74,9 @@ Patch10: otp-0010-Split-off-webtool-dependency-from-tools.patch
# Fedora specific patch
# Introduce os:getenv/2
Patch11: otp-0011-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
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -904,6 +907,7 @@ Erlang mode for XEmacs (source lisp files).
%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_
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2224,6 +2228,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Dec 01 2014 Peter Lemenkov - 17.3.4-3
+- Disable SSLv3 (see rhbz #1169375)
+
* Mon Dec 01 2014 Peter Lemenkov - 17.3.4-2
- Backport useful os:getenv/2 from master (see https://github.com/erlang/otp/pull/535 )
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
new file mode 100644
index 0000000..584fa59
--- /dev/null
+++ b/otp-0012-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 f14d0b8..3a768e9 100644
+--- a/lib/ssl/doc/src/ssl.xml
++++ b/lib/ssl/doc/src/ssl.xml
+@@ -123,7 +123,7 @@
+
+
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.
From 961faf17fa13ee2f34fd684e3784b8f1444d6d48 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Mon, 1 Dec 2014 21:37:45 +0300
Subject: [PATCH 012/305] Disable SSLv3
Disable SSLv3 (see rhbz #1169375). Also backport useful os:getenv/2 from
master (see https://github.com/erlang/otp/pull/535 )
Signed-off-by: Peter Lemenkov
---
erlang.spec | 14 ++-
otp-0018-Introduce-os-getenv-2.patch | 63 ++++++++++++
...pport-for-SSLv3-protocol-because-it-.patch | 99 +++++++++++++++++++
3 files changed, 175 insertions(+), 1 deletion(-)
create mode 100644 otp-0018-Introduce-os-getenv-2.patch
create mode 100644 otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
diff --git a/erlang.spec b/erlang.spec
index 659fdbd..14887e4 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.9%{?dist}
+Release: %{upstream_rel_for_rpm}.10%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -107,6 +107,12 @@ Patch16: otp-0016-Split-off-webtool-dependency-from-tools.patch
# Fedora specific patch
# lib/inets/src/ftp/ftp.erl: Check the filenames, usernames,
Patch17: otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch
+# Fedora specific patch
+# Introduce os:getenv/2
+Patch18: otp-0018-Introduce-os-getenv-2.patch
+# Fedora specific patch
+# Patch removes support for SSLv3 protocol because it is proved
+Patch19: otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -989,6 +995,8 @@ Erlang mode for XEmacs (source lisp files).
%patch15 -p1 -b .Expose_NIF_version
%patch16 -p1 -b .Split_off_webtool_dependency_from_tools
%patch17 -p1 -b .lib_inets_src_ftp_ftp_erl_Check_the_filenames_userna
+%patch18 -p1 -b .Introduce_os_getenv_2
+%patch19 -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
@@ -2320,6 +2328,10 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Dec 01 2014 Peter Lemenkov - R16B-03.10
+- Disable SSLv3 (see rhbz #1169375)
+- Backport useful os:getenv/2 from master (see https://github.com/erlang/otp/pull/535 )
+
* Mon Nov 17 2014 Peter Lemenkov - R16B-03.9
- Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17)
diff --git a/otp-0018-Introduce-os-getenv-2.patch b/otp-0018-Introduce-os-getenv-2.patch
new file mode 100644
index 0000000..7ee1429
--- /dev/null
+++ b/otp-0018-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 9122267..7ec1f8e 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 9415593..d5ef994 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-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch b/otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
new file mode 100644
index 0000000..359c011
--- /dev/null
+++ b/otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
@@ -0,0 +1,99 @@
+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 1d74faf..912acc2 100644
+--- a/lib/ssl/doc/src/ssl.xml
++++ b/lib/ssl/doc/src/ssl.xml
+@@ -123,7 +123,7 @@
+
+
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.
++
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-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch b/otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
similarity index 98%
rename from otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
rename to otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
index 584fa59..fa55663 100644
--- a/otp-0012-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
+++ b/otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Patch removes support for SSLv3 protocol because it is proved
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
-index f14d0b8..3a768e9 100644
+index b53344e..b245621 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -123,7 +123,7 @@
@@ -45,10 +45,10 @@ index 43cb393..ff12e04 100644
]]>
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
-index 85724de..14013a4 100644
+index 75efb64..155fa81 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
-@@ -64,8 +64,8 @@
+@@ -67,8 +67,8 @@
-define(TRUE, 0).
-define(FALSE, 1).
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
From e58f762146d3f46db7d10793befb73531bb42b33 Mon Sep 17 00:00:00 2001
From: Kalev Lember
Date: Sat, 2 May 2015 13:29:58 +0200
Subject: [PATCH 014/305] Rebuilt for GCC 5 C++11 ABI change
---
erlang.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/erlang.spec b/erlang.spec
index 6892e02..a8f71c0 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -10,7 +10,7 @@
Name: erlang
Version: 17.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2216,6 +2216,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Sat May 02 2015 Kalev Lember - 17.4-2
+- Rebuilt for GCC 5 C++11 ABI change
+
* Fri Dec 12 2014 Peter Lemenkov - 17.4-1
- Ver. 17.4
From 2238368d444f0b33ffb81f5a3524d0ffa045f999 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore
Date: Wed, 17 Jun 2015 05:34:38 +0000
Subject: [PATCH 015/305] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
---
erlang.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/erlang.spec b/erlang.spec
index a8f71c0..763da02 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -10,7 +10,7 @@
Name: erlang
Version: 17.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2216,6 +2216,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Jun 17 2015 Fedora Release Engineering - 17.4-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
* Sat May 02 2015 Kalev Lember - 17.4-2
- Rebuilt for GCC 5 C++11 ABI change
From 654b879bc09027e62ed7d66451d4da7af53adccb Mon Sep 17 00:00:00 2001
From: John Eckersberg
Date: Wed, 5 Aug 2015 22:11:41 -0400
Subject: [PATCH 016/305] Add patch for CVE-2015-2774 - TLS-1.0 POODLE
vulnerability (rhbz#1206712)
---
erlang.spec | 10 +-
...ding-check-for-TLS-1.0-and-provide-b.patch | 576 ++++++++++++++++++
2 files changed, 585 insertions(+), 1 deletion(-)
create mode 100644 otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch
diff --git a/erlang.spec b/erlang.spec
index 763da02..6f7bac6 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -10,7 +10,7 @@
Name: erlang
Version: 17.4
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -70,6 +70,9 @@ Patch8: otp-0008-Introduce-os-getenv-2.patch
Patch9: otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
# end of autogenerated patch tag list
+# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-2774
+Patch10: otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch
+
BuildRequires: lksctp-tools-devel
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
@@ -898,6 +901,8 @@ Erlang mode for XEmacs (source lisp files).
%patch9 -p1 -b .Patch_removes_support_for_SSLv3_protocol_because_it_
# end of autogenerated prep patch list
+%patch10 -p1
+
# FIXME we should come up with a better solution
# remove shipped zlib sources
#rm -f erts/emulator/zlib/*.[ch]
@@ -2216,6 +2221,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Aug 5 2015 John Eckersberg - 17.4-4
+- Add patch for CVE-2015-2774 - TLS-1.0 POODLE vulnerability (rhbz#1206712)
+
* Wed Jun 17 2015 Fedora Release Engineering - 17.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
diff --git a/otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch b/otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch
new file mode 100644
index 0000000..04dd246
--- /dev/null
+++ b/otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch
@@ -0,0 +1,576 @@
+diff -Naur otp-OTP-17.4.orig/lib/ssl/doc/src/ssl.xml otp-OTP-17.4/lib/ssl/doc/src/ssl.xml
+--- otp-OTP-17.4.orig/lib/ssl/doc/src/ssl.xml 2015-08-05 16:52:39.988500514 -0400
++++ otp-OTP-17.4/lib/ssl/doc/src/ssl.xml 2015-08-05 16:52:50.478441422 -0400
+@@ -4,7 +4,7 @@
+
+
+
+- 19992014
++ 19992015
+ Ericsson AB. All Rights Reserved.
+
+
+@@ -348,11 +348,23 @@
+
+
+
++ {padding_check, boolean()}
++
++
This option only affects TLS-1.0 connections.
++ If set to false it disables the block cipher padding check
++ to be able to interoperate with legacy software.
++
++
++
Using this option makes TLS vulnerable to
++ the Poodle attack
Options described here are client specific or has a slightly different
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/dtls_record.erl otp-OTP-17.4/lib/ssl/src/dtls_record.erl
+--- otp-OTP-17.4.orig/lib/ssl/src/dtls_record.erl 2015-08-05 16:52:39.989500508 -0400
++++ otp-OTP-17.4/lib/ssl/src/dtls_record.erl 2015-08-05 16:52:50.478441422 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
++%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -146,7 +146,7 @@
+ = ConnnectionStates0) ->
+ CompressAlg = SecParams#security_parameters.compression_algorithm,
+ {PlainFragment, Mac, ReadState1} = ssl_record:decipher(dtls_v1:corresponding_tls_version(Version),
+- CipherFragment, ReadState0),
++ CipherFragment, ReadState0, true),
+ MacHash = calc_mac_hash(ReadState1, Type, Version, Epoch, Seq, PlainFragment),
+ case ssl_record:is_correct_mac(Mac, MacHash) of
+ true ->
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/ssl_cipher.erl otp-OTP-17.4/lib/ssl/src/ssl_cipher.erl
+--- otp-OTP-17.4.orig/lib/ssl/src/ssl_cipher.erl 2015-08-05 16:52:39.989500508 -0400
++++ otp-OTP-17.4/lib/ssl/src/ssl_cipher.erl 2015-08-05 16:52:50.479441417 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
++%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -33,8 +33,7 @@
+ -include_lib("public_key/include/public_key.hrl").
+
+ -export([security_parameters/2, security_parameters/3, suite_definition/1,
+- decipher/5, cipher/5,
+- suite/1, suites/1, all_suites/1,
++ decipher/6, cipher/5, suite/1, suites/1, all_suites/1,
+ ec_keyed_suites/0, anonymous_suites/0, psk_suites/1, srp_suites/0,
+ openssl_suite/1, openssl_suite_name/1, filter/2, filter_suites/1,
+ hash_algorithm/1, sign_algorithm/1, is_acceptable_hash/2]).
+@@ -143,17 +142,18 @@
+ {T, CS0#cipher_state{iv=NextIV}}.
+
+ %%--------------------------------------------------------------------
+--spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(), ssl_record:ssl_version()) ->
++-spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(),
++ ssl_record:ssl_version(), boolean()) ->
+ {binary(), binary(), #cipher_state{}} | #alert{}.
+ %%
+ %% Description: Decrypts the data and the MAC using cipher described
+ %% by cipher_enum() and updating the cipher state.
+ %%-------------------------------------------------------------------
+-decipher(?NULL, _HashSz, CipherState, Fragment, _) ->
++decipher(?NULL, _HashSz, CipherState, Fragment, _, _) ->
+ {Fragment, <<>>, CipherState};
+-decipher(?RC4, HashSz, CipherState, Fragment, _) ->
++decipher(?RC4, HashSz, CipherState, Fragment, _, _) ->
+ State0 = case CipherState#cipher_state.state of
+- undefined -> crypto:stream_init(rc4, CipherState#cipher_state.key);
++ undefined -> crypto:stream_init(rc4, CipherState#cipher_state.key);
+ S -> S
+ end,
+ try crypto:stream_decrypt(State0, Fragment) of
+@@ -171,23 +171,23 @@
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ end;
+
+-decipher(?DES, HashSz, CipherState, Fragment, Version) ->
++decipher(?DES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
+ block_decipher(fun(Key, IV, T) ->
+ crypto:block_decrypt(des_cbc, Key, IV, T)
+- end, CipherState, HashSz, Fragment, Version);
+-decipher(?'3DES', HashSz, CipherState, Fragment, Version) ->
++ end, CipherState, HashSz, Fragment, Version, PaddingCheck);
++decipher(?'3DES', HashSz, CipherState, Fragment, Version, PaddingCheck) ->
+ block_decipher(fun(<>, IV, T) ->
+ crypto:block_decrypt(des3_cbc, [K1, K2, K3], IV, T)
+- end, CipherState, HashSz, Fragment, Version);
+-decipher(?AES, HashSz, CipherState, Fragment, Version) ->
++ end, CipherState, HashSz, Fragment, Version, PaddingCheck);
++decipher(?AES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
+ block_decipher(fun(Key, IV, T) when byte_size(Key) =:= 16 ->
+ crypto:block_decrypt(aes_cbc128, Key, IV, T);
+ (Key, IV, T) when byte_size(Key) =:= 32 ->
+ crypto:block_decrypt(aes_cbc256, Key, IV, T)
+- end, CipherState, HashSz, Fragment, Version).
++ end, CipherState, HashSz, Fragment, Version, PaddingCheck).
+
+ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
+- HashSz, Fragment, Version) ->
++ HashSz, Fragment, Version, PaddingCheck) ->
+ try
+ Text = Fun(Key, IV, Fragment),
+ NextIV = next_iv(Fragment, IV),
+@@ -195,7 +195,7 @@
+ Content = GBC#generic_block_cipher.content,
+ Mac = GBC#generic_block_cipher.mac,
+ CipherState1 = CipherState0#cipher_state{iv=GBC#generic_block_cipher.next_iv},
+- case is_correct_padding(GBC, Version) of
++ case is_correct_padding(GBC, Version, PaddingCheck) of
+ true ->
+ {Content, Mac, CipherState1};
+ false ->
+@@ -1288,16 +1288,18 @@
+ #generic_stream_cipher{content=Content,
+ mac=Mac}.
+
+-%% For interoperability reasons we do not check the padding content in
+-%% SSL 3.0 and TLS 1.0 as it is not strictly required and breaks
+-%% interopability with for instance Google.
+ is_correct_padding(#generic_block_cipher{padding_length = Len,
+- padding = Padding}, {3, N})
+- when N == 0; N == 1 ->
+- Len == byte_size(Padding);
+-%% Padding must be check in TLS 1.1 and after
++ padding = Padding}, {3, 0}, _) ->
++ Len == byte_size(Padding); %% Only length check is done in SSL 3.0 spec
++%% For interoperability reasons it is possible to disable
++%% the padding check when using TLS 1.0, as it is not strictly required
++%% in the spec (only recommended), howerver this makes TLS 1.0 vunrable to the Poodle attack
++%% so by default this clause will not match
++is_correct_padding(GenBlockCipher, {3, 1}, false) ->
++ is_correct_padding(GenBlockCipher, {3, 0}, false);
++%% Padding must be checked in TLS 1.1 and after
+ is_correct_padding(#generic_block_cipher{padding_length = Len,
+- padding = Padding}, _) ->
++ padding = Padding}, _, _) ->
+ Len == byte_size(Padding) andalso
+ list_to_binary(lists:duplicate(Len, Len)) == Padding.
+
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/ssl.erl otp-OTP-17.4/lib/ssl/src/ssl.erl
+--- otp-OTP-17.4.orig/lib/ssl/src/ssl.erl 2015-08-05 16:52:39.989500508 -0400
++++ otp-OTP-17.4/lib/ssl/src/ssl.erl 2015-08-05 16:52:50.479441417 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1999-2014. All Rights Reserved.
++%% Copyright Ericsson AB 1999-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -656,7 +656,8 @@
+ log_alert = handle_option(log_alert, Opts, true),
+ server_name_indication = handle_option(server_name_indication, Opts, undefined),
+ honor_cipher_order = handle_option(honor_cipher_order, Opts, false),
+- protocol = proplists:get_value(protocol, Opts, tls)
++ protocol = proplists:get_value(protocol, Opts, tls),
++ padding_check = proplists:get_value(padding_check, Opts, true)
+ },
+
+ CbInfo = proplists:get_value(cb_info, Opts, {gen_tcp, tcp, tcp_closed, tcp_error}),
+@@ -669,7 +670,7 @@
+ cb_info, renegotiate_at, secure_renegotiate, hibernate_after,
+ erl_dist, next_protocols_advertised,
+ client_preferred_next_protocols, log_alert,
+- server_name_indication, honor_cipher_order],
++ server_name_indication, honor_cipher_order, padding_check],
+
+ SockOpts = lists:foldl(fun(Key, PropList) ->
+ proplists:delete(Key, PropList)
+@@ -847,6 +848,8 @@
+ undefined;
+ validate_option(honor_cipher_order, Value) when is_boolean(Value) ->
+ Value;
++validate_option(padding_check, Value) when is_boolean(Value) ->
++ Value;
+ validate_option(Opt, Value) ->
+ throw({error, {options, {Opt, Value}}}).
+
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/ssl_internal.hrl otp-OTP-17.4/lib/ssl/src/ssl_internal.hrl
+--- otp-OTP-17.4.orig/lib/ssl/src/ssl_internal.hrl 2015-08-05 16:52:39.990500503 -0400
++++ otp-OTP-17.4/lib/ssl/src/ssl_internal.hrl 2015-08-05 16:52:50.479441417 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
++%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -117,7 +117,8 @@
+ server_name_indication = undefined,
+ %% Should the server prefer its own cipher order over the one provided by
+ %% the client?
+- honor_cipher_order = false
++ honor_cipher_order = false,
++ padding_check = true
+ }).
+
+ -record(socket_options,
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/ssl_record.erl otp-OTP-17.4/lib/ssl/src/ssl_record.erl
+--- otp-OTP-17.4.orig/lib/ssl/src/ssl_record.erl 2015-08-05 16:52:39.989500508 -0400
++++ otp-OTP-17.4/lib/ssl/src/ssl_record.erl 2015-08-05 16:52:50.479441417 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
++%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -48,7 +48,7 @@
+ -export([compress/3, uncompress/3, compressions/0]).
+
+ %% Payload encryption/decryption
+--export([cipher/4, decipher/3, is_correct_mac/2]).
++-export([cipher/4, decipher/4, is_correct_mac/2]).
+
+ -export_type([ssl_version/0, ssl_atom_version/0]).
+
+@@ -376,8 +376,9 @@
+ {CipherFragment, CipherS1} =
+ ssl_cipher:cipher(BulkCipherAlgo, CipherS0, MacHash, Fragment, Version),
+ {CipherFragment, WriteState0#connection_state{cipher_state = CipherS1}}.
++
+ %%--------------------------------------------------------------------
+--spec decipher(ssl_version(), binary(), #connection_state{}) -> {binary(), binary(), #connection_state{}} | #alert{}.
++-spec decipher(ssl_version(), binary(), #connection_state{}, boolean()) -> {binary(), binary(), #connection_state{}} | #alert{}.
+ %%
+ %% Description: Payload decryption
+ %%--------------------------------------------------------------------
+@@ -387,8 +388,8 @@
+ BulkCipherAlgo,
+ hash_size = HashSz},
+ cipher_state = CipherS0
+- } = ReadState) ->
+- case ssl_cipher:decipher(BulkCipherAlgo, HashSz, CipherS0, CipherFragment, Version) of
++ } = ReadState, PaddingCheck) ->
++ case ssl_cipher:decipher(BulkCipherAlgo, HashSz, CipherS0, CipherFragment, Version, PaddingCheck) of
+ {PlainFragment, Mac, CipherS1} ->
+ CS1 = ReadState#connection_state{cipher_state = CipherS1},
+ {PlainFragment, Mac, CS1};
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/tls_connection.erl otp-OTP-17.4/lib/ssl/src/tls_connection.erl
+--- otp-OTP-17.4.orig/lib/ssl/src/tls_connection.erl 2015-08-05 16:52:39.990500503 -0400
++++ otp-OTP-17.4/lib/ssl/src/tls_connection.erl 2015-08-05 16:52:50.479441417 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
++%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -482,8 +482,9 @@
+ next_record(#state{protocol_buffers =
+ #protocol_buffers{tls_packets = [], tls_cipher_texts = [CT | Rest]}
+ = Buffers,
+- connection_states = ConnStates0} = State) ->
+- case tls_record:decode_cipher_text(CT, ConnStates0) of
++ connection_states = ConnStates0,
++ ssl_options = #ssl_options{padding_check = Check}} = State) ->
++ case tls_record:decode_cipher_text(CT, ConnStates0, Check) of
+ {Plain, ConnStates} ->
+ {Plain, State#state{protocol_buffers =
+ Buffers#protocol_buffers{tls_cipher_texts = Rest},
+diff -Naur otp-OTP-17.4.orig/lib/ssl/src/tls_record.erl otp-OTP-17.4/lib/ssl/src/tls_record.erl
+--- otp-OTP-17.4.orig/lib/ssl/src/tls_record.erl 2015-08-05 16:52:39.990500503 -0400
++++ otp-OTP-17.4/lib/ssl/src/tls_record.erl 2015-08-05 16:52:50.480441411 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
++%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -34,7 +34,7 @@
+ -export([get_tls_records/2]).
+
+ %% Decoding
+--export([decode_cipher_text/2]).
++-export([decode_cipher_text/3]).
+
+ %% Encoding
+ -export([encode_plain_text/4]).
+@@ -142,19 +142,21 @@
+ {CipherText, ConnectionStates#connection_states{current_write = WriteState#connection_state{sequence_number = Seq +1}}}.
+
+ %%--------------------------------------------------------------------
+--spec decode_cipher_text(#ssl_tls{}, #connection_states{}) ->
++-spec decode_cipher_text(#ssl_tls{}, #connection_states{}, boolean()) ->
+ {#ssl_tls{}, #connection_states{}}| #alert{}.
+ %%
+ %% Description: Decode cipher text
+ %%--------------------------------------------------------------------
+ decode_cipher_text(#ssl_tls{type = Type, version = Version,
+- fragment = CipherFragment} = CipherText, ConnnectionStates0) ->
+- ReadState0 = ConnnectionStates0#connection_states.current_read,
+- #connection_state{compression_state = CompressionS0,
+- sequence_number = Seq,
+- security_parameters = SecParams} = ReadState0,
+- CompressAlg = SecParams#security_parameters.compression_algorithm,
+- case ssl_record:decipher(Version, CipherFragment, ReadState0) of
++ fragment = CipherFragment} = CipherText,
++ #connection_states{current_read =
++ #connection_state{
++ compression_state = CompressionS0,
++ sequence_number = Seq,
++ security_parameters=
++ #security_parameters{compression_algorithm = CompressAlg}
++ } = ReadState0} = ConnnectionStates0, PaddingCheck) ->
++ case ssl_record:decipher(Version, CipherFragment, ReadState0, PaddingCheck) of
+ {PlainFragment, Mac, ReadState1} ->
+ MacHash = calc_mac_hash(Type, Version, PlainFragment, ReadState1),
+ case ssl_record:is_correct_mac(Mac, MacHash) of
+diff -Naur otp-OTP-17.4.orig/lib/ssl/test/ssl_cipher_SUITE.erl otp-OTP-17.4/lib/ssl/test/ssl_cipher_SUITE.erl
+--- otp-OTP-17.4.orig/lib/ssl/test/ssl_cipher_SUITE.erl 2015-08-05 16:52:39.990500503 -0400
++++ otp-OTP-17.4/lib/ssl/test/ssl_cipher_SUITE.erl 2015-08-05 16:52:50.480441411 -0400
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
++%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -38,7 +38,7 @@
+ suite() -> [{ct_hooks,[ts_install_cth]}].
+
+ all() ->
+- [aes_decipher_good, aes_decipher_good_tls11, aes_decipher_fail, aes_decipher_fail_tls11].
++ [aes_decipher_good, aes_decipher_fail, padding_test].
+
+ groups() ->
+ [].
+@@ -73,93 +73,123 @@
+ %% Test Cases --------------------------------------------------------
+ %%--------------------------------------------------------------------
+ aes_decipher_good() ->
+- [{doc,"Decipher a known cryptotext."}].
++ [{doc,"Decipher a known cryptotext using a correct key"}].
+
+ aes_decipher_good(Config) when is_list(Config) ->
+ HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Content = <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56, "HELLO\n">>,
+- Mac = <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>,
+- Version = {3,0},
+- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- Version1 = {3,1},
+- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- ok.
+-
+-%%--------------------------------------------------------------------
+-
+-aes_decipher_good_tls11() ->
+- [{doc,"Decipher a known TLS 1.1 cryptotext."}].
+-
+-%% the fragment is actuall a TLS 1.1 record, with
+-%% Version = TLS 1.1, we get the correct NextIV in #cipher_state
+-aes_decipher_good_tls11(Config) when is_list(Config) ->
+- HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Content = <<"HELLO\n">>,
+- NextIV = <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>,
+- Mac = <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>,
+- Version = {3,2},
+- {Content, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- Version1 = {3,2},
+- {Content, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- ok.
++ CipherState = correct_cipher_state(),
++ decipher_check_good(HashSz, CipherState, {3,0}),
++ decipher_check_good(HashSz, CipherState, {3,1}),
++ decipher_check_good(HashSz, CipherState, {3,2}),
++ decipher_check_good(HashSz, CipherState, {3,3}).
+
+ %%--------------------------------------------------------------------
+
+ aes_decipher_fail() ->
+- [{doc,"Decipher a known cryptotext."}].
++ [{doc,"Decipher a known cryptotext using a incorrect key"}].
+
+-%% same as above, last byte of key replaced
+ aes_decipher_fail(Config) when is_list(Config) ->
+ HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Version = {3,0},
+- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- 32 = byte_size(Content),
+- 32 = byte_size(Mac),
+- Version1 = {3,1},
+- {Content1, Mac1, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- 32 = byte_size(Content1),
+- 32 = byte_size(Mac1),
+- ok.
+
+-%%--------------------------------------------------------------------
+-
+-aes_decipher_fail_tls11() ->
+- [{doc,"Decipher a known TLS 1.1 cryptotext."}].
+-
+-%% same as above, last byte of key replaced
+-%% stricter padding checks in TLS 1.1 mean we get an alert instead
+-aes_decipher_fail_tls11(Config) when is_list(Config) ->
+- HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Version = {3,2},
+- #alert{level = ?FATAL, description = ?BAD_RECORD_MAC} =
+- ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- Version1 = {3,3},
+- #alert{level = ?FATAL, description = ?BAD_RECORD_MAC} =
+- ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- ok.
+-
+-%%--------------------------------------------------------------------
++ CipherState = incorrect_cipher_state(),
++ decipher_check_fail(HashSz, CipherState, {3,0}),
++ decipher_check_fail(HashSz, CipherState, {3,1}),
++ decipher_check_fail(HashSz, CipherState, {3,2}),
++ decipher_check_fail(HashSz, CipherState, {3,3}).
++
++%%--------------------------------------------------------------------
++padding_test(Config) when is_list(Config) ->
++ HashSz = 16,
++ CipherState = correct_cipher_state(),
++ pad_test(HashSz, CipherState, {3,0}),
++ pad_test(HashSz, CipherState, {3,1}),
++ pad_test(HashSz, CipherState, {3,2}),
++ pad_test(HashSz, CipherState, {3,3}).
++
++%%--------------------------------------------------------------------
++% Internal functions --------------------------------------------------------
++%%--------------------------------------------------------------------
++decipher_check_good(HashSz, CipherState, Version) ->
++ {Content, NextIV, Mac} = content_nextiv_mac(Version),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES, HashSz, CipherState, aes_fragment(Version), Version, true).
++
++decipher_check_fail(HashSz, CipherState, Version) ->
++ {Content, NextIV, Mac} = content_nextiv_mac(Version),
++ true = {Content, Mac, #cipher_state{iv = NextIV}} =/=
++ ssl_cipher:decipher(?AES, HashSz, CipherState, aes_fragment(Version), Version, true).
++
++pad_test(HashSz, CipherState, {3,0} = Version) ->
++ %% 3.0 does not have padding test
++ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,0}), {3,0}, true),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,0}), {3,0}, false);
++pad_test(HashSz, CipherState, {3,1} = Version) ->
++ %% 3.1 should have padding test, but may be disabled
++ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
++ BadCont = badpad_content(Content),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,1}) , {3,1}, false),
++ {BadCont, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES, HashSz, CipherState, badpad_aes_fragment({3,1}), {3,1}, true);
++pad_test(HashSz, CipherState, Version) ->
++ %% 3.2 and 3.3 must have padding test
++ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
++ BadCont = badpad_content(Content),
++ {BadCont, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState,
++ badpad_aes_fragment(Version), Version, false),
++ {BadCont, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState,
++ badpad_aes_fragment(Version), Version, true).
++
++aes_fragment({3,N}) when N == 0; N == 1->
++ <<197,9,6,109,242,87,80,154,85,250,110,81,119,95,65,185,53,206,216,153,246,169,
++ 119,177,178,238,248,174,253,220,242,81,33,0,177,251,91,44,247,53,183,198,165,
++ 63,20,194,159,107>>;
++
++aes_fragment(_) ->
++ <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
++ 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
++ 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
++ 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>.
++
++badpad_aes_fragment({3,N}) when N == 0; N == 1 ->
++ <<186,139,125,10,118,21,26,248,120,108,193,104,87,118,145,79,225,55,228,10,105,
++ 30,190,37,1,88,139,243,210,99,65,41>>;
++badpad_aes_fragment(_) ->
++ <<137,31,14,77,228,80,76,103,183,125,55,250,68,190,123,131,117,23,229,180,207,
++ 94,121,137,117,157,109,99,113,61,190,138,131,229,201,120,142,179,172,48,77,
++ 234,19,240,33,38,91,93>>.
++
++content_nextiv_mac({3,N}) when N == 0; N == 1 ->
++ {<<"HELLO\n">>,
++ <<33,0, 177,251, 91,44, 247,53, 183,198, 165,63, 20,194, 159,107>>,
++ <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>};
++content_nextiv_mac(_) ->
++ {<<"HELLO\n">>,
++ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>,
++ <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>}.
++
++badpad_content_nextiv_mac({3,N}) when N == 0; N == 1 ->
++ {<<"HELLO\n">>,
++ <<225,55,228,10,105,30,190,37,1,88,139,243,210,99,65,41>>,
++ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>
++ };
++badpad_content_nextiv_mac(_) ->
++ {<<"HELLO\n">>,
++ <<133,211,45,189,179,229,56,86,11,178,239,159,14,160,253,140>>,
++ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>
++ }.
++
++badpad_content(Content) ->
++ %% BadContent will fail mac test
++ <<16#F0, Content/binary>>.
++
++correct_cipher_state() ->
++ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
++ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>}.
++
++incorrect_cipher_state() ->
++ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
++ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>}.
From 686f250c6fba552ce0c4fb13a67c0768978a56d6 Mon Sep 17 00:00:00 2001
From: John Eckersberg
Date: Fri, 7 Aug 2015 11:43:21 -0400
Subject: [PATCH 017/305] Add patch for CVE-2015-2774 - TLS-1.0 POODLE
vulnerability (rhbz#1206712)
---
erlang.spec | 10 +-
...-1-backport-of-TLS-1.0-padding-check.patch | 581 ++++++++++++++++++
2 files changed, 590 insertions(+), 1 deletion(-)
create mode 100644 otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
diff --git a/erlang.spec b/erlang.spec
index 14887e4..e8215a9 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.10%{?dist}
+Release: %{upstream_rel_for_rpm}.11%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -115,6 +115,9 @@ Patch18: otp-0018-Introduce-os-getenv-2.patch
Patch19: otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
# end of autogenerated patch tag list
+# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-2774
+Patch99: otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
+
BuildRequires: lksctp-tools-devel
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
@@ -999,6 +1002,8 @@ Erlang mode for XEmacs (source lisp files).
%patch19 -p1 -b .Patch_removes_support_for_SSLv3_protocol_because_it_
# end of autogenerated prep patch list
+%patch99 -p1
+
# FIXME we should come up with a better solution
# remove shipped zlib sources
#rm -f erts/emulator/zlib/*.[ch]
@@ -2328,6 +2333,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Fri Aug 7 2015 John Eckersberg - R16B-03.11
+- Add patch for CVE-2015-2774 - TLS-1.0 POODLE vulnerability (rhbz#1206712)
+
* Mon Dec 01 2014 Peter Lemenkov - R16B-03.10
- Disable SSLv3 (see rhbz #1169375)
- Backport useful os:getenv/2 from master (see https://github.com/erlang/otp/pull/535 )
diff --git a/otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch b/otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
new file mode 100644
index 0000000..ce93920
--- /dev/null
+++ b/otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
@@ -0,0 +1,581 @@
+From 690bc386543e193d93b359d36ca19ae92af691bd Mon Sep 17 00:00:00 2001
+From: John Eckersberg
+Date: Fri, 7 Aug 2015 11:39:27 -0400
+Subject: [PATCH] R16B03-1 backport of TLS-1.0 padding check
+
+commit 519b07bca04bdd8585b48f2de6b7124ca6455358
+Author: Ingela Anderton Andin
+Date: Tue Jan 13 15:16:20 2015 +0100
+
+ ssl: Reenable padding check for TLS-1.0 and provide backwards compatible
+ disable option
+---
+ lib/ssl/doc/src/ssl.xml | 18 +++-
+ lib/ssl/src/dtls_record.erl | 4 +-
+ lib/ssl/src/ssl.erl | 8 +-
+ lib/ssl/src/ssl_cipher.erl | 43 +++++----
+ lib/ssl/src/ssl_internal.hrl | 3 +-
+ lib/ssl/src/ssl_record.erl | 10 +-
+ lib/ssl/src/tls_connection.erl | 7 +-
+ lib/ssl/src/tls_record.erl | 33 ++++++-
+ lib/ssl/test/ssl_cipher_SUITE.erl | 189 ++++++++++++++++++++++----------------
+ 9 files changed, 196 insertions(+), 119 deletions(-)
+
+diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
+index 1d74faf..8184edc 100644
+--- a/lib/ssl/doc/src/ssl.xml
++++ b/lib/ssl/doc/src/ssl.xml
+@@ -334,11 +334,23 @@ fun(srp, Username :: string(), UserState :: term()) ->
+
+
+
++ {padding_check, boolean()}
++
++
This option only affects TLS-1.0 connections.
++ If set to false it disables the block cipher padding check
++ to be able to interoperate with legacy software.
++
++
++
Using this option makes TLS vulnerable to
++ the Poodle attack
Options described here are client specific or has a slightly different
+diff --git a/lib/ssl/src/dtls_record.erl b/lib/ssl/src/dtls_record.erl
+index b0a7976..49dc9d7 100644
+--- a/lib/ssl/src/dtls_record.erl
++++ b/lib/ssl/src/dtls_record.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
++%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -140,7 +140,7 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
+ = ConnnectionStates0) ->
+ CompressAlg = SecParams#security_parameters.compression_algorithm,
+ {PlainFragment, Mac, ReadState1} = ssl_record:decipher(dtls_v1:corresponding_tls_version(Version),
+- CipherFragment, ReadState0),
++ CipherFragment, ReadState0, true),
+ MacHash = calc_mac_hash(Type, Version, Epoch, Seq, PlainFragment, ReadState1),
+ case ssl_record:is_correct_mac(Mac, MacHash) of
+ true ->
+diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
+index a7fd9f5..802d29d 100644
+--- a/lib/ssl/src/ssl.erl
++++ b/lib/ssl/src/ssl.erl
+@@ -640,7 +640,8 @@ handle_options(Opts0, _Role) ->
+ make_next_protocol_selector(
+ handle_option(client_preferred_next_protocols, Opts, undefined)),
+ log_alert = handle_option(log_alert, Opts, true),
+- server_name_indication = handle_option(server_name_indication, Opts, undefined)
++ server_name_indication = handle_option(server_name_indication, Opts, undefined),
++ padding_check = proplists:get_value(padding_check, Opts, true)
+ },
+
+ CbInfo = proplists:get_value(cb_info, Opts, {gen_tcp, tcp, tcp_closed, tcp_error}),
+@@ -652,7 +653,8 @@ handle_options(Opts0, _Role) ->
+ reuse_session, reuse_sessions, ssl_imp,
+ cb_info, renegotiate_at, secure_renegotiate, hibernate_after,
+ erl_dist, next_protocols_advertised,
+- client_preferred_next_protocols, log_alert, server_name_indication],
++ client_preferred_next_protocols, log_alert, server_name_indication,
++ padding_check],
+
+ SockOpts = lists:foldl(fun(Key, PropList) ->
+ proplists:delete(Key, PropList)
+@@ -840,6 +842,8 @@ validate_option(server_name_indication, disable) ->
+ disable;
+ validate_option(server_name_indication, undefined) ->
+ undefined;
++validate_option(padding_check, Value) when is_boolean(Value) ->
++ Value;
+ validate_option(Opt, Value) ->
+ throw({error, {options, {Opt, Value}}}).
+
+diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
+index b2077c6..e546e37 100644
+--- a/lib/ssl/src/ssl_cipher.erl
++++ b/lib/ssl/src/ssl_cipher.erl
+@@ -33,7 +33,7 @@
+ -include_lib("public_key/include/public_key.hrl").
+
+ -export([security_parameters/2, security_parameters/3, suite_definition/1,
+- decipher/5, cipher/5,
++ decipher/6, cipher/5,
+ suite/1, suites/1, ec_keyed_suites/0, anonymous_suites/0, psk_suites/1, srp_suites/0,
+ openssl_suite/1, openssl_suite_name/1, filter/2, filter_suites/1,
+ hash_algorithm/1, sign_algorithm/1, is_acceptable_hash/2]).
+@@ -127,15 +127,16 @@ block_cipher(Fun, BlockSz, #cipher_state{key=Key, iv=IV} = CS0,
+ {T, CS0#cipher_state{iv=NextIV}}.
+
+ %%--------------------------------------------------------------------
+--spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(), tls_version()) ->
++-spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(),
++ tls_version(), boolean()) ->
+ {binary(), binary(), #cipher_state{}} | #alert{}.
+ %%
+ %% Description: Decrypts the data and the MAC using cipher described
+ %% by cipher_enum() and updating the cipher state.
+ %%-------------------------------------------------------------------
+-decipher(?NULL, _HashSz, CipherState, Fragment, _) ->
++decipher(?NULL, _HashSz, CipherState, Fragment, _, _) ->
+ {Fragment, <<>>, CipherState};
+-decipher(?RC4, HashSz, CipherState, Fragment, _) ->
++decipher(?RC4, HashSz, CipherState, Fragment, _, _) ->
+ State0 = case CipherState#cipher_state.state of
+ undefined -> crypto:stream_init(rc4, CipherState#cipher_state.key);
+ S -> S
+@@ -155,23 +156,23 @@ decipher(?RC4, HashSz, CipherState, Fragment, _) ->
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ end;
+
+-decipher(?DES, HashSz, CipherState, Fragment, Version) ->
++decipher(?DES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
+ block_decipher(fun(Key, IV, T) ->
+ crypto:block_decrypt(des_cbc, Key, IV, T)
+- end, CipherState, HashSz, Fragment, Version);
+-decipher(?'3DES', HashSz, CipherState, Fragment, Version) ->
++ end, CipherState, HashSz, Fragment, Version, PaddingCheck);
++decipher(?'3DES', HashSz, CipherState, Fragment, Version, PaddingCheck) ->
+ block_decipher(fun(<>, IV, T) ->
+ crypto:block_decrypt(des3_cbc, [K1, K2, K3], IV, T)
+- end, CipherState, HashSz, Fragment, Version);
+-decipher(?AES, HashSz, CipherState, Fragment, Version) ->
++ end, CipherState, HashSz, Fragment, Version, PaddingCheck);
++decipher(?AES, HashSz, CipherState, Fragment, Version, PaddingCheck) ->
+ block_decipher(fun(Key, IV, T) when byte_size(Key) =:= 16 ->
+ crypto:block_decrypt(aes_cbc128, Key, IV, T);
+ (Key, IV, T) when byte_size(Key) =:= 32 ->
+ crypto:block_decrypt(aes_cbc256, Key, IV, T)
+- end, CipherState, HashSz, Fragment, Version).
++ end, CipherState, HashSz, Fragment, Version, PaddingCheck).
+
+ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
+- HashSz, Fragment, Version) ->
++ HashSz, Fragment, Version, PaddingCheck) ->
+ try
+ Text = Fun(Key, IV, Fragment),
+ NextIV = next_iv(Fragment, IV),
+@@ -179,7 +180,7 @@ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
+ Content = GBC#generic_block_cipher.content,
+ Mac = GBC#generic_block_cipher.mac,
+ CipherState1 = CipherState0#cipher_state{iv=GBC#generic_block_cipher.next_iv},
+- case is_correct_padding(GBC, Version) of
++ case is_correct_padding(GBC, Version, PaddingCheck) of
+ true ->
+ {Content, Mac, CipherState1};
+ false ->
+@@ -1266,16 +1267,18 @@ generic_stream_cipher_from_bin(T, HashSz) ->
+ #generic_stream_cipher{content=Content,
+ mac=Mac}.
+
+-%% For interoperability reasons we do not check the padding content in
+-%% SSL 3.0 and TLS 1.0 as it is not strictly required and breaks
+-%% interopability with for instance Google.
+ is_correct_padding(#generic_block_cipher{padding_length = Len,
+- padding = Padding}, {3, N})
+- when N == 0; N == 1 ->
+- Len == byte_size(Padding);
+-%% Padding must be check in TLS 1.1 and after
++ padding = Padding}, {3, 0}, _) ->
++ Len == byte_size(Padding); %% Only length check is done in SSL 3.0 spec
++%% For interoperability reasons it is possible to disable
++%% the padding check when using TLS 1.0, as it is not strictly required
++%% in the spec (only recommended), howerver this makes TLS 1.0 vunrable to the Poodle attack
++%% so by default this clause will not match
++is_correct_padding(GenBlockCipher, {3, 1}, false) ->
++ is_correct_padding(GenBlockCipher, {3, 0}, false);
++%% Padding must be checked in TLS 1.1 and after
+ is_correct_padding(#generic_block_cipher{padding_length = Len,
+- padding = Padding}, _) ->
++ padding = Padding}, _, _) ->
+ Len == byte_size(Padding) andalso
+ list_to_binary(lists:duplicate(Len, Len)) == Padding.
+
+diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
+index 0186f9f..c25c8f1 100644
+--- a/lib/ssl/src/ssl_internal.hrl
++++ b/lib/ssl/src/ssl_internal.hrl
+@@ -114,7 +114,8 @@
+ next_protocols_advertised = undefined, %% [binary()],
+ next_protocol_selector = undefined, %% fun([binary()]) -> binary())
+ log_alert :: boolean(),
+- server_name_indication = undefined
++ server_name_indication = undefined,
++ padding_check = true
+ }).
+
+ -record(config, {ssl, %% SSL parameters
+diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
+index 018c8be..ed9efe2 100644
+--- a/lib/ssl/src/ssl_record.erl
++++ b/lib/ssl/src/ssl_record.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
++%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -48,7 +48,7 @@
+ -export([compress/3, uncompress/3, compressions/0]).
+
+ %% Payload encryption/decryption
+--export([cipher/4, decipher/3, is_correct_mac/2]).
++-export([cipher/4, decipher/4, is_correct_mac/2]).
+
+ %%====================================================================
+ %% Internal application API
+@@ -372,7 +372,7 @@ cipher(Version, Fragment,
+ ssl_cipher:cipher(BulkCipherAlgo, CipherS0, MacHash, Fragment, Version),
+ {CipherFragment, WriteState0#connection_state{cipher_state = CipherS1}}.
+ %%--------------------------------------------------------------------
+--spec decipher(tls_version(), binary(), #connection_state{}) -> {binary(), binary(), #connection_state{}}.
++-spec decipher(tls_version(), binary(), #connection_state{}, boolean()) -> {binary(), binary(), #connection_state{}}.
+ %%
+ %% Description: Payload decryption
+ %%--------------------------------------------------------------------
+@@ -382,8 +382,8 @@ decipher(Version, CipherFragment,
+ BulkCipherAlgo,
+ hash_size = HashSz},
+ cipher_state = CipherS0
+- } = ReadState) ->
+- case ssl_cipher:decipher(BulkCipherAlgo, HashSz, CipherS0, CipherFragment, Version) of
++ } = ReadState, PaddingCheck) ->
++ case ssl_cipher:decipher(BulkCipherAlgo, HashSz, CipherS0, CipherFragment, Version, PaddingCheck) of
+ {PlainFragment, Mac, CipherS1} ->
+ CS1 = ReadState#connection_state{cipher_state = CipherS1},
+ {PlainFragment, Mac, CS1};
+diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
+index ffa04ee..007c9b1 100644
+--- a/lib/ssl/src/tls_connection.erl
++++ b/lib/ssl/src/tls_connection.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
++%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -499,8 +499,9 @@ next_record(#state{protocol_buffers = #protocol_buffers{tls_packets = [], tls_ci
+ next_record(#state{protocol_buffers =
+ #protocol_buffers{tls_packets = [], tls_cipher_texts = [CT | Rest]}
+ = Buffers,
+- connection_states = ConnStates0} = State) ->
+- case tls_record:decode_cipher_text(CT, ConnStates0) of
++ connection_states = ConnStates0,
++ ssl_options = #ssl_options{padding_check = Check}} = State) ->
++ case tls_record:decode_cipher_text(CT, ConnStates0, Check) of
+ {Plain, ConnStates} ->
+ {Plain, State#state{protocol_buffers =
+ Buffers#protocol_buffers{tls_cipher_texts = Rest},
+diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl
+index 8810755..dcf03b4 100644
+--- a/lib/ssl/src/tls_record.erl
++++ b/lib/ssl/src/tls_record.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
++%% Copyright Ericsson AB 2007-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -34,7 +34,7 @@
+ -export([get_tls_records/2]).
+
+ %% Decoding
+--export([decode_cipher_text/2]).
++-export([decode_cipher_text/3]).
+
+ %% Encoding
+ -export([encode_plain_text/4]).
+@@ -137,7 +137,7 @@ encode_plain_text(Type, Version, Data,
+ {CipherText, ConnectionStates#connection_states{current_write = WriteState#connection_state{sequence_number = Seq +1}}}.
+
+ %%--------------------------------------------------------------------
+--spec decode_cipher_text(#ssl_tls{}, #connection_states{}) ->
++-spec decode_cipher_text(#ssl_tls{}, #connection_states{}, boolean()) ->
+ {#ssl_tls{}, #connection_states{}}| #alert{}.
+ %%
+ %% Description: Decode cipher text
+@@ -164,6 +164,33 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ end.
+
++decode_cipher_text(#ssl_tls{type = Type, version = Version,
++ fragment = CipherFragment} = CipherText,
++ #connection_states{current_read =
++ #connection_state{
++ compression_state = CompressionS0,
++ sequence_number = Seq,
++ security_parameters=
++ #security_parameters{compression_algorithm=CompAlg}
++ } = ReadState0} = ConnnectionStates0, PaddingCheck) ->
++ case ssl_record:decipher(Version, CipherFragment, ReadState0, PaddingCheck) of
++ {PlainFragment, Mac, ReadState1} ->
++ MacHash = calc_mac_hash(Type, Version, PlainFragment, ReadState1),
++ case ssl_record:is_correct_mac(Mac, MacHash) of
++ true ->
++ {Plain, CompressionS1} = ssl_record:uncompress(CompAlg,
++ PlainFragment, CompressionS0),
++ ConnnectionStates = ConnnectionStates0#connection_states{
++ current_read = ReadState1#connection_state{
++ sequence_number = Seq + 1,
++ compression_state = CompressionS1}},
++ {CipherText#ssl_tls{fragment = Plain}, ConnnectionStates};
++ false ->
++ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
++ end;
++ #alert{} = Alert ->
++ Alert
++ end.
+ %%--------------------------------------------------------------------
+ -spec protocol_version(tls_atom_version() | tls_version()) ->
+ tls_version() | tls_atom_version().
+diff --git a/lib/ssl/test/ssl_cipher_SUITE.erl b/lib/ssl/test/ssl_cipher_SUITE.erl
+index 45e9178..3433f9a 100644
+--- a/lib/ssl/test/ssl_cipher_SUITE.erl
++++ b/lib/ssl/test/ssl_cipher_SUITE.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
++%% Copyright Ericsson AB 2008-2015. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -38,7 +38,7 @@
+ suite() -> [{ct_hooks,[ts_install_cth]}].
+
+ all() ->
+- [aes_decipher_good, aes_decipher_good_tls11, aes_decipher_fail, aes_decipher_fail_tls11].
++ [aes_decipher_good, aes_decipher_fail, padding_test].
+
+ groups() ->
+ [].
+@@ -73,93 +73,122 @@ end_per_testcase(_TestCase, Config) ->
+ %% Test Cases --------------------------------------------------------
+ %%--------------------------------------------------------------------
+ aes_decipher_good() ->
+- [{doc,"Decipher a known cryptotext."}].
++ [{doc,"Decipher a known cryptotext using a correct key"}].
+
+ aes_decipher_good(Config) when is_list(Config) ->
+ HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Content = <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56, "HELLO\n">>,
+- Mac = <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>,
+- Version = {3,0},
+- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- Version1 = {3,1},
+- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- ok.
++ CipherState = correct_cipher_state(),
++ decipher_check_good(HashSz, CipherState, {3,0}),
++ decipher_check_good(HashSz, CipherState, {3,1}),
++ decipher_check_good(HashSz, CipherState, {3,2}),
++ decipher_check_good(HashSz, CipherState, {3,3}).
+
+ %%--------------------------------------------------------------------
+-
+-aes_decipher_good_tls11() ->
+- [{doc,"Decipher a known TLS 1.1 cryptotext."}].
+-
+-%% the fragment is actuall a TLS 1.1 record, with
+-%% Version = TLS 1.1, we get the correct NextIV in #cipher_state
+-aes_decipher_good_tls11(Config) when is_list(Config) ->
+- HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Content = <<"HELLO\n">>,
+- NextIV = <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>,
+- Mac = <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>,
+- Version = {3,2},
+- {Content, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- Version1 = {3,2},
+- {Content, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- ok.
+-
+-%%--------------------------------------------------------------------
+-
+ aes_decipher_fail() ->
+- [{doc,"Decipher a known cryptotext."}].
++ [{doc,"Decipher a known cryptotext using a incorrect key"}].
+
+-%% same as above, last byte of key replaced
+ aes_decipher_fail(Config) when is_list(Config) ->
+ HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Version = {3,0},
+- {Content, Mac, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- 32 = byte_size(Content),
+- 32 = byte_size(Mac),
+- Version1 = {3,1},
+- {Content1, Mac1, _} = ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- 32 = byte_size(Content1),
+- 32 = byte_size(Mac1),
+- ok.
++ CipherState = incorrect_cipher_state(),
++ decipher_check_fail(HashSz, CipherState, {3,0}),
++ decipher_check_fail(HashSz, CipherState, {3,1}),
++ decipher_check_fail(HashSz, CipherState, {3,2}),
++ decipher_check_fail(HashSz, CipherState, {3,3}).
+
+ %%--------------------------------------------------------------------
+-
+-aes_decipher_fail_tls11() ->
+- [{doc,"Decipher a known TLS 1.1 cryptotext."}].
+-
+-%% same as above, last byte of key replaced
+-%% stricter padding checks in TLS 1.1 mean we get an alert instead
+-aes_decipher_fail_tls11(Config) when is_list(Config) ->
+- HashSz = 32,
+- CipherState = #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+- key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>},
+- Fragment = <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
+- 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
+- 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
+- 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>,
+- Version = {3,2},
+- #alert{level = ?FATAL, description = ?BAD_RECORD_MAC} =
+- ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version),
+- Version1 = {3,3},
+- #alert{level = ?FATAL, description = ?BAD_RECORD_MAC} =
+- ssl_cipher:decipher(?AES, HashSz, CipherState, Fragment, Version1),
+- ok.
+-
++padding_test(Config) when is_list(Config) ->
++ HashSz = 16,
++ CipherState = correct_cipher_state(),
++ pad_test(HashSz, CipherState, {3,0}),
++ pad_test(HashSz, CipherState, {3,1}),
++ pad_test(HashSz, CipherState, {3,2}),
++ pad_test(HashSz, CipherState, {3,3}).
++
++%%--------------------------------------------------------------------
++% Internal functions --------------------------------------------------------
+ %%--------------------------------------------------------------------
++decipher_check_good(HashSz, CipherState, Version) ->
++ {Content, NextIV, Mac} = content_nextiv_mac(Version),
++ {Content, Mac, _} =
++ ssl_cipher:decipher(?AES_CBC, HashSz, CipherState, aes_fragment(Version), Version, true).
++
++decipher_check_fail(HashSz, CipherState, Version) ->
++ {Content, NextIV, Mac} = content_nextiv_mac(Version),
++ true = {Content, Mac, #cipher_state{iv = NextIV}} =/=
++ ssl_cipher:decipher(?AES_CBC, HashSz, CipherState, aes_fragment(Version), Version, true).
++
++pad_test(HashSz, CipherState, {3,0} = Version) ->
++ %% 3.0 does not have padding test
++ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES_CBC, HashSz, CipherState, badpad_aes_fragment({3,0}), {3,0}, true),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES_CBC, HashSz, CipherState, badpad_aes_fragment({3,0}), {3,0}, false);
++pad_test(HashSz, CipherState, {3,1} = Version) ->
++ %% 3.1 should have padding test, but may be disabled
++ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
++ BadCont = badpad_content(Content),
++ {Content, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES_CBC, HashSz, CipherState, badpad_aes_fragment({3,1}) , {3,1}, false),
++ {BadCont, Mac, #cipher_state{iv = NextIV}} =
++ ssl_cipher:decipher(?AES_CBC, HashSz, CipherState, badpad_aes_fragment({3,1}), {3,1}, true);
++pad_test(HashSz, CipherState, Version) ->
++ %% 3.2 and 3.3 must have padding test
++ {Content, NextIV, Mac} = badpad_content_nextiv_mac(Version),
++ BadCont = badpad_content(Content),
++ {BadCont, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES_CBC, HashSz, CipherState,
++ badpad_aes_fragment(Version), Version, false),
++ {BadCont, Mac, #cipher_state{iv = NextIV}} = ssl_cipher:decipher(?AES_CBC, HashSz, CipherState,
++ badpad_aes_fragment(Version), Version, true).
++
++aes_fragment({3,N}) when N == 0; N == 1->
++ <<197,9,6,109,242,87,80,154,85,250,110,81,119,95,65,185,53,206,216,153,246,169,
++ 119,177,178,238,248,174,253,220,242,81,33,0,177,251,91,44,247,53,183,198,165,
++ 63,20,194,159,107>>;
++
++aes_fragment(_) ->
++ <<220,193,179,139,171,33,143,245,202,47,123,251,13,232,114,8,
++ 190,162,74,31,186,227,119,155,94,74,119,79,169,193,240,160,
++ 198,181,81,19,98,162,213,228,74,224,253,168,156,59,195,122,
++ 108,101,107,242,20,15,169,150,163,107,101,94,93,104,241,165>>.
++
++badpad_aes_fragment({3,N}) when N == 0; N == 1 ->
++ <<186,139,125,10,118,21,26,248,120,108,193,104,87,118,145,79,225,55,228,10,105,
++ 30,190,37,1,88,139,243,210,99,65,41>>;
++badpad_aes_fragment(_) ->
++ <<137,31,14,77,228,80,76,103,183,125,55,250,68,190,123,131,117,23,229,180,207,
++ 94,121,137,117,157,109,99,113,61,190,138,131,229,201,120,142,179,172,48,77,
++ 234,19,240,33,38,91,93>>.
++
++content_nextiv_mac({3,N}) when N == 0; N == 1 ->
++ {<<"HELLO\n">>,
++ <<72,196,247,97,62,213,222,109,210,204,217,186,172,184, 197,148>>,
++ <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>};
++content_nextiv_mac(_) ->
++ {<<"HELLO\n">>,
++ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>,
++ <<71,136,212,107,223,200,70,232,127,116,148,205,232,35,158,113,237,174,15,217,192,168,35,8,6,107,107,233,25,174,90,111>>}.
++
++badpad_content_nextiv_mac({3,N}) when N == 0; N == 1 ->
++ {<<"HELLO\n">>,
++ <<225,55,228,10,105,30,190,37,1,88,139,243,210,99,65,41>>,
++ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>
++ };
++badpad_content_nextiv_mac(_) ->
++ {<<"HELLO\n">>,
++ <<133,211,45,189,179,229,56,86,11,178,239,159,14,160,253,140>>,
++ <<183,139,16,132,10,209,67,86,168,100,61,217,145,57,36,56>>
++ }.
++
++badpad_content(Content) ->
++ %% BadContent will fail mac test
++ <<16#F0, Content/binary>>.
++
++correct_cipher_state() ->
++ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
++ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,148>>}.
++
++incorrect_cipher_state() ->
++ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
++ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>}.
++
+--
+2.4.3
+
From 564391e634bbbf4b21763c71485663bfb7a76e6b Mon Sep 17 00:00:00 2001
From: John Eckersberg
Date: Tue, 18 Aug 2015 10:58:05 -0400
Subject: [PATCH 018/305] Disable docs by default on ARM until I figure out why
fop hangs
---
erlang.spec | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/erlang.spec b/erlang.spec
index 6f7bac6..07d9996 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -2,7 +2,13 @@
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
+%ifarch %{arm}
+# For some reason, fop hangs on arm, so for now don't generate docs by
+# default
+%bcond_with doc
+%else
%bcond_without doc
+%endif
%ifarch %{arm} %{ix86} x86_64 ppc %{power64}
%global __with_hipe 1
@@ -10,7 +16,7 @@
Name: erlang
Version: 17.4
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2221,6 +2227,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Aug 18 2015 John Eckersberg - 17.4-5
+- Disable docs by default on ARM until I figure out why fop hangs
+
* Wed Aug 5 2015 John Eckersberg - 17.4-4
- Add patch for CVE-2015-2774 - TLS-1.0 POODLE vulnerability (rhbz#1206712)
From 92d16c1e81451a209a589e5c7b55b6bb17b66eac Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Mon, 11 Jan 2016 17:40:03 +0300
Subject: [PATCH 019/305] Enable crash dump creation during a large
distrubution error
Signed-off-by: Peter Lemenkov
---
erlang.spec | 18 +++++++----
...-1-backport-of-TLS-1.0-padding-check.patch | 21 ++-----------
...-to-crash-dump-on-large-distribution.patch | 31 +++++++++++++++++++
3 files changed, 46 insertions(+), 24 deletions(-)
rename otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch => otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch (97%)
create mode 100644 otp-0021-Add-patch-to-crash-dump-on-large-distribution.patch
diff --git a/erlang.spec b/erlang.spec
index e8215a9..a37e029 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.11%{?dist}
+Release: %{upstream_rel_for_rpm}.12%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -113,11 +113,14 @@ Patch18: otp-0018-Introduce-os-getenv-2.patch
# Fedora specific patch
# Patch removes support for SSLv3 protocol because it is proved
Patch19: otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
+# Fedora specific patch
+# R16B03-1 backport of TLS-1.0 padding check
+Patch20: otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch
+# Fedora specific patch
+# Add patch to crash dump on large distribution
+Patch21: otp-0021-Add-patch-to-crash-dump-on-large-distribution.patch
# end of autogenerated patch tag list
-# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-2774
-Patch99: otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
-
BuildRequires: lksctp-tools-devel
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
@@ -1000,10 +1003,10 @@ Erlang mode for XEmacs (source lisp files).
%patch17 -p1 -b .lib_inets_src_ftp_ftp_erl_Check_the_filenames_userna
%patch18 -p1 -b .Introduce_os_getenv_2
%patch19 -p1 -b .Patch_removes_support_for_SSLv3_protocol_because_it_
+%patch20 -p1 -b .R16B03_1_backport_of_TLS_1_0_padding_check
+%patch21 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
# end of autogenerated prep patch list
-%patch99 -p1
-
# FIXME we should come up with a better solution
# remove shipped zlib sources
#rm -f erts/emulator/zlib/*.[ch]
@@ -2333,6 +2336,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Jan 11 2016 Peter Lemenkov - R16B-03.12
+- Enable crash dump creation during a large distrubution error
+
* Fri Aug 7 2015 John Eckersberg - R16B-03.11
- Add patch for CVE-2015-2774 - TLS-1.0 POODLE vulnerability (rhbz#1206712)
diff --git a/otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch b/otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch
similarity index 97%
rename from otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
rename to otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch
index ce93920..18645fb 100644
--- a/otp-0099-R16B03-1-backport-of-TLS-1.0-padding-check.patch
+++ b/otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch
@@ -1,4 +1,3 @@
-From 690bc386543e193d93b359d36ca19ae92af691bd Mon Sep 17 00:00:00 2001
From: John Eckersberg
Date: Fri, 7 Aug 2015 11:39:27 -0400
Subject: [PATCH] R16B03-1 backport of TLS-1.0 padding check
@@ -9,20 +8,9 @@ Date: Tue Jan 13 15:16:20 2015 +0100
ssl: Reenable padding check for TLS-1.0 and provide backwards compatible
disable option
----
- lib/ssl/doc/src/ssl.xml | 18 +++-
- lib/ssl/src/dtls_record.erl | 4 +-
- lib/ssl/src/ssl.erl | 8 +-
- lib/ssl/src/ssl_cipher.erl | 43 +++++----
- lib/ssl/src/ssl_internal.hrl | 3 +-
- lib/ssl/src/ssl_record.erl | 10 +-
- lib/ssl/src/tls_connection.erl | 7 +-
- lib/ssl/src/tls_record.erl | 33 ++++++-
- lib/ssl/test/ssl_cipher_SUITE.erl | 189 ++++++++++++++++++++++----------------
- 9 files changed, 196 insertions(+), 119 deletions(-)
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
-index 1d74faf..8184edc 100644
+index 912acc2..e496eb1 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -334,11 +334,23 @@ fun(srp, Username :: string(), UserState :: term()) ->
@@ -208,7 +196,7 @@ index b2077c6..e546e37 100644
list_to_binary(lists:duplicate(Len, Len)) == Padding.
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
-index 0186f9f..c25c8f1 100644
+index 6f84830..8c12141 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
@@ -114,7 +114,8 @@
@@ -289,7 +277,7 @@ index ffa04ee..007c9b1 100644
{Plain, State#state{protocol_buffers =
Buffers#protocol_buffers{tls_cipher_texts = Rest},
diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl
-index 8810755..dcf03b4 100644
+index 3c5c7e9..dd99d10 100644
--- a/lib/ssl/src/tls_record.erl
+++ b/lib/ssl/src/tls_record.erl
@@ -1,7 +1,7 @@
@@ -576,6 +564,3 @@ index 45e9178..3433f9a 100644
+ #cipher_state{iv = <<59,201,85,117,188,206,224,136,5,109,46,70,104,79,4,9>>,
+ key = <<72,196,247,97,62,213,222,109,210,204,217,186,172,184,197,254>>}.
+
---
-2.4.3
-
diff --git a/otp-0021-Add-patch-to-crash-dump-on-large-distribution.patch b/otp-0021-Add-patch-to-crash-dump-on-large-distribution.patch
new file mode 100644
index 0000000..6849686
--- /dev/null
+++ b/otp-0021-Add-patch-to-crash-dump-on-large-distribution.patch
@@ -0,0 +1,31 @@
+From: John Eckersberg
+Date: Wed, 16 Dec 2015 11:03:42 -0500
+Subject: [PATCH] Add patch to crash dump on large distribution
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1291822
+https://bugzilla.redhat.com/show_bug.cgi?id=1291855
+https://bugzilla.redhat.com/show_bug.cgi?id=1291856
+https://bugzilla.redhat.com/show_bug.cgi?id=1291857
+
+diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
+index 6ecf3f0..7d1f4ea 100644
+--- a/erts/emulator/beam/dist.c
++++ b/erts/emulator/beam/dist.c
+@@ -1880,7 +1880,7 @@ dist_port_command(Port *prt, ErtsDistOutputBuf *obuf)
+ ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(prt));
+
+ if (size > (Uint) INT_MAX)
+- erl_exit(ERTS_ABORT_EXIT,
++ erl_exit(ERTS_DUMP_EXIT,
+ "Absurdly large distribution output data buffer "
+ "(%beu bytes) passed.\n",
+ size);
+@@ -1919,7 +1919,7 @@ dist_port_commandv(Port *prt, ErtsDistOutputBuf *obuf)
+ ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(prt));
+
+ if (size > (Uint) INT_MAX)
+- erl_exit(ERTS_ABORT_EXIT,
++ erl_exit(ERTS_DUMP_EXIT,
+ "Absurdly large distribution output data buffer "
+ "(%beu bytes) passed.\n",
+ size);
From 3e2c6d644c7a479b6703e7d56a08d56cfbd62ff3 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 14 Jan 2016 14:15:02 +0300
Subject: [PATCH 020/305] Sort packages
Signed-off-by: Peter Lemenkov
---
erlang.spec | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 07d9996..02720c7 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -170,6 +170,25 @@ environment. Erlang has built-in support for concurrency, distribution
and fault tolerance. Erlang is used in several large telecommunication
systems from Ericsson.
+%package -n emacs-erlang
+Summary: Compiled elisp files for erlang-mode under GNU Emacs
+Requires: emacs-common-erlang = %{version}-%{release}
+Requires: emacs(bin) >= %{_emacs_version}
+Group: Applications/Editors
+BuildArch: noarch
+
+%description -n emacs-erlang
+Erlang mode for GNU Emacs.
+
+%package -n emacs-erlang-el
+Summary: Elisp source files for erlang-mode under GNU Emacs
+Requires: emacs-erlang = %{version}-%{release}
+Group: Applications/Editors
+BuildArch: noarch
+
+%description -n emacs-erlang-el
+Erlang mode for GNU Emacs (source lisp files).
+
%package asn1
Summary: Provides support for Abstract Syntax Notation One
Group: Development/Languages
@@ -854,25 +873,6 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description xmerl
Provides support for XML 1.0.
-%package -n emacs-erlang
-Summary: Compiled elisp files for erlang-mode under GNU Emacs
-Requires: emacs-common-erlang = %{version}-%{release}
-Requires: emacs(bin) >= %{_emacs_version}
-Group: Applications/Editors
-BuildArch: noarch
-
-%description -n emacs-erlang
-Erlang mode for GNU Emacs.
-
-%package -n emacs-erlang-el
-Summary: Elisp source files for erlang-mode under GNU Emacs
-Requires: emacs-erlang = %{version}-%{release}
-Group: Applications/Editors
-BuildArch: noarch
-
-%description -n emacs-erlang-el
-Erlang mode for GNU Emacs (source lisp files).
-
%package -n xemacs-erlang
Summary: Compiled elisp files for erlang-mode under XEmacs
Requires: emacs-common-erlang = %{version}-%{release}
From 8448438f90b66be5e1c020083bd1ef53f13417e2 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 14 Jan 2016 18:10:19 +0300
Subject: [PATCH 021/305] Ver. 18.2.2
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 387 ++++++------
...n-pages-and-do-not-install-miscellan.patch | 8 +-
otp-0002-Remove-rpath.patch | 8 +-
otp-0003-Do-not-install-C-sources.patch | 36 +-
otp-0004-Do-not-install-Java-sources.patch | 8 +-
...teventlog-and-related-doc-files-on-n.patch | 10 +-
otp-0006-Do-not-install-erlang-sources.patch | 308 +++++-----
...it-off-webtool-dependency-from-tools.patch | 4 +-
...-to-crash-dump-on-large-distribution.patch | 31 +
otp-0008-Introduce-os-getenv-2.patch | 63 --
...pport-for-SSLv3-protocol-because-it-.patch | 100 ---
...ding-check-for-TLS-1.0-and-provide-b.patch | 576 ------------------
otp-make-subpackages.py | 150 +++++
sources | 2 +-
15 files changed, 560 insertions(+), 1132 deletions(-)
create mode 100644 otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
delete mode 100644 otp-0008-Introduce-os-getenv-2.patch
delete mode 100644 otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
delete mode 100644 otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch
create mode 100644 otp-make-subpackages.py
diff --git a/.gitignore b/.gitignore
index 72cea5d..8477df3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,4 @@ otp_src_R14A.tar.gz
/otp-OTP-17.3.3.tar.gz
/otp-OTP-17.3.4.tar.gz
/otp-OTP-17.4.tar.gz
+/otp-OTP-18.2.2.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 02720c7..0ed6ce9 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -15,12 +15,12 @@
%endif
Name: erlang
-Version: 17.4
-Release: 5%{?dist}
+Version: 18.2.2
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
-License: ERPL
+License: ASL 2.0
URL: http://www.erlang.org
%if 0%{?el7}%{?fedora}
VCS: scm:git:https://github.com/erlang/otp
@@ -30,9 +30,10 @@ Source5: epmd.service
Source6: epmd.socket
Source7: epmd@.service
Source8: epmd@.socket
+# These files are intended for Fedora package maintainers only.
+Source998: otp-make-subpackages.py
Source999: otp-get-patches.sh
-
# For the source of the Fedora specific patches, see the respective
# branch at https://github.com/lemenkov/otp
#
@@ -69,22 +70,11 @@ Patch6: otp-0006-Do-not-install-erlang-sources.patch
# Split off webtool dependency from tools
Patch7: otp-0007-Split-off-webtool-dependency-from-tools.patch
# Fedora specific patch
-# Introduce os:getenv/2
-Patch8: otp-0008-Introduce-os-getenv-2.patch
-# Fedora specific patch
-# Patch removes support for SSLv3 protocol because it is proved
-Patch9: otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
+# Add patch to crash dump on large distribution
+Patch8: otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
# end of autogenerated patch tag list
-# https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-2774
-Patch10: otp-0010-ssl-Reenable-padding-check-for-TLS-1.0-and-provide-b.patch
-
-BuildRequires: lksctp-tools-devel
-BuildRequires: ncurses-devel
-BuildRequires: openssl-devel
-BuildRequires: zlib-devel
BuildRequires: flex
-BuildRequires: m4
%if %{with doc}
# BEWARE. No fop for EPEL5, and only for x86/x86_64 in EPEL6, so we cannot regenerate docs here
BuildRequires: fop
@@ -96,11 +86,6 @@ BuildRequires: erlang
%endif
%endif
-BuildRequires: emacs
-BuildRequires: xemacs
-BuildRequires: emacs-el
-BuildRequires: xemacs-packages-extra-el
-
%if 0%{?el7}%{?fedora}
# for
BuildRequires: systemd-devel
@@ -170,28 +155,32 @@ environment. Erlang has built-in support for concurrency, distribution
and fault tolerance. Erlang is used in several large telecommunication
systems from Ericsson.
+### BEGIN OF AUTOGENERATED LIST ###
+
%package -n emacs-erlang
-Summary: Compiled elisp files for erlang-mode under GNU Emacs
-Requires: emacs-common-erlang = %{version}-%{release}
-Requires: emacs(bin) >= %{_emacs_version}
-Group: Applications/Editors
-BuildArch: noarch
+Summary: Compiled elisp files for erlang-mode under GNU Emacs
+Group: Applications/Editors
+BuildRequires: emacs
+BuildRequires: emacs-el
+Requires: emacs-common-erlang = %{version}-%{release}
+Requires: emacs(bin) >= %{_emacs_version}
+BuildArch: noarch
%description -n emacs-erlang
Erlang mode for GNU Emacs.
%package -n emacs-erlang-el
-Summary: Elisp source files for erlang-mode under GNU Emacs
-Requires: emacs-erlang = %{version}-%{release}
-Group: Applications/Editors
-BuildArch: noarch
+Summary: Elisp source files for erlang-mode under GNU Emacs
+Group: Applications/Editors
+Requires: emacs-erlang = %{version}-%{release}
+BuildArch: noarch
%description -n emacs-erlang-el
Erlang mode for GNU Emacs (source lisp files).
%package asn1
-Summary: Provides support for Abstract Syntax Notation One
-Group: Development/Languages
+Summary: Provides support for Abstract Syntax Notation One
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -200,14 +189,15 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Provides support for Abstract Syntax Notation One.
%package common_test
-Summary: A portable framework for automatic testing
-Group: Development/Languages
+Summary: A portable framework for automatic testing
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-debugger%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
+Requires: %{name}-observer%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
Requires: %{name}-snmp%{?_isa} = %{version}-%{release}
@@ -215,15 +205,14 @@ Requires: %{name}-ssh%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Requires: %{name}-test_server%{?_isa} = %{version}-%{release}
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
-Requires: %{name}-webtool%{?_isa} = %{version}-%{release}
Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
%description common_test
A portable framework for automatic testing.
%package compiler
-Summary: A byte code compiler for Erlang which produces highly compact code
-Group: Development/Languages
+Summary: A byte code compiler for Erlang which produces highly compact code
+Group: Development/Languages
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-hipe%{?_isa} = %{version}-%{release}
@@ -234,8 +223,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A byte code compiler for Erlang which produces highly compact code.
%package cosEvent
-Summary: Orber OMG Event Service
-Group: Development/Languages
+Summary: Orber OMG Event Service
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-orber%{?_isa} = %{version}-%{release}
@@ -245,8 +234,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG Event Service.
%package cosEventDomain
-Summary: Orber OMG Event Domain Service
-Group: Development/Languages
+Summary: Orber OMG Event Domain Service
+Group: Development/Languages
Requires: %{name}-cosNotification%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -257,8 +246,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG Event Domain Service.
%package cosFileTransfer
-Summary: Orber OMG File Transfer Service
-Group: Development/Languages
+Summary: Orber OMG File Transfer Service
+Group: Development/Languages
Requires: %{name}-cosProperty%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
@@ -271,8 +260,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG File Transfer Service.
%package cosNotification
-Summary: Orber OMG Notification Service
-Group: Development/Languages
+Summary: Orber OMG Notification Service
+Group: Development/Languages
Requires: %{name}-cosEvent%{?_isa} = %{version}-%{release}
Requires: %{name}-cosTime%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
@@ -284,8 +273,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG Notification Service.
%package cosProperty
-Summary: Orber OMG Property Service
-Group: Development/Languages
+Summary: Orber OMG Property Service
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
@@ -296,8 +285,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG Property Service.
%package cosTime
-Summary: Orber OMG Timer and TimerEvent Service
-Group: Development/Languages
+Summary: Orber OMG Timer and TimerEvent Service
+Group: Development/Languages
Requires: %{name}-cosEvent%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -308,8 +297,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG Timer and TimerEvent Service.
%package cosTransactions
-Summary: Orber OMG Transaction Service
-Group: Development/Languages
+Summary: Orber OMG Transaction Service
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-orber%{?_isa} = %{version}-%{release}
@@ -319,8 +308,9 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Orber OMG Transaction Service.
%package crypto
-Summary: Cryptographical support
-Group: Development/Languages
+Summary: Cryptographical support
+Group: Development/Languages
+BuildRequires: openssl-devel
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -329,8 +319,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Cryptographical support.
%package debugger
-Summary: A debugger for debugging and testing of Erlang programs
-Group: Development/Languages
+Summary: A debugger for debugging and testing of Erlang programs
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -341,8 +331,8 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release}
A debugger for debugging and testing of Erlang programs.
%package dialyzer
-Summary: A DIscrepancy AnaLYZer for ERlang programs
-Group: Development/Languages
+Summary: A DIscrepancy AnaLYZer for ERlang programs
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-hipe%{?_isa} = %{version}-%{release}
@@ -356,9 +346,9 @@ Requires: graphviz
A DIscrepancy AnaLYZer for ERlang programs.
%package diameter
-Summary: Diameter (RFC 3588) library
-Group: Development/Languages
-BuildRequires: ed
+Summary: Diameter (RFC 3588) library
+Group: Development/Languages
+BuildRequires: ed
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
@@ -371,17 +361,17 @@ Diameter (RFC 3588) library
%if %{with doc}
%package doc
-Summary: Erlang documentation
-Group: Development/Languages
-BuildArch: noarch
+Summary: Erlang documentation
+Group: Development/Languages
+BuildArch: noarch
%description doc
Documentation for Erlang.
%endif
%package edoc
-Summary: A utility used to generate documentation out of tags in source files
-Group: Development/Languages
+Summary: A utility used to generate documentation out of tags in source files
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -393,8 +383,8 @@ Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
A utility used to generate documentation out of tags in source files.
%package eldap
-Summary: Erlang LDAP library
-Group: Development/Languages
+Summary: Erlang LDAP library
+Group: Development/Languages
Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -405,8 +395,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Erlang LDAP library.
%package erl_docgen
-Summary: A utility used to generate erlang HTML documentation
-Group: Development/Languages
+Summary: A utility used to generate erlang HTML documentation
+Group: Development/Languages
Requires: %{name}-edoc%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -416,28 +406,29 @@ Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
A utility used to generate erlang HTML documentation.
%package erl_interface
-Summary: Low level interface to C
-Group: Development/Languages
-Requires: %{name}-erts%{?_isa} = %{version}-%{release}
+Summary: Low level interface to C
+Group: Development/Languages
+Requires: %{name}-erts%{?_isa} = %{version}-%{release}
%description erl_interface
Low level interface to C.
%package erts
-Summary: Functionality necessary to run the Erlang System itself
-Group: Development/Languages
+Summary: Functionality necessary to run the Erlang System itself
+Group: Development/Languages
+BuildRequires: lksctp-tools-devel
+BuildRequires: m4
+BuildRequires: ncurses-devel
+BuildRequires: zlib-devel
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-# This library is dlopened so it can't be picked up automatically by the RPM
-# dependency checker
Requires: lksctp-tools
# See erts/emulator/beam/erl_driver.h or call erlang:system_info(driver_version).
#Provides: erlang(erl_drv_version) = %%(%%{buildroot}/bin/erl -noshell -eval 'io:format(erlang:system_info(driver_version)).' -s erlang halt)
-Provides: erlang(erl_drv_version) = 3.1
+Provides: erlang(erl_drv_version) = 3.2
# See erts/emulator/beam/erl_nif.h or call erlang:system_info(nif_version).
#Provides: erlang(erl_nif_version) = %%(%%{buildroot}/bin/erl -noshell -eval 'io:format(erlang:system_info(nif_version)).' -s erlang halt)
-Provides: erlang(erl_nif_version) = 2.7
-# These sub-packages were removed once
+Provides: erlang(erl_nif_version) = 2.9
Obsoletes: erlang-appmon
Obsoletes: erlang-docbuilder
Obsoletes: erlang-inviso
@@ -449,8 +440,8 @@ Obsoletes: erlang-tv
Functionality necessary to run the Erlang System itself.
%package et
-Summary: An event tracer for Erlang programs
-Group: Development/Languages
+Summary: An event tracer for Erlang programs
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
@@ -461,8 +452,8 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release}
An event tracer for Erlang programs.
%package eunit
-Summary: Support for unit testing
-Group: Development/Languages
+Summary: Support for unit testing
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -471,29 +462,35 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Support for unit testing.
%package examples
-Summary: Examples for some Erlang modules
-Group: Development/Languages
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: Examples for some Erlang modules
+Group: Development/Languages
+Requires: %{name}-erts%{?_isa} = %{version}-%{release}
+Requires: %{name}-gs%{?_isa} = %{version}-%{release}
+Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
+Requires: %{name}-public_key%{?_isa} = %{version}-%{release}
+Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
+Requires: %{name}-ssl%{?_isa} = %{version}-%{release}
+Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description examples
Examples for some Erlang modules.
%package gs
-Summary: A library for Tcl/Tk support in Erlang
-Group: Development/Languages
+Summary: A library for Tcl/Tk support in Erlang
+Group: Development/Languages
+BuildRequires: tcl-devel
+BuildRequires: tk-devel
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-BuildRequires: tcl-devel
-BuildRequires: tk-devel
-Requires: tk
+Requires: tk
%description gs
A Graphics System used to write platform independent user interfaces.
%package hipe
-Summary: High Performance Erlang
-Group: Development/Languages
+Summary: High Performance Erlang
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -504,8 +501,9 @@ Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
High Performance Erlang.
%package ic
-Summary: IDL compiler
-Group: Development/Languages
+Summary: IDL compiler
+Group: Development/Languages
+BuildRequires: java-devel
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -514,42 +512,30 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
IDL compiler.
%package inets
-Summary: A set of services such as a Web server and a ftp client etc
-Group: Development/Languages
+Summary: A set of services such as a Web server and a ftp client etc
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-ssl%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-# FIXME see erlang-jinterface also
-#Requires: jpackage-utils
%description inets
A set of services such as a Web server and a ftp client etc.
%package jinterface
-Summary: A library for accessing Java from Erlang
-Group: Development/Languages
-Requires: %{name}-erts%{?_isa} = %{version}-%{release}
-# FIXME see erlang-ic also
-#Requires: jpackage-utils
-%if 0%{?el7}%{?fedora}
-BuildRequires: java-devel
-%else
-%ifarch %{ix86} x86_64
-BuildRequires: java-devel
-%else
-BuildRequires: java-devel-gcj
-%endif
-%endif
+Summary: A library for accessing Java from Erlang
+Group: Development/Languages
+BuildRequires: java-devel
+Requires: %{name}-erts%{?_isa} = %{version}-%{release}
%description jinterface
Low level interface to Java.
%package kernel
-Summary: Main erlang library
-Group: Development/Languages
+Summary: Main erlang library
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -557,8 +543,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Main erlang library.
%package megaco
-Summary: Megaco/H.248 support library
-Group: Development/Languages
+Summary: Megaco/H.248 support library
+Group: Development/Languages
Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
Requires: %{name}-debugger%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
@@ -573,8 +559,8 @@ decomposed multimedia gateway, enabling separation of call control
from media conversion.
%package mnesia
-Summary: A heavy duty real-time distributed database
-Group: Development/Languages
+Summary: A heavy duty real-time distributed database
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -583,8 +569,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A heavy duty real-time distributed database.
%package observer
-Summary: A set of tools for tracing and investigation of distributed systems
-Group: Development/Languages
+Summary: A set of tools for tracing and investigation of distributed systems
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-et%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
@@ -597,20 +583,20 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release}
A set of tools for tracing and investigation of distributed systems.
%package odbc
-Summary: A library for unixODBC support in Erlang
-Group: Development/Languages
+Summary: A library for unixODBC support in Erlang
+Group: Development/Languages
+BuildRequires: unixODBC-devel
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-BuildRequires: unixODBC-devel
%description odbc
An interface to relational SQL-databases built on ODBC (Open Database
Connectivity).
%package orber
-Summary: A CORBA Object Request Broker
-Group: Development/Languages
+Summary: A CORBA Object Request Broker
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -622,8 +608,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A CORBA Object Request Broker.
%package os_mon
-Summary: A monitor which allows inspection of the underlying operating system
-Group: Development/Languages
+Summary: A monitor which allows inspection of the underlying operating system
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
@@ -636,8 +622,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A monitor which allows inspection of the underlying operating system.
%package ose
-Summary: A module for interacting with Enea OSE
-Group: Development/Languages
+Summary: A module for interacting with Enea OSE
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -645,8 +631,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A module for interacting with Enea OSE.
%package otp_mibs
-Summary: SNMP management information base for Erlang/OTP nodes
-Group: Development/Languages
+Summary: SNMP management information base for Erlang/OTP nodes
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
@@ -657,8 +643,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
SNMP management information base for Erlang/OTP nodes.
%package parsetools
-Summary: A set of parsing and lexical analysis tools
-Group: Development/Languages
+Summary: A set of parsing and lexical analysis tools
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -667,8 +653,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A set of parsing and lexical analysis tools.
%package percept
-Summary: A concurrency profiler tool
-Group: Development/Languages
+Summary: A concurrency profiler tool
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -679,8 +665,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A concurrency profiler tool.
%package public_key
-Summary: API to public key infrastructure
-Group: Development/Languages
+Summary: API to public key infrastructure
+Group: Development/Languages
Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
@@ -691,8 +677,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
API to public key infrastructure.
%package reltool
-Summary: A release management tool
-Group: Development/Languages
+Summary: A release management tool
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
@@ -709,8 +695,8 @@ target system. The backend provides a batch interface
for generation of customized target systems.
%package runtime_tools
-Summary: A set of tools to include in a production system
-Group: Development/Languages
+Summary: A set of tools to include in a production system
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
@@ -720,8 +706,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A set of tools to include in a production system.
%package sasl
-Summary: The System Architecture Support Libraries
-Group: Development/Languages
+Summary: The System Architecture Support Libraries
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -732,8 +718,8 @@ The System Architecture Support Libraries is a set of tools for
release upgrades and alarm handling etc.
%package snmp
-Summary: Simple Network Management Protocol (SNMP) support
-Group: Development/Languages
+Summary: Simple Network Management Protocol (SNMP) support
+Group: Development/Languages
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -746,8 +732,8 @@ Simple Network Management Protocol (SNMP) support including a
MIB compiler and tools for creating SNMP agents.
%package ssh
-Summary: Secure Shell application with sftp and ssh support
-Group: Development/Languages
+Summary: Secure Shell application with sftp and ssh support
+Group: Development/Languages
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -758,10 +744,11 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Secure Shell application with sftp and ssh support.
%package ssl
-Summary: Secure Socket Layer support
-Group: Development/Languages
+Summary: Secure Socket Layer support
+Group: Development/Languages
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
+Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-public_key%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -770,8 +757,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Secure Socket Layer support.
%package stdlib
-Summary: The Erlang standard libraries
-Group: Development/Languages
+Summary: The Erlang standard libraries
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
@@ -781,8 +768,9 @@ Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
The Erlang standard libraries.
%package syntax_tools
-Summary: A set of tools for dealing with erlang sources
-Group: Development/Languages
+Summary: A set of tools for dealing with erlang sources
+Group: Development/Languages
+Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -792,22 +780,23 @@ A utility used to handle abstract Erlang syntax trees,
reading source files differently, pretty-printing syntax trees.
%package test_server
-Summary: The OTP Test Server
-Group: Development/Languages
+Summary: The OTP Test Server
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-observer%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
+Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
%description test_server
The OTP Test Server.
%package tools
-Summary: A set of programming tools including a coverage analyzer etc
-Group: Development/Languages
+Summary: A set of programming tools including a coverage analyzer etc
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
@@ -820,14 +809,14 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Suggests: %{name}-webtool%{?_isa} = %{version}-%{release}
%endif
-Provides: emacs-common-erlang = %{version}-%{release}
+Provides: emacs-common-erlang = %{version}-%{release}
%description tools
A set of programming tools including a coverage analyzer etc.
%package typer
-Summary: TYPe annotator for ERlang programs
-Group: Development/Languages
+Summary: TYPe annotator for ERlang programs
+Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-dialyzer%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
@@ -839,8 +828,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
TYPe annotator for ERlang programs.
%package webtool
-Summary: A tool that simplifying the use of web based Erlang tools
-Group: Development/Languages
+Summary: A tool that simplifying the use of web based Erlang tools
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@@ -851,21 +840,21 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A tool that simplifying the use of web based Erlang tools.
%package wx
-Summary: A library for wxWidgets support in Erlang
-Group: Development/Languages
+Summary: A library for wxWidgets support in Erlang
+Group: Development/Languages
+BuildRequires: wxGTK-devel
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-Requires: mesa-libGL
-Requires: mesa-libGLU
-BuildRequires: wxGTK-devel
+Requires: mesa-libGL
+Requires: mesa-libGLU
%description wx
A Graphics System used to write platform independent user interfaces.
%package xmerl
-Summary: Provides support for XML 1.0
-Group: Development/Languages
+Summary: Provides support for XML 1.0
+Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -874,24 +863,28 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Provides support for XML 1.0.
%package -n xemacs-erlang
-Summary: Compiled elisp files for erlang-mode under XEmacs
-Requires: emacs-common-erlang = %{version}-%{release}
-Group: Applications/Editors
-BuildArch: noarch
-Requires: xemacs(bin) >= %{_xemacs_version}
+Summary: Compiled elisp files for erlang-mode under XEmacs
+Group: Applications/Editors
+BuildRequires: xemacs
+BuildRequires: xemacs-packages-extra-el
+Requires: emacs-common-erlang = %{version}-%{release}
+Requires: xemacs(bin) >= %{_xemacs_version}
+BuildArch: noarch
%description -n xemacs-erlang
Erlang mode for XEmacs.
%package -n xemacs-erlang-el
-Summary: Elisp source files for erlang-mode under XEmacs
-Requires: xemacs-erlang = %{version}-%{release}
-Group: Applications/Editors
-BuildArch: noarch
+Summary: Elisp source files for erlang-mode under XEmacs
+Group: Applications/Editors
+Requires: xemacs-erlang = %{version}-%{release}
+BuildArch: noarch
%description -n xemacs-erlang-el
Erlang mode for XEmacs (source lisp files).
+### END OF AUTOGENERATED LIST ###
+
%prep
%setup -q -n otp-OTP-%{version}
@@ -903,12 +896,9 @@ Erlang mode for XEmacs (source lisp files).
%patch5 -p1 -b .Do_not_install_nteventlog_and_related_doc_files_on_n
%patch6 -p1 -b .Do_not_install_erlang_sources
%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_
+%patch8 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
# end of autogenerated prep patch list
-%patch10 -p1
-
# FIXME we should come up with a better solution
# remove shipped zlib sources
#rm -f erts/emulator/zlib/*.[ch]
@@ -1021,7 +1011,7 @@ for i in erts-* ; do mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$
cd $RPM_BUILD_ROOT%{_libdir}/erlang/lib
for i in * ; do mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/lib/$i || true ; done
popd
-cp -av AUTHORS EPLICENCE README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+cp -av AUTHORS LICENSE.txt README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/PR.template $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
@@ -1098,7 +1088,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%dir %{_docdir}/%{name}-%{version}/
%doc %{_docdir}/%{name}-%{version}/AUTHORS
%doc %{_docdir}/%{name}-%{version}/COPYRIGHT
-%doc %{_docdir}/%{name}-%{version}/EPLICENCE
+%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%doc %{_docdir}/%{name}-%{version}/PR.template
%doc %{_docdir}/%{name}-%{version}/README
%doc %{_docdir}/%{name}-%{version}/README.md
@@ -1458,11 +1448,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%files examples
%{_libdir}/erlang/lib/asn1-*/examples/
-#%{_libdir}/erlang/lib/cosFileTransfer-*/examples/
-#%{_libdir}/erlang/lib/cosNotification-*/examples/
-#%{_libdir}/erlang/lib/cosProperty-*/examples/
-#%{_libdir}/erlang/lib/cosTime-*/examples/
-#%{_libdir}/erlang/lib/cosTransactions-*/examples/
%{_libdir}/erlang/lib/diameter-*/examples/
%{_libdir}/erlang/lib/et-*/examples/
%{_libdir}/erlang/lib/eunit-*/examples/
@@ -1478,7 +1463,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/runtime_tools-*/examples/
%{_libdir}/erlang/lib/sasl-*/examples/
%{_libdir}/erlang/lib/snmp-*/examples/
-#%{_libdir}/erlang/lib/ssh-*/examples/
%{_libdir}/erlang/lib/ssl-*/examples/
%{_libdir}/erlang/lib/stdlib-*/examples/
%{_libdir}/erlang/lib/syntax_tools-*/examples/
@@ -1524,7 +1508,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/http_uri.*
%{_libdir}/erlang/man/man3/httpc.*
%{_libdir}/erlang/man/man3/httpd.*
-%{_libdir}/erlang/man/man3/httpd_conf.*
+%{_libdir}/erlang/man/man3/httpd_custom_api.*
%{_libdir}/erlang/man/man3/httpd_socket.*
%{_libdir}/erlang/man/man3/httpd_util.*
%{_libdir}/erlang/man/man3/inets.*
@@ -1605,7 +1589,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%files mnesia
%dir %{_libdir}/erlang/lib/mnesia-*/
%{_libdir}/erlang/lib/mnesia-*/ebin
-#%{_libdir}/erlang/lib/mnesia-*/include
%{_libdir}/erlang/lib/mnesia-*/src
%if %{with doc}
%{_libdir}/erlang/man/man3/mnesia.*
@@ -1831,6 +1814,8 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/ssl-*/src
%if %{with doc}
%{_libdir}/erlang/man/man3/ssl.*
+%{_libdir}/erlang/man/man3/ssl_crl_cache.*
+%{_libdir}/erlang/man/man3/ssl_crl_cache_api.*
%{_libdir}/erlang/man/man3/ssl_session_cache_api.*
%{_libdir}/erlang/man/man6/ssl.*
%endif
@@ -1852,6 +1837,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/digraph.*
%{_libdir}/erlang/man/man3/digraph_utils.*
%{_libdir}/erlang/man/man3/epp.*
+%{_libdir}/erlang/man/man3/erl_anno.*
%{_libdir}/erlang/man/man3/erl_eval.*
%{_libdir}/erlang/man/man3/erl_expand_records.*
%{_libdir}/erlang/man/man3/erl_id_trans.*
@@ -1880,12 +1866,12 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/ms_transform.*
%{_libdir}/erlang/man/man3/orddict.*
%{_libdir}/erlang/man/man3/ordsets.*
-%{_libdir}/erlang/man/man3/pg.*
%{_libdir}/erlang/man/man3/pool.*
%{_libdir}/erlang/man/man3/proc_lib.*
%{_libdir}/erlang/man/man3/proplists.*
%{_libdir}/erlang/man/man3/qlc.*
%{_libdir}/erlang/man/man3/queue.*
+%{_libdir}/erlang/man/man3/rand.*
%{_libdir}/erlang/man/man3/random.*
%{_libdir}/erlang/man/man3/re.*
%{_libdir}/erlang/man/man3/sets.*
@@ -1906,6 +1892,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%files syntax_tools
%dir %{_libdir}/erlang/lib/syntax_tools-*/
%{_libdir}/erlang/lib/syntax_tools-*/ebin
+%{_libdir}/erlang/lib/syntax_tools-*/include
%if %{with doc}
%{_libdir}/erlang/man/man3/epp_dodger.*
%{_libdir}/erlang/man/man3/erl_comment_scan.*
@@ -1915,6 +1902,8 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/erl_syntax_lib.*
%{_libdir}/erlang/man/man3/erl_tidy.*
%{_libdir}/erlang/man/man3/igor.*
+%{_libdir}/erlang/man/man3/merl.*
+%{_libdir}/erlang/man/man3/merl_transform.*
%{_libdir}/erlang/man/man3/prettypr.*
%endif
@@ -1952,7 +1941,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/erts-*/bin/typer
%dir %{_libdir}/erlang/lib/typer-*/
%{_libdir}/erlang/lib/typer-*/ebin/
-#%{_libdir}/erlang/lib/typer-*/src/
%files webtool
%{_libdir}/erlang/lib/webtool-*/
@@ -1983,6 +1971,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/wxAuiNotebook.*
%{_libdir}/erlang/man/man3/wxAuiNotebookEvent.*
%{_libdir}/erlang/man/man3/wxAuiPaneInfo.*
+%{_libdir}/erlang/man/man3/wxAuiSimpleTabArt.*
%{_libdir}/erlang/man/man3/wxAuiTabArt.*
%{_libdir}/erlang/man/man3/wxBitmap.*
%{_libdir}/erlang/man/man3/wxBitmapButton.*
@@ -2019,6 +2008,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/wxDateEvent.*
%{_libdir}/erlang/man/man3/wxDatePickerCtrl.*
%{_libdir}/erlang/man/man3/wxDC.*
+%{_libdir}/erlang/man/man3/wxDCOverlay.*
%{_libdir}/erlang/man/man3/wxDialog.*
%{_libdir}/erlang/man/man3/wxDirDialog.*
%{_libdir}/erlang/man/man3/wxDirPickerCtrl.*
@@ -2105,6 +2095,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/wxMiniFrame.*
%{_libdir}/erlang/man/man3/wxMirrorDC.*
%{_libdir}/erlang/man/man3/wxMouseCaptureChangedEvent.*
+%{_libdir}/erlang/man/man3/wxMouseCaptureLostEvent.*
%{_libdir}/erlang/man/man3/wxMouseEvent.*
%{_libdir}/erlang/man/man3/wxMoveEvent.*
%{_libdir}/erlang/man/man3/wxMultiChoiceDialog.*
@@ -2112,6 +2103,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/wxNotebook.*
%{_libdir}/erlang/man/man3/wxNotebookEvent.*
%{_libdir}/erlang/man/man3/wxNotifyEvent.*
+%{_libdir}/erlang/man/man3/wxOverlay.*
%{_libdir}/erlang/man/man3/wxPageSetupDialog.*
%{_libdir}/erlang/man/man3/wxPageSetupDialogData.*
%{_libdir}/erlang/man/man3/wxPaintDC.*
@@ -2227,6 +2219,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Jan 11 2016 Peter Lemenkov - 18.2.2-1
+- Ver. 18.2.2
+
* Tue Aug 18 2015 John Eckersberg - 17.4-5
- Disable docs by default on ARM until I figure out why fop hangs
diff --git a/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch b/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
index 6aeadc8..2602d40 100644
--- a/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
+++ b/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Do not format man-pages and do not install miscellaneous
Signed-off-by: Peter Lemenkov
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
-index 0cf965f..94e82a8 100644
+index 8e55fa7..9512faa 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
-@@ -550,10 +550,6 @@ endif
+@@ -551,10 +551,6 @@ endif
ifneq ($(INSTALL_TOP_BIN),)
$(INSTALL_PROGRAM) $(INSTALL_TOP_BIN) "$(RELEASE_PATH)"
endif
@@ -21,10 +21,10 @@ index 0cf965f..94e82a8 100644
$(INSTALL_DIR) "$(RELEASE_PATH)/erts-$(VSN)/src"
$(INSTALL_DATA) $(INSTALL_SRC) "$(RELEASE_PATH)/erts-$(VSN)/src"
diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
-index 8eb1db7..9e340bb 100644
+index 6634ae3..fa18956 100644
--- a/erts/etc/unix/Install.src
+++ b/erts/etc/unix/Install.src
-@@ -140,14 +140,5 @@ cp -p ../releases/%I_SYSTEM_VSN%/start_*.boot .
+@@ -141,14 +141,5 @@ cp -p ../releases/%I_SYSTEM_VSN%/start_*.boot .
cp -p ../releases/%I_SYSTEM_VSN%/no_dot_erlang.boot .
cp -p $Name.boot start.boot
cp -p ../releases/%I_SYSTEM_VSN%/$Name.script start.script
diff --git a/otp-0002-Remove-rpath.patch b/otp-0002-Remove-rpath.patch
index 492734f..77418af 100644
--- a/otp-0002-Remove-rpath.patch
+++ b/otp-0002-Remove-rpath.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove rpath
Signed-off-by: Peter Lemenkov
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
-index 8c92b5b..5b36c19 100644
+index e66c0ca..574cdf5 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
-@@ -89,7 +89,7 @@ endif
+@@ -90,7 +90,7 @@ endif
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
@@ -18,10 +18,10 @@ index 8c92b5b..5b36c19 100644
EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB
else
diff --git a/lib/crypto/priv/Makefile b/lib/crypto/priv/Makefile
-index 0989f14..0d29444 100644
+index ff9d3e1..d3aba77 100644
--- a/lib/crypto/priv/Makefile
+++ b/lib/crypto/priv/Makefile
-@@ -60,7 +60,7 @@ OBJS = $(OBJDIR)/crypto.o
+@@ -61,7 +61,7 @@ OBJS = $(OBJDIR)/crypto.o
# ----------------------------------------------------
$(SO_NIFLIB): $(OBJS)
diff --git a/otp-0003-Do-not-install-C-sources.patch b/otp-0003-Do-not-install-C-sources.patch
index f89bcb7..d4abd19 100644
--- a/otp-0003-Do-not-install-C-sources.patch
+++ b/otp-0003-Do-not-install-C-sources.patch
@@ -14,10 +14,10 @@ https://bugzilla.redhat.com/818419
Signed-off-by: Peter Lemenkov
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
-index a7cd03f..6da4d75 100644
+index 2b72e1a..0522562 100644
--- a/lib/asn1/c_src/Makefile
+++ b/lib/asn1/c_src/Makefile
-@@ -142,8 +142,6 @@ release_spec: opt
+@@ -143,8 +143,6 @@ release_spec: opt
ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib"
endif
@@ -27,10 +27,10 @@ index a7cd03f..6da4d75 100644
release_docs_spec:
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
-index 5b36c19..470821e 100644
+index 574cdf5..428c316 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
-@@ -199,14 +199,10 @@ docs:
+@@ -200,14 +200,10 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -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 7c09b60..2c14f9e 100644
+index 777d709..57917ae 100644
--- a/lib/erl_interface/src/Makefile.in
+++ b/lib/erl_interface/src/Makefile.in
-@@ -904,14 +904,14 @@ ifneq ($(EXE_TARGETS),)
+@@ -905,14 +905,14 @@ ifneq ($(EXE_TARGETS),)
$(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin"
endif
$(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src"
@@ -73,10 +73,10 @@ index 7c09b60..2c14f9e 100644
release_docs:
diff --git a/lib/ic/c_src/Makefile.in b/lib/ic/c_src/Makefile.in
-index ed860ab..96206ae 100644
+index b9f92a0..9612f24 100644
--- a/lib/ic/c_src/Makefile.in
+++ b/lib/ic/c_src/Makefile.in
-@@ -144,12 +144,10 @@ $(OBJDIR)/%.o: %.c
+@@ -145,12 +145,10 @@ $(OBJDIR)/%.o: %.c
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -90,10 +90,10 @@ index ed860ab..96206ae 100644
$(INSTALL_DATA) $(LIBRARY) "$(RELSYSDIR)/priv/lib"
$(INSTALL_DATA) $(IDL_FILES) $(H_FILES) "$(RELEASE_PATH)/usr/include"
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
-index 6111cf2..bd62e8b 100644
+index 045b6d8..39be02a 100644
--- a/lib/megaco/src/flex/Makefile.in
+++ b/lib/megaco/src/flex/Makefile.in
-@@ -270,7 +270,7 @@ release_spec: opt
+@@ -271,7 +271,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)
@@ -103,10 +103,10 @@ index 6111cf2..bd62e8b 100644
endif
diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
-index 6572d28..c7093ae 100644
+index 685eb5d..6c8a432 100644
--- a/lib/odbc/c_src/Makefile.in
+++ b/lib/odbc/c_src/Makefile.in
-@@ -128,11 +128,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -129,11 +129,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
ifdef EXE_TARGET
@@ -119,10 +119,10 @@ index 6572d28..c7093ae 100644
endif
diff --git a/lib/os_mon/c_src/Makefile.in b/lib/os_mon/c_src/Makefile.in
-index f84ccf7..05d194f 100644
+index e9fc5f4..ac9fb73 100644
--- a/lib/os_mon/c_src/Makefile.in
+++ b/lib/os_mon/c_src/Makefile.in
-@@ -125,8 +125,6 @@ $(OBJDIR)/memsup.o: memsup.h
+@@ -126,8 +126,6 @@ $(OBJDIR)/memsup.o: memsup.h
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -132,10 +132,10 @@ index f84ccf7..05d194f 100644
$(INSTALL_PROGRAM) $(TARGET_FILES) "$(RELSYSDIR)/priv/bin"
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
-index d46b499..4309aae 100644
+index 448b8c6..860d504 100644
--- a/lib/runtime_tools/c_src/Makefile.in
+++ b/lib/runtime_tools/c_src/Makefile.in
-@@ -156,10 +156,8 @@ docs:
+@@ -157,10 +157,8 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -147,10 +147,10 @@ index d46b499..4309aae 100644
endif
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
-index b1eb69f..1acfdbf 100644
+index 66bba22..eea37fc 100644
--- a/lib/tools/c_src/Makefile.in
+++ b/lib/tools/c_src/Makefile.in
-@@ -197,8 +197,6 @@ include ../vsn.mk
+@@ -198,8 +198,6 @@ include ../vsn.mk
RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)
release_spec: all
diff --git a/otp-0004-Do-not-install-Java-sources.patch b/otp-0004-Do-not-install-Java-sources.patch
index 65323fa..d9ba9c4 100644
--- a/otp-0004-Do-not-install-Java-sources.patch
+++ b/otp-0004-Do-not-install-Java-sources.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not install Java sources
Signed-off-by: Peter Lemenkov
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Makefile b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
-index 273614e..5b1fb57 100644
+index d9100cf..6886c71 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/Makefile
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
-@@ -112,8 +112,6 @@ docs:
+@@ -113,8 +113,6 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -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 ea3ab77..e95757e 100644
+index 1c8364e..34b64a8 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
-@@ -119,8 +119,6 @@ release release_docs release_tests release_html:
+@@ -120,8 +120,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-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch b/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
index cf8e970..b0c843e 100644
--- a/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
+++ b/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Do not install nteventlog and related doc-files on non-win32
Signed-off-by: Peter Lemenkov
diff --git a/lib/os_mon/doc/src/Makefile b/lib/os_mon/doc/src/Makefile
-index 08fd23e..5606cfc 100644
+index 0c5acd9..5f8f1e3 100644
--- a/lib/os_mon/doc/src/Makefile
+++ b/lib/os_mon/doc/src/Makefile
-@@ -35,12 +35,17 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+@@ -36,12 +36,17 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -29,10 +29,10 @@ index 08fd23e..5606cfc 100644
XML_REF6_FILES = os_mon_app.xml
diff --git a/lib/os_mon/src/Makefile b/lib/os_mon/src/Makefile
-index cd2dade..4e78cf8 100644
+index 9aa068c..1003d24 100644
--- a/lib/os_mon/src/Makefile
+++ b/lib/os_mon/src/Makefile
-@@ -33,8 +33,13 @@ RELSYSDIR = $(RELEASE_PATH)/lib/os_mon-$(VSN)
+@@ -34,8 +34,13 @@ RELSYSDIR = $(RELEASE_PATH)/lib/os_mon-$(VSN)
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
@@ -47,7 +47,7 @@ index cd2dade..4e78cf8 100644
INCLUDE=../include
CSRC=../c_src
-@@ -78,7 +83,11 @@ docs:
+@@ -79,7 +84,11 @@ docs:
# ----------------------------------------------------
$(APP_TARGET): $(APP_SRC) ../vsn.mk
diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch
index 9e0e3a9..933787e 100644
--- a/otp-0006-Do-not-install-erlang-sources.patch
+++ b/otp-0006-Do-not-install-erlang-sources.patch
@@ -8,10 +8,10 @@ Signed-off-by: Peter Lemenkov
Signed-off-by: Hans Ulrich Niedermann
diff --git a/erts/preloaded/src/Makefile b/erts/preloaded/src/Makefile
-index 4ea2d41..e1466c1 100644
+index 52034a0..56d91b9 100644
--- a/erts/preloaded/src/Makefile
+++ b/erts/preloaded/src/Makefile
-@@ -85,8 +85,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
+@@ -86,8 +86,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: $(APP_TARGET)
@@ -21,10 +21,10 @@ index 4ea2d41..e1466c1 100644
$(INSTALL_DATA) $(STATIC_TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/asn1/src/Makefile b/lib/asn1/src/Makefile
-index 6798da0..4e3ae0e 100644
+index 5b34017..d4677d6 100644
--- a/lib/asn1/src/Makefile
+++ b/lib/asn1/src/Makefile
-@@ -154,7 +154,7 @@ release_spec: opt
+@@ -155,7 +155,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -34,10 +34,10 @@ index 6798da0..4e3ae0e 100644
$(INSTALL_DATA) $(EXAMPLES) "$(RELSYSDIR)/examples"
diff --git a/lib/common_test/src/Makefile b/lib/common_test/src/Makefile
-index 8d74546..a25d85d 100644
+index 987345c..f53546a 100644
--- a/lib/common_test/src/Makefile
+++ b/lib/common_test/src/Makefile
-@@ -140,7 +140,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -144,7 +144,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -47,10 +47,10 @@ index 8d74546..a25d85d 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
diff --git a/lib/compiler/src/Makefile b/lib/compiler/src/Makefile
-index c6d09d8..46dcdf4 100644
+index 299b289..36a048b 100644
--- a/lib/compiler/src/Makefile
+++ b/lib/compiler/src/Makefile
-@@ -165,8 +165,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -172,8 +172,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -62,10 +62,10 @@ index c6d09d8..46dcdf4 100644
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/cosEvent/src/Makefile b/lib/cosEvent/src/Makefile
-index 2864ee0..0e27bb6 100644
+index b79f0ec..30d1a1d 100644
--- a/lib/cosEvent/src/Makefile
+++ b/lib/cosEvent/src/Makefile
-@@ -202,7 +202,7 @@ release_spec: opt
+@@ -203,7 +203,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -75,10 +75,10 @@ index 2864ee0..0e27bb6 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosEventDomain/src/Makefile b/lib/cosEventDomain/src/Makefile
-index b4b74bd..420f566 100644
+index da8dcf0..88b3993 100644
--- a/lib/cosEventDomain/src/Makefile
+++ b/lib/cosEventDomain/src/Makefile
-@@ -171,7 +171,7 @@ release_spec: opt
+@@ -172,7 +172,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -88,10 +88,10 @@ index b4b74bd..420f566 100644
$(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosFileTransfer/src/Makefile b/lib/cosFileTransfer/src/Makefile
-index 9d3abb9..c3d83a5 100644
+index f9107ff..74d337d 100644
--- a/lib/cosFileTransfer/src/Makefile
+++ b/lib/cosFileTransfer/src/Makefile
-@@ -179,9 +179,7 @@ release_spec: opt
+@@ -180,9 +180,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -103,10 +103,10 @@ index 9d3abb9..c3d83a5 100644
release_docs_spec:
diff --git a/lib/cosNotification/src/Makefile b/lib/cosNotification/src/Makefile
-index 13153bd..0860700 100644
+index 72b063f..0fdb82e 100644
--- a/lib/cosNotification/src/Makefile
+++ b/lib/cosNotification/src/Makefile
-@@ -370,8 +370,7 @@ release_spec: opt
+@@ -371,8 +371,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -117,10 +117,10 @@ index 13153bd..0860700 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosProperty/src/Makefile b/lib/cosProperty/src/Makefile
-index d7b75d8..fba8746 100644
+index cd559e1..bdf035e 100644
--- a/lib/cosProperty/src/Makefile
+++ b/lib/cosProperty/src/Makefile
-@@ -179,8 +179,7 @@ release_spec: opt
+@@ -180,8 +180,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -131,10 +131,10 @@ index d7b75d8..fba8746 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosTime/src/Makefile b/lib/cosTime/src/Makefile
-index 0ab2b41..c29caeb 100644
+index 7a14db6..4b55398 100644
--- a/lib/cosTime/src/Makefile
+++ b/lib/cosTime/src/Makefile
-@@ -198,8 +198,7 @@ release_spec: opt
+@@ -199,8 +199,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -145,10 +145,10 @@ index 0ab2b41..c29caeb 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosTransactions/src/Makefile b/lib/cosTransactions/src/Makefile
-index 7b4a9cf..290707c 100644
+index 90e1e51..05826e0 100644
--- a/lib/cosTransactions/src/Makefile
+++ b/lib/cosTransactions/src/Makefile
-@@ -173,7 +173,7 @@ release_spec: opt
+@@ -174,7 +174,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -158,10 +158,10 @@ index 7b4a9cf..290707c 100644
$(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile
-index c185c15..68bacba 100644
+index 6e4008e..c2d00fc 100644
--- a/lib/crypto/src/Makefile
+++ b/lib/crypto/src/Makefile
-@@ -81,8 +81,6 @@ docs:
+@@ -82,8 +82,6 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -171,10 +171,10 @@ 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 d61519f..bfdb0c9 100644
+index f115f49..e7dc360 100644
--- a/lib/debugger/src/Makefile
+++ b/lib/debugger/src/Makefile
-@@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -117,7 +117,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -184,10 +184,10 @@ index d61519f..bfdb0c9 100644
$(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/dialyzer/src/Makefile b/lib/dialyzer/src/Makefile
-index 91fbdca..01fb30c 100644
+index 770af21..4f8a6d8 100644
--- a/lib/dialyzer/src/Makefile
+++ b/lib/dialyzer/src/Makefile
-@@ -151,7 +151,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -152,7 +152,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -197,10 +197,10 @@ index 91fbdca..01fb30c 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile
-index 9afccf2..107d65b 100644
+index e0bbbdf..10771b2 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
-@@ -250,11 +250,8 @@ release_spec: opt
+@@ -251,11 +251,8 @@ release_spec: opt
$(MAKE) $(EXAMPLE_DIRS:%/=release_examples_%)
$(TARGET_DIRS:%/=release_src_%): release_src_%:
@@ -228,10 +228,10 @@ index 4e5a418..c0bb0c3 100644
release_docs_spec:
diff --git a/lib/eldap/src/Makefile b/lib/eldap/src/Makefile
-index 2e1110e..b7f9b09 100644
+index cd3c102..b55c513 100644
--- a/lib/eldap/src/Makefile
+++ b/lib/eldap/src/Makefile
-@@ -98,10 +98,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -99,10 +99,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
@@ -243,10 +243,10 @@ index 2e1110e..b7f9b09 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/erl_docgen/src/Makefile b/lib/erl_docgen/src/Makefile
-index ef96f5d..d9a2f0d 100644
+index 7d41506..3f3562f 100644
--- a/lib/erl_docgen/src/Makefile
+++ b/lib/erl_docgen/src/Makefile
-@@ -89,8 +89,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -90,8 +90,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -256,10 +256,10 @@ index ef96f5d..d9a2f0d 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile
-index 377e593..668e278 100644
+index 461a52d..1f2e885 100644
--- a/lib/et/src/Makefile
+++ b/lib/et/src/Makefile
-@@ -108,7 +108,6 @@ release_spec: opt
+@@ -109,7 +109,6 @@ release_spec: opt
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -268,7 +268,7 @@ 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 47aef10..78ddc74 100644
+index 86a6d88..5732fd8 100644
--- a/lib/eunit/src/Makefile
+++ b/lib/eunit/src/Makefile
@@ -120,7 +120,6 @@ release_spec: opt
@@ -280,10 +280,10 @@ index 47aef10..78ddc74 100644
$(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
+index ff3080e..60337dd 100644
--- a/lib/gs/src/Makefile
+++ b/lib/gs/src/Makefile
-@@ -108,8 +108,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -109,8 +109,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -295,10 +295,10 @@ index f0200ca..86d3f74 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/bitmap"
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
-index d13dfb3..b09d62b 100644
+index 0938010..134ed7b 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
-@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/cerl"
@@ -308,10 +308,10 @@ index d13dfb3..b09d62b 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile
-index 75e156b..5e394ca 100644
+index f0af6ac..16b512e 100644
--- a/lib/hipe/flow/Makefile
+++ b/lib/hipe/flow/Makefile
-@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/flow"
@@ -321,10 +321,10 @@ index 75e156b..5e394ca 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile
-index 87015aa..84f870d 100644
+index a82e28c..f364a53 100644
--- a/lib/hipe/icode/Makefile
+++ b/lib/hipe/icode/Makefile
-@@ -119,7 +119,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -120,7 +120,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/icode"
@@ -334,10 +334,10 @@ index 87015aa..84f870d 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/llvm/Makefile b/lib/hipe/llvm/Makefile
-index 92f3789..82f3e77 100644
+index f6f6f6b..4369923 100644
--- a/lib/hipe/llvm/Makefile
+++ b/lib/hipe/llvm/Makefile
-@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -103,7 +103,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/llvm
@@ -347,10 +347,10 @@ index 92f3789..82f3e77 100644
$(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile
-index 66e4c3e..2f11670 100644
+index d44be2d..ed81f10 100644
--- a/lib/hipe/main/Makefile
+++ b/lib/hipe/main/Makefile
-@@ -117,7 +117,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -118,7 +118,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DATA) ../vsn.mk "$(RELSYSDIR)"
$(INSTALL_DIR) "$(RELSYSDIR)/main"
@@ -360,10 +360,10 @@ index 66e4c3e..2f11670 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/misc/Makefile b/lib/hipe/misc/Makefile
-index 16166f5..0ba5845 100644
+index be5c9bc..d40b322 100644
--- a/lib/hipe/misc/Makefile
+++ b/lib/hipe/misc/Makefile
-@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/misc"
@@ -373,10 +373,10 @@ index 16166f5..0ba5845 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
-index 751e876..98b7911 100644
+index 1bf52fe..5049bec 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
-@@ -104,7 +104,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -105,7 +105,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/rtl"
@@ -386,10 +386,10 @@ index 751e876..98b7911 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile
-index a5ee232..f03e41d 100644
+index 4a78ad7..1b1ce05 100644
--- a/lib/hipe/util/Makefile
+++ b/lib/hipe/util/Makefile
-@@ -49,7 +49,6 @@ HIPE_MODULES =
+@@ -50,7 +50,6 @@ HIPE_MODULES =
endif
MODULES = hipe_timing hipe_dot hipe_digraph $(HIPE_MODULES)
@@ -397,7 +397,7 @@ index a5ee232..f03e41d 100644
ERL_FILES= $(MODULES:%=%.erl)
TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
-@@ -103,8 +102,6 @@ $(DOCS)/%.html:%.erl
+@@ -104,8 +103,6 @@ $(DOCS)/%.html:%.erl
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -407,10 +407,10 @@ index a5ee232..f03e41d 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/ic/src/Makefile b/lib/ic/src/Makefile
-index e8769d2..965d0e7 100644
+index a6da81a..60870be 100644
--- a/lib/ic/src/Makefile
+++ b/lib/ic/src/Makefile
-@@ -199,7 +199,7 @@ release_spec: opt
+@@ -200,7 +200,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -420,10 +420,10 @@ index e8769d2..965d0e7 100644
$(INSTALL_DIR) "$(RELSYSDIR)/examples/c-client"
$(INSTALL_DATA) $(CCL_EX_FILES) "$(RELSYSDIR)/examples/c-client"
diff --git a/lib/inets/src/ftp/Makefile b/lib/inets/src/ftp/Makefile
-index 2c3d2b6..de0450e 100644
+index f8daa2b..48e5d49 100644
--- a/lib/inets/src/ftp/Makefile
+++ b/lib/inets/src/ftp/Makefile
-@@ -90,7 +90,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -91,7 +91,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/ftp"
@@ -433,10 +433,10 @@ index 2c3d2b6..de0450e 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/http_client/Makefile b/lib/inets/src/http_client/Makefile
-index f0d4ce1..35c4ffc 100644
+index cb97b52..cb13dfb 100644
--- a/lib/inets/src/http_client/Makefile
+++ b/lib/inets/src/http_client/Makefile
-@@ -91,7 +91,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -92,7 +92,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/http_client"
@@ -446,10 +446,10 @@ index f0d4ce1..35c4ffc 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/http_lib/Makefile b/lib/inets/src/http_lib/Makefile
-index 51167b3..a623824 100644
+index 4a4eef9..c779c8e 100644
--- a/lib/inets/src/http_lib/Makefile
+++ b/lib/inets/src/http_lib/Makefile
-@@ -89,7 +89,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -90,7 +90,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/http_lib"
@@ -459,23 +459,23 @@ index 51167b3..a623824 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/http_server/Makefile b/lib/inets/src/http_server/Makefile
-index 2660d04..c873a27 100644
+index 1c05d45..88f9f62 100644
--- a/lib/inets/src/http_server/Makefile
+++ b/lib/inets/src/http_server/Makefile
-@@ -126,7 +126,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -135,7 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/http_server"
- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/http_server"
+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/http_server"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile
-index 22426ee..0b0cfb8 100644
+index 82cda6a..edfebd2 100644
--- a/lib/inets/src/inets_app/Makefile
+++ b/lib/inets/src/inets_app/Makefile
-@@ -113,7 +113,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/inets_app"
@@ -485,10 +485,10 @@ index 22426ee..0b0cfb8 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/tftp/Makefile b/lib/inets/src/tftp/Makefile
-index b368b12..5eddaf0 100644
+index d5d94e1..5583064 100644
--- a/lib/inets/src/tftp/Makefile
+++ b/lib/inets/src/tftp/Makefile
-@@ -95,7 +95,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -96,7 +96,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/tftp"
@@ -498,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 c7c70ad..3e1792f 100644
+index 57daceb..1cebd80 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
-@@ -199,7 +199,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -200,7 +200,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -510,10 +510,10 @@ index c7c70ad..3e1792f 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/megaco/src/app/Makefile b/lib/megaco/src/app/Makefile
-index d18da53..4a9f4d2 100644
+index 8f8e6ec..9e0bc82 100644
--- a/lib/megaco/src/app/Makefile
+++ b/lib/megaco/src/app/Makefile
-@@ -113,7 +113,7 @@ release_spec: opt
+@@ -114,7 +114,7 @@ release_spec: opt
$(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/app"
@@ -523,10 +523,10 @@ index d18da53..4a9f4d2 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/megaco/src/binary/Makefile b/lib/megaco/src/binary/Makefile
-index c1fd66b..0699ffa 100644
+index 711fbb7..1db4593 100644
--- a/lib/megaco/src/binary/Makefile
+++ b/lib/megaco/src/binary/Makefile
-@@ -175,7 +175,7 @@ release_spec: opt
+@@ -176,7 +176,7 @@ release_spec: opt
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/binary"
@@ -536,10 +536,10 @@ index c1fd66b..0699ffa 100644
release_docs_spec:
diff --git a/lib/megaco/src/engine/Makefile b/lib/megaco/src/engine/Makefile
-index 7cecef1..841a88a 100644
+index 208942c..d5b7218 100644
--- a/lib/megaco/src/engine/Makefile
+++ b/lib/megaco/src/engine/Makefile
-@@ -101,7 +101,7 @@ release_spec: opt
+@@ -102,7 +102,7 @@ release_spec: opt
$(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/engine"
@@ -549,23 +549,22 @@ index 7cecef1..841a88a 100644
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
-index bd62e8b..cce5a8d 100644
+index 39be02a..8c6ba31 100644
--- a/lib/megaco/src/flex/Makefile.in
+++ b/lib/megaco/src/flex/Makefile.in
-@@ -267,8 +267,6 @@ release_spec: opt
+@@ -268,7 +268,6 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src/flex"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/flex"
-- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
$(INSTALL_DATA) $(FLEX_FILES) "$(RELSYSDIR)/src/flex"
- $(INSTALL_PROGRAM) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
diff --git a/lib/megaco/src/tcp/Makefile b/lib/megaco/src/tcp/Makefile
-index 0c30aba..aa553ff 100644
+index 0c546a8..78f659a 100644
--- a/lib/megaco/src/tcp/Makefile
+++ b/lib/megaco/src/tcp/Makefile
-@@ -93,7 +93,7 @@ release_spec: opt
+@@ -94,7 +94,7 @@ release_spec: opt
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/tcp"
@@ -575,10 +574,10 @@ index 0c30aba..aa553ff 100644
release_docs_spec:
diff --git a/lib/megaco/src/text/Makefile b/lib/megaco/src/text/Makefile
-index cab4256..d5cf217 100644
+index f4fc56a..1cc73fd 100644
--- a/lib/megaco/src/text/Makefile
+++ b/lib/megaco/src/text/Makefile
-@@ -134,7 +134,7 @@ release_spec: opt
+@@ -135,7 +135,7 @@ release_spec: opt
$(INSTALL_DATA) $(BEAM_TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/text"
@@ -588,10 +587,10 @@ index cab4256..d5cf217 100644
release_docs_spec:
diff --git a/lib/megaco/src/udp/Makefile b/lib/megaco/src/udp/Makefile
-index 9486804..ea4830c 100644
+index 7288c20..aefd9f3 100644
--- a/lib/megaco/src/udp/Makefile
+++ b/lib/megaco/src/udp/Makefile
-@@ -93,7 +93,7 @@ release_spec: opt
+@@ -94,7 +94,7 @@ release_spec: opt
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/udp"
@@ -601,10 +600,10 @@ index 9486804..ea4830c 100644
release_docs_spec:
diff --git a/lib/mnesia/src/Makefile b/lib/mnesia/src/Makefile
-index ac38fa0..20bce7e 100644
+index dae0df7..6294ae9 100644
--- a/lib/mnesia/src/Makefile
+++ b/lib/mnesia/src/Makefile
-@@ -132,7 +132,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -133,7 +133,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -614,10 +613,10 @@ index ac38fa0..20bce7e 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
-index c120865..6831d23 100644
+index 2d42510..7579014 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
-@@ -149,7 +149,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -152,7 +152,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -626,10 +625,10 @@ index c120865..6831d23 100644
$(INSTALL_DIR) "$(RELSYSDIR)/examples"
$(INSTALL_DATA) $(EXAMPLE_FILES) "$(RELSYSDIR)/examples"
diff --git a/lib/odbc/src/Makefile b/lib/odbc/src/Makefile
-index bfbda8a..6e4ad54 100644
+index 51c9ed3..50a4c10 100644
--- a/lib/odbc/src/Makefile
+++ b/lib/odbc/src/Makefile
-@@ -109,7 +109,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -110,7 +110,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -639,10 +638,10 @@ index bfbda8a..6e4ad54 100644
$(INSTALL_DATA) $(EXT_HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/orber/COSS/CosNaming/Makefile b/lib/orber/COSS/CosNaming/Makefile
-index 8140620..73df530 100644
+index 0eca8dd..18d9627 100644
--- a/lib/orber/COSS/CosNaming/Makefile
+++ b/lib/orber/COSS/CosNaming/Makefile
-@@ -144,8 +144,8 @@ release_spec: opt
+@@ -145,8 +145,8 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/COSS/CosNaming"
@@ -654,10 +653,10 @@ index 8140620..73df530 100644
release_docs_spec:
diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile
-index 398e481..f079e77 100644
+index 30b74c4..9c6708f 100644
--- a/lib/orber/src/Makefile
+++ b/lib/orber/src/Makefile
-@@ -252,7 +252,7 @@ release_spec: opt
+@@ -253,7 +253,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -667,10 +666,10 @@ index 398e481..f079e77 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) $(GEN_HRL_FILES_EXT) "$(RELSYSDIR)/include"
diff --git a/lib/os_mon/src/Makefile b/lib/os_mon/src/Makefile
-index 4e78cf8..69d434c 100644
+index 1003d24..1b12154 100644
--- a/lib/os_mon/src/Makefile
+++ b/lib/os_mon/src/Makefile
-@@ -104,7 +104,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -105,7 +105,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -679,10 +678,10 @@ index 4e78cf8..69d434c 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/ose/src/Makefile b/lib/ose/src/Makefile
-index 88f8957..ab08a88 100644
+index a89e939..224d944 100644
--- a/lib/ose/src/Makefile
+++ b/lib/ose/src/Makefile
-@@ -93,9 +93,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -94,9 +94,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -693,10 +692,10 @@ 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 6096240..cbc41e6 100644
+index 03892cd..c3ad326 100644
--- a/lib/otp_mibs/src/Makefile
+++ b/lib/otp_mibs/src/Makefile
-@@ -95,8 +95,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -96,8 +96,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -706,10 +705,10 @@ index 6096240..cbc41e6 100644
$(INSTALL_DATA) $(TARGETS) "$(RELSYSDIR)/ebin"
diff --git a/lib/parsetools/src/Makefile b/lib/parsetools/src/Makefile
-index 2ee2285..ea075ed 100644
+index dbecdd2..1d45801 100644
--- a/lib/parsetools/src/Makefile
+++ b/lib/parsetools/src/Makefile
-@@ -90,8 +90,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -91,8 +91,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -719,10 +718,10 @@ 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 0282d63..5902da3 100644
+index 9b963e0..deeb75c 100644
--- a/lib/percept/src/Makefile
+++ b/lib/percept/src/Makefile
-@@ -96,7 +96,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -97,7 +97,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -731,10 +730,10 @@ index 0282d63..5902da3 100644
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
# $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile
-index c1b3bc8..3d021cf 100644
+index 7474297..a510658 100644
--- a/lib/public_key/asn1/Makefile
+++ b/lib/public_key/asn1/Makefile
-@@ -95,8 +95,8 @@ release_spec: opt
+@@ -96,8 +96,8 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/asn1"
@@ -746,19 +745,10 @@ index c1b3bc8..3d021cf 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/public_key/src/Makefile b/lib/public_key/src/Makefile
-index 09393e8..eb4c54d 100644
+index 786f244..0463c67 100644
--- a/lib/public_key/src/Makefile
+++ b/lib/public_key/src/Makefile
-@@ -49,8 +49,6 @@ MODULES = \
-
- HRL_FILES = $(INCLUDE)/public_key.hrl
-
--INTERNAL_HRL_FILES =
--
- ERL_FILES = $(MODULES:%=%.erl)
-
- TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
-@@ -103,8 +101,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -109,8 +109,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -768,10 +758,10 @@ index 09393e8..eb4c54d 100644
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/reltool/src/Makefile b/lib/reltool/src/Makefile
-index b8387ff..2012af9 100644
+index 1fea415..a756470 100644
--- a/lib/reltool/src/Makefile
+++ b/lib/reltool/src/Makefile
-@@ -99,7 +99,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -100,7 +100,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -781,10 +771,10 @@ index b8387ff..2012af9 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/runtime_tools/src/Makefile b/lib/runtime_tools/src/Makefile
-index 8d2bcfe..d1a9cac 100644
+index 99b90f9..25b3ebb 100644
--- a/lib/runtime_tools/src/Makefile
+++ b/lib/runtime_tools/src/Makefile
-@@ -96,8 +96,6 @@ docs:
+@@ -97,8 +97,6 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -794,10 +784,10 @@ index 8d2bcfe..d1a9cac 100644
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/examples"
diff --git a/lib/sasl/src/Makefile b/lib/sasl/src/Makefile
-index ab2d3a3..bb53a67 100644
+index 7ff6a03..a304900 100644
--- a/lib/sasl/src/Makefile
+++ b/lib/sasl/src/Makefile
-@@ -92,7 +92,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -93,7 +93,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -806,10 +796,10 @@ index ab2d3a3..bb53a67 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/snmp/src/agent/Makefile b/lib/snmp/src/agent/Makefile
-index beed696..752072d 100644
+index 89037b3..01de885 100644
--- a/lib/snmp/src/agent/Makefile
+++ b/lib/snmp/src/agent/Makefile
-@@ -130,7 +130,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -131,7 +131,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/agent"
@@ -819,10 +809,10 @@ index beed696..752072d 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/snmp/src/app/Makefile b/lib/snmp/src/app/Makefile
-index b8cc4b8..d806efb 100644
+index 7972d95..78a9f2b 100644
--- a/lib/snmp/src/app/Makefile
+++ b/lib/snmp/src/app/Makefile
-@@ -131,7 +131,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -132,7 +132,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/app"
@@ -832,10 +822,10 @@ index b8cc4b8..d806efb 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/snmp/src/compile/Makefile b/lib/snmp/src/compile/Makefile
-index f63fc18..9759451 100644
+index 54f2e22..488faa4 100644
--- a/lib/snmp/src/compile/Makefile
+++ b/lib/snmp/src/compile/Makefile
-@@ -122,7 +122,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -123,7 +123,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/compiler"
@@ -845,10 +835,10 @@ index f63fc18..9759451 100644
$(INSTALL_DATA) $(EBIN_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/bin"
diff --git a/lib/snmp/src/manager/Makefile b/lib/snmp/src/manager/Makefile
-index c76dbac..548823a 100644
+index 382f83b..db50c26 100644
--- a/lib/snmp/src/manager/Makefile
+++ b/lib/snmp/src/manager/Makefile
-@@ -113,7 +113,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -114,7 +114,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/manager"
@@ -858,10 +848,10 @@ index c76dbac..548823a 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
diff --git a/lib/snmp/src/misc/Makefile b/lib/snmp/src/misc/Makefile
-index 698c341..3344a0c 100644
+index c71ecf9..d17e699 100644
--- a/lib/snmp/src/misc/Makefile
+++ b/lib/snmp/src/misc/Makefile
-@@ -111,7 +111,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -112,7 +112,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/misc"
@@ -871,7 +861,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 90d7110..e725c6c 100644
+index b44c8ee..8f8b58d 100644
--- a/lib/ssh/src/Makefile
+++ b/lib/ssh/src/Makefile
@@ -135,7 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -884,10 +874,10 @@ index 90d7110..e725c6c 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 0c00a65..acec405 100644
+index 790328d..db08822 100644
--- a/lib/ssl/src/Makefile
+++ b/lib/ssl/src/Makefile
-@@ -137,7 +137,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -141,7 +141,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -897,10 +887,10 @@ index 0c00a65..acec405 100644
$(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \
$(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
-index 9ab2cd4..876bfd2 100644
+index 9f4a446..50ac11e 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
-@@ -203,7 +203,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -207,7 +207,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -909,23 +899,23 @@ index 9ab2cd4..876bfd2 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/syntax_tools/src/Makefile b/lib/syntax_tools/src/Makefile
-index c9fbad8..2fc7f18 100644
+index 2e91adf..0085fca 100644
--- a/lib/syntax_tools/src/Makefile
+++ b/lib/syntax_tools/src/Makefile
-@@ -82,8 +82,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -100,8 +100,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(OBJECTS) "$(RELSYSDIR)/ebin"
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(SOURCES) "$(RELSYSDIR)/src"
-
- release_docs_spec:
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile
-index 35bbad3..deb7caf 100644
+index 6a26ee2..7336477 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
+@@ -124,7 +124,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -934,10 +924,10 @@ index 35bbad3..deb7caf 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/tools/src/Makefile b/lib/tools/src/Makefile
-index e606b97..1beb8cc 100644
+index 9fcfb79..b30b173 100644
--- a/lib/tools/src/Makefile
+++ b/lib/tools/src/Makefile
-@@ -106,7 +106,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -107,7 +107,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -947,10 +937,10 @@ index e606b97..1beb8cc 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/typer/src/Makefile b/lib/typer/src/Makefile
-index a7059de..0b1ae2a 100644
+index 620ca21..9c9390e 100644
--- a/lib/typer/src/Makefile
+++ b/lib/typer/src/Makefile
-@@ -101,9 +101,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -102,9 +102,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -961,10 +951,10 @@ index a7059de..0b1ae2a 100644
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile
-index af565c8..6c65b26 100644
+index a5a8eaf..be80ba7 100644
--- a/lib/webtool/src/Makefile
+++ b/lib/webtool/src/Makefile
-@@ -87,8 +87,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+@@ -88,8 +88,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -974,10 +964,10 @@ index af565c8..6c65b26 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/wx/src/Makefile b/lib/wx/src/Makefile
-index 26574ed..266a5d6 100644
+index b345e34..153a270 100644
--- a/lib/wx/src/Makefile
+++ b/lib/wx/src/Makefile
-@@ -121,9 +121,9 @@ $(EBIN)/%.beam: $(EGEN)/%.erl $(HEADER_FILES)
+@@ -122,9 +122,9 @@ $(EBIN)/%.beam: $(EGEN)/%.erl $(HEADER_FILES)
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -990,10 +980,10 @@ index 26574ed..266a5d6 100644
$(INSTALL_DATA) $(EXT_HRL) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/xmerl/src/Makefile b/lib/xmerl/src/Makefile
-index d5ce3fe..e21e4b1 100644
+index f8f0320..099513e 100644
--- a/lib/xmerl/src/Makefile
+++ b/lib/xmerl/src/Makefile
-@@ -217,9 +217,7 @@ release_spec: opt
+@@ -218,9 +218,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
diff --git a/otp-0007-Split-off-webtool-dependency-from-tools.patch b/otp-0007-Split-off-webtool-dependency-from-tools.patch
index f2de8ac..9a06884 100644
--- a/otp-0007-Split-off-webtool-dependency-from-tools.patch
+++ b/otp-0007-Split-off-webtool-dependency-from-tools.patch
@@ -5,10 +5,10 @@ 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
+index ae8b3f2..539ca96 100644
--- a/lib/tools/src/cover_web.erl
+++ b/lib/tools/src/cover_web.erl
-@@ -50,14 +50,25 @@
+@@ -51,14 +51,25 @@
%%%----------------------------------------------------------------------
%% Start webtool and webcover from erlang shell
start() ->
diff --git a/otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch b/otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
new file mode 100644
index 0000000..9a60730
--- /dev/null
+++ b/otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
@@ -0,0 +1,31 @@
+From: John Eckersberg
+Date: Wed, 16 Dec 2015 11:03:42 -0500
+Subject: [PATCH] Add patch to crash dump on large distribution
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1291822
+https://bugzilla.redhat.com/show_bug.cgi?id=1291855
+https://bugzilla.redhat.com/show_bug.cgi?id=1291856
+https://bugzilla.redhat.com/show_bug.cgi?id=1291857
+
+diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
+index 7be2b77..c3b6a7d 100644
+--- a/erts/emulator/beam/dist.c
++++ b/erts/emulator/beam/dist.c
+@@ -1980,7 +1980,7 @@ dist_port_command(Port *prt, ErtsDistOutputBuf *obuf)
+ ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(prt));
+
+ if (size > (Uint) INT_MAX)
+- erl_exit(ERTS_ABORT_EXIT,
++ erl_exit(ERTS_DUMP_EXIT,
+ "Absurdly large distribution output data buffer "
+ "(%beu bytes) passed.\n",
+ size);
+@@ -2020,7 +2020,7 @@ dist_port_commandv(Port *prt, ErtsDistOutputBuf *obuf)
+ ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(prt));
+
+ if (size > (Uint) INT_MAX)
+- erl_exit(ERTS_ABORT_EXIT,
++ erl_exit(ERTS_DUMP_EXIT,
+ "Absurdly large distribution output data buffer "
+ "(%beu bytes) passed.\n",
+ size);
diff --git a/otp-0008-Introduce-os-getenv-2.patch b/otp-0008-Introduce-os-getenv-2.patch
deleted file mode 100644
index 6c48db2..0000000
--- a/otp-0008-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-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch b/otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
deleted file mode 100644
index fa55663..0000000
--- a/otp-0009-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 b53344e..b245621 100644
---- a/lib/ssl/doc/src/ssl.xml
-+++ b/lib/ssl/doc/src/ssl.xml
-@@ -123,7 +123,7 @@
-
-
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.
-+
This option only affects TLS-1.0 connections.
-+ If set to false it disables the block cipher padding check
-+ to be able to interoperate with legacy software.
-+
-+
-+
Using this option makes TLS vulnerable to
-+ the Poodle attack
-diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd.c otp_src_R16B03-1/erts/epmd/src/epmd.c
---- otp_src_R16B03-1.orig/erts/epmd/src/epmd.c 2016-01-16 14:06:42.823537438 -0500
-+++ otp_src_R16B03-1/erts/epmd/src/epmd.c 2016-01-16 14:07:02.565424309 -0500
-@@ -342,7 +342,7 @@
+diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
+index 1757fa9..ebae0a5 100644
+--- a/erts/epmd/src/epmd.c
++++ b/erts/epmd/src/epmd.c
+@@ -342,7 +342,7 @@ static void run_daemon(EpmdVars *g)
for (fd = 0; fd < g->max_conn ; fd++) /* close all files ... */
close(fd);
/* Syslog on linux will try to write to whatever if we dont
@@ -54,10 +100,11 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd.c otp_src_R16B03-1/erts/epmd
closelog();
/* These chouldn't be needed but for safety... */
-diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_cli.c otp_src_R16B03-1/erts/epmd/src/epmd_cli.c
---- otp_src_R16B03-1.orig/erts/epmd/src/epmd_cli.c 2016-01-16 14:06:42.823537438 -0500
-+++ otp_src_R16B03-1/erts/epmd/src/epmd_cli.c 2016-01-16 14:07:02.565424309 -0500
-@@ -135,19 +135,33 @@
+diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c
+index 8817bde..c0b3729 100644
+--- a/erts/epmd/src/epmd_cli.c
++++ b/erts/epmd/src/epmd_cli.c
+@@ -135,19 +135,33 @@ void epmd_call(EpmdVars *g,int what)
static int conn_to_epmd(EpmdVars *g)
{
struct EPMD_SOCKADDR_IN address;
@@ -91,17 +138,18 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_cli.c otp_src_R16B03-1/erts/
- if (connect(connect_sock, (struct sockaddr*)&address, sizeof address) < 0)
+ connect_sock = socket(AF_INET, SOCK_STREAM, 0);
+ if (connect_sock<0)
-+ goto error;
+ goto error;
+
+ if (connect(connect_sock, (struct sockaddr*)&address, salen) < 0)
- goto error;
++ goto error;
+
return connect_sock;
error:
-diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_int.h otp_src_R16B03-1/erts/epmd/src/epmd_int.h
---- otp_src_R16B03-1.orig/erts/epmd/src/epmd_int.h 2016-01-16 14:06:42.823537438 -0500
-+++ otp_src_R16B03-1/erts/epmd/src/epmd_int.h 2016-01-16 14:07:02.565424309 -0500
+diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
+index 363923e..e028449 100644
+--- a/erts/epmd/src/epmd_int.h
++++ b/erts/epmd/src/epmd_int.h
@@ -44,9 +44,14 @@
#include
@@ -198,10 +246,11 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_int.h otp_src_R16B03-1/erts/
#endif /* Not IP v6 */
/* ************************************************************************ */
-diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/epmd/src/epmd_srv.c
---- otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c 2016-01-16 14:06:42.823537438 -0500
-+++ otp_src_R16B03-1/erts/epmd/src/epmd_srv.c 2016-01-16 14:09:00.945745937 -0500
-@@ -70,6 +70,7 @@
+diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
+index 78524a6..7b4d774 100644
+--- a/erts/epmd/src/epmd_srv.c
++++ b/erts/epmd/src/epmd_srv.c
+@@ -70,6 +70,7 @@ static time_t current_time(EpmdVars*);
static Connection *conn_init(EpmdVars*);
static int conn_open(EpmdVars*,int);
@@ -209,7 +258,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
static int conn_close_fd(EpmdVars*,int);
static void node_init(EpmdVars*);
-@@ -200,10 +201,11 @@
+@@ -200,10 +201,11 @@ void run(EpmdVars *g)
{
struct EPMD_SOCKADDR_IN iserv_addr[MAX_LISTEN_SOCKETS];
int listensock[MAX_LISTEN_SOCKETS];
@@ -222,7 +271,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
node_init(g);
g->conn = conn_init(g);
-@@ -246,64 +248,82 @@
+@@ -246,64 +248,82 @@ void run(EpmdVars *g)
if (g->addresses != NULL && /* String contains non-separator characters if: */
g->addresses[strspn(g->addresses," ,")] != '\000')
{
@@ -231,8 +280,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
- int loopback_ok = 0;
+ char *tmp = NULL;
+ char *token = NULL;
-
-- if ((tmp = (char *)malloc(strlen(g->addresses) + 1)) == NULL)
++
+ /* Always listen on the loopback. */
+ SET_ADDR(iserv_addr[num_sockets],htonl(INADDR_LOOPBACK),sport);
+ num_sockets++;
@@ -240,7 +288,8 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
+ SET_ADDR6(iserv_addr[num_sockets],in6addr_loopback,sport);
+ num_sockets++;
+#endif
-+
+
+- if ((tmp = (char *)malloc(strlen(g->addresses) + 1)) == NULL)
+ if ((tmp = strdup(g->addresses)) == NULL)
{
dbg_perror(g,"cannot allocate memory");
@@ -297,10 +346,10 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
if (IS_ADDR_LOOPBACK(addr))
- loopback_ok = 1;
+ continue;
++
++ num_sockets++;
- if (num_sockets - loopback_ok == MAX_LISTEN_SOCKETS - 1)
-+ num_sockets++;
-+
+ if (num_sockets >= MAX_LISTEN_SOCKETS)
{
dbg_tty_printf(g,0,"cannot listen on more than %d IP addresses",
@@ -332,7 +381,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
}
#ifdef HAVE_SYSTEMD_SD_DAEMON_H
}
-@@ -334,13 +354,39 @@
+@@ -334,13 +354,39 @@ void run(EpmdVars *g)
#endif
for (i = 0; i < num_sockets; i++)
{
@@ -376,7 +425,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
/*
* Note that we must not enable the SO_REUSEADDR on Windows,
* because addresses will be reused even if they are still in use.
-@@ -372,8 +418,7 @@
+@@ -372,8 +418,7 @@ void run(EpmdVars *g)
dbg_perror(g,"failed to set non-blocking mode of listening socket %d",
listensock[i]);
@@ -386,7 +435,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
{
if (errno == EADDRINUSE)
{
-@@ -388,12 +433,20 @@
+@@ -388,12 +433,20 @@ void run(EpmdVars *g)
}
}
@@ -407,7 +456,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
#ifdef HAVE_SYSTEMD_SD_DAEMON_H
}
sd_notifyf(0, "READY=1\n"
-@@ -1001,15 +1054,6 @@
+@@ -1001,15 +1054,6 @@ static int conn_open(EpmdVars *g,int fd)
for (i = 0; i < g->max_conn; i++) {
if (g->conn[i].open == EPMD_FALSE) {
@@ -423,7 +472,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
g->active_conn++;
s = &g->conn[i];
-@@ -1020,20 +1064,7 @@
+@@ -1020,20 +1064,7 @@ static int conn_open(EpmdVars *g,int fd)
s->open = EPMD_TRUE;
s->keep = EPMD_FALSE;
@@ -445,7 +494,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
dbg_tty_printf(g,2,(s->local_peer) ? "Local peer connected" :
"Non-local peer connected");
-@@ -1041,7 +1072,7 @@
+@@ -1041,7 +1072,7 @@ static int conn_open(EpmdVars *g,int fd)
s->got = 0;
s->mod_time = current_time(g); /* Note activity */
@@ -454,7 +503,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
if (s->buf == NULL) {
dbg_printf(g,0,"epmd: Insufficient memory");
-@@ -1059,6 +1090,60 @@
+@@ -1059,6 +1090,60 @@ static int conn_open(EpmdVars *g,int fd)
return EPMD_FALSE;
}
@@ -515,9 +564,10 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/src/epmd_srv.c otp_src_R16B03-1/erts/
static int conn_close_fd(EpmdVars *g,int fd)
{
int i;
-diff -Naur otp_src_R16B03-1.orig/erts/epmd/test/epmd_SUITE.erl otp_src_R16B03-1/erts/epmd/test/epmd_SUITE.erl
---- otp_src_R16B03-1.orig/erts/epmd/test/epmd_SUITE.erl 2016-01-16 14:06:42.823537438 -0500
-+++ otp_src_R16B03-1/erts/epmd/test/epmd_SUITE.erl 2016-01-16 14:07:02.566424303 -0500
+diff --git a/erts/epmd/test/epmd_SUITE.erl b/erts/epmd/test/epmd_SUITE.erl
+index cc24a55..ddfe5ab 100644
+--- a/erts/epmd/test/epmd_SUITE.erl
++++ b/erts/epmd/test/epmd_SUITE.erl
@@ -42,6 +42,7 @@
-export(
[
@@ -536,7 +586,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/test/epmd_SUITE.erl otp_src_R16B03-1/
register_duplicate_name, unicode_name, long_unicode_name,
get_port_nr, slow_get_port_nr,
unregister_others_name_1, unregister_others_name_2,
-@@ -165,6 +167,24 @@
+@@ -165,6 +167,24 @@ register_name(Config) when is_list(Config) ->
?line ok = close(Sock), % Unregister
ok.
@@ -561,7 +611,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/test/epmd_SUITE.erl otp_src_R16B03-1/
register_names_1(doc) ->
["Register and unregister two nodes"];
register_names_1(suite) ->
-@@ -238,13 +258,18 @@
+@@ -238,13 +258,18 @@ register_node(Name) ->
register_node(Name,Port) ->
register_node_v2(Port,$M,0,5,5,Name,"").
@@ -581,7 +631,7 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/test/epmd_SUITE.erl otp_src_R16B03-1/
{ok,Sock} ->
case recv(Sock,4) of
{ok, [?EPMD_ALIVE2_RESP,_Res=0,_C0,_C1]} ->
-@@ -1129,7 +1154,9 @@
+@@ -1129,7 +1154,9 @@ send_direct(Sock, Bytes) ->
end.
send_req(Req) ->
@@ -592,9 +642,10 @@ diff -Naur otp_src_R16B03-1.orig/erts/epmd/test/epmd_SUITE.erl otp_src_R16B03-1/
{ok,Sock} ->
case send(Sock, [size16(Req), Req]) of
ok ->
-diff -Naur otp_src_R16B03-1.orig/lib/kernel/src/erl_epmd.erl otp_src_R16B03-1/lib/kernel/src/erl_epmd.erl
---- otp_src_R16B03-1.orig/lib/kernel/src/erl_epmd.erl 2016-01-16 14:06:43.005536396 -0500
-+++ otp_src_R16B03-1/lib/kernel/src/erl_epmd.erl 2016-01-16 14:07:02.566424303 -0500
+diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
+index 91af49f..21a3dec 100644
+--- a/lib/kernel/src/erl_epmd.erl
++++ b/lib/kernel/src/erl_epmd.erl
@@ -31,7 +31,7 @@
%% External exports
-export([start/0, start_link/0, stop/0, port_please/2,
@@ -604,7 +655,7 @@ diff -Naur otp_src_R16B03-1.orig/lib/kernel/src/erl_epmd.erl otp_src_R16B03-1/li
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
-@@ -106,7 +106,9 @@
+@@ -106,7 +106,9 @@ names1(HostName) ->
register_node(Name, PortNo) ->
@@ -615,7 +666,7 @@ diff -Naur otp_src_R16B03-1.orig/lib/kernel/src/erl_epmd.erl otp_src_R16B03-1/li
%%%----------------------------------------------------------------------
%%% Callback functions from gen_server
-@@ -124,10 +126,10 @@
+@@ -124,10 +126,10 @@ init(_) ->
-spec handle_call(calls(), term(), state()) ->
{'reply', term(), state()} | {'stop', 'shutdown', 'ok', state()}.
@@ -628,7 +679,7 @@ diff -Naur otp_src_R16B03-1.orig/lib/kernel/src/erl_epmd.erl otp_src_R16B03-1/li
{alive, Socket, Creation} ->
S = State#state{socket = Socket,
port_no = PortNo,
-@@ -210,8 +212,12 @@
+@@ -210,8 +212,12 @@ open({A,B,C,D,E,F,G,H}=EpmdAddr, Timeout) when ?ip6(A,B,C,D,E,F,G,H) ->
close(Socket) ->
gen_tcp:close(Socket).
diff --git a/otp-0024-Remove-unused-code-in-error-logger-handlers.patch b/otp-0024-Remove-unused-code-in-error-logger-handlers.patch
new file mode 100644
index 0000000..a3ea0ac
--- /dev/null
+++ b/otp-0024-Remove-unused-code-in-error-logger-handlers.patch
@@ -0,0 +1,1028 @@
+From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
+Date: Thu, 20 Aug 2015 09:44:43 +0200
+Subject: [PATCH] Remove unused code in error logger handlers
+
+A long time ago, errors from the emulator itself was sent as
+messages that would end up in the handle_info/2 function.
+Those clauses in handle_info/2 can be removed.
+
+The code for handling events tagged 'info' instead of 'info_msg'
+can also be taken out.
+
+error_logger_file_h: Refactor and modernize code
+
+Refactor, simplify, and modernize the code to facilitate future
+improvements in the following commits.
+
+Teach error_logger_file_h to truncate big messages
+
+Add the possibility to truncate big messages to avoid running out
+of memory.
+
+error_logger_tty_h: Refactor and modernize code
+
+Refactor, simplify, and modernize the code to facilitate future
+improvements in the following commits.
+
+Teach error_logger_tty_h to truncate big messages
+
+Add the possibility to truncate big messages to avoid running out
+of memory.
+
+stdlib: Fix leaking files after error_logger:logfile(close)
+
+Introduced when changing state from tuple to record.
+
+Make the scanned form of the io_lib format strings available for processing
+
+This adds three new functions to io_lib - scan_format/2, unscan_format/1,
+and build_text/1 - which expose the parsed form of the format control
+sequences to make it possible to easily modify or filter the input to
+io_lib:format/2. This can e.g. be used in order to replace unbounded-size
+control sequences like ~w or ~p with corresponding depth-limited ~W and ~P
+before doing the actual formatting.
+
+diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
+index 90f24c4..6613dcd 100644
+--- a/lib/stdlib/doc/src/io.xml
++++ b/lib/stdlib/doc/src/io.xml
+@@ -505,7 +505,8 @@ ok
+
Writes the data with standard syntax in the same way as
+ ~w, but breaks terms whose printed representation
+ is longer than one line into many lines and indents each
+- line sensibly. It also tries to detect lists of
++ line sensibly. Left justification is not supported.
++ It also tries to detect lists of
+ printable characters and to output these as strings. The
+ Unicode translation modifier is used for determining
+ what characters are printable. For example:
+diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
+index 68352ff..0c1c84d 100644
+--- a/lib/stdlib/doc/src/io_lib.xml
++++ b/lib/stdlib/doc/src/io_lib.xml
+@@ -4,7 +4,7 @@
+
+
+
+- 19962013
++ 19962014
+ Ericsson AB. All Rights Reserved.
+
+
+@@ -59,6 +59,35 @@
+
+
+
++
++
++
Description:
++
++
control_char is the type of control
++ sequence: $P, $w, and so on;
++
++
args is a list of the arguments used by the
++ control sequence, or an empty list if the control sequence
++ does not take any arguments;
++
++
width is the field width;
++
++
adjust is the adjustment;
++
++
precision is the precision of the printed
++ argument;
++
++
pad_char is the padding character;
++
++
encoding is set to true if the translation
++ modifier t is present;
++
++
strings is set to false if the modifier
++ l is present.
++
++
++
++
+
+
+
+@@ -260,6 +289,45 @@
+
+
+
++
++ Parse all control sequences in the format string
++
++
Returns a list corresponding to the given format string,
++ where control sequences have been replaced with
++ corresponding tuples. This list can be passed to io_lib:build_text/1 to have
++ the same effect as io_lib:format(Format, Args), or to
++ io_lib:unscan_format/1
++ in order to get the corresponding pair of Format and
++ Args (with every * and corresponding argument
++ expanded to numeric values).
++
A typical use of this function is to replace unbounded-size
++ control sequences like ~w and ~p with the
++ depth-limited variants ~W and ~P before
++ formatting to text, e.g. in a logger.
++
++
++
++
++ Revert a pre-parsed format list to a plain character list
++ and a list of arguments
++
++
See io_lib:scan_format/2 for
++ details.
++
++
++
++
++ Build the output text for a pre-parsed format list
++
++
See io_lib:scan_format/2 for
++ details.
++
++
++
+
+ Indentation after printing string
+
+diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl
+index e9364ed..ca44d01 100644
+--- a/lib/stdlib/src/error_logger_file_h.erl
++++ b/lib/stdlib/src/error_logger_file_h.erl
+@@ -23,24 +23,28 @@
+
+ %%%
+ %%% A handler that can be connected to the error_logger
+-%%% event handler.
+-%%% Writes all events formatted to file.
+-%%% Handles events tagged error, emulator and info.
++%%% event handler. Writes all events formatted to file.
+ %%%
+ %%% It can only be started from error_logger:swap_handler({logfile, File})
+-%%% or error_logger:logfile(File)
++%%% or error_logger:logfile(File).
+ %%%
+
+ -export([init/1,
+ handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
++-record(st,
++ {fd,
++ filename,
++ prev_handler,
++ depth=unlimited :: 'unlimited' | non_neg_integer()}).
++
+ %% This one is used when we takeover from the simple error_logger.
+ init({File, {error_logger, Buf}}) ->
+ case init(File, error_logger) of
+- {ok, {Fd, File, PrevHandler}} ->
+- write_events(Fd, Buf),
+- {ok, {Fd, File, PrevHandler}};
++ {ok, State} ->
++ write_events(State, Buf),
++ {ok, State};
+ Error ->
+ Error
+ end;
+@@ -52,49 +56,45 @@ init(File, PrevHandler) ->
+ process_flag(trap_exit, true),
+ case file:open(File, [write]) of
+ {ok,Fd} ->
+- {ok, {Fd, File, PrevHandler}};
++ Depth = get_depth(),
++ State = #st{fd=Fd,filename=File,prev_handler=PrevHandler,
++ depth=Depth},
++ {ok, State};
+ Error ->
+ Error
+ end.
+-
++
++get_depth() ->
++ case application:get_env(kernel, error_logger_format_depth) of
++ {ok, Depth} when is_integer(Depth) ->
++ max(10, Depth);
++ undefined ->
++ unlimited
++ end.
++
+ handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
+ {ok, State};
+-handle_event(Event, {Fd, File, PrevHandler}) ->
+- write_event(Fd, tag_event(Event)),
+- {ok, {Fd, File, PrevHandler}};
+-handle_event(_, State) ->
++handle_event(Event, State) ->
++ write_event(State, Event),
+ {ok, State}.
+
+-handle_info({'EXIT', Fd, _Reason}, {Fd, _File, PrevHandler}) ->
++handle_info({'EXIT', Fd, _Reason}, #st{fd=Fd,prev_handler=PrevHandler}) ->
+ case PrevHandler of
+ [] ->
+ remove_handler;
+ _ ->
+ {swap_handler, install_prev, [], PrevHandler, go_back}
+ end;
+-handle_info({emulator, GL, Chars}, {Fd, File, PrevHandler})
+- when node(GL) == node() ->
+- write_event(Fd, tag_event({emulator, GL, Chars})),
+- {ok, {Fd, File, PrevHandler}};
+-handle_info({emulator, noproc, Chars}, {Fd, File, PrevHandler}) ->
+- write_event(Fd, tag_event({emulator, noproc, Chars})),
+- {ok, {Fd, File, PrevHandler}};
+ handle_info(_, State) ->
+ {ok, State}.
+
+-handle_call(filename, {Fd, File, Prev}) ->
+- {ok, File, {Fd, File, Prev}};
++handle_call(filename, #st{filename=File}=State) ->
++ {ok, File, State};
+ handle_call(_Query, State) ->
+ {ok, {error, bad_query}, State}.
+
+-terminate(_Reason, State) ->
+- case State of
+- {Fd, _File, _Prev} ->
+- ok = file:close(Fd);
+- _ ->
+- ok
+- end,
+- [].
++terminate(_Reason, #st{fd=Fd}) ->
++ file:close(Fd).
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+@@ -103,69 +103,71 @@ code_change(_OldVsn, State, _Extra) ->
+ %%% Misc. functions.
+ %%% ------------------------------------------------------
+
+-tag_event(Event) ->
+- {erlang:universaltime(), Event}.
++write_events(State, [Ev|Es]) ->
++ %% Write the events in reversed order.
++ write_events(State, Es),
++ write_event(State, Ev);
++write_events(_State, []) ->
++ ok.
+
+-write_events(Fd, Events) -> write_events1(Fd, lists:reverse(Events)).
++write_event(#st{fd=Fd}=State, Event) ->
++ case parse_event(Event) of
++ ignore ->
++ ok;
++ {Head,Pid,FormatList} ->
++ Time = maybe_utc(erlang:universaltime()),
++ Header = write_time(Time, Head),
++ Body = format_body(State, FormatList),
++ AtNode = if
++ node(Pid) =/= node() ->
++ ["** at node ",atom_to_list(node(Pid))," **\n"];
++ true ->
++ []
++ end,
++ io:put_chars(Fd, [Header,Body,AtNode])
++ end.
+
+-write_events1(Fd, [Event|Es]) ->
+- write_event(Fd, Event),
+- write_events1(Fd, Es);
+-write_events1(_, []) ->
+- ok.
++format_body(State, [{Format,Args}|T]) ->
++ S = try format(State, Format, Args) of
++ S0 ->
++ S0
++ catch
++ _:_ ->
++ format(State, "ERROR: ~p - ~p\n", [Format,Args])
++ end,
++ [S|format_body(State, T)];
++format_body(_State, []) ->
++ [].
+
+-write_event(Fd, {Time, {error, _GL, {Pid, Format, Args}}}) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- io:format(Fd, T ++ F, [Format,Args])
+- end;
+-write_event(Fd, {Time, {emulator, _GL, Chars}}) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(Chars, []) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- io:format(Fd, T ++ "ERROR: ~p ~n", [Chars])
+- end;
+-write_event(Fd, {Time, {info, _GL, {Pid, Info, _}}}) ->
+- T = write_time(maybe_utc(Time)),
+- io:format(Fd, T ++ add_node("~p~n",Pid),[Info]);
+-write_event(Fd, {Time, {error_report, _GL, {Pid, std_error, Rep}}}) ->
+- T = write_time(maybe_utc(Time)),
+- S = format_report(Rep),
+- io:format(Fd, T ++ S ++ add_node("", Pid), []);
+-write_event(Fd, {Time, {info_report, _GL, {Pid, std_info, Rep}}}) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- S = format_report(Rep),
+- io:format(Fd, T ++ S ++ add_node("", Pid), []);
+-write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- io:format(Fd, T ++ F, [Format,Args])
+- end;
+-write_event(Fd, {Time, {warning_report, _GL, {Pid, std_warning, Rep}}}) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- S = format_report(Rep),
+- io:format(Fd, T ++ S ++ add_node("", Pid), []);
+-write_event(Fd, {Time, {warning_msg, _GL, {Pid, Format, Args}}}) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- io:format(Fd, T ++ F, [Format,Args])
+- end;
+-write_event(_, _) ->
+- ok.
++format(#st{depth=unlimited}, Format, Args) ->
++ io_lib:format(Format, Args);
++format(#st{depth=Depth}, Format0, Args) ->
++ Format1 = io_lib:scan_format(Format0, Args),
++ Format = limit_format(Format1, Depth),
++ io_lib:build_text(Format).
++
++limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
++ C0 =:= $w ->
++ C = C0 - ($a - $A), %To uppercase.
++ [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}||limit_format(T, Depth)];
++limit_format([H|T], Depth) ->
++ [H|limit_format(T, Depth)];
++limit_format([], _) ->
++ [].
++
++parse_event({error, _GL, {Pid, Format, Args}}) ->
++ {"ERROR REPORT",Pid,[{Format,Args}]};
++parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
++ {"INFO REPORT",Pid,[{Format, Args}]};
++parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
++ {"WARNING REPORT",Pid,[{Format,Args}]};
++parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
++ {"ERROR REPORT",Pid,format_term(Args)};
++parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
++ {"INFO REPORT",Pid,format_term(Args)};
++parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
++ {"WARNING REPORT",Pid,format_term(Args)};
++parse_event(_) -> ignore.
+
+ maybe_utc(Time) ->
+ UTC = case application:get_env(sasl, utc_log) of
+@@ -182,30 +184,27 @@ maybe_utc(Time) ->
+ maybe_utc(Time, true) -> {utc, Time};
+ maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
+
+-format_report(Rep) when is_list(Rep) ->
+- case string_p(Rep) of
++format_term(Term) when is_list(Term) ->
++ case string_p(Term) of
+ true ->
+- io_lib:format("~s~n",[Rep]);
+- _ ->
+- format_rep(Rep)
++ [{"~s\n",[Term]}];
++ false ->
++ format_term_list(Term)
+ end;
+-format_report(Rep) ->
+- io_lib:format("~p~n",[Rep]).
+-
+-format_rep([{Tag,Data}|Rep]) ->
+- io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
+-format_rep([Other|Rep]) ->
+- io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
+-format_rep(_) ->
++format_term(Term) ->
++ [{"~p\n",[Term]}].
++
++format_term_list([{Tag,Data}|T]) ->
++ [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
++format_term_list([Data|T]) ->
++ [{" ~p\n",[Data]}|format_term_list(T)];
++format_term_list([]) ->
++ [];
++format_term_list(_) ->
++ %% Continue to allow non-proper lists for now.
++ %% FIXME: Remove this clause in OTP 19.
+ [].
+
+-add_node(X, Pid) when is_atom(X) ->
+- add_node(atom_to_list(X), Pid);
+-add_node(X, Pid) when node(Pid) =/= node() ->
+- lists:concat([X,"** at node ",node(Pid)," **~n"]);
+-add_node(X, _) ->
+- X.
+-
+ string_p([]) ->
+ false;
+ string_p(Term) ->
+@@ -221,15 +220,10 @@ string_p1([$\b|T]) -> string_p1(T);
+ string_p1([$\f|T]) -> string_p1(T);
+ string_p1([$\e|T]) -> string_p1(T);
+ string_p1([H|T]) when is_list(H) ->
+- case string_p1(H) of
+- true -> string_p1(T);
+- _ -> false
+- end;
++ string_p1(H) andalso string_p1(T);
+ string_p1([]) -> true;
+ string_p1(_) -> false.
+
+-write_time(Time) -> write_time(Time, "ERROR REPORT").
+-
+ write_time({utc,{{Y,Mo,D},{H,Mi,S}}}, Type) ->
+ io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
+ [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
+diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl
+index ad5891f..72a052f 100644
+--- a/lib/stdlib/src/error_logger_tty_h.erl
++++ b/lib/stdlib/src/error_logger_tty_h.erl
+@@ -22,144 +22,178 @@
+
+ %%%
+ %%% A handler that can be connected to the error_logger
+-%%% event handler.
+-%%% Writes all events formatted to stdout.
+-%%% Handles events tagged error, emulator and info.
++%%% event handler. Writes all events formatted to stdout.
+ %%%
+ %%% It can only be started from error_logger:swap_handler(tty)
+-%%% or error_logger:tty(true)
++%%% or error_logger:tty(true).
+ %%%
+
+ -export([init/1,
+ handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+--export([write_event/2]).
++-export([write_event/2,write_event/3]).
++
++-record(st,
++ {user,
++ prev_handler,
++ io_mod=io,
++ depth=unlimited}).
+
+ %% This one is used when we takeover from the simple error_logger.
+ init({[], {error_logger, Buf}}) ->
+ User = set_group_leader(),
+- write_events(Buf,io),
+- {ok, {User, error_logger}};
++ Depth = get_depth(),
++ State = #st{user=User,prev_handler=error_logger,depth=Depth},
++ write_events(State, Buf),
++ {ok, State};
+ %% This one is used if someone took over from us, and now wants to
+ %% go back.
+ init({[], {error_logger_tty_h, PrevHandler}}) ->
+ User = set_group_leader(),
+- {ok, {User, PrevHandler}};
++ {ok, #st{user=User,prev_handler=PrevHandler}};
+ %% This one is used when we are started directly.
+ init([]) ->
+ User = set_group_leader(),
+- {ok, {User, []}}.
++ Depth = get_depth(),
++ {ok, #st{user=User,prev_handler=[],depth=Depth}}.
++
++get_depth() ->
++ case application:get_env(kernel, error_logger_format_depth) of
++ {ok, Depth} when is_integer(Depth) ->
++ max(10, Depth);
++ undefined ->
++ unlimited
++ end.
+
+ handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
+ {ok, State};
+ handle_event(Event, State) ->
+- write_event(tag_event(Event),io),
++ ok = do_write_event(State, tag_event(Event)),
+ {ok, State}.
+
+-handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
++handle_info({'EXIT', User, _Reason},
++ #st{user=User,prev_handler=PrevHandler}=State) ->
+ case PrevHandler of
+ [] ->
+ remove_handler;
+ _ ->
+- {swap_handler, install_prev, {User, PrevHandler},
++ {swap_handler, install_prev, State,
+ PrevHandler, go_back}
+ end;
+-handle_info({emulator, GL, Chars}, State) when node(GL) == node() ->
+- write_event(tag_event({emulator, GL, Chars}),io),
+- {ok, State};
+-handle_info({emulator, noproc, Chars}, State) ->
+- write_event(tag_event({emulator, noproc, Chars}),io),
+- {ok, State};
+ handle_info(_, State) ->
+ {ok, State}.
+
+ handle_call(_Query, State) -> {ok, {error, bad_query}, State}.
+
+-% unfortunately, we can't unlink from User - links are not counted!
+-% if pid(User) -> unlink(User); true -> ok end,
+ terminate(install_prev, _State) ->
+ [];
+-terminate(_Reason, {_User, PrevHandler}) ->
++terminate(_Reason, #st{prev_handler=PrevHandler}) ->
+ {error_logger_tty_h, PrevHandler}.
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
++%% Exported (but unoffical) API.
++write_event(Event, IoMod) ->
++ do_write_event(#st{io_mod=IoMod}, Event).
++
++write_event(Event, IoMod, Depth) ->
++ do_write_event(#st{io_mod=IoMod,depth=Depth}, Event).
++
++
+ %%% ------------------------------------------------------
+ %%% Misc. functions.
+ %%% ------------------------------------------------------
+
+ set_group_leader() ->
+ case whereis(user) of
+- User when is_pid(User) -> link(User), group_leader(User,self()), User;
+- _ -> false
++ User when is_pid(User) ->
++ link(User),
++ group_leader(User,self()),
++ User;
++ _ ->
++ false
+ end.
+
+ tag_event(Event) ->
+ {erlang:universaltime(), Event}.
+
+-write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod).
+-
+-write_events1([Event|Es],IOMod) ->
+- write_event(Event,IOMod),
+- write_events1(Es,IOMod);
+-write_events1([],_IOMod) ->
++write_events(State, [Ev|Es]) ->
++ %% Write the events in reverse order.
++ _ = write_events(State, Es),
++ _ = do_write_event(State, Ev),
++ ok;
++write_events(_State, []) ->
+ ok.
+
+-write_event({Time, {error, _GL, {Pid, Format, Args}}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- format(IOMod, T ++ F, [Format,Args])
++do_write_event(State, {Time0, Event}) ->
++ case parse_event(Event) of
++ ignore ->
++ ok;
++ {Head,Pid,FormatList} ->
++ Time = maybe_utc(Time0),
++ Header = write_time(Time, Head),
++ Body = format_body(State, FormatList),
++ AtNode = if
++ node(Pid) =/= node() ->
++ ["** at node ",atom_to_list(node(Pid))," **\n"];
++ true ->
++ []
++ end,
++ Str = [Header,Body,AtNode],
++ case State#st.io_mod of
++ io_lib ->
++ Str;
++ io ->
++ io:put_chars(user, Str)
++ end
+ end;
+-write_event({Time, {emulator, _GL, Chars}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(Chars, []) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- format(IOMod, T ++ "ERROR: ~p ~n", [Chars])
+- end;
+-write_event({Time, {info, _GL, {Pid, Info, _}}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- format(IOMod, T ++ add_node("~p~n",Pid),[Info]);
+-write_event({Time, {error_report, _GL, {Pid, std_error, Rep}}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- S = format_report(Rep),
+- format(IOMod, T ++ S ++ add_node("", Pid));
+-write_event({Time, {info_report, _GL, {Pid, std_info, Rep}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- S = format_report(Rep),
+- format(IOMod, T ++ S ++ add_node("", Pid));
+-write_event({Time, {info_msg, _GL, {Pid, Format, Args}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- format(IOMod, T ++ F, [Format,Args])
+- end;
+-write_event({Time, {warning_report, _GL, {Pid, std_warning, Rep}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- S = format_report(Rep),
+- format(IOMod, T ++ S ++ add_node("", Pid));
+-write_event({Time, {warning_msg, _GL, {Pid, Format, Args}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- format(IOMod, T ++ F, [Format,Args])
+- end;
+-write_event({_Time, _Error},_IOMod) ->
++do_write_event(_, _) ->
+ ok.
+
++format_body(State, [{Format,Args}|T]) ->
++ S = try format(State, Format, Args) of
++ S0 ->
++ S0
++ catch
++ _:_ ->
++ format(State, "ERROR: ~p - ~p\n", [Format,Args])
++ end,
++ [S|format_body(State, T)];
++format_body(_State, []) ->
++ [].
++
++format(#st{depth=unlimited}, Format, Args) ->
++ io_lib:format(Format, Args);
++format(#st{depth=Depth}, Format0, Args) ->
++ Format1 = io_lib:scan_format(Format0, Args),
++ Format = limit_format(Format1, Depth),
++ io_lib:build_text(Format).
++
++limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
++ C0 =:= $w ->
++ C = C0 - ($a - $A), %To uppercase.
++ [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}|limit_format(T, Depth)];
++limit_format([H|T], Depth) ->
++ [H|limit_format(T, Depth)];
++limit_format([], _) ->
++ [].
++
++parse_event({error, _GL, {Pid, Format, Args}}) ->
++ {"ERROR REPORT",Pid,[{Format,Args}]};
++parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
++ {"INFO REPORT",Pid,[{Format, Args}]};
++parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
++ {"WARNING REPORT",Pid,[{Format,Args}]};
++parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
++ {"ERROR REPORT",Pid,format_term(Args)};
++parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
++ {"INFO REPORT",Pid,format_term(Args)};
++parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
++ {"WARNING REPORT",Pid,format_term(Args)};
++parse_event(_) -> ignore.
++
+ maybe_utc(Time) ->
+ UTC = case application:get_env(sasl, utc_log) of
+ {ok, Val} -> Val;
+@@ -175,33 +209,26 @@ maybe_utc(Time) ->
+ maybe_utc(Time, true) -> {utc, Time};
+ maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
+
+-format(IOMod, String) -> format(IOMod, String, []).
+-format(io_lib, String, Args) -> io_lib:format(String, Args);
+-format(io, String, Args) -> io:format(user, String, Args).
+-
+-format_report(Rep) when is_list(Rep) ->
+- case string_p(Rep) of
++format_term(Term) when is_list(Term) ->
++ case string_p(Term) of
+ true ->
+- io_lib:format("~s~n",[Rep]);
+- _ ->
+- format_rep(Rep)
++ [{"~s\n",[Term]}];
++ false ->
++ format_term_list(Term)
+ end;
+-format_report(Rep) ->
+- io_lib:format("~p~n",[Rep]).
+-
+-format_rep([{Tag,Data}|Rep]) ->
+- io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
+-format_rep([Other|Rep]) ->
+- io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
+-format_rep(_) ->
+- [].
++format_term(Term) ->
++ [{"~p\n",[Term]}].
+
+-add_node(X, Pid) when is_atom(X) ->
+- add_node(atom_to_list(X), Pid);
+-add_node(X, Pid) when node(Pid) =/= node() ->
+- lists:concat([X,"** at node ",node(Pid)," **~n"]);
+-add_node(X, _) ->
+- X.
++format_term_list([{Tag,Data}|T]) ->
++ [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
++format_term_list([Data|T]) ->
++ [{" ~p\n",[Data]}|format_term_list(T)];
++format_term_list([]) ->
++ [];
++format_term_list(_) ->
++ %% Continue to allow non-proper lists for now.
++ %% FIXME: Remove this clause in OTP 19.
++ [].
+
+ string_p([]) ->
+ false;
+@@ -225,7 +252,6 @@ string_p1([H|T]) when is_list(H) ->
+ string_p1([]) -> true;
+ string_p1(_) -> false.
+
+-write_time(Time) -> write_time(Time, "ERROR REPORT").
+ write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) ->
+ io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
+ [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
+diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
+index 9e69601..3c173dc 100644
+--- a/lib/stdlib/src/io_lib.erl
++++ b/lib/stdlib/src/io_lib.erl
+@@ -2,7 +2,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
++%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -61,6 +61,7 @@
+ -module(io_lib).
+
+ -export([fwrite/2,fread/2,fread/3,format/2]).
++-export([scan_format/2,unscan_format/1,build_text/1]).
+ -export([print/1,print/4,indentation/2]).
+
+ -export([write/1,write/2,write/3,nl/0,format_prompt/1,format_prompt/2]).
+@@ -84,7 +85,7 @@
+ deep_unicode_char_list/1]).
+
+ -export_type([chars/0, latin1_string/0, continuation/0,
+- fread_error/0, fread_item/0]).
++ fread_error/0, fread_item/0, format_spec/0]).
+
+ %%----------------------------------------------------------------------
+
+@@ -109,6 +110,18 @@
+
+ -type fread_item() :: string() | atom() | integer() | float().
+
++-type format_spec() ::
++ {
++ ControlChar :: char(),
++ Args :: [any()],
++ Width :: 'none' | integer(),
++ Adjust :: 'left' | 'right',
++ Precision :: 'none' | integer(),
++ PadChar :: char(),
++ Encoding :: 'unicode' | 'latin1',
++ Strings :: boolean()
++ }.
++
+ %%----------------------------------------------------------------------
+
+ %% Interface calls to sub-modules.
+@@ -157,6 +170,31 @@ format(Format, Args) ->
+ Other
+ end.
+
++-spec scan_format(Format, Data) -> FormatList when
++ Format :: io:format(),
++ Data :: [term()],
++ FormatList :: [char() | format_spec()].
++
++scan_format(Format, Args) ->
++ try io_lib_format:scan(Format, Args)
++ catch
++ _:_ -> erlang:error(badarg, [Format, Args])
++ end.
++
++-spec unscan_format(FormatList) -> {Format, Data} when
++ FormatList :: [char() | format_spec()],
++ Format :: io:format(),
++ Data :: [term()].
++
++unscan_format(FormatList) ->
++ io_lib_format:unscan(FormatList).
++
++-spec build_text(FormatList) -> chars() when
++ FormatList :: [char() | format_spec()].
++
++build_text(FormatList) ->
++ io_lib_format:build(FormatList).
++
+ -spec print(Term) -> chars() when
+ Term :: term().
+
+diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl
+index 56e15a1..37b47d7 100644
+--- a/lib/stdlib/src/io_lib_format.erl
++++ b/lib/stdlib/src/io_lib_format.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
++%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -20,10 +20,9 @@
+
+ %% Formatting functions of io library.
+
+--export([fwrite/2,fwrite_g/1,indentation/2]).
++-export([fwrite/2,fwrite_g/1,indentation/2,scan/2,unscan/1,build/1]).
+
+-%% fwrite(Format, ArgList) -> string().
+-%% Format the arguments in ArgList after string Format. Just generate
++%% Format the arguments in Args after string Format. Just generate
+ %% an error if there is an error in the arguments.
+ %%
+ %% To do the printing command correctly we need to calculate the
+@@ -37,15 +36,83 @@
+ %% and it also splits the handling of the control characters into two
+ %% parts.
+
+-fwrite(Format, Args) when is_atom(Format) ->
+- fwrite(atom_to_list(Format), Args);
+-fwrite(Format, Args) when is_binary(Format) ->
+- fwrite(binary_to_list(Format), Args);
++-spec fwrite(Format, Data) -> FormatList when
++ Format :: io:format(),
++ Data :: [term()],
++ FormatList :: [char() | io_lib:format_spec()].
++
+ fwrite(Format, Args) ->
+- Cs = collect(Format, Args),
++ build(scan(Format, Args)).
++
++%% Build the output text for a pre-parsed format list.
++
++-spec build(FormatList) -> io_lib:chars() when
++ FormatList :: [char() | io_lib:format_spec()].
++
++build(Cs) ->
+ Pc = pcount(Cs),
+ build(Cs, Pc, 0).
+
++%% Parse all control sequences in the format string.
++
++-spec scan(Format, Data) -> FormatList when
++ Format :: io:format(),
++ Data :: [term()],
++ FormatList :: [char() | io_lib:format_spec()].
++
++scan(Format, Args) when is_atom(Format) ->
++ scan(atom_to_list(Format), Args);
++scan(Format, Args) when is_binary(Format) ->
++ scan(binary_to_list(Format), Args);
++scan(Format, Args) ->
++ collect(Format, Args).
++
++%% Revert a pre-parsed format list to a plain character list and a
++%% list of arguments.
++
++-spec unscan(FormatList) -> {Format, Data} when
++ FormatList :: [char() | io_lib:format_spec()],
++ Format :: io:format(),
++ Data :: [term()].
++
++unscan(Cs) ->
++ {print(Cs), args(Cs)}.
++
++args([{_C,As,_F,_Ad,_P,_Pad,_Enc,_Str} | Cs]) ->
++ As ++ args(Cs);
++args([_C | Cs]) ->
++ args(Cs);
++args([]) ->
++ [].
++
++print([{C,_As,F,Ad,P,Pad,Enc,Str} | Cs ]) ->
++ print(C, F, Ad, P, Pad, Enc, Str) ++ print(Cs);
++print([C | Cs]) ->
++ [C | print(Cs)];
++print([]) ->
++ [].
++
++print(C, F, Ad, P, Pad, Encoding, Strings) ->
++ [$~] ++ print_field_width(F, Ad) ++ print_precision(P) ++
++ print_pad_char(Pad) ++ print_encoding(Encoding) ++
++ print_strings(Strings) ++ [C].
++
++print_field_width(none, _Ad) -> "";
++print_field_width(F, left) -> integer_to_list(-F);
++print_field_width(F, right) -> integer_to_list(F).
++
++print_precision(none) -> "";
++print_precision(P) -> [$. | integer_to_list(P)].
++
++print_pad_char($\s) -> ""; % default, no need to make explicit
++print_pad_char(Pad) -> [$., Pad].
++
++print_encoding(unicode) -> "t";
++print_encoding(latin1) -> "".
++
++print_strings(false) -> "l";
++print_strings(true) -> "".
++
+ collect([$~|Fmt0], Args0) ->
+ {C,Fmt1,Args1} = collect_cseq(Fmt0, Args0),
+ [C|collect(Fmt1, Args1)];
+@@ -141,7 +208,7 @@ pcount([{$P,_As,_F,_Ad,_P,_Pad,_Enc,_Str}|Cs], Acc) -> pcount(Cs, Acc+1);
+ pcount([_|Cs], Acc) -> pcount(Cs, Acc);
+ pcount([], Acc) -> Acc.
+
+-%% build([Control], Pc, Indentation) -> string().
++%% build([Control], Pc, Indentation) -> io_lib:chars().
+ %% Interpret the control structures. Count the number of print
+ %% remaining and only calculate indentation when necessary. Must also
+ %% be smart when calculating indentation for characters in format.
+@@ -162,10 +229,14 @@ decr_pc($p, Pc) -> Pc - 1;
+ decr_pc($P, Pc) -> Pc - 1;
+ decr_pc(_, Pc) -> Pc.
+
+-%% indentation(String, Indentation) -> Indentation.
++
+ %% Calculate the indentation of the end of a string given its start
+ %% indentation. We assume tabs at 8 cols.
+
++-spec indentation(String, StartIndent) -> integer() when
++ String :: io_lib:chars(),
++ StartIndent :: integer().
++
+ indentation([$\n|Cs], _I) -> indentation(Cs, 0);
+ indentation([$\t|Cs], I) -> indentation(Cs, ((I + 8) div 8) * 8);
+ indentation([C|Cs], I) when is_integer(C) ->
+@@ -366,7 +437,6 @@ float_data([D|Cs], Ds) when D >= $0, D =< $9 ->
+ float_data([_|Cs], Ds) ->
+ float_data(Cs, Ds).
+
+-%% fwrite_g(Float)
+ %% Writes the shortest, correctly rounded string that converts
+ %% to Float when read back with list_to_float/1.
+ %%
+@@ -374,6 +444,8 @@ float_data([_|Cs], Ds) ->
+ %% in Proceedings of the SIGPLAN '96 Conference on Programming
+ %% Language Design and Implementation.
+
++-spec fwrite_g(float()) -> string().
++
+ fwrite_g(0.0) ->
+ "0.0";
+ fwrite_g(Float) when is_float(Float) ->
+@@ -642,7 +714,7 @@ prefixed_integer(Int, F, Adj, Base, Pad, Prefix, Lowercase)
+ term([Prefix|S], F, Adj, none, Pad)
+ end.
+
+-%% char(Char, Field, Adjust, Precision, PadChar) -> string().
++%% char(Char, Field, Adjust, Precision, PadChar) -> chars().
+
+ char(C, none, _Adj, none, _Pad) -> [C];
+ char(C, F, _Adj, none, _Pad) -> chars(C, F);
diff --git a/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch b/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
new file mode 100644
index 0000000..e9e6450
--- /dev/null
+++ b/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
@@ -0,0 +1,74 @@
+From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
+Date: Tue, 25 Aug 2015 15:20:23 +0200
+Subject: [PATCH] Teach sasl_report to limit crash reports
+
+
+diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl
+index c3e6fed..aa84e4f 100644
+--- a/lib/sasl/src/sasl_report.erl
++++ b/lib/sasl/src/sasl_report.erl
+@@ -61,27 +61,53 @@ write_report2(IO, Fd, Head, supervisor_report, Report) ->
+ Context = sup_get(errorContext, Report),
+ Reason = sup_get(reason, Report),
+ Offender = sup_get(offender, Report),
+- FmtString = " Supervisor: ~p~n Context: ~p~n Reason: "
+- "~80.18p~n Offender: ~80.18p~n~n",
+- write_report_action(IO, Fd, Head ++ FmtString,
+- [Name,Context,Reason,Offender]);
++ {FmtString,Args} = supervisor_format([Name,Context,Reason,Offender]),
++ write_report_action(IO, Fd, Head, FmtString, Args);
+ write_report2(IO, Fd, Head, progress, Report) ->
+ Format = format_key_val(Report),
+- write_report_action(IO, Fd, Head ++ "~s", [Format]);
++ write_report_action(IO, Fd, Head, "~s", [Format]);
+ write_report2(IO, Fd, Head, crash_report, Report) ->
+- Format = proc_lib:format(Report),
+- write_report_action(IO, Fd, Head ++ "~s", [Format]).
++ Depth = get_depth(),
++ Format = proc_lib:format(Report, latin1, Depth),
++ write_report_action(IO, Fd, Head, "~s", [Format]).
++
++supervisor_format(Args0) ->
++ case get_depth() of
++ unlimited ->
++ {" Supervisor: ~p~n"
++ " Context: ~p~n"
++ " Reason: ~80.18p~n"
++ " Offender: ~80.18p~n~n",
++ Args0};
++ Depth ->
++ [A,B,C,D] = Args0,
++ Args = [A,Depth,B,Depth,C,Depth,D,Depth],
++ {" Supervisor: ~P~n"
++ " Context: ~P~n"
++ " Reason: ~80.18P~n"
++ " Offender: ~80.18P~n~n",
++ Args}
++ end.
+
+-write_report_action(io, Fd, Format, Args) ->
+- io:format(Fd, Format, Args);
+-write_report_action(io_lib, _Fd, Format, Args) ->
+- io_lib:format(Format, Args).
++write_report_action(IO, Fd, Head, Format, Args) ->
++ S = [Head|io_lib:format(Format, Args)],
++ case IO of
++ io -> io:put_chars(Fd, S);
++ io_lib -> S
++ end.
+
+ format_key_val([{Tag,Data}|Rep]) ->
+ io_lib:format(" ~16w: ~p~n",[Tag,Data]) ++ format_key_val(Rep);
+ format_key_val(_) ->
+ [].
+
++get_depth() ->
++ case application:get_env(kernel, error_logger_format_depth) of
++ {ok, Depth} when is_integer(Depth) ->
++ max(10, Depth);
++ undefined ->
++ unlimited
++ end.
+
+ sup_get(Tag, Report) ->
+ case lists:keysearch(Tag, 1, Report) of
From 4244d3482c1aec2f8d8dc85f69d195eacbe9b99f Mon Sep 17 00:00:00 2001
From: Dennis Gilmore
Date: Wed, 3 Feb 2016 19:54:32 +0000
Subject: [PATCH 030/305] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
---
erlang.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/erlang.spec b/erlang.spec
index dc56562..d029675 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -16,7 +16,7 @@
Name: erlang
Version: 18.2.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2230,6 +2230,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Feb 03 2016 Fedora Release Engineering - 18.2.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
* Fri Jan 22 2016 Peter Lemenkov - 18.2.2-3
- Disable optimizations for Intel Atom CPU on ix86 arches
From bc2facf340b2fecf8e5cfdfa4493b04c9cdc83eb Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 9 Feb 2016 16:21:43 +0300
Subject: [PATCH 031/305] Ver. 18.2.3
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 17 ++++++++++++-----
otp-0006-Do-not-install-erlang-sources.patch | 4 ++--
sources | 2 +-
4 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8477df3..d0b1f42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,3 +56,4 @@ otp_src_R14A.tar.gz
/otp-OTP-17.3.4.tar.gz
/otp-OTP-17.4.tar.gz
/otp-OTP-18.2.2.tar.gz
+/otp-OTP-18.2.3.tar.gz
diff --git a/erlang.spec b/erlang.spec
index d029675..bc3f5be 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -15,8 +15,8 @@
%endif
Name: erlang
-Version: 18.2.2
-Release: 4%{?dist}
+Version: 18.2.3
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -912,20 +912,24 @@ Erlang mode for XEmacs (source lisp files).
%build
+
+# Set up proper cflags/cxxflags first
%ifarch sparcv9 sparc64
-CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
+ERL_FLAGS="${RPM_OPT_FLAGS} -mcpu=ultrasparc -fno-strict-aliasing"
%else
%ifarch %{ix86}
# We have to disable optimizations for Intel Atom
# See https://bugzilla.redhat.com/1240487#c13
-CFLAGS="${RPM_OPT_FLAGS/-mtune=atom/-mtune=generic} -fno-strict-aliasing" CXXFLAGS="${RPM_OPT_FLAGS/-mtune=atom/-mtune=generic}" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
+ERL_FLAGS="${RPM_OPT_FLAGS/-mtune=atom/-mtune=generic} -fno-strict-aliasing"
%else
-CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
+ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
%endif
%endif
+CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
+
# Remove pre-built BEAM files
make clean
@@ -2230,6 +2234,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Feb 9 2016 Peter Lemenkov - 18.2.3-1
+- Ver. 18.2.3
+
* Wed Feb 03 2016 Fedora Release Engineering - 18.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch
index 933787e..3091632 100644
--- a/otp-0006-Do-not-install-erlang-sources.patch
+++ b/otp-0006-Do-not-install-erlang-sources.patch
@@ -472,10 +472,10 @@ index 1c05d45..88f9f62 100644
$(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile
-index 82cda6a..edfebd2 100644
+index 0a4b625..1b1d83d 100644
--- a/lib/inets/src/inets_app/Makefile
+++ b/lib/inets/src/inets_app/Makefile
-@@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -115,7 +115,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/inets_app"
diff --git a/sources b/sources
index 7a59318..b3b8f94 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-49d9ef3ccffc028100e35ff80e7d4d06 otp-OTP-18.2.2.tar.gz
+236741d3893b09cdd1699edd1549db6b otp-OTP-18.2.3.tar.gz
From 2038287893c4b997147523a50c833c10bfd5d009 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 10 Feb 2016 13:58:34 +0300
Subject: [PATCH 032/305] Workaround for broken cmpxchg8b inlining on ix86
- Workaround for broken cmpxchg8b inlining on ix86
- Don't use generic optimization on ix86
- Increase memory up to 1024 mbytes while generating docs on non-ppc
arches
Signed-off-by: Peter Lemenkov
---
erlang.spec | 16 ++++++++---
...xchg8b-inline-asm-when-pic-and-gcc-5.patch | 27 +++++++++++++++++++
2 files changed, 40 insertions(+), 3 deletions(-)
create mode 100644 otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch
diff --git a/erlang.spec b/erlang.spec
index bc3f5be..7d3aa37 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -16,7 +16,7 @@
Name: erlang
Version: 18.2.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -75,6 +75,9 @@ Patch8: otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
# Fedora specific patch
# epmd: support IPv6 node registration
Patch9: otp-0009-epmd-support-IPv6-node-registration.patch
+# Fedora specific patch
+# Quickfix for cmpxchg8b inline asm when pic and gcc >= 5.0 is
+Patch10: otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch
# end of autogenerated patch tag list
BuildRequires: flex
@@ -901,6 +904,7 @@ Erlang mode for XEmacs (source lisp files).
%patch7 -p1 -b .Split_off_webtool_dependency_from_tools
%patch8 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
%patch9 -p1 -b .epmd_support_IPv6_node_registration
+%patch10 -p1 -b .Quickfix_for_cmpxchg8b_inline_asm_when_pic_and_gcc_5
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -921,7 +925,8 @@ ERL_FLAGS="${RPM_OPT_FLAGS} -mcpu=ultrasparc -fno-strict-aliasing"
%ifarch %{ix86}
# We have to disable optimizations for Intel Atom
# See https://bugzilla.redhat.com/1240487#c13
-ERL_FLAGS="${RPM_OPT_FLAGS/-mtune=atom/-mtune=generic} -fno-strict-aliasing"
+#ERL_FLAGS="${RPM_OPT_FLAGS/-mtune=atom/-mtune=generic} -fno-strict-aliasing"
+ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
%else
ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
%endif
@@ -968,7 +973,7 @@ make
%if %{with doc}
# should use FOP_OPTS after #832323 is resolved
%ifnarch ppc %{power64}
-export BASE_OPTIONS=-Xmx512m
+export BASE_OPTIONS=-Xmx1024m
%else
export BASE_OPTIONS=-Xmx1536m
%endif
@@ -2234,6 +2239,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Feb 10 2016 Peter Lemenkov - 18.2.3-2
+- Workaround for broken cmpxchg8b inlining on ix86 (rhbz#1240487)
+- Don't use generic optimization on ix86
+- Increase memory up to 1024 mbytes while generating docs on non-ppc arches
+
* Tue Feb 9 2016 Peter Lemenkov - 18.2.3-1
- Ver. 18.2.3
diff --git a/otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch b/otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch
new file mode 100644
index 0000000..cc8a9d1
--- /dev/null
+++ b/otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch
@@ -0,0 +1,27 @@
+From: Rickard Green
+Date: Tue, 9 Feb 2016 18:23:26 +0100
+Subject: [PATCH] Quickfix for cmpxchg8b inline asm when pic and gcc >= 5.0 is
+ used
+
+
+diff --git a/erts/include/internal/i386/ethr_dw_atomic.h b/erts/include/internal/i386/ethr_dw_atomic.h
+index e8c4119..caba633 100644
+--- a/erts/include/internal/i386/ethr_dw_atomic.h
++++ b/erts/include/internal/i386/ethr_dw_atomic.h
+@@ -115,6 +115,8 @@ ethr_native_dw_atomic_addr(ethr_native_dw_atomic_t *var)
+ return (ethr_sint_t *) ETHR_DW_NATMC_MEM__(var);
+ }
+
++#if !ETHR_AT_LEAST_GCC_VSN__(5, 0, 0)
++
+ #if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
+ /*
+ * When position independent code is used in 32-bit mode, the EBX register
+@@ -138,6 +140,7 @@ ethr_native_dw_atomic_addr(ethr_native_dw_atomic_t *var)
+ # endif
+ #endif
+
++#endif /* < gcc-5.0 */
+
+ #define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_MB
+
From cf1ebfcf6cd75786ebb80fca876dfd17a1146261 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Fri, 19 Feb 2016 18:42:20 +0300
Subject: [PATCH 033/305] Add missing dependency
Signed-off-by: Peter Lemenkov
---
erlang.spec | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 7d3aa37..83c691c 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -16,7 +16,7 @@
Name: erlang
Version: 18.2.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -425,6 +425,8 @@ BuildRequires: lksctp-tools-devel
BuildRequires: m4
BuildRequires: ncurses-devel
BuildRequires: zlib-devel
+# epmd user, epmd group
+Requires(pre): shadow-utils
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Requires: lksctp-tools
@@ -921,16 +923,7 @@ Erlang mode for XEmacs (source lisp files).
%ifarch sparcv9 sparc64
ERL_FLAGS="${RPM_OPT_FLAGS} -mcpu=ultrasparc -fno-strict-aliasing"
%else
-
-%ifarch %{ix86}
-# We have to disable optimizations for Intel Atom
-# See https://bugzilla.redhat.com/1240487#c13
-#ERL_FLAGS="${RPM_OPT_FLAGS/-mtune=atom/-mtune=generic} -fno-strict-aliasing"
ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
-%else
-ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
-%endif
-
%endif
CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
@@ -2239,6 +2232,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Fri Feb 19 2016 Peter Lemenkov - 18.2.3-3
+- Add missing dependency
+
* Wed Feb 10 2016 Peter Lemenkov - 18.2.3-2
- Workaround for broken cmpxchg8b inlining on ix86 (rhbz#1240487)
- Don't use generic optimization on ix86
From db107ef77c6f466dd4154135b93a8c730733d941 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Fri, 19 Feb 2016 18:42:20 +0300
Subject: [PATCH 034/305] Add missing dependency
Signed-off-by: Peter Lemenkov
---
erlang.spec | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/erlang.spec b/erlang.spec
index d0d47ec..872dc21 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.14%{?dist}
+Release: %{upstream_rel_for_rpm}.15%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -483,6 +483,8 @@ Low level interface to C.
%package erts
Summary: Functionality necessary to run the Erlang System itself
Group: Development/Languages
+# epmd user, epmd group
+Requires(pre): shadow-utils
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
# This library is dlopened so it can't be picked up automatically by the RPM
@@ -2352,6 +2354,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Fri Feb 19 2016 Peter Lemenkov - R16B-03.15
+- Add missing dependency
+
* Wed Jan 27 2016 Peter Lemenkov - R16B-03.14
- Enable error_logger depth fine tuning
From dca1aea1d4760405a0cd2d61454ecd30b412462d Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 23 Feb 2016 15:14:54 +0300
Subject: [PATCH 035/305] Ver. 18.2.4
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 11 ++++++++---
sources | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index d0b1f42..0e151bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,3 +57,4 @@ otp_src_R14A.tar.gz
/otp-OTP-17.4.tar.gz
/otp-OTP-18.2.2.tar.gz
/otp-OTP-18.2.3.tar.gz
+/otp-OTP-18.2.4.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 83c691c..244f220 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -15,8 +15,8 @@
%endif
Name: erlang
-Version: 18.2.3
-Release: 3%{?dist}
+Version: 18.2.4
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -850,7 +850,7 @@ A tool that simplifying the use of web based Erlang tools.
%package wx
Summary: A library for wxWidgets support in Erlang
Group: Development/Languages
-BuildRequires: wxGTK-devel
+BuildRequires: wxGTK3-devel
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -2232,6 +2232,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Feb 23 2016 Peter Lemenkov - 18.2.4-1
+- Ver. 18.2.4
+- Build against wxGTK-3.x.y as recommended by upstream. This change won't
+ affect "headless" installations.
+
* Fri Feb 19 2016 Peter Lemenkov - 18.2.3-3
- Add missing dependency
diff --git a/sources b/sources
index b3b8f94..92f198a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-236741d3893b09cdd1699edd1549db6b otp-OTP-18.2.3.tar.gz
+0ea13f170092d73f014c27296825bfc9 otp-OTP-18.2.4.tar.gz
From 6beeb43ea16ed67d993186ff268d39bbeee09cfe Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 23 Feb 2016 15:35:58 +0300
Subject: [PATCH 036/305] Add missing BuildRequires
Signed-off-by: Peter Lemenkov
---
erlang.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/erlang.spec b/erlang.spec
index 244f220..390471f 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -97,6 +97,8 @@ Requires(preun):systemd
Requires(postun):systemd
Requires: systemd
%endif
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: erlang-rpm-macros
Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
From 2b7cc88703677d871551257827d3723683a85fc1 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 23 Feb 2016 16:25:11 +0300
Subject: [PATCH 037/305] Use proper wx-config path for wxWidgets-3.x.y
Signed-off-by: Peter Lemenkov
---
erlang.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erlang.spec b/erlang.spec
index 390471f..5264f1a 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -928,7 +928,7 @@ ERL_FLAGS="${RPM_OPT_FLAGS} -mcpu=ultrasparc -fno-strict-aliasing"
ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
%endif
-CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
+CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe} --with-wx-config=/usr/bin/wx-config-3.0
# Remove pre-built BEAM files
make clean
From 7f00bd87226a953ee41efdd55c57cc0011bbc32d Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Sun, 28 Feb 2016 00:05:49 +0300
Subject: [PATCH 038/305] Fixed issue with nodes registration over IPv6
Signed-off-by: Peter Lemenkov
---
erlang.spec | 5 +-
...-epmd-support-IPv6-node-registration.patch | 172 +++++++++++-------
2 files changed, 108 insertions(+), 69 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 5264f1a..81c2a53 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -16,7 +16,7 @@
Name: erlang
Version: 18.2.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2234,6 +2234,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Sun Feb 28 2016 Peter Lemenkov - 18.2.4-2
+- Fixed issue with nodes registration over IPv6
+
* Tue Feb 23 2016 Peter Lemenkov - 18.2.4-1
- Ver. 18.2.4
- Build against wxGTK-3.x.y as recommended by upstream. This change won't
diff --git a/otp-0009-epmd-support-IPv6-node-registration.patch b/otp-0009-epmd-support-IPv6-node-registration.patch
index 0347c7e..b6c98b2 100644
--- a/otp-0009-epmd-support-IPv6-node-registration.patch
+++ b/otp-0009-epmd-support-IPv6-node-registration.patch
@@ -17,30 +17,22 @@ epmd ignores errors opening the socket if the protocol is not
supported. Similarly, the epmd client will fall back to IPv4 if the IPv6
socket is not available.
-The interaction between IPv4 and IPv6 sockets depends on the platform:
-
-* FreeBSD allows multiple "specific" sockets to bind the same port (such
- as 2 sockets listening to the same port on ANY and the loopback).
- Binding port 4369 to IPv4 and IPv6 sockets simulataneously is allowed.
-
-* Linux does not allow the same port to be bound by different sockets.
- Setting the IPV6_V6ONLY socket option is required.
-
-* Windows
-
- The behaviour differs depending on the version of Windows:
-
- http://msdn.microsoft.com/en-us/library/windows/desktop/bb513665(v=vs.85).aspx
-
- According to the site, sockets on Windows XP with Service Pack 1 (SP1)
- and Windows Server 2003 will only listen on either IPv4 or IPv6, so
- creating two sockets is required to service IPv4 and IPv6 traffic on
- the same port. The IPV6_V6ONLY socket option is not supported.
-
- For Windows Vista and later, a single socket can handle IPv4 and IPv6
- traffic for the same port. The IPV6_V6ONLY socket option is supported
- and is enabled for IPv6 sockets by default.
+Update the minimum supported version of Windows to Windows Vista to
+support IPv6.
+diff --git a/erts/configure.in b/erts/configure.in
+index 4fb725f..368c563 100644
+--- a/erts/configure.in
++++ b/erts/configure.in
+@@ -468,7 +468,7 @@ case $host_os in
+ win32)
+ # The ethread library requires _WIN32_WINNT of at least 0x0403.
+ # -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS.
+- CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501"
++ CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600 -DWINVER=0x0600"
+ ;;
+ darwin*)
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE"
diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd.xml
index 28fcc8f..7f61804 100644
--- a/erts/doc/src/epmd.xml
@@ -55,13 +47,18 @@ index 28fcc8f..7f61804 100644
Starts the port mapper daemon
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
-index ec4a0de..cdf8aef 100644
+index ec4a0de..9016a94 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
-@@ -382,6 +382,28 @@
+@@ -382,6 +382,33 @@
similar to . See
code(3).
++
++
++
Replaces the path specified in the boot script. See
++ script(4).
++
+
+
+
Specify a protocol for Erlang distribution.
@@ -80,9 +77,9 @@ index ec4a0de..cdf8aef 100644
+
+
+
-diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
-index 63ec18d..5513cb2 100644
---- a/erts/epmd/src/epmd.c
-+++ b/erts/epmd/src/epmd.c
-@@ -343,7 +343,7 @@ static void run_daemon(EpmdVars *g)
- for (fd = 0; fd < g->max_conn ; fd++) /* close all files ... */
- close(fd);
- /* Syslog on linux will try to write to whatever if we dont
-- inform it of that the log is closed. */
-+ inform it that the log is closed. */
- closelog();
-
- /* These shouldn't be needed but for safety... */
-diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c
-index a8fe865..6fc05e1 100644
---- a/erts/epmd/src/epmd_cli.c
-+++ b/erts/epmd/src/epmd_cli.c
-@@ -136,19 +136,33 @@ void epmd_call(EpmdVars *g,int what)
- static int conn_to_epmd(EpmdVars *g)
- {
- struct EPMD_SOCKADDR_IN address;
-+ size_t salen = 0;
- int connect_sock;
--
-- connect_sock = socket(FAMILY, SOCK_STREAM, 0);
-- if (connect_sock<0)
-- goto error;
-+ unsigned short sport = g->port;
-+
-+#if defined(EPMD6)
-+ SET_ADDR6(address, in6addr_loopback, sport);
-+ salen = sizeof(struct sockaddr_in6);
-+
-+ connect_sock = socket(AF_INET6, SOCK_STREAM, 0);
-+ if (connect_sock>=0) {
-+
-+ if (connect(connect_sock, (struct sockaddr*)&address, salen) == 0)
-+ return connect_sock;
-
-- { /* store port number in unsigned short */
-- unsigned short sport = g->port;
-- SET_ADDR(address, EPMD_ADDR_LOOPBACK, sport);
-+ close(connect_sock);
- }
-+#endif
-+ SET_ADDR(address, htonl(INADDR_LOOPBACK), sport);
-+ salen = sizeof(struct sockaddr_in);
-
-- if (connect(connect_sock, (struct sockaddr*)&address, sizeof address) < 0)
-+ connect_sock = socket(AF_INET, SOCK_STREAM, 0);
-+ if (connect_sock<0)
- goto error;
-+
-+ if (connect(connect_sock, (struct sockaddr*)&address, salen) < 0)
-+ goto error;
-+
- return connect_sock;
-
- error:
-diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
-index 26100af..0931709 100644
---- a/erts/epmd/src/epmd_int.h
-+++ b/erts/epmd/src/epmd_int.h
-@@ -55,6 +55,7 @@
- # ifndef WINDOWS_H_INCLUDES_WINSOCK2_H
- # include
- # endif
-+# include
- # include
- # include
- #endif
-@@ -130,6 +131,10 @@
- # include
- #endif /* HAVE_SYSTEMD_DAEMON */
-
-+#if defined(HAVE_IN6) && defined(AF_INET6) && defined(HAVE_INET_PTON)
-+# define EPMD6
-+#endif
-+
- /* ************************************************************************ */
- /* Replace some functions by others by making the function name a macro */
-
-@@ -183,33 +188,53 @@
- /* ************************************************************************ */
- /* Macros that let us use IPv6 */
-
--#if defined(HAVE_IN6) && defined(AF_INET6) && defined(EPMD6)
-+#if HAVE_IN6
-+# if ! defined(HAVE_IN6ADDR_ANY) || ! HAVE_IN6ADDR_ANY
-+# if HAVE_DECL_IN6ADDR_ANY_INIT
-+static const struct in6_addr in6addr_any = { { IN6ADDR_ANY_INIT } };
-+# else
-+static const struct in6_addr in6addr_any =
-+ { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
-+# endif /* HAVE_IN6ADDR_ANY_INIT */
-+# endif /* ! HAVE_DECL_IN6ADDR_ANY */
-+
-+# if ! defined(HAVE_IN6ADDR_LOOPBACK) || ! HAVE_IN6ADDR_LOOPBACK
-+# if HAVE_DECL_IN6ADDR_LOOPBACK_INIT
-+static const struct in6_addr in6addr_loopback =
-+ { { IN6ADDR_LOOPBACK_INIT } };
-+# else
-+static const struct in6_addr in6addr_loopback =
-+ { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
-+# endif /* HAVE_IN6ADDR_LOOPBACK_INIT */
-+# endif /* ! HAVE_DECL_IN6ADDR_LOOPBACK */
-+#endif /* HAVE_IN6 */
-+
-+#define IS_ADDR_LOOPBACK(addr) ((addr).s_addr == htonl(INADDR_LOOPBACK))
-+
-+#if defined(EPMD6)
-
--#define EPMD_SOCKADDR_IN sockaddr_in6
--#define EPMD_IN_ADDR in6_addr
--#define EPMD_S_ADDR s6_addr
--#define EPMD_ADDR_LOOPBACK in6addr_loopback.s6_addr
--#define EPMD_ADDR_ANY in6addr_any.s6_addr
-+#define EPMD_SOCKADDR_IN sockaddr_storage
- #define FAMILY AF_INET6
-
--#define SET_ADDR(dst, addr, port) do { \
-- memset((char*)&(dst), 0, sizeof(dst)); \
-- memcpy((char*)&(dst).sin6_addr.s6_addr, (char*)&(addr), 16); \
-- (dst).sin6_family = AF_INET6; \
-- (dst).sin6_flowinfo = 0; \
-- (dst).sin6_port = htons(port); \
-+#define SET_ADDR6(dst, addr, port) do { \
-+ struct sockaddr_in6 *sa = (struct sockaddr_in6 *)&(dst); \
-+ memset(sa, 0, sizeof(dst)); \
-+ sa->sin6_family = AF_INET6; \
-+ sa->sin6_addr = (addr); \
-+ sa->sin6_port = htons(port); \
- } while(0)
-
--#define IS_ADDR_LOOPBACK(addr) \
-- (memcmp((addr).s6_addr, in6addr_loopback.s6_addr, 16) == 0)
-+#define SET_ADDR(dst, addr, port) do { \
-+ struct sockaddr_in *sa = (struct sockaddr_in *)&(dst); \
-+ memset(sa, 0, sizeof(dst)); \
-+ sa->sin_family = AF_INET; \
-+ sa->sin_addr.s_addr = (addr); \
-+ sa->sin_port = htons(port); \
-+ } while(0)
-
- #else /* Not IP v6 */
-
- #define EPMD_SOCKADDR_IN sockaddr_in
--#define EPMD_IN_ADDR in_addr
--#define EPMD_S_ADDR s_addr
--#define EPMD_ADDR_LOOPBACK htonl(INADDR_LOOPBACK)
--#define EPMD_ADDR_ANY htonl(INADDR_ANY)
- #define FAMILY AF_INET
-
- #define SET_ADDR(dst, addr, port) do { \
-@@ -219,8 +244,6 @@
- (dst).sin_port = htons(port); \
- } while(0)
-
--#define IS_ADDR_LOOPBACK(addr) ((addr).s_addr == htonl(INADDR_LOOPBACK))
--
- #endif /* Not IP v6 */
-
- /* ************************************************************************ */
-diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
-index 8c8d730..d092d98 100644
---- a/erts/epmd/src/epmd_srv.c
-+++ b/erts/epmd/src/epmd_srv.c
-@@ -76,6 +76,7 @@ static time_t current_time(EpmdVars*);
-
- static Connection *conn_init(EpmdVars*);
- static int conn_open(EpmdVars*,int);
-+static int conn_local_peer_check(EpmdVars*, int);
- static int conn_close_fd(EpmdVars*,int);
-
- static void node_init(EpmdVars*);
-@@ -206,10 +207,11 @@ void run(EpmdVars *g)
- {
- struct EPMD_SOCKADDR_IN iserv_addr[MAX_LISTEN_SOCKETS];
- int listensock[MAX_LISTEN_SOCKETS];
-- int num_sockets;
-+ int num_sockets = 0;
- int i;
- int opt;
- unsigned short sport = g->port;
-+ int bound = 0;
-
- node_init(g);
- g->conn = conn_init(g);
-@@ -252,64 +254,82 @@ void run(EpmdVars *g)
- if (g->addresses != NULL && /* String contains non-separator characters if: */
- g->addresses[strspn(g->addresses," ,")] != '\000')
- {
-- char *tmp;
-- char *token;
-- int loopback_ok = 0;
-+ char *tmp = NULL;
-+ char *token = NULL;
-+
-+ /* Always listen on the loopback. */
-+ SET_ADDR(iserv_addr[num_sockets],htonl(INADDR_LOOPBACK),sport);
-+ num_sockets++;
-+#if defined(EPMD6)
-+ SET_ADDR6(iserv_addr[num_sockets],in6addr_loopback,sport);
-+ num_sockets++;
-+#endif
-
-- if ((tmp = (char *)malloc(strlen(g->addresses) + 1)) == NULL)
-+ if ((tmp = strdup(g->addresses)) == NULL)
- {
- dbg_perror(g,"cannot allocate memory");
- epmd_cleanup_exit(g,1);
- }
-- strcpy(tmp,g->addresses);
-
-- for(token = strtok(tmp,", "), num_sockets = 0;
-+ for(token = strtok(tmp,", ");
- token != NULL;
-- token = strtok(NULL,", "), num_sockets++)
-+ token = strtok(NULL,", "))
- {
-- struct EPMD_IN_ADDR addr;
--#ifdef HAVE_INET_PTON
-- int ret;
-+ struct in_addr addr;
-+#if defined(EPMD6)
-+ struct in6_addr addr6;
-+ struct sockaddr_storage *sa = &iserv_addr[num_sockets];
-
-- if ((ret = inet_pton(FAMILY,token,&addr)) == -1)
-+ if (inet_pton(AF_INET6,token,&addr6) == 1)
- {
-- dbg_perror(g,"cannot convert IP address to network format");
-- epmd_cleanup_exit(g,1);
-+ SET_ADDR6(iserv_addr[num_sockets],addr6,sport);
-+ }
-+ else if (inet_pton(AF_INET,token,&addr) == 1)
-+ {
-+ SET_ADDR(iserv_addr[num_sockets],addr.s_addr,sport);
-+ }
-+ else
-+#else
-+ if ((addr.s_addr = inet_addr(token)) != INADDR_NONE)
-+ {
-+ SET_ADDR(iserv_addr[num_sockets],addr.s_addr,sport);
- }
-- else if (ret == 0)
--#elif !defined(EPMD6)
-- if ((addr.EPMD_S_ADDR = inet_addr(token)) == INADDR_NONE)
-+ else
- #endif
- {
- dbg_tty_printf(g,0,"cannot parse IP address \"%s\"",token);
- epmd_cleanup_exit(g,1);
- }
-
-+#if defined(EPMD6)
-+ if (sa->ss_family == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&addr6))
-+ continue;
-+
-+ if (sa->ss_family == AF_INET)
-+#endif
- if (IS_ADDR_LOOPBACK(addr))
-- loopback_ok = 1;
-+ continue;
-
-- if (num_sockets - loopback_ok == MAX_LISTEN_SOCKETS - 1)
-+ num_sockets++;
-+
-+ if (num_sockets >= MAX_LISTEN_SOCKETS)
- {
- dbg_tty_printf(g,0,"cannot listen on more than %d IP addresses",
- MAX_LISTEN_SOCKETS);
- epmd_cleanup_exit(g,1);
- }
--
-- SET_ADDR(iserv_addr[num_sockets],addr.EPMD_S_ADDR,sport);
- }
-
- free(tmp);
--
-- if (!loopback_ok)
-- {
-- SET_ADDR(iserv_addr[num_sockets],EPMD_ADDR_LOOPBACK,sport);
-- num_sockets++;
-- }
- }
- else
- {
-- SET_ADDR(iserv_addr[0],EPMD_ADDR_ANY,sport);
-- num_sockets = 1;
-+ SET_ADDR(iserv_addr[num_sockets],htonl(INADDR_ANY),sport);
-+ num_sockets++;
-+#if defined(EPMD6)
-+ SET_ADDR6(iserv_addr[num_sockets],in6addr_any,sport);
-+ num_sockets++;
-+#endif
- }
- #ifdef HAVE_SYSTEMD_DAEMON
- }
-@@ -340,13 +360,39 @@ void run(EpmdVars *g)
- #endif /* HAVE_SYSTEMD_DAEMON */
- for (i = 0; i < num_sockets; i++)
- {
-- if ((listensock[i] = socket(FAMILY,SOCK_STREAM,0)) < 0)
-+ struct sockaddr *sa = (struct sockaddr *)&iserv_addr[i];
-+#if defined(EPMD6)
-+ size_t salen = (sa->sa_family == AF_INET6 ?
-+ sizeof(struct sockaddr_in6) :
-+ sizeof(struct sockaddr_in));
-+#else
-+ size_t salen = sizeof(struct sockaddr_in);
-+#endif
-+
-+ if ((listensock[i] = socket(sa->sa_family,SOCK_STREAM,0)) < 0)
- {
-- dbg_perror(g,"error opening stream socket");
-+ switch (errno) {
-+ case EAFNOSUPPORT:
-+ case EPROTONOSUPPORT:
-+ continue;
-+ default:
-+ dbg_perror(g,"error opening stream socket");
-+ epmd_cleanup_exit(g,1);
-+ }
-+ }
-+ g->listenfd[bound++] = listensock[i];
-+
-+#if HAVE_DECL_IPV6_V6ONLY
-+ opt = 1;
-+ if (sa->sa_family == AF_INET6 &&
-+ setsockopt(listensock[i],IPPROTO_IPV6,IPV6_V6ONLY,&opt,
-+ sizeof(opt)) <0)
-+ {
-+ dbg_perror(g,"can't set IPv6 only socket option");
- epmd_cleanup_exit(g,1);
- }
-- g->listenfd[i] = listensock[i];
--
-+#endif
-+
- /*
- * Note that we must not enable the SO_REUSEADDR on Windows,
- * because addresses will be reused even if they are still in use.
-@@ -378,8 +424,7 @@ void run(EpmdVars *g)
- dbg_perror(g,"failed to set non-blocking mode of listening socket %d",
- listensock[i]);
-
-- if (bind(listensock[i], (struct sockaddr*) &iserv_addr[i],
-- sizeof(iserv_addr[i])) < 0)
-+ if (bind(listensock[i], (struct sockaddr*) &iserv_addr[i], salen) < 0)
- {
- if (errno == EADDRINUSE)
- {
-@@ -400,6 +445,11 @@ void run(EpmdVars *g)
- }
- select_fd_set(g, listensock[i]);
- }
-+ if (bound == 0) {
-+ dbg_perror(g,"unable to bind any address");
-+ epmd_cleanup_exit(g,1);
-+ }
-+ num_sockets = bound;
- #ifdef HAVE_SYSTEMD_DAEMON
- }
- sd_notifyf(0, "READY=1\n"
-@@ -444,8 +494,8 @@ void run(EpmdVars *g)
- }
-
- for (i = 0; i < num_sockets; i++)
-- if (FD_ISSET(listensock[i],&read_mask)) {
-- if (do_accept(g, listensock[i]) && g->active_conn < g->max_conn) {
-+ if (FD_ISSET(g->listenfd[i],&read_mask)) {
-+ if (do_accept(g, g->listenfd[i]) && g->active_conn < g->max_conn) {
- /*
- * The accept() succeeded, and we have at least one file
- * descriptor still free, which means that another accept()
-@@ -1007,15 +1057,6 @@ static int conn_open(EpmdVars *g,int fd)
-
- for (i = 0; i < g->max_conn; i++) {
- if (g->conn[i].open == EPMD_FALSE) {
-- struct sockaddr_in si;
-- struct sockaddr_in di;
--#ifdef HAVE_SOCKLEN_T
-- socklen_t st;
--#else
-- int st;
--#endif
-- st = sizeof(si);
--
- g->active_conn++;
- s = &g->conn[i];
-
-@@ -1026,20 +1067,7 @@ static int conn_open(EpmdVars *g,int fd)
- s->open = EPMD_TRUE;
- s->keep = EPMD_FALSE;
-
-- /* Determine if connection is from localhost */
-- if (getpeername(s->fd,(struct sockaddr*) &si,&st) ||
-- st < sizeof(si)) {
-- /* Failure to get peername is regarded as non local host */
-- s->local_peer = EPMD_FALSE;
-- } else {
-- /* Only 127.x.x.x and connections from the host's IP address
-- allowed, no false positives */
-- s->local_peer =
-- (((((unsigned) ntohl(si.sin_addr.s_addr)) & 0xFF000000U) ==
-- 0x7F000000U) ||
-- (getsockname(s->fd,(struct sockaddr*) &di,&st) ?
-- EPMD_FALSE : si.sin_addr.s_addr == di.sin_addr.s_addr));
-- }
-+ s->local_peer = conn_local_peer_check(g, s->fd);
- dbg_tty_printf(g,2,(s->local_peer) ? "Local peer connected" :
- "Non-local peer connected");
-
-@@ -1047,7 +1075,7 @@ static int conn_open(EpmdVars *g,int fd)
- s->got = 0;
- s->mod_time = current_time(g); /* Note activity */
-
-- s->buf = (char *)malloc(INBUF_SIZE);
-+ s->buf = malloc(INBUF_SIZE);
-
- if (s->buf == NULL) {
- dbg_printf(g,0,"epmd: Insufficient memory");
-@@ -1065,6 +1093,60 @@ static int conn_open(EpmdVars *g,int fd)
- return EPMD_FALSE;
- }
-
-+static int conn_local_peer_check(EpmdVars *g, int fd)
-+{
-+ struct EPMD_SOCKADDR_IN si;
-+ struct EPMD_SOCKADDR_IN di;
-+
-+ struct sockaddr_in *si4 = (struct sockaddr_in *)&si;
-+ struct sockaddr_in *di4 = (struct sockaddr_in *)&di;
-+
-+#if defined(EPMD6)
-+ struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&si;
-+ struct sockaddr_in6 *di6 = (struct sockaddr_in6 *)&di;
-+#endif
-+
-+#ifdef HAVE_SOCKLEN_T
-+ socklen_t st;
-+#else
-+ int st;
-+#endif
-+
-+ st = sizeof(si);
-+
-+ /* Determine if connection is from localhost */
-+ if (getpeername(fd,(struct sockaddr*) &si,&st) ||
-+ st > sizeof(si)) {
-+ /* Failure to get peername is regarded as non local host */
-+ return EPMD_FALSE;
-+ }
-+
-+ /* Only 127.x.x.x and connections from the host's IP address
-+ allowed, no false positives */
-+#if defined(EPMD6)
-+ if (si.ss_family == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&(si6->sin6_addr)))
-+ return EPMD_TRUE;
-+
-+ if (si.ss_family == AF_INET)
-+#endif
-+ if ((((unsigned) ntohl(si4->sin_addr.s_addr)) & 0xFF000000U) ==
-+ 0x7F000000U)
-+ return EPMD_TRUE;
-+
-+ if (getsockname(fd,(struct sockaddr*) &di,&st))
-+ return EPMD_FALSE;
-+
-+#if defined(EPMD6)
-+ if (si.ss_family == AF_INET6)
-+ return IN6_ARE_ADDR_EQUAL( &(si6->sin6_addr), &(di6->sin6_addr));
-+ if (si.ss_family == AF_INET)
-+#endif
-+ return si4->sin_addr.s_addr == di4->sin_addr.s_addr;
-+#if defined(EPMD6)
-+ return EPMD_FALSE;
-+#endif
-+}
-+
- static int conn_close_fd(EpmdVars *g,int fd)
- {
- int i;
-diff --git a/erts/epmd/test/epmd_SUITE.erl b/erts/epmd/test/epmd_SUITE.erl
-index e8bbfdb..58fe23c 100644
---- a/erts/epmd/test/epmd_SUITE.erl
-+++ b/erts/epmd/test/epmd_SUITE.erl
-@@ -43,6 +43,7 @@
- -export(
- [
- register_name/1,
-+ register_name_ipv6/1,
- register_names_1/1,
- register_names_2/1,
- register_duplicate_name/1,
-@@ -111,7 +112,8 @@
- suite() -> [{ct_hooks,[ts_install_cth]}].
-
- all() ->
-- [register_name, register_names_1, register_names_2,
-+ [register_name, register_name_ipv6,
-+ register_names_1, register_names_2,
- register_duplicate_name, unicode_name, long_unicode_name,
- get_port_nr, slow_get_port_nr,
- unregister_others_name_1, unregister_others_name_2,
-@@ -169,6 +171,24 @@ register_name(Config) when is_list(Config) ->
- ?line ok = close(Sock), % Unregister
- ok.
-
-+register_name_ipv6(doc) ->
-+ ["Register a name over IPv6"];
-+register_name_ipv6(suite) ->
-+ [];
-+register_name_ipv6(Config) when is_list(Config) ->
-+ % Test if the host has an IPv6 loopback address
-+ Res = gen_tcp:listen(0, [inet6, {ip, {0,0,0,0,0,0,0,1}}]),
-+ case Res of
-+ {ok,LSock} ->
-+ gen_tcp:close(LSock),
-+ ?line ok = epmdrun(),
-+ ?line {ok,Sock} = register_node6("foobar6"),
-+ ?line ok = close(Sock), % Unregister
-+ ok;
-+ _Error ->
-+ {skip, "Host does not have an IPv6 loopback address"}
-+ end.
-+
- register_names_1(doc) ->
- ["Register and unregister two nodes"];
- register_names_1(suite) ->
-@@ -242,13 +262,14 @@ register_node(Name) ->
- register_node(Name,Port) ->
- register_node_v2(Port,$M,0,5,5,Name,"").
-
-+register_node6(Name) ->
-+ register_node_v2({0,0,0,0,0,0,0,1},?DUMMY_PORT,$M,0,5,5,Name,"").
-+
- register_node_v2(Port, NodeType, Prot, HVsn, LVsn, Name, Extra) ->
-- Utf8Name = unicode:characters_to_binary(Name),
-- Req = [?EPMD_ALIVE2_REQ, put16(Port), NodeType, Prot,
-- put16(HVsn), put16(LVsn),
-- put16(size(Utf8Name)), binary_to_list(Utf8Name),
-- size16(Extra), Extra],
-- case send_req(Req) of
-+ register_node_v2("localhost", Port, NodeType, Prot, HVsn, LVsn, Name, Extra).
-+register_node_v2(Addr, Port, NodeType, Prot, HVsn, LVsn, Name, Extra) ->
-+ Req = alive2_req(Port, NodeType, Prot, HVsn, LVsn, Name, Extra),
-+ case send_req(Req, Addr) of
- {ok,Sock} ->
- case recv(Sock,4) of
- {ok, [?EPMD_ALIVE2_RESP,_Res=0,_C0,_C1]} ->
-@@ -1151,7 +1172,9 @@ send_direct(Sock, Bytes) ->
- end.
-
- send_req(Req) ->
-- case connect() of
-+ send_req(Req, "localhost").
-+send_req(Req, Addr) ->
-+ case connect(Addr) of
- {ok,Sock} ->
- case send(Sock, [size16(Req), Req]) of
- ok ->
-diff --git a/lib/erl_interface/configure.in b/lib/erl_interface/configure.in
-index 3ac9212..7a3b5ce 100644
---- a/lib/erl_interface/configure.in
-+++ b/lib/erl_interface/configure.in
-@@ -251,7 +251,7 @@ case "$threads_disabled" in
- ;;
- win32_threads)
- EI_THREADS="true"
-- THR_DEFS="$THR_DEFS -D_WIN32_WINNT=0x0500 -DWINVER=0x0500"
-+ THR_DEFS="$THR_DEFS -D_WIN32_WINNT=0x0600 -DWINVER=0x0600"
- ;;
- pthread)
- EI_THREADS="true"
-diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
-index 55ce9a7..c6202dd 100644
---- a/lib/kernel/src/erl_epmd.erl
-+++ b/lib/kernel/src/erl_epmd.erl
-@@ -32,7 +32,7 @@
- %% External exports
- -export([start/0, start_link/0, stop/0, port_please/2,
- port_please/3, names/0, names/1,
-- register_node/2, open/0, open/1, open/2]).
-+ register_node/2, register_node/3, open/0, open/1, open/2]).
-
- %% gen_server callbacks
- -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
-@@ -102,7 +102,9 @@ names(EpmdAddr) ->
-
-
- register_node(Name, PortNo) ->
-- gen_server:call(erl_epmd, {register, Name, PortNo}, infinity).
-+ register_node(Name, PortNo, inet).
-+register_node(Name, PortNo, Family) ->
-+ gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
-
- %%%----------------------------------------------------------------------
- %%% Callback functions from gen_server
-@@ -120,10 +122,10 @@ init(_) ->
- -spec handle_call(calls(), term(), state()) ->
- {'reply', term(), state()} | {'stop', 'shutdown', 'ok', state()}.
-
--handle_call({register, Name, PortNo}, _From, State) ->
-+handle_call({register, Name, PortNo, Family}, _From, State) ->
- case State#state.socket of
- P when P < 0 ->
-- case do_register_node(Name, PortNo) of
-+ case do_register_node(Name, PortNo, Family) of
- {alive, Socket, Creation} ->
- S = State#state{socket = Socket,
- port_no = PortNo,
-@@ -206,8 +208,12 @@ open({A,B,C,D,E,F,G,H}=EpmdAddr, Timeout) when ?ip6(A,B,C,D,E,F,G,H) ->
- close(Socket) ->
- gen_tcp:close(Socket).
-
--do_register_node(NodeName, TcpPort) ->
-- case open() of
-+do_register_node(NodeName, TcpPort, Family) ->
-+ Localhost = case Family of
-+ inet -> open({127,0,0,1});
-+ inet6 -> open({0,0,0,0,0,0,0,1})
-+ end,
-+ case Localhost of
- {ok, Socket} ->
- Name = to_string(NodeName),
- Extra = "",
-diff --git a/lib/wx/configure.in b/lib/wx/configure.in
-index 48fcca6..bf27b72 100644
---- a/lib/wx/configure.in
-+++ b/lib/wx/configure.in
-@@ -164,14 +164,14 @@ case $host_os in
- CPPFLAGS="$CPPFLAGS -D_MACOSX $PTHR_CFLAGS"
- ;;
- mingw32)
-- CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0500 -D_WINDOWS -D_UNICODE -DUNICODE"
-- CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0500"
-+ CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0600 -D_WINDOWS -D_UNICODE -DUNICODE"
-+ CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600"
- AC_MSG_WARN([Reverting to 32-bit time_t])
- CPPFLAGS="$CPPFLAGS -D_USE_32BIT_TIME_T"
- ;;
- win32)
-- CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0500 -D_WINDOWS -D_UNICODE -DUNICODE"
-- CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0500"
-+ CFLAGS="$CFLAGS -DWIN32 -DWINVER=0x0600 -D_WINDOWS -D_UNICODE -DUNICODE"
-+ CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600"
- ;;
- *)
- CFLAGS="$CFLAGS -Wno-deprecated-declarations"
diff --git a/otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch b/otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch
deleted file mode 100644
index cc8a9d1..0000000
--- a/otp-0010-Quickfix-for-cmpxchg8b-inline-asm-when-pic-and-gcc-5.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Rickard Green
-Date: Tue, 9 Feb 2016 18:23:26 +0100
-Subject: [PATCH] Quickfix for cmpxchg8b inline asm when pic and gcc >= 5.0 is
- used
-
-
-diff --git a/erts/include/internal/i386/ethr_dw_atomic.h b/erts/include/internal/i386/ethr_dw_atomic.h
-index e8c4119..caba633 100644
---- a/erts/include/internal/i386/ethr_dw_atomic.h
-+++ b/erts/include/internal/i386/ethr_dw_atomic.h
-@@ -115,6 +115,8 @@ ethr_native_dw_atomic_addr(ethr_native_dw_atomic_t *var)
- return (ethr_sint_t *) ETHR_DW_NATMC_MEM__(var);
- }
-
-+#if !ETHR_AT_LEAST_GCC_VSN__(5, 0, 0)
-+
- #if ETHR_SIZEOF_PTR == 4 && defined(__PIC__) && __PIC__
- /*
- * When position independent code is used in 32-bit mode, the EBX register
-@@ -138,6 +140,7 @@ ethr_native_dw_atomic_addr(ethr_native_dw_atomic_t *var)
- # endif
- #endif
-
-+#endif /* < gcc-5.0 */
-
- #define ETHR_HAVE_ETHR_NATIVE_DW_ATOMIC_CMPXCHG_MB
-
From b6c7bd6af47eabac0fbcbb398c7e4c49d48b492d Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 24 Mar 2016 23:04:16 +0300
Subject: [PATCH 041/305] Leftover
Signed-off-by: Peter Lemenkov
---
erlang.spec | 5 -----
1 file changed, 5 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index a89db79..4c830f3 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -2,16 +2,11 @@
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
-%global __minimal 0
-
%ifarch %{arm}
# For some reason, fop hangs on arm, so for now don't generate docs by
# default
%bcond_with doc
%else
-%if 0%{__minimal}
-%bcond_with doc
-%else
%bcond_without doc
%endif
From e6fdb0b601d2e3f1cd3d61e1043a132e1d6d5df0 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 24 Mar 2016 23:14:57 +0300
Subject: [PATCH 042/305] Uploaded sources
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
sources | 1 +
2 files changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 0e151bd..91ca00d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,3 +58,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.2.2.tar.gz
/otp-OTP-18.2.3.tar.gz
/otp-OTP-18.2.4.tar.gz
+/otp-OTP-18.3.tar.gz
diff --git a/sources b/sources
index 92f198a..5588a52 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
0ea13f170092d73f014c27296825bfc9 otp-OTP-18.2.4.tar.gz
+9302351b5dcd74d86fb67d8c28ad94d2 otp-OTP-18.3.tar.gz
From 8d530e97f03c8d7bd950f28619d7b43dc19405bb Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 31 Mar 2016 14:18:34 +0300
Subject: [PATCH 043/305] Disallow epmd to send systemd notifications every
time
Signed-off-by: Peter Lemenkov
---
erlang.spec | 10 +++-
...nd-unasked-for-systemd-notifications.patch | 56 +++++++++++++++++++
2 files changed, 65 insertions(+), 1 deletion(-)
create mode 100644 otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
diff --git a/erlang.spec b/erlang.spec
index 4c830f3..16192d8 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -16,7 +16,7 @@
Name: erlang
Version: 18.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -72,6 +72,9 @@ Patch7: otp-0007-Split-off-webtool-dependency-from-tools.patch
# Fedora specific patch
# Add patch to crash dump on large distribution
Patch8: otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
+# Fedora specific patch
+# Don't send unasked for systemd notifications
+Patch9: otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
# end of autogenerated patch tag list
BuildRequires: flex
@@ -901,6 +904,7 @@ Erlang mode for XEmacs (source lisp files).
%patch6 -p1 -b .Do_not_install_erlang_sources
%patch7 -p1 -b .Split_off_webtool_dependency_from_tools
%patch8 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
+%patch9 -p1 -b .Don_t_send_unasked_for_systemd_notifications
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2226,6 +2230,10 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Thu Mar 31 2016 Peter Lemenkov - 18.3-2
+- Added patch to suppress sending systemd notifications from epmd if not
+ started as a systemd service.
+
* Thu Mar 24 2016 Peter Lemenkov - 18.3-1
- Ver. 18.3
diff --git a/otp-0009-Don-t-send-unasked-for-systemd-notifications.patch b/otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
new file mode 100644
index 0000000..1d19ace
--- /dev/null
+++ b/otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
@@ -0,0 +1,56 @@
+From: Alexey Lebedeff
+Date: Tue, 29 Mar 2016 20:30:22 +0300
+Subject: [PATCH] Don't send unasked for systemd notifications
+
+Suppose we have some erlang system that uses systemd unit with
+Type=notify - so this should send startup confirmation itself. But if
+systemd-enabled epmd will be started as a first step of that system
+startup, empd startup confirmation will be misinterpeted by systemd. And
+our erlang service will be considered 'ready' to early. Also this will
+interefere with systemd MAINPID detection: systemd will be monitoring
+`epmd` process instead of `beam` one.
+
+For example, rabbitmq works around this issue by starting epmd using
+separate short-lived beam process, with NOTIFY_SOCKET environment
+variable reset - only in this way we could be sure that epmd will not
+interfere with rabbit startup sequence.
+
+This patch disables indiscriminate confirmation sending, and does it
+only when it was explicitly asked to do so.
+
+diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
+index 5513cb2..4740ce8 100644
+--- a/erts/epmd/src/epmd.c
++++ b/erts/epmd/src/epmd.c
+@@ -592,8 +592,10 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval)
+ free(g->argv);
+ }
+ #ifdef HAVE_SYSTEMD_DAEMON
+- sd_notifyf(0, "STATUS=Exited.\n"
+- "ERRNO=%i", exitval);
++ if (g->is_systemd){
++ sd_notifyf(0, "STATUS=Exited.\n"
++ "ERRNO=%i", exitval);
++ }
+ #endif /* HAVE_SYSTEMD_DAEMON */
+ exit(exitval);
+ }
+diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
+index e1bac99..59d59ad 100644
+--- a/erts/epmd/src/epmd_srv.c
++++ b/erts/epmd/src/epmd_srv.c
+@@ -452,9 +452,11 @@ void run(EpmdVars *g)
+ num_sockets = bound;
+ #ifdef HAVE_SYSTEMD_DAEMON
+ }
+- sd_notifyf(0, "READY=1\n"
+- "STATUS=Processing port mapping requests...\n"
+- "MAINPID=%lu", (unsigned long) getpid());
++ if (g->is_systemd) {
++ sd_notifyf(0, "READY=1\n"
++ "STATUS=Processing port mapping requests...\n"
++ "MAINPID=%lu", (unsigned long) getpid());
++ }
+ #endif /* HAVE_SYSTEMD_DAEMON */
+
+ dbg_tty_printf(g,2,"entering the main select() loop");
From 008a6c63fbd747ac1e313d0bb2b648ae371ed6f8 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 7 Apr 2016 12:15:04 +0300
Subject: [PATCH 044/305] Ver. 18.3.1
Signed-off-by: Peter Lemenkov
---
erlang.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 16192d8..49ad40b 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -15,8 +15,8 @@
%endif
Name: erlang
-Version: 18.3
-Release: 2%{?dist}
+Version: 18.3.1
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2230,6 +2230,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Thu Apr 7 2016 Peter Lemenkov - 18.3.1-1
+- Ver. 18.3.1
+
* Thu Mar 31 2016 Peter Lemenkov - 18.3-2
- Added patch to suppress sending systemd notifications from epmd if not
started as a systemd service.
From 63f978a130cfa8642242d08e79d97344f5f4a743 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 7 Apr 2016 12:19:26 +0300
Subject: [PATCH 045/305] Forgot to upload sources
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
sources | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 91ca00d..2fc3419 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,3 +59,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.2.3.tar.gz
/otp-OTP-18.2.4.tar.gz
/otp-OTP-18.3.tar.gz
+/otp-OTP-18.3.1.tar.gz
diff --git a/sources b/sources
index 5588a52..a073951 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-0ea13f170092d73f014c27296825bfc9 otp-OTP-18.2.4.tar.gz
-9302351b5dcd74d86fb67d8c28ad94d2 otp-OTP-18.3.tar.gz
+03fd1ccf4e82bc093dd0e514275909df otp-OTP-18.3.1.tar.gz
From 6515854c294bc6be60987407a54d9680fd8faf65 Mon Sep 17 00:00:00 2001
From: John Eckersberg
Date: Thu, 7 Apr 2016 11:17:41 -0400
Subject: [PATCH 046/305] Revert "Enable error_logger depth fine tuning"
(rhbz#1324922)
This reverts commit 77046292336ce368b7f3310fdced075118075f61.
---
erlang.spec | 13 +-
...unused-code-in-error-logger-handlers.patch | 1028 -----------------
...h-sasl_report-to-limit-crash-reports.patch | 74 --
3 files changed, 4 insertions(+), 1111 deletions(-)
delete mode 100644 otp-0024-Remove-unused-code-in-error-logger-handlers.patch
delete mode 100644 otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
diff --git a/erlang.spec b/erlang.spec
index af332c7..83d9e27 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.16%{?dist}
+Release: %{upstream_rel_for_rpm}.17%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -125,12 +125,6 @@ Patch22: otp-0022-kernel-inet6_tcp_dist-reuse-inet_tcp_dist-code.patch
# Fedora specific patch
# epmd: support IPv6 node registration
Patch23: otp-0023-epmd-support-IPv6-node-registration.patch
-# Fedora specific patch
-# Remove unused code in error logger handlers
-Patch24: otp-0024-Remove-unused-code-in-error-logger-handlers.patch
-# Fedora specific patch
-# Teach sasl_report to limit crash reports
-Patch25: otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -1021,8 +1015,6 @@ Erlang mode for XEmacs (source lisp files).
%patch21 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
%patch22 -p1 -b .kernel_inet6_tcp_dist_reuse_inet_tcp_dist_code
%patch23 -p1 -b .epmd_support_IPv6_node_registration
-%patch24 -p1 -b .Remove_unused_code_in_error_logger_handlers
-%patch25 -p1 -b .Teach_sasl_report_to_limit_crash_reports
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2354,6 +2346,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Thu Apr 7 2016 John Eckersberg - R16B-03.17
+- Revert "Enable error_logger depth fine tuning" (rhbz#1324922)
+
* Sun Feb 28 2016 Peter Lemenkov - R16B-03.16
- Fixed issue with nodes registration over IPv6
diff --git a/otp-0024-Remove-unused-code-in-error-logger-handlers.patch b/otp-0024-Remove-unused-code-in-error-logger-handlers.patch
deleted file mode 100644
index a3ea0ac..0000000
--- a/otp-0024-Remove-unused-code-in-error-logger-handlers.patch
+++ /dev/null
@@ -1,1028 +0,0 @@
-From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
-Date: Thu, 20 Aug 2015 09:44:43 +0200
-Subject: [PATCH] Remove unused code in error logger handlers
-
-A long time ago, errors from the emulator itself was sent as
-messages that would end up in the handle_info/2 function.
-Those clauses in handle_info/2 can be removed.
-
-The code for handling events tagged 'info' instead of 'info_msg'
-can also be taken out.
-
-error_logger_file_h: Refactor and modernize code
-
-Refactor, simplify, and modernize the code to facilitate future
-improvements in the following commits.
-
-Teach error_logger_file_h to truncate big messages
-
-Add the possibility to truncate big messages to avoid running out
-of memory.
-
-error_logger_tty_h: Refactor and modernize code
-
-Refactor, simplify, and modernize the code to facilitate future
-improvements in the following commits.
-
-Teach error_logger_tty_h to truncate big messages
-
-Add the possibility to truncate big messages to avoid running out
-of memory.
-
-stdlib: Fix leaking files after error_logger:logfile(close)
-
-Introduced when changing state from tuple to record.
-
-Make the scanned form of the io_lib format strings available for processing
-
-This adds three new functions to io_lib - scan_format/2, unscan_format/1,
-and build_text/1 - which expose the parsed form of the format control
-sequences to make it possible to easily modify or filter the input to
-io_lib:format/2. This can e.g. be used in order to replace unbounded-size
-control sequences like ~w or ~p with corresponding depth-limited ~W and ~P
-before doing the actual formatting.
-
-diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
-index 90f24c4..6613dcd 100644
---- a/lib/stdlib/doc/src/io.xml
-+++ b/lib/stdlib/doc/src/io.xml
-@@ -505,7 +505,8 @@ ok
-
Writes the data with standard syntax in the same way as
- ~w, but breaks terms whose printed representation
- is longer than one line into many lines and indents each
-- line sensibly. It also tries to detect lists of
-+ line sensibly. Left justification is not supported.
-+ It also tries to detect lists of
- printable characters and to output these as strings. The
- Unicode translation modifier is used for determining
- what characters are printable. For example:
-diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
-index 68352ff..0c1c84d 100644
---- a/lib/stdlib/doc/src/io_lib.xml
-+++ b/lib/stdlib/doc/src/io_lib.xml
-@@ -4,7 +4,7 @@
-
-
-
-- 19962013
-+ 19962014
- Ericsson AB. All Rights Reserved.
-
-
-@@ -59,6 +59,35 @@
-
-
-
-+
-+
-+
Description:
-+
-+
control_char is the type of control
-+ sequence: $P, $w, and so on;
-+
-+
args is a list of the arguments used by the
-+ control sequence, or an empty list if the control sequence
-+ does not take any arguments;
-+
-+
width is the field width;
-+
-+
adjust is the adjustment;
-+
-+
precision is the precision of the printed
-+ argument;
-+
-+
pad_char is the padding character;
-+
-+
encoding is set to true if the translation
-+ modifier t is present;
-+
-+
strings is set to false if the modifier
-+ l is present.
-+
-+
-+
-+
-
-
-
-@@ -260,6 +289,45 @@
-
-
-
-+
-+ Parse all control sequences in the format string
-+
-+
Returns a list corresponding to the given format string,
-+ where control sequences have been replaced with
-+ corresponding tuples. This list can be passed to io_lib:build_text/1 to have
-+ the same effect as io_lib:format(Format, Args), or to
-+ io_lib:unscan_format/1
-+ in order to get the corresponding pair of Format and
-+ Args (with every * and corresponding argument
-+ expanded to numeric values).
-+
A typical use of this function is to replace unbounded-size
-+ control sequences like ~w and ~p with the
-+ depth-limited variants ~W and ~P before
-+ formatting to text, e.g. in a logger.
-+
-+
-+
-+
-+ Revert a pre-parsed format list to a plain character list
-+ and a list of arguments
-+
-+
See io_lib:scan_format/2 for
-+ details.
-+
-+
-+
-+
-+ Build the output text for a pre-parsed format list
-+
-+
See io_lib:scan_format/2 for
-+ details.
-+
-+
-+
-
- Indentation after printing string
-
-diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl
-index e9364ed..ca44d01 100644
---- a/lib/stdlib/src/error_logger_file_h.erl
-+++ b/lib/stdlib/src/error_logger_file_h.erl
-@@ -23,24 +23,28 @@
-
- %%%
- %%% A handler that can be connected to the error_logger
--%%% event handler.
--%%% Writes all events formatted to file.
--%%% Handles events tagged error, emulator and info.
-+%%% event handler. Writes all events formatted to file.
- %%%
- %%% It can only be started from error_logger:swap_handler({logfile, File})
--%%% or error_logger:logfile(File)
-+%%% or error_logger:logfile(File).
- %%%
-
- -export([init/1,
- handle_event/2, handle_call/2, handle_info/2,
- terminate/2, code_change/3]).
-
-+-record(st,
-+ {fd,
-+ filename,
-+ prev_handler,
-+ depth=unlimited :: 'unlimited' | non_neg_integer()}).
-+
- %% This one is used when we takeover from the simple error_logger.
- init({File, {error_logger, Buf}}) ->
- case init(File, error_logger) of
-- {ok, {Fd, File, PrevHandler}} ->
-- write_events(Fd, Buf),
-- {ok, {Fd, File, PrevHandler}};
-+ {ok, State} ->
-+ write_events(State, Buf),
-+ {ok, State};
- Error ->
- Error
- end;
-@@ -52,49 +56,45 @@ init(File, PrevHandler) ->
- process_flag(trap_exit, true),
- case file:open(File, [write]) of
- {ok,Fd} ->
-- {ok, {Fd, File, PrevHandler}};
-+ Depth = get_depth(),
-+ State = #st{fd=Fd,filename=File,prev_handler=PrevHandler,
-+ depth=Depth},
-+ {ok, State};
- Error ->
- Error
- end.
--
-+
-+get_depth() ->
-+ case application:get_env(kernel, error_logger_format_depth) of
-+ {ok, Depth} when is_integer(Depth) ->
-+ max(10, Depth);
-+ undefined ->
-+ unlimited
-+ end.
-+
- handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
- {ok, State};
--handle_event(Event, {Fd, File, PrevHandler}) ->
-- write_event(Fd, tag_event(Event)),
-- {ok, {Fd, File, PrevHandler}};
--handle_event(_, State) ->
-+handle_event(Event, State) ->
-+ write_event(State, Event),
- {ok, State}.
-
--handle_info({'EXIT', Fd, _Reason}, {Fd, _File, PrevHandler}) ->
-+handle_info({'EXIT', Fd, _Reason}, #st{fd=Fd,prev_handler=PrevHandler}) ->
- case PrevHandler of
- [] ->
- remove_handler;
- _ ->
- {swap_handler, install_prev, [], PrevHandler, go_back}
- end;
--handle_info({emulator, GL, Chars}, {Fd, File, PrevHandler})
-- when node(GL) == node() ->
-- write_event(Fd, tag_event({emulator, GL, Chars})),
-- {ok, {Fd, File, PrevHandler}};
--handle_info({emulator, noproc, Chars}, {Fd, File, PrevHandler}) ->
-- write_event(Fd, tag_event({emulator, noproc, Chars})),
-- {ok, {Fd, File, PrevHandler}};
- handle_info(_, State) ->
- {ok, State}.
-
--handle_call(filename, {Fd, File, Prev}) ->
-- {ok, File, {Fd, File, Prev}};
-+handle_call(filename, #st{filename=File}=State) ->
-+ {ok, File, State};
- handle_call(_Query, State) ->
- {ok, {error, bad_query}, State}.
-
--terminate(_Reason, State) ->
-- case State of
-- {Fd, _File, _Prev} ->
-- ok = file:close(Fd);
-- _ ->
-- ok
-- end,
-- [].
-+terminate(_Reason, #st{fd=Fd}) ->
-+ file:close(Fd).
-
- code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-@@ -103,69 +103,71 @@ code_change(_OldVsn, State, _Extra) ->
- %%% Misc. functions.
- %%% ------------------------------------------------------
-
--tag_event(Event) ->
-- {erlang:universaltime(), Event}.
-+write_events(State, [Ev|Es]) ->
-+ %% Write the events in reversed order.
-+ write_events(State, Es),
-+ write_event(State, Ev);
-+write_events(_State, []) ->
-+ ok.
-
--write_events(Fd, Events) -> write_events1(Fd, lists:reverse(Events)).
-+write_event(#st{fd=Fd}=State, Event) ->
-+ case parse_event(Event) of
-+ ignore ->
-+ ok;
-+ {Head,Pid,FormatList} ->
-+ Time = maybe_utc(erlang:universaltime()),
-+ Header = write_time(Time, Head),
-+ Body = format_body(State, FormatList),
-+ AtNode = if
-+ node(Pid) =/= node() ->
-+ ["** at node ",atom_to_list(node(Pid))," **\n"];
-+ true ->
-+ []
-+ end,
-+ io:put_chars(Fd, [Header,Body,AtNode])
-+ end.
-
--write_events1(Fd, [Event|Es]) ->
-- write_event(Fd, Event),
-- write_events1(Fd, Es);
--write_events1(_, []) ->
-- ok.
-+format_body(State, [{Format,Args}|T]) ->
-+ S = try format(State, Format, Args) of
-+ S0 ->
-+ S0
-+ catch
-+ _:_ ->
-+ format(State, "ERROR: ~p - ~p\n", [Format,Args])
-+ end,
-+ [S|format_body(State, T)];
-+format_body(_State, []) ->
-+ [].
-
--write_event(Fd, {Time, {error, _GL, {Pid, Format, Args}}}) ->
-- T = write_time(maybe_utc(Time)),
-- case catch io_lib:format(add_node(Format,Pid), Args) of
-- S when is_list(S) ->
-- io:format(Fd, T ++ S, []);
-- _ ->
-- F = add_node("ERROR: ~p - ~p~n", Pid),
-- io:format(Fd, T ++ F, [Format,Args])
-- end;
--write_event(Fd, {Time, {emulator, _GL, Chars}}) ->
-- T = write_time(maybe_utc(Time)),
-- case catch io_lib:format(Chars, []) of
-- S when is_list(S) ->
-- io:format(Fd, T ++ S, []);
-- _ ->
-- io:format(Fd, T ++ "ERROR: ~p ~n", [Chars])
-- end;
--write_event(Fd, {Time, {info, _GL, {Pid, Info, _}}}) ->
-- T = write_time(maybe_utc(Time)),
-- io:format(Fd, T ++ add_node("~p~n",Pid),[Info]);
--write_event(Fd, {Time, {error_report, _GL, {Pid, std_error, Rep}}}) ->
-- T = write_time(maybe_utc(Time)),
-- S = format_report(Rep),
-- io:format(Fd, T ++ S ++ add_node("", Pid), []);
--write_event(Fd, {Time, {info_report, _GL, {Pid, std_info, Rep}}}) ->
-- T = write_time(maybe_utc(Time), "INFO REPORT"),
-- S = format_report(Rep),
-- io:format(Fd, T ++ S ++ add_node("", Pid), []);
--write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
-- T = write_time(maybe_utc(Time), "INFO REPORT"),
-- case catch io_lib:format(add_node(Format,Pid), Args) of
-- S when is_list(S) ->
-- io:format(Fd, T ++ S, []);
-- _ ->
-- F = add_node("ERROR: ~p - ~p~n", Pid),
-- io:format(Fd, T ++ F, [Format,Args])
-- end;
--write_event(Fd, {Time, {warning_report, _GL, {Pid, std_warning, Rep}}}) ->
-- T = write_time(maybe_utc(Time), "WARNING REPORT"),
-- S = format_report(Rep),
-- io:format(Fd, T ++ S ++ add_node("", Pid), []);
--write_event(Fd, {Time, {warning_msg, _GL, {Pid, Format, Args}}}) ->
-- T = write_time(maybe_utc(Time), "WARNING REPORT"),
-- case catch io_lib:format(add_node(Format,Pid), Args) of
-- S when is_list(S) ->
-- io:format(Fd, T ++ S, []);
-- _ ->
-- F = add_node("ERROR: ~p - ~p~n", Pid),
-- io:format(Fd, T ++ F, [Format,Args])
-- end;
--write_event(_, _) ->
-- ok.
-+format(#st{depth=unlimited}, Format, Args) ->
-+ io_lib:format(Format, Args);
-+format(#st{depth=Depth}, Format0, Args) ->
-+ Format1 = io_lib:scan_format(Format0, Args),
-+ Format = limit_format(Format1, Depth),
-+ io_lib:build_text(Format).
-+
-+limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
-+ C0 =:= $w ->
-+ C = C0 - ($a - $A), %To uppercase.
-+ [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}||limit_format(T, Depth)];
-+limit_format([H|T], Depth) ->
-+ [H|limit_format(T, Depth)];
-+limit_format([], _) ->
-+ [].
-+
-+parse_event({error, _GL, {Pid, Format, Args}}) ->
-+ {"ERROR REPORT",Pid,[{Format,Args}]};
-+parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
-+ {"INFO REPORT",Pid,[{Format, Args}]};
-+parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
-+ {"WARNING REPORT",Pid,[{Format,Args}]};
-+parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
-+ {"ERROR REPORT",Pid,format_term(Args)};
-+parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
-+ {"INFO REPORT",Pid,format_term(Args)};
-+parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
-+ {"WARNING REPORT",Pid,format_term(Args)};
-+parse_event(_) -> ignore.
-
- maybe_utc(Time) ->
- UTC = case application:get_env(sasl, utc_log) of
-@@ -182,30 +184,27 @@ maybe_utc(Time) ->
- maybe_utc(Time, true) -> {utc, Time};
- maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
-
--format_report(Rep) when is_list(Rep) ->
-- case string_p(Rep) of
-+format_term(Term) when is_list(Term) ->
-+ case string_p(Term) of
- true ->
-- io_lib:format("~s~n",[Rep]);
-- _ ->
-- format_rep(Rep)
-+ [{"~s\n",[Term]}];
-+ false ->
-+ format_term_list(Term)
- end;
--format_report(Rep) ->
-- io_lib:format("~p~n",[Rep]).
--
--format_rep([{Tag,Data}|Rep]) ->
-- io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
--format_rep([Other|Rep]) ->
-- io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
--format_rep(_) ->
-+format_term(Term) ->
-+ [{"~p\n",[Term]}].
-+
-+format_term_list([{Tag,Data}|T]) ->
-+ [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
-+format_term_list([Data|T]) ->
-+ [{" ~p\n",[Data]}|format_term_list(T)];
-+format_term_list([]) ->
-+ [];
-+format_term_list(_) ->
-+ %% Continue to allow non-proper lists for now.
-+ %% FIXME: Remove this clause in OTP 19.
- [].
-
--add_node(X, Pid) when is_atom(X) ->
-- add_node(atom_to_list(X), Pid);
--add_node(X, Pid) when node(Pid) =/= node() ->
-- lists:concat([X,"** at node ",node(Pid)," **~n"]);
--add_node(X, _) ->
-- X.
--
- string_p([]) ->
- false;
- string_p(Term) ->
-@@ -221,15 +220,10 @@ string_p1([$\b|T]) -> string_p1(T);
- string_p1([$\f|T]) -> string_p1(T);
- string_p1([$\e|T]) -> string_p1(T);
- string_p1([H|T]) when is_list(H) ->
-- case string_p1(H) of
-- true -> string_p1(T);
-- _ -> false
-- end;
-+ string_p1(H) andalso string_p1(T);
- string_p1([]) -> true;
- string_p1(_) -> false.
-
--write_time(Time) -> write_time(Time, "ERROR REPORT").
--
- write_time({utc,{{Y,Mo,D},{H,Mi,S}}}, Type) ->
- io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
- [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
-diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl
-index ad5891f..72a052f 100644
---- a/lib/stdlib/src/error_logger_tty_h.erl
-+++ b/lib/stdlib/src/error_logger_tty_h.erl
-@@ -22,144 +22,178 @@
-
- %%%
- %%% A handler that can be connected to the error_logger
--%%% event handler.
--%%% Writes all events formatted to stdout.
--%%% Handles events tagged error, emulator and info.
-+%%% event handler. Writes all events formatted to stdout.
- %%%
- %%% It can only be started from error_logger:swap_handler(tty)
--%%% or error_logger:tty(true)
-+%%% or error_logger:tty(true).
- %%%
-
- -export([init/1,
- handle_event/2, handle_call/2, handle_info/2,
- terminate/2, code_change/3]).
-
---export([write_event/2]).
-+-export([write_event/2,write_event/3]).
-+
-+-record(st,
-+ {user,
-+ prev_handler,
-+ io_mod=io,
-+ depth=unlimited}).
-
- %% This one is used when we takeover from the simple error_logger.
- init({[], {error_logger, Buf}}) ->
- User = set_group_leader(),
-- write_events(Buf,io),
-- {ok, {User, error_logger}};
-+ Depth = get_depth(),
-+ State = #st{user=User,prev_handler=error_logger,depth=Depth},
-+ write_events(State, Buf),
-+ {ok, State};
- %% This one is used if someone took over from us, and now wants to
- %% go back.
- init({[], {error_logger_tty_h, PrevHandler}}) ->
- User = set_group_leader(),
-- {ok, {User, PrevHandler}};
-+ {ok, #st{user=User,prev_handler=PrevHandler}};
- %% This one is used when we are started directly.
- init([]) ->
- User = set_group_leader(),
-- {ok, {User, []}}.
-+ Depth = get_depth(),
-+ {ok, #st{user=User,prev_handler=[],depth=Depth}}.
-+
-+get_depth() ->
-+ case application:get_env(kernel, error_logger_format_depth) of
-+ {ok, Depth} when is_integer(Depth) ->
-+ max(10, Depth);
-+ undefined ->
-+ unlimited
-+ end.
-
- handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
- {ok, State};
- handle_event(Event, State) ->
-- write_event(tag_event(Event),io),
-+ ok = do_write_event(State, tag_event(Event)),
- {ok, State}.
-
--handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
-+handle_info({'EXIT', User, _Reason},
-+ #st{user=User,prev_handler=PrevHandler}=State) ->
- case PrevHandler of
- [] ->
- remove_handler;
- _ ->
-- {swap_handler, install_prev, {User, PrevHandler},
-+ {swap_handler, install_prev, State,
- PrevHandler, go_back}
- end;
--handle_info({emulator, GL, Chars}, State) when node(GL) == node() ->
-- write_event(tag_event({emulator, GL, Chars}),io),
-- {ok, State};
--handle_info({emulator, noproc, Chars}, State) ->
-- write_event(tag_event({emulator, noproc, Chars}),io),
-- {ok, State};
- handle_info(_, State) ->
- {ok, State}.
-
- handle_call(_Query, State) -> {ok, {error, bad_query}, State}.
-
--% unfortunately, we can't unlink from User - links are not counted!
--% if pid(User) -> unlink(User); true -> ok end,
- terminate(install_prev, _State) ->
- [];
--terminate(_Reason, {_User, PrevHandler}) ->
-+terminate(_Reason, #st{prev_handler=PrevHandler}) ->
- {error_logger_tty_h, PrevHandler}.
-
- code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-
-+%% Exported (but unoffical) API.
-+write_event(Event, IoMod) ->
-+ do_write_event(#st{io_mod=IoMod}, Event).
-+
-+write_event(Event, IoMod, Depth) ->
-+ do_write_event(#st{io_mod=IoMod,depth=Depth}, Event).
-+
-+
- %%% ------------------------------------------------------
- %%% Misc. functions.
- %%% ------------------------------------------------------
-
- set_group_leader() ->
- case whereis(user) of
-- User when is_pid(User) -> link(User), group_leader(User,self()), User;
-- _ -> false
-+ User when is_pid(User) ->
-+ link(User),
-+ group_leader(User,self()),
-+ User;
-+ _ ->
-+ false
- end.
-
- tag_event(Event) ->
- {erlang:universaltime(), Event}.
-
--write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod).
--
--write_events1([Event|Es],IOMod) ->
-- write_event(Event,IOMod),
-- write_events1(Es,IOMod);
--write_events1([],_IOMod) ->
-+write_events(State, [Ev|Es]) ->
-+ %% Write the events in reverse order.
-+ _ = write_events(State, Es),
-+ _ = do_write_event(State, Ev),
-+ ok;
-+write_events(_State, []) ->
- ok.
-
--write_event({Time, {error, _GL, {Pid, Format, Args}}},IOMod) ->
-- T = write_time(maybe_utc(Time)),
-- case catch io_lib:format(add_node(Format,Pid), Args) of
-- S when is_list(S) ->
-- format(IOMod, T ++ S);
-- _ ->
-- F = add_node("ERROR: ~p - ~p~n", Pid),
-- format(IOMod, T ++ F, [Format,Args])
-+do_write_event(State, {Time0, Event}) ->
-+ case parse_event(Event) of
-+ ignore ->
-+ ok;
-+ {Head,Pid,FormatList} ->
-+ Time = maybe_utc(Time0),
-+ Header = write_time(Time, Head),
-+ Body = format_body(State, FormatList),
-+ AtNode = if
-+ node(Pid) =/= node() ->
-+ ["** at node ",atom_to_list(node(Pid))," **\n"];
-+ true ->
-+ []
-+ end,
-+ Str = [Header,Body,AtNode],
-+ case State#st.io_mod of
-+ io_lib ->
-+ Str;
-+ io ->
-+ io:put_chars(user, Str)
-+ end
- end;
--write_event({Time, {emulator, _GL, Chars}},IOMod) ->
-- T = write_time(maybe_utc(Time)),
-- case catch io_lib:format(Chars, []) of
-- S when is_list(S) ->
-- format(IOMod, T ++ S);
-- _ ->
-- format(IOMod, T ++ "ERROR: ~p ~n", [Chars])
-- end;
--write_event({Time, {info, _GL, {Pid, Info, _}}},IOMod) ->
-- T = write_time(maybe_utc(Time)),
-- format(IOMod, T ++ add_node("~p~n",Pid),[Info]);
--write_event({Time, {error_report, _GL, {Pid, std_error, Rep}}},IOMod) ->
-- T = write_time(maybe_utc(Time)),
-- S = format_report(Rep),
-- format(IOMod, T ++ S ++ add_node("", Pid));
--write_event({Time, {info_report, _GL, {Pid, std_info, Rep}}},IOMod) ->
-- T = write_time(maybe_utc(Time), "INFO REPORT"),
-- S = format_report(Rep),
-- format(IOMod, T ++ S ++ add_node("", Pid));
--write_event({Time, {info_msg, _GL, {Pid, Format, Args}}},IOMod) ->
-- T = write_time(maybe_utc(Time), "INFO REPORT"),
-- case catch io_lib:format(add_node(Format,Pid), Args) of
-- S when is_list(S) ->
-- format(IOMod, T ++ S);
-- _ ->
-- F = add_node("ERROR: ~p - ~p~n", Pid),
-- format(IOMod, T ++ F, [Format,Args])
-- end;
--write_event({Time, {warning_report, _GL, {Pid, std_warning, Rep}}},IOMod) ->
-- T = write_time(maybe_utc(Time), "WARNING REPORT"),
-- S = format_report(Rep),
-- format(IOMod, T ++ S ++ add_node("", Pid));
--write_event({Time, {warning_msg, _GL, {Pid, Format, Args}}},IOMod) ->
-- T = write_time(maybe_utc(Time), "WARNING REPORT"),
-- case catch io_lib:format(add_node(Format,Pid), Args) of
-- S when is_list(S) ->
-- format(IOMod, T ++ S);
-- _ ->
-- F = add_node("ERROR: ~p - ~p~n", Pid),
-- format(IOMod, T ++ F, [Format,Args])
-- end;
--write_event({_Time, _Error},_IOMod) ->
-+do_write_event(_, _) ->
- ok.
-
-+format_body(State, [{Format,Args}|T]) ->
-+ S = try format(State, Format, Args) of
-+ S0 ->
-+ S0
-+ catch
-+ _:_ ->
-+ format(State, "ERROR: ~p - ~p\n", [Format,Args])
-+ end,
-+ [S|format_body(State, T)];
-+format_body(_State, []) ->
-+ [].
-+
-+format(#st{depth=unlimited}, Format, Args) ->
-+ io_lib:format(Format, Args);
-+format(#st{depth=Depth}, Format0, Args) ->
-+ Format1 = io_lib:scan_format(Format0, Args),
-+ Format = limit_format(Format1, Depth),
-+ io_lib:build_text(Format).
-+
-+limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
-+ C0 =:= $w ->
-+ C = C0 - ($a - $A), %To uppercase.
-+ [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}|limit_format(T, Depth)];
-+limit_format([H|T], Depth) ->
-+ [H|limit_format(T, Depth)];
-+limit_format([], _) ->
-+ [].
-+
-+parse_event({error, _GL, {Pid, Format, Args}}) ->
-+ {"ERROR REPORT",Pid,[{Format,Args}]};
-+parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
-+ {"INFO REPORT",Pid,[{Format, Args}]};
-+parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
-+ {"WARNING REPORT",Pid,[{Format,Args}]};
-+parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
-+ {"ERROR REPORT",Pid,format_term(Args)};
-+parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
-+ {"INFO REPORT",Pid,format_term(Args)};
-+parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
-+ {"WARNING REPORT",Pid,format_term(Args)};
-+parse_event(_) -> ignore.
-+
- maybe_utc(Time) ->
- UTC = case application:get_env(sasl, utc_log) of
- {ok, Val} -> Val;
-@@ -175,33 +209,26 @@ maybe_utc(Time) ->
- maybe_utc(Time, true) -> {utc, Time};
- maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
-
--format(IOMod, String) -> format(IOMod, String, []).
--format(io_lib, String, Args) -> io_lib:format(String, Args);
--format(io, String, Args) -> io:format(user, String, Args).
--
--format_report(Rep) when is_list(Rep) ->
-- case string_p(Rep) of
-+format_term(Term) when is_list(Term) ->
-+ case string_p(Term) of
- true ->
-- io_lib:format("~s~n",[Rep]);
-- _ ->
-- format_rep(Rep)
-+ [{"~s\n",[Term]}];
-+ false ->
-+ format_term_list(Term)
- end;
--format_report(Rep) ->
-- io_lib:format("~p~n",[Rep]).
--
--format_rep([{Tag,Data}|Rep]) ->
-- io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
--format_rep([Other|Rep]) ->
-- io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
--format_rep(_) ->
-- [].
-+format_term(Term) ->
-+ [{"~p\n",[Term]}].
-
--add_node(X, Pid) when is_atom(X) ->
-- add_node(atom_to_list(X), Pid);
--add_node(X, Pid) when node(Pid) =/= node() ->
-- lists:concat([X,"** at node ",node(Pid)," **~n"]);
--add_node(X, _) ->
-- X.
-+format_term_list([{Tag,Data}|T]) ->
-+ [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
-+format_term_list([Data|T]) ->
-+ [{" ~p\n",[Data]}|format_term_list(T)];
-+format_term_list([]) ->
-+ [];
-+format_term_list(_) ->
-+ %% Continue to allow non-proper lists for now.
-+ %% FIXME: Remove this clause in OTP 19.
-+ [].
-
- string_p([]) ->
- false;
-@@ -225,7 +252,6 @@ string_p1([H|T]) when is_list(H) ->
- string_p1([]) -> true;
- string_p1(_) -> false.
-
--write_time(Time) -> write_time(Time, "ERROR REPORT").
- write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) ->
- io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
- [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
-diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
-index 9e69601..3c173dc 100644
---- a/lib/stdlib/src/io_lib.erl
-+++ b/lib/stdlib/src/io_lib.erl
-@@ -2,7 +2,7 @@
- %%
- %% %CopyrightBegin%
- %%
--%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
-+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
- %%
- %% The contents of this file are subject to the Erlang Public License,
- %% Version 1.1, (the "License"); you may not use this file except in
-@@ -61,6 +61,7 @@
- -module(io_lib).
-
- -export([fwrite/2,fread/2,fread/3,format/2]).
-+-export([scan_format/2,unscan_format/1,build_text/1]).
- -export([print/1,print/4,indentation/2]).
-
- -export([write/1,write/2,write/3,nl/0,format_prompt/1,format_prompt/2]).
-@@ -84,7 +85,7 @@
- deep_unicode_char_list/1]).
-
- -export_type([chars/0, latin1_string/0, continuation/0,
-- fread_error/0, fread_item/0]).
-+ fread_error/0, fread_item/0, format_spec/0]).
-
- %%----------------------------------------------------------------------
-
-@@ -109,6 +110,18 @@
-
- -type fread_item() :: string() | atom() | integer() | float().
-
-+-type format_spec() ::
-+ {
-+ ControlChar :: char(),
-+ Args :: [any()],
-+ Width :: 'none' | integer(),
-+ Adjust :: 'left' | 'right',
-+ Precision :: 'none' | integer(),
-+ PadChar :: char(),
-+ Encoding :: 'unicode' | 'latin1',
-+ Strings :: boolean()
-+ }.
-+
- %%----------------------------------------------------------------------
-
- %% Interface calls to sub-modules.
-@@ -157,6 +170,31 @@ format(Format, Args) ->
- Other
- end.
-
-+-spec scan_format(Format, Data) -> FormatList when
-+ Format :: io:format(),
-+ Data :: [term()],
-+ FormatList :: [char() | format_spec()].
-+
-+scan_format(Format, Args) ->
-+ try io_lib_format:scan(Format, Args)
-+ catch
-+ _:_ -> erlang:error(badarg, [Format, Args])
-+ end.
-+
-+-spec unscan_format(FormatList) -> {Format, Data} when
-+ FormatList :: [char() | format_spec()],
-+ Format :: io:format(),
-+ Data :: [term()].
-+
-+unscan_format(FormatList) ->
-+ io_lib_format:unscan(FormatList).
-+
-+-spec build_text(FormatList) -> chars() when
-+ FormatList :: [char() | format_spec()].
-+
-+build_text(FormatList) ->
-+ io_lib_format:build(FormatList).
-+
- -spec print(Term) -> chars() when
- Term :: term().
-
-diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl
-index 56e15a1..37b47d7 100644
---- a/lib/stdlib/src/io_lib_format.erl
-+++ b/lib/stdlib/src/io_lib_format.erl
-@@ -1,7 +1,7 @@
- %%
- %% %CopyrightBegin%
- %%
--%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
-+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
- %%
- %% The contents of this file are subject to the Erlang Public License,
- %% Version 1.1, (the "License"); you may not use this file except in
-@@ -20,10 +20,9 @@
-
- %% Formatting functions of io library.
-
---export([fwrite/2,fwrite_g/1,indentation/2]).
-+-export([fwrite/2,fwrite_g/1,indentation/2,scan/2,unscan/1,build/1]).
-
--%% fwrite(Format, ArgList) -> string().
--%% Format the arguments in ArgList after string Format. Just generate
-+%% Format the arguments in Args after string Format. Just generate
- %% an error if there is an error in the arguments.
- %%
- %% To do the printing command correctly we need to calculate the
-@@ -37,15 +36,83 @@
- %% and it also splits the handling of the control characters into two
- %% parts.
-
--fwrite(Format, Args) when is_atom(Format) ->
-- fwrite(atom_to_list(Format), Args);
--fwrite(Format, Args) when is_binary(Format) ->
-- fwrite(binary_to_list(Format), Args);
-+-spec fwrite(Format, Data) -> FormatList when
-+ Format :: io:format(),
-+ Data :: [term()],
-+ FormatList :: [char() | io_lib:format_spec()].
-+
- fwrite(Format, Args) ->
-- Cs = collect(Format, Args),
-+ build(scan(Format, Args)).
-+
-+%% Build the output text for a pre-parsed format list.
-+
-+-spec build(FormatList) -> io_lib:chars() when
-+ FormatList :: [char() | io_lib:format_spec()].
-+
-+build(Cs) ->
- Pc = pcount(Cs),
- build(Cs, Pc, 0).
-
-+%% Parse all control sequences in the format string.
-+
-+-spec scan(Format, Data) -> FormatList when
-+ Format :: io:format(),
-+ Data :: [term()],
-+ FormatList :: [char() | io_lib:format_spec()].
-+
-+scan(Format, Args) when is_atom(Format) ->
-+ scan(atom_to_list(Format), Args);
-+scan(Format, Args) when is_binary(Format) ->
-+ scan(binary_to_list(Format), Args);
-+scan(Format, Args) ->
-+ collect(Format, Args).
-+
-+%% Revert a pre-parsed format list to a plain character list and a
-+%% list of arguments.
-+
-+-spec unscan(FormatList) -> {Format, Data} when
-+ FormatList :: [char() | io_lib:format_spec()],
-+ Format :: io:format(),
-+ Data :: [term()].
-+
-+unscan(Cs) ->
-+ {print(Cs), args(Cs)}.
-+
-+args([{_C,As,_F,_Ad,_P,_Pad,_Enc,_Str} | Cs]) ->
-+ As ++ args(Cs);
-+args([_C | Cs]) ->
-+ args(Cs);
-+args([]) ->
-+ [].
-+
-+print([{C,_As,F,Ad,P,Pad,Enc,Str} | Cs ]) ->
-+ print(C, F, Ad, P, Pad, Enc, Str) ++ print(Cs);
-+print([C | Cs]) ->
-+ [C | print(Cs)];
-+print([]) ->
-+ [].
-+
-+print(C, F, Ad, P, Pad, Encoding, Strings) ->
-+ [$~] ++ print_field_width(F, Ad) ++ print_precision(P) ++
-+ print_pad_char(Pad) ++ print_encoding(Encoding) ++
-+ print_strings(Strings) ++ [C].
-+
-+print_field_width(none, _Ad) -> "";
-+print_field_width(F, left) -> integer_to_list(-F);
-+print_field_width(F, right) -> integer_to_list(F).
-+
-+print_precision(none) -> "";
-+print_precision(P) -> [$. | integer_to_list(P)].
-+
-+print_pad_char($\s) -> ""; % default, no need to make explicit
-+print_pad_char(Pad) -> [$., Pad].
-+
-+print_encoding(unicode) -> "t";
-+print_encoding(latin1) -> "".
-+
-+print_strings(false) -> "l";
-+print_strings(true) -> "".
-+
- collect([$~|Fmt0], Args0) ->
- {C,Fmt1,Args1} = collect_cseq(Fmt0, Args0),
- [C|collect(Fmt1, Args1)];
-@@ -141,7 +208,7 @@ pcount([{$P,_As,_F,_Ad,_P,_Pad,_Enc,_Str}|Cs], Acc) -> pcount(Cs, Acc+1);
- pcount([_|Cs], Acc) -> pcount(Cs, Acc);
- pcount([], Acc) -> Acc.
-
--%% build([Control], Pc, Indentation) -> string().
-+%% build([Control], Pc, Indentation) -> io_lib:chars().
- %% Interpret the control structures. Count the number of print
- %% remaining and only calculate indentation when necessary. Must also
- %% be smart when calculating indentation for characters in format.
-@@ -162,10 +229,14 @@ decr_pc($p, Pc) -> Pc - 1;
- decr_pc($P, Pc) -> Pc - 1;
- decr_pc(_, Pc) -> Pc.
-
--%% indentation(String, Indentation) -> Indentation.
-+
- %% Calculate the indentation of the end of a string given its start
- %% indentation. We assume tabs at 8 cols.
-
-+-spec indentation(String, StartIndent) -> integer() when
-+ String :: io_lib:chars(),
-+ StartIndent :: integer().
-+
- indentation([$\n|Cs], _I) -> indentation(Cs, 0);
- indentation([$\t|Cs], I) -> indentation(Cs, ((I + 8) div 8) * 8);
- indentation([C|Cs], I) when is_integer(C) ->
-@@ -366,7 +437,6 @@ float_data([D|Cs], Ds) when D >= $0, D =< $9 ->
- float_data([_|Cs], Ds) ->
- float_data(Cs, Ds).
-
--%% fwrite_g(Float)
- %% Writes the shortest, correctly rounded string that converts
- %% to Float when read back with list_to_float/1.
- %%
-@@ -374,6 +444,8 @@ float_data([_|Cs], Ds) ->
- %% in Proceedings of the SIGPLAN '96 Conference on Programming
- %% Language Design and Implementation.
-
-+-spec fwrite_g(float()) -> string().
-+
- fwrite_g(0.0) ->
- "0.0";
- fwrite_g(Float) when is_float(Float) ->
-@@ -642,7 +714,7 @@ prefixed_integer(Int, F, Adj, Base, Pad, Prefix, Lowercase)
- term([Prefix|S], F, Adj, none, Pad)
- end.
-
--%% char(Char, Field, Adjust, Precision, PadChar) -> string().
-+%% char(Char, Field, Adjust, Precision, PadChar) -> chars().
-
- char(C, none, _Adj, none, _Pad) -> [C];
- char(C, F, _Adj, none, _Pad) -> chars(C, F);
diff --git a/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch b/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
deleted file mode 100644
index e9e6450..0000000
--- a/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
-Date: Tue, 25 Aug 2015 15:20:23 +0200
-Subject: [PATCH] Teach sasl_report to limit crash reports
-
-
-diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl
-index c3e6fed..aa84e4f 100644
---- a/lib/sasl/src/sasl_report.erl
-+++ b/lib/sasl/src/sasl_report.erl
-@@ -61,27 +61,53 @@ write_report2(IO, Fd, Head, supervisor_report, Report) ->
- Context = sup_get(errorContext, Report),
- Reason = sup_get(reason, Report),
- Offender = sup_get(offender, Report),
-- FmtString = " Supervisor: ~p~n Context: ~p~n Reason: "
-- "~80.18p~n Offender: ~80.18p~n~n",
-- write_report_action(IO, Fd, Head ++ FmtString,
-- [Name,Context,Reason,Offender]);
-+ {FmtString,Args} = supervisor_format([Name,Context,Reason,Offender]),
-+ write_report_action(IO, Fd, Head, FmtString, Args);
- write_report2(IO, Fd, Head, progress, Report) ->
- Format = format_key_val(Report),
-- write_report_action(IO, Fd, Head ++ "~s", [Format]);
-+ write_report_action(IO, Fd, Head, "~s", [Format]);
- write_report2(IO, Fd, Head, crash_report, Report) ->
-- Format = proc_lib:format(Report),
-- write_report_action(IO, Fd, Head ++ "~s", [Format]).
-+ Depth = get_depth(),
-+ Format = proc_lib:format(Report, latin1, Depth),
-+ write_report_action(IO, Fd, Head, "~s", [Format]).
-+
-+supervisor_format(Args0) ->
-+ case get_depth() of
-+ unlimited ->
-+ {" Supervisor: ~p~n"
-+ " Context: ~p~n"
-+ " Reason: ~80.18p~n"
-+ " Offender: ~80.18p~n~n",
-+ Args0};
-+ Depth ->
-+ [A,B,C,D] = Args0,
-+ Args = [A,Depth,B,Depth,C,Depth,D,Depth],
-+ {" Supervisor: ~P~n"
-+ " Context: ~P~n"
-+ " Reason: ~80.18P~n"
-+ " Offender: ~80.18P~n~n",
-+ Args}
-+ end.
-
--write_report_action(io, Fd, Format, Args) ->
-- io:format(Fd, Format, Args);
--write_report_action(io_lib, _Fd, Format, Args) ->
-- io_lib:format(Format, Args).
-+write_report_action(IO, Fd, Head, Format, Args) ->
-+ S = [Head|io_lib:format(Format, Args)],
-+ case IO of
-+ io -> io:put_chars(Fd, S);
-+ io_lib -> S
-+ end.
-
- format_key_val([{Tag,Data}|Rep]) ->
- io_lib:format(" ~16w: ~p~n",[Tag,Data]) ++ format_key_val(Rep);
- format_key_val(_) ->
- [].
-
-+get_depth() ->
-+ case application:get_env(kernel, error_logger_format_depth) of
-+ {ok, Depth} when is_integer(Depth) ->
-+ max(10, Depth);
-+ undefined ->
-+ unlimited
-+ end.
-
- sup_get(Tag, Report) ->
- case lists:keysearch(Tag, 1, Report) of
From 835935939d225f717aedd434f058696066fc1445 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Mon, 11 Apr 2016 10:27:19 +0300
Subject: [PATCH 047/305] Enable selective building
Signed-off-by: Peter Lemenkov
---
erlang.spec | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 225 insertions(+), 7 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 49ad40b..de69c4d 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -14,9 +14,62 @@
%global __with_hipe 1
%endif
+##
+## Optional components
+##
+
+%global __with_emacs 1
+%global __with_examples 1
+%global __with_java 1
+%global __with_tcltk 1
+#
+# wxWidgets plugin blocks the following ones:
+#
+# * debugger - https://bugzilla.redhat.com/1095715
+# * dialyzer - https://bugzilla.redhat.com/1095717
+# * et - https://bugzilla.redhat.com/1095718
+# * observer - https://bugzilla.redhat.com/1095721
+# * reltool - https://bugzilla.redhat.com/1095727
+#
+# debugger blocks:
+#
+# * common_test
+# * megaco
+#
+# dialyzer blocks:
+#
+# * typer
+#
+# et blocks:
+#
+# * megaco
+#
+# observer blocks:
+#
+# * common_test
+# * test_server
+# * webtool
+#
+# So finally we have to disable the following plugins:
+#
+# common_test
+# debugger
+# dialyzer
+# et
+# megaco
+# observer
+# reltool (*)
+# test_server
+# typer
+# webtool
+# wx
+#
+%global __with_wxwidgets 1
+
+
Name: erlang
Version: 18.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -89,6 +142,7 @@ BuildRequires: erlang
%if 0%{?el7}%{?fedora}
# for
BuildRequires: systemd-devel
+BuildRequires: systemd
Requires(post): systemd
Requires(preun):systemd
Requires(postun):systemd
@@ -96,10 +150,12 @@ Requires: systemd
%endif
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: erlang-rpm-macros
+#BuildRequires: erlang-rpm-macros
Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-common_test%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-cosEvent%{?_isa} = %{version}-%{release}
Requires: %{name}-cosEventDomain%{?_isa} = %{version}-%{release}
@@ -109,25 +165,41 @@ Requires: %{name}-cosProperty%{?_isa} = %{version}-%{release}
Requires: %{name}-cosTime%{?_isa} = %{version}-%{release}
Requires: %{name}-cosTransactions%{?_isa} = %{version}-%{release}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-debugger%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
Requires: %{name}-dialyzer%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-diameter%{?_isa} = %{version}-%{release}
Requires: %{name}-edoc%{?_isa} = %{version}-%{release}
Requires: %{name}-eldap%{?_isa} = %{version}-%{release}
Requires: %{name}-erl_docgen%{?_isa} = %{version}-%{release}
Requires: %{name}-erl_interface%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-et%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-eunit%{?_isa} = %{version}-%{release}
+%if %{__with_tcltk}
Requires: %{name}-gs%{?_isa} = %{version}-%{release}
+%endif %{__with_tcltk}
Requires: %{name}-hipe%{?_isa} = %{version}-%{release}
+%if %{__with_java}
Requires: %{name}-ic%{?_isa} = %{version}-%{release}
+%endif %{__with_java}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
+%if %{__with_java}
Requires: %{name}-jinterface%{?_isa} = %{version}-%{release}
+%endif %{__with_java}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-megaco%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-mnesia%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-observer%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-odbc%{?_isa} = %{version}-%{release}
Requires: %{name}-orber%{?_isa} = %{version}-%{release}
Requires: %{name}-os_mon%{?_isa} = %{version}-%{release}
@@ -136,7 +208,9 @@ Requires: %{name}-otp_mibs%{?_isa} = %{version}-%{release}
Requires: %{name}-parsetools%{?_isa} = %{version}-%{release}
Requires: %{name}-percept%{?_isa} = %{version}-%{release}
Requires: %{name}-public_key%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-reltool%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
Requires: %{name}-snmp%{?_isa} = %{version}-%{release}
@@ -144,11 +218,19 @@ Requires: %{name}-ssh%{?_isa} = %{version}-%{release}
Requires: %{name}-ssl%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-test_server%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
+%if %{__with_wxwidgets}
Requires: %{name}-typer%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
Requires: %{name}-webtool%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
Requires: %{name}-wx%{?_isa} = %{version}-%{release}
+%endif %{__with_wxwidgets}
Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
%description
@@ -159,6 +241,7 @@ systems from Ericsson.
### BEGIN OF AUTOGENERATED LIST ###
+%if %{__with_emacs}
%package -n emacs-erlang
Summary: Compiled elisp files for erlang-mode under GNU Emacs
Group: Applications/Editors
@@ -179,6 +262,7 @@ BuildArch: noarch
%description -n emacs-erlang-el
Erlang mode for GNU Emacs (source lisp files).
+%endif %{__with_emacs}
%package asn1
Summary: Provides support for Abstract Syntax Notation One
@@ -190,6 +274,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description asn1
Provides support for Abstract Syntax Notation One.
+%if %{__with_wxwidgets}
%package common_test
Summary: A portable framework for automatic testing
Group: Development/Languages
@@ -211,6 +296,7 @@ Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
%description common_test
A portable framework for automatic testing.
+%endif %{__with_wxwidgets}
%package compiler
Summary: A byte code compiler for Erlang which produces highly compact code
@@ -320,6 +406,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description crypto
Cryptographical support.
+%if %{__with_wxwidgets}
%package debugger
Summary: A debugger for debugging and testing of Erlang programs
Group: Development/Languages
@@ -331,7 +418,9 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release}
%description debugger
A debugger for debugging and testing of Erlang programs.
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
%package dialyzer
Summary: A DIscrepancy AnaLYZer for ERlang programs
Group: Development/Languages
@@ -346,6 +435,7 @@ Requires: graphviz
%description dialyzer
A DIscrepancy AnaLYZer for ERlang programs.
+%endif %{__with_wxwidgets}
%package diameter
Summary: Diameter (RFC 3588) library
@@ -446,6 +536,7 @@ Obsoletes: erlang-tv
%description erts
Functionality necessary to run the Erlang System itself.
+%if %{__with_wxwidgets}
%package et
Summary: An event tracer for Erlang programs
Group: Development/Languages
@@ -457,6 +548,7 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release}
%description et
An event tracer for Erlang programs.
+%endif %{__with_wxwidgets}
%package eunit
Summary: Support for unit testing
@@ -468,11 +560,14 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description eunit
Support for unit testing.
+%if %{__with_examples}
%package examples
Summary: Examples for some Erlang modules
Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
+%if %{__with_tcltk}
Requires: %{name}-gs%{?_isa} = %{version}-%{release}
+%endif %{__with_tcltk}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-public_key%{?_isa} = %{version}-%{release}
Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
@@ -481,7 +576,9 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description examples
Examples for some Erlang modules.
+%endif %{__with_examples}
+%if %{__with_tcltk}
%package gs
Summary: A library for Tcl/Tk support in Erlang
Group: Development/Languages
@@ -494,6 +591,7 @@ Requires: tk
%description gs
A Graphics System used to write platform independent user interfaces.
+%endif %{__with_tcltk}
%package hipe
Summary: High Performance Erlang
@@ -510,7 +608,9 @@ High Performance Erlang.
%package ic
Summary: IDL compiler
Group: Development/Languages
+%if %{__with_java}
BuildRequires: java-devel
+%endif %{__with_java}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
@@ -531,6 +631,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description inets
A set of services such as a Web server and a ftp client etc.
+%if %{__with_java}
%package jinterface
Summary: A library for accessing Java from Erlang
Group: Development/Languages
@@ -539,6 +640,7 @@ Requires: %{name}-erts%{?_isa} = %{version}-%{release}
%description jinterface
Low level interface to Java.
+%endif %{__with_java}
%package kernel
Summary: Main erlang library
@@ -549,6 +651,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description kernel
Main erlang library.
+%if %{__with_wxwidgets}
%package megaco
Summary: Megaco/H.248 support library
Group: Development/Languages
@@ -564,6 +667,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Megaco/H.248 is a protocol for control of elements in a physically
decomposed multimedia gateway, enabling separation of call control
from media conversion.
+%endif %{__with_wxwidgets}
%package mnesia
Summary: A heavy duty real-time distributed database
@@ -575,6 +679,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description mnesia
A heavy duty real-time distributed database.
+%if %{__with_wxwidgets}
%package observer
Summary: A set of tools for tracing and investigation of distributed systems
Group: Development/Languages
@@ -588,6 +693,7 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release}
%description observer
A set of tools for tracing and investigation of distributed systems.
+%endif %{__with_wxwidgets}
%package odbc
Summary: A library for unixODBC support in Erlang
@@ -683,6 +789,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description public_key
API to public key infrastructure.
+%if %{__with_wxwidgets}
%package reltool
Summary: A release management tool
Group: Development/Languages
@@ -700,6 +807,7 @@ between applications. The graphical frontend depicts the
dependencies and enables interactive customization of a
target system. The backend provides a batch interface
for generation of customized target systems.
+%endif %{__with_wxwidgets}
%package runtime_tools
Summary: A set of tools to include in a production system
@@ -786,6 +894,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A utility used to handle abstract Erlang syntax trees,
reading source files differently, pretty-printing syntax trees.
+%if %{__with_wxwidgets}
%package test_server
Summary: The OTP Test Server
Group: Development/Languages
@@ -800,6 +909,7 @@ Requires: %{name}-tools%{?_isa} = %{version}-%{release}
%description test_server
The OTP Test Server.
+%endif %{__with_wxwidgets}
%package tools
Summary: A set of programming tools including a coverage analyzer etc
@@ -816,11 +926,14 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
Suggests: %{name}-webtool%{?_isa} = %{version}-%{release}
%endif
+%if %{__with_emacs}
Provides: emacs-common-erlang = %{version}-%{release}
+%endif %{__with_emacs}
%description tools
A set of programming tools including a coverage analyzer etc.
+%if %{__with_wxwidgets}
%package typer
Summary: TYPe annotator for ERlang programs
Group: Development/Languages
@@ -833,7 +946,9 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description typer
TYPe annotator for ERlang programs.
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
%package webtool
Summary: A tool that simplifying the use of web based Erlang tools
Group: Development/Languages
@@ -845,7 +960,9 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description webtool
A tool that simplifying the use of web based Erlang tools.
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
%package wx
Summary: A library for wxWidgets support in Erlang
Group: Development/Languages
@@ -858,6 +975,7 @@ Requires: mesa-libGLU
%description wx
A Graphics System used to write platform independent user interfaces.
+%endif %{__with_wxwidgets}
%package xmerl
Summary: Provides support for XML 1.0
@@ -869,6 +987,7 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description xmerl
Provides support for XML 1.0.
+%if %{__with_emacs}
%package -n xemacs-erlang
Summary: Compiled elisp files for erlang-mode under XEmacs
Group: Applications/Editors
@@ -889,6 +1008,7 @@ BuildArch: noarch
%description -n xemacs-erlang-el
Erlang mode for XEmacs (source lisp files).
+%endif %{__with_emacs}
### END OF AUTOGENERATED LIST ###
@@ -924,11 +1044,38 @@ ERL_FLAGS="${RPM_OPT_FLAGS} -mcpu=ultrasparc -fno-strict-aliasing"
ERL_FLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
%endif
-CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe} --with-wx-config=/usr/bin/wx-config-3.0
+CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --enable-sctp --enable-systemd \
+ %{?__with_hipe:--enable-hipe} \
+%if %{__with_java}
+ \
+%else
+ --without-jinterface \
+%endif %{__with_java}
+%if %{__with_tcltk}
+ \
+%else
+ --without-gs \
+%endif %{__with_tcltk}
+%if %{__with_wxwidgets}
+ --with-wx-config=/usr/bin/wx-config-3.0
+%else
+ --without-common_test \
+ --without-debugger \
+ --without-dialyzer \
+ --without-et \
+ --without-megaco \
+ --without-observer \
+ --without-reltool \
+ --without-test_server \
+ --without-typer \
+ --without-webtool \
+ --without-wx
+%endif %{__with_wxwidgets}
# Remove pre-built BEAM files
make clean
+%if %{__with_emacs}
# GNU Emacs/XEmacs related stuff
erlang_tools_vsn="$(sed -n 's/TOOLS_VSN = //p' lib/tools/vsn.mk)"
@@ -958,6 +1105,7 @@ rm -f xemacs-erlang/erlang-flymake.el
pushd xemacs-erlang
%{_xemacs_bytecompile} *.el
popd
+%endif %{__with_emacs}
make
@@ -973,6 +1121,7 @@ make docs
%install
+%if %{__with_emacs}
# GNU Emacs/XEmacs related stuff
erlang_tools_vsn="$(sed -n 's/TOOLS_VSN = //p' lib/tools/vsn.mk)"
@@ -998,6 +1147,7 @@ for f in lib/tools/emacs/{README,*.el}; do
done
rm -f "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/erlang-flymake.el"
install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/"
+%endif %{__with_emacs}
make DESTDIR=$RPM_BUILD_ROOT install
@@ -1008,9 +1158,15 @@ env ERL_LIBS="$RPM_BUILD_ROOT%{_libdir}/erlang/lib" make DESTDIR=$RPM_BUILD_ROOT
# Do not install info files - they are almost empty and useless
find $RPM_BUILD_ROOT%{_libdir}/erlang -type f -name info -exec rm -f {} \;
+%if %{__with_examples}
# fix 0775 permission on some directories
find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ssl-*/examples/ -type d -perm 0775 | xargs chmod 755
find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/kernel-*/examples/uds_dist -type d -perm 0775 | xargs chmod 755
+%else
+# Remove all examples
+find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ -mindepth 1 -maxdepth 2 -type d -name examples -exec rm -rf {} \;
+%endif %{__with_examples}
+
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/erlang/bin
# Relocate doc-files into the proper directory
@@ -1060,6 +1216,7 @@ do
fi
done
+%if %{__with_java}
# symlink *.jar files to appropriate places for subpackages
install -m 0755 -d "$RPM_BUILD_ROOT%{_javadir}/%{name}"
@@ -1072,6 +1229,7 @@ ln -s "${ic_lib_dir}priv/ic.jar" "$RPM_BUILD_ROOT%{_javadir}/%{name}/"
jinterface_lib_dir="$(ls -d1 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/jinterface-*/ | sed "s,^$RPM_BUILD_ROOT,,")"
test -d "$RPM_BUILD_ROOT$jinterface_lib_dir"
ln -s "${jinterface_lib_dir}priv/OtpErlang.jar" "$RPM_BUILD_ROOT%{_javadir}/%{name}/"
+%endif %{__with_java}
# systemd-related stuff
%if 0%{?el7}%{?fedora}
@@ -1082,6 +1240,19 @@ install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/epmd@.socket
%endif
+%if %{__with_wxwidgets}
+echo "No need to fix additional scripts"
+%else
+# FIXME workaround for broken Erlang install procedure
+for exe in ct_run dialyzer typer
+do
+ rm -f $RPM_BUILD_ROOT/%{_bindir}/${exe}
+ rm -f $RPM_BUILD_ROOT/%{_libdir}/erlang/bin/${exe}
+ rm -f $RPM_BUILD_ROOT/%{_libdir}/erlang/erts-*/bin/${exe}
+done
+%endif %{__with_wxwidgets}
+
+
%check
# FIXME run tests somehow
# make tests || exit 0
@@ -1115,10 +1286,14 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/asn1rt.*
%endif
+%if %{__with_wxwidgets}
%files common_test
%{_bindir}/ct_run
+%{_libdir}/erlang/bin/ct_run
+%{_libdir}/erlang/erts-*/bin/ct_run
%{_libdir}/erlang/lib/common_test-*/
%if %{with doc}
+%{_libdir}/erlang/man/man1/ct_run.*
%{_libdir}/erlang/man/man3/ct.*
%{_libdir}/erlang/man/man3/ct_cover.*
%{_libdir}/erlang/man/man3/ct_ftp.*
@@ -1134,6 +1309,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/unix_telnet.*
%{_libdir}/erlang/man/man6/common_test.*
%endif
+%endif %{__with_wxwidgets}
%files compiler
%{_libdir}/erlang/lib/compiler-*/
@@ -1266,6 +1442,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man6/crypto.*
%endif
+%if %{__with_wxwidgets}
%files debugger
%{_libdir}/erlang/lib/debugger-*/
%if %{with doc}
@@ -1273,7 +1450,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/i.*
%{_libdir}/erlang/man/man3/int.*
%endif
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
%files dialyzer
%{_bindir}/dialyzer
%{_libdir}/erlang/bin/dialyzer
@@ -1282,6 +1461,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%if %{with doc}
%{_libdir}/erlang/man/man3/dialyzer.*
%endif
+%endif %{__with_wxwidgets}
%files diameter
%dir %{_libdir}/erlang/lib/diameter-*/
@@ -1370,7 +1550,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_bindir}/escript
%{_bindir}/run_erl
%{_bindir}/to_erl
-%{_libdir}/erlang/bin/ct_run
%{_libdir}/erlang/bin/epmd
%{_libdir}/erlang/bin/erl
%{_libdir}/erlang/bin/erlc
@@ -1389,7 +1568,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/erts-*/bin/beam
%{_libdir}/erlang/erts-*/bin/beam.smp
%{_libdir}/erlang/erts-*/bin/child_setup
-%{_libdir}/erlang/erts-*/bin/ct_run
%{_libdir}/erlang/erts-*/bin/dyn_erl
%{_libdir}/erlang/erts-*/bin/epmd
%{_libdir}/erlang/erts-*/bin/erl
@@ -1409,7 +1587,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/erts-*/src/
%{_libdir}/erlang/lib/erts-*/
%if %{with doc}
-%{_libdir}/erlang/man/man1/ct_run.*
%{_libdir}/erlang/man/man1/epmd.*
%{_libdir}/erlang/man/man1/erl.*
%{_libdir}/erlang/man/man1/erlc.*
@@ -1435,6 +1612,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_unitdir}/epmd@.socket
%endif
+%if %{__with_wxwidgets}
%files et
%dir %{_libdir}/erlang/lib/et-*/
%{_libdir}/erlang/lib/et-*/ebin
@@ -1446,6 +1624,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/et_selector.*
%{_libdir}/erlang/man/man3/et_viewer.*
%endif
+%endif %{__with_wxwidgets}
%files eunit
%dir %{_libdir}/erlang/lib/eunit-*/
@@ -1457,20 +1636,31 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/eunit_surefire.*
%endif
+%if %{__with_examples}
%files examples
%{_libdir}/erlang/lib/asn1-*/examples/
%{_libdir}/erlang/lib/diameter-*/examples/
+%if %{__with_wxwidgets}
%{_libdir}/erlang/lib/et-*/examples/
+%endif %{__with_wxwidgets}
%{_libdir}/erlang/lib/eunit-*/examples/
+%if %{__with_tcltk}
%{_libdir}/erlang/lib/gs-*/examples/
+%endif %{__with_tcltk}
+%if %{__with_java}
%{_libdir}/erlang/lib/ic-*/examples/
+%endif %{__with_java}
%{_libdir}/erlang/lib/inets-*/examples/
%{_libdir}/erlang/lib/kernel-*/examples/
%{_libdir}/erlang/lib/megaco-*/examples/
%{_libdir}/erlang/lib/mnesia-*/examples/
+%if %{__with_wxwidgets}
%{_libdir}/erlang/lib/observer-*/examples/
+%endif %{__with_wxwidgets}
%{_libdir}/erlang/lib/orber-*/examples/
+%if %{__with_wxwidgets}
%{_libdir}/erlang/lib/reltool-*/examples/
+%endif %{__with_wxwidgets}
%{_libdir}/erlang/lib/runtime_tools-*/examples/
%{_libdir}/erlang/lib/sasl-*/examples/
%{_libdir}/erlang/lib/snmp-*/examples/
@@ -1478,8 +1668,12 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/stdlib-*/examples/
%{_libdir}/erlang/lib/syntax_tools-*/examples/
%{_libdir}/erlang/lib/tools-*/examples/
+%if %{__with_wxwidgets}
%{_libdir}/erlang/lib/wx-*/examples/
+%endif %{__with_wxwidgets}
+%endif %{__with_examples}
+%if %{__with_tcltk}
%files gs
%dir %{_libdir}/erlang/lib/gs-*/
%{_libdir}/erlang/lib/gs-*/contribs
@@ -1489,6 +1683,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%if %{with doc}
%{_libdir}/erlang/man/man3/gs.*
%endif
+%endif %{__with_tcltk}
%files hipe
%{_libdir}/erlang/lib/hipe-*/
@@ -1501,7 +1696,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/ic-*/src
# FIXME see erlang-jinterface also
#%dir %{_javadir}/%{name}/
+%if %{__with_java}
%{_javadir}/%{name}/ic.jar
+%endif %{__with_java}
%if %{with doc}
%{_libdir}/erlang/man/man3/ic.*
%{_libdir}/erlang/man/man3/ic_clib.*
@@ -1530,11 +1727,13 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/tftp.*
%endif
+%if %{__with_java}
%files jinterface
# FIXME see erlang-ic also
#%dir %{_javadir}/%{name}/
%{_javadir}/%{name}/OtpErlang.jar
%{_libdir}/erlang/lib/jinterface-*/
+%endif %{__with_java}
%files kernel
%dir %{_libdir}/erlang/lib/kernel-*/
@@ -1576,6 +1775,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man6/kernel.*
%endif
+%if %{__with_wxwidgets}
%files megaco
%dir %{_libdir}/erlang/lib/megaco-*/
%{_libdir}/erlang/lib/megaco-*/ebin
@@ -1596,6 +1796,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/megaco_udp.*
%{_libdir}/erlang/man/man3/megaco_user.*
%endif
+%endif %{__with_wxwidgets}
%files mnesia
%dir %{_libdir}/erlang/lib/mnesia-*/
@@ -1607,6 +1808,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/mnesia_registry.*
%endif
+%if %{__with_wxwidgets}
%files observer
%dir %{_libdir}/erlang/lib/observer-*/
%{_libdir}/erlang/lib/observer-*/ebin/
@@ -1616,10 +1818,12 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%if %{with doc}
%{_libdir}/erlang/man/man1/cdv.*
%{_libdir}/erlang/man/man3/crashdump.*
+%{_libdir}/erlang/man/man3/etop.*
%{_libdir}/erlang/man/man3/observer.*
%{_libdir}/erlang/man/man3/ttb.*
%{_libdir}/erlang/man/man6/observer.*
%endif
+%endif %{__with_wxwidgets}
%files odbc
%{_libdir}/erlang/lib/odbc-*/
@@ -1644,7 +1848,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/any.*
%{_libdir}/erlang/man/man3/corba.*
%{_libdir}/erlang/man/man3/corba_object.*
-%{_libdir}/erlang/man/man3/etop.*
%{_libdir}/erlang/man/man3/fixed.*
%{_libdir}/erlang/man/man3/interceptors.*
%{_libdir}/erlang/man/man3/lname.*
@@ -1703,6 +1906,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/public_key.*
%endif
+%if %{__with_wxwidgets}
%files reltool
%dir %{_libdir}/erlang/lib/reltool-*/
%{_libdir}/erlang/lib/reltool-*/ebin
@@ -1710,6 +1914,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%if %{with doc}
%{_libdir}/erlang/man/man3/reltool.*
%endif
+%endif %{__with_wxwidgets}
%files runtime_tools
%dir %{_libdir}/erlang/lib/runtime_tools-*/
@@ -1918,6 +2123,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/prettypr.*
%endif
+%if %{__with_wxwidgets}
%files test_server
%{_libdir}/erlang/lib/test_server-*/
%if %{with doc}
@@ -1925,6 +2131,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/test_server_ctrl.*
%{_libdir}/erlang/man/man6/test_server.*
%endif
+%endif %{__with_wxwidgets}
%files tools
%dir %{_libdir}/erlang/lib/tools-*/
@@ -1946,20 +2153,25 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/xref.*
%endif
+%if %{__with_wxwidgets}
%files typer
%{_bindir}/typer
%{_libdir}/erlang/bin/typer
%{_libdir}/erlang/erts-*/bin/typer
%dir %{_libdir}/erlang/lib/typer-*/
%{_libdir}/erlang/lib/typer-*/ebin/
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
%files webtool
%{_libdir}/erlang/lib/webtool-*/
%if %{with doc}
%{_libdir}/erlang/man/man1/start_webtool.*
%{_libdir}/erlang/man/man3/webtool.*
%endif
+%endif %{__with_wxwidgets}
+%if %{__with_wxwidgets}
%files wx
%dir %{_libdir}/erlang/lib/wx-*/
%{_libdir}/erlang/lib/wx-*/ebin
@@ -2197,6 +2409,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/wxWindowDestroyEvent.*
%{_libdir}/erlang/man/man3/wxXmlResource.*
%endif
+%endif %{__with_wxwidgets}
%files xmerl
%{_libdir}/erlang/lib/xmerl-*/
@@ -2210,6 +2423,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/xmerl_xsd.*
%endif
+%if %{__with_emacs}
%files -n emacs-erlang
%dir %{_emacs_sitelispdir}/erlang
%doc %{_emacs_sitelispdir}/erlang/README
@@ -2227,9 +2441,13 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%files -n xemacs-erlang-el
%{_xemacs_sitelispdir}/erlang/*.el
+%endif %{__with_emacs}
%changelog
+* Sun Apr 10 2016 Peter Lemenkov - 18.3.1-2
+- Enable selective building
+
* Thu Apr 7 2016 Peter Lemenkov - 18.3.1-1
- Ver. 18.3.1
From 2eb1f1c08641335282b2465c6405c9f7b6bea098 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 27 Apr 2016 13:59:42 +0300
Subject: [PATCH 048/305] Ver. 18.3.2
Signed-off-by: Peter Lemenkov
---
erlang.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index de69c4d..7cd0515 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -68,8 +68,8 @@
Name: erlang
-Version: 18.3.1
-Release: 2%{?dist}
+Version: 18.3.2
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2445,6 +2445,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Apr 27 2016 Peter Lemenkov - 18.3.2-1
+- Ver. 18.3.2
+
* Sun Apr 10 2016 Peter Lemenkov - 18.3.1-2
- Enable selective building
From 7dd309b317bc4f1f8cd9bbbca3d94b122808f08d Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 27 Apr 2016 16:47:46 +0300
Subject: [PATCH 049/305] Upload sources
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
sources | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 2fc3419..1288b54 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,3 +60,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.2.4.tar.gz
/otp-OTP-18.3.tar.gz
/otp-OTP-18.3.1.tar.gz
+/otp-OTP-18.3.2.tar.gz
diff --git a/sources b/sources
index a073951..25a955d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-03fd1ccf4e82bc093dd0e514275909df otp-OTP-18.3.1.tar.gz
+364da46692634bbf67da585540eda1cb otp-OTP-18.3.2.tar.gz
From 99e86faeb679ff6bdc0a2f4366df50dd1a052374 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 11 May 2016 13:12:35 +0300
Subject: [PATCH 050/305] Ver. 18.3.3
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
otp-0006-Do-not-install-erlang-sources.patch | 4 ++--
sources | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1288b54..4955ce0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,3 +61,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.tar.gz
/otp-OTP-18.3.1.tar.gz
/otp-OTP-18.3.2.tar.gz
+/otp-OTP-18.3.3.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 7cd0515..a5a987e 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -68,7 +68,7 @@
Name: erlang
-Version: 18.3.2
+Version: 18.3.3
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2445,6 +2445,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed May 11 2016 Peter Lemenkov - 18.3.3-1
+- Ver. 18.3.3
+
* Wed Apr 27 2016 Peter Lemenkov - 18.3.2-1
- Ver. 18.3.2
diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch
index 00038c5..2af76d2 100644
--- a/otp-0006-Do-not-install-erlang-sources.patch
+++ b/otp-0006-Do-not-install-erlang-sources.patch
@@ -472,10 +472,10 @@ index 1c05d45..88f9f62 100644
$(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile
-index 0a4b625..1b1d83d 100644
+index 7f51676..093f462 100644
--- a/lib/inets/src/inets_app/Makefile
+++ b/lib/inets/src/inets_app/Makefile
-@@ -115,7 +115,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/inets_app"
diff --git a/sources b/sources
index 25a955d..068a4eb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-364da46692634bbf67da585540eda1cb otp-OTP-18.3.2.tar.gz
+34d812a7b27060659e592c33384ad11d otp-OTP-18.3.3.tar.gz
From 35d91694b32ea4e1f50dafe5d9e07ec4ea881950 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Mon, 13 Jun 2016 15:43:31 +0200
Subject: [PATCH 051/305] Fix regression with GCC 6.x.y
Signed-off-by: Peter Lemenkov
---
erlang.spec | 9 ++-
...-decoding-of-LLONG_MIN-in-erl_decode.patch | 69 +++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
diff --git a/erlang.spec b/erlang.spec
index a5a987e..5b5fd1e 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -69,7 +69,7 @@
Name: erlang
Version: 18.3.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -128,6 +128,9 @@ Patch8: otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
# Fedora specific patch
# Don't send unasked for systemd notifications
Patch9: otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
+# Fedora specific patch
+# Fix decoding of LLONG_MIN in erl_decode
+Patch10: otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
# end of autogenerated patch tag list
BuildRequires: flex
@@ -1025,6 +1028,7 @@ Erlang mode for XEmacs (source lisp files).
%patch7 -p1 -b .Split_off_webtool_dependency_from_tools
%patch8 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
%patch9 -p1 -b .Don_t_send_unasked_for_systemd_notifications
+%patch10 -p1 -b .Fix_decoding_of_LLONG_MIN_in_erl_decode
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2445,6 +2449,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Jun 13 2016 Peter Lemenkov - 18.3.3-2
+- Fix regression with GCC 6.x.y
+
* Wed May 11 2016 Peter Lemenkov - 18.3.3-1
- Ver. 18.3.3
diff --git a/otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch b/otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
new file mode 100644
index 0000000..d832978
--- /dev/null
+++ b/otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
@@ -0,0 +1,69 @@
+From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?=
+Date: Fri, 10 Jun 2016 16:40:38 +0200
+Subject: [PATCH] Fix decoding of LLONG_MIN in erl_decode
+
+Reported-by: Peter Lemenkov
+
+diff --git a/lib/erl_interface/src/legacy/erl_marshal.c b/lib/erl_interface/src/legacy/erl_marshal.c
+index a4216c9..6a1b573 100644
+--- a/lib/erl_interface/src/legacy/erl_marshal.c
++++ b/lib/erl_interface/src/legacy/erl_marshal.c
+@@ -727,6 +727,13 @@ static ETERM *erl_decode_it(unsigned char **ext)
+ ((*ext)[2]) << 8 |((*ext)[3]);
+ *ext += 4;
+ big_cont:
++
++#ifdef _MSC_VER
++#define MAX_TO_NEGATE 0x8000000000000000Ui64
++#else
++#define MAX_TO_NEGATE 0x8000000000000000ULL
++#endif
++
+ sign = *(*ext)++;
+ if (arity > 8)
+ goto big_truncate;
+@@ -763,23 +770,28 @@ static ETERM *erl_decode_it(unsigned char **ext)
+ *ext += arity;
+ return ep;
+ } else {
+- /* Fits in a long long */
+- int x;
+- long long l = 0LL;
+-
+- for(x = 0 ; x < arity ; x++) {
+- l |= ((long long)(*ext)[x]) << ((long long)(8*x));
+- }
+- if (sign) {
+- l = -l;
+- if (l > 0) goto big_truncate;
+- }
+-
+- ERL_TYPE(ep) = ERL_LONGLONG;
+- ep->uval.llval.i = l;
+- *ext += arity;
+- return ep;
++ /* Fits in a signed long long */
++ int x;
++ unsigned long long l = 0LL;
++ long long sl;
++
++ for(x = 0 ; x < arity ; x++) {
++ l |= ((unsigned long long)(*ext)[x]) << ((unsigned long long)(8*x));
++ }
++
++ sl = (long long)l;
++
++ if (sign && l != MAX_TO_NEGATE) {
++ sl = -sl;
++ if (sl > 0) goto big_truncate;
++ }
++
++ ERL_TYPE(ep) = ERL_LONGLONG;
++ ep->uval.llval.i = sl;
++ *ext += arity;
++ return ep;
+ }
++#undef MAX_TO_NEGATE
+ big_truncate:
+ /* truncate to: (+/-) 1 */
+ #ifdef DEBUG
From a455cfc9726867ddf5a849ada4dd8c3c04fd7f38 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 14 Jun 2016 15:16:31 +0200
Subject: [PATCH 052/305] Ver. 18.3.4
Signed-off-by: Peter Lemenkov
---
erlang.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 5b5fd1e..2924ec0 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -68,8 +68,8 @@
Name: erlang
-Version: 18.3.3
-Release: 2%{?dist}
+Version: 18.3.4
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2449,6 +2449,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Jun 14 2016 Peter Lemenkov - 18.3.4-1
+- Ver. 18.3.4
+
* Mon Jun 13 2016 Peter Lemenkov - 18.3.3-2
- Fix regression with GCC 6.x.y
From 7baa91a7251e17a9c036027784f19d2344e7fd8f Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 14 Jun 2016 15:22:10 +0200
Subject: [PATCH 053/305] Forgot to upload tarball. As usual.
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
sources | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 4955ce0..49299e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,3 +62,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.1.tar.gz
/otp-OTP-18.3.2.tar.gz
/otp-OTP-18.3.3.tar.gz
+/otp-OTP-18.3.4.tar.gz
diff --git a/sources b/sources
index 068a4eb..780d7be 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-34d812a7b27060659e592c33384ad11d otp-OTP-18.3.3.tar.gz
+4debfc36d9392b85006033af38637274 otp-OTP-18.3.4.tar.gz
From f866398479f7961914010e2c299b4b4c88afa210 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Fri, 15 Jul 2016 13:11:40 +0300
Subject: [PATCH 054/305] Ver. 18.3.4.1
- Ver. 18.3.4.1
- Allow node registration via IPv6 (PR erlang/otp#1129)
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 10 +++++-
...dist-switch-while-connection-to-EPMD.patch | 34 +++++++++++++++++++
sources | 2 +-
4 files changed, 45 insertions(+), 2 deletions(-)
create mode 100644 otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
diff --git a/.gitignore b/.gitignore
index 49299e8..0d15586 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.2.tar.gz
/otp-OTP-18.3.3.tar.gz
/otp-OTP-18.3.4.tar.gz
+/otp-OTP-18.3.4.1.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 2924ec0..94917c7 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -68,7 +68,7 @@
Name: erlang
-Version: 18.3.4
+Version: 18.3.4.1
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -131,6 +131,9 @@ Patch9: otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
# Fedora specific patch
# Fix decoding of LLONG_MIN in erl_decode
Patch10: otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
+# Fedora specific patch
+# Respect -proto_dist switch while connection to EPMD
+Patch11: otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
# end of autogenerated patch tag list
BuildRequires: flex
@@ -1029,6 +1032,7 @@ Erlang mode for XEmacs (source lisp files).
%patch8 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
%patch9 -p1 -b .Don_t_send_unasked_for_systemd_notifications
%patch10 -p1 -b .Fix_decoding_of_LLONG_MIN_in_erl_decode
+%patch11 -p1 -b .Respect_proto_dist_switch_while_connection_to_EPMD
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2449,6 +2453,10 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Fri Jul 15 2016 Peter Lemenkov - 18.3.4.1-1
+- Ver. 18.3.4.1
+- Allow node registration via IPv6 (PR erlang/otp#1129)
+
* Tue Jun 14 2016 Peter Lemenkov - 18.3.4-1
- Ver. 18.3.4
diff --git a/otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch b/otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
new file mode 100644
index 0000000..8b8fd0d
--- /dev/null
+++ b/otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
@@ -0,0 +1,34 @@
+From: Peter Lemenkov
+Date: Thu, 14 Jul 2016 17:51:16 +0300
+Subject: [PATCH] Respect -proto_dist switch while connection to EPMD
+
+Signed-off-by: Peter Lemenkov
+
+diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
+index c6202dd..ec2e330 100644
+--- a/lib/kernel/src/erl_epmd.erl
++++ b/lib/kernel/src/erl_epmd.erl
+@@ -103,6 +103,10 @@ names(EpmdAddr) ->
+
+ register_node(Name, PortNo) ->
+ register_node(Name, PortNo, inet).
++register_node(Name, PortNo, inet_tcp) ->
++ register_node(Name, PortNo, inet);
++register_node(Name, PortNo, inet6_tcp) ->
++ register_node(Name, PortNo, inet6);
+ register_node(Name, PortNo, Family) ->
+ gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
+
+diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
+index 64b28bb..ffbd5d5 100644
+--- a/lib/kernel/src/inet_tcp_dist.erl
++++ b/lib/kernel/src/inet_tcp_dist.erl
+@@ -73,7 +73,7 @@ gen_listen(Driver, Name) ->
+ {ok, Socket} ->
+ TcpAddress = get_tcp_address(Driver, Socket),
+ {_,Port} = TcpAddress#net_address.address,
+- case erl_epmd:register_node(Name, Port) of
++ case erl_epmd:register_node(Name, Port, Driver) of
+ {ok, Creation} ->
+ {ok, {Socket, TcpAddress, Creation}};
+ Error ->
diff --git a/sources b/sources
index 780d7be..bb0797a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4debfc36d9392b85006033af38637274 otp-OTP-18.3.4.tar.gz
+d91205fe5b3a64a5105481e05adca005 otp-OTP-18.3.4.1.tar.gz
From a3bb2c2410368f07e5396090ee728b4c3062617f Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 26 Jul 2016 17:00:07 +0300
Subject: [PATCH 055/305] Ver. 18.3.4.2
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0d15586..17c7274 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,3 +64,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.3.tar.gz
/otp-OTP-18.3.4.tar.gz
/otp-OTP-18.3.4.1.tar.gz
+/otp-OTP-18.3.4.2.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 94917c7..8d5649d 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -68,7 +68,7 @@
Name: erlang
-Version: 18.3.4.1
+Version: 18.3.4.2
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2453,6 +2453,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Jul 26 2016 Peter Lemenkov - 18.3.4.2-1
+- Ver. 18.3.4.2
+
* Fri Jul 15 2016 Peter Lemenkov - 18.3.4.1-1
- Ver. 18.3.4.1
- Allow node registration via IPv6 (PR erlang/otp#1129)
diff --git a/sources b/sources
index bb0797a..1a7d38d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d91205fe5b3a64a5105481e05adca005 otp-OTP-18.3.4.1.tar.gz
+fd9934b664769500f3216f688eb57493 otp-OTP-18.3.4.2.tar.gz
From 8a7b81063e0a4e3d94ec83a436d7001ea877b2b2 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 27 Jul 2016 14:14:07 +0300
Subject: [PATCH 056/305] Ver. 19.0.2
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 225 ++++-------------
...n-pages-and-do-not-install-miscellan.patch | 6 +-
otp-0002-Remove-rpath.patch | 2 +-
otp-0003-Do-not-install-C-sources.patch | 46 ++--
otp-0004-Do-not-install-Java-sources.patch | 4 +-
...teventlog-and-related-doc-files-on-n.patch | 4 +-
otp-0006-Do-not-install-erlang-sources.patch | 230 ++++++++----------
...dist-switch-while-connection-to-EPMD.patch | 25 +-
...it-off-webtool-dependency-from-tools.patch | 40 ---
...-to-crash-dump-on-large-distribution.patch | 31 ---
...nd-unasked-for-systemd-notifications.patch | 56 -----
...-decoding-of-LLONG_MIN-in-erl_decode.patch | 69 ------
sources | 2 +-
14 files changed, 195 insertions(+), 546 deletions(-)
rename otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch => otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch (54%)
delete mode 100644 otp-0007-Split-off-webtool-dependency-from-tools.patch
delete mode 100644 otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
delete mode 100644 otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
delete mode 100644 otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
diff --git a/.gitignore b/.gitignore
index 17c7274..bdf9fb8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,3 +65,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.4.tar.gz
/otp-OTP-18.3.4.1.tar.gz
/otp-OTP-18.3.4.2.tar.gz
+/otp-OTP-19.0.2.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 8d5649d..e22de86 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -47,8 +47,6 @@
# observer blocks:
#
# * common_test
-# * test_server
-# * webtool
#
# So finally we have to disable the following plugins:
#
@@ -59,16 +57,14 @@
# megaco
# observer
# reltool (*)
-# test_server
# typer
-# webtool
# wx
#
%global __with_wxwidgets 1
Name: erlang
-Version: 18.3.4.2
+Version: 19.0.2
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -120,20 +116,8 @@ 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
-# Split off webtool dependency from tools
-Patch7: otp-0007-Split-off-webtool-dependency-from-tools.patch
-# Fedora specific patch
-# Add patch to crash dump on large distribution
-Patch8: otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
-# Fedora specific patch
-# Don't send unasked for systemd notifications
-Patch9: otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
-# Fedora specific patch
-# Fix decoding of LLONG_MIN in erl_decode
-Patch10: otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
-# Fedora specific patch
# Respect -proto_dist switch while connection to EPMD
-Patch11: otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
+Patch7: otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
# end of autogenerated patch tag list
BuildRequires: flex
@@ -209,7 +193,6 @@ Requires: %{name}-observer%{?_isa} = %{version}-%{release}
Requires: %{name}-odbc%{?_isa} = %{version}-%{release}
Requires: %{name}-orber%{?_isa} = %{version}-%{release}
Requires: %{name}-os_mon%{?_isa} = %{version}-%{release}
-Requires: %{name}-ose%{?_isa} = %{version}-%{release}
Requires: %{name}-otp_mibs%{?_isa} = %{version}-%{release}
Requires: %{name}-parsetools%{?_isa} = %{version}-%{release}
Requires: %{name}-percept%{?_isa} = %{version}-%{release}
@@ -224,17 +207,11 @@ Requires: %{name}-ssh%{?_isa} = %{version}-%{release}
Requires: %{name}-ssl%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
-%if %{__with_wxwidgets}
-Requires: %{name}-test_server%{?_isa} = %{version}-%{release}
-%endif %{__with_wxwidgets}
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
%if %{__with_wxwidgets}
Requires: %{name}-typer%{?_isa} = %{version}-%{release}
%endif %{__with_wxwidgets}
%if %{__with_wxwidgets}
-Requires: %{name}-webtool%{?_isa} = %{version}-%{release}
-%endif %{__with_wxwidgets}
-%if %{__with_wxwidgets}
Requires: %{name}-wx%{?_isa} = %{version}-%{release}
%endif %{__with_wxwidgets}
Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
@@ -247,29 +224,6 @@ systems from Ericsson.
### BEGIN OF AUTOGENERATED LIST ###
-%if %{__with_emacs}
-%package -n emacs-erlang
-Summary: Compiled elisp files for erlang-mode under GNU Emacs
-Group: Applications/Editors
-BuildRequires: emacs
-BuildRequires: emacs-el
-Requires: emacs-common-erlang = %{version}-%{release}
-Requires: emacs(bin) >= %{_emacs_version}
-BuildArch: noarch
-
-%description -n emacs-erlang
-Erlang mode for GNU Emacs.
-
-%package -n emacs-erlang-el
-Summary: Elisp source files for erlang-mode under GNU Emacs
-Group: Applications/Editors
-Requires: emacs-erlang = %{version}-%{release}
-BuildArch: noarch
-
-%description -n emacs-erlang-el
-Erlang mode for GNU Emacs (source lisp files).
-%endif %{__with_emacs}
-
%package asn1
Summary: Provides support for Abstract Syntax Notation One
Group: Development/Languages
@@ -296,9 +250,10 @@ Requires: %{name}-sasl%{?_isa} = %{version}-%{release}
Requires: %{name}-snmp%{?_isa} = %{version}-%{release}
Requires: %{name}-ssh%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-Requires: %{name}-test_server%{?_isa} = %{version}-%{release}
+Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
Requires: %{name}-xmerl%{?_isa} = %{version}-%{release}
+Obsoletes: erlang-test_server
%description common_test
A portable framework for automatic testing.
@@ -530,14 +485,16 @@ Requires: lksctp-tools
Provides: erlang(erl_drv_version) = 3.3
# See erts/emulator/beam/erl_nif.h or call erlang:system_info(nif_version).
#Provides: erlang(erl_nif_version) = %%(%%{buildroot}/bin/erl -noshell -eval 'io:format(erlang:system_info(nif_version)).' -s erlang halt)
-Provides: erlang(erl_nif_version) = 2.10
+Provides: erlang(erl_nif_version) = 2.11
Provides: bundled(pcre) = 8.33
Obsoletes: erlang-appmon
Obsoletes: erlang-docbuilder
Obsoletes: erlang-inviso
+Obsoletes: erlang-ose
Obsoletes: erlang-pman
Obsoletes: erlang-toolbar
Obsoletes: erlang-tv
+Obsoletes: erlang-webtool
%description erts
Functionality necessary to run the Erlang System itself.
@@ -740,15 +697,6 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description os_mon
A monitor which allows inspection of the underlying operating system.
-%package ose
-Summary: A module for interacting with Enea OSE
-Group: Development/Languages
-Requires: %{name}-erts%{?_isa} = %{version}-%{release}
-Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-
-%description ose
-A module for interacting with Enea OSE.
-
%package otp_mibs
Summary: SNMP management information base for Erlang/OTP nodes
Group: Development/Languages
@@ -900,42 +848,31 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
A utility used to handle abstract Erlang syntax trees,
reading source files differently, pretty-printing syntax trees.
-%if %{__with_wxwidgets}
-%package test_server
-Summary: The OTP Test Server
-Group: Development/Languages
-Requires: %{name}-erts%{?_isa} = %{version}-%{release}
-Requires: %{name}-inets%{?_isa} = %{version}-%{release}
-Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
-Requires: %{name}-observer%{?_isa} = %{version}-%{release}
-Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
-Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release}
-Requires: %{name}-tools%{?_isa} = %{version}-%{release}
-
-%description test_server
-The OTP Test Server.
-%endif %{__with_wxwidgets}
-
%package tools
Summary: A set of programming tools including a coverage analyzer etc
Group: Development/Languages
+%if %{__with_emacs}
+BuildRequires: emacs
+BuildRequires: emacs-el
+BuildRequires: xemacs
+BuildRequires: xemacs-packages-extra-el
+%endif %{__with_emacs}
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-inets%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-# This is a weak dependency triggered by the "cover_web" application.
-# Unfortunately Recommends/Suggests tags are supported only in Fedora 21+ and
-# RHEL 8+ (eventually)
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
-Suggests: %{name}-webtool%{?_isa} = %{version}-%{release}
-%endif
%if %{__with_emacs}
-Provides: emacs-common-erlang = %{version}-%{release}
+Requires: emacs-filesystem
+Requires: xemacs-filesystem
+Obsoletes: emacs-erlang
+Obsoletes: emacs-erlang-el
+Obsoletes: xemacs-erlang
+Obsoletes: xemacs-erlang-el
%endif %{__with_emacs}
+
%description tools
A set of programming tools including a coverage analyzer etc.
@@ -954,20 +891,6 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
TYPe annotator for ERlang programs.
%endif %{__with_wxwidgets}
-%if %{__with_wxwidgets}
-%package webtool
-Summary: A tool that simplifying the use of web based Erlang tools
-Group: Development/Languages
-Requires: %{name}-erts%{?_isa} = %{version}-%{release}
-Requires: %{name}-inets%{?_isa} = %{version}-%{release}
-Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
-Requires: %{name}-observer%{?_isa} = %{version}-%{release}
-Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
-
-%description webtool
-A tool that simplifying the use of web based Erlang tools.
-%endif %{__with_wxwidgets}
-
%if %{__with_wxwidgets}
%package wx
Summary: A library for wxWidgets support in Erlang
@@ -993,29 +916,6 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description xmerl
Provides support for XML 1.0.
-%if %{__with_emacs}
-%package -n xemacs-erlang
-Summary: Compiled elisp files for erlang-mode under XEmacs
-Group: Applications/Editors
-BuildRequires: xemacs
-BuildRequires: xemacs-packages-extra-el
-Requires: emacs-common-erlang = %{version}-%{release}
-Requires: xemacs(bin) >= %{_xemacs_version}
-BuildArch: noarch
-
-%description -n xemacs-erlang
-Erlang mode for XEmacs.
-
-%package -n xemacs-erlang-el
-Summary: Elisp source files for erlang-mode under XEmacs
-Group: Applications/Editors
-Requires: xemacs-erlang = %{version}-%{release}
-BuildArch: noarch
-
-%description -n xemacs-erlang-el
-Erlang mode for XEmacs (source lisp files).
-%endif %{__with_emacs}
-
### END OF AUTOGENERATED LIST ###
%prep
@@ -1028,11 +928,7 @@ 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 .Split_off_webtool_dependency_from_tools
-%patch8 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
-%patch9 -p1 -b .Don_t_send_unasked_for_systemd_notifications
-%patch10 -p1 -b .Fix_decoding_of_LLONG_MIN_in_erl_decode
-%patch11 -p1 -b .Respect_proto_dist_switch_while_connection_to_EPMD
+%patch7 -p1 -b .Respect_proto_dist_switch_while_connection_to_EPMD
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -1074,9 +970,7 @@ CFLAGS="${ERL_FLAGS}" CXXFLAGS="${ERL_FLAGS}" %configure --enable-shared-zlib --
--without-megaco \
--without-observer \
--without-reltool \
- --without-test_server \
--without-typer \
- --without-webtool \
--without-wx
%endif %{__with_wxwidgets}
@@ -1109,7 +1003,7 @@ cat > xemacs-erlang-init.el << EOF
EOF
mkdir xemacs-erlang
cp lib/tools/emacs/*.el xemacs-erlang/
-rm -f xemacs-erlang/erlang-flymake.el
+rm -f xemacs-erlang/erlang-flymake.el xemacs-erlang/erlang-test.el
pushd xemacs-erlang
%{_xemacs_bytecompile} *.el
popd
@@ -1575,11 +1469,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%dir %{_libdir}/erlang/erts-*/bin/
%{_libdir}/erlang/erts-*/bin/beam
%{_libdir}/erlang/erts-*/bin/beam.smp
-%{_libdir}/erlang/erts-*/bin/child_setup
%{_libdir}/erlang/erts-*/bin/dyn_erl
%{_libdir}/erlang/erts-*/bin/epmd
%{_libdir}/erlang/erts-*/bin/erl
%{_libdir}/erlang/erts-*/bin/erl.src
+%{_libdir}/erlang/erts-*/bin/erl_child_setup
%{_libdir}/erlang/erts-*/bin/erlc
%{_libdir}/erlang/erts-*/bin/erlexec
%{_libdir}/erlang/erts-*/bin/escript
@@ -1606,6 +1500,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/erl_driver.*
%{_libdir}/erlang/man/man3/erl_nif.*
%{_libdir}/erlang/man/man3/erl_prim_loader.*
+%{_libdir}/erlang/man/man3/erl_tracer.*
%{_libdir}/erlang/man/man3/erlang.*
%{_libdir}/erlang/man/man3/erts_alloc.*
%{_libdir}/erlang/man/man3/init.*
@@ -1684,7 +1579,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%if %{__with_tcltk}
%files gs
%dir %{_libdir}/erlang/lib/gs-*/
-%{_libdir}/erlang/lib/gs-*/contribs
%{_libdir}/erlang/lib/gs-*/ebin
%{_libdir}/erlang/lib/gs-*/priv
%{_libdir}/erlang/lib/gs-*/src
@@ -1878,15 +1772,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man6/os_mon.*
%endif
-%files ose
-%dir %{_libdir}/erlang/lib/ose-*/
-%{_libdir}/erlang/lib/ose-*/ebin/
-%if %{with doc}
-%{_libdir}/erlang/man/man3/ose.*
-%{_libdir}/erlang/man/man3/ose_erl_driver.*
-%{_libdir}/erlang/man/man6/ose.*
-%endif
-
%files otp_mibs
%{_libdir}/erlang/lib/otp_mibs-*/
%if %{with doc}
@@ -1912,6 +1797,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/public_key-*/
%if %{with doc}
%{_libdir}/erlang/man/man3/public_key.*
+%{_libdir}/erlang/man/man6/public_key.*
%endif
%if %{__with_wxwidgets}
@@ -1933,6 +1819,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/dbg.*
%{_libdir}/erlang/man/man3/dyntrace.*
%{_libdir}/erlang/man/man3/erts_alloc_config.*
+%{_libdir}/erlang/man/man3/msacc.*
%{_libdir}/erlang/man/man3/system_information.*
%{_libdir}/erlang/man/man6/runtime_tools.*
%endif
@@ -1943,7 +1830,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/sasl-*/src
%if %{with doc}
%{_libdir}/erlang/man/man3/alarm_handler.*
-%{_libdir}/erlang/man/man3/overload.*
%{_libdir}/erlang/man/man3/rb.*
%{_libdir}/erlang/man/man3/release_handler.*
%{_libdir}/erlang/man/man3/systools.*
@@ -2080,6 +1966,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/gen_event.*
%{_libdir}/erlang/man/man3/gen_fsm.*
%{_libdir}/erlang/man/man3/gen_server.*
+%{_libdir}/erlang/man/man3/gen_statem.*
%{_libdir}/erlang/man/man3/io.*
%{_libdir}/erlang/man/man3/io_lib.*
%{_libdir}/erlang/man/man3/lib.*
@@ -2131,22 +2018,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/prettypr.*
%endif
-%if %{__with_wxwidgets}
-%files test_server
-%{_libdir}/erlang/lib/test_server-*/
-%if %{with doc}
-%{_libdir}/erlang/man/man3/test_server.*
-%{_libdir}/erlang/man/man3/test_server_ctrl.*
-%{_libdir}/erlang/man/man6/test_server.*
-%endif
-%endif %{__with_wxwidgets}
-
%files tools
%dir %{_libdir}/erlang/lib/tools-*/
%{_libdir}/erlang/lib/tools-*/bin
%{_libdir}/erlang/lib/tools-*/ebin
%{_libdir}/erlang/lib/tools-*/emacs
-%{_libdir}/erlang/lib/tools-*/priv
%{_libdir}/erlang/lib/tools-*/src
%if %{with doc}
%{_libdir}/erlang/man/man3/cover.*
@@ -2160,6 +2036,19 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/tags.*
%{_libdir}/erlang/man/man3/xref.*
%endif
+%if %{__with_emacs}
+%dir %{_emacs_sitelispdir}/erlang
+%dir %{_xemacs_sitelispdir}/erlang
+%doc %{_emacs_sitelispdir}/erlang/README
+%doc %{_xemacs_sitelispdir}/erlang/README
+%{_emacs_sitelispdir}/erlang/*.el
+%{_emacs_sitelispdir}/erlang/*.elc
+%{_emacs_sitestartdir}/erlang-init.el
+%{_xemacs_sitelispdir}/erlang/*.el
+%{_xemacs_sitelispdir}/erlang/*.elc
+%{_xemacs_sitestartdir}/erlang-init.el
+%endif %{__with_emacs}
+
%if %{__with_wxwidgets}
%files typer
@@ -2170,15 +2059,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/lib/typer-*/ebin/
%endif %{__with_wxwidgets}
-%if %{__with_wxwidgets}
-%files webtool
-%{_libdir}/erlang/lib/webtool-*/
-%if %{with doc}
-%{_libdir}/erlang/man/man1/start_webtool.*
-%{_libdir}/erlang/man/man3/webtool.*
-%endif
-%endif %{__with_wxwidgets}
-
%if %{__with_wxwidgets}
%files wx
%dir %{_libdir}/erlang/lib/wx-*/
@@ -2431,28 +2311,13 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%{_libdir}/erlang/man/man3/xmerl_xsd.*
%endif
-%if %{__with_emacs}
-%files -n emacs-erlang
-%dir %{_emacs_sitelispdir}/erlang
-%doc %{_emacs_sitelispdir}/erlang/README
-%{_emacs_sitelispdir}/erlang/*.elc
-%{_emacs_sitestartdir}/erlang-init.el
-
-%files -n emacs-erlang-el
-%{_emacs_sitelispdir}/erlang/*.el
-
-%files -n xemacs-erlang
-%dir %{_xemacs_sitelispdir}/erlang
-%doc %{_xemacs_sitelispdir}/erlang/README
-%{_xemacs_sitelispdir}/erlang/*.elc
-%{_xemacs_sitestartdir}/erlang-init.el
-
-%files -n xemacs-erlang-el
-%{_xemacs_sitelispdir}/erlang/*.el
-%endif %{__with_emacs}
-
%changelog
+* Wed Jul 27 2016 Peter Lemenkov - 19.0.2-1
+- Ver. 19.0.2
+- The following packages were removed - ose, test_server (merged into common_test), webtool
+- Merge (x)emacs subpackages into erlang-typer
+
* Tue Jul 26 2016 Peter Lemenkov - 18.3.4.2-1
- Ver. 18.3.4.2
diff --git a/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch b/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
index 2602d40..0415370 100644
--- a/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
+++ b/otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Do not format man-pages and do not install miscellaneous
Signed-off-by: Peter Lemenkov
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
-index 8e55fa7..9512faa 100644
+index cb053a1..024307b 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
-@@ -551,10 +551,6 @@ endif
+@@ -492,10 +492,6 @@ endif
ifneq ($(INSTALL_TOP_BIN),)
$(INSTALL_PROGRAM) $(INSTALL_TOP_BIN) "$(RELEASE_PATH)"
endif
@@ -21,7 +21,7 @@ index 8e55fa7..9512faa 100644
$(INSTALL_DIR) "$(RELEASE_PATH)/erts-$(VSN)/src"
$(INSTALL_DATA) $(INSTALL_SRC) "$(RELEASE_PATH)/erts-$(VSN)/src"
diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
-index 6634ae3..fa18956 100644
+index e71308e..ae2c9cf 100644
--- a/erts/etc/unix/Install.src
+++ b/erts/etc/unix/Install.src
@@ -141,14 +141,5 @@ cp -p ../releases/%I_SYSTEM_VSN%/start_*.boot .
diff --git a/otp-0002-Remove-rpath.patch b/otp-0002-Remove-rpath.patch
index 77418af..e1eac8f 100644
--- a/otp-0002-Remove-rpath.patch
+++ b/otp-0002-Remove-rpath.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Remove rpath
Signed-off-by: Peter Lemenkov
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
-index e66c0ca..574cdf5 100644
+index c62f25b..bb28704 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -90,7 +90,7 @@ endif
diff --git a/otp-0003-Do-not-install-C-sources.patch b/otp-0003-Do-not-install-C-sources.patch
index d4abd19..0f945b7 100644
--- a/otp-0003-Do-not-install-C-sources.patch
+++ b/otp-0003-Do-not-install-C-sources.patch
@@ -14,42 +14,41 @@ https://bugzilla.redhat.com/818419
Signed-off-by: Peter Lemenkov
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
-index 2b72e1a..0522562 100644
+index 1f714df..95835d6 100644
--- a/lib/asn1/c_src/Makefile
+++ b/lib/asn1/c_src/Makefile
-@@ -143,8 +143,6 @@ release_spec: opt
- ifneq ($(findstring ose,$(TARGET)),ose)
+@@ -136,8 +136,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"
- endif
- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
- $(INSTALL_DATA) *.c "$(RELSYSDIR)/c_src"
release_docs_spec:
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
-index 574cdf5..428c316 100644
+index bb28704..165a2e0 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
-@@ -200,14 +200,10 @@ docs:
+@@ -195,13 +195,9 @@ 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"
- ifneq ($(findstring ose,$(TARGET)),ose)
- $(INSTALL_PROGRAM) $(CRYPTO_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) "$(RELSYSDIR)/priv/lib"
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
- $(INSTALL_PROGRAM) $(CALLBACK_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(CALLBACK_LIB) "$(RELSYSDIR)/priv/lib"
endif
- endif
+
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
-index 777d709..57917ae 100644
+index 4f393e9..a9a7f7c 100644
--- a/lib/erl_interface/src/Makefile.in
+++ b/lib/erl_interface/src/Makefile.in
-@@ -905,14 +905,14 @@ ifneq ($(EXE_TARGETS),)
+@@ -842,14 +842,14 @@ ifneq ($(EXE_TARGETS),)
$(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin"
endif
$(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src"
@@ -73,7 +72,7 @@ index 777d709..57917ae 100644
release_docs:
diff --git a/lib/ic/c_src/Makefile.in b/lib/ic/c_src/Makefile.in
-index b9f92a0..9612f24 100644
+index c0dad59..9a19028 100644
--- a/lib/ic/c_src/Makefile.in
+++ b/lib/ic/c_src/Makefile.in
@@ -145,12 +145,10 @@ $(OBJDIR)/%.o: %.c
@@ -90,7 +89,7 @@ index b9f92a0..9612f24 100644
$(INSTALL_DATA) $(LIBRARY) "$(RELSYSDIR)/priv/lib"
$(INSTALL_DATA) $(IDL_FILES) $(H_FILES) "$(RELEASE_PATH)/usr/include"
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
-index 045b6d8..39be02a 100644
+index c37ad4d..09bf1ef 100644
--- a/lib/megaco/src/flex/Makefile.in
+++ b/lib/megaco/src/flex/Makefile.in
@@ -271,7 +271,7 @@ release_spec: opt
@@ -103,7 +102,7 @@ index 045b6d8..39be02a 100644
endif
diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
-index 685eb5d..6c8a432 100644
+index 784e73c..568c5e4 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
@@ -119,7 +118,7 @@ index 685eb5d..6c8a432 100644
endif
diff --git a/lib/os_mon/c_src/Makefile.in b/lib/os_mon/c_src/Makefile.in
-index e9fc5f4..ac9fb73 100644
+index 27b156a..f11ff30 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
@@ -131,26 +130,11 @@ index e9fc5f4..ac9fb73 100644
$(INSTALL_DIR) "$(RELSYSDIR)/priv/bin"
$(INSTALL_PROGRAM) $(TARGET_FILES) "$(RELSYSDIR)/priv/bin"
-diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
-index 448b8c6..860d504 100644
---- a/lib/runtime_tools/c_src/Makefile.in
-+++ b/lib/runtime_tools/c_src/Makefile.in
-@@ -157,10 +157,8 @@ docs:
- include $(ERL_TOP)/make/otp_release_targets.mk
-
- release_spec: opt
-- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
- $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
- ifneq ($(findstring ose,$(TARGET)),ose)
-- $(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj"
- $(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
- endif
-
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
-index 66bba22..eea37fc 100644
+index cfe9191..735cdaa 100644
--- a/lib/tools/c_src/Makefile.in
+++ b/lib/tools/c_src/Makefile.in
-@@ -198,8 +198,6 @@ include ../vsn.mk
+@@ -190,8 +190,6 @@ include ../vsn.mk
RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)
release_spec: all
diff --git a/otp-0004-Do-not-install-Java-sources.patch b/otp-0004-Do-not-install-Java-sources.patch
index d9ba9c4..694a23f 100644
--- a/otp-0004-Do-not-install-Java-sources.patch
+++ b/otp-0004-Do-not-install-Java-sources.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Do not install Java sources
Signed-off-by: Peter Lemenkov
diff --git a/lib/ic/java_src/com/ericsson/otp/ic/Makefile b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
-index d9100cf..6886c71 100644
+index 21c38e5..eeba2e4 100644
--- a/lib/ic/java_src/com/ericsson/otp/ic/Makefile
+++ b/lib/ic/java_src/com/ericsson/otp/ic/Makefile
@@ -113,8 +113,6 @@ docs:
@@ -18,7 +18,7 @@ index d9100cf..6886c71 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 1c8364e..34b64a8 100644
+index e55cfa6..5e3a0a5 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile
@@ -120,8 +120,6 @@ release release_docs release_tests release_html:
diff --git a/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch b/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
index b0c843e..52bd6f0 100644
--- a/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
+++ b/otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Do not install nteventlog and related doc-files on non-win32
Signed-off-by: Peter Lemenkov
diff --git a/lib/os_mon/doc/src/Makefile b/lib/os_mon/doc/src/Makefile
-index 0c5acd9..5f8f1e3 100644
+index 91c7ae7..dc7bcf3 100644
--- a/lib/os_mon/doc/src/Makefile
+++ b/lib/os_mon/doc/src/Makefile
@@ -36,12 +36,17 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
@@ -29,7 +29,7 @@ index 0c5acd9..5f8f1e3 100644
XML_REF6_FILES = os_mon_app.xml
diff --git a/lib/os_mon/src/Makefile b/lib/os_mon/src/Makefile
-index 9aa068c..1003d24 100644
+index 3ff6320..29b53a8 100644
--- a/lib/os_mon/src/Makefile
+++ b/lib/os_mon/src/Makefile
@@ -34,8 +34,13 @@ RELSYSDIR = $(RELEASE_PATH)/lib/os_mon-$(VSN)
diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch
index 2af76d2..564546a 100644
--- a/otp-0006-Do-not-install-erlang-sources.patch
+++ b/otp-0006-Do-not-install-erlang-sources.patch
@@ -8,10 +8,10 @@ Signed-off-by: Peter Lemenkov
Signed-off-by: Hans Ulrich Niedermann
diff --git a/erts/preloaded/src/Makefile b/erts/preloaded/src/Makefile
-index 52034a0..56d91b9 100644
+index 4a447d3..eac5ae5 100644
--- a/erts/preloaded/src/Makefile
+++ b/erts/preloaded/src/Makefile
-@@ -86,8 +86,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
+@@ -88,8 +88,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: $(APP_TARGET)
@@ -21,7 +21,7 @@ index 52034a0..56d91b9 100644
$(INSTALL_DATA) $(STATIC_TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/asn1/src/Makefile b/lib/asn1/src/Makefile
-index 5b34017..d4677d6 100644
+index 38cf2d4..d4bb398 100644
--- a/lib/asn1/src/Makefile
+++ b/lib/asn1/src/Makefile
@@ -155,7 +155,7 @@ release_spec: opt
@@ -34,10 +34,10 @@ index 5b34017..d4677d6 100644
$(INSTALL_DATA) $(EXAMPLES) "$(RELSYSDIR)/examples"
diff --git a/lib/common_test/src/Makefile b/lib/common_test/src/Makefile
-index 987345c..f53546a 100644
+index 0f9e044..5039444 100644
--- a/lib/common_test/src/Makefile
+++ b/lib/common_test/src/Makefile
-@@ -144,7 +144,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -151,7 +151,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -46,11 +46,27 @@ index 987345c..f53546a 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
+diff --git a/lib/common_test/test_server/Makefile b/lib/common_test/test_server/Makefile
+index f015064..57f96d2 100644
+--- a/lib/common_test/test_server/Makefile
++++ b/lib/common_test/test_server/Makefile
+@@ -86,9 +86,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_tests_spec: opt
+ $(INSTALL_DIR) "$(RELEASE_PATH)/test_server"
+- $(INSTALL_DATA) $(TS_ERL_FILES) $(TS_HRL_FILES) \
++ $(INSTALL_DATA) $(TS_HRL_FILES) \
+ $(TS_TARGET_FILES) \
+- $(AUTOCONF_FILES) $(CONFIG) \
++ $(CONFIG) \
+ "$(RELEASE_PATH)/test_server"
+ $(INSTALL_SCRIPT) $(PROGRAMS) "$(RELEASE_PATH)/test_server"
+
diff --git a/lib/compiler/src/Makefile b/lib/compiler/src/Makefile
-index 299b289..36a048b 100644
+index 518c89d..1bcd19c 100644
--- a/lib/compiler/src/Makefile
+++ b/lib/compiler/src/Makefile
-@@ -172,8 +172,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -174,8 +174,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -62,7 +78,7 @@ index 299b289..36a048b 100644
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/cosEvent/src/Makefile b/lib/cosEvent/src/Makefile
-index b79f0ec..30d1a1d 100644
+index 29d6223..cb43309 100644
--- a/lib/cosEvent/src/Makefile
+++ b/lib/cosEvent/src/Makefile
@@ -203,7 +203,7 @@ release_spec: opt
@@ -75,7 +91,7 @@ index b79f0ec..30d1a1d 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosEventDomain/src/Makefile b/lib/cosEventDomain/src/Makefile
-index da8dcf0..88b3993 100644
+index cdaf9e5..6e4e9b8 100644
--- a/lib/cosEventDomain/src/Makefile
+++ b/lib/cosEventDomain/src/Makefile
@@ -172,7 +172,7 @@ release_spec: opt
@@ -88,7 +104,7 @@ index da8dcf0..88b3993 100644
$(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosFileTransfer/src/Makefile b/lib/cosFileTransfer/src/Makefile
-index f9107ff..74d337d 100644
+index b396710..2678c2a 100644
--- a/lib/cosFileTransfer/src/Makefile
+++ b/lib/cosFileTransfer/src/Makefile
@@ -180,9 +180,7 @@ release_spec: opt
@@ -103,7 +119,7 @@ index f9107ff..74d337d 100644
release_docs_spec:
diff --git a/lib/cosNotification/src/Makefile b/lib/cosNotification/src/Makefile
-index 72b063f..0fdb82e 100644
+index 009c6be..83c2e26 100644
--- a/lib/cosNotification/src/Makefile
+++ b/lib/cosNotification/src/Makefile
@@ -371,8 +371,7 @@ release_spec: opt
@@ -117,7 +133,7 @@ index 72b063f..0fdb82e 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosProperty/src/Makefile b/lib/cosProperty/src/Makefile
-index cd559e1..bdf035e 100644
+index 1fdc258..90cf711 100644
--- a/lib/cosProperty/src/Makefile
+++ b/lib/cosProperty/src/Makefile
@@ -180,8 +180,7 @@ release_spec: opt
@@ -131,7 +147,7 @@ index cd559e1..bdf035e 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosTime/src/Makefile b/lib/cosTime/src/Makefile
-index 7a14db6..4b55398 100644
+index 55d59ba..f22e2c8 100644
--- a/lib/cosTime/src/Makefile
+++ b/lib/cosTime/src/Makefile
@@ -199,8 +199,7 @@ release_spec: opt
@@ -145,7 +161,7 @@ index 7a14db6..4b55398 100644
$(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/cosTransactions/src/Makefile b/lib/cosTransactions/src/Makefile
-index 90e1e51..05826e0 100644
+index 4cc1e48..084f0a7 100644
--- a/lib/cosTransactions/src/Makefile
+++ b/lib/cosTransactions/src/Makefile
@@ -174,7 +174,7 @@ release_spec: opt
@@ -158,7 +174,7 @@ index 90e1e51..05826e0 100644
$(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile
-index 6e4008e..c2d00fc 100644
+index 456b8be..fcfa8de 100644
--- a/lib/crypto/src/Makefile
+++ b/lib/crypto/src/Makefile
@@ -82,8 +82,6 @@ docs:
@@ -171,7 +187,7 @@ index 6e4008e..c2d00fc 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) \
$(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile
-index f115f49..e7dc360 100644
+index 9594a0b..bc33e67 100644
--- a/lib/debugger/src/Makefile
+++ b/lib/debugger/src/Makefile
@@ -117,7 +117,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -184,10 +200,10 @@ index f115f49..e7dc360 100644
$(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/dialyzer/src/Makefile b/lib/dialyzer/src/Makefile
-index 770af21..4f8a6d8 100644
+index 256f20f..2920c0f 100644
--- a/lib/dialyzer/src/Makefile
+++ b/lib/dialyzer/src/Makefile
-@@ -152,7 +152,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -154,7 +154,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -197,7 +213,7 @@ index 770af21..4f8a6d8 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile
-index e0bbbdf..10771b2 100644
+index 7f61620..cade771 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
@@ -251,11 +251,8 @@ release_spec: opt
@@ -228,22 +244,27 @@ index 4e5a418..c0bb0c3 100644
release_docs_spec:
diff --git a/lib/eldap/src/Makefile b/lib/eldap/src/Makefile
-index cd3c102..b55c513 100644
+index b79a537..d0b231e 100644
--- a/lib/eldap/src/Makefile
+++ b/lib/eldap/src/Makefile
-@@ -99,10 +99,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -98,13 +98,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
+- $(INSTALL_DATA) $(ASN1_HRL) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DIR) "$(RELSYSDIR)/asn1"
- $(INSTALL_DATA) ../asn1/$(ASN1_FILES) "$(RELSYSDIR)/asn1"
++ $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
- $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
+- $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
++ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
+
+ release_docs_spec:
diff --git a/lib/erl_docgen/src/Makefile b/lib/erl_docgen/src/Makefile
-index 7d41506..3f3562f 100644
+index 82d051e..950fdbe 100644
--- a/lib/erl_docgen/src/Makefile
+++ b/lib/erl_docgen/src/Makefile
@@ -90,8 +90,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
@@ -256,7 +277,7 @@ index 7d41506..3f3562f 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile
-index 461a52d..1f2e885 100644
+index b6347d8..a695d2c 100644
--- a/lib/et/src/Makefile
+++ b/lib/et/src/Makefile
@@ -109,7 +109,6 @@ release_spec: opt
@@ -280,7 +301,7 @@ index 86a6d88..5732fd8 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile
-index ff3080e..60337dd 100644
+index e19ce82..6b7c96e 100644
--- a/lib/gs/src/Makefile
+++ b/lib/gs/src/Makefile
@@ -109,8 +109,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -295,7 +316,7 @@ index ff3080e..60337dd 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/bitmap"
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
-index 0938010..134ed7b 100644
+index 9f50d6b..df92b84 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -308,7 +329,7 @@ index 0938010..134ed7b 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile
-index f0af6ac..16b512e 100644
+index d883eec..3119bc4 100644
--- a/lib/hipe/flow/Makefile
+++ b/lib/hipe/flow/Makefile
@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -321,7 +342,7 @@ index f0af6ac..16b512e 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile
-index a82e28c..f364a53 100644
+index b220bc1..d407327 100644
--- a/lib/hipe/icode/Makefile
+++ b/lib/hipe/icode/Makefile
@@ -120,7 +120,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -334,10 +355,10 @@ index a82e28c..f364a53 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/llvm/Makefile b/lib/hipe/llvm/Makefile
-index f6f6f6b..4369923 100644
+index 88016a7..d8e8fa0 100644
--- a/lib/hipe/llvm/Makefile
+++ b/lib/hipe/llvm/Makefile
-@@ -103,7 +103,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/llvm
@@ -347,7 +368,7 @@ index f6f6f6b..4369923 100644
$(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile
-index d44be2d..ed81f10 100644
+index 8ef31db..80d2881 100644
--- a/lib/hipe/main/Makefile
+++ b/lib/hipe/main/Makefile
@@ -118,7 +118,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -360,7 +381,7 @@ index d44be2d..ed81f10 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/misc/Makefile b/lib/hipe/misc/Makefile
-index be5c9bc..d40b322 100644
+index 72cfff2..e55223a 100644
--- a/lib/hipe/misc/Makefile
+++ b/lib/hipe/misc/Makefile
@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -373,7 +394,7 @@ index be5c9bc..d40b322 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile
-index 1bf52fe..5049bec 100644
+index b4cdf8b..f9ebcae 100644
--- a/lib/hipe/rtl/Makefile
+++ b/lib/hipe/rtl/Makefile
@@ -105,7 +105,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -386,7 +407,7 @@ index 1bf52fe..5049bec 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile
-index 4a78ad7..1b1ce05 100644
+index 66e9421..1951742 100644
--- a/lib/hipe/util/Makefile
+++ b/lib/hipe/util/Makefile
@@ -50,7 +50,6 @@ HIPE_MODULES =
@@ -407,7 +428,7 @@ index 4a78ad7..1b1ce05 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/ic/src/Makefile b/lib/ic/src/Makefile
-index a6da81a..60870be 100644
+index 6ad2fbe..258517d 100644
--- a/lib/ic/src/Makefile
+++ b/lib/ic/src/Makefile
@@ -200,7 +200,7 @@ release_spec: opt
@@ -420,7 +441,7 @@ index a6da81a..60870be 100644
$(INSTALL_DIR) "$(RELSYSDIR)/examples/c-client"
$(INSTALL_DATA) $(CCL_EX_FILES) "$(RELSYSDIR)/examples/c-client"
diff --git a/lib/inets/src/ftp/Makefile b/lib/inets/src/ftp/Makefile
-index f8daa2b..48e5d49 100644
+index 6b99694..530a19e 100644
--- a/lib/inets/src/ftp/Makefile
+++ b/lib/inets/src/ftp/Makefile
@@ -91,7 +91,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -433,7 +454,7 @@ index f8daa2b..48e5d49 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/http_client/Makefile b/lib/inets/src/http_client/Makefile
-index cb97b52..cb13dfb 100644
+index a1c1f36..f2eb86f 100644
--- a/lib/inets/src/http_client/Makefile
+++ b/lib/inets/src/http_client/Makefile
@@ -92,7 +92,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -446,7 +467,7 @@ index cb97b52..cb13dfb 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/http_lib/Makefile b/lib/inets/src/http_lib/Makefile
-index 4a4eef9..c779c8e 100644
+index 8248e37..1f1b231 100644
--- a/lib/inets/src/http_lib/Makefile
+++ b/lib/inets/src/http_lib/Makefile
@@ -90,7 +90,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -472,10 +493,10 @@ index 1c05d45..88f9f62 100644
$(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile
-index 7f51676..093f462 100644
+index eb0098d..fff21ff 100644
--- a/lib/inets/src/inets_app/Makefile
+++ b/lib/inets/src/inets_app/Makefile
-@@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -114,7 +114,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/src/inets_app"
@@ -485,7 +506,7 @@ index 7f51676..093f462 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/inets/src/tftp/Makefile b/lib/inets/src/tftp/Makefile
-index d5d94e1..5583064 100644
+index 4eaa959..198fbf3 100644
--- a/lib/inets/src/tftp/Makefile
+++ b/lib/inets/src/tftp/Makefile
@@ -96,7 +96,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -498,10 +519,10 @@ index d5d94e1..5583064 100644
$(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
-index 57daceb..1cebd80 100644
+index 2b72f78..31eed45 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
-@@ -200,7 +200,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -202,7 +202,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -510,7 +531,7 @@ index 57daceb..1cebd80 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/megaco/src/app/Makefile b/lib/megaco/src/app/Makefile
-index 8f8e6ec..9e0bc82 100644
+index ab45548..5c7a7f0 100644
--- a/lib/megaco/src/app/Makefile
+++ b/lib/megaco/src/app/Makefile
@@ -114,7 +114,7 @@ release_spec: opt
@@ -523,7 +544,7 @@ index 8f8e6ec..9e0bc82 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/megaco/src/binary/Makefile b/lib/megaco/src/binary/Makefile
-index 711fbb7..1db4593 100644
+index b964366..5b5a4cf 100644
--- a/lib/megaco/src/binary/Makefile
+++ b/lib/megaco/src/binary/Makefile
@@ -176,7 +176,7 @@ release_spec: opt
@@ -536,7 +557,7 @@ index 711fbb7..1db4593 100644
release_docs_spec:
diff --git a/lib/megaco/src/engine/Makefile b/lib/megaco/src/engine/Makefile
-index 208942c..d5b7218 100644
+index 869b516..fa7d774 100644
--- a/lib/megaco/src/engine/Makefile
+++ b/lib/megaco/src/engine/Makefile
@@ -102,7 +102,7 @@ release_spec: opt
@@ -549,7 +570,7 @@ index 208942c..d5b7218 100644
diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
-index 39be02a..8c6ba31 100644
+index 09bf1ef..b320b2e 100644
--- a/lib/megaco/src/flex/Makefile.in
+++ b/lib/megaco/src/flex/Makefile.in
@@ -268,7 +268,6 @@ release_spec: opt
@@ -561,7 +582,7 @@ index 39be02a..8c6ba31 100644
ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
$(INSTALL_DATA) $(FLEX_FILES) "$(RELSYSDIR)/src/flex"
diff --git a/lib/megaco/src/tcp/Makefile b/lib/megaco/src/tcp/Makefile
-index 0c546a8..78f659a 100644
+index d07db3f..7f421d2 100644
--- a/lib/megaco/src/tcp/Makefile
+++ b/lib/megaco/src/tcp/Makefile
@@ -94,7 +94,7 @@ release_spec: opt
@@ -574,7 +595,7 @@ index 0c546a8..78f659a 100644
release_docs_spec:
diff --git a/lib/megaco/src/text/Makefile b/lib/megaco/src/text/Makefile
-index f4fc56a..1cc73fd 100644
+index 8e7e82b..2a118d2 100644
--- a/lib/megaco/src/text/Makefile
+++ b/lib/megaco/src/text/Makefile
@@ -135,7 +135,7 @@ release_spec: opt
@@ -587,7 +608,7 @@ index f4fc56a..1cc73fd 100644
release_docs_spec:
diff --git a/lib/megaco/src/udp/Makefile b/lib/megaco/src/udp/Makefile
-index 7288c20..aefd9f3 100644
+index 028a63e..9e11e9b 100644
--- a/lib/megaco/src/udp/Makefile
+++ b/lib/megaco/src/udp/Makefile
@@ -94,7 +94,7 @@ release_spec: opt
@@ -600,10 +621,10 @@ index 7288c20..aefd9f3 100644
release_docs_spec:
diff --git a/lib/mnesia/src/Makefile b/lib/mnesia/src/Makefile
-index dae0df7..6294ae9 100644
+index 08a00e6..a21ffb3 100644
--- a/lib/mnesia/src/Makefile
+++ b/lib/mnesia/src/Makefile
-@@ -133,7 +133,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -135,7 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -613,10 +634,10 @@ index dae0df7..6294ae9 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
-index 2d42510..7579014 100644
+index dd7831f..1d5c505 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
-@@ -152,7 +152,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -153,7 +153,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -625,7 +646,7 @@ index 2d42510..7579014 100644
$(INSTALL_DIR) "$(RELSYSDIR)/examples"
$(INSTALL_DATA) $(EXAMPLE_FILES) "$(RELSYSDIR)/examples"
diff --git a/lib/odbc/src/Makefile b/lib/odbc/src/Makefile
-index 51c9ed3..50a4c10 100644
+index 7ca5949..a52ade2 100644
--- a/lib/odbc/src/Makefile
+++ b/lib/odbc/src/Makefile
@@ -110,7 +110,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -638,7 +659,7 @@ index 51c9ed3..50a4c10 100644
$(INSTALL_DATA) $(EXT_HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/orber/COSS/CosNaming/Makefile b/lib/orber/COSS/CosNaming/Makefile
-index 0eca8dd..18d9627 100644
+index 1086633..553c9cd 100644
--- a/lib/orber/COSS/CosNaming/Makefile
+++ b/lib/orber/COSS/CosNaming/Makefile
@@ -145,8 +145,8 @@ release_spec: opt
@@ -653,7 +674,7 @@ index 0eca8dd..18d9627 100644
release_docs_spec:
diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile
-index 30b74c4..9c6708f 100644
+index 7fec29a..a71b9f1 100644
--- a/lib/orber/src/Makefile
+++ b/lib/orber/src/Makefile
@@ -253,7 +253,7 @@ release_spec: opt
@@ -666,7 +687,7 @@ index 30b74c4..9c6708f 100644
$(INSTALL_DATA) $(EXTERNAL_HRL_FILES) $(GEN_HRL_FILES_EXT) "$(RELSYSDIR)/include"
diff --git a/lib/os_mon/src/Makefile b/lib/os_mon/src/Makefile
-index 1003d24..1b12154 100644
+index 29b53a8..3ae2074 100644
--- a/lib/os_mon/src/Makefile
+++ b/lib/os_mon/src/Makefile
@@ -105,7 +105,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -677,22 +698,8 @@ index 1003d24..1b12154 100644
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
-diff --git a/lib/ose/src/Makefile b/lib/ose/src/Makefile
-index a89e939..224d944 100644
---- a/lib/ose/src/Makefile
-+++ b/lib/ose/src/Makefile
-@@ -94,9 +94,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- include $(ERL_TOP)/make/otp_release_targets.mk
-
- release_spec: opt
-- $(INSTALL_DIR) "$(RELSYSDIR)/src"
-- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
-- $(INSTALL_DIR) "$(RELSYSDIR)/include"
- $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
-
diff --git a/lib/otp_mibs/src/Makefile b/lib/otp_mibs/src/Makefile
-index 03892cd..c3ad326 100644
+index 4023f50..864a0a5 100644
--- a/lib/otp_mibs/src/Makefile
+++ b/lib/otp_mibs/src/Makefile
@@ -96,8 +96,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
@@ -705,7 +712,7 @@ index 03892cd..c3ad326 100644
$(INSTALL_DATA) $(TARGETS) "$(RELSYSDIR)/ebin"
diff --git a/lib/parsetools/src/Makefile b/lib/parsetools/src/Makefile
-index dbecdd2..1d45801 100644
+index dea29be..655aea9 100644
--- a/lib/parsetools/src/Makefile
+++ b/lib/parsetools/src/Makefile
@@ -91,8 +91,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
@@ -718,7 +725,7 @@ index dbecdd2..1d45801 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile
-index 9b963e0..deeb75c 100644
+index b2ec87d..3153e34 100644
--- a/lib/percept/src/Makefile
+++ b/lib/percept/src/Makefile
@@ -97,7 +97,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -730,7 +737,7 @@ index 9b963e0..deeb75c 100644
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
# $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile
-index 7474297..a510658 100644
+index a920ea8..7672ef3 100644
--- a/lib/public_key/asn1/Makefile
+++ b/lib/public_key/asn1/Makefile
@@ -96,8 +96,8 @@ release_spec: opt
@@ -745,7 +752,7 @@ index 7474297..a510658 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/public_key/src/Makefile b/lib/public_key/src/Makefile
-index 786f244..0463c67 100644
+index e61390b..6ed6c2c 100644
--- a/lib/public_key/src/Makefile
+++ b/lib/public_key/src/Makefile
@@ -109,8 +109,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
@@ -758,7 +765,7 @@ index 786f244..0463c67 100644
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/reltool/src/Makefile b/lib/reltool/src/Makefile
-index 1fea415..a756470 100644
+index 4bddee4..c714255 100644
--- a/lib/reltool/src/Makefile
+++ b/lib/reltool/src/Makefile
@@ -100,7 +100,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -771,10 +778,10 @@ index 1fea415..a756470 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/runtime_tools/src/Makefile b/lib/runtime_tools/src/Makefile
-index 99b90f9..25b3ebb 100644
+index 2c90295..d674a8f 100644
--- a/lib/runtime_tools/src/Makefile
+++ b/lib/runtime_tools/src/Makefile
-@@ -97,8 +97,6 @@ docs:
+@@ -99,8 +99,6 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@@ -784,7 +791,7 @@ index 99b90f9..25b3ebb 100644
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/examples"
diff --git a/lib/sasl/src/Makefile b/lib/sasl/src/Makefile
-index 7ff6a03..a304900 100644
+index ac7ee51..c53f661 100644
--- a/lib/sasl/src/Makefile
+++ b/lib/sasl/src/Makefile
@@ -93,7 +93,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -796,7 +803,7 @@ index 7ff6a03..a304900 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/snmp/src/agent/Makefile b/lib/snmp/src/agent/Makefile
-index 89037b3..01de885 100644
+index 2943a4d..8203e62 100644
--- a/lib/snmp/src/agent/Makefile
+++ b/lib/snmp/src/agent/Makefile
@@ -131,7 +131,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -809,7 +816,7 @@ index 89037b3..01de885 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/snmp/src/app/Makefile b/lib/snmp/src/app/Makefile
-index 7972d95..78a9f2b 100644
+index 6f2b8a4..bd062a6 100644
--- a/lib/snmp/src/app/Makefile
+++ b/lib/snmp/src/app/Makefile
@@ -132,7 +132,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -822,7 +829,7 @@ index 7972d95..78a9f2b 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/snmp/src/compile/Makefile b/lib/snmp/src/compile/Makefile
-index 54f2e22..488faa4 100644
+index 4093ffa..18878aa 100644
--- a/lib/snmp/src/compile/Makefile
+++ b/lib/snmp/src/compile/Makefile
@@ -123,7 +123,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -835,7 +842,7 @@ index 54f2e22..488faa4 100644
$(INSTALL_DATA) $(EBIN_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/bin"
diff --git a/lib/snmp/src/manager/Makefile b/lib/snmp/src/manager/Makefile
-index 382f83b..db50c26 100644
+index 0cc8749..d203f28 100644
--- a/lib/snmp/src/manager/Makefile
+++ b/lib/snmp/src/manager/Makefile
@@ -114,7 +114,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -848,7 +855,7 @@ index 382f83b..db50c26 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
diff --git a/lib/snmp/src/misc/Makefile b/lib/snmp/src/misc/Makefile
-index c71ecf9..d17e699 100644
+index adc2c48..89ce954 100644
--- a/lib/snmp/src/misc/Makefile
+++ b/lib/snmp/src/misc/Makefile
@@ -112,7 +112,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -861,10 +868,10 @@ index c71ecf9..d17e699 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
diff --git a/lib/ssh/src/Makefile b/lib/ssh/src/Makefile
-index b44c8ee..8f8b58d 100644
+index 69d5a47..c79ffd1 100644
--- a/lib/ssh/src/Makefile
+++ b/lib/ssh/src/Makefile
-@@ -135,7 +135,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -136,7 +136,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -874,10 +881,10 @@ index b44c8ee..8f8b58d 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 7a7a373..419fa9e 100644
+index b625db0..9172486 100644
--- a/lib/ssl/src/Makefile
+++ b/lib/ssl/src/Makefile
-@@ -142,7 +142,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -143,7 +143,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -887,10 +894,10 @@ index 7a7a373..419fa9e 100644
$(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \
$(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
-index 9f4a446..50ac11e 100644
+index 302834f..53804f8 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
-@@ -207,7 +207,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -208,7 +208,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -899,7 +906,7 @@ index 9f4a446..50ac11e 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/syntax_tools/src/Makefile b/lib/syntax_tools/src/Makefile
-index 2e91adf..0085fca 100644
+index 8325db4..d17fdaa 100644
--- a/lib/syntax_tools/src/Makefile
+++ b/lib/syntax_tools/src/Makefile
@@ -100,8 +100,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -911,23 +918,11 @@ index 2e91adf..0085fca 100644
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
-diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile
-index 6a26ee2..7336477 100644
---- a/lib/test_server/src/Makefile
-+++ b/lib/test_server/src/Makefile
-@@ -124,7 +124,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
-
- release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
-- $(INSTALL_DATA) $(ERL_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
-index 9fcfb79..b30b173 100644
+index 032bd61..efb0309 100644
--- a/lib/tools/src/Makefile
+++ b/lib/tools/src/Makefile
-@@ -107,7 +107,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+@@ -106,7 +106,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@@ -937,7 +932,7 @@ index 9fcfb79..b30b173 100644
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
"$(RELSYSDIR)/ebin"
diff --git a/lib/typer/src/Makefile b/lib/typer/src/Makefile
-index 620ca21..9c9390e 100644
+index 6c5d8b0..82f516a 100644
--- a/lib/typer/src/Makefile
+++ b/lib/typer/src/Makefile
@@ -102,9 +102,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
@@ -950,21 +945,8 @@ index 620ca21..9c9390e 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
-diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile
-index a5a8eaf..be80ba7 100644
---- a/lib/webtool/src/Makefile
-+++ b/lib/webtool/src/Makefile
-@@ -88,8 +88,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- include $(ERL_TOP)/make/otp_release_targets.mk
-
- release_spec: opt
-- $(INSTALL_DIR) "$(RELSYSDIR)/src"
-- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
- $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \
- "$(RELSYSDIR)/ebin"
diff --git a/lib/wx/src/Makefile b/lib/wx/src/Makefile
-index b345e34..153a270 100644
+index 21b45af..a7bf34f 100644
--- a/lib/wx/src/Makefile
+++ b/lib/wx/src/Makefile
@@ -122,9 +122,9 @@ $(EBIN)/%.beam: $(EGEN)/%.erl $(HEADER_FILES)
@@ -980,7 +962,7 @@ index b345e34..153a270 100644
$(INSTALL_DATA) $(EXT_HRL) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/xmerl/src/Makefile b/lib/xmerl/src/Makefile
-index f8f0320..099513e 100644
+index 51d9190..1ab65bd 100644
--- a/lib/xmerl/src/Makefile
+++ b/lib/xmerl/src/Makefile
@@ -218,9 +218,7 @@ release_spec: opt
diff --git a/otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch b/otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
similarity index 54%
rename from otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
rename to otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
index 8b8fd0d..664f559 100644
--- a/otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch
+++ b/otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Respect -proto_dist switch while connection to EPMD
Signed-off-by: Peter Lemenkov
diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
-index c6202dd..ec2e330 100644
+index f8ef4a4..79a026a 100644
--- a/lib/kernel/src/erl_epmd.erl
+++ b/lib/kernel/src/erl_epmd.erl
@@ -103,6 +103,10 @@ names(EpmdAddr) ->
@@ -20,15 +20,28 @@ index c6202dd..ec2e330 100644
gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
-index 64b28bb..ffbd5d5 100644
+index f91d7ef..94bde55 100644
--- a/lib/kernel/src/inet_tcp_dist.erl
+++ b/lib/kernel/src/inet_tcp_dist.erl
-@@ -73,7 +73,7 @@ gen_listen(Driver, Name) ->
- {ok, Socket} ->
+@@ -74,7 +74,7 @@ gen_listen(Driver, Name) ->
TcpAddress = get_tcp_address(Driver, Socket),
{_,Port} = TcpAddress#net_address.address,
-- case erl_epmd:register_node(Name, Port) of
-+ case erl_epmd:register_node(Name, Port, Driver) of
+ ErlEpmd = net_kernel:epmd_module(),
+- case ErlEpmd:register_node(Name, Port) of
++ case ErlEpmd:register_node(Name, Port, Driver) of
{ok, Creation} ->
{ok, {Socket, TcpAddress, Creation}};
Error ->
+diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
+index a920f54..08947f2 100644
+--- a/lib/ssl/src/ssl_tls_dist_proxy.erl
++++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
+@@ -117,7 +117,7 @@ handle_call({listen, Driver, Name}, _From, State) ->
+ {ok, WorldTcpAddress} = get_tcp_address(World),
+ {_,Port} = WorldTcpAddress#net_address.address,
+ ErlEpmd = net_kernel:epmd_module(),
+- case ErlEpmd:register_node(Name, Port) of
++ case ErlEpmd:register_node(Name, Port, Driver) of
+ {ok, Creation} ->
+ {reply, {ok, {Socket, TcpAddress, Creation}},
+ State#state{listen={Socket, World}}};
diff --git a/otp-0007-Split-off-webtool-dependency-from-tools.patch b/otp-0007-Split-off-webtool-dependency-from-tools.patch
deleted file mode 100644
index 9a06884..0000000
--- a/otp-0007-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 ae8b3f2..539ca96 100644
---- a/lib/tools/src/cover_web.erl
-+++ b/lib/tools/src/cover_web.erl
-@@ -51,14 +51,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-Add-patch-to-crash-dump-on-large-distribution.patch b/otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
deleted file mode 100644
index d148331..0000000
--- a/otp-0008-Add-patch-to-crash-dump-on-large-distribution.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: John Eckersberg
-Date: Wed, 16 Dec 2015 11:03:42 -0500
-Subject: [PATCH] Add patch to crash dump on large distribution
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1291822
-https://bugzilla.redhat.com/show_bug.cgi?id=1291855
-https://bugzilla.redhat.com/show_bug.cgi?id=1291856
-https://bugzilla.redhat.com/show_bug.cgi?id=1291857
-
-diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
-index 787241b..069d80a 100644
---- a/erts/emulator/beam/dist.c
-+++ b/erts/emulator/beam/dist.c
-@@ -1980,7 +1980,7 @@ dist_port_command(Port *prt, ErtsDistOutputBuf *obuf)
- ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(prt));
-
- if (size > (Uint) INT_MAX)
-- erts_exit(ERTS_ABORT_EXIT,
-+ erts_exit(ERTS_DUMP_EXIT,
- "Absurdly large distribution output data buffer "
- "(%beu bytes) passed.\n",
- size);
-@@ -2020,7 +2020,7 @@ dist_port_commandv(Port *prt, ErtsDistOutputBuf *obuf)
- ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(prt));
-
- if (size > (Uint) INT_MAX)
-- erts_exit(ERTS_ABORT_EXIT,
-+ erts_exit(ERTS_DUMP_EXIT,
- "Absurdly large distribution output data buffer "
- "(%beu bytes) passed.\n",
- size);
diff --git a/otp-0009-Don-t-send-unasked-for-systemd-notifications.patch b/otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
deleted file mode 100644
index 1d19ace..0000000
--- a/otp-0009-Don-t-send-unasked-for-systemd-notifications.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From: Alexey Lebedeff
-Date: Tue, 29 Mar 2016 20:30:22 +0300
-Subject: [PATCH] Don't send unasked for systemd notifications
-
-Suppose we have some erlang system that uses systemd unit with
-Type=notify - so this should send startup confirmation itself. But if
-systemd-enabled epmd will be started as a first step of that system
-startup, empd startup confirmation will be misinterpeted by systemd. And
-our erlang service will be considered 'ready' to early. Also this will
-interefere with systemd MAINPID detection: systemd will be monitoring
-`epmd` process instead of `beam` one.
-
-For example, rabbitmq works around this issue by starting epmd using
-separate short-lived beam process, with NOTIFY_SOCKET environment
-variable reset - only in this way we could be sure that epmd will not
-interfere with rabbit startup sequence.
-
-This patch disables indiscriminate confirmation sending, and does it
-only when it was explicitly asked to do so.
-
-diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
-index 5513cb2..4740ce8 100644
---- a/erts/epmd/src/epmd.c
-+++ b/erts/epmd/src/epmd.c
-@@ -592,8 +592,10 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval)
- free(g->argv);
- }
- #ifdef HAVE_SYSTEMD_DAEMON
-- sd_notifyf(0, "STATUS=Exited.\n"
-- "ERRNO=%i", exitval);
-+ if (g->is_systemd){
-+ sd_notifyf(0, "STATUS=Exited.\n"
-+ "ERRNO=%i", exitval);
-+ }
- #endif /* HAVE_SYSTEMD_DAEMON */
- exit(exitval);
- }
-diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
-index e1bac99..59d59ad 100644
---- a/erts/epmd/src/epmd_srv.c
-+++ b/erts/epmd/src/epmd_srv.c
-@@ -452,9 +452,11 @@ void run(EpmdVars *g)
- num_sockets = bound;
- #ifdef HAVE_SYSTEMD_DAEMON
- }
-- sd_notifyf(0, "READY=1\n"
-- "STATUS=Processing port mapping requests...\n"
-- "MAINPID=%lu", (unsigned long) getpid());
-+ if (g->is_systemd) {
-+ sd_notifyf(0, "READY=1\n"
-+ "STATUS=Processing port mapping requests...\n"
-+ "MAINPID=%lu", (unsigned long) getpid());
-+ }
- #endif /* HAVE_SYSTEMD_DAEMON */
-
- dbg_tty_printf(g,2,"entering the main select() loop");
diff --git a/otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch b/otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
deleted file mode 100644
index d832978..0000000
--- a/otp-0010-Fix-decoding-of-LLONG_MIN-in-erl_decode.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?=
-Date: Fri, 10 Jun 2016 16:40:38 +0200
-Subject: [PATCH] Fix decoding of LLONG_MIN in erl_decode
-
-Reported-by: Peter Lemenkov
-
-diff --git a/lib/erl_interface/src/legacy/erl_marshal.c b/lib/erl_interface/src/legacy/erl_marshal.c
-index a4216c9..6a1b573 100644
---- a/lib/erl_interface/src/legacy/erl_marshal.c
-+++ b/lib/erl_interface/src/legacy/erl_marshal.c
-@@ -727,6 +727,13 @@ static ETERM *erl_decode_it(unsigned char **ext)
- ((*ext)[2]) << 8 |((*ext)[3]);
- *ext += 4;
- big_cont:
-+
-+#ifdef _MSC_VER
-+#define MAX_TO_NEGATE 0x8000000000000000Ui64
-+#else
-+#define MAX_TO_NEGATE 0x8000000000000000ULL
-+#endif
-+
- sign = *(*ext)++;
- if (arity > 8)
- goto big_truncate;
-@@ -763,23 +770,28 @@ static ETERM *erl_decode_it(unsigned char **ext)
- *ext += arity;
- return ep;
- } else {
-- /* Fits in a long long */
-- int x;
-- long long l = 0LL;
--
-- for(x = 0 ; x < arity ; x++) {
-- l |= ((long long)(*ext)[x]) << ((long long)(8*x));
-- }
-- if (sign) {
-- l = -l;
-- if (l > 0) goto big_truncate;
-- }
--
-- ERL_TYPE(ep) = ERL_LONGLONG;
-- ep->uval.llval.i = l;
-- *ext += arity;
-- return ep;
-+ /* Fits in a signed long long */
-+ int x;
-+ unsigned long long l = 0LL;
-+ long long sl;
-+
-+ for(x = 0 ; x < arity ; x++) {
-+ l |= ((unsigned long long)(*ext)[x]) << ((unsigned long long)(8*x));
-+ }
-+
-+ sl = (long long)l;
-+
-+ if (sign && l != MAX_TO_NEGATE) {
-+ sl = -sl;
-+ if (sl > 0) goto big_truncate;
-+ }
-+
-+ ERL_TYPE(ep) = ERL_LONGLONG;
-+ ep->uval.llval.i = sl;
-+ *ext += arity;
-+ return ep;
- }
-+#undef MAX_TO_NEGATE
- big_truncate:
- /* truncate to: (+/-) 1 */
- #ifdef DEBUG
diff --git a/sources b/sources
index 1a7d38d..036b00a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fd9934b664769500f3216f688eb57493 otp-OTP-18.3.4.2.tar.gz
+4f3ce6ba4288bda714e58d30ea9c2e69 otp-OTP-19.0.2.tar.gz
From 1dbb469f04f2b554ed363dddb1dd89db35cc5400 Mon Sep 17 00:00:00 2001
From: Michal Toman
Date: Fri, 12 Aug 2016 15:31:51 +0300
Subject: [PATCH 057/305] Disable doc on MIPS
---
erlang.spec | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index e22de86..0b0958f 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -2,7 +2,8 @@
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
-%ifarch %{arm}
+%ifarch %{arm} %{mips}
+# MIPS does not have all dependencies for fop yet
# For some reason, fop hangs on arm, so for now don't generate docs by
# default
%bcond_with doc
@@ -65,7 +66,7 @@
Name: erlang
Version: 19.0.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2313,6 +2314,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Fri Aug 12 2016 Michal Toman - 19.0.2-2
+- Disable doc on MIPS
+
* Wed Jul 27 2016 Peter Lemenkov - 19.0.2-1
- Ver. 19.0.2
- The following packages were removed - ose, test_server (merged into common_test), webtool
From c675b92935473afcfca05611f92493ed9ae0f824 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 16 Aug 2016 15:34:33 +0300
Subject: [PATCH 058/305] Ver. 19.0.4
Signed-off-by: Peter Lemenkov
---
erlang.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 0b0958f..63937ec 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,8 +65,8 @@
Name: erlang
-Version: 19.0.2
-Release: 2%{?dist}
+Version: 19.0.4
+Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -2314,6 +2314,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Aug 16 2016 Peter Lemenkov - 19.0.4-1
+- Ver. 19.0.4
+
* Fri Aug 12 2016 Michal Toman - 19.0.2-2
- Disable doc on MIPS
From 8f2d59ec11bac95a16f9a230a94153338f2dcef7 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 16 Aug 2016 15:36:06 +0300
Subject: [PATCH 059/305] Forgot to upload sources as usual
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
sources | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index bdf9fb8..b30e413 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,3 +66,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.4.1.tar.gz
/otp-OTP-18.3.4.2.tar.gz
/otp-OTP-19.0.2.tar.gz
+/otp-OTP-19.0.4.tar.gz
diff --git a/sources b/sources
index 036b00a..675d895 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4f3ce6ba4288bda714e58d30ea9c2e69 otp-OTP-19.0.2.tar.gz
+8ce215c1b501512038668c9907f64000 otp-OTP-19.0.4.tar.gz
From c275ae24448adc3003c86a8245e3cd1502941131 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 23 Aug 2016 15:23:02 +0300
Subject: [PATCH 060/305] Ver. 19.0.5
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index b30e413..f3dbf29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,3 +67,4 @@ otp_src_R14A.tar.gz
/otp-OTP-18.3.4.2.tar.gz
/otp-OTP-19.0.2.tar.gz
/otp-OTP-19.0.4.tar.gz
+/otp-OTP-19.0.5.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 63937ec..fdf7962 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.0.4
+Version: 19.0.5
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2314,6 +2314,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Aug 23 2016 Peter Lemenkov - 19.0.5-1
+- Ver. 19.0.5
+
* Tue Aug 16 2016 Peter Lemenkov - 19.0.4-1
- Ver. 19.0.4
diff --git a/sources b/sources
index 675d895..082373f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8ce215c1b501512038668c9907f64000 otp-OTP-19.0.4.tar.gz
+95f3a3c46d0e2879eb6ecb9ca98ad55e otp-OTP-19.0.5.tar.gz
From 8547d3fbbca7ffe44415c5b3fd9f7458a9579043 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 14 Sep 2016 13:49:12 +0300
Subject: [PATCH 061/305] Ver. 19.0.6
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index f3dbf29..f6061a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,3 +68,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.0.2.tar.gz
/otp-OTP-19.0.4.tar.gz
/otp-OTP-19.0.5.tar.gz
+/otp-OTP-19.0.6.tar.gz
diff --git a/erlang.spec b/erlang.spec
index fdf7962..ddd03ee 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.0.5
+Version: 19.0.6
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2314,6 +2314,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Sep 14 2016 Peter Lemenkov - 19.0.6-1
+- Ver. 19.0.6
+
* Tue Aug 23 2016 Peter Lemenkov - 19.0.5-1
- Ver. 19.0.5
diff --git a/sources b/sources
index 082373f..c001d10 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-95f3a3c46d0e2879eb6ecb9ca98ad55e otp-OTP-19.0.5.tar.gz
+a98b0f01a71d2f7e1ad6ccbee8cf7f5f otp-OTP-19.0.6.tar.gz
From ab704de8521e89ed5198b060b7500a50df50435d Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 14 Sep 2016 17:22:48 +0300
Subject: [PATCH 062/305] Ver. 19.0.7
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index f6061a1..7ad148d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,3 +69,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.0.4.tar.gz
/otp-OTP-19.0.5.tar.gz
/otp-OTP-19.0.6.tar.gz
+/otp-OTP-19.0.7.tar.gz
diff --git a/erlang.spec b/erlang.spec
index ddd03ee..d5e456a 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.0.6
+Version: 19.0.7
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2314,6 +2314,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Sep 14 2016 Peter Lemenkov - 19.0.7-1
+- Ver. 19.0.7
+
* Wed Sep 14 2016 Peter Lemenkov - 19.0.6-1
- Ver. 19.0.6
diff --git a/sources b/sources
index c001d10..feafc4c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a98b0f01a71d2f7e1ad6ccbee8cf7f5f otp-OTP-19.0.6.tar.gz
+a167a4e2a845ca1d86be4dcb7284b3f0 otp-OTP-19.0.7.tar.gz
From bf974e29d198d9ca2b38586e9928d4e41b62dd93 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 4 Oct 2016 14:58:17 +0200
Subject: [PATCH 063/305] Ver. 19.1.1
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 9 ++--
otp-0006-Do-not-install-erlang-sources.patch | 6 +--
...dist-switch-while-connection-to-EPMD.patch | 47 -------------------
sources | 2 +-
5 files changed, 9 insertions(+), 56 deletions(-)
delete mode 100644 otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
diff --git a/.gitignore b/.gitignore
index 7ad148d..bba2587 100644
--- a/.gitignore
+++ b/.gitignore
@@ -70,3 +70,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.0.5.tar.gz
/otp-OTP-19.0.6.tar.gz
/otp-OTP-19.0.7.tar.gz
+/otp-OTP-19.1.1.tar.gz
diff --git a/erlang.spec b/erlang.spec
index d5e456a..53dc646 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.0.7
+Version: 19.1.1
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -116,9 +116,6 @@ Patch5: otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
# Fedora specific patch
# Do not install erlang sources
Patch6: otp-0006-Do-not-install-erlang-sources.patch
-# Fedora specific patch
-# Respect -proto_dist switch while connection to EPMD
-Patch7: otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
# end of autogenerated patch tag list
BuildRequires: flex
@@ -929,7 +926,6 @@ Provides support for XML 1.0.
%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 .Respect_proto_dist_switch_while_connection_to_EPMD
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2314,6 +2310,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Oct 4 2016 Peter Lemenkov - 19.1.1-1
+- Ver. 19.1.1
+
* Wed Sep 14 2016 Peter Lemenkov - 19.0.7-1
- Ver. 19.0.7
diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch
index 564546a..ae403a8 100644
--- a/otp-0006-Do-not-install-erlang-sources.patch
+++ b/otp-0006-Do-not-install-erlang-sources.patch
@@ -8,10 +8,10 @@ Signed-off-by: Peter Lemenkov
Signed-off-by: Hans Ulrich Niedermann
diff --git a/erts/preloaded/src/Makefile b/erts/preloaded/src/Makefile
-index 4a447d3..eac5ae5 100644
+index 2ab9eda..9b8ed35 100644
--- a/erts/preloaded/src/Makefile
+++ b/erts/preloaded/src/Makefile
-@@ -88,8 +88,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
+@@ -90,8 +90,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: $(APP_TARGET)
@@ -213,7 +213,7 @@ index 256f20f..2920c0f 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile
-index 7f61620..cade771 100644
+index 6bf748a..962d7b7 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
@@ -251,11 +251,8 @@ release_spec: opt
diff --git a/otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch b/otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
deleted file mode 100644
index 664f559..0000000
--- a/otp-0007-Respect-proto_dist-switch-while-connection-to-EPMD.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Peter Lemenkov
-Date: Thu, 14 Jul 2016 17:51:16 +0300
-Subject: [PATCH] Respect -proto_dist switch while connection to EPMD
-
-Signed-off-by: Peter Lemenkov
-
-diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
-index f8ef4a4..79a026a 100644
---- a/lib/kernel/src/erl_epmd.erl
-+++ b/lib/kernel/src/erl_epmd.erl
-@@ -103,6 +103,10 @@ names(EpmdAddr) ->
-
- register_node(Name, PortNo) ->
- register_node(Name, PortNo, inet).
-+register_node(Name, PortNo, inet_tcp) ->
-+ register_node(Name, PortNo, inet);
-+register_node(Name, PortNo, inet6_tcp) ->
-+ register_node(Name, PortNo, inet6);
- register_node(Name, PortNo, Family) ->
- gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
-
-diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
-index f91d7ef..94bde55 100644
---- a/lib/kernel/src/inet_tcp_dist.erl
-+++ b/lib/kernel/src/inet_tcp_dist.erl
-@@ -74,7 +74,7 @@ gen_listen(Driver, Name) ->
- TcpAddress = get_tcp_address(Driver, Socket),
- {_,Port} = TcpAddress#net_address.address,
- ErlEpmd = net_kernel:epmd_module(),
-- case ErlEpmd:register_node(Name, Port) of
-+ case ErlEpmd:register_node(Name, Port, Driver) of
- {ok, Creation} ->
- {ok, {Socket, TcpAddress, Creation}};
- Error ->
-diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
-index a920f54..08947f2 100644
---- a/lib/ssl/src/ssl_tls_dist_proxy.erl
-+++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
-@@ -117,7 +117,7 @@ handle_call({listen, Driver, Name}, _From, State) ->
- {ok, WorldTcpAddress} = get_tcp_address(World),
- {_,Port} = WorldTcpAddress#net_address.address,
- ErlEpmd = net_kernel:epmd_module(),
-- case ErlEpmd:register_node(Name, Port) of
-+ case ErlEpmd:register_node(Name, Port, Driver) of
- {ok, Creation} ->
- {reply, {ok, {Socket, TcpAddress, Creation}},
- State#state{listen={Socket, World}}};
diff --git a/sources b/sources
index feafc4c..702791c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a167a4e2a845ca1d86be4dcb7284b3f0 otp-OTP-19.0.7.tar.gz
+4c5d86c58e4f667350026b997622dd5f otp-OTP-19.1.1.tar.gz
From 4dc5608c1acbaad3881e76f6002501ce62ae5b70 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 4 Oct 2016 16:32:18 +0200
Subject: [PATCH 064/305] Removed outdated README
Signed-off-by: Peter Lemenkov
---
erlang.spec | 2 --
1 file changed, 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index 53dc646..fc1cf94 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -1080,7 +1080,6 @@ for i in * ; do mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/lib/$i
popd
cp -av AUTHORS LICENSE.txt README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/PR.template $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif
@@ -1171,7 +1170,6 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%doc %{_docdir}/%{name}-%{version}/COPYRIGHT
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
%doc %{_docdir}/%{name}-%{version}/PR.template
-%doc %{_docdir}/%{name}-%{version}/README
%doc %{_docdir}/%{name}-%{version}/README.md
%endif
From 0ea9e863ea941801d6d81783c381b8b940dca4e9 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 4 Oct 2016 17:12:41 +0200
Subject: [PATCH 065/305] Remove duplicated file
Signed-off-by: Peter Lemenkov
---
erlang.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/erlang.spec b/erlang.spec
index fc1cf94..0150943 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -1081,6 +1081,8 @@ popd
cp -av AUTHORS LICENSE.txt README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/PR.template $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+# We'll package it by marking it explicitly as doc - see below
+rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/README.md
%endif
# Win32-specific man-pages
From dac92bc94fe845a05e1fa6392336d02a809dfcaa Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Thu, 6 Oct 2016 14:07:10 +0200
Subject: [PATCH 066/305] Ver. 19.1.2
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index bba2587..97da459 100644
--- a/.gitignore
+++ b/.gitignore
@@ -71,3 +71,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.0.6.tar.gz
/otp-OTP-19.0.7.tar.gz
/otp-OTP-19.1.1.tar.gz
+/otp-OTP-19.1.2.tar.gz
diff --git a/erlang.spec b/erlang.spec
index 0150943..d146b92 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.1.1
+Version: 19.1.2
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2310,6 +2310,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Thu Oct 6 2016 Peter Lemenkov - 19.1.2-1
+- Ver. 19.1.2
+
* Tue Oct 4 2016 Peter Lemenkov - 19.1.1-1
- Ver. 19.1.1
diff --git a/sources b/sources
index 702791c..4bdb136 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4c5d86c58e4f667350026b997622dd5f otp-OTP-19.1.1.tar.gz
+da7912dbd1995d5ac955e324c1b3cd5f otp-OTP-19.1.2.tar.gz
From de72c4d8e2d072952fe6633c46ce851c8692f638 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 11 Oct 2016 18:55:18 +0300
Subject: [PATCH 067/305] Ver. 19.1.3
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 97da459..17e4424 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,3 +72,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.0.7.tar.gz
/otp-OTP-19.1.1.tar.gz
/otp-OTP-19.1.2.tar.gz
+/otp-OTP-19.1.3.tar.gz
diff --git a/erlang.spec b/erlang.spec
index d146b92..aad276c 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.1.2
+Version: 19.1.3
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2310,6 +2310,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Tue Oct 11 2016 Peter Lemenkov - 19.1.3-1
+- Ver. 19.1.3
+
* Thu Oct 6 2016 Peter Lemenkov - 19.1.2-1
- Ver. 19.1.2
diff --git a/sources b/sources
index 4bdb136..b79613b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-da7912dbd1995d5ac955e324c1b3cd5f otp-OTP-19.1.2.tar.gz
+8f75c23d9fba7d4d4922dafef7691859 otp-OTP-19.1.3.tar.gz
From 48b2d980bd5f9538b4df10fd606009b0d2c77c97 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Tue, 11 Oct 2016 19:55:54 +0300
Subject: [PATCH 068/305] Fix build failure
Signed-off-by: Peter Lemenkov
---
erlang.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/erlang.spec b/erlang.spec
index aad276c..dc251e5 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -1059,8 +1059,8 @@ find $RPM_BUILD_ROOT%{_libdir}/erlang -type f -name info -exec rm -f {} \;
%if %{__with_examples}
# fix 0775 permission on some directories
-find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ssl-*/examples/ -type d -perm 0775 | xargs chmod 755
-find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/kernel-*/examples/uds_dist -type d -perm 0775 | xargs chmod 755
+find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ssl-*/examples/ -type d -perm 0775 -print -exec chmod 755 {} \;
+find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/kernel-*/examples/uds_dist -type d -perm 0775 -print -exec chmod 755 {} \;
%else
# Remove all examples
find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ -mindepth 1 -maxdepth 2 -type d -name examples -exec rm -rf {} \;
From d02dbcf40ad1422e5d4300a37acd3b6d589b71da Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Fri, 14 Oct 2016 14:01:15 +0200
Subject: [PATCH 069/305] Ver. 19.1.4
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 17e4424..039b9cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -73,3 +73,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.1.1.tar.gz
/otp-OTP-19.1.2.tar.gz
/otp-OTP-19.1.3.tar.gz
+/otp-OTP-19.1.4.tar.gz
diff --git a/erlang.spec b/erlang.spec
index dc251e5..a1866b0 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.1.3
+Version: 19.1.4
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2310,6 +2310,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Fri Oct 14 2016 Peter Lemenkov - 19.1.4-1
+- Ver. 19.1.4
+
* Tue Oct 11 2016 Peter Lemenkov - 19.1.3-1
- Ver. 19.1.3
diff --git a/sources b/sources
index b79613b..7022abd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8f75c23d9fba7d4d4922dafef7691859 otp-OTP-19.1.3.tar.gz
+b52160849cdc64a6d6d75e8bef1173eb otp-OTP-19.1.4.tar.gz
From 82d77a4b1fe5080bed3b71f956a3c484ce98abaf Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Mon, 7 Nov 2016 18:30:52 +0300
Subject: [PATCH 070/305] Ver. 19.1.5
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 039b9cb..5779ce6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,3 +74,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.1.2.tar.gz
/otp-OTP-19.1.3.tar.gz
/otp-OTP-19.1.4.tar.gz
+/otp-OTP-19.1.5.tar.gz
diff --git a/erlang.spec b/erlang.spec
index a1866b0..a070b2a 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.1.4
+Version: 19.1.5
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2310,6 +2310,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Mon Nov 7 2016 Peter Lemenkov - 19.1.5-1
+- Ver. 19.1.5
+
* Fri Oct 14 2016 Peter Lemenkov - 19.1.4-1
- Ver. 19.1.4
diff --git a/sources b/sources
index 7022abd..cee9b2f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b52160849cdc64a6d6d75e8bef1173eb otp-OTP-19.1.4.tar.gz
+4c89a2175aff7dde0bd5f30e2d2f49b4 otp-OTP-19.1.5.tar.gz
From 52fefe46a4250608014f1a712d460e6a2ec148a0 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 9 Nov 2016 15:12:54 +0300
Subject: [PATCH 071/305] Ver. 19.1.6
Signed-off-by: Peter Lemenkov
---
.gitignore | 1 +
erlang.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 5779ce6..82ae981 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,3 +75,4 @@ otp_src_R14A.tar.gz
/otp-OTP-19.1.3.tar.gz
/otp-OTP-19.1.4.tar.gz
/otp-OTP-19.1.5.tar.gz
+/otp-OTP-19.1.6.tar.gz
diff --git a/erlang.spec b/erlang.spec
index a070b2a..ec13785 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -65,7 +65,7 @@
Name: erlang
-Version: 19.1.5
+Version: 19.1.6
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
@@ -2310,6 +2310,9 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Nov 9 2016 Peter Lemenkov - 19.1.6-1
+- Ver. 19.1.6
+
* Mon Nov 7 2016 Peter Lemenkov - 19.1.5-1
- Ver. 19.1.5
diff --git a/sources b/sources
index cee9b2f..76873ad 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4c89a2175aff7dde0bd5f30e2d2f49b4 otp-OTP-19.1.5.tar.gz
+2a69d8aa3b9312cea9b3b0813eead2bf otp-OTP-19.1.6.tar.gz
From 4627cfdff14a120761c13d63c39371c082aa71f0 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 9 Nov 2016 17:40:36 +0300
Subject: [PATCH 072/305] Backports for mnesia, and epmd in ipv6-only env
- Respect -proto_dist switch while connecting to EPMD
- Cherry-picked fix for OTP-13423. Mnesia transactions could hang while
waiting on a response from a node who had stopped.
Signed-off-by: Peter Lemenkov
---
erlang.spec | 27 +-
...unused-code-in-error-logger-handlers.patch | 1028 ++++++++++++++++
...h-sasl_report-to-limit-crash-reports.patch | 74 ++
...unused-code-in-error-logger-handlers.patch | 1064 +++++++++++++++++
...dist-switch-while-connection-to-EPMD.patch | 34 +
...ia_down-messages-to-waiting-transact.patch | 38 +
6 files changed, 2264 insertions(+), 1 deletion(-)
create mode 100644 otp-0024-Remove-unused-code-in-error-logger-handlers.patch
create mode 100644 otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
create mode 100644 otp-0026-Revert-Remove-unused-code-in-error-logger-handlers.patch
create mode 100644 otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch
create mode 100644 otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch
diff --git a/erlang.spec b/erlang.spec
index 83d9e27..e117c20 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -25,7 +25,7 @@
Name: erlang
Version: %{upstream_ver}
-Release: %{upstream_rel_for_rpm}.17%{?dist}
+Release: %{upstream_rel_for_rpm}.18%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
@@ -125,6 +125,21 @@ Patch22: otp-0022-kernel-inet6_tcp_dist-reuse-inet_tcp_dist-code.patch
# Fedora specific patch
# epmd: support IPv6 node registration
Patch23: otp-0023-epmd-support-IPv6-node-registration.patch
+# Fedora specific patch
+# Remove unused code in error logger handlers
+Patch24: otp-0024-Remove-unused-code-in-error-logger-handlers.patch
+# Fedora specific patch
+# Teach sasl_report to limit crash reports
+Patch25: otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
+# Fedora specific patch
+# Revert "Remove unused code in error logger handlers"
+Patch26: otp-0026-Revert-Remove-unused-code-in-error-logger-handlers.patch
+# Fedora specific patch
+# Respect -proto_dist switch while connection to EPMD
+Patch27: otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch
+# Fedora specific patch
+# mnesia: Send mnesia_down messages to waiting transactions
+Patch28: otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -1015,6 +1030,11 @@ Erlang mode for XEmacs (source lisp files).
%patch21 -p1 -b .Add_patch_to_crash_dump_on_large_distribution
%patch22 -p1 -b .kernel_inet6_tcp_dist_reuse_inet_tcp_dist_code
%patch23 -p1 -b .epmd_support_IPv6_node_registration
+%patch24 -p1 -b .Remove_unused_code_in_error_logger_handlers
+%patch25 -p1 -b .Teach_sasl_report_to_limit_crash_reports
+%patch26 -p1 -b .Revert_Remove_unused_code_in_error_logger_handlers
+%patch27 -p1 -b .Respect_proto_dist_switch_while_connection_to_EPMD
+%patch28 -p1 -b .mnesia_Send_mnesia_down_messages_to_waiting_transact
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2346,6 +2366,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
%changelog
+* Wed Nov 9 2016 Peter Lemenkov - R16B-03.18
+- Respect -proto_dist switch while connecting to EPMD
+- Cherry-picked fix for OTP-13423. Mnesia transactions could hang while waiting
+ on a response from a node who had stopped.
+
* Thu Apr 7 2016 John Eckersberg - R16B-03.17
- Revert "Enable error_logger depth fine tuning" (rhbz#1324922)
diff --git a/otp-0024-Remove-unused-code-in-error-logger-handlers.patch b/otp-0024-Remove-unused-code-in-error-logger-handlers.patch
new file mode 100644
index 0000000..a3ea0ac
--- /dev/null
+++ b/otp-0024-Remove-unused-code-in-error-logger-handlers.patch
@@ -0,0 +1,1028 @@
+From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
+Date: Thu, 20 Aug 2015 09:44:43 +0200
+Subject: [PATCH] Remove unused code in error logger handlers
+
+A long time ago, errors from the emulator itself was sent as
+messages that would end up in the handle_info/2 function.
+Those clauses in handle_info/2 can be removed.
+
+The code for handling events tagged 'info' instead of 'info_msg'
+can also be taken out.
+
+error_logger_file_h: Refactor and modernize code
+
+Refactor, simplify, and modernize the code to facilitate future
+improvements in the following commits.
+
+Teach error_logger_file_h to truncate big messages
+
+Add the possibility to truncate big messages to avoid running out
+of memory.
+
+error_logger_tty_h: Refactor and modernize code
+
+Refactor, simplify, and modernize the code to facilitate future
+improvements in the following commits.
+
+Teach error_logger_tty_h to truncate big messages
+
+Add the possibility to truncate big messages to avoid running out
+of memory.
+
+stdlib: Fix leaking files after error_logger:logfile(close)
+
+Introduced when changing state from tuple to record.
+
+Make the scanned form of the io_lib format strings available for processing
+
+This adds three new functions to io_lib - scan_format/2, unscan_format/1,
+and build_text/1 - which expose the parsed form of the format control
+sequences to make it possible to easily modify or filter the input to
+io_lib:format/2. This can e.g. be used in order to replace unbounded-size
+control sequences like ~w or ~p with corresponding depth-limited ~W and ~P
+before doing the actual formatting.
+
+diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
+index 90f24c4..6613dcd 100644
+--- a/lib/stdlib/doc/src/io.xml
++++ b/lib/stdlib/doc/src/io.xml
+@@ -505,7 +505,8 @@ ok
+
Writes the data with standard syntax in the same way as
+ ~w, but breaks terms whose printed representation
+ is longer than one line into many lines and indents each
+- line sensibly. It also tries to detect lists of
++ line sensibly. Left justification is not supported.
++ It also tries to detect lists of
+ printable characters and to output these as strings. The
+ Unicode translation modifier is used for determining
+ what characters are printable. For example:
+diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
+index 68352ff..0c1c84d 100644
+--- a/lib/stdlib/doc/src/io_lib.xml
++++ b/lib/stdlib/doc/src/io_lib.xml
+@@ -4,7 +4,7 @@
+
+
+
+- 19962013
++ 19962014
+ Ericsson AB. All Rights Reserved.
+
+
+@@ -59,6 +59,35 @@
+
+
+
++
++
++
Description:
++
++
control_char is the type of control
++ sequence: $P, $w, and so on;
++
++
args is a list of the arguments used by the
++ control sequence, or an empty list if the control sequence
++ does not take any arguments;
++
++
width is the field width;
++
++
adjust is the adjustment;
++
++
precision is the precision of the printed
++ argument;
++
++
pad_char is the padding character;
++
++
encoding is set to true if the translation
++ modifier t is present;
++
++
strings is set to false if the modifier
++ l is present.
++
++
++
++
+
+
+
+@@ -260,6 +289,45 @@
+
+
+
++
++ Parse all control sequences in the format string
++
++
Returns a list corresponding to the given format string,
++ where control sequences have been replaced with
++ corresponding tuples. This list can be passed to io_lib:build_text/1 to have
++ the same effect as io_lib:format(Format, Args), or to
++ io_lib:unscan_format/1
++ in order to get the corresponding pair of Format and
++ Args (with every * and corresponding argument
++ expanded to numeric values).
++
A typical use of this function is to replace unbounded-size
++ control sequences like ~w and ~p with the
++ depth-limited variants ~W and ~P before
++ formatting to text, e.g. in a logger.
++
++
++
++
++ Revert a pre-parsed format list to a plain character list
++ and a list of arguments
++
++
See io_lib:scan_format/2 for
++ details.
++
++
++
++
++ Build the output text for a pre-parsed format list
++
++
See io_lib:scan_format/2 for
++ details.
++
++
++
+
+ Indentation after printing string
+
+diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl
+index e9364ed..ca44d01 100644
+--- a/lib/stdlib/src/error_logger_file_h.erl
++++ b/lib/stdlib/src/error_logger_file_h.erl
+@@ -23,24 +23,28 @@
+
+ %%%
+ %%% A handler that can be connected to the error_logger
+-%%% event handler.
+-%%% Writes all events formatted to file.
+-%%% Handles events tagged error, emulator and info.
++%%% event handler. Writes all events formatted to file.
+ %%%
+ %%% It can only be started from error_logger:swap_handler({logfile, File})
+-%%% or error_logger:logfile(File)
++%%% or error_logger:logfile(File).
+ %%%
+
+ -export([init/1,
+ handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
++-record(st,
++ {fd,
++ filename,
++ prev_handler,
++ depth=unlimited :: 'unlimited' | non_neg_integer()}).
++
+ %% This one is used when we takeover from the simple error_logger.
+ init({File, {error_logger, Buf}}) ->
+ case init(File, error_logger) of
+- {ok, {Fd, File, PrevHandler}} ->
+- write_events(Fd, Buf),
+- {ok, {Fd, File, PrevHandler}};
++ {ok, State} ->
++ write_events(State, Buf),
++ {ok, State};
+ Error ->
+ Error
+ end;
+@@ -52,49 +56,45 @@ init(File, PrevHandler) ->
+ process_flag(trap_exit, true),
+ case file:open(File, [write]) of
+ {ok,Fd} ->
+- {ok, {Fd, File, PrevHandler}};
++ Depth = get_depth(),
++ State = #st{fd=Fd,filename=File,prev_handler=PrevHandler,
++ depth=Depth},
++ {ok, State};
+ Error ->
+ Error
+ end.
+-
++
++get_depth() ->
++ case application:get_env(kernel, error_logger_format_depth) of
++ {ok, Depth} when is_integer(Depth) ->
++ max(10, Depth);
++ undefined ->
++ unlimited
++ end.
++
+ handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
+ {ok, State};
+-handle_event(Event, {Fd, File, PrevHandler}) ->
+- write_event(Fd, tag_event(Event)),
+- {ok, {Fd, File, PrevHandler}};
+-handle_event(_, State) ->
++handle_event(Event, State) ->
++ write_event(State, Event),
+ {ok, State}.
+
+-handle_info({'EXIT', Fd, _Reason}, {Fd, _File, PrevHandler}) ->
++handle_info({'EXIT', Fd, _Reason}, #st{fd=Fd,prev_handler=PrevHandler}) ->
+ case PrevHandler of
+ [] ->
+ remove_handler;
+ _ ->
+ {swap_handler, install_prev, [], PrevHandler, go_back}
+ end;
+-handle_info({emulator, GL, Chars}, {Fd, File, PrevHandler})
+- when node(GL) == node() ->
+- write_event(Fd, tag_event({emulator, GL, Chars})),
+- {ok, {Fd, File, PrevHandler}};
+-handle_info({emulator, noproc, Chars}, {Fd, File, PrevHandler}) ->
+- write_event(Fd, tag_event({emulator, noproc, Chars})),
+- {ok, {Fd, File, PrevHandler}};
+ handle_info(_, State) ->
+ {ok, State}.
+
+-handle_call(filename, {Fd, File, Prev}) ->
+- {ok, File, {Fd, File, Prev}};
++handle_call(filename, #st{filename=File}=State) ->
++ {ok, File, State};
+ handle_call(_Query, State) ->
+ {ok, {error, bad_query}, State}.
+
+-terminate(_Reason, State) ->
+- case State of
+- {Fd, _File, _Prev} ->
+- ok = file:close(Fd);
+- _ ->
+- ok
+- end,
+- [].
++terminate(_Reason, #st{fd=Fd}) ->
++ file:close(Fd).
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+@@ -103,69 +103,71 @@ code_change(_OldVsn, State, _Extra) ->
+ %%% Misc. functions.
+ %%% ------------------------------------------------------
+
+-tag_event(Event) ->
+- {erlang:universaltime(), Event}.
++write_events(State, [Ev|Es]) ->
++ %% Write the events in reversed order.
++ write_events(State, Es),
++ write_event(State, Ev);
++write_events(_State, []) ->
++ ok.
+
+-write_events(Fd, Events) -> write_events1(Fd, lists:reverse(Events)).
++write_event(#st{fd=Fd}=State, Event) ->
++ case parse_event(Event) of
++ ignore ->
++ ok;
++ {Head,Pid,FormatList} ->
++ Time = maybe_utc(erlang:universaltime()),
++ Header = write_time(Time, Head),
++ Body = format_body(State, FormatList),
++ AtNode = if
++ node(Pid) =/= node() ->
++ ["** at node ",atom_to_list(node(Pid))," **\n"];
++ true ->
++ []
++ end,
++ io:put_chars(Fd, [Header,Body,AtNode])
++ end.
+
+-write_events1(Fd, [Event|Es]) ->
+- write_event(Fd, Event),
+- write_events1(Fd, Es);
+-write_events1(_, []) ->
+- ok.
++format_body(State, [{Format,Args}|T]) ->
++ S = try format(State, Format, Args) of
++ S0 ->
++ S0
++ catch
++ _:_ ->
++ format(State, "ERROR: ~p - ~p\n", [Format,Args])
++ end,
++ [S|format_body(State, T)];
++format_body(_State, []) ->
++ [].
+
+-write_event(Fd, {Time, {error, _GL, {Pid, Format, Args}}}) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- io:format(Fd, T ++ F, [Format,Args])
+- end;
+-write_event(Fd, {Time, {emulator, _GL, Chars}}) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(Chars, []) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- io:format(Fd, T ++ "ERROR: ~p ~n", [Chars])
+- end;
+-write_event(Fd, {Time, {info, _GL, {Pid, Info, _}}}) ->
+- T = write_time(maybe_utc(Time)),
+- io:format(Fd, T ++ add_node("~p~n",Pid),[Info]);
+-write_event(Fd, {Time, {error_report, _GL, {Pid, std_error, Rep}}}) ->
+- T = write_time(maybe_utc(Time)),
+- S = format_report(Rep),
+- io:format(Fd, T ++ S ++ add_node("", Pid), []);
+-write_event(Fd, {Time, {info_report, _GL, {Pid, std_info, Rep}}}) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- S = format_report(Rep),
+- io:format(Fd, T ++ S ++ add_node("", Pid), []);
+-write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- io:format(Fd, T ++ F, [Format,Args])
+- end;
+-write_event(Fd, {Time, {warning_report, _GL, {Pid, std_warning, Rep}}}) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- S = format_report(Rep),
+- io:format(Fd, T ++ S ++ add_node("", Pid), []);
+-write_event(Fd, {Time, {warning_msg, _GL, {Pid, Format, Args}}}) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- io:format(Fd, T ++ S, []);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- io:format(Fd, T ++ F, [Format,Args])
+- end;
+-write_event(_, _) ->
+- ok.
++format(#st{depth=unlimited}, Format, Args) ->
++ io_lib:format(Format, Args);
++format(#st{depth=Depth}, Format0, Args) ->
++ Format1 = io_lib:scan_format(Format0, Args),
++ Format = limit_format(Format1, Depth),
++ io_lib:build_text(Format).
++
++limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
++ C0 =:= $w ->
++ C = C0 - ($a - $A), %To uppercase.
++ [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}||limit_format(T, Depth)];
++limit_format([H|T], Depth) ->
++ [H|limit_format(T, Depth)];
++limit_format([], _) ->
++ [].
++
++parse_event({error, _GL, {Pid, Format, Args}}) ->
++ {"ERROR REPORT",Pid,[{Format,Args}]};
++parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
++ {"INFO REPORT",Pid,[{Format, Args}]};
++parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
++ {"WARNING REPORT",Pid,[{Format,Args}]};
++parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
++ {"ERROR REPORT",Pid,format_term(Args)};
++parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
++ {"INFO REPORT",Pid,format_term(Args)};
++parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
++ {"WARNING REPORT",Pid,format_term(Args)};
++parse_event(_) -> ignore.
+
+ maybe_utc(Time) ->
+ UTC = case application:get_env(sasl, utc_log) of
+@@ -182,30 +184,27 @@ maybe_utc(Time) ->
+ maybe_utc(Time, true) -> {utc, Time};
+ maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
+
+-format_report(Rep) when is_list(Rep) ->
+- case string_p(Rep) of
++format_term(Term) when is_list(Term) ->
++ case string_p(Term) of
+ true ->
+- io_lib:format("~s~n",[Rep]);
+- _ ->
+- format_rep(Rep)
++ [{"~s\n",[Term]}];
++ false ->
++ format_term_list(Term)
+ end;
+-format_report(Rep) ->
+- io_lib:format("~p~n",[Rep]).
+-
+-format_rep([{Tag,Data}|Rep]) ->
+- io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
+-format_rep([Other|Rep]) ->
+- io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
+-format_rep(_) ->
++format_term(Term) ->
++ [{"~p\n",[Term]}].
++
++format_term_list([{Tag,Data}|T]) ->
++ [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
++format_term_list([Data|T]) ->
++ [{" ~p\n",[Data]}|format_term_list(T)];
++format_term_list([]) ->
++ [];
++format_term_list(_) ->
++ %% Continue to allow non-proper lists for now.
++ %% FIXME: Remove this clause in OTP 19.
+ [].
+
+-add_node(X, Pid) when is_atom(X) ->
+- add_node(atom_to_list(X), Pid);
+-add_node(X, Pid) when node(Pid) =/= node() ->
+- lists:concat([X,"** at node ",node(Pid)," **~n"]);
+-add_node(X, _) ->
+- X.
+-
+ string_p([]) ->
+ false;
+ string_p(Term) ->
+@@ -221,15 +220,10 @@ string_p1([$\b|T]) -> string_p1(T);
+ string_p1([$\f|T]) -> string_p1(T);
+ string_p1([$\e|T]) -> string_p1(T);
+ string_p1([H|T]) when is_list(H) ->
+- case string_p1(H) of
+- true -> string_p1(T);
+- _ -> false
+- end;
++ string_p1(H) andalso string_p1(T);
+ string_p1([]) -> true;
+ string_p1(_) -> false.
+
+-write_time(Time) -> write_time(Time, "ERROR REPORT").
+-
+ write_time({utc,{{Y,Mo,D},{H,Mi,S}}}, Type) ->
+ io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
+ [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
+diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl
+index ad5891f..72a052f 100644
+--- a/lib/stdlib/src/error_logger_tty_h.erl
++++ b/lib/stdlib/src/error_logger_tty_h.erl
+@@ -22,144 +22,178 @@
+
+ %%%
+ %%% A handler that can be connected to the error_logger
+-%%% event handler.
+-%%% Writes all events formatted to stdout.
+-%%% Handles events tagged error, emulator and info.
++%%% event handler. Writes all events formatted to stdout.
+ %%%
+ %%% It can only be started from error_logger:swap_handler(tty)
+-%%% or error_logger:tty(true)
++%%% or error_logger:tty(true).
+ %%%
+
+ -export([init/1,
+ handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+--export([write_event/2]).
++-export([write_event/2,write_event/3]).
++
++-record(st,
++ {user,
++ prev_handler,
++ io_mod=io,
++ depth=unlimited}).
+
+ %% This one is used when we takeover from the simple error_logger.
+ init({[], {error_logger, Buf}}) ->
+ User = set_group_leader(),
+- write_events(Buf,io),
+- {ok, {User, error_logger}};
++ Depth = get_depth(),
++ State = #st{user=User,prev_handler=error_logger,depth=Depth},
++ write_events(State, Buf),
++ {ok, State};
+ %% This one is used if someone took over from us, and now wants to
+ %% go back.
+ init({[], {error_logger_tty_h, PrevHandler}}) ->
+ User = set_group_leader(),
+- {ok, {User, PrevHandler}};
++ {ok, #st{user=User,prev_handler=PrevHandler}};
+ %% This one is used when we are started directly.
+ init([]) ->
+ User = set_group_leader(),
+- {ok, {User, []}}.
++ Depth = get_depth(),
++ {ok, #st{user=User,prev_handler=[],depth=Depth}}.
++
++get_depth() ->
++ case application:get_env(kernel, error_logger_format_depth) of
++ {ok, Depth} when is_integer(Depth) ->
++ max(10, Depth);
++ undefined ->
++ unlimited
++ end.
+
+ handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
+ {ok, State};
+ handle_event(Event, State) ->
+- write_event(tag_event(Event),io),
++ ok = do_write_event(State, tag_event(Event)),
+ {ok, State}.
+
+-handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
++handle_info({'EXIT', User, _Reason},
++ #st{user=User,prev_handler=PrevHandler}=State) ->
+ case PrevHandler of
+ [] ->
+ remove_handler;
+ _ ->
+- {swap_handler, install_prev, {User, PrevHandler},
++ {swap_handler, install_prev, State,
+ PrevHandler, go_back}
+ end;
+-handle_info({emulator, GL, Chars}, State) when node(GL) == node() ->
+- write_event(tag_event({emulator, GL, Chars}),io),
+- {ok, State};
+-handle_info({emulator, noproc, Chars}, State) ->
+- write_event(tag_event({emulator, noproc, Chars}),io),
+- {ok, State};
+ handle_info(_, State) ->
+ {ok, State}.
+
+ handle_call(_Query, State) -> {ok, {error, bad_query}, State}.
+
+-% unfortunately, we can't unlink from User - links are not counted!
+-% if pid(User) -> unlink(User); true -> ok end,
+ terminate(install_prev, _State) ->
+ [];
+-terminate(_Reason, {_User, PrevHandler}) ->
++terminate(_Reason, #st{prev_handler=PrevHandler}) ->
+ {error_logger_tty_h, PrevHandler}.
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
++%% Exported (but unoffical) API.
++write_event(Event, IoMod) ->
++ do_write_event(#st{io_mod=IoMod}, Event).
++
++write_event(Event, IoMod, Depth) ->
++ do_write_event(#st{io_mod=IoMod,depth=Depth}, Event).
++
++
+ %%% ------------------------------------------------------
+ %%% Misc. functions.
+ %%% ------------------------------------------------------
+
+ set_group_leader() ->
+ case whereis(user) of
+- User when is_pid(User) -> link(User), group_leader(User,self()), User;
+- _ -> false
++ User when is_pid(User) ->
++ link(User),
++ group_leader(User,self()),
++ User;
++ _ ->
++ false
+ end.
+
+ tag_event(Event) ->
+ {erlang:universaltime(), Event}.
+
+-write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod).
+-
+-write_events1([Event|Es],IOMod) ->
+- write_event(Event,IOMod),
+- write_events1(Es,IOMod);
+-write_events1([],_IOMod) ->
++write_events(State, [Ev|Es]) ->
++ %% Write the events in reverse order.
++ _ = write_events(State, Es),
++ _ = do_write_event(State, Ev),
++ ok;
++write_events(_State, []) ->
+ ok.
+
+-write_event({Time, {error, _GL, {Pid, Format, Args}}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- format(IOMod, T ++ F, [Format,Args])
++do_write_event(State, {Time0, Event}) ->
++ case parse_event(Event) of
++ ignore ->
++ ok;
++ {Head,Pid,FormatList} ->
++ Time = maybe_utc(Time0),
++ Header = write_time(Time, Head),
++ Body = format_body(State, FormatList),
++ AtNode = if
++ node(Pid) =/= node() ->
++ ["** at node ",atom_to_list(node(Pid))," **\n"];
++ true ->
++ []
++ end,
++ Str = [Header,Body,AtNode],
++ case State#st.io_mod of
++ io_lib ->
++ Str;
++ io ->
++ io:put_chars(user, Str)
++ end
+ end;
+-write_event({Time, {emulator, _GL, Chars}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- case catch io_lib:format(Chars, []) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- format(IOMod, T ++ "ERROR: ~p ~n", [Chars])
+- end;
+-write_event({Time, {info, _GL, {Pid, Info, _}}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- format(IOMod, T ++ add_node("~p~n",Pid),[Info]);
+-write_event({Time, {error_report, _GL, {Pid, std_error, Rep}}},IOMod) ->
+- T = write_time(maybe_utc(Time)),
+- S = format_report(Rep),
+- format(IOMod, T ++ S ++ add_node("", Pid));
+-write_event({Time, {info_report, _GL, {Pid, std_info, Rep}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- S = format_report(Rep),
+- format(IOMod, T ++ S ++ add_node("", Pid));
+-write_event({Time, {info_msg, _GL, {Pid, Format, Args}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "INFO REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- format(IOMod, T ++ F, [Format,Args])
+- end;
+-write_event({Time, {warning_report, _GL, {Pid, std_warning, Rep}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- S = format_report(Rep),
+- format(IOMod, T ++ S ++ add_node("", Pid));
+-write_event({Time, {warning_msg, _GL, {Pid, Format, Args}}},IOMod) ->
+- T = write_time(maybe_utc(Time), "WARNING REPORT"),
+- case catch io_lib:format(add_node(Format,Pid), Args) of
+- S when is_list(S) ->
+- format(IOMod, T ++ S);
+- _ ->
+- F = add_node("ERROR: ~p - ~p~n", Pid),
+- format(IOMod, T ++ F, [Format,Args])
+- end;
+-write_event({_Time, _Error},_IOMod) ->
++do_write_event(_, _) ->
+ ok.
+
++format_body(State, [{Format,Args}|T]) ->
++ S = try format(State, Format, Args) of
++ S0 ->
++ S0
++ catch
++ _:_ ->
++ format(State, "ERROR: ~p - ~p\n", [Format,Args])
++ end,
++ [S|format_body(State, T)];
++format_body(_State, []) ->
++ [].
++
++format(#st{depth=unlimited}, Format, Args) ->
++ io_lib:format(Format, Args);
++format(#st{depth=Depth}, Format0, Args) ->
++ Format1 = io_lib:scan_format(Format0, Args),
++ Format = limit_format(Format1, Depth),
++ io_lib:build_text(Format).
++
++limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
++ C0 =:= $w ->
++ C = C0 - ($a - $A), %To uppercase.
++ [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}|limit_format(T, Depth)];
++limit_format([H|T], Depth) ->
++ [H|limit_format(T, Depth)];
++limit_format([], _) ->
++ [].
++
++parse_event({error, _GL, {Pid, Format, Args}}) ->
++ {"ERROR REPORT",Pid,[{Format,Args}]};
++parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
++ {"INFO REPORT",Pid,[{Format, Args}]};
++parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
++ {"WARNING REPORT",Pid,[{Format,Args}]};
++parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
++ {"ERROR REPORT",Pid,format_term(Args)};
++parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
++ {"INFO REPORT",Pid,format_term(Args)};
++parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
++ {"WARNING REPORT",Pid,format_term(Args)};
++parse_event(_) -> ignore.
++
+ maybe_utc(Time) ->
+ UTC = case application:get_env(sasl, utc_log) of
+ {ok, Val} -> Val;
+@@ -175,33 +209,26 @@ maybe_utc(Time) ->
+ maybe_utc(Time, true) -> {utc, Time};
+ maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
+
+-format(IOMod, String) -> format(IOMod, String, []).
+-format(io_lib, String, Args) -> io_lib:format(String, Args);
+-format(io, String, Args) -> io:format(user, String, Args).
+-
+-format_report(Rep) when is_list(Rep) ->
+- case string_p(Rep) of
++format_term(Term) when is_list(Term) ->
++ case string_p(Term) of
+ true ->
+- io_lib:format("~s~n",[Rep]);
+- _ ->
+- format_rep(Rep)
++ [{"~s\n",[Term]}];
++ false ->
++ format_term_list(Term)
+ end;
+-format_report(Rep) ->
+- io_lib:format("~p~n",[Rep]).
+-
+-format_rep([{Tag,Data}|Rep]) ->
+- io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
+-format_rep([Other|Rep]) ->
+- io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
+-format_rep(_) ->
+- [].
++format_term(Term) ->
++ [{"~p\n",[Term]}].
+
+-add_node(X, Pid) when is_atom(X) ->
+- add_node(atom_to_list(X), Pid);
+-add_node(X, Pid) when node(Pid) =/= node() ->
+- lists:concat([X,"** at node ",node(Pid)," **~n"]);
+-add_node(X, _) ->
+- X.
++format_term_list([{Tag,Data}|T]) ->
++ [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
++format_term_list([Data|T]) ->
++ [{" ~p\n",[Data]}|format_term_list(T)];
++format_term_list([]) ->
++ [];
++format_term_list(_) ->
++ %% Continue to allow non-proper lists for now.
++ %% FIXME: Remove this clause in OTP 19.
++ [].
+
+ string_p([]) ->
+ false;
+@@ -225,7 +252,6 @@ string_p1([H|T]) when is_list(H) ->
+ string_p1([]) -> true;
+ string_p1(_) -> false.
+
+-write_time(Time) -> write_time(Time, "ERROR REPORT").
+ write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) ->
+ io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
+ [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
+diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
+index 9e69601..3c173dc 100644
+--- a/lib/stdlib/src/io_lib.erl
++++ b/lib/stdlib/src/io_lib.erl
+@@ -2,7 +2,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
++%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -61,6 +61,7 @@
+ -module(io_lib).
+
+ -export([fwrite/2,fread/2,fread/3,format/2]).
++-export([scan_format/2,unscan_format/1,build_text/1]).
+ -export([print/1,print/4,indentation/2]).
+
+ -export([write/1,write/2,write/3,nl/0,format_prompt/1,format_prompt/2]).
+@@ -84,7 +85,7 @@
+ deep_unicode_char_list/1]).
+
+ -export_type([chars/0, latin1_string/0, continuation/0,
+- fread_error/0, fread_item/0]).
++ fread_error/0, fread_item/0, format_spec/0]).
+
+ %%----------------------------------------------------------------------
+
+@@ -109,6 +110,18 @@
+
+ -type fread_item() :: string() | atom() | integer() | float().
+
++-type format_spec() ::
++ {
++ ControlChar :: char(),
++ Args :: [any()],
++ Width :: 'none' | integer(),
++ Adjust :: 'left' | 'right',
++ Precision :: 'none' | integer(),
++ PadChar :: char(),
++ Encoding :: 'unicode' | 'latin1',
++ Strings :: boolean()
++ }.
++
+ %%----------------------------------------------------------------------
+
+ %% Interface calls to sub-modules.
+@@ -157,6 +170,31 @@ format(Format, Args) ->
+ Other
+ end.
+
++-spec scan_format(Format, Data) -> FormatList when
++ Format :: io:format(),
++ Data :: [term()],
++ FormatList :: [char() | format_spec()].
++
++scan_format(Format, Args) ->
++ try io_lib_format:scan(Format, Args)
++ catch
++ _:_ -> erlang:error(badarg, [Format, Args])
++ end.
++
++-spec unscan_format(FormatList) -> {Format, Data} when
++ FormatList :: [char() | format_spec()],
++ Format :: io:format(),
++ Data :: [term()].
++
++unscan_format(FormatList) ->
++ io_lib_format:unscan(FormatList).
++
++-spec build_text(FormatList) -> chars() when
++ FormatList :: [char() | format_spec()].
++
++build_text(FormatList) ->
++ io_lib_format:build(FormatList).
++
+ -spec print(Term) -> chars() when
+ Term :: term().
+
+diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl
+index 56e15a1..37b47d7 100644
+--- a/lib/stdlib/src/io_lib_format.erl
++++ b/lib/stdlib/src/io_lib_format.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
++%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -20,10 +20,9 @@
+
+ %% Formatting functions of io library.
+
+--export([fwrite/2,fwrite_g/1,indentation/2]).
++-export([fwrite/2,fwrite_g/1,indentation/2,scan/2,unscan/1,build/1]).
+
+-%% fwrite(Format, ArgList) -> string().
+-%% Format the arguments in ArgList after string Format. Just generate
++%% Format the arguments in Args after string Format. Just generate
+ %% an error if there is an error in the arguments.
+ %%
+ %% To do the printing command correctly we need to calculate the
+@@ -37,15 +36,83 @@
+ %% and it also splits the handling of the control characters into two
+ %% parts.
+
+-fwrite(Format, Args) when is_atom(Format) ->
+- fwrite(atom_to_list(Format), Args);
+-fwrite(Format, Args) when is_binary(Format) ->
+- fwrite(binary_to_list(Format), Args);
++-spec fwrite(Format, Data) -> FormatList when
++ Format :: io:format(),
++ Data :: [term()],
++ FormatList :: [char() | io_lib:format_spec()].
++
+ fwrite(Format, Args) ->
+- Cs = collect(Format, Args),
++ build(scan(Format, Args)).
++
++%% Build the output text for a pre-parsed format list.
++
++-spec build(FormatList) -> io_lib:chars() when
++ FormatList :: [char() | io_lib:format_spec()].
++
++build(Cs) ->
+ Pc = pcount(Cs),
+ build(Cs, Pc, 0).
+
++%% Parse all control sequences in the format string.
++
++-spec scan(Format, Data) -> FormatList when
++ Format :: io:format(),
++ Data :: [term()],
++ FormatList :: [char() | io_lib:format_spec()].
++
++scan(Format, Args) when is_atom(Format) ->
++ scan(atom_to_list(Format), Args);
++scan(Format, Args) when is_binary(Format) ->
++ scan(binary_to_list(Format), Args);
++scan(Format, Args) ->
++ collect(Format, Args).
++
++%% Revert a pre-parsed format list to a plain character list and a
++%% list of arguments.
++
++-spec unscan(FormatList) -> {Format, Data} when
++ FormatList :: [char() | io_lib:format_spec()],
++ Format :: io:format(),
++ Data :: [term()].
++
++unscan(Cs) ->
++ {print(Cs), args(Cs)}.
++
++args([{_C,As,_F,_Ad,_P,_Pad,_Enc,_Str} | Cs]) ->
++ As ++ args(Cs);
++args([_C | Cs]) ->
++ args(Cs);
++args([]) ->
++ [].
++
++print([{C,_As,F,Ad,P,Pad,Enc,Str} | Cs ]) ->
++ print(C, F, Ad, P, Pad, Enc, Str) ++ print(Cs);
++print([C | Cs]) ->
++ [C | print(Cs)];
++print([]) ->
++ [].
++
++print(C, F, Ad, P, Pad, Encoding, Strings) ->
++ [$~] ++ print_field_width(F, Ad) ++ print_precision(P) ++
++ print_pad_char(Pad) ++ print_encoding(Encoding) ++
++ print_strings(Strings) ++ [C].
++
++print_field_width(none, _Ad) -> "";
++print_field_width(F, left) -> integer_to_list(-F);
++print_field_width(F, right) -> integer_to_list(F).
++
++print_precision(none) -> "";
++print_precision(P) -> [$. | integer_to_list(P)].
++
++print_pad_char($\s) -> ""; % default, no need to make explicit
++print_pad_char(Pad) -> [$., Pad].
++
++print_encoding(unicode) -> "t";
++print_encoding(latin1) -> "".
++
++print_strings(false) -> "l";
++print_strings(true) -> "".
++
+ collect([$~|Fmt0], Args0) ->
+ {C,Fmt1,Args1} = collect_cseq(Fmt0, Args0),
+ [C|collect(Fmt1, Args1)];
+@@ -141,7 +208,7 @@ pcount([{$P,_As,_F,_Ad,_P,_Pad,_Enc,_Str}|Cs], Acc) -> pcount(Cs, Acc+1);
+ pcount([_|Cs], Acc) -> pcount(Cs, Acc);
+ pcount([], Acc) -> Acc.
+
+-%% build([Control], Pc, Indentation) -> string().
++%% build([Control], Pc, Indentation) -> io_lib:chars().
+ %% Interpret the control structures. Count the number of print
+ %% remaining and only calculate indentation when necessary. Must also
+ %% be smart when calculating indentation for characters in format.
+@@ -162,10 +229,14 @@ decr_pc($p, Pc) -> Pc - 1;
+ decr_pc($P, Pc) -> Pc - 1;
+ decr_pc(_, Pc) -> Pc.
+
+-%% indentation(String, Indentation) -> Indentation.
++
+ %% Calculate the indentation of the end of a string given its start
+ %% indentation. We assume tabs at 8 cols.
+
++-spec indentation(String, StartIndent) -> integer() when
++ String :: io_lib:chars(),
++ StartIndent :: integer().
++
+ indentation([$\n|Cs], _I) -> indentation(Cs, 0);
+ indentation([$\t|Cs], I) -> indentation(Cs, ((I + 8) div 8) * 8);
+ indentation([C|Cs], I) when is_integer(C) ->
+@@ -366,7 +437,6 @@ float_data([D|Cs], Ds) when D >= $0, D =< $9 ->
+ float_data([_|Cs], Ds) ->
+ float_data(Cs, Ds).
+
+-%% fwrite_g(Float)
+ %% Writes the shortest, correctly rounded string that converts
+ %% to Float when read back with list_to_float/1.
+ %%
+@@ -374,6 +444,8 @@ float_data([_|Cs], Ds) ->
+ %% in Proceedings of the SIGPLAN '96 Conference on Programming
+ %% Language Design and Implementation.
+
++-spec fwrite_g(float()) -> string().
++
+ fwrite_g(0.0) ->
+ "0.0";
+ fwrite_g(Float) when is_float(Float) ->
+@@ -642,7 +714,7 @@ prefixed_integer(Int, F, Adj, Base, Pad, Prefix, Lowercase)
+ term([Prefix|S], F, Adj, none, Pad)
+ end.
+
+-%% char(Char, Field, Adjust, Precision, PadChar) -> string().
++%% char(Char, Field, Adjust, Precision, PadChar) -> chars().
+
+ char(C, none, _Adj, none, _Pad) -> [C];
+ char(C, F, _Adj, none, _Pad) -> chars(C, F);
diff --git a/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch b/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
new file mode 100644
index 0000000..e9e6450
--- /dev/null
+++ b/otp-0025-Teach-sasl_report-to-limit-crash-reports.patch
@@ -0,0 +1,74 @@
+From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
+Date: Tue, 25 Aug 2015 15:20:23 +0200
+Subject: [PATCH] Teach sasl_report to limit crash reports
+
+
+diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl
+index c3e6fed..aa84e4f 100644
+--- a/lib/sasl/src/sasl_report.erl
++++ b/lib/sasl/src/sasl_report.erl
+@@ -61,27 +61,53 @@ write_report2(IO, Fd, Head, supervisor_report, Report) ->
+ Context = sup_get(errorContext, Report),
+ Reason = sup_get(reason, Report),
+ Offender = sup_get(offender, Report),
+- FmtString = " Supervisor: ~p~n Context: ~p~n Reason: "
+- "~80.18p~n Offender: ~80.18p~n~n",
+- write_report_action(IO, Fd, Head ++ FmtString,
+- [Name,Context,Reason,Offender]);
++ {FmtString,Args} = supervisor_format([Name,Context,Reason,Offender]),
++ write_report_action(IO, Fd, Head, FmtString, Args);
+ write_report2(IO, Fd, Head, progress, Report) ->
+ Format = format_key_val(Report),
+- write_report_action(IO, Fd, Head ++ "~s", [Format]);
++ write_report_action(IO, Fd, Head, "~s", [Format]);
+ write_report2(IO, Fd, Head, crash_report, Report) ->
+- Format = proc_lib:format(Report),
+- write_report_action(IO, Fd, Head ++ "~s", [Format]).
++ Depth = get_depth(),
++ Format = proc_lib:format(Report, latin1, Depth),
++ write_report_action(IO, Fd, Head, "~s", [Format]).
++
++supervisor_format(Args0) ->
++ case get_depth() of
++ unlimited ->
++ {" Supervisor: ~p~n"
++ " Context: ~p~n"
++ " Reason: ~80.18p~n"
++ " Offender: ~80.18p~n~n",
++ Args0};
++ Depth ->
++ [A,B,C,D] = Args0,
++ Args = [A,Depth,B,Depth,C,Depth,D,Depth],
++ {" Supervisor: ~P~n"
++ " Context: ~P~n"
++ " Reason: ~80.18P~n"
++ " Offender: ~80.18P~n~n",
++ Args}
++ end.
+
+-write_report_action(io, Fd, Format, Args) ->
+- io:format(Fd, Format, Args);
+-write_report_action(io_lib, _Fd, Format, Args) ->
+- io_lib:format(Format, Args).
++write_report_action(IO, Fd, Head, Format, Args) ->
++ S = [Head|io_lib:format(Format, Args)],
++ case IO of
++ io -> io:put_chars(Fd, S);
++ io_lib -> S
++ end.
+
+ format_key_val([{Tag,Data}|Rep]) ->
+ io_lib:format(" ~16w: ~p~n",[Tag,Data]) ++ format_key_val(Rep);
+ format_key_val(_) ->
+ [].
+
++get_depth() ->
++ case application:get_env(kernel, error_logger_format_depth) of
++ {ok, Depth} when is_integer(Depth) ->
++ max(10, Depth);
++ undefined ->
++ unlimited
++ end.
+
+ sup_get(Tag, Report) ->
+ case lists:keysearch(Tag, 1, Report) of
diff --git a/otp-0026-Revert-Remove-unused-code-in-error-logger-handlers.patch b/otp-0026-Revert-Remove-unused-code-in-error-logger-handlers.patch
new file mode 100644
index 0000000..dda297d
--- /dev/null
+++ b/otp-0026-Revert-Remove-unused-code-in-error-logger-handlers.patch
@@ -0,0 +1,1064 @@
+From: Peter Lemenkov
+Date: Wed, 9 Nov 2016 17:28:28 +0300
+Subject: [PATCH] Revert "Remove unused code in error logger handlers"
+
+This reverts commit f022259a41dbf5b078bea38fd3a7b98f0d4ed587.
+
+Revert "Teach sasl_report to limit crash reports"
+
+This reverts commit 33254666c90aedb190c6cffe36a027053918d92c.
+
+diff --git a/lib/sasl/src/sasl_report.erl b/lib/sasl/src/sasl_report.erl
+index aa84e4f..c3e6fed 100644
+--- a/lib/sasl/src/sasl_report.erl
++++ b/lib/sasl/src/sasl_report.erl
+@@ -61,53 +61,27 @@ write_report2(IO, Fd, Head, supervisor_report, Report) ->
+ Context = sup_get(errorContext, Report),
+ Reason = sup_get(reason, Report),
+ Offender = sup_get(offender, Report),
+- {FmtString,Args} = supervisor_format([Name,Context,Reason,Offender]),
+- write_report_action(IO, Fd, Head, FmtString, Args);
++ FmtString = " Supervisor: ~p~n Context: ~p~n Reason: "
++ "~80.18p~n Offender: ~80.18p~n~n",
++ write_report_action(IO, Fd, Head ++ FmtString,
++ [Name,Context,Reason,Offender]);
+ write_report2(IO, Fd, Head, progress, Report) ->
+ Format = format_key_val(Report),
+- write_report_action(IO, Fd, Head, "~s", [Format]);
++ write_report_action(IO, Fd, Head ++ "~s", [Format]);
+ write_report2(IO, Fd, Head, crash_report, Report) ->
+- Depth = get_depth(),
+- Format = proc_lib:format(Report, latin1, Depth),
+- write_report_action(IO, Fd, Head, "~s", [Format]).
+-
+-supervisor_format(Args0) ->
+- case get_depth() of
+- unlimited ->
+- {" Supervisor: ~p~n"
+- " Context: ~p~n"
+- " Reason: ~80.18p~n"
+- " Offender: ~80.18p~n~n",
+- Args0};
+- Depth ->
+- [A,B,C,D] = Args0,
+- Args = [A,Depth,B,Depth,C,Depth,D,Depth],
+- {" Supervisor: ~P~n"
+- " Context: ~P~n"
+- " Reason: ~80.18P~n"
+- " Offender: ~80.18P~n~n",
+- Args}
+- end.
++ Format = proc_lib:format(Report),
++ write_report_action(IO, Fd, Head ++ "~s", [Format]).
+
+-write_report_action(IO, Fd, Head, Format, Args) ->
+- S = [Head|io_lib:format(Format, Args)],
+- case IO of
+- io -> io:put_chars(Fd, S);
+- io_lib -> S
+- end.
++write_report_action(io, Fd, Format, Args) ->
++ io:format(Fd, Format, Args);
++write_report_action(io_lib, _Fd, Format, Args) ->
++ io_lib:format(Format, Args).
+
+ format_key_val([{Tag,Data}|Rep]) ->
+ io_lib:format(" ~16w: ~p~n",[Tag,Data]) ++ format_key_val(Rep);
+ format_key_val(_) ->
+ [].
+
+-get_depth() ->
+- case application:get_env(kernel, error_logger_format_depth) of
+- {ok, Depth} when is_integer(Depth) ->
+- max(10, Depth);
+- undefined ->
+- unlimited
+- end.
+
+ sup_get(Tag, Report) ->
+ case lists:keysearch(Tag, 1, Report) of
+diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
+index 6613dcd..90f24c4 100644
+--- a/lib/stdlib/doc/src/io.xml
++++ b/lib/stdlib/doc/src/io.xml
+@@ -505,8 +505,7 @@ ok
+
Writes the data with standard syntax in the same way as
+ ~w, but breaks terms whose printed representation
+ is longer than one line into many lines and indents each
+- line sensibly. Left justification is not supported.
+- It also tries to detect lists of
++ line sensibly. It also tries to detect lists of
+ printable characters and to output these as strings. The
+ Unicode translation modifier is used for determining
+ what characters are printable. For example:
+diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
+index 0c1c84d..68352ff 100644
+--- a/lib/stdlib/doc/src/io_lib.xml
++++ b/lib/stdlib/doc/src/io_lib.xml
+@@ -4,7 +4,7 @@
+
+
+
+- 19962014
++ 19962013
+ Ericsson AB. All Rights Reserved.
+
+
+@@ -59,35 +59,6 @@
+
+
+
+-
+-
+-
Description:
+-
+-
control_char is the type of control
+- sequence: $P, $w, and so on;
+-
+-
args is a list of the arguments used by the
+- control sequence, or an empty list if the control sequence
+- does not take any arguments;
+-
+-
width is the field width;
+-
+-
adjust is the adjustment;
+-
+-
precision is the precision of the printed
+- argument;
+-
+-
pad_char is the padding character;
+-
+-
encoding is set to true if the translation
+- modifier t is present;
+-
+-
strings is set to false if the modifier
+- l is present.
+-
+-
+-
+-
+
+
+
+@@ -289,45 +260,6 @@
+
+
+
+-
+- Parse all control sequences in the format string
+-
+-
Returns a list corresponding to the given format string,
+- where control sequences have been replaced with
+- corresponding tuples. This list can be passed to io_lib:build_text/1 to have
+- the same effect as io_lib:format(Format, Args), or to
+- io_lib:unscan_format/1
+- in order to get the corresponding pair of Format and
+- Args (with every * and corresponding argument
+- expanded to numeric values).
+-
A typical use of this function is to replace unbounded-size
+- control sequences like ~w and ~p with the
+- depth-limited variants ~W and ~P before
+- formatting to text, e.g. in a logger.
+-
+-
+-
+-
+- Revert a pre-parsed format list to a plain character list
+- and a list of arguments
+-
+-
See io_lib:scan_format/2 for
+- details.
+-
+-
+-
+-
+- Build the output text for a pre-parsed format list
+-
+-
See io_lib:scan_format/2 for
+- details.
+-
+-
+-
+
+ Indentation after printing string
+
+diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl
+index ca44d01..e9364ed 100644
+--- a/lib/stdlib/src/error_logger_file_h.erl
++++ b/lib/stdlib/src/error_logger_file_h.erl
+@@ -23,28 +23,24 @@
+
+ %%%
+ %%% A handler that can be connected to the error_logger
+-%%% event handler. Writes all events formatted to file.
++%%% event handler.
++%%% Writes all events formatted to file.
++%%% Handles events tagged error, emulator and info.
+ %%%
+ %%% It can only be started from error_logger:swap_handler({logfile, File})
+-%%% or error_logger:logfile(File).
++%%% or error_logger:logfile(File)
+ %%%
+
+ -export([init/1,
+ handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+--record(st,
+- {fd,
+- filename,
+- prev_handler,
+- depth=unlimited :: 'unlimited' | non_neg_integer()}).
+-
+ %% This one is used when we takeover from the simple error_logger.
+ init({File, {error_logger, Buf}}) ->
+ case init(File, error_logger) of
+- {ok, State} ->
+- write_events(State, Buf),
+- {ok, State};
++ {ok, {Fd, File, PrevHandler}} ->
++ write_events(Fd, Buf),
++ {ok, {Fd, File, PrevHandler}};
+ Error ->
+ Error
+ end;
+@@ -56,45 +52,49 @@ init(File, PrevHandler) ->
+ process_flag(trap_exit, true),
+ case file:open(File, [write]) of
+ {ok,Fd} ->
+- Depth = get_depth(),
+- State = #st{fd=Fd,filename=File,prev_handler=PrevHandler,
+- depth=Depth},
+- {ok, State};
++ {ok, {Fd, File, PrevHandler}};
+ Error ->
+ Error
+ end.
+-
+-get_depth() ->
+- case application:get_env(kernel, error_logger_format_depth) of
+- {ok, Depth} when is_integer(Depth) ->
+- max(10, Depth);
+- undefined ->
+- unlimited
+- end.
+-
++
+ handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
+ {ok, State};
+-handle_event(Event, State) ->
+- write_event(State, Event),
++handle_event(Event, {Fd, File, PrevHandler}) ->
++ write_event(Fd, tag_event(Event)),
++ {ok, {Fd, File, PrevHandler}};
++handle_event(_, State) ->
+ {ok, State}.
+
+-handle_info({'EXIT', Fd, _Reason}, #st{fd=Fd,prev_handler=PrevHandler}) ->
++handle_info({'EXIT', Fd, _Reason}, {Fd, _File, PrevHandler}) ->
+ case PrevHandler of
+ [] ->
+ remove_handler;
+ _ ->
+ {swap_handler, install_prev, [], PrevHandler, go_back}
+ end;
++handle_info({emulator, GL, Chars}, {Fd, File, PrevHandler})
++ when node(GL) == node() ->
++ write_event(Fd, tag_event({emulator, GL, Chars})),
++ {ok, {Fd, File, PrevHandler}};
++handle_info({emulator, noproc, Chars}, {Fd, File, PrevHandler}) ->
++ write_event(Fd, tag_event({emulator, noproc, Chars})),
++ {ok, {Fd, File, PrevHandler}};
+ handle_info(_, State) ->
+ {ok, State}.
+
+-handle_call(filename, #st{filename=File}=State) ->
+- {ok, File, State};
++handle_call(filename, {Fd, File, Prev}) ->
++ {ok, File, {Fd, File, Prev}};
+ handle_call(_Query, State) ->
+ {ok, {error, bad_query}, State}.
+
+-terminate(_Reason, #st{fd=Fd}) ->
+- file:close(Fd).
++terminate(_Reason, State) ->
++ case State of
++ {Fd, _File, _Prev} ->
++ ok = file:close(Fd);
++ _ ->
++ ok
++ end,
++ [].
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+@@ -103,71 +103,69 @@ code_change(_OldVsn, State, _Extra) ->
+ %%% Misc. functions.
+ %%% ------------------------------------------------------
+
+-write_events(State, [Ev|Es]) ->
+- %% Write the events in reversed order.
+- write_events(State, Es),
+- write_event(State, Ev);
+-write_events(_State, []) ->
+- ok.
++tag_event(Event) ->
++ {erlang:universaltime(), Event}.
+
+-write_event(#st{fd=Fd}=State, Event) ->
+- case parse_event(Event) of
+- ignore ->
+- ok;
+- {Head,Pid,FormatList} ->
+- Time = maybe_utc(erlang:universaltime()),
+- Header = write_time(Time, Head),
+- Body = format_body(State, FormatList),
+- AtNode = if
+- node(Pid) =/= node() ->
+- ["** at node ",atom_to_list(node(Pid))," **\n"];
+- true ->
+- []
+- end,
+- io:put_chars(Fd, [Header,Body,AtNode])
+- end.
++write_events(Fd, Events) -> write_events1(Fd, lists:reverse(Events)).
+
+-format_body(State, [{Format,Args}|T]) ->
+- S = try format(State, Format, Args) of
+- S0 ->
+- S0
+- catch
+- _:_ ->
+- format(State, "ERROR: ~p - ~p\n", [Format,Args])
+- end,
+- [S|format_body(State, T)];
+-format_body(_State, []) ->
+- [].
+-
+-format(#st{depth=unlimited}, Format, Args) ->
+- io_lib:format(Format, Args);
+-format(#st{depth=Depth}, Format0, Args) ->
+- Format1 = io_lib:scan_format(Format0, Args),
+- Format = limit_format(Format1, Depth),
+- io_lib:build_text(Format).
+-
+-limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
+- C0 =:= $w ->
+- C = C0 - ($a - $A), %To uppercase.
+- [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}||limit_format(T, Depth)];
+-limit_format([H|T], Depth) ->
+- [H|limit_format(T, Depth)];
+-limit_format([], _) ->
+- [].
++write_events1(Fd, [Event|Es]) ->
++ write_event(Fd, Event),
++ write_events1(Fd, Es);
++write_events1(_, []) ->
++ ok.
+
+-parse_event({error, _GL, {Pid, Format, Args}}) ->
+- {"ERROR REPORT",Pid,[{Format,Args}]};
+-parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
+- {"INFO REPORT",Pid,[{Format, Args}]};
+-parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
+- {"WARNING REPORT",Pid,[{Format,Args}]};
+-parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
+- {"ERROR REPORT",Pid,format_term(Args)};
+-parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
+- {"INFO REPORT",Pid,format_term(Args)};
+-parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
+- {"WARNING REPORT",Pid,format_term(Args)};
+-parse_event(_) -> ignore.
++write_event(Fd, {Time, {error, _GL, {Pid, Format, Args}}}) ->
++ T = write_time(maybe_utc(Time)),
++ case catch io_lib:format(add_node(Format,Pid), Args) of
++ S when is_list(S) ->
++ io:format(Fd, T ++ S, []);
++ _ ->
++ F = add_node("ERROR: ~p - ~p~n", Pid),
++ io:format(Fd, T ++ F, [Format,Args])
++ end;
++write_event(Fd, {Time, {emulator, _GL, Chars}}) ->
++ T = write_time(maybe_utc(Time)),
++ case catch io_lib:format(Chars, []) of
++ S when is_list(S) ->
++ io:format(Fd, T ++ S, []);
++ _ ->
++ io:format(Fd, T ++ "ERROR: ~p ~n", [Chars])
++ end;
++write_event(Fd, {Time, {info, _GL, {Pid, Info, _}}}) ->
++ T = write_time(maybe_utc(Time)),
++ io:format(Fd, T ++ add_node("~p~n",Pid),[Info]);
++write_event(Fd, {Time, {error_report, _GL, {Pid, std_error, Rep}}}) ->
++ T = write_time(maybe_utc(Time)),
++ S = format_report(Rep),
++ io:format(Fd, T ++ S ++ add_node("", Pid), []);
++write_event(Fd, {Time, {info_report, _GL, {Pid, std_info, Rep}}}) ->
++ T = write_time(maybe_utc(Time), "INFO REPORT"),
++ S = format_report(Rep),
++ io:format(Fd, T ++ S ++ add_node("", Pid), []);
++write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
++ T = write_time(maybe_utc(Time), "INFO REPORT"),
++ case catch io_lib:format(add_node(Format,Pid), Args) of
++ S when is_list(S) ->
++ io:format(Fd, T ++ S, []);
++ _ ->
++ F = add_node("ERROR: ~p - ~p~n", Pid),
++ io:format(Fd, T ++ F, [Format,Args])
++ end;
++write_event(Fd, {Time, {warning_report, _GL, {Pid, std_warning, Rep}}}) ->
++ T = write_time(maybe_utc(Time), "WARNING REPORT"),
++ S = format_report(Rep),
++ io:format(Fd, T ++ S ++ add_node("", Pid), []);
++write_event(Fd, {Time, {warning_msg, _GL, {Pid, Format, Args}}}) ->
++ T = write_time(maybe_utc(Time), "WARNING REPORT"),
++ case catch io_lib:format(add_node(Format,Pid), Args) of
++ S when is_list(S) ->
++ io:format(Fd, T ++ S, []);
++ _ ->
++ F = add_node("ERROR: ~p - ~p~n", Pid),
++ io:format(Fd, T ++ F, [Format,Args])
++ end;
++write_event(_, _) ->
++ ok.
+
+ maybe_utc(Time) ->
+ UTC = case application:get_env(sasl, utc_log) of
+@@ -184,27 +182,30 @@ maybe_utc(Time) ->
+ maybe_utc(Time, true) -> {utc, Time};
+ maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
+
+-format_term(Term) when is_list(Term) ->
+- case string_p(Term) of
++format_report(Rep) when is_list(Rep) ->
++ case string_p(Rep) of
+ true ->
+- [{"~s\n",[Term]}];
+- false ->
+- format_term_list(Term)
++ io_lib:format("~s~n",[Rep]);
++ _ ->
++ format_rep(Rep)
+ end;
+-format_term(Term) ->
+- [{"~p\n",[Term]}].
+-
+-format_term_list([{Tag,Data}|T]) ->
+- [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
+-format_term_list([Data|T]) ->
+- [{" ~p\n",[Data]}|format_term_list(T)];
+-format_term_list([]) ->
+- [];
+-format_term_list(_) ->
+- %% Continue to allow non-proper lists for now.
+- %% FIXME: Remove this clause in OTP 19.
++format_report(Rep) ->
++ io_lib:format("~p~n",[Rep]).
++
++format_rep([{Tag,Data}|Rep]) ->
++ io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
++format_rep([Other|Rep]) ->
++ io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
++format_rep(_) ->
+ [].
+
++add_node(X, Pid) when is_atom(X) ->
++ add_node(atom_to_list(X), Pid);
++add_node(X, Pid) when node(Pid) =/= node() ->
++ lists:concat([X,"** at node ",node(Pid)," **~n"]);
++add_node(X, _) ->
++ X.
++
+ string_p([]) ->
+ false;
+ string_p(Term) ->
+@@ -220,10 +221,15 @@ string_p1([$\b|T]) -> string_p1(T);
+ string_p1([$\f|T]) -> string_p1(T);
+ string_p1([$\e|T]) -> string_p1(T);
+ string_p1([H|T]) when is_list(H) ->
+- string_p1(H) andalso string_p1(T);
++ case string_p1(H) of
++ true -> string_p1(T);
++ _ -> false
++ end;
+ string_p1([]) -> true;
+ string_p1(_) -> false.
+
++write_time(Time) -> write_time(Time, "ERROR REPORT").
++
+ write_time({utc,{{Y,Mo,D},{H,Mi,S}}}, Type) ->
+ io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
+ [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
+diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl
+index 72a052f..ad5891f 100644
+--- a/lib/stdlib/src/error_logger_tty_h.erl
++++ b/lib/stdlib/src/error_logger_tty_h.erl
+@@ -22,178 +22,144 @@
+
+ %%%
+ %%% A handler that can be connected to the error_logger
+-%%% event handler. Writes all events formatted to stdout.
++%%% event handler.
++%%% Writes all events formatted to stdout.
++%%% Handles events tagged error, emulator and info.
+ %%%
+ %%% It can only be started from error_logger:swap_handler(tty)
+-%%% or error_logger:tty(true).
++%%% or error_logger:tty(true)
+ %%%
+
+ -export([init/1,
+ handle_event/2, handle_call/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+--export([write_event/2,write_event/3]).
+-
+--record(st,
+- {user,
+- prev_handler,
+- io_mod=io,
+- depth=unlimited}).
++-export([write_event/2]).
+
+ %% This one is used when we takeover from the simple error_logger.
+ init({[], {error_logger, Buf}}) ->
+ User = set_group_leader(),
+- Depth = get_depth(),
+- State = #st{user=User,prev_handler=error_logger,depth=Depth},
+- write_events(State, Buf),
+- {ok, State};
++ write_events(Buf,io),
++ {ok, {User, error_logger}};
+ %% This one is used if someone took over from us, and now wants to
+ %% go back.
+ init({[], {error_logger_tty_h, PrevHandler}}) ->
+ User = set_group_leader(),
+- {ok, #st{user=User,prev_handler=PrevHandler}};
++ {ok, {User, PrevHandler}};
+ %% This one is used when we are started directly.
+ init([]) ->
+ User = set_group_leader(),
+- Depth = get_depth(),
+- {ok, #st{user=User,prev_handler=[],depth=Depth}}.
+-
+-get_depth() ->
+- case application:get_env(kernel, error_logger_format_depth) of
+- {ok, Depth} when is_integer(Depth) ->
+- max(10, Depth);
+- undefined ->
+- unlimited
+- end.
++ {ok, {User, []}}.
+
+ handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
+ {ok, State};
+ handle_event(Event, State) ->
+- ok = do_write_event(State, tag_event(Event)),
++ write_event(tag_event(Event),io),
+ {ok, State}.
+
+-handle_info({'EXIT', User, _Reason},
+- #st{user=User,prev_handler=PrevHandler}=State) ->
++handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
+ case PrevHandler of
+ [] ->
+ remove_handler;
+ _ ->
+- {swap_handler, install_prev, State,
++ {swap_handler, install_prev, {User, PrevHandler},
+ PrevHandler, go_back}
+ end;
++handle_info({emulator, GL, Chars}, State) when node(GL) == node() ->
++ write_event(tag_event({emulator, GL, Chars}),io),
++ {ok, State};
++handle_info({emulator, noproc, Chars}, State) ->
++ write_event(tag_event({emulator, noproc, Chars}),io),
++ {ok, State};
+ handle_info(_, State) ->
+ {ok, State}.
+
+ handle_call(_Query, State) -> {ok, {error, bad_query}, State}.
+
++% unfortunately, we can't unlink from User - links are not counted!
++% if pid(User) -> unlink(User); true -> ok end,
+ terminate(install_prev, _State) ->
+ [];
+-terminate(_Reason, #st{prev_handler=PrevHandler}) ->
++terminate(_Reason, {_User, PrevHandler}) ->
+ {error_logger_tty_h, PrevHandler}.
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+-%% Exported (but unoffical) API.
+-write_event(Event, IoMod) ->
+- do_write_event(#st{io_mod=IoMod}, Event).
+-
+-write_event(Event, IoMod, Depth) ->
+- do_write_event(#st{io_mod=IoMod,depth=Depth}, Event).
+-
+-
+ %%% ------------------------------------------------------
+ %%% Misc. functions.
+ %%% ------------------------------------------------------
+
+ set_group_leader() ->
+ case whereis(user) of
+- User when is_pid(User) ->
+- link(User),
+- group_leader(User,self()),
+- User;
+- _ ->
+- false
++ User when is_pid(User) -> link(User), group_leader(User,self()), User;
++ _ -> false
+ end.
+
+ tag_event(Event) ->
+ {erlang:universaltime(), Event}.
+
+-write_events(State, [Ev|Es]) ->
+- %% Write the events in reverse order.
+- _ = write_events(State, Es),
+- _ = do_write_event(State, Ev),
+- ok;
+-write_events(_State, []) ->
++write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod).
++
++write_events1([Event|Es],IOMod) ->
++ write_event(Event,IOMod),
++ write_events1(Es,IOMod);
++write_events1([],_IOMod) ->
+ ok.
+
+-do_write_event(State, {Time0, Event}) ->
+- case parse_event(Event) of
+- ignore ->
+- ok;
+- {Head,Pid,FormatList} ->
+- Time = maybe_utc(Time0),
+- Header = write_time(Time, Head),
+- Body = format_body(State, FormatList),
+- AtNode = if
+- node(Pid) =/= node() ->
+- ["** at node ",atom_to_list(node(Pid))," **\n"];
+- true ->
+- []
+- end,
+- Str = [Header,Body,AtNode],
+- case State#st.io_mod of
+- io_lib ->
+- Str;
+- io ->
+- io:put_chars(user, Str)
+- end
++write_event({Time, {error, _GL, {Pid, Format, Args}}},IOMod) ->
++ T = write_time(maybe_utc(Time)),
++ case catch io_lib:format(add_node(Format,Pid), Args) of
++ S when is_list(S) ->
++ format(IOMod, T ++ S);
++ _ ->
++ F = add_node("ERROR: ~p - ~p~n", Pid),
++ format(IOMod, T ++ F, [Format,Args])
+ end;
+-do_write_event(_, _) ->
++write_event({Time, {emulator, _GL, Chars}},IOMod) ->
++ T = write_time(maybe_utc(Time)),
++ case catch io_lib:format(Chars, []) of
++ S when is_list(S) ->
++ format(IOMod, T ++ S);
++ _ ->
++ format(IOMod, T ++ "ERROR: ~p ~n", [Chars])
++ end;
++write_event({Time, {info, _GL, {Pid, Info, _}}},IOMod) ->
++ T = write_time(maybe_utc(Time)),
++ format(IOMod, T ++ add_node("~p~n",Pid),[Info]);
++write_event({Time, {error_report, _GL, {Pid, std_error, Rep}}},IOMod) ->
++ T = write_time(maybe_utc(Time)),
++ S = format_report(Rep),
++ format(IOMod, T ++ S ++ add_node("", Pid));
++write_event({Time, {info_report, _GL, {Pid, std_info, Rep}}},IOMod) ->
++ T = write_time(maybe_utc(Time), "INFO REPORT"),
++ S = format_report(Rep),
++ format(IOMod, T ++ S ++ add_node("", Pid));
++write_event({Time, {info_msg, _GL, {Pid, Format, Args}}},IOMod) ->
++ T = write_time(maybe_utc(Time), "INFO REPORT"),
++ case catch io_lib:format(add_node(Format,Pid), Args) of
++ S when is_list(S) ->
++ format(IOMod, T ++ S);
++ _ ->
++ F = add_node("ERROR: ~p - ~p~n", Pid),
++ format(IOMod, T ++ F, [Format,Args])
++ end;
++write_event({Time, {warning_report, _GL, {Pid, std_warning, Rep}}},IOMod) ->
++ T = write_time(maybe_utc(Time), "WARNING REPORT"),
++ S = format_report(Rep),
++ format(IOMod, T ++ S ++ add_node("", Pid));
++write_event({Time, {warning_msg, _GL, {Pid, Format, Args}}},IOMod) ->
++ T = write_time(maybe_utc(Time), "WARNING REPORT"),
++ case catch io_lib:format(add_node(Format,Pid), Args) of
++ S when is_list(S) ->
++ format(IOMod, T ++ S);
++ _ ->
++ F = add_node("ERROR: ~p - ~p~n", Pid),
++ format(IOMod, T ++ F, [Format,Args])
++ end;
++write_event({_Time, _Error},_IOMod) ->
+ ok.
+
+-format_body(State, [{Format,Args}|T]) ->
+- S = try format(State, Format, Args) of
+- S0 ->
+- S0
+- catch
+- _:_ ->
+- format(State, "ERROR: ~p - ~p\n", [Format,Args])
+- end,
+- [S|format_body(State, T)];
+-format_body(_State, []) ->
+- [].
+-
+-format(#st{depth=unlimited}, Format, Args) ->
+- io_lib:format(Format, Args);
+-format(#st{depth=Depth}, Format0, Args) ->
+- Format1 = io_lib:scan_format(Format0, Args),
+- Format = limit_format(Format1, Depth),
+- io_lib:build_text(Format).
+-
+-limit_format([{C0,As,F,Ad,P,Pad,Enc,Str}|T], Depth) when C0 =:= $p;
+- C0 =:= $w ->
+- C = C0 - ($a - $A), %To uppercase.
+- [{C,As++[Depth],F,Ad,P,Pad,Enc,Str}|limit_format(T, Depth)];
+-limit_format([H|T], Depth) ->
+- [H|limit_format(T, Depth)];
+-limit_format([], _) ->
+- [].
+-
+-parse_event({error, _GL, {Pid, Format, Args}}) ->
+- {"ERROR REPORT",Pid,[{Format,Args}]};
+-parse_event({info_msg, _GL, {Pid, Format, Args}}) ->
+- {"INFO REPORT",Pid,[{Format, Args}]};
+-parse_event({warning_msg, _GL, {Pid, Format, Args}}) ->
+- {"WARNING REPORT",Pid,[{Format,Args}]};
+-parse_event({error_report, _GL, {Pid, std_error, Args}}) ->
+- {"ERROR REPORT",Pid,format_term(Args)};
+-parse_event({info_report, _GL, {Pid, std_info, Args}}) ->
+- {"INFO REPORT",Pid,format_term(Args)};
+-parse_event({warning_report, _GL, {Pid, std_warning, Args}}) ->
+- {"WARNING REPORT",Pid,format_term(Args)};
+-parse_event(_) -> ignore.
+-
+ maybe_utc(Time) ->
+ UTC = case application:get_env(sasl, utc_log) of
+ {ok, Val} -> Val;
+@@ -209,27 +175,34 @@ maybe_utc(Time) ->
+ maybe_utc(Time, true) -> {utc, Time};
+ maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}.
+
+-format_term(Term) when is_list(Term) ->
+- case string_p(Term) of
++format(IOMod, String) -> format(IOMod, String, []).
++format(io_lib, String, Args) -> io_lib:format(String, Args);
++format(io, String, Args) -> io:format(user, String, Args).
++
++format_report(Rep) when is_list(Rep) ->
++ case string_p(Rep) of
+ true ->
+- [{"~s\n",[Term]}];
+- false ->
+- format_term_list(Term)
++ io_lib:format("~s~n",[Rep]);
++ _ ->
++ format_rep(Rep)
+ end;
+-format_term(Term) ->
+- [{"~p\n",[Term]}].
+-
+-format_term_list([{Tag,Data}|T]) ->
+- [{" ~p: ~p\n",[Tag,Data]}|format_term_list(T)];
+-format_term_list([Data|T]) ->
+- [{" ~p\n",[Data]}|format_term_list(T)];
+-format_term_list([]) ->
+- [];
+-format_term_list(_) ->
+- %% Continue to allow non-proper lists for now.
+- %% FIXME: Remove this clause in OTP 19.
++format_report(Rep) ->
++ io_lib:format("~p~n",[Rep]).
++
++format_rep([{Tag,Data}|Rep]) ->
++ io_lib:format(" ~p: ~p~n",[Tag,Data]) ++ format_rep(Rep);
++format_rep([Other|Rep]) ->
++ io_lib:format(" ~p~n",[Other]) ++ format_rep(Rep);
++format_rep(_) ->
+ [].
+
++add_node(X, Pid) when is_atom(X) ->
++ add_node(atom_to_list(X), Pid);
++add_node(X, Pid) when node(Pid) =/= node() ->
++ lists:concat([X,"** at node ",node(Pid)," **~n"]);
++add_node(X, _) ->
++ X.
++
+ string_p([]) ->
+ false;
+ string_p(Term) ->
+@@ -252,6 +225,7 @@ string_p1([H|T]) when is_list(H) ->
+ string_p1([]) -> true;
+ string_p1(_) -> false.
+
++write_time(Time) -> write_time(Time, "ERROR REPORT").
+ write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) ->
+ io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
+ [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
+diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
+index 3c173dc..9e69601 100644
+--- a/lib/stdlib/src/io_lib.erl
++++ b/lib/stdlib/src/io_lib.erl
+@@ -2,7 +2,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
++%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -61,7 +61,6 @@
+ -module(io_lib).
+
+ -export([fwrite/2,fread/2,fread/3,format/2]).
+--export([scan_format/2,unscan_format/1,build_text/1]).
+ -export([print/1,print/4,indentation/2]).
+
+ -export([write/1,write/2,write/3,nl/0,format_prompt/1,format_prompt/2]).
+@@ -85,7 +84,7 @@
+ deep_unicode_char_list/1]).
+
+ -export_type([chars/0, latin1_string/0, continuation/0,
+- fread_error/0, fread_item/0, format_spec/0]).
++ fread_error/0, fread_item/0]).
+
+ %%----------------------------------------------------------------------
+
+@@ -110,18 +109,6 @@
+
+ -type fread_item() :: string() | atom() | integer() | float().
+
+--type format_spec() ::
+- {
+- ControlChar :: char(),
+- Args :: [any()],
+- Width :: 'none' | integer(),
+- Adjust :: 'left' | 'right',
+- Precision :: 'none' | integer(),
+- PadChar :: char(),
+- Encoding :: 'unicode' | 'latin1',
+- Strings :: boolean()
+- }.
+-
+ %%----------------------------------------------------------------------
+
+ %% Interface calls to sub-modules.
+@@ -170,31 +157,6 @@ format(Format, Args) ->
+ Other
+ end.
+
+--spec scan_format(Format, Data) -> FormatList when
+- Format :: io:format(),
+- Data :: [term()],
+- FormatList :: [char() | format_spec()].
+-
+-scan_format(Format, Args) ->
+- try io_lib_format:scan(Format, Args)
+- catch
+- _:_ -> erlang:error(badarg, [Format, Args])
+- end.
+-
+--spec unscan_format(FormatList) -> {Format, Data} when
+- FormatList :: [char() | format_spec()],
+- Format :: io:format(),
+- Data :: [term()].
+-
+-unscan_format(FormatList) ->
+- io_lib_format:unscan(FormatList).
+-
+--spec build_text(FormatList) -> chars() when
+- FormatList :: [char() | format_spec()].
+-
+-build_text(FormatList) ->
+- io_lib_format:build(FormatList).
+-
+ -spec print(Term) -> chars() when
+ Term :: term().
+
+diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl
+index 37b47d7..56e15a1 100644
+--- a/lib/stdlib/src/io_lib_format.erl
++++ b/lib/stdlib/src/io_lib_format.erl
+@@ -1,7 +1,7 @@
+ %%
+ %% %CopyrightBegin%
+ %%
+-%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
++%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ %%
+ %% The contents of this file are subject to the Erlang Public License,
+ %% Version 1.1, (the "License"); you may not use this file except in
+@@ -20,9 +20,10 @@
+
+ %% Formatting functions of io library.
+
+--export([fwrite/2,fwrite_g/1,indentation/2,scan/2,unscan/1,build/1]).
++-export([fwrite/2,fwrite_g/1,indentation/2]).
+
+-%% Format the arguments in Args after string Format. Just generate
++%% fwrite(Format, ArgList) -> string().
++%% Format the arguments in ArgList after string Format. Just generate
+ %% an error if there is an error in the arguments.
+ %%
+ %% To do the printing command correctly we need to calculate the
+@@ -36,83 +37,15 @@
+ %% and it also splits the handling of the control characters into two
+ %% parts.
+
+--spec fwrite(Format, Data) -> FormatList when
+- Format :: io:format(),
+- Data :: [term()],
+- FormatList :: [char() | io_lib:format_spec()].
+-
++fwrite(Format, Args) when is_atom(Format) ->
++ fwrite(atom_to_list(Format), Args);
++fwrite(Format, Args) when is_binary(Format) ->
++ fwrite(binary_to_list(Format), Args);
+ fwrite(Format, Args) ->
+- build(scan(Format, Args)).
+-
+-%% Build the output text for a pre-parsed format list.
+-
+--spec build(FormatList) -> io_lib:chars() when
+- FormatList :: [char() | io_lib:format_spec()].
+-
+-build(Cs) ->
++ Cs = collect(Format, Args),
+ Pc = pcount(Cs),
+ build(Cs, Pc, 0).
+
+-%% Parse all control sequences in the format string.
+-
+--spec scan(Format, Data) -> FormatList when
+- Format :: io:format(),
+- Data :: [term()],
+- FormatList :: [char() | io_lib:format_spec()].
+-
+-scan(Format, Args) when is_atom(Format) ->
+- scan(atom_to_list(Format), Args);
+-scan(Format, Args) when is_binary(Format) ->
+- scan(binary_to_list(Format), Args);
+-scan(Format, Args) ->
+- collect(Format, Args).
+-
+-%% Revert a pre-parsed format list to a plain character list and a
+-%% list of arguments.
+-
+--spec unscan(FormatList) -> {Format, Data} when
+- FormatList :: [char() | io_lib:format_spec()],
+- Format :: io:format(),
+- Data :: [term()].
+-
+-unscan(Cs) ->
+- {print(Cs), args(Cs)}.
+-
+-args([{_C,As,_F,_Ad,_P,_Pad,_Enc,_Str} | Cs]) ->
+- As ++ args(Cs);
+-args([_C | Cs]) ->
+- args(Cs);
+-args([]) ->
+- [].
+-
+-print([{C,_As,F,Ad,P,Pad,Enc,Str} | Cs ]) ->
+- print(C, F, Ad, P, Pad, Enc, Str) ++ print(Cs);
+-print([C | Cs]) ->
+- [C | print(Cs)];
+-print([]) ->
+- [].
+-
+-print(C, F, Ad, P, Pad, Encoding, Strings) ->
+- [$~] ++ print_field_width(F, Ad) ++ print_precision(P) ++
+- print_pad_char(Pad) ++ print_encoding(Encoding) ++
+- print_strings(Strings) ++ [C].
+-
+-print_field_width(none, _Ad) -> "";
+-print_field_width(F, left) -> integer_to_list(-F);
+-print_field_width(F, right) -> integer_to_list(F).
+-
+-print_precision(none) -> "";
+-print_precision(P) -> [$. | integer_to_list(P)].
+-
+-print_pad_char($\s) -> ""; % default, no need to make explicit
+-print_pad_char(Pad) -> [$., Pad].
+-
+-print_encoding(unicode) -> "t";
+-print_encoding(latin1) -> "".
+-
+-print_strings(false) -> "l";
+-print_strings(true) -> "".
+-
+ collect([$~|Fmt0], Args0) ->
+ {C,Fmt1,Args1} = collect_cseq(Fmt0, Args0),
+ [C|collect(Fmt1, Args1)];
+@@ -208,7 +141,7 @@ pcount([{$P,_As,_F,_Ad,_P,_Pad,_Enc,_Str}|Cs], Acc) -> pcount(Cs, Acc+1);
+ pcount([_|Cs], Acc) -> pcount(Cs, Acc);
+ pcount([], Acc) -> Acc.
+
+-%% build([Control], Pc, Indentation) -> io_lib:chars().
++%% build([Control], Pc, Indentation) -> string().
+ %% Interpret the control structures. Count the number of print
+ %% remaining and only calculate indentation when necessary. Must also
+ %% be smart when calculating indentation for characters in format.
+@@ -229,14 +162,10 @@ decr_pc($p, Pc) -> Pc - 1;
+ decr_pc($P, Pc) -> Pc - 1;
+ decr_pc(_, Pc) -> Pc.
+
+-
++%% indentation(String, Indentation) -> Indentation.
+ %% Calculate the indentation of the end of a string given its start
+ %% indentation. We assume tabs at 8 cols.
+
+--spec indentation(String, StartIndent) -> integer() when
+- String :: io_lib:chars(),
+- StartIndent :: integer().
+-
+ indentation([$\n|Cs], _I) -> indentation(Cs, 0);
+ indentation([$\t|Cs], I) -> indentation(Cs, ((I + 8) div 8) * 8);
+ indentation([C|Cs], I) when is_integer(C) ->
+@@ -437,6 +366,7 @@ float_data([D|Cs], Ds) when D >= $0, D =< $9 ->
+ float_data([_|Cs], Ds) ->
+ float_data(Cs, Ds).
+
++%% fwrite_g(Float)
+ %% Writes the shortest, correctly rounded string that converts
+ %% to Float when read back with list_to_float/1.
+ %%
+@@ -444,8 +374,6 @@ float_data([_|Cs], Ds) ->
+ %% in Proceedings of the SIGPLAN '96 Conference on Programming
+ %% Language Design and Implementation.
+
+--spec fwrite_g(float()) -> string().
+-
+ fwrite_g(0.0) ->
+ "0.0";
+ fwrite_g(Float) when is_float(Float) ->
+@@ -714,7 +642,7 @@ prefixed_integer(Int, F, Adj, Base, Pad, Prefix, Lowercase)
+ term([Prefix|S], F, Adj, none, Pad)
+ end.
+
+-%% char(Char, Field, Adjust, Precision, PadChar) -> chars().
++%% char(Char, Field, Adjust, Precision, PadChar) -> string().
+
+ char(C, none, _Adj, none, _Pad) -> [C];
+ char(C, F, _Adj, none, _Pad) -> chars(C, F);
diff --git a/otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch b/otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch
new file mode 100644
index 0000000..3e817d5
--- /dev/null
+++ b/otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch
@@ -0,0 +1,34 @@
+From: Peter Lemenkov
+Date: Thu, 14 Jul 2016 17:51:16 +0300
+Subject: [PATCH] Respect -proto_dist switch while connection to EPMD
+
+Signed-off-by: Peter Lemenkov
+
+diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
+index 21a3dec..0ba695c 100644
+--- a/lib/kernel/src/erl_epmd.erl
++++ b/lib/kernel/src/erl_epmd.erl
+@@ -107,6 +107,10 @@ names1(HostName) ->
+
+ register_node(Name, PortNo) ->
+ register_node(Name, PortNo, inet).
++register_node(Name, PortNo, inet_tcp) ->
++ register_node(Name, PortNo, inet);
++register_node(Name, PortNo, inet6_tcp) ->
++ register_node(Name, PortNo, inet6);
+ register_node(Name, PortNo, Family) ->
+ gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
+
+diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
+index 0739cf3..c64ddc8 100644
+--- a/lib/kernel/src/inet_tcp_dist.erl
++++ b/lib/kernel/src/inet_tcp_dist.erl
+@@ -72,7 +72,7 @@ gen_listen(Driver, Name) ->
+ {ok, Socket} ->
+ TcpAddress = get_tcp_address(Driver, Socket),
+ {_,Port} = TcpAddress#net_address.address,
+- case erl_epmd:register_node(Name, Port) of
++ case erl_epmd:register_node(Name, Port, Driver) of
+ {ok, Creation} ->
+ {ok, {Socket, TcpAddress, Creation}};
+ Error ->
diff --git a/otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch b/otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch
new file mode 100644
index 0000000..9514c34
--- /dev/null
+++ b/otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch
@@ -0,0 +1,38 @@
+From: Dan Gudmundsson
+Date: Thu, 17 Mar 2016 10:23:41 +0100
+Subject: [PATCH] mnesia: Send mnesia_down messages to waiting transactions
+
+Mnesia didn't forward mnesia_down to transactions which where already
+decided to be aborted, but that could lead to hanging transactions
+still waiting for messages from the node which had stopped.
+
+diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl
+index 17af0ca..329192e 100644
+--- a/lib/mnesia/src/mnesia_tm.erl
++++ b/lib/mnesia/src/mnesia_tm.erl
+@@ -1714,13 +1714,10 @@ commit_participant(Coord, Tid, Bin, C0, DiscNs, _RamNs) ->
+ ?eval_debug_fun({?MODULE, commit_participant, undo_prepare},
+ [{tid, Tid}]);
+
+- {'EXIT', _, _} ->
++ {'EXIT', _MnesiaTM, Reason} ->
++ reply(Coord, {do_abort, Tid, self(), {bad_commit,Reason}}),
+ mnesia_recover:log_decision(D#decision{outcome = aborted}),
+- ?eval_debug_fun({?MODULE, commit_participant, exit_log_abort},
+- [{tid, Tid}]),
+- mnesia_schema:undo_prepare_commit(Tid, C0),
+- ?eval_debug_fun({?MODULE, commit_participant, exit_undo_prepare},
+- [{tid, Tid}]);
++ mnesia_schema:undo_prepare_commit(Tid, C0);
+
+ Msg ->
+ verbose("** ERROR ** commit_participant ~p, got unexpected msg: ~p~n",
+@@ -2236,8 +2233,6 @@ reconfigure_coordinators(N, [{Tid, [Store | _]} | Coordinators]) ->
+ true ->
+ send_mnesia_down(Tid, Store, N)
+ end;
+- aborted ->
+- ignore; % avoid spurious mnesia_down messages
+ _ ->
+ %% Tell the coordinator about the mnesia_down
+ send_mnesia_down(Tid, Store, N)
From 94ed2172da57885c8e1e996ba443ad4bccc14df4 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov
Date: Wed, 9 Nov 2016 19:59:54 +0300
Subject: [PATCH 073/305] Fix for doc generation with OpenJDK 1.8.0
Signed-off-by: Peter Lemenkov
---
erlang.spec | 5 +
otp-0029-Fix-a-few-javadoc-errors.patch | 139 ++++++++++++++++++++++++
2 files changed, 144 insertions(+)
create mode 100644 otp-0029-Fix-a-few-javadoc-errors.patch
diff --git a/erlang.spec b/erlang.spec
index e117c20..a89b8fb 100644
--- a/erlang.spec
+++ b/erlang.spec
@@ -140,6 +140,9 @@ Patch27: otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch
# Fedora specific patch
# mnesia: Send mnesia_down messages to waiting transactions
Patch28: otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch
+# Fedora specific patch
+# Fix a few javadoc errors
+Patch29: otp-0029-Fix-a-few-javadoc-errors.patch
# end of autogenerated patch tag list
BuildRequires: lksctp-tools-devel
@@ -1035,6 +1038,7 @@ Erlang mode for XEmacs (source lisp files).
%patch26 -p1 -b .Revert_Remove_unused_code_in_error_logger_handlers
%patch27 -p1 -b .Respect_proto_dist_switch_while_connection_to_EPMD
%patch28 -p1 -b .mnesia_Send_mnesia_down_messages_to_waiting_transact
+%patch29 -p1 -b .Fix_a_few_javadoc_errors
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@@ -2370,6 +2374,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
- Respect -proto_dist switch while connecting to EPMD
- Cherry-picked fix for OTP-13423. Mnesia transactions could hang while waiting
on a response from a node who had stopped.
+- Fix for doc generation with OpenJDK 1.8.0
* Thu Apr 7 2016 John Eckersberg - R16B-03.17
- Revert "Enable error_logger depth fine tuning" (rhbz#1324922)
diff --git a/otp-0029-Fix-a-few-javadoc-errors.patch b/otp-0029-Fix-a-few-javadoc-errors.patch
new file mode 100644
index 0000000..c808303
--- /dev/null
+++ b/otp-0029-Fix-a-few-javadoc-errors.patch
@@ -0,0 +1,139 @@
+From: Anthony Ramine
+Date: Sun, 8 Jun 2014 12:37:10 +0200
+Subject: [PATCH] Fix a few javadoc errors
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported-by: Boris Mühmer
+
+diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
+index 9ba6a4a..7aa30ee 100644
+--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
++++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java
+@@ -266,7 +266,7 @@ public abstract class AbstractConnection extends Thread {
+ *
+ * @param dest
+ * the Erlang PID of the remote process.
+- * @param msg
++ * @param payload
+ * the encoded message to send.
+ *
+ * @exception java.io.IOException
+diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java
+index 8e8bd47..e7a9d10 100644
+--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java
++++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java
+@@ -404,7 +404,7 @@ public class OtpConnection extends AbstractConnection {
+ *
+ * @param dest
+ * the Erlang PID of the remote process.
+- * @param msg
++ * @param payload
+ * the encoded message to send.
+ *
+ * @exception java.io.IOException
+diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java
+index 7e3e2a7..84b1355 100644
+--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java
++++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java
+@@ -51,8 +51,8 @@ public class OtpErlangLong extends OtpErlangObject implements Serializable,
+ /**
+ * Create an Erlang integer from the given value.
+ *
+- * @param val
+- * the long value to use.
++ * @param v
++ * the big integer value to use.
+ */
+ public OtpErlangLong(final BigInteger v) {
+ if (v == null) {
+diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java
+index fe81ce3..f75e435 100644
+--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java
++++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangPid.java
+@@ -162,7 +162,7 @@ public class OtpErlangPid extends OtpErlangObject implements Serializable,
+ * Determine if two PIDs are equal. PIDs are equal if their components are
+ * equal.
+ *
+- * @param port
++ * @param o
+ * the other PID to compare to.
+ *
+ * @return true if the PIDs are equal, false otherwise.
+diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java
+index 6766b52..a5e202c 100644
+--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java
++++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java
+@@ -41,8 +41,6 @@ public class OtpErlangString extends OtpErlangObject implements Serializable,
+
+ /**
+ * Create an Erlang string from a list of integers.
+- *
+- * @return an Erlang string with Unicode code units.
+ *
+ * @throws OtpErlangException
+ * for non-proper and non-integer lists.
+diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
+index 0fd93b0..4a4a1e7 100644
+--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
++++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
+@@ -69,6 +69,7 @@ package com.ericsson.otp.erlang;
+ * notify other parties in a timely manner.
+ *
+ *
++ *
+ * When retrieving messages from a mailbox that has received an exit signal, an
+ * {@link OtpErlangExit OtpErlangExit} exception will be raised. Note that the
+ * exception is queued in the mailbox along with other messages, and will not be
+@@ -420,7 +421,6 @@ public class OtpMbox {
+
+ /**
+ * Equivalent to exit(new OtpErlangAtom(reason)).
+- *
+- * The header information that is available is as follows:
++ * The header information that is available is as follows:
+ *
a tag indicating the type of message
+ *
the intended recipient of the message, either as a
+ * {@link OtpErlangPid pid} or as a String, but never both.
+ *
(sometimes) the sender of the message. Due to some eccentric
+ * characteristics of the Erlang distribution protocol, not all messages have
+ * information about the sending process. In particular, only messages whose tag
+- * is {@link OtpMsg#regSendTag regSendTag} contain sender information.