diff --git a/.gitignore b/.gitignore index 99b1241..36e05df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,52 +1,7 @@ -otp_src_R14A.tar.gz -/otp_src_R14B.tar.gz -/otp_doc_html_R14B.tar.gz -/otp_doc_man_R14B.tar.gz -/otp_doc_html_R14B01.tar.gz -/otp_doc_man_R14B01.tar.gz -/otp_src_R14B01.tar.gz -/otp_doc_html_R14B02.tar.gz -/otp_doc_man_R14B02.tar.gz -/otp_src_R14B02.tar.gz -/otp_src_R14B03.tar.gz -/otp_doc_html_R14B03.tar.gz -/otp_doc_man_R14B03.tar.gz -/otp_src_R14B04.tar.gz -/otp_doc_html_R14B04.tar.gz -/otp_doc_man_R14B04.tar.gz -/otp_doc_html_R15B.tar.gz -/otp_doc_man_R15B.tar.gz -/otp_src_R15B.tar.gz -/otp_doc_html_R15B01.tar.gz -/otp_doc_man_R15B01.tar.gz -/otp_src_R15B01.tar.gz -/otp_doc_html_R15B02.tar.gz -/otp_doc_man_R15B02.tar.gz -/otp_src_R15B02.tar.gz -/otp_doc_html_R15B03-1.tar.gz -/otp_doc_man_R15B03-1.tar.gz -/otp_src_R15B03-1.readme -/otp_src_R15B03-1.tar.gz -/otp_doc_html_R16A_RELEASE_CANDIDATE.tar.gz -/otp_doc_man_R16A_RELEASE_CANDIDATE.tar.gz -/otp_src_R16A_RELEASE_CANDIDATE.tar.gz -/otp_src_R16A_RELEASE_CANDIDATE.readme -/otp_src_R16B.tar.gz -/otp_doc_html_R16B.tar.gz -/otp_doc_man_R16B.tar.gz -/otp_src_R16B01.tar.gz -/otp_doc_html_R16B01.tar.gz -/otp_doc_man_R16B01.tar.gz -/otp_src_R16B01.readme -/otp_src_R16B02.tar.gz -/otp_doc_html_R16B02.tar.gz -/otp_doc_man_R16B02.tar.gz -/otp_src_R16B02.readme -/otp_src_R16B03.tar.gz -/otp_doc_html_R16B03.tar.gz -/otp_doc_man_R16B03.tar.gz -/otp_src_R16B03.readme -/otp_src_R16B03-1.readme -/otp_doc_html_R16B03-1.tar.gz -/otp_doc_man_R16B03-1.tar.gz -/otp_src_R16B03-1.tar.gz +/*.src.rpm +/*~ +/otp-OTP-*.tar.gz +/otp_doc_html_R*.tar.gz +/otp_doc_man_R*.tar.gz +/otp_src_R*.readme +/otp_src_R*.tar.gz diff --git a/epmd.socket b/epmd.socket index 8eee066..34817e0 100644 --- a/epmd.socket +++ b/epmd.socket @@ -2,7 +2,7 @@ Description=Erlang Port Mapper Daemon Activation Socket [Socket] -ListenStream=127.0.0.1:4369 +ListenStream=4369 Accept=false [Install] diff --git a/epmd@.socket b/epmd@.socket index 5dda63d..f3e5338 100644 --- a/epmd@.socket +++ b/epmd@.socket @@ -2,7 +2,7 @@ Description=Erlang Port Mapper Daemon Activation Socket [Socket] -ListenStream=%i:4369 +ListenStream=%I Accept=false [Install] diff --git a/erlang.spec b/erlang.spec index a89b8fb..878fb41 100644 --- a/erlang.spec +++ b/erlang.spec @@ -1,47 +1,89 @@ -%global upstream_ver R16B -# Do NOT change %%{upstream_rel} unless UPSTREAM has actually changed it! -#%global upstream_rel %{nil} -%global upstream_rel 03 -# Use %%{nil} for %%{upstream_rel} for tracking source like otp_src_R14B.tar.gz, -# and 01 %%{upstream_rel} for tracking source like otp_src_R14B01.tar.gz. - -%global need_bootstrap_set 0 +%global need_bootstrap_set 1 %{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}} -%if 0%{upstream_rel} -%global upstream_rel_for_rpm %{upstream_rel} +%ifarch %{arm} %{mips} riscv64 %{ix86} +# MIPS and RISC-V 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 +%else +# RHEL8 doesn't have fop +%if 0%{?rhel} > 7 +%bcond_with doc %else -%global upstream_rel_for_rpm 0 -%endif - %bcond_without doc - -%ifarch %{arm} %{ix86} x86_64 ppc %{power64} -%global __with_hipe 1 +%endif %endif -%global n_uvr %{name}-%{upstream_ver}-%{upstream_rel_for_rpm} +# Compile with FIPS support by default +%bcond_without fips + +## +## Optional components +## + +%global __with_emacs 1 +%global __with_examples 1 +%ifarch %{java_arches} +%global __with_java 1 +%else +%global __with_java 0 +%endif +%global __with_sources 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 +# +# et blocks: +# +# * megaco +# +# observer blocks: +# +# * common_test +# +# So finally we have to disable the following plugins: +# +# common_test +# debugger +# dialyzer +# et +# megaco +# observer +# reltool (*) +# wx +# +%global __with_wxwidgets 1 + Name: erlang -Version: %{upstream_ver} -Release: %{upstream_rel_for_rpm}.18%{?dist} +Version: 26.2.5.16 +Release: 1%{?dist} Summary: General-purpose programming language and runtime environment -Group: Development/Languages -License: ERPL -URL: http://www.erlang.org -%if 0%{?el7}%{?fedora} -VCS: scm:git:https://github.com/erlang/otp -%endif -Source0: http://www.erlang.org/download/otp_src_%{upstream_ver}%{upstream_rel}-1.tar.gz +License: Apache-2.0 +URL: https://www.erlang.org +VCS: git:https://github.com/erlang/otp.git +Source0: https://github.com/erlang/otp/archive/OTP-%{version}/otp-OTP-%{version}.tar.gz 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 # @@ -56,186 +98,96 @@ Source999: otp-get-patches.sh # for some semi-automatic patch update assistance. # # start of autogenerated patch tag list -# Fedora specific patch -# Do not format man-pages and do not install miscellaneous Patch1: otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch -# Fedora specific patch -# Remove rpath Patch2: otp-0002-Remove-rpath.patch -# Fedora specific patch -# Do not install C sources Patch3: otp-0003-Do-not-install-C-sources.patch -# Fedora specific patch -# Do not install Java sources Patch4: otp-0004-Do-not-install-Java-sources.patch -# Fedora specific patch -# Do not install nteventlog and related doc-files on non-win32 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 -# Required only for el5, el6 on PowerPC -# Ugly workaround for java-1.5.0-gcj which doesn't support -Patch7: otp-0007-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch -# Fedora specific patch -# Fix for armv7hl architecture -Patch8: otp-0008-Fix-for-armv7hl-architecture.patch -# Fedora specific patch -# TEMPORARILY disable ECC until dust settles -Patch9: otp-0009-TEMPORARILY-disable-ECC-until-dust-settles.patch -# Fedora specific patch -# Fix for powerpc architecture -Patch10: otp-0010-Fix-for-powerpc-architecture.patch -# Fedora specific patch -# Add -systemd option to empd. Check for include -Patch11: otp-0011-Add-systemd-option-to-empd.-Check-for-include-system.patch -# Fedora specific patch -# Add systemd support to epmd -Patch12: otp-0012-Add-systemd-support-to-epmd.patch -# Fedora specific patch -# Added systemd notify support to EPMD -Patch13: otp-0013-Added-systemd-notify-support-to-EPMD.patch -# Fedora specific patch -# Install internal hrl files when necessary -Patch14: otp-0014-Install-internal-hrl-files-when-necessary.patch -# Fedora specific patch -# Expose NIF version -Patch15: otp-0015-Expose-NIF-version.patch -# Fedora specific patch -# Split off webtool dependency from tools -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 -# 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 -# Fedora specific patch -# kernel: inet6_tcp_dist: reuse inet_tcp_dist code -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 -# Fedora specific patch -# Fix a few javadoc errors -Patch29: otp-0029-Fix-a-few-javadoc-errors.patch +Patch6: otp-0006-Add-extra-search-directory.patch +Patch7: otp-0007-Avoid-forking-sed-to-get-basename.patch +Patch8: otp-0008-Load-man-pages-from-system-wide-directory.patch +Patch9: otp-0009-Add-GDB-tools.patch # end of autogenerated patch tag list -BuildRequires: lksctp-tools-devel -BuildRequires: ncurses-devel -BuildRequires: openssl-devel -BuildRequires: zlib-devel +BuildRequires: gcc +BuildRequires: gcc-c++ +# For gdb-tools +BuildRequires: gdb 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 -BuildRequires: libxslt +BuildRequires: make +%if %{with doc} %if 0%{?need_bootstrap} < 1 # Required for building docs (escript) BuildRequires: erlang %endif %endif -BuildRequires: emacs -BuildRequires: xemacs -BuildRequires: emacs-el -BuildRequires: xemacs-packages-extra-el - -%if 0%{?el7}%{?fedora} # for BuildRequires: systemd-devel -Requires(post): systemd -Requires(preun):systemd -Requires(postun):systemd +BuildRequires: systemd +%{?systemd_requires} Requires: systemd -%endif +BuildRequires: autoconf +BuildRequires: automake +#BuildRequires: erlang-rpm-macros -BuildRequires: erlang-rpm-macros - -Requires: %{name}-appmon%{?_isa} = %{version}-%{release} 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} -Requires: %{name}-cosFileTransfer%{?_isa} = %{version}-%{release} -Requires: %{name}-cosNotification%{?_isa} = %{version}-%{release} -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} -Requires: %{name}-examples%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} -Requires: %{name}-hipe%{?_isa} = %{version}-%{release} -Requires: %{name}-ic%{?_isa} = %{version}-%{release} +Requires: %{name}-ftp%{?_isa} = %{version}-%{release} 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} -Requires: %{name}-otp_mibs%{?_isa} = %{version}-%{release} Requires: %{name}-parsetools%{?_isa} = %{version}-%{release} -Requires: %{name}-percept%{?_isa} = %{version}-%{release} -Requires: %{name}-pman%{?_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} +Requires: %{name}-src%{?_isa} = %{version}-%{release} 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} -Requires: %{name}-test_server%{?_isa} = %{version}-%{release} -Requires: %{name}-toolbar%{?_isa} = %{version}-%{release} +Requires: %{name}-tftp%{?_isa} = %{version}-%{release} Requires: %{name}-tools%{?_isa} = %{version}-%{release} -Requires: %{name}-tv%{?_isa} = %{version}-%{release} -Requires: %{name}-typer%{?_isa} = %{version}-%{release} -Requires: %{name}-webtool%{?_isa} = %{version}-%{release} +%if %{__with_wxwidgets} Requires: %{name}-wx%{?_isa} = %{version}-%{release} +%endif # __with_wxwidgets Requires: %{name}-xmerl%{?_isa} = %{version}-%{release} -Obsoletes: erlang-docbuilder -Obsoletes: erlang-inviso %description Erlang is a general-purpose programming language and runtime @@ -243,22 +195,10 @@ environment. Erlang has built-in support for concurrency, distribution and fault tolerance. Erlang is used in several large telecommunication systems from Ericsson. -%package appmon -Summary: A utility used to supervise Applications executing on several Erlang nodes -Group: Development/Languages -Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_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} - -%description appmon -A utility used to supervise Applications executing on several Erlang nodes. +### BEGIN OF AUTOGENERATED LIST ### %package asn1 -Summary: Provides support for Abstract Syntax Notation One -Group: Development/Languages +Summary: Provides support for Abstract Syntax Notation One Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -266,128 +206,46 @@ 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 +Summary: A portable framework for automatic testing 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} 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}-webtool%{?_isa} = %{version}-%{release} Requires: %{name}-xmerl%{?_isa} = %{version}-%{release} +Obsoletes: erlang-test_server %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 -Group: Development/Languages +Summary: A byte code compiler for Erlang which produces highly compact code Requires: %{name}-crypto%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-hipe%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} %description compiler A byte code compiler for Erlang which produces highly compact code. -%package cosEvent -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} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosEvent -Orber OMG Event Service. - -%package cosEventDomain -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} -Requires: %{name}-orber%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosEventDomain -Orber OMG Event Domain Service. - -%package cosFileTransfer -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} -Requires: %{name}-kernel%{?_isa} = %{version}-%{release} -Requires: %{name}-orber%{?_isa} = %{version}-%{release} -Requires: %{name}-ssl%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosFileTransfer -Orber OMG File Transfer Service. - -%package cosNotification -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} -Requires: %{name}-kernel%{?_isa} = %{version}-%{release} -Requires: %{name}-orber%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosNotification -Orber OMG Notification Service. - -%package cosProperty -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} -Requires: %{name}-orber%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosProperty -Orber OMG Property Service. - -%package cosTime -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} -Requires: %{name}-orber%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosTime -Orber OMG Timer and TimerEvent Service. - -%package cosTransactions -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} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description cosTransactions -Orber OMG Transaction Service. - %package crypto -Summary: Cryptographical support -Group: Development/Languages +Summary: Cryptographical support +BuildRequires: pkgconfig(openssl) +%if 0%{?fedora} > 40 +BuildRequires: openssl-devel-engine +%endif Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -395,39 +253,38 @@ 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 +Summary: A debugger for debugging and testing of Erlang programs Requires: %{name}-compiler%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} 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 +Summary: A DIscrepancy AnaLYZer for ERlang programs Requires: %{name}-compiler%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} -Requires: %{name}-hipe%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release} Requires: %{name}-wx%{?_isa} = %{version}-%{release} Requires: graphviz +Obsoletes: erlang-typer %description dialyzer A DIscrepancy AnaLYZer for ERlang programs. +%endif # __with_wxwidgets %package diameter -Summary: Diameter (RFC 3588) library -Group: Development/Languages -BuildRequires: ed +Summary: Diameter (RFC 3588) library +BuildRequires: ed Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release} @@ -440,17 +297,16 @@ Diameter (RFC 3588) library %if %{with doc} %package doc -Summary: Erlang documentation -Group: Development/Languages -BuildArch: noarch +Summary: Erlang documentation +BuildRequires: fop +BuildRequires: libxslt %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 Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-inets%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} @@ -462,8 +318,7 @@ 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 Requires: %{name}-asn1%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} @@ -474,8 +329,7 @@ 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 Requires: %{name}-edoc%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -485,36 +339,52 @@ 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 +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 +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} -# 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) = 2.2 +#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.3 # See erts/emulator/beam/erl_nif.h or call erlang:system_info(nif_version). -Provides: erlang(erl_nif_version) = 2.4 +#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.17 +Provides: bundled(pcre) = 8.44 +# git commit 965d19506ff2aed72e039b8c650b6ef5e9446b8c +Provides: bundled(asmjit) +Obsoletes: erlang-appmon +Obsoletes: erlang-docbuilder +Obsoletes: erlang-gs +Obsoletes: erlang-hipe +Obsoletes: erlang-inviso +Obsoletes: erlang-ose +Obsoletes: erlang-otp_mibs +# Moved to https://github.com/erlang/percept +Obsoletes: erlang-percept < 20.2.3 +Obsoletes: erlang-pman +Obsoletes: erlang-toolbar +Obsoletes: erlang-tv +Obsoletes: erlang-webtool %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 +Summary: An event tracer for Erlang programs Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -522,10 +392,10 @@ Requires: %{name}-wx%{?_isa} = %{version}-%{release} %description et An event tracer for Erlang programs. +%endif # __with_wxwidgets %package eunit -Summary: Support for unit testing -Group: Development/Languages +Summary: Support for unit testing Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -533,95 +403,71 @@ 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}%{?_isa} = %{version}-%{release} +Summary: Examples for some Erlang modules +Requires: %{name}-erts%{?_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. +%endif # __with_examples -%package gs -Summary: A library for Tcl/Tk support in Erlang -Group: Development/Languages -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 - -%description gs -A Graphics System used to write platform independent user interfaces. - -%package hipe -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} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} -Requires: %{name}-syntax_tools%{?_isa} = %{version}-%{release} - -%description hipe -High Performance Erlang. - -%package ic -Summary: IDL compiler -Group: Development/Languages +%package ftp +Summary: FTP client Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} -%description ic -IDL compiler. +%description ftp +FTP client. + +%package gdb-tools +Summary: GDB plugin +License: GPL-3.0-or-later +Requires: gdb + +%description gdb-tools +GDB plugin. %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 HTTP client etc 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. +A set of services such as a Web server and a HTTP client etc. +%if %{__with_java} %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 +BuildRequires: java-devel +Requires: javapackages-tools +Requires: %{name}-erts%{?_isa} = %{version}-%{release} %description jinterface Low level interface to Java. +%endif # __with_java %package kernel -Summary: Main erlang library -Group: Development/Languages +Summary: Main erlang library Requires: %{name}-erts%{?_isa} = %{version}-%{release} 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 +Summary: Megaco/H.248 support library Requires: %{name}-asn1%{?_isa} = %{version}-%{release} Requires: %{name}-debugger%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} @@ -634,10 +480,10 @@ 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 -Group: Development/Languages +Summary: A heavy duty real-time distributed database Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -645,54 +491,37 @@ 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 +Summary: A set of tools for tracing and investigation of distributed systems Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-et%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_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} -Requires: %{name}-webtool%{?_isa} = %{version}-%{release} 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 -Group: Development/Languages +Summary: A library for unixODBC support in Erlang +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 -Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-inets%{?_isa} = %{version}-%{release} -Requires: %{name}-kernel%{?_isa} = %{version}-%{release} -Requires: %{name}-mnesia%{?_isa} = %{version}-%{release} -Requires: %{name}-ssl%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description orber -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 Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-mnesia%{?_isa} = %{version}-%{release} -Requires: %{name}-otp_mibs%{?_isa} = %{version}-%{release} Requires: %{name}-sasl%{?_isa} = %{version}-%{release} Requires: %{name}-snmp%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -700,21 +529,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} %description os_mon A monitor which allows inspection of the underlying operating system. -%package otp_mibs -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} -Requires: %{name}-snmp%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description otp_mibs -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 Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -722,32 +538,8 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} %description parsetools A set of parsing and lexical analysis tools. -%package percept -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} -Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description percept -A concurrency profiler tool. - -%package pman -Summary: A graphical process manager used to inspect Erlang processes -Group: Development/Languages -Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} -Requires: %{name}-kernel%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description pman -A graphical process manager used to inspect Erlang processes. - %package public_key -Summary: API to public key infrastructure -Group: Development/Languages +Summary: API to public key infrastructure Requires: %{name}-asn1%{?_isa} = %{version}-%{release} Requires: %{name}-crypto%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} @@ -757,9 +549,9 @@ 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 +Summary: A release management tool Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-sasl%{?_isa} = %{version}-%{release} @@ -774,10 +566,10 @@ 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 -Group: Development/Languages +Summary: A set of tools to include in a production system Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-mnesia%{?_isa} = %{version}-%{release} @@ -787,8 +579,7 @@ 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 Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -799,8 +590,7 @@ 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 Requires: %{name}-crypto%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} @@ -812,9 +602,52 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} Simple Network Management Protocol (SNMP) support including a MIB compiler and tools for creating SNMP agents. +%if %{__with_sources} +%package src +Summary: Erlang sources +Requires: %{name}-asn1%{?_isa} = %{version}-%{release} +Requires: %{name}-common_test%{?_isa} = %{version}-%{release} +Requires: %{name}-compiler%{?_isa} = %{version}-%{release} +Requires: %{name}-crypto%{?_isa} = %{version}-%{release} +Requires: %{name}-debugger%{?_isa} = %{version}-%{release} +Requires: %{name}-dialyzer%{?_isa} = %{version}-%{release} +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}-erts%{?_isa} = %{version}-%{release} +Requires: %{name}-et%{?_isa} = %{version}-%{release} +Requires: %{name}-eunit%{?_isa} = %{version}-%{release} +Requires: %{name}-ftp%{?_isa} = %{version}-%{release} +Requires: %{name}-inets%{?_isa} = %{version}-%{release} +Requires: %{name}-kernel%{?_isa} = %{version}-%{release} +Requires: %{name}-megaco%{?_isa} = %{version}-%{release} +Requires: %{name}-mnesia%{?_isa} = %{version}-%{release} +Requires: %{name}-observer%{?_isa} = %{version}-%{release} +Requires: %{name}-odbc%{?_isa} = %{version}-%{release} +Requires: %{name}-os_mon%{?_isa} = %{version}-%{release} +Requires: %{name}-parsetools%{?_isa} = %{version}-%{release} +Requires: %{name}-public_key%{?_isa} = %{version}-%{release} +Requires: %{name}-reltool%{?_isa} = %{version}-%{release} +Requires: %{name}-runtime_tools%{?_isa} = %{version}-%{release} +Requires: %{name}-sasl%{?_isa} = %{version}-%{release} +Requires: %{name}-snmp%{?_isa} = %{version}-%{release} +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} +Requires: %{name}-tftp%{?_isa} = %{version}-%{release} +Requires: %{name}-tools%{?_isa} = %{version}-%{release} +Requires: %{name}-wx%{?_isa} = %{version}-%{release} +Requires: %{name}-xmerl%{?_isa} = %{version}-%{release} + +%description src +Erlang sources. It may be useful as a reference for code completion tools in +various editors, for documentation or automatical-code generation purposes. +%endif # __with_sources + %package ssh -Summary: Secure Shell application with sftp and ssh support -Group: Development/Languages +Summary: Secure Shell application with sftp and ssh support Requires: %{name}-crypto%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} @@ -825,10 +658,10 @@ 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 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} @@ -837,8 +670,7 @@ 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 Requires: %{name}-compiler%{?_isa} = %{version}-%{release} Requires: %{name}-crypto%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} @@ -848,8 +680,8 @@ 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 +Requires: %{name}-compiler%{?_isa} = %{version}-%{release} Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -858,105 +690,53 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} 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 +%package tftp +Summary: TFTP client 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}-tools%{?_isa} = %{version}-%{release} - -%description test_server -The OTP Test Server. - -%package toolbar -Summary: A tool bar simplifying access to the Erlang tools -Group: Development/Languages -Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} -%description toolbar -A tool bar simplifying access to the Erlang tools. +%description tftp +TFTP client. %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 +%if %{__with_emacs} +BuildRequires: emacs +BuildRequires: emacs-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 -Provides: emacs-common-erlang = %{version}-%{release} +%if %{__with_emacs} +Requires: emacs-filesystem +Obsoletes: emacs-erlang +Obsoletes: emacs-erlang-el +%endif # __with_emacs + %description tools A set of programming tools including a coverage analyzer etc. -%package tv -Summary: An ETS and MNESIA graphical table visualizer -Group: Development/Languages -Requires: %{name}-erts%{?_isa} = %{version}-%{release} -Requires: %{name}-gs%{?_isa} = %{version}-%{release} -Requires: %{name}-kernel%{?_isa} = %{version}-%{release} -Requires: %{name}-mnesia%{?_isa} = %{version}-%{release} -Requires: %{name}-pman%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description tv -An ETS and MNESIA graphical table visualizer. - -%package typer -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} -Requires: %{name}-hipe%{?_isa} = %{version}-%{release} -Requires: %{name}-kernel%{?_isa} = %{version}-%{release} -Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} - -%description typer -TYPe annotator for ERlang programs. - -%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. - +%if %{__with_wxwidgets} %package wx -Summary: A library for wxWidgets support in Erlang -Group: Development/Languages +Summary: A library for wxWidgets support in Erlang +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. +%endif # __with_wxwidgets %package xmerl -Summary: Provides support for XML 1.0 -Group: Development/Languages +Summary: Provides support for XML 1.0 Requires: %{name}-erts%{?_isa} = %{version}-%{release} Requires: %{name}-kernel%{?_isa} = %{version}-%{release} Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} @@ -964,111 +744,63 @@ 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} -Group: Applications/Editors -BuildArch: noarch -Requires: xemacs(bin) >= %{_xemacs_version} - -%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 - -%description -n xemacs-erlang-el -Erlang mode for XEmacs (source lisp files). +### END OF AUTOGENERATED LIST ### %prep -%setup -q -n otp_src_%{upstream_ver}%{upstream_rel}-1 - -# start of autogenerated prep patch list -%patch1 -p1 -b .Do_not_format_man_pages_and_do_not_install_miscellan -%patch2 -p1 -b .Remove_rpath -%patch3 -p1 -b .Do_not_install_C_sources -%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 -%if 0%{?el4}%{?el5}%{?el6} -%ifnarch %{ix86} x86_64 -%patch7 -p1 -b .Ugly_workaround_for_java_1_5_0_gcj_which_doesn_t_sup -%endif -%endif -%patch8 -p1 -b .Fix_for_armv7hl_architecture -%patch9 -p1 -b .TEMPORARILY_disable_ECC_until_dust_settles -%patch10 -p1 -b .Fix_for_powerpc_architecture -%patch11 -p1 -b .Add_systemd_option_to_empd_Check_for_include_system -%patch12 -p1 -b .Add_systemd_support_to_epmd -%patch13 -p1 -b .Added_systemd_notify_support_to_EPMD -%patch14 -p1 -b .Install_internal_hrl_files_when_necessary -%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_ -%patch20 -p1 -b .R16B03_1_backport_of_TLS_1_0_padding_check -%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 -%patch29 -p1 -b .Fix_a_few_javadoc_errors -# end of autogenerated prep patch list +%autosetup -p1 -n otp-OTP-%{version} # FIXME we should come up with a better solution # remove shipped zlib sources #rm -f erts/emulator/zlib/*.[ch] -# Fix 664 file mode -chmod 644 lib/kernel/examples/uds_dist/c_src/Makefile -chmod 644 lib/kernel/examples/uds_dist/src/Makefile -chmod 644 lib/ssl/examples/certs/Makefile -chmod 644 lib/ssl/examples/src/Makefile - -# Remove old txt files -rm -f lib/ssl/examples/certs/etc/otpCA/index.txt.old -rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old - -# Reconfigure everything to apply changes to the autotools templates -./otp_build autoconf +# Create a sysusers.d config file +cat >erlang.sysusers.conf < xemacs-erlang-init.el << EOF -(setq load-path (cons "%{_xemacs_sitelispdir}/erlang" load-path)) -(setq erlang-root-dir "%{_libdir}/erlang") -(setq exec-path (cons "%{_libdir}/erlang/bin" exec-path)) -(require 'erlang-start) -EOF -mkdir xemacs-erlang -cp lib/tools/emacs/*.el xemacs-erlang/ -rm -f xemacs-erlang/erlang-flymake.el -pushd xemacs-erlang -%{_xemacs_bytecompile} *.el -popd - -make +%make_build %if %{with doc} # should use FOP_OPTS after #832323 is resolved @@ -1113,6 +832,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)" @@ -1126,18 +846,7 @@ for f in lib/tools/emacs/{README,*.el}; do "$RPM_BUILD_ROOT%{_emacs_sitelispdir}/erlang/" done install -m 0644 emacs-erlang/*.elc "$RPM_BUILD_ROOT%{_emacs_sitelispdir}/erlang/" - -# XEmacs related stuff -install -m 0755 -d "$RPM_BUILD_ROOT%{_xemacs_sitestartdir}" -install -m 0755 -d "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang" -install -m 0644 xemacs-erlang-init.el "$RPM_BUILD_ROOT%{_xemacs_sitestartdir}/erlang-init.el" -for f in lib/tools/emacs/{README,*.el}; do - b="$(basename "$f")"; - ln -s "%{_libdir}/erlang/lib/tools-${erlang_tools_vsn}/emacs/$b" \ - "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/" -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 @@ -1148,25 +857,37 @@ 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 +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 {} \; +%endif # __with_examples + chmod 0755 $RPM_BUILD_ROOT%{_libdir}/erlang/bin # Relocate doc-files into the proper directory %if %{with doc} -mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{n_uvr}/lib +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/lib pushd . cd $RPM_BUILD_ROOT%{_libdir}/erlang -mv -v doc $RPM_BUILD_ROOT%{_docdir}/%{n_uvr} -for i in erts-* ; do mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{n_uvr}/$i ; done +mv -v doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +for i in erts-* ; do mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$i ; done cd $RPM_BUILD_ROOT%{_libdir}/erlang/lib -for i in * ; do mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{n_uvr}/lib/$i || true ; done +for i in * ; do + mv -v $i/doc $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/lib/$i || true + # symlink 'chunks' in the code path for EEP-48 compliance (rhbz#2068758) + mkdir $i/doc + ln -s %{_docdir}/%{name}-%{version}/lib/$i/chunks $i/doc/ +done popd -cp -av AUTHORS EPLICENCE README.md $RPM_BUILD_ROOT%{_docdir}/%{n_uvr} -mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/PR.template $RPM_BUILD_ROOT%{_docdir}/%{n_uvr} -mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/README $RPM_BUILD_ROOT%{_docdir}/%{n_uvr} -mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{n_uvr} +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 @@ -1177,6 +898,17 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/man/man3/win32reg.* # remove empty directory rm -r $RPM_BUILD_ROOT%{_libdir}/erlang/erts-*/man +%if %{with doc} +# Move man-pages to a system-wide directory - in the same way as Debian did +# Erlang files from man 3 have too generic names +for manpage in $RPM_BUILD_ROOT%{_libdir}/erlang/man/man3/* +do + mv ${manpage} ${manpage}erl +done +mkdir -p $RPM_BUILD_ROOT%{_mandir}/ +mv $RPM_BUILD_ROOT%{_libdir}/erlang/man/* $RPM_BUILD_ROOT%{_mandir}/ +%endif + # remove outdated script rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/Install @@ -1200,51 +932,77 @@ do fi done +%if %{__with_java} # symlink *.jar files to appropriate places for subpackages install -m 0755 -d "$RPM_BUILD_ROOT%{_javadir}/%{name}" -# erlang-ic -ic_lib_dir="$(ls -d1 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ic-*/ | sed "s,^$RPM_BUILD_ROOT,,")" -test -d "$RPM_BUILD_ROOT$ic_lib_dir" -ln -s "${ic_lib_dir}/priv/ic.jar" "$RPM_BUILD_ROOT%{_javadir}/%{name}/" - # erlang-jinterface 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" -install -m 0755 -d "$RPM_BUILD_ROOT%{_javadir}" ln -s "${jinterface_lib_dir}priv/OtpErlang.jar" "$RPM_BUILD_ROOT%{_javadir}/%{name}/" +%endif # __with_java # systemd-related stuff -%if 0%{?el7}%{?fedora} install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/epmd.service install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/epmd.socket install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/epmd@.service install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/epmd@.socket + + +%if %{__with_wxwidgets} +echo "No need to fix additional scripts" +# Fix file conflict w/ python3-typer-cli by renaming our typer to erlang-typer. +# We only rename the symlink in %%{_bindir}, not its direct and indirect +# targets in subdirectories of %%{_libdir}. +# +# File conflicts: /usr/bin/typer between erlang-dialyzer and python3-typer-cli +# https://bugzilla.redhat.com/show_bug.cgi?id=2359567 +mv %{buildroot}%{_bindir}/typer %{buildroot}%{_bindir}/erlang-typer +%if %{with doc} +mv %{buildroot}%{_mandir}/man1/typer.1 \ + %{buildroot}%{_mandir}/man1/erlang-typer.1 +sed -r -i 's/^(\.TH[[:blank:]]+)?(typer)\b/\1erlang-\2/' \ + %{buildroot}%{_mandir}/man1/erlang-typer.1 %endif +%else +# FIXME workaround for broken Erlang install procedure +echo "Removing scripts which won't work w/o wxWidgets anyway" +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 + +# Provide a place for noarch libs to live. +install -d -p -m 0755 %{buildroot}%{_datadir}/erlang/ +install -d -p -m 0755 %{buildroot}%{_datadir}/erlang/lib + +install -m0644 -D erlang.sysusers.conf %{buildroot}%{_sysusersdir}/erlang.conf + +# GDB tools +install -D -p -m 0755 ./bin/*/jit-reader.so %{buildroot}%{_libdir}/gdb/jit-reader.so + +%check +TARGET="$(make target_configured)" +ERL_TOP="$(pwd)" +ERL_TOP=${ERL_TOP} make TARGET=${TARGET} release_tests +# Unfortunately running the tests will take several hours. So we build the +# package w/o tests for now. See this: +# https://github.com/erlang/otp/wiki/Running-tests -%pre erts -getent group epmd >/dev/null || groupadd -r epmd -getent passwd epmd >/dev/null || \ -useradd -r -g epmd -d /tmp -s /sbin/nologin \ --c "Erlang Port Mapper Daemon" epmd 2>/dev/null || : %files %if %{with doc} -%dir %{_docdir}/%{n_uvr}/ -%doc %{_docdir}/%{n_uvr}/AUTHORS -%doc %{_docdir}/%{n_uvr}/COPYRIGHT -%doc %{_docdir}/%{n_uvr}/EPLICENCE -%doc %{_docdir}/%{n_uvr}/PR.template -%doc %{_docdir}/%{n_uvr}/README -%doc %{_docdir}/%{n_uvr}/README.md -%endif - -%files appmon -%{_libdir}/erlang/lib/appmon-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/appmon.* +%dir %{_docdir}/%{name}-%{version}/ +%doc %{_docdir}/%{name}-%{version}/AUTHORS +%doc %{_docdir}/%{name}-%{version}/COPYRIGHT +%doc %{_docdir}/%{name}-%{version}/LICENSE.txt +%doc %{_docdir}/%{name}-%{version}/PR.template +%doc %{_docdir}/%{name}-%{version}/README.md %endif %files asn1 @@ -1253,176 +1011,77 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/asn1-*/priv %{_libdir}/erlang/lib/asn1-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/asn1ct.* -%{_libdir}/erlang/man/man3/asn1rt.* +%{_mandir}/man3/asn1ct.* %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/man3/ct.* -%{_libdir}/erlang/man/man3/ct_cover.* -%{_libdir}/erlang/man/man3/ct_ftp.* -%{_libdir}/erlang/man/man3/ct_hooks.* -%{_libdir}/erlang/man/man3/ct_master.* -%{_libdir}/erlang/man/man3/ct_netconfc.* -%{_libdir}/erlang/man/man3/ct_rpc.* -%{_libdir}/erlang/man/man3/ct_slave.* -%{_libdir}/erlang/man/man3/ct_snmp.* -%{_libdir}/erlang/man/man3/ct_ssh.* -%{_libdir}/erlang/man/man3/ct_telnet.* -%{_libdir}/erlang/man/man3/unix_telnet.* -%{_libdir}/erlang/man/man6/common_test.* +%{_mandir}/man1/ct_run.* +%{_mandir}/man3/ct.* +%{_mandir}/man3/ct_cover.* +%{_mandir}/man3/ct_ftp.* +%{_mandir}/man3/ct_hooks.* +%{_mandir}/man3/ct_master.* +%{_mandir}/man3/ct_netconfc.* +%{_mandir}/man3/ct_property_test.* +%{_mandir}/man3/ct_rpc.* +%{_mandir}/man3/ct_slave.* +%{_mandir}/man3/ct_snmp.* +%{_mandir}/man3/ct_ssh.* +%{_mandir}/man3/ct_suite.* +%{_mandir}/man3/ct_telnet.* +%{_mandir}/man3/ct_testspec.* +%{_mandir}/man3/unix_telnet.* +%{_mandir}/man6/common_test.* %endif +%endif # __with_wxwidgets %files compiler %{_libdir}/erlang/lib/compiler-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/compile.* -%endif - -%files cosEvent -%{_libdir}/erlang/lib/cosEvent-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/cosEventApp.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_ConsumerAdmin.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_EventChannel.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_ProxyPullConsumer.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_ProxyPullSupplier.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_ProxyPushConsumer.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_ProxyPushSupplier.* -%{_libdir}/erlang/man/man3/CosEventChannelAdmin_SupplierAdmin.* -%endif - -%files cosEventDomain -%{_libdir}/erlang/lib/cosEventDomain-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/CosEventDomainAdmin.* -%{_libdir}/erlang/man/man3/CosEventDomainAdmin_EventDomain.* -%{_libdir}/erlang/man/man3/CosEventDomainAdmin_EventDomainFactory.* -%{_libdir}/erlang/man/man3/cosEventDomainApp.* -%endif - -%files cosFileTransfer -%dir %{_libdir}/erlang/lib/cosFileTransfer-*/ -%{_libdir}/erlang/lib/cosFileTransfer-*/ebin -%{_libdir}/erlang/lib/cosFileTransfer-*/include -%{_libdir}/erlang/lib/cosFileTransfer-*/src -%if %{with doc} -%{_libdir}/erlang/man/man3/cosFileTransferApp.* -%{_libdir}/erlang/man/man3/CosFileTransfer_Directory.* -%{_libdir}/erlang/man/man3/CosFileTransfer_File.* -%{_libdir}/erlang/man/man3/CosFileTransfer_FileIterator.* -%{_libdir}/erlang/man/man3/CosFileTransfer_FileTransferSession.* -%{_libdir}/erlang/man/man3/CosFileTransfer_VirtualFileSystem.* -%endif - -%files cosNotification -%dir %{_libdir}/erlang/lib/cosNotification-*/ -%{_libdir}/erlang/lib/cosNotification-*/ebin -%{_libdir}/erlang/lib/cosNotification-*/include -%{_libdir}/erlang/lib/cosNotification-*/src -%if %{with doc} -%{_libdir}/erlang/man/man3/CosNotification.* -%{_libdir}/erlang/man/man3/CosNotification_AdminPropertiesAdmin.* -%{_libdir}/erlang/man/man3/cosNotificationApp.* -%{_libdir}/erlang/man/man3/CosNotification_QoSAdmin.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ConsumerAdmin.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_EventChannel.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_EventChannelFactory.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ProxyConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ProxyPullConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ProxyPullSupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ProxyPushConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ProxyPushSupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_ProxySupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_SequenceProxyPullConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_SequenceProxyPullSupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_SequenceProxyPushConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_SequenceProxyPushSupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_StructuredProxyPullConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_StructuredProxyPullSupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_StructuredProxyPushConsumer.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_StructuredProxyPushSupplier.* -%{_libdir}/erlang/man/man3/CosNotifyChannelAdmin_SupplierAdmin.* -%{_libdir}/erlang/man/man3/CosNotifyComm_NotifyPublish.* -%{_libdir}/erlang/man/man3/CosNotifyComm_NotifySubscribe.* -%{_libdir}/erlang/man/man3/CosNotifyFilter_Filter.* -%{_libdir}/erlang/man/man3/CosNotifyFilter_FilterAdmin.* -%{_libdir}/erlang/man/man3/CosNotifyFilter_FilterFactory.* -%{_libdir}/erlang/man/man3/CosNotifyFilter_MappingFilter.* -%endif - -%files cosProperty -%dir %{_libdir}/erlang/lib/cosProperty-*/ -%{_libdir}/erlang/lib/cosProperty-*/ebin -%{_libdir}/erlang/lib/cosProperty-*/include -%{_libdir}/erlang/lib/cosProperty-*/src -%if %{with doc} -%{_libdir}/erlang/man/man3/cosProperty.* -%{_libdir}/erlang/man/man3/CosPropertyService_PropertiesIterator.* -%{_libdir}/erlang/man/man3/CosPropertyService_PropertyNamesIterator.* -%{_libdir}/erlang/man/man3/CosPropertyService_PropertySet.* -%{_libdir}/erlang/man/man3/CosPropertyService_PropertySetDef.* -%{_libdir}/erlang/man/man3/CosPropertyService_PropertySetDefFactory.* -%{_libdir}/erlang/man/man3/CosPropertyService_PropertySetFactory.* -%endif - -%files cosTime -%dir %{_libdir}/erlang/lib/cosTime-*/ -%{_libdir}/erlang/lib/cosTime-*/ebin -%{_libdir}/erlang/lib/cosTime-*/include -%{_libdir}/erlang/lib/cosTime-*/src -%if %{with doc} -%{_libdir}/erlang/man/man3/cosTime.* -%{_libdir}/erlang/man/man3/CosTimerEvent_TimerEventHandler.* -%{_libdir}/erlang/man/man3/CosTimerEvent_TimerEventService.* -%{_libdir}/erlang/man/man3/CosTime_TimeService.* -%{_libdir}/erlang/man/man3/CosTime_TIO.* -%{_libdir}/erlang/man/man3/CosTime_UTO.* -%endif - -%files cosTransactions -%dir %{_libdir}/erlang/lib/cosTransactions-*/ -%{_libdir}/erlang/lib/cosTransactions-*/ebin -%{_libdir}/erlang/lib/cosTransactions-*/include -%{_libdir}/erlang/lib/cosTransactions-*/src -%if %{with doc} -%{_libdir}/erlang/man/man3/cosTransactions.* -%{_libdir}/erlang/man/man3/CosTransactions_Control.* -%{_libdir}/erlang/man/man3/CosTransactions_Coordinator.* -%{_libdir}/erlang/man/man3/CosTransactions_RecoveryCoordinator.* -%{_libdir}/erlang/man/man3/CosTransactions_Resource.* -%{_libdir}/erlang/man/man3/CosTransactions_SubtransactionAwareResource.* -%{_libdir}/erlang/man/man3/CosTransactions_Terminator.* -%{_libdir}/erlang/man/man3/CosTransactions_TransactionFactory.* +%{_mandir}/man3/cerl.* +%{_mandir}/man3/cerl_clauses.* +%{_mandir}/man3/cerl_trees.* +%{_mandir}/man3/compile.* %endif %files crypto %{_libdir}/erlang/lib/crypto-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/crypto.* -%{_libdir}/erlang/man/man6/crypto.* +%{_mandir}/man3/crypto.* +%{_mandir}/man6/crypto.* %endif +%if %{__with_wxwidgets} %files debugger %{_libdir}/erlang/lib/debugger-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/debugger.* -%{_libdir}/erlang/man/man3/i.* -%{_libdir}/erlang/man/man3/int.* +%{_mandir}/man3/debugger.* +%{_mandir}/man3/i.* +%{_mandir}/man3/int.* %endif +%endif # __with_wxwidgets +%if %{__with_wxwidgets} %files dialyzer %{_bindir}/dialyzer +# FIXME FIXME FIXME this must be installed properly!!!!!! +%{_bindir}/erlang-typer %{_libdir}/erlang/bin/dialyzer +%{_libdir}/erlang/bin/typer %{_libdir}/erlang/erts-*/bin/dialyzer +%{_libdir}/erlang/erts-*/bin/typer %{_libdir}/erlang/lib/dialyzer-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/dialyzer.* +%{_mandir}/man1/erlang-typer.* +%{_mandir}/man3/dialyzer.* %endif +%endif # __with_wxwidgets %files diameter %dir %{_libdir}/erlang/lib/diameter-*/ @@ -1431,78 +1090,78 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/diameter-*/include %{_libdir}/erlang/lib/diameter-*/src %if %{with doc} -%{_libdir}/erlang/man/man1/diameterc.* -%{_libdir}/erlang/man/man3/diameter.* -%{_libdir}/erlang/man/man3/diameter_app.* -%{_libdir}/erlang/man/man3/diameter_codec.* -%{_libdir}/erlang/man/man3/diameter_make.* -%{_libdir}/erlang/man/man3/diameter_sctp.* -%{_libdir}/erlang/man/man3/diameter_tcp.* -%{_libdir}/erlang/man/man3/diameter_transport.* -%{_libdir}/erlang/man/man4/diameter_dict.* +%{_mandir}/man1/diameterc.* +%{_mandir}/man3/diameter.* +%{_mandir}/man3/diameter_app.* +%{_mandir}/man3/diameter_codec.* +%{_mandir}/man3/diameter_make.* +%{_mandir}/man3/diameter_sctp.* +%{_mandir}/man3/diameter_tcp.* +%{_mandir}/man3/diameter_transport.* +%{_mandir}/man4/diameter_dict.* %endif %if %{with doc} %files doc -%doc %{_docdir}/%{n_uvr}/doc -%doc %{_docdir}/%{n_uvr}/erts-*/ -%doc %{_docdir}/%{n_uvr}/lib/ +%{_libdir}/erlang/lib/*/doc +%doc %{_docdir}/%{name}-%{version}/doc +%doc %{_docdir}/%{name}-%{version}/erts-*/ +%doc %{_docdir}/%{name}-%{version}/lib/ %endif %files edoc %{_libdir}/erlang/lib/edoc-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/edoc.* -%{_libdir}/erlang/man/man3/edoc_doclet.* -%{_libdir}/erlang/man/man3/edoc_extract.* -%{_libdir}/erlang/man/man3/edoc_layout.* -%{_libdir}/erlang/man/man3/edoc_lib.* -%{_libdir}/erlang/man/man3/edoc_run.* +%{_mandir}/man1/edoc.* +%{_mandir}/man3/edoc.* +%{_mandir}/man3/edoc_doclet.* +%{_mandir}/man3/edoc_doclet_chunks.* +%{_mandir}/man3/edoc_extract.* +%{_mandir}/man3/edoc_layout.* +%{_mandir}/man3/edoc_layout_chunks.* +%{_mandir}/man3/edoc_lib.* +%{_mandir}/man3/edoc_run.* %endif %files eldap %{_libdir}/erlang/lib/eldap-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/eldap.* +%{_mandir}/man3/eldap.* %endif %files erl_docgen %{_libdir}/erlang/lib/erl_docgen-*/ %if %{with doc} -%{_libdir}/erlang/man/man6/erl_docgen.* +%{_mandir}/man6/erl_docgen.* %endif %files erl_interface +%{_libdir}/erlang/bin/erl_call +%{_libdir}/erlang/erts-*/bin/erl_call %{_libdir}/erlang/lib/erl_interface-*/ %if %{with doc} -%{_libdir}/erlang/man/man1/erl_call.* -%{_libdir}/erlang/man/man3/ei.* -%{_libdir}/erlang/man/man3/ei_connect.* -%{_libdir}/erlang/man/man3/erl_connect.* -%{_libdir}/erlang/man/man3/erl_error.* -%{_libdir}/erlang/man/man3/erl_eterm.* -%{_libdir}/erlang/man/man3/erl_format.* -%{_libdir}/erlang/man/man3/erl_global.* -%{_libdir}/erlang/man/man3/erl_malloc.* -%{_libdir}/erlang/man/man3/erl_marshal.* -%{_libdir}/erlang/man/man3/registry.* +%{_mandir}/man1/erl_call.* +%{_mandir}/man3/ei.* +%{_mandir}/man3/ei_connect.* +%{_mandir}/man3/ei_global.* +#%%{_mandir}/man3/erl_connect.* +#%%{_mandir}/man3/erl_error.* +#%%{_mandir}/man3/erl_eterm.* +#%%{_mandir}/man3/erl_format.* +#%%{_mandir}/man3/erl_global.* +#%%{_mandir}/man3/erl_malloc.* +#%%{_mandir}/man3/erl_marshal.* %endif %files erts # TODO # In order to have a parallel-installable Erlang packages these directories # should be packaged separately +%dir %{_datadir}/erlang/ +%dir %{_datadir}/erlang/lib/ %dir %{_libdir}/erlang/ %dir %{_libdir}/erlang/bin/ %dir %{_libdir}/erlang/lib/ -%if %{with doc} -%dir %{_libdir}/erlang/man/ -%dir %{_libdir}/erlang/man/man1/ -%dir %{_libdir}/erlang/man/man3/ -%dir %{_libdir}/erlang/man/man4/ -%dir %{_libdir}/erlang/man/man6/ -%dir %{_libdir}/erlang/man/man7/ -%endif %dir %{_libdir}/erlang/releases/ %{_bindir}/epmd @@ -1511,7 +1170,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 @@ -1527,14 +1185,12 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/bin/to_erl %dir %{_libdir}/erlang/erts-*/ %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/ct_run %{_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 @@ -1545,48 +1201,56 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/erts-*/bin/start.src %{_libdir}/erlang/erts-*/bin/start_erl.src %{_libdir}/erlang/erts-*/bin/to_erl +%{_libdir}/erlang/erts-*/bin/yielding_c_fun %{_libdir}/erlang/erts-*/include %{_libdir}/erlang/erts-*/lib/ %{_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.* -%{_libdir}/erlang/man/man1/escript.* -%{_libdir}/erlang/man/man1/run_erl.* -%{_libdir}/erlang/man/man1/start.* -%{_libdir}/erlang/man/man1/start_erl.* -%{_libdir}/erlang/man/man3/driver_entry.* -%{_libdir}/erlang/man/man3/erl_driver.* -%{_libdir}/erlang/man/man3/erl_nif.* -%{_libdir}/erlang/man/man3/erl_prim_loader.* -%{_libdir}/erlang/man/man3/erlang.* -%{_libdir}/erlang/man/man3/erts_alloc.* -%{_libdir}/erlang/man/man3/init.* -%{_libdir}/erlang/man/man3/zlib.* +%{_mandir}/man1/epmd.* +%{_mandir}/man1/erl.* +%{_mandir}/man1/erlc.* +%{_mandir}/man1/escript.* +%{_mandir}/man1/run_erl.* +%{_mandir}/man1/start.* +%{_mandir}/man1/start_erl.* +%{_mandir}/man3/atomics.* +%{_mandir}/man3/counters.* +%{_mandir}/man3/driver_entry.* +%{_mandir}/man3/erl_driver.* +%{_mandir}/man3/erl_nif.* +%{_mandir}/man3/erl_prim_loader.* +%{_mandir}/man3/erl_tracer.* +%{_mandir}/man3/erlang.* +%{_mandir}/man3/erts_alloc.* +%{_mandir}/man3/init.* +%{_mandir}/man3/net.* +%{_mandir}/man3/persistent_term.* +%{_mandir}/man3/scheduler.* +%{_mandir}/man3/socket.* +%{_mandir}/man3/zlib.* %endif %{_libdir}/erlang/releases/* %{_libdir}/erlang/usr/ -%if 0%{?el7}%{?fedora} %{_unitdir}/epmd.service %{_unitdir}/epmd.socket %{_unitdir}/epmd@.service %{_unitdir}/epmd@.socket -%endif +%{_sysusersdir}/erlang.conf +%if %{__with_wxwidgets} %files et %dir %{_libdir}/erlang/lib/et-*/ %{_libdir}/erlang/lib/et-*/ebin %{_libdir}/erlang/lib/et-*/include %{_libdir}/erlang/lib/et-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/et.* -%{_libdir}/erlang/man/man3/et_collector.* -%{_libdir}/erlang/man/man3/et_selector.* -%{_libdir}/erlang/man/man3/et_viewer.* +%{_mandir}/man3/et.* +%{_mandir}/man3/et_collector.* +%{_mandir}/man3/et_selector.* +%{_mandir}/man3/et_viewer.* %endif +%endif # __with_wxwidgets %files eunit %dir %{_libdir}/erlang/lib/eunit-*/ @@ -1594,66 +1258,52 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/eunit-*/include %{_libdir}/erlang/lib/eunit-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/eunit.* -%{_libdir}/erlang/man/man3/eunit_surefire.* +%{_mandir}/man3/eunit.* +%{_mandir}/man3/eunit_surefire.* %endif +%if %{__with_examples} %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/ +%if %{__with_wxwidgets} %{_libdir}/erlang/lib/et-*/examples/ +%endif # __with_wxwidgets %{_libdir}/erlang/lib/eunit-*/examples/ -%{_libdir}/erlang/lib/gs-*/examples/ -%{_libdir}/erlang/lib/ic-*/examples/ %{_libdir}/erlang/lib/inets-*/examples/ %{_libdir}/erlang/lib/kernel-*/examples/ +%if %{__with_wxwidgets} %{_libdir}/erlang/lib/megaco-*/examples/ +%endif # __with_wxwidgets %{_libdir}/erlang/lib/mnesia-*/examples/ +%if %{__with_wxwidgets} %{_libdir}/erlang/lib/observer-*/examples/ -%{_libdir}/erlang/lib/orber-*/examples/ +%endif # __with_wxwidgets +%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/ -#%{_libdir}/erlang/lib/ssh-*/examples/ %{_libdir}/erlang/lib/ssl-*/examples/ %{_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 -%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 +%files ftp +%dir %{_libdir}/erlang/lib/ftp-*/ +%{_libdir}/erlang/lib/ftp-*/ebin +%{_libdir}/erlang/lib/ftp-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/gs.* +%{_mandir}/man3/ftp.* %endif -%files hipe -%{_libdir}/erlang/lib/hipe-*/ - -%files ic -%dir %{_libdir}/erlang/lib/ic-*/ -%{_libdir}/erlang/lib/ic-*/ebin -%{_libdir}/erlang/lib/ic-*/include -%{_libdir}/erlang/lib/ic-*/priv -%{_libdir}/erlang/lib/ic-*/src -# FIXME see erlang-jinterface also -#%dir %{_javadir}/%{name}/ -%{_javadir}/%{name}/ic.jar -%if %{with doc} -%{_libdir}/erlang/man/man3/ic.* -%{_libdir}/erlang/man/man3/ic_clib.* -%{_libdir}/erlang/man/man3/ic_c_protocol.* -%endif +%files gdb-tools +%{_libdir}/gdb/jit-reader.so %files inets %dir %{_libdir}/erlang/lib/inets-*/ @@ -1662,26 +1312,30 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/inets-*/priv %{_libdir}/erlang/lib/inets-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/ftp.* -%{_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_socket.* -%{_libdir}/erlang/man/man3/httpd_util.* -%{_libdir}/erlang/man/man3/inets.* -%{_libdir}/erlang/man/man3/mod_alias.* -%{_libdir}/erlang/man/man3/mod_auth.* -%{_libdir}/erlang/man/man3/mod_esi.* -%{_libdir}/erlang/man/man3/mod_security.* -%{_libdir}/erlang/man/man3/tftp.* +%{_mandir}/man3/ftp.* +%{_mandir}/man3/http_uri.* +%{_mandir}/man3/httpc.* +%{_mandir}/man3/httpd.* +%{_mandir}/man3/httpd_custom_api.* +%{_mandir}/man3/httpd_socket.* +%{_mandir}/man3/httpd_util.* +%{_mandir}/man3/inets.* +%{_mandir}/man3/mod_alias.* +%{_mandir}/man3/mod_auth.* +%{_mandir}/man3/mod_esi.* +%{_mandir}/man3/mod_security.* +%{_mandir}/man3/tftp.* %endif +%if %{__with_java} %files jinterface -# FIXME see erlang-ic also -#%dir %{_javadir}/%{name}/ +%dir %{_javadir}/%{name}/ %{_javadir}/%{name}/OtpErlang.jar %{_libdir}/erlang/lib/jinterface-*/ +%if %{with doc} +%{_mandir}/man3/jinterface.* +%endif +%endif # __with_java %files kernel %dir %{_libdir}/erlang/lib/kernel-*/ @@ -1689,40 +1343,47 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/kernel-*/include %{_libdir}/erlang/lib/kernel-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/application.* -%{_libdir}/erlang/man/man3/auth.* -%{_libdir}/erlang/man/man3/code.* -%{_libdir}/erlang/man/man3/disk_log.* -%{_libdir}/erlang/man/man3/erl_boot_server.* -%{_libdir}/erlang/man/man3/erl_ddll.* -%{_libdir}/erlang/man/man3/erl_prim_loader_stub.* -%{_libdir}/erlang/man/man3/erlang_stub.* -%{_libdir}/erlang/man/man3/error_handler.* -%{_libdir}/erlang/man/man3/error_logger.* -%{_libdir}/erlang/man/man3/file.* -%{_libdir}/erlang/man/man3/gen_sctp.* -%{_libdir}/erlang/man/man3/gen_tcp.* -%{_libdir}/erlang/man/man3/gen_udp.* -%{_libdir}/erlang/man/man3/global.* -%{_libdir}/erlang/man/man3/global_group.* -%{_libdir}/erlang/man/man3/heart.* -%{_libdir}/erlang/man/man3/inet.* -%{_libdir}/erlang/man/man3/inet_res.* -%{_libdir}/erlang/man/man3/init_stub.* -%{_libdir}/erlang/man/man3/net_adm.* -%{_libdir}/erlang/man/man3/net_kernel.* -%{_libdir}/erlang/man/man3/os.* -%{_libdir}/erlang/man/man3/pg2.* -%{_libdir}/erlang/man/man3/rpc.* -%{_libdir}/erlang/man/man3/seq_trace.* -%{_libdir}/erlang/man/man3/user.* -%{_libdir}/erlang/man/man3/wrap_log_reader.* -%{_libdir}/erlang/man/man3/zlib_stub.* -%{_libdir}/erlang/man/man4/app.* -%{_libdir}/erlang/man/man4/config.* -%{_libdir}/erlang/man/man6/kernel.* +%{_mandir}/man3/application.* +%{_mandir}/man3/auth.* +%{_mandir}/man3/code.* +%{_mandir}/man3/disk_log.* +%{_mandir}/man3/erl_boot_server.* +%{_mandir}/man3/erl_ddll.* +%{_mandir}/man3/erl_epmd.* +%{_mandir}/man3/erl_prim_loader_stub.* +%{_mandir}/man3/erlang_stub.* +%{_mandir}/man3/erpc.* +%{_mandir}/man3/error_handler.* +%{_mandir}/man3/error_logger.* +%{_mandir}/man3/file.* +%{_mandir}/man3/gen_sctp.* +%{_mandir}/man3/gen_tcp.* +%{_mandir}/man3/gen_udp.* +%{_mandir}/man3/global.* +%{_mandir}/man3/global_group.* +%{_mandir}/man3/heart.* +%{_mandir}/man3/inet.* +%{_mandir}/man3/inet_res.* +%{_mandir}/man3/init_stub.* +%{_mandir}/man3/logger.* +%{_mandir}/man3/logger_disk_log_h.* +%{_mandir}/man3/logger_filters.* +%{_mandir}/man3/logger_formatter.* +%{_mandir}/man3/logger_std_h.* +%{_mandir}/man3/net_adm.* +%{_mandir}/man3/net_kernel.* +%{_mandir}/man3/os.* +%{_mandir}/man3/pg.* +%{_mandir}/man3/rpc.* +%{_mandir}/man3/seq_trace.* +%{_mandir}/man3/wrap_log_reader.* +%{_mandir}/man3/zlib_stub.* +%{_mandir}/man4/app.* +%{_mandir}/man4/config.* +%{_mandir}/man6/kernel.* %endif +%if %{__with_wxwidgets} %files megaco %dir %{_libdir}/erlang/lib/megaco-*/ %{_libdir}/erlang/lib/megaco-*/ebin @@ -1730,31 +1391,32 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/megaco-*/priv %{_libdir}/erlang/lib/megaco-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/megaco.* -%{_libdir}/erlang/man/man3/megaco_codec_meas.* -%{_libdir}/erlang/man/man3/megaco_codec_mstone1.* -%{_libdir}/erlang/man/man3/megaco_codec_mstone2.* -%{_libdir}/erlang/man/man3/megaco_codec_transform.* -%{_libdir}/erlang/man/man3/megaco_edist_compress.* -%{_libdir}/erlang/man/man3/megaco_encoder.* -%{_libdir}/erlang/man/man3/megaco_flex_scanner.* -%{_libdir}/erlang/man/man3/megaco_tcp.* -%{_libdir}/erlang/man/man3/megaco_transport.* -%{_libdir}/erlang/man/man3/megaco_udp.* -%{_libdir}/erlang/man/man3/megaco_user.* +%{_mandir}/man3/megaco.* +%{_mandir}/man3/megaco_codec_meas.* +%{_mandir}/man3/megaco_codec_mstone1.* +%{_mandir}/man3/megaco_codec_mstone2.* +%{_mandir}/man3/megaco_codec_transform.* +%{_mandir}/man3/megaco_edist_compress.* +%{_mandir}/man3/megaco_encoder.* +%{_mandir}/man3/megaco_flex_scanner.* +%{_mandir}/man3/megaco_tcp.* +%{_mandir}/man3/megaco_transport.* +%{_mandir}/man3/megaco_udp.* +%{_mandir}/man3/megaco_user.* %endif +%endif # __with_wxwidgets %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.* -%{_libdir}/erlang/man/man3/mnesia_frag_hash.* -%{_libdir}/erlang/man/man3/mnesia_registry.* +%{_mandir}/man3/mnesia.* +%{_mandir}/man3/mnesia_frag_hash.* +%{_mandir}/man3/mnesia_registry.* %endif +%if %{__with_wxwidgets} %files observer %dir %{_libdir}/erlang/lib/observer-*/ %{_libdir}/erlang/lib/observer-*/ebin/ @@ -1762,98 +1424,54 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/observer-*/priv/ %{_libdir}/erlang/lib/observer-*/src/ %if %{with doc} -%{_libdir}/erlang/man/man3/crashdump.* -%{_libdir}/erlang/man/man3/observer.* -%{_libdir}/erlang/man/man3/ttb.* -%{_libdir}/erlang/man/man6/observer.* +%{_mandir}/man1/cdv.* +%{_mandir}/man3/crashdump.* +%{_mandir}/man3/etop.* +%{_mandir}/man3/observer.* +%{_mandir}/man3/ttb.* +%{_mandir}/man6/observer.* %endif +%endif # __with_wxwidgets %files odbc %{_libdir}/erlang/lib/odbc-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/odbc.* -%endif - -%files orber -%dir %{_libdir}/erlang/lib/orber-*/ -%{_libdir}/erlang/lib/orber-*/COSS -%{_libdir}/erlang/lib/orber-*/ebin -%{_libdir}/erlang/lib/orber-*/include -%{_libdir}/erlang/lib/orber-*/java_src -%{_libdir}/erlang/lib/orber-*/priv -%{_libdir}/erlang/lib/orber-*/src -%if %{with doc} -%{_libdir}/erlang/man/man3/CosNaming.* -%{_libdir}/erlang/man/man3/CosNaming_BindingIterator.* -%{_libdir}/erlang/man/man3/CosNaming_NamingContext.* -%{_libdir}/erlang/man/man3/CosNaming_NamingContextExt.* -%{_libdir}/erlang/man/man3/Module_Interface.* -%{_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.* -%{_libdir}/erlang/man/man3/lname_component.* -%{_libdir}/erlang/man/man3/orber.* -%{_libdir}/erlang/man/man3/orber_acl.* -%{_libdir}/erlang/man/man3/orber_diagnostics.* -%{_libdir}/erlang/man/man3/orber_ifr.* -%{_libdir}/erlang/man/man3/orber_tc.* +%{_mandir}/man3/odbc.* %endif %files os_mon %{_libdir}/erlang/lib/os_mon-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/cpu_sup.* -%{_libdir}/erlang/man/man3/disksup.* -%{_libdir}/erlang/man/man3/memsup.* -%{_libdir}/erlang/man/man3/os_mon_mib.* -%{_libdir}/erlang/man/man3/os_sup.* -%{_libdir}/erlang/man/man6/os_mon.* -%endif - -%files otp_mibs -%{_libdir}/erlang/lib/otp_mibs-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/otp_mib.* +%{_mandir}/man3/cpu_sup.* +%{_mandir}/man3/disksup.* +%{_mandir}/man3/memsup.* +%{_mandir}/man3/os_sup.* +%{_mandir}/man6/os_mon.* %endif %files parsetools %{_libdir}/erlang/lib/parsetools-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/leex.* -%{_libdir}/erlang/man/man3/yecc.* -%endif - -%files percept -%{_libdir}/erlang/lib/percept-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/egd.* -%{_libdir}/erlang/man/man3/percept.* -%{_libdir}/erlang/man/man3/percept_profile.* -%endif - -%files pman -%{_libdir}/erlang/lib/pman-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/pman.* +%{_mandir}/man3/leex.* +%{_mandir}/man3/yecc.* %endif %files public_key %{_libdir}/erlang/lib/public_key-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/public_key.* +%{_mandir}/man3/public_key.* +%{_mandir}/man6/public_key.* %endif +%if %{__with_wxwidgets} %files reltool %dir %{_libdir}/erlang/lib/reltool-*/ %{_libdir}/erlang/lib/reltool-*/ebin %{_libdir}/erlang/lib/reltool-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/reltool.* +%{_mandir}/man3/reltool.* %endif +%endif # __with_wxwidgets %files runtime_tools %dir %{_libdir}/erlang/lib/runtime_tools-*/ @@ -1861,10 +1479,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/runtime_tools-*/include/ %{_libdir}/erlang/lib/runtime_tools-*/priv/ %if %{with doc} -%{_libdir}/erlang/man/man3/dbg.* -%{_libdir}/erlang/man/man3/dyntrace.* -%{_libdir}/erlang/man/man3/erts_alloc_config.* -%{_libdir}/erlang/man/man6/runtime_tools.* +%{_mandir}/man3/dbg.* +%{_mandir}/man3/dyntrace.* +%{_mandir}/man3/msacc.* +%{_mandir}/man3/system_information.* +%{_mandir}/man6/runtime_tools.* %endif %files sasl @@ -1872,16 +1491,15 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/sasl-*/ebin %{_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.* -%{_libdir}/erlang/man/man4/appup.* -%{_libdir}/erlang/man/man4/rel.* -%{_libdir}/erlang/man/man4/relup.* -%{_libdir}/erlang/man/man4/script.* -%{_libdir}/erlang/man/man6/sasl.* +%{_mandir}/man3/alarm_handler.* +%{_mandir}/man3/rb.* +%{_mandir}/man3/release_handler.* +%{_mandir}/man3/systools.* +%{_mandir}/man4/appup.* +%{_mandir}/man4/rel.* +%{_mandir}/man4/relup.* +%{_mandir}/man4/script.* +%{_mandir}/man6/sasl.* %endif %files snmp @@ -1893,57 +1511,64 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/snmp-*/priv %{_libdir}/erlang/lib/snmp-*/src %if %{with doc} -%{_libdir}/erlang/man/man1/snmpc.* -%{_libdir}/erlang/man/man3/snmp.* -%{_libdir}/erlang/man/man3/snmpa.* -%{_libdir}/erlang/man/man3/snmpa_conf.* -%{_libdir}/erlang/man/man3/snmpa_discovery_handler.* -%{_libdir}/erlang/man/man3/snmpa_error.* -%{_libdir}/erlang/man/man3/snmpa_error_io.* -%{_libdir}/erlang/man/man3/snmpa_error_logger.* -%{_libdir}/erlang/man/man3/snmpa_error_report.* -%{_libdir}/erlang/man/man3/snmpa_local_db.* -%{_libdir}/erlang/man/man3/snmpa_mib_data.* -%{_libdir}/erlang/man/man3/snmpa_mib_storage.* -%{_libdir}/erlang/man/man3/snmpa_mpd.* -%{_libdir}/erlang/man/man3/snmpa_network_interface.* -%{_libdir}/erlang/man/man3/snmpa_network_interface_filter.* -%{_libdir}/erlang/man/man3/snmpa_notification_delivery_info_receiver.* -%{_libdir}/erlang/man/man3/snmpa_notification_filter.* -%{_libdir}/erlang/man/man3/snmpa_supervisor.* -%{_libdir}/erlang/man/man3/snmpc.* -%{_libdir}/erlang/man/man3/snmp_community_mib.* -%{_libdir}/erlang/man/man3/snmp_framework_mib.* -%{_libdir}/erlang/man/man3/snmp_generic.* -%{_libdir}/erlang/man/man3/snmp_index.* -%{_libdir}/erlang/man/man3/snmpm.* -%{_libdir}/erlang/man/man3/snmpm_conf.* -%{_libdir}/erlang/man/man3/snmpm_mpd.* -%{_libdir}/erlang/man/man3/snmpm_network_interface.* -%{_libdir}/erlang/man/man3/snmpm_network_interface_filter.* -%{_libdir}/erlang/man/man3/snmpm_user.* -%{_libdir}/erlang/man/man3/snmp_notification_mib.* -%{_libdir}/erlang/man/man3/snmp_pdus.* -%{_libdir}/erlang/man/man3/snmp_standard_mib.* -%{_libdir}/erlang/man/man3/snmp_target_mib.* -%{_libdir}/erlang/man/man3/snmp_user_based_sm_mib.* -%{_libdir}/erlang/man/man3/snmp_view_based_acm_mib.* -%{_libdir}/erlang/man/man6/snmp.* -%{_libdir}/erlang/man/man7/INET-ADDRESS-MIB.* -%{_libdir}/erlang/man/man7/OTP-SNMPEA-MIB.* -%{_libdir}/erlang/man/man7/RFC1213-MIB.* -%{_libdir}/erlang/man/man7/SNMP-COMMUNITY-MIB.* -%{_libdir}/erlang/man/man7/SNMP-FRAMEWORK-MIB.* -%{_libdir}/erlang/man/man7/SNMP-MPD-MIB.* -%{_libdir}/erlang/man/man7/SNMP-NOTIFICATION-MIB.* -%{_libdir}/erlang/man/man7/SNMP-TARGET-MIB.* -%{_libdir}/erlang/man/man7/SNMP-USER-BASED-SM-MIB.* -%{_libdir}/erlang/man/man7/SNMP-USM-AES-MIB.* -%{_libdir}/erlang/man/man7/SNMPv2-MIB.* -%{_libdir}/erlang/man/man7/SNMPv2-TM.* -%{_libdir}/erlang/man/man7/SNMP-VIEW-BASED-ACM-MIB.* -%{_libdir}/erlang/man/man7/STANDARD-MIB.* -%{_libdir}/erlang/man/man7/TRANSPORT-ADDRESS-MIB.* +%{_mandir}/man1/snmpc.* +%{_mandir}/man3/snmp.* +%{_mandir}/man3/snmpa.* +%{_mandir}/man3/snmpa_conf.* +%{_mandir}/man3/snmpa_discovery_handler.* +%{_mandir}/man3/snmpa_error.* +%{_mandir}/man3/snmpa_error_io.* +%{_mandir}/man3/snmpa_error_logger.* +%{_mandir}/man3/snmpa_error_report.* +%{_mandir}/man3/snmpa_local_db.* +%{_mandir}/man3/snmpa_mib_data.* +%{_mandir}/man3/snmpa_mib_storage.* +%{_mandir}/man3/snmpa_mpd.* +%{_mandir}/man3/snmpa_network_interface.* +%{_mandir}/man3/snmpa_network_interface_filter.* +%{_mandir}/man3/snmpa_notification_delivery_info_receiver.* +%{_mandir}/man3/snmpa_notification_filter.* +%{_mandir}/man3/snmpa_supervisor.* +%{_mandir}/man3/snmpc.* +%{_mandir}/man3/snmp_community_mib.* +%{_mandir}/man3/snmp_framework_mib.* +%{_mandir}/man3/snmp_generic.* +%{_mandir}/man3/snmp_index.* +%{_mandir}/man3/snmpm.* +%{_mandir}/man3/snmpm_conf.* +%{_mandir}/man3/snmpm_mpd.* +%{_mandir}/man3/snmpm_network_interface.* +%{_mandir}/man3/snmpm_network_interface_filter.* +%{_mandir}/man3/snmpm_user.* +%{_mandir}/man3/snmp_notification_mib.* +%{_mandir}/man3/snmp_pdus.* +%{_mandir}/man3/snmp_standard_mib.* +%{_mandir}/man3/snmp_target_mib.* +%{_mandir}/man3/snmp_user_based_sm_mib.* +%{_mandir}/man3/snmp_view_based_acm_mib.* +%{_mandir}/man6/snmp.* +%{_mandir}/man7/INET-ADDRESS-MIB.* +%{_mandir}/man7/OTP-SNMPEA-MIB.* +%{_mandir}/man7/RFC1213-MIB.* +%{_mandir}/man7/SNMP-COMMUNITY-MIB.* +%{_mandir}/man7/SNMP-FRAMEWORK-MIB.* +%{_mandir}/man7/SNMP-MPD-MIB.* +%{_mandir}/man7/SNMP-NOTIFICATION-MIB.* +%{_mandir}/man7/SNMP-TARGET-MIB.* +%{_mandir}/man7/SNMP-USER-BASED-SM-MIB.* +%{_mandir}/man7/SNMP-USM-AES-MIB.* +%{_mandir}/man7/SNMPv2-MIB.* +%{_mandir}/man7/SNMPv2-TM.* +%{_mandir}/man7/SNMP-VIEW-BASED-ACM-MIB.* +%{_mandir}/man7/STANDARD-MIB.* +%{_mandir}/man7/TRANSPORT-ADDRESS-MIB.* +%endif + +%if %{__with_sources} +%files src +%dir %{_libdir}/erlang/lib/*/src/ +%{_libdir}/erlang/lib/*/src/*.erl +%{_libdir}/erlang/lib/*/src/*.yrl %endif %files ssh @@ -1952,14 +1577,17 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/ssh-*/include %{_libdir}/erlang/lib/ssh-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/ssh.* -%{_libdir}/erlang/man/man3/ssh_channel.* -%{_libdir}/erlang/man/man3/ssh_client_key_api.* -%{_libdir}/erlang/man/man3/ssh_connection.* -%{_libdir}/erlang/man/man3/ssh_server_key_api.* -%{_libdir}/erlang/man/man3/ssh_sftp.* -%{_libdir}/erlang/man/man3/ssh_sftpd.* -%{_libdir}/erlang/man/man6/ssh.* +%{_mandir}/man3/ssh.* +%{_mandir}/man3/ssh_agent.* +%{_mandir}/man3/ssh_client_channel.* +%{_mandir}/man3/ssh_client_key_api.* +%{_mandir}/man3/ssh_connection.* +%{_mandir}/man3/ssh_file.* +%{_mandir}/man3/ssh_server_channel.* +%{_mandir}/man3/ssh_server_key_api.* +%{_mandir}/man3/ssh_sftp.* +%{_mandir}/man3/ssh_sftpd.* +%{_mandir}/man6/SSH.* %endif %files ssl @@ -1967,9 +1595,11 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/ssl-*/ebin %{_libdir}/erlang/lib/ssl-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/ssl.* -%{_libdir}/erlang/man/man3/ssl_session_cache_api.* -%{_libdir}/erlang/man/man6/ssl.* +%{_mandir}/man3/ssl.* +%{_mandir}/man3/ssl_crl_cache.* +%{_mandir}/man3/ssl_crl_cache_api.* +%{_mandir}/man3/ssl_session_cache_api.* +%{_mandir}/man6/ssl.* %endif %files stdlib @@ -1978,137 +1608,128 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/stdlib-*/include %{_libdir}/erlang/lib/stdlib-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/array.* -%{_libdir}/erlang/man/man3/base64.* -%{_libdir}/erlang/man/man3/beam_lib.* -%{_libdir}/erlang/man/man3/binary.* -%{_libdir}/erlang/man/man3/c.* -%{_libdir}/erlang/man/man3/calendar.* -%{_libdir}/erlang/man/man3/dets.* -%{_libdir}/erlang/man/man3/dict.* -%{_libdir}/erlang/man/man3/digraph.* -%{_libdir}/erlang/man/man3/digraph_utils.* -%{_libdir}/erlang/man/man3/epp.* -%{_libdir}/erlang/man/man3/erl_eval.* -%{_libdir}/erlang/man/man3/erl_expand_records.* -%{_libdir}/erlang/man/man3/erl_id_trans.* -%{_libdir}/erlang/man/man3/erl_internal.* -%{_libdir}/erlang/man/man3/erl_lint.* -%{_libdir}/erlang/man/man3/erl_parse.* -%{_libdir}/erlang/man/man3/erl_pp.* -%{_libdir}/erlang/man/man3/erl_scan.* -%{_libdir}/erlang/man/man3/erl_tar.* -%{_libdir}/erlang/man/man3/ets.* -%{_libdir}/erlang/man/man3/file_sorter.* -%{_libdir}/erlang/man/man3/filelib.* -%{_libdir}/erlang/man/man3/filename.* -%{_libdir}/erlang/man/man3/gb_sets.* -%{_libdir}/erlang/man/man3/gb_trees.* -%{_libdir}/erlang/man/man3/gen_event.* -%{_libdir}/erlang/man/man3/gen_fsm.* -%{_libdir}/erlang/man/man3/gen_server.* -%{_libdir}/erlang/man/man3/io.* -%{_libdir}/erlang/man/man3/io_lib.* -%{_libdir}/erlang/man/man3/lib.* -%{_libdir}/erlang/man/man3/lists.* -%{_libdir}/erlang/man/man3/log_mf_h.* -%{_libdir}/erlang/man/man3/math.* -%{_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/random.* -%{_libdir}/erlang/man/man3/re.* -%{_libdir}/erlang/man/man3/sets.* -%{_libdir}/erlang/man/man3/shell.* -%{_libdir}/erlang/man/man3/shell_default.* -%{_libdir}/erlang/man/man3/slave.* -%{_libdir}/erlang/man/man3/sofs.* -%{_libdir}/erlang/man/man3/string.* -%{_libdir}/erlang/man/man3/supervisor.* -%{_libdir}/erlang/man/man3/supervisor_bridge.* -%{_libdir}/erlang/man/man3/sys.* -%{_libdir}/erlang/man/man3/timer.* -%{_libdir}/erlang/man/man3/unicode.* -%{_libdir}/erlang/man/man3/zip.* -%{_libdir}/erlang/man/man6/stdlib.* +%{_mandir}/man3/argparse.* +%{_mandir}/man3/array.* +%{_mandir}/man3/base64.* +%{_mandir}/man3/beam_lib.* +%{_mandir}/man3/binary.* +%{_mandir}/man3/c.* +%{_mandir}/man3/calendar.* +%{_mandir}/man3/dets.* +%{_mandir}/man3/dict.* +%{_mandir}/man3/digraph.* +%{_mandir}/man3/digraph_utils.* +%{_mandir}/man3/edlin.* +%{_mandir}/man3/edlin_expand.* +%{_mandir}/man3/epp.* +%{_mandir}/man3/erl_anno.* +%{_mandir}/man3/erl_error.* +%{_mandir}/man3/erl_eval.* +%{_mandir}/man3/erl_expand_records.* +%{_mandir}/man3/erl_features.* +%{_mandir}/man3/erl_id_trans.* +%{_mandir}/man3/erl_internal.* +%{_mandir}/man3/erl_lint.* +%{_mandir}/man3/erl_parse.* +%{_mandir}/man3/erl_pp.* +%{_mandir}/man3/erl_scan.* +%{_mandir}/man3/erl_tar.* +%{_mandir}/man3/ets.* +%{_mandir}/man3/file_sorter.* +%{_mandir}/man3/filelib.* +%{_mandir}/man3/filename.* +%{_mandir}/man3/gb_sets.* +%{_mandir}/man3/gb_trees.* +%{_mandir}/man3/gen_event.* +%{_mandir}/man3/gen_fsm.* +%{_mandir}/man3/gen_server.* +%{_mandir}/man3/gen_statem.* +%{_mandir}/man3/io.* +%{_mandir}/man3/io_lib.* +%{_mandir}/man3/lists.* +%{_mandir}/man3/log_mf_h.* +%{_mandir}/man3/maps.* +%{_mandir}/man3/math.* +%{_mandir}/man3/ms_transform.* +%{_mandir}/man3/orddict.* +%{_mandir}/man3/ordsets.* +%{_mandir}/man3/peer.* +%{_mandir}/man3/pool.* +%{_mandir}/man3/proc_lib.* +%{_mandir}/man3/proplists.* +%{_mandir}/man3/qlc.* +%{_mandir}/man3/queue.* +%{_mandir}/man3/rand.* +%{_mandir}/man3/random.* +%{_mandir}/man3/re.* +%{_mandir}/man3/sets.* +%{_mandir}/man3/shell.* +%{_mandir}/man3/shell_default.* +%{_mandir}/man3/shell_docs.* +%{_mandir}/man3/slave.* +%{_mandir}/man3/sofs.* +%{_mandir}/man3/string.* +%{_mandir}/man3/supervisor.* +%{_mandir}/man3/supervisor_bridge.* +%{_mandir}/man3/sys.* +%{_mandir}/man3/timer.* +%{_mandir}/man3/unicode.* +%{_mandir}/man3/uri_string.* +%{_mandir}/man3/zip.* +%{_mandir}/man6/stdlib.* %endif %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.* -%{_libdir}/erlang/man/man3/erl_prettypr.* -%{_libdir}/erlang/man/man3/erl_recomment.* -%{_libdir}/erlang/man/man3/erl_syntax.* -%{_libdir}/erlang/man/man3/erl_syntax_lib.* -%{_libdir}/erlang/man/man3/erl_tidy.* -%{_libdir}/erlang/man/man3/igor.* -%{_libdir}/erlang/man/man3/prettypr.* +%{_mandir}/man3/epp_dodger.* +%{_mandir}/man3/erl_comment_scan.* +%{_mandir}/man3/erl_prettypr.* +%{_mandir}/man3/erl_recomment.* +%{_mandir}/man3/erl_syntax.* +%{_mandir}/man3/erl_syntax_lib.* +%{_mandir}/man3/merl.* +%{_mandir}/man3/merl_transform.* +%{_mandir}/man3/prettypr.* %endif -%files test_server -%{_libdir}/erlang/lib/test_server-*/ +%files tftp +%dir %{_libdir}/erlang/lib/tftp-*/ +%{_libdir}/erlang/lib/tftp-*/ebin +%{_libdir}/erlang/lib/tftp-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/test_server.* -%{_libdir}/erlang/man/man3/test_server_ctrl.* -%{_libdir}/erlang/man/man6/test_server.* -%endif - -%files toolbar -%{_libdir}/erlang/lib/toolbar-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/toolbar.* +%{_mandir}/man3/tftp.* %endif %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 +%{_libdir}/erlang/lib/tools-*/priv %if %{with doc} -%{_libdir}/erlang/man/man3/cover.* -%{_libdir}/erlang/man/man3/cprof.* -%{_libdir}/erlang/man/man3/eprof.* -%{_libdir}/erlang/man/man3/erlang_mode.* -%{_libdir}/erlang/man/man3/fprof.* -%{_libdir}/erlang/man/man3/instrument.* -%{_libdir}/erlang/man/man3/lcnt.* -%{_libdir}/erlang/man/man3/make.* -%{_libdir}/erlang/man/man3/tags.* -%{_libdir}/erlang/man/man3/xref.* -%endif - -%files tv -%{_libdir}/erlang/lib/tv-*/ -%if %{with doc} -%{_libdir}/erlang/man/man3/tv.* -%endif - -%files typer -%{_bindir}/typer -%{_libdir}/erlang/bin/typer -%{_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-*/ -%if %{with doc} -%{_libdir}/erlang/man/man1/start_webtool.* -%{_libdir}/erlang/man/man3/webtool.* +%{_mandir}/man3/cover.* +%{_mandir}/man3/cprof.* +%{_mandir}/man3/eprof.* +%{_mandir}/man3/erlang_mode.* +%{_mandir}/man3/fprof.* +%{_mandir}/man3/instrument.* +%{_mandir}/man3/lcnt.* +%{_mandir}/man3/make.* +%{_mandir}/man3/tags.* +%{_mandir}/man3/xref.* %endif +%if %{__with_emacs} +%dir %{_emacs_sitelispdir}/erlang +%doc %{_emacs_sitelispdir}/erlang/README +%{_emacs_sitelispdir}/erlang/*.el +%{_emacs_sitelispdir}/erlang/*.elc +%{_emacs_sitestartdir}/erlang-init.el +%endif # __with_emacs +%if %{__with_wxwidgets} %files wx %dir %{_libdir}/erlang/lib/wx-*/ %{_libdir}/erlang/lib/wx-*/ebin @@ -2116,298 +1737,1014 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ %{_libdir}/erlang/lib/wx-*/priv %{_libdir}/erlang/lib/wx-*/src %if %{with doc} -%{_libdir}/erlang/man/man3/gl.* -%{_libdir}/erlang/man/man3/glu.* -%{_libdir}/erlang/man/man3/wx.* -%{_libdir}/erlang/man/man3/wx_misc.* -%{_libdir}/erlang/man/man3/wx_object.* -%{_libdir}/erlang/man/man3/wxAcceleratorEntry.* -%{_libdir}/erlang/man/man3/wxAcceleratorTable.* -%{_libdir}/erlang/man/man3/wxArtProvider.* -%{_libdir}/erlang/man/man3/wxAuiDockArt.* -%{_libdir}/erlang/man/man3/wxAuiManager.* -%{_libdir}/erlang/man/man3/wxAuiManagerEvent.* -%{_libdir}/erlang/man/man3/wxAuiNotebook.* -%{_libdir}/erlang/man/man3/wxAuiNotebookEvent.* -%{_libdir}/erlang/man/man3/wxAuiPaneInfo.* -%{_libdir}/erlang/man/man3/wxAuiTabArt.* -%{_libdir}/erlang/man/man3/wxBitmap.* -%{_libdir}/erlang/man/man3/wxBitmapButton.* -%{_libdir}/erlang/man/man3/wxBitmapDataObject.* -%{_libdir}/erlang/man/man3/wxBoxSizer.* -%{_libdir}/erlang/man/man3/wxBrush.* -%{_libdir}/erlang/man/man3/wxBufferedDC.* -%{_libdir}/erlang/man/man3/wxBufferedPaintDC.* -%{_libdir}/erlang/man/man3/wxButton.* -%{_libdir}/erlang/man/man3/wxCalendarCtrl.* -%{_libdir}/erlang/man/man3/wxCalendarDateAttr.* -%{_libdir}/erlang/man/man3/wxCalendarEvent.* -%{_libdir}/erlang/man/man3/wxCaret.* -%{_libdir}/erlang/man/man3/wxCheckBox.* -%{_libdir}/erlang/man/man3/wxCheckListBox.* -%{_libdir}/erlang/man/man3/wxChildFocusEvent.* -%{_libdir}/erlang/man/man3/wxChoice.* -%{_libdir}/erlang/man/man3/wxChoicebook.* -%{_libdir}/erlang/man/man3/wxClientDC.* -%{_libdir}/erlang/man/man3/wxClipboard.* -%{_libdir}/erlang/man/man3/wxClipboardTextEvent.* -%{_libdir}/erlang/man/man3/wxCloseEvent.* -%{_libdir}/erlang/man/man3/wxColourData.* -%{_libdir}/erlang/man/man3/wxColourDialog.* -%{_libdir}/erlang/man/man3/wxColourPickerCtrl.* -%{_libdir}/erlang/man/man3/wxColourPickerEvent.* -%{_libdir}/erlang/man/man3/wxComboBox.* -%{_libdir}/erlang/man/man3/wxCommandEvent.* -%{_libdir}/erlang/man/man3/wxContextMenuEvent.* -%{_libdir}/erlang/man/man3/wxControl.* -%{_libdir}/erlang/man/man3/wxControlWithItems.* -%{_libdir}/erlang/man/man3/wxCursor.* -%{_libdir}/erlang/man/man3/wxDataObject.* -%{_libdir}/erlang/man/man3/wxDateEvent.* -%{_libdir}/erlang/man/man3/wxDatePickerCtrl.* -%{_libdir}/erlang/man/man3/wxDC.* -%{_libdir}/erlang/man/man3/wxDialog.* -%{_libdir}/erlang/man/man3/wxDirDialog.* -%{_libdir}/erlang/man/man3/wxDirPickerCtrl.* -%{_libdir}/erlang/man/man3/wxDisplayChangedEvent.* -%{_libdir}/erlang/man/man3/wxEraseEvent.* -%{_libdir}/erlang/man/man3/wxEvent.* -%{_libdir}/erlang/man/man3/wxEvtHandler.* -%{_libdir}/erlang/man/man3/wxFileDataObject.* -%{_libdir}/erlang/man/man3/wxFileDialog.* -%{_libdir}/erlang/man/man3/wxFileDirPickerEvent.* -%{_libdir}/erlang/man/man3/wxFilePickerCtrl.* -%{_libdir}/erlang/man/man3/wxFindReplaceData.* -%{_libdir}/erlang/man/man3/wxFindReplaceDialog.* -%{_libdir}/erlang/man/man3/wxFlexGridSizer.* -%{_libdir}/erlang/man/man3/wxFocusEvent.* -%{_libdir}/erlang/man/man3/wxFont.* -%{_libdir}/erlang/man/man3/wxFontData.* -%{_libdir}/erlang/man/man3/wxFontDialog.* -%{_libdir}/erlang/man/man3/wxFontPickerCtrl.* -%{_libdir}/erlang/man/man3/wxFontPickerEvent.* -%{_libdir}/erlang/man/man3/wxFrame.* -%{_libdir}/erlang/man/man3/wxGauge.* -%{_libdir}/erlang/man/man3/wxGBSizerItem.* -%{_libdir}/erlang/man/man3/wxGenericDirCtrl.* -%{_libdir}/erlang/man/man3/wxGLCanvas.* -%{_libdir}/erlang/man/man3/wxGraphicsBrush.* -%{_libdir}/erlang/man/man3/wxGraphicsContext.* -%{_libdir}/erlang/man/man3/wxGraphicsFont.* -%{_libdir}/erlang/man/man3/wxGraphicsMatrix.* -%{_libdir}/erlang/man/man3/wxGraphicsObject.* -%{_libdir}/erlang/man/man3/wxGraphicsPath.* -%{_libdir}/erlang/man/man3/wxGraphicsPen.* -%{_libdir}/erlang/man/man3/wxGraphicsRenderer.* -%{_libdir}/erlang/man/man3/wxGrid.* -%{_libdir}/erlang/man/man3/wxGridBagSizer.* -%{_libdir}/erlang/man/man3/wxGridCellAttr.* -%{_libdir}/erlang/man/man3/wxGridCellBoolEditor.* -%{_libdir}/erlang/man/man3/wxGridCellBoolRenderer.* -%{_libdir}/erlang/man/man3/wxGridCellChoiceEditor.* -%{_libdir}/erlang/man/man3/wxGridCellEditor.* -%{_libdir}/erlang/man/man3/wxGridCellFloatEditor.* -%{_libdir}/erlang/man/man3/wxGridCellFloatRenderer.* -%{_libdir}/erlang/man/man3/wxGridCellNumberEditor.* -%{_libdir}/erlang/man/man3/wxGridCellNumberRenderer.* -%{_libdir}/erlang/man/man3/wxGridCellRenderer.* -%{_libdir}/erlang/man/man3/wxGridCellStringRenderer.* -%{_libdir}/erlang/man/man3/wxGridCellTextEditor.* -%{_libdir}/erlang/man/man3/wxGridEvent.* -%{_libdir}/erlang/man/man3/wxGridSizer.* -%{_libdir}/erlang/man/man3/wxHelpEvent.* -%{_libdir}/erlang/man/man3/wxHtmlEasyPrinting.* -%{_libdir}/erlang/man/man3/wxHtmlLinkEvent.* -%{_libdir}/erlang/man/man3/wxHtmlWindow.* -%{_libdir}/erlang/man/man3/wxIcon.* -%{_libdir}/erlang/man/man3/wxIconBundle.* -%{_libdir}/erlang/man/man3/wxIconizeEvent.* -%{_libdir}/erlang/man/man3/wxIdleEvent.* -%{_libdir}/erlang/man/man3/wxImage.* -%{_libdir}/erlang/man/man3/wxImageList.* -%{_libdir}/erlang/man/man3/wxJoystickEvent.* -%{_libdir}/erlang/man/man3/wxKeyEvent.* -%{_libdir}/erlang/man/man3/wxLayoutAlgorithm.* -%{_libdir}/erlang/man/man3/wxListbook.* -%{_libdir}/erlang/man/man3/wxListBox.* -%{_libdir}/erlang/man/man3/wxListCtrl.* -%{_libdir}/erlang/man/man3/wxListEvent.* -%{_libdir}/erlang/man/man3/wxListItem.* -%{_libdir}/erlang/man/man3/wxListItemAttr.* -%{_libdir}/erlang/man/man3/wxListView.* -%{_libdir}/erlang/man/man3/wxLogNull.* -%{_libdir}/erlang/man/man3/wxMask.* -%{_libdir}/erlang/man/man3/wxMaximizeEvent.* -%{_libdir}/erlang/man/man3/wxMDIChildFrame.* -%{_libdir}/erlang/man/man3/wxMDIClientWindow.* -%{_libdir}/erlang/man/man3/wxMDIParentFrame.* -%{_libdir}/erlang/man/man3/wxMemoryDC.* -%{_libdir}/erlang/man/man3/wxMenu.* -%{_libdir}/erlang/man/man3/wxMenuBar.* -%{_libdir}/erlang/man/man3/wxMenuEvent.* -%{_libdir}/erlang/man/man3/wxMenuItem.* -%{_libdir}/erlang/man/man3/wxMessageDialog.* -%{_libdir}/erlang/man/man3/wxMiniFrame.* -%{_libdir}/erlang/man/man3/wxMirrorDC.* -%{_libdir}/erlang/man/man3/wxMouseCaptureChangedEvent.* -%{_libdir}/erlang/man/man3/wxMouseEvent.* -%{_libdir}/erlang/man/man3/wxMoveEvent.* -%{_libdir}/erlang/man/man3/wxMultiChoiceDialog.* -%{_libdir}/erlang/man/man3/wxNavigationKeyEvent.* -%{_libdir}/erlang/man/man3/wxNotebook.* -%{_libdir}/erlang/man/man3/wxNotebookEvent.* -%{_libdir}/erlang/man/man3/wxNotifyEvent.* -%{_libdir}/erlang/man/man3/wxPageSetupDialog.* -%{_libdir}/erlang/man/man3/wxPageSetupDialogData.* -%{_libdir}/erlang/man/man3/wxPaintDC.* -%{_libdir}/erlang/man/man3/wxPaintEvent.* -%{_libdir}/erlang/man/man3/wxPalette.* -%{_libdir}/erlang/man/man3/wxPaletteChangedEvent.* -%{_libdir}/erlang/man/man3/wxPanel.* -%{_libdir}/erlang/man/man3/wxPasswordEntryDialog.* -%{_libdir}/erlang/man/man3/wxPen.* -%{_libdir}/erlang/man/man3/wxPickerBase.* -%{_libdir}/erlang/man/man3/wxPostScriptDC.* -%{_libdir}/erlang/man/man3/wxPreviewCanvas.* -%{_libdir}/erlang/man/man3/wxPreviewControlBar.* -%{_libdir}/erlang/man/man3/wxPreviewFrame.* -%{_libdir}/erlang/man/man3/wxPrintData.* -%{_libdir}/erlang/man/man3/wxPrintDialog.* -%{_libdir}/erlang/man/man3/wxPrintDialogData.* -%{_libdir}/erlang/man/man3/wxPrinter.* -%{_libdir}/erlang/man/man3/wxPrintout.* -%{_libdir}/erlang/man/man3/wxPrintPreview.* -%{_libdir}/erlang/man/man3/wxProgressDialog.* -%{_libdir}/erlang/man/man3/wxQueryNewPaletteEvent.* -%{_libdir}/erlang/man/man3/wxRadioBox.* -%{_libdir}/erlang/man/man3/wxRadioButton.* -%{_libdir}/erlang/man/man3/wxRegion.* -%{_libdir}/erlang/man/man3/wxSashEvent.* -%{_libdir}/erlang/man/man3/wxSashLayoutWindow.* -%{_libdir}/erlang/man/man3/wxSashWindow.* -%{_libdir}/erlang/man/man3/wxScreenDC.* -%{_libdir}/erlang/man/man3/wxScrollBar.* -%{_libdir}/erlang/man/man3/wxScrolledWindow.* -%{_libdir}/erlang/man/man3/wxScrollEvent.* -%{_libdir}/erlang/man/man3/wxScrollWinEvent.* -%{_libdir}/erlang/man/man3/wxSetCursorEvent.* -%{_libdir}/erlang/man/man3/wxShowEvent.* -%{_libdir}/erlang/man/man3/wxSingleChoiceDialog.* -%{_libdir}/erlang/man/man3/wxSizeEvent.* -%{_libdir}/erlang/man/man3/wxSizer.* -%{_libdir}/erlang/man/man3/wxSizerFlags.* -%{_libdir}/erlang/man/man3/wxSizerItem.* -%{_libdir}/erlang/man/man3/wxSlider.* -%{_libdir}/erlang/man/man3/wxSpinButton.* -%{_libdir}/erlang/man/man3/wxSpinCtrl.* -%{_libdir}/erlang/man/man3/wxSpinEvent.* -%{_libdir}/erlang/man/man3/wxSplashScreen.* -%{_libdir}/erlang/man/man3/wxSplitterEvent.* -%{_libdir}/erlang/man/man3/wxSplitterWindow.* -%{_libdir}/erlang/man/man3/wxStaticBitmap.* -%{_libdir}/erlang/man/man3/wxStaticBox.* -%{_libdir}/erlang/man/man3/wxStaticBoxSizer.* -%{_libdir}/erlang/man/man3/wxStaticLine.* -%{_libdir}/erlang/man/man3/wxStaticText.* -%{_libdir}/erlang/man/man3/wxStatusBar.* -%{_libdir}/erlang/man/man3/wxStdDialogButtonSizer.* -%{_libdir}/erlang/man/man3/wxStyledTextCtrl.* -%{_libdir}/erlang/man/man3/wxStyledTextEvent.* -%{_libdir}/erlang/man/man3/wxSysColourChangedEvent.* -%{_libdir}/erlang/man/man3/wxSystemOptions.* -%{_libdir}/erlang/man/man3/wxSystemSettings.* -%{_libdir}/erlang/man/man3/wxTaskBarIcon.* -%{_libdir}/erlang/man/man3/wxTaskBarIconEvent.* -%{_libdir}/erlang/man/man3/wxTextAttr.* -%{_libdir}/erlang/man/man3/wxTextCtrl.* -%{_libdir}/erlang/man/man3/wxTextDataObject.* -%{_libdir}/erlang/man/man3/wxTextEntryDialog.* -%{_libdir}/erlang/man/man3/wxToggleButton.* -%{_libdir}/erlang/man/man3/wxToolBar.* -%{_libdir}/erlang/man/man3/wxToolbook.* -%{_libdir}/erlang/man/man3/wxToolTip.* -%{_libdir}/erlang/man/man3/wxTopLevelWindow.* -%{_libdir}/erlang/man/man3/wxTreebook.* -%{_libdir}/erlang/man/man3/wxTreeCtrl.* -%{_libdir}/erlang/man/man3/wxTreeEvent.* -%{_libdir}/erlang/man/man3/wxUpdateUIEvent.* -%{_libdir}/erlang/man/man3/wxWindow.* -%{_libdir}/erlang/man/man3/wxWindowCreateEvent.* -%{_libdir}/erlang/man/man3/wxWindowDC.* -%{_libdir}/erlang/man/man3/wxWindowDestroyEvent.* -%{_libdir}/erlang/man/man3/wxXmlResource.* +%{_mandir}/man3/gl.* +%{_mandir}/man3/glu.* +%{_mandir}/man3/wx.* +%{_mandir}/man3/wxAcceleratorEntry.* +%{_mandir}/man3/wxAcceleratorTable.* +%{_mandir}/man3/wxActivateEvent.* +%{_mandir}/man3/wxArtProvider.* +%{_mandir}/man3/wxAuiDockArt.* +%{_mandir}/man3/wxAuiManager.* +%{_mandir}/man3/wxAuiManagerEvent.* +%{_mandir}/man3/wxAuiNotebook.* +%{_mandir}/man3/wxAuiNotebookEvent.* +%{_mandir}/man3/wxAuiPaneInfo.* +%{_mandir}/man3/wxAuiSimpleTabArt.* +%{_mandir}/man3/wxAuiTabArt.* +%{_mandir}/man3/wxBitmap.* +%{_mandir}/man3/wxBitmapButton.* +%{_mandir}/man3/wxBitmapDataObject.* +%{_mandir}/man3/wxBookCtrlBase.* +%{_mandir}/man3/wxBookCtrlEvent.* +%{_mandir}/man3/wxBoxSizer.* +%{_mandir}/man3/wxBrush.* +%{_mandir}/man3/wxBufferedDC.* +%{_mandir}/man3/wxBufferedPaintDC.* +%{_mandir}/man3/wxButton.* +%{_mandir}/man3/wxCalendarCtrl.* +%{_mandir}/man3/wxCalendarDateAttr.* +%{_mandir}/man3/wxCalendarEvent.* +%{_mandir}/man3/wxCaret.* +%{_mandir}/man3/wxCheckBox.* +%{_mandir}/man3/wxCheckListBox.* +%{_mandir}/man3/wxChildFocusEvent.* +%{_mandir}/man3/wxChoice.* +%{_mandir}/man3/wxChoicebook.* +%{_mandir}/man3/wxClientDC.* +%{_mandir}/man3/wxClipboard.* +%{_mandir}/man3/wxClipboardTextEvent.* +%{_mandir}/man3/wxCloseEvent.* +%{_mandir}/man3/wxColourData.* +%{_mandir}/man3/wxColourDialog.* +%{_mandir}/man3/wxColourPickerCtrl.* +%{_mandir}/man3/wxColourPickerEvent.* +%{_mandir}/man3/wxComboBox.* +%{_mandir}/man3/wxCommandEvent.* +%{_mandir}/man3/wxContextMenuEvent.* +%{_mandir}/man3/wxControl.* +%{_mandir}/man3/wxControlWithItems.* +%{_mandir}/man3/wxCursor.* +%{_mandir}/man3/wxDC.* +%{_mandir}/man3/wxDCOverlay.* +%{_mandir}/man3/wxDataObject.* +%{_mandir}/man3/wxDateEvent.* +%{_mandir}/man3/wxDatePickerCtrl.* +%{_mandir}/man3/wxDialog.* +%{_mandir}/man3/wxDirDialog.* +%{_mandir}/man3/wxDirPickerCtrl.* +%{_mandir}/man3/wxDisplay.* +%{_mandir}/man3/wxDisplayChangedEvent.* +%{_mandir}/man3/wxDropFilesEvent.* +%{_mandir}/man3/wxEraseEvent.* +%{_mandir}/man3/wxEvent.* +%{_mandir}/man3/wxEvtHandler.* +%{_mandir}/man3/wxFileDataObject.* +%{_mandir}/man3/wxFileDialog.* +%{_mandir}/man3/wxFileDirPickerEvent.* +%{_mandir}/man3/wxFilePickerCtrl.* +%{_mandir}/man3/wxFindReplaceData.* +%{_mandir}/man3/wxFindReplaceDialog.* +%{_mandir}/man3/wxFlexGridSizer.* +%{_mandir}/man3/wxFocusEvent.* +%{_mandir}/man3/wxFont.* +%{_mandir}/man3/wxFontData.* +%{_mandir}/man3/wxFontDialog.* +%{_mandir}/man3/wxFontPickerCtrl.* +%{_mandir}/man3/wxFontPickerEvent.* +%{_mandir}/man3/wxFrame.* +%{_mandir}/man3/wxGBSizerItem.* +%{_mandir}/man3/wxGCDC.* +%{_mandir}/man3/wxGLCanvas.* +%{_mandir}/man3/wxGLContext.* +%{_mandir}/man3/wxGauge.* +%{_mandir}/man3/wxGenericDirCtrl.* +%{_mandir}/man3/wxGraphicsBrush.* +%{_mandir}/man3/wxGraphicsContext.* +%{_mandir}/man3/wxGraphicsFont.* +%{_mandir}/man3/wxGraphicsGradientStops.* +%{_mandir}/man3/wxGraphicsMatrix.* +%{_mandir}/man3/wxGraphicsObject.* +%{_mandir}/man3/wxGraphicsPath.* +%{_mandir}/man3/wxGraphicsPen.* +%{_mandir}/man3/wxGraphicsRenderer.* +%{_mandir}/man3/wxGrid.* +%{_mandir}/man3/wxGridBagSizer.* +%{_mandir}/man3/wxGridCellAttr.* +%{_mandir}/man3/wxGridCellBoolEditor.* +%{_mandir}/man3/wxGridCellBoolRenderer.* +%{_mandir}/man3/wxGridCellChoiceEditor.* +%{_mandir}/man3/wxGridCellEditor.* +%{_mandir}/man3/wxGridCellFloatEditor.* +%{_mandir}/man3/wxGridCellFloatRenderer.* +%{_mandir}/man3/wxGridCellNumberEditor.* +%{_mandir}/man3/wxGridCellNumberRenderer.* +%{_mandir}/man3/wxGridCellRenderer.* +%{_mandir}/man3/wxGridCellStringRenderer.* +%{_mandir}/man3/wxGridCellTextEditor.* +%{_mandir}/man3/wxGridEvent.* +%{_mandir}/man3/wxGridSizer.* +%{_mandir}/man3/wxHelpEvent.* +%{_mandir}/man3/wxHtmlEasyPrinting.* +%{_mandir}/man3/wxHtmlLinkEvent.* +%{_mandir}/man3/wxHtmlWindow.* +%{_mandir}/man3/wxIcon.* +%{_mandir}/man3/wxIconBundle.* +%{_mandir}/man3/wxIconizeEvent.* +%{_mandir}/man3/wxIdleEvent.* +%{_mandir}/man3/wxImage.* +%{_mandir}/man3/wxImageList.* +%{_mandir}/man3/wxInitDialogEvent.* +%{_mandir}/man3/wxJoystickEvent.* +%{_mandir}/man3/wxKeyEvent.* +%{_mandir}/man3/wxLayoutAlgorithm.* +%{_mandir}/man3/wxListBox.* +%{_mandir}/man3/wxListCtrl.* +%{_mandir}/man3/wxListEvent.* +%{_mandir}/man3/wxListItem.* +%{_mandir}/man3/wxListItemAttr.* +%{_mandir}/man3/wxListView.* +%{_mandir}/man3/wxListbook.* +%{_mandir}/man3/wxLocale.* +%{_mandir}/man3/wxLogNull.* +%{_mandir}/man3/wxMDIChildFrame.* +%{_mandir}/man3/wxMDIClientWindow.* +%{_mandir}/man3/wxMDIParentFrame.* +%{_mandir}/man3/wxMask.* +%{_mandir}/man3/wxMaximizeEvent.* +%{_mandir}/man3/wxMemoryDC.* +%{_mandir}/man3/wxMenu.* +%{_mandir}/man3/wxMenuBar.* +%{_mandir}/man3/wxMenuEvent.* +%{_mandir}/man3/wxMenuItem.* +%{_mandir}/man3/wxMessageDialog.* +%{_mandir}/man3/wxMiniFrame.* +%{_mandir}/man3/wxMirrorDC.* +%{_mandir}/man3/wxMouseCaptureChangedEvent.* +%{_mandir}/man3/wxMouseCaptureLostEvent.* +%{_mandir}/man3/wxMouseEvent.* +%{_mandir}/man3/wxMoveEvent.* +%{_mandir}/man3/wxMultiChoiceDialog.* +%{_mandir}/man3/wxNavigationKeyEvent.* +%{_mandir}/man3/wxNotebook.* +%{_mandir}/man3/wxNotificationMessage.* +%{_mandir}/man3/wxNotifyEvent.* +%{_mandir}/man3/wxOverlay.* +%{_mandir}/man3/wxPageSetupDialog.* +%{_mandir}/man3/wxPageSetupDialogData.* +%{_mandir}/man3/wxPaintDC.* +%{_mandir}/man3/wxPaintEvent.* +%{_mandir}/man3/wxPalette.* +%{_mandir}/man3/wxPaletteChangedEvent.* +%{_mandir}/man3/wxPanel.* +%{_mandir}/man3/wxPasswordEntryDialog.* +%{_mandir}/man3/wxPen.* +%{_mandir}/man3/wxPickerBase.* +%{_mandir}/man3/wxPopupTransientWindow.* +%{_mandir}/man3/wxPopupWindow.* +%{_mandir}/man3/wxPostScriptDC.* +%{_mandir}/man3/wxPreviewCanvas.* +%{_mandir}/man3/wxPreviewControlBar.* +%{_mandir}/man3/wxPreviewFrame.* +%{_mandir}/man3/wxPrintData.* +%{_mandir}/man3/wxPrintDialog.* +%{_mandir}/man3/wxPrintDialogData.* +%{_mandir}/man3/wxPrintPreview.* +%{_mandir}/man3/wxPrinter.* +%{_mandir}/man3/wxPrintout.* +%{_mandir}/man3/wxProgressDialog.* +%{_mandir}/man3/wxQueryNewPaletteEvent.* +%{_mandir}/man3/wxRadioBox.* +%{_mandir}/man3/wxRadioButton.* +%{_mandir}/man3/wxRegion.* +%{_mandir}/man3/wxSashEvent.* +%{_mandir}/man3/wxSashLayoutWindow.* +%{_mandir}/man3/wxSashWindow.* +%{_mandir}/man3/wxScreenDC.* +%{_mandir}/man3/wxScrollBar.* +%{_mandir}/man3/wxScrollEvent.* +%{_mandir}/man3/wxScrollWinEvent.* +%{_mandir}/man3/wxScrolledWindow.* +%{_mandir}/man3/wxSetCursorEvent.* +%{_mandir}/man3/wxShowEvent.* +%{_mandir}/man3/wxSingleChoiceDialog.* +%{_mandir}/man3/wxSizeEvent.* +%{_mandir}/man3/wxSizer.* +%{_mandir}/man3/wxSizerFlags.* +%{_mandir}/man3/wxSizerItem.* +%{_mandir}/man3/wxSlider.* +%{_mandir}/man3/wxSpinButton.* +%{_mandir}/man3/wxSpinCtrl.* +%{_mandir}/man3/wxSpinEvent.* +%{_mandir}/man3/wxSplashScreen.* +%{_mandir}/man3/wxSplitterEvent.* +%{_mandir}/man3/wxSplitterWindow.* +%{_mandir}/man3/wxStaticBitmap.* +%{_mandir}/man3/wxStaticBox.* +%{_mandir}/man3/wxStaticBoxSizer.* +%{_mandir}/man3/wxStaticLine.* +%{_mandir}/man3/wxStaticText.* +%{_mandir}/man3/wxStatusBar.* +%{_mandir}/man3/wxStdDialogButtonSizer.* +%{_mandir}/man3/wxStyledTextCtrl.* +%{_mandir}/man3/wxStyledTextEvent.* +%{_mandir}/man3/wxSysColourChangedEvent.* +%{_mandir}/man3/wxSystemOptions.* +%{_mandir}/man3/wxSystemSettings.* +%{_mandir}/man3/wxTaskBarIcon.* +%{_mandir}/man3/wxTaskBarIconEvent.* +%{_mandir}/man3/wxTextAttr.* +%{_mandir}/man3/wxTextCtrl.* +%{_mandir}/man3/wxTextDataObject.* +%{_mandir}/man3/wxTextEntryDialog.* +%{_mandir}/man3/wxToggleButton.* +%{_mandir}/man3/wxToolBar.* +%{_mandir}/man3/wxToolTip.* +%{_mandir}/man3/wxToolbook.* +%{_mandir}/man3/wxTopLevelWindow.* +%{_mandir}/man3/wxTreeCtrl.* +%{_mandir}/man3/wxTreeEvent.* +%{_mandir}/man3/wxTreebook.* +%{_mandir}/man3/wxUpdateUIEvent.* +%{_mandir}/man3/wxWebView.* +%{_mandir}/man3/wxWebViewEvent.* +%{_mandir}/man3/wxWindow.* +%{_mandir}/man3/wxWindowCreateEvent.* +%{_mandir}/man3/wxWindowDC.* +%{_mandir}/man3/wxWindowDestroyEvent.* +%{_mandir}/man3/wxXmlResource.* +%{_mandir}/man3/wx_misc.* +%{_mandir}/man3/wx_object.* %endif +%endif # __with_wxwidgets %files xmerl %{_libdir}/erlang/lib/xmerl-*/ %if %{with doc} -%{_libdir}/erlang/man/man3/xmerl.* -%{_libdir}/erlang/man/man3/xmerl_eventp.* -%{_libdir}/erlang/man/man3/xmerl_sax_parser.* -%{_libdir}/erlang/man/man3/xmerl_scan.* -%{_libdir}/erlang/man/man3/xmerl_xpath.* -%{_libdir}/erlang/man/man3/xmerl_xs.* -%{_libdir}/erlang/man/man3/xmerl_xsd.* +%{_mandir}/man3/xmerl.* +%{_mandir}/man3/xmerl_eventp.* +%{_mandir}/man3/xmerl_sax_parser.* +%{_mandir}/man3/xmerl_scan.* +%{_mandir}/man3/xmerl_xpath.* +%{_mandir}/man3/xmerl_xs.* +%{_mandir}/man3/xmerl_xsd.* %endif -%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 - %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. -- Fix for doc generation with OpenJDK 1.8.0 +* Wed Sep 10 2025 Peter Lemenkov - 26.2.5.15-1 +- Ver. 26.2.5.15 -* Thu Apr 7 2016 John Eckersberg - R16B-03.17 -- Revert "Enable error_logger depth fine tuning" (rhbz#1324922) +* Wed Jul 23 2025 Fedora Release Engineering - 26.2.5.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild -* Sun Feb 28 2016 Peter Lemenkov - R16B-03.16 +* Thu Jul 17 2025 Peter Lemenkov - 26.2.5.14-1 +- Ver. 26.2.5.14 + +* Fri Jun 20 2025 Peter Lemenkov - 26.2.5.13-3 +- Add GDB tools + +* Wed Jun 18 2025 Benjamin A. Beasley - 26.2.5.13-2 +- Rename typer (in /usr/bin) to erlang-typer; fixes RHBZ#2359567 + +* Mon Jun 16 2025 Peter Lemenkov - 26.2.5.13-1 +- Ver. 26.2.5.13 + +* Thu May 8 2025 Peter Lemenkov - 26.2.5.12-1 +- Ver. 26.2.5.12 + +* Wed Apr 16 2025 Peter Lemenkov - 26.2.5.11-1 +- Ver. 26.2.5.11 + +* Fri Mar 28 2025 Peter Lemenkov - 26.2.5.10-1 +- Ver. 26.2.5.10 + +* Mon Mar 10 2025 Zbigniew Jedrzejewski-Szmek - 26.2.5.9-2 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Thu Feb 13 2025 Peter Lemenkov - 26.2.5.8-1 +- Ver. 26.2.5.8 + +* Tue Feb 11 2025 Peter Lemenkov - 26.2.5.7-1 +- Ver. 26.2.5.7 + +* Thu Jan 16 2025 Fedora Release Engineering - 26.2.5.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sat Dec 7 2024 Peter Lemenkov - 26.2.5.6-1 +- Ver. 26.2.5.6 + +* Fri Nov 1 2024 Peter Lemenkov - 26.2.5.5-1 +- Ver. 26.2.5.5 + +* Wed Oct 9 2024 Peter Lemenkov - 26.2.5.4-1 +- Ver. 26.2.5.4 + +* Thu Sep 5 2024 Peter Lemenkov - 26.2.5.3-1 +- Ver. 26.2.5.3 + +* Wed Jul 17 2024 Fedora Release Engineering - 26.2.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jul 10 2024 Peter Lemenkov - 26.2.5.2-1 +- Ver. 26.2.5.2 + +* Wed Jun 26 2024 Peter Lemenkov - 26.2.5.1-1 +- Ver. 26.2.5.1 + +* Sat May 4 2024 Peter Lemenkov - 26.2.5-1 +- Ver. 26.2.5 + +* Sat Apr 13 2024 Peter Lemenkov - 26.2.4-1 +- Ver. 26.2.4 + +* Mon Feb 12 2024 Peter Lemenkov - 26.2.2-1 +- Ver. 26.2.2 + +* Wed Jan 24 2024 Fedora Release Engineering - 26.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 26.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 18 2023 Peter Lemenkov - 26.2.1-1 +- Ver. 26.2.1 + +* Wed Dec 13 2023 Peter Lemenkov - 26.2-1 +- Ver. 26.2 + +* Fri Oct 13 2023 Peter Lemenkov - 26.1.2-1 +- Ver. 26.1.2 + +* Fri Sep 29 2023 Peter Lemenkov - 26.1.1-1 +- Ver. 26.1.1 + +* Wed Sep 20 2023 Peter Lemenkov - 26.1-1 +- Ver. 26.1 + +* Tue Aug 8 2023 Peter Lemenkov - 26.0.2-3 +- Reenable OpenSSL 3 + +* Wed Jul 19 2023 Fedora Release Engineering - 26.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jul 1 2023 Peter Lemenkov - 26.0.2-1 +- Ver. 26.0.2 + +* Fri Jun 9 2023 Peter Lemenkov - 26.0.1-1 +- Ver. 26.0.1 + +* Sat May 20 2023 Peter Lemenkov - 26.0-1 +- Ver. 26.0 + +* Sat May 6 2023 Peter Lemenkov - 25.3.2-1 +- Ver. 25.3.2 + +* Thu Apr 27 2023 Peter Lemenkov - 25.3.1-1 +- Ver. 25.3.1 + +* Wed Mar 8 2023 Peter Lemenkov - 25.3-1 +- Ver. 25.3 + +* Fri Feb 17 2023 Peter Lemenkov - 25.2.3-1 +- Ver. 25.2.3 + +* Mon Jan 30 2023 Peter Lemenkov - 25.2.2-1 +- Ver. 25.2.2 + +* Thu Jan 19 2023 Fedora Release Engineering - 25.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jan 18 2023 Peter Lemenkov - 25.2.1-1 +- Ver. 25.2.1 + +* Fri Jan 6 2023 Peter Lemenkov - 25.2-3 +- Fix deps + +* Wed Jan 4 2023 Peter Lemenkov - 25.2-2 +- LSP applications require source code to be available (rhbz #2157170). Let's + restore it in a separate package + +* Wed Dec 14 2022 Peter Lemenkov - 25.2-1 +- Ver. 25.2 + +* Sun Nov 27 2022 Mamoru TASAKA - 25.1.2-3 +- Rebuild due to wxGLCanvas ABI change + +* Thu Nov 24 2022 Florian Weimer - 25.1.2-2 +- Fix C99 compatibility issues in configure checks + +* Tue Oct 25 2022 Peter Lemenkov - 25.1.2-1 +- Ver. 25.1.2 + +* Mon Oct 3 2022 Peter Lemenkov - 25.1.1-1 +- Ver. 25.1.1 + +* Wed Sep 21 2022 Peter Lemenkov - 25.1-1 +- Ver. 25.1 + +* Thu Aug 18 2022 Peter Lemenkov - 25.0.4-1 +- Ver. 25.0.4 + +* Thu Jul 28 2022 Peter Lemenkov - 25.0.3-3 +- Rebuild with new wxWidgets + +* Thu Jul 21 2022 Fedora Release Engineering - 25.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jul 16 2022 Peter Lemenkov - 25.0.3-1 +- Ver. 25.0.3 + +* Tue Jul 12 2022 Peter Lemenkov - 25.0.2-1 +- Ver. 25.0.2 + +* Thu Jun 23 2022 Peter Lemenkov - 24.3.4.2-1 +- Ver. 24.3.4.2 + +* Wed Jun 8 2022 Peter Lemenkov - 24.3.4.1-1 +- Ver. 24.3.4.1 + +* Tue May 24 2022 Peter Lemenkov - 24.3.4-2 +- Downgrade to OpenSSL 1.x + +* Wed May 4 2022 Peter Lemenkov - 24.3.4-1 +- Ver. 24.3.4 + +* Fri Apr 8 2022 Peter Lemenkov - 24.3.3-2 +- Temporarily disable FIPS (doesn't work reliably with OpenSSL 3.0 yet) + +* Tue Mar 29 2022 Peter Lemenkov - 24.3.3-1 +- Ver. 24.3.3 +- Doc sub-package no longermarked as noarch (contains links to _libdir) + +* Mon Mar 28 2022 John Eckersberg - 24.2.2-2 +- Keep documentation chunks in the code path (rhbz#2068758) + +* Tue Mar 1 2022 Peter Lemenkov - 24.2.2-1 +- Ver. 24.2.2 + +* Sat Feb 05 2022 Jiri Vanek - 24.2.1-2 +- Rebuilt for java-17-openjdk as system jdk + +* Wed Jan 26 2022 Peter Lemenkov - 24.2.1-1 +- Ver. 24.2.1 + +* Thu Jan 20 2022 Fedora Release Engineering - 24.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Dec 15 2021 Peter Lemenkov - 24.2-1 +- Ver. 24.2 + +* Mon Nov 22 2021 Peter Lemenkov - 24.1.7-1 +- Ver. 24.1.7 + +* Thu Nov 18 2021 Peter Lemenkov - 24.1.6-1 +- Ver. 24.1.6 + +* Sat Nov 13 2021 Peter Lemenkov - 24.1.5-1 +- Ver. 24.1.5 + +* Tue Nov 2 2021 Peter Lemenkov - 24.1.4-1 +- Ver. 24.1.4 + +* Thu Oct 28 2021 Peter Lemenkov - 24.1.3-1 +- Ver. 24.1.3 + +* Tue Oct 12 2021 Peter Lemenkov - 24.1.2-2 +- Fix FTBFS with OpenSSL 3.0 + +* Tue Oct 5 2021 Peter Lemenkov - 24.1.2-1 +- Ver. 24.1.2 + +* Mon Oct 4 2021 Peter Lemenkov - 24.1.1-1 +- Ver. 24.1.1 + +* Thu Sep 23 2021 Peter Lemenkov - 24.1-1 +- Ver. 24.1 + +* Tue Sep 14 2021 Sahana Prasad - 24.0.6-2 +- Rebuilt with OpenSSL 3.0.0 + +* Fri Sep 3 2021 Peter Lemenkov - 24.0.6-1 +- Ver. 24.0.6 + +* Tue Aug 3 2021 Peter Lemenkov - 24.0.5-1 +- Ver. 24.0.5 + +* Thu Jul 22 2021 Peter Lemenkov - 24.0.4-1 +- Ver. 24.0.4 + +* Wed Jul 21 2021 Fedora Release Engineering - 24.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 29 2021 Peter Lemenkov - 24.0.3-1 +- Ver. 24.0.3 + +* Tue Jun 01 2021 Peter Lemenkov - 24.0.2-1 +- Ver. 24.0.2 + +* Fri May 21 2021 John Eckersberg - 24.0.1-1 +- Ver. 24.0.1 + +* Wed May 12 2021 Peter Lemenkov - 24.0-1 +- Ver. 24.0 + +* Wed Apr 21 2021 Peter Lemenkov - 24.0-0.2.rc3 +- Ver. 24.0-rc3 + +* Sat Apr 3 2021 Peter Lemenkov - 24.0-0.1.rc2 +- Ver. 24.0-rc2 +- Removed hipe + +* Tue Mar 30 2021 Peter Lemenkov - 23.3.1-1 +- Ver. 23.3.1 + +* Wed Mar 24 2021 Peter Lemenkov - 23.3-1 +- Ver. 23.3 + +* Fri Mar 5 2021 Peter Lemenkov - 23.2.7-1 +- Ver. 23.2.7 + +* Thu Feb 25 2021 Peter Lemenkov - 23.2.6-1 +- Ver. 23.2.6 + +* Tue Feb 16 2021 Peter Lemenkov - 23.2.5-1 +- Ver. 23.2.5 + +* Thu Feb 4 2021 John Eckersberg - 23.2.4-1 +- Ver. 23.2.4 + +* Tue Jan 26 2021 Fedora Release Engineering - 23.2.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 20 2021 Peter Lemenkov - 23.2.3-1 +- Ver. 23.2.3 + +* Fri Jan 15 2021 Peter Lemenkov - 23.2.2-1 +- Ver. 23.2.2 +- Disable XEmacs support (dead upstream, scheduled for removal from Fedora) + +* Tue Dec 22 2020 Peter Lemenkov - 23.2.1-1 +- Ver. 23.2.1 + +* Thu Dec 17 2020 Peter Lemenkov - 23.2-1 +- Ver. 23.2 + +* Fri Dec 11 2020 Peter Lemenkov - 23.1.5-1 +- Ver. 23.1.5 + +* Fri Nov 20 2020 Peter Lemenkov - 23.1.4-1 +- Ver. 23.1.4 + +* Tue Nov 17 2020 Peter Lemenkov - 23.1.3-1 +- Ver. 23.1.3 + +* Sat Oct 3 2020 Peter Lemenkov - 23.1.1-1 +- Ver. 23.1.1 + +* Tue Sep 15 2020 Peter Lemenkov - 23.0.4-1 +- Ver. 23.0.4 + +* Mon Jul 27 2020 Fedora Release Engineering - 23.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 20 2020 Peter Lemenkov - 23.0.3-1 +- Ver. 23.0.3 + +* Fri Jul 10 2020 Jiri Vanek - 23.0.2-2 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Thu May 28 2020 Peter Lemenkov - 23.0.2-1 +- Ver. 23.0.2 + +* Wed May 20 2020 Peter Lemenkov - 23.0.1-1 +- Ver. 23.0.1 + +* Wed May 13 2020 Peter Lemenkov - 23.0-1 +- Ver. 23.0 + +* Thu Apr 23 2020 Peter Lemenkov - 23.0-0.2.rc3 +- Ver. 23.0-rc3 + +* Sun Apr 19 2020 Peter Lemenkov - 23.0-0.1.rc2 +- Ver. 23.0-rc2 + +* Thu Apr 9 2020 Peter Lemenkov - 22.3.2-1 +- Ver. 22.3.2 + +* Fri Feb 28 2020 Peter Lemenkov - 22.2.8-1 +- Ver. 22.2.8 + +* Fri Feb 21 2020 Peter Lemenkov - 22.2.7-2 +- Fix building with GCC 10 (-fno-common) + +* Fri Feb 21 2020 Peter Lemenkov - 22.2.7-1 +- Ver. 22.2.7 + +* Thu Feb 6 2020 Peter Lemenkov - 22.2.6-1 +- Ver. 22.2.6 + +* Tue Jan 28 2020 Fedora Release Engineering - 22.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 13 2020 Peter Lemenkov - 22.2.2-1 +- Ver. 22.2.2 + +* Sat Dec 28 2019 Peter Lemenkov - 22.2.1-1 +- Ver. 22.2.1 + +* Thu Nov 21 2019 John Eckersberg - 22.1.8-1 +- Ver. 22.1.8 +- Re-enable s390x, but disable kernel polling, see rhbz#1770256 + +* Mon Nov 11 2019 John Eckersberg - 22.1.7-1 +- Ver. 22.1.7 +- Add ExcludeArch for s390x, see rhbz#1770256 + +* Tue Nov 5 2019 John Eckersberg - 22.1.5-1 +- Ver. 22.1.5 + +* Mon Sep 16 2019 Peter Lemenkov - 22.0.7-3 +- Enable arches disabled in a previous build + +* Wed Sep 11 2019 Peter Lemenkov - 22.0.7-2 +- Disable arches with a broken builders +- Expose a correct NIF API version + +* Tue Jul 30 2019 Peter Lemenkov - 22.0.7-1 +- Ver. 22.0.7 +- Removed otp_mibs application + +* Wed Jul 24 2019 Fedora Release Engineering - 21.3.8.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 15 2019 Peter Lemenkov - 21.3.8.6-1 +- Ver. 21.3.8.6 + +* Mon Jul 8 2019 Peter Lemenkov - 21.3.8.5-1 +- Ver. 21.3.8.5 + +* Wed Jun 19 2019 Peter Lemenkov - 21.3.8.4-1 +- Ver. 21.3.8.4 + +* Tue Jun 04 2019 Peter Lemenkov - 21.3.8.3-1 +- Ver. 21.3.8.3 + +* Mon May 20 2019 Peter Lemenkov - 21.3.8.2-1 +- Ver. 21.3.8.2 + +* Fri May 17 2019 Peter Lemenkov - 21.3.8.1-1 +- Ver. 21.3.8.1 + +* Wed May 01 2019 Peter Lemenkov - 21.3.7-1 +- Ver. 21.3.7 + +* Thu Apr 18 2019 Peter Lemenkov - 21.3.6-1 +- Ver. 21.3.6 + +* Mon Apr 15 2019 Peter Lemenkov - 21.3.5-1 +- Ver. 21.3.5 + +* Sat Apr 13 2019 Peter Lemenkov - 21.3.4-1 +- Ver. 21.3.4 + +* Tue Apr 02 2019 Peter Lemenkov - 21.3.3-1 +- Ver. 21.3.3 + +* Fri Mar 22 2019 Peter Lemenkov - 21.3.2-1 +- Ver. 21.3.2 + +* Tue Mar 19 2019 Peter Lemenkov - 21.3.1-1 +- Ver. 21.3.1 + +* Tue Mar 12 2019 Peter Lemenkov - 21.3-1 +- Ver. 21.3 + +* Thu Mar 07 2019 Peter Lemenkov - 21.2.7-1 +- Ver. 21.2.7 + +* Tue Feb 19 2019 Kalev Lember - 21.2.6-2 +- Rebuilt against fixed atk (#1626575) + +* Tue Feb 19 2019 Peter Lemenkov - 21.2.6-1 +- Ver. 21.2.6 + +* Tue Feb 05 2019 Peter Lemenkov - 21.2.5-1 +- Ver. 21.2.5 +- Revert: Fix EC detection + +* Mon Feb 04 2019 Peter Lemenkov - 21.2.4-2 +- Fix EC detection + +* Thu Jan 31 2019 Peter Lemenkov - 21.2.4-1 +- Ver. 21.2.4 +- Removed cosEvent, cosEventDomain, cosFileTransfer, cosNotification, + cosProperty, cosTime, cosTransactions, ic, orber applications +- Added ftp, tftp applications +- Disabled XEmacs support (fails to build) + +* Thu Jan 31 2019 Fedora Release Engineering - 20.3.8.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 22 2019 Peter Lemenkov - 20.3.8.18-1 +- Ver. 20.3.8.18 + +* Tue Jan 15 2019 Peter Lemenkov - 20.3.8.17-2 +- Fix issue with nodes info querying +- Enable verbose build logs + +* Thu Jan 10 2019 Peter Lemenkov - 20.3.8.17-1 +- Ver. 20.3.8.17 + +* Tue Jan 08 2019 Peter Lemenkov - 20.3.8.16-1 +- Ver. 20.3.8.16 + +* Mon Dec 10 2018 Peter Lemenkov - 20.3.8.15-1 +- Ver. 20.3.8.15 + +* Fri Nov 16 2018 Peter Lemenkov - 20.3.8.14-1 +- Ver. 20.3.8.14 +- Fix epmd systemd files + +* Thu Sep 20 2018 Peter Lemenkov - 20.3.8.9-2 +- Install man-pages into system-wide directories (as Debian already did). + +* Tue Sep 18 2018 Peter Lemenkov - 20.3.8.9-1 +- Ver. 20.3.8.9 + +* Wed Aug 29 2018 Peter Lemenkov - 20.3.8.8-1 +- Ver. 20.3.8.8 + +* Wed Aug 15 2018 Peter Lemenkov - 20.3.8.6-1 +- Ver. 20.3.8.6 + +* Fri Aug 10 2018 Peter Lemenkov - 20.3.8.5-1 +- Ver. 20.3.8.5 + +* Fri Aug 03 2018 Peter Lemenkov - 20.3.8.4-1 +- Ver. 20.3.8.4 + +* Tue Jul 31 2018 Florian Weimer - 20.3.8.3-2 +- Rebuild with fixed binutils + +* Mon Jul 30 2018 Peter Lemenkov - 20.3.8.3-1 +- Ver. 20.3.8.3 + +* Thu Jul 12 2018 Fedora Release Engineering - 20.3.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jul 10 2018 Peter Lemenkov - 20.3.8.2-2 +- Fix FTBFS on F-29 and higher + +* Tue Jul 10 2018 Peter Lemenkov - 20.3.8.2-1 +- Ver. 20.3.8.2 + +* Wed Jun 27 2018 Peter Lemenkov - 20.3.8.1-1 +- Ver. 20.3.8.1 + +* Thu Jun 14 2018 Peter Lemenkov - 20.3.8-1 +- Ver. 20.3.8 + +* Fri May 18 2018 Troy Dawson - 20.3.6-2 +- Make xemacs an optional component + +* Tue May 15 2018 Peter Lemenkov - 20.3.6-1 +- Ver. 20.3.6 + +* Fri Apr 06 2018 Peter Lemenkov - 20.3.2-2 +- Allow building against OpenSSL 1.1.0+ + +* Fri Mar 23 2018 Peter Lemenkov - 20.3.2-1 +- Ver. 20.3.2 + +* Tue Mar 20 2018 Richard W.M. Jones - 20.3-2 +- Disable fop on riscv64. + +* Wed Mar 14 2018 Peter Lemenkov - 20.3 +- Ver. 20.3 + +* Thu Feb 22 2018 Peter Lemenkov - 20.2.4-1 +- Ver. 20.2.4 + +* Tue Feb 20 2018 Peter Lemenkov - 20.2.3-1 +- Ver. 20.2.3 +- Removed gs (also removed tcl/tk dependency), percept +- Application typer was merged into dialyzer +- NIF version bumped up to 2.13 + +* Wed Feb 07 2018 Fedora Release Engineering - 19.3.6.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Dec 19 2017 Peter Lemenkov - 19.3.6.5 +- Ver. 19.3.6.5 + +* Mon Nov 27 2017 Peter Lemenkov - 19.3.6.4 +- Ver. 19.3.6.4 +- ssl: Countermeasurements for Bleichenbacher attack + +* Tue Aug 1 2017 Randy Barlow - 19.3.6.2-2 +- Search /usr/share/erlang/lib for libraries as well + +* Mon Jul 31 2017 Peter Lemenkov - 19.3.6.2-1 +- Ver. 19.3.6.2 + +* Wed Jul 26 2017 Fedora Release Engineering - 19.3.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jun 30 2017 Peter Lemenkov - 19.3.6.1-1 +- Ver. 19.3.6.1 + +* Fri Jun 16 2017 Peter Lemenkov - 19.3.6-2 +- Fix EPMD port assignment in IPv6 env. (GH#1487) + +* Tue Jun 13 2017 Peter Lemenkov - 19.3.6-1 +- Ver. 19.3.6 + +* Wed Jun 7 2017 Peter Lemenkov - 19.3.5-1 +- Ver. 19.3.5 +- Enabled tests + +* Fri May 12 2017 Peter Lemenkov - 19.3.4-1 +- Ver. 19.3.4 +- Require javapackages-tools (/use/share/java) +- Use /dev/null as a homedir for EPMD (its shell is /sbin/nologin anyway) +- Removed beam appilciation (non-SMP VM). + +* Tue May 2 2017 Peter Lemenkov - 19.3.3-1 +- Ver. 19.3.3 + +* Mon Apr 24 2017 Peter Lemenkov - 19.3.2-1 +- Ver. 19.3.2 + +* Tue Apr 4 2017 Peter Lemenkov - 19.3.1-1 +- Ver. 19.3.1 + +* Tue Mar 21 2017 Peter Lemenkov - 19.3-2 +- Fix for CVE-2016-10253 + +* Wed Mar 15 2017 Peter Lemenkov - 19.3-1 +- Ver. 19.3 + +* Wed Feb 8 2017 Peter Lemenkov - 19.2.3-1 +- Ver. 19.2.3 + +* Wed Feb 1 2017 Peter Lemenkov - 19.2.2-1 +- Ver. 19.2.2 + +* Wed Jan 18 2017 Peter Lemenkov - 19.2.1-1 +- Ver. 19.2.1 + +* Wed Jan 11 2017 Peter Lemenkov - 19.2-1 +- Ver. 19.2 + +* Wed Nov 23 2016 Peter Lemenkov - 19.1.6-2 +- Fix HiPE by disabling -fpie +- Fix dialyzer generation + +* 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 + +* 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 + +* 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 + +* 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 + +* 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 + +* 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 +- Merge (x)emacs subpackages into erlang-typer + +* 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) + +* 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 + +* 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 + +* 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 + +* 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 + +* Sun Feb 28 2016 Peter Lemenkov - 18.2.4-2 - Fixed issue with nodes registration over IPv6 -* Fri Feb 19 2016 Peter Lemenkov - R16B-03.15 +* 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 -* Wed Jan 27 2016 Peter Lemenkov - R16B-03.14 -- Enable error_logger depth fine tuning +* 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 -* Sun Jan 17 2016 John Eckersberg - R16B-03.13 -- Fix inet_dist_listen_{min,max} for ipv6 (rhbz#1299251) +* 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 + +* Fri Jan 22 2016 Peter Lemenkov - 18.2.2-3 +- Disable optimizations for Intel Atom CPU on ix86 arches + +* Sun Jan 17 2016 John Eckersberg - 18.2.2-2 - Add patch for epmd ipv6 support (rhbz#1299253) -* Mon Jan 11 2016 Peter Lemenkov - R16B-03.12 -- Enable crash dump creation during a large distrubution error +* Mon Jan 11 2016 Peter Lemenkov - 18.2.2-1 +- Ver. 18.2.2 -* Fri Aug 7 2015 John Eckersberg - R16B-03.11 +* 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) -* Mon Dec 01 2014 Peter Lemenkov - R16B-03.10 +* 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 + +* Fri Dec 12 2014 Peter Lemenkov - 17.4-1 +- Ver. 17.4 + +* Mon Dec 01 2014 Peter Lemenkov - 17.3.4-3 - Disable SSLv3 (see rhbz #1169375) + +* 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 ) -* Mon Nov 17 2014 Peter Lemenkov - R16B-03.9 -- Fixed CVE-2014-1693 (backported fix from ver. 17.x.x, see patch no. 17) +* Sat Nov 08 2014 Peter Lemenkov - 17.3.4-1 +- Ver. 17.3.4 (API/ABI compatible release) +- Relax an erlang-tools dependency on erlang-webtool down to Suggests -* Tue Nov 11 2014 Peter Lemenkov - R16B-03.8 -- Trimmed dependency chain -- Cleaned up spec-file +* Sun Nov 02 2014 Peter Lemenkov - 17.3.3-1 +- Ver. 17.3.3 + +* Sun Sep 7 2014 Peter Lemenkov - 17.2.2-1 +- Ver. 17.2.2 +- Fixed a race which could make create_table fail if a node was going down + during the transaction. See upstream issue OTP-12124 for a further reference. + +* Tue Aug 26 2014 Peter Lemenkov - 17.2.1-1 +- Ver. 17.2.1 +- Removed support for EPEL5 +- The following packages were removed - appmon, pman, toolbar, tv +- The following packages were added - ose +- No longer using a pre-built doc-files +- Erlang no longer requires erlang-examples subpackage (see rhbz #1038314) + +* Sat Aug 16 2014 Fedora Release Engineering - R16B-03.7.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Wed Jun 11 2014 Peter Lemenkov - R16B-03.7 - Added missing template for epmd@.socket @@ -2719,7 +3056,7 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \ - new release R12B-0 * Wed Dec 05 2007 Release Engineering - R11B-6 - - Rebuild for deps +- Rebuild for deps * Sun Aug 19 2007 Gerard Milmeister - R11B-5.3 - fix some permissions 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 75bf3e5..270792a 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 5c1ce51..5a07855 100644 +index 42af9c87dc..c017e0a4ed 100644 --- a/erts/etc/common/Makefile.in +++ b/erts/etc/common/Makefile.in -@@ -474,10 +474,6 @@ endif +@@ -552,10 +552,6 @@ endif ifneq ($(INSTALL_TOP_BIN),) $(INSTALL_PROGRAM) $(INSTALL_TOP_BIN) "$(RELEASE_PATH)" endif @@ -17,14 +17,14 @@ index 5c1ce51..5a07855 100644 - $(INSTALL_DIR) "$(RELEASE_PATH)/misc" - $(INSTALL_SCRIPT) $(INSTALL_MISC) "$(RELEASE_PATH)/misc" -endif - ifneq ($(INSTALL_ERL_OSE),) - $(INSTALL_DIR) "$(RELEASE_PATH)/build_erl_ose" - cd $(OSEETC) && $(TAR) erl_ose_$(SYSTEM_VSN).tar $(INSTALL_ERL_OSE) + ifneq ($(INSTALL_SRC),) + $(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 b00dd09f1a..2147774f50 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 . +@@ -143,14 +143,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 2a65565..5cadc0c 100644 --- a/otp-0002-Remove-rpath.patch +++ b/otp-0002-Remove-rpath.patch @@ -5,28 +5,15 @@ 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 a20ddff..e890927 100644 +index aedc9e7a13..b27c2aa01b 100644 --- a/lib/crypto/c_src/Makefile.in +++ b/lib/crypto/c_src/Makefile.in -@@ -85,7 +85,7 @@ endif - DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@ +@@ -147,7 +147,7 @@ endif + endif - ifeq ($(DYNAMIC_CRYPTO_LIB),yes) + ifeq ($(DYNAMIC_OR_WIN_CRYPTO_LIB),yes) -SSL_DED_LD_RUNTIME_LIBRARY_PATH = @SSL_DED_LD_RUNTIME_LIBRARY_PATH@ +SSL_DED_LD_RUNTIME_LIBRARY_PATH = CRYPTO_LINK_LIB=$(SSL_DED_LD_RUNTIME_LIBRARY_PATH) -L$(SSL_LIBDIR) -l$(SSL_CRYPTO_LIBNAME) EXTRA_FLAGS = -DHAVE_DYNAMIC_CRYPTO_LIB else -diff --git a/lib/crypto/priv/Makefile b/lib/crypto/priv/Makefile -index 0989f14..0d29444 100644 ---- a/lib/crypto/priv/Makefile -+++ b/lib/crypto/priv/Makefile -@@ -60,7 +60,7 @@ OBJS = $(OBJDIR)/crypto.o - # ---------------------------------------------------- - - $(SO_NIFLIB): $(OBJS) -- $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) -Wl,-R$(SO_SSL_LIBDIR) \ -+ $(SO_LD) $(SO_LDFLAGS) -L$(SO_SSL_LIBDIR) \ - -o $@ $^ -lcrypto - - $(DLL_NIFLIB): $(OBJS) diff --git a/otp-0003-Do-not-install-C-sources.patch b/otp-0003-Do-not-install-C-sources.patch index 821988b..23056c4 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 7023833..8bf8eb9 100644 +index 82a6b6e87a..5f2fe8ba7d 100644 --- a/lib/asn1/c_src/Makefile +++ b/lib/asn1/c_src/Makefile -@@ -107,8 +107,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk +@@ -137,8 +137,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib" $(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib" @@ -26,73 +26,34 @@ index 7023833..8bf8eb9 100644 release_docs_spec: -diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in -index e890927..1377654 100644 ---- a/lib/crypto/c_src/Makefile.in -+++ b/lib/crypto/c_src/Makefile.in -@@ -160,13 +160,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" -- $(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 - diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in -index e36b39c..fd377bb 100644 +index fa1ea3cd39..b977b6afe5 100644 --- a/lib/erl_interface/src/Makefile.in +++ b/lib/erl_interface/src/Makefile.in -@@ -876,14 +876,14 @@ ifneq ($(EXE_TARGETS),) - $(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin" +@@ -715,13 +715,11 @@ ifeq (@DYNAMIC_LIB@, yes) endif + $(INSTALL_PROGRAM) $(EXE_TARGETS) "$(RELSYSDIR)/bin" $(INSTALL_DATA) $(EXTRA) "$(RELSYSDIR)/src" - $(INSTALL_DATA) connect/*.[ch] "$(RELSYSDIR)/src/connect" - $(INSTALL_DATA) decode/*.[ch] "$(RELSYSDIR)/src/decode" - $(INSTALL_DATA) encode/*.[ch] "$(RELSYSDIR)/src/encode" - $(INSTALL_DATA) epmd/*.[ch] "$(RELSYSDIR)/src/epmd" - $(INSTALL_DATA) misc/*.[ch] "$(RELSYSDIR)/src/misc" -- $(INSTALL_DATA) registry/*.[ch] "$(RELSYSDIR)/src/registry" -- $(INSTALL_DATA) legacy/*.[ch] "$(RELSYSDIR)/src/legacy" +- $(INSTALL_DATA) global/*.[ch] "$(RELSYSDIR)/src/global" - $(INSTALL_DATA) prog/*.[ch] "$(RELSYSDIR)/src/prog" + $(INSTALL_DATA) connect/*.h "$(RELSYSDIR)/src/connect" + $(INSTALL_DATA) decode/*.h "$(RELSYSDIR)/src/decode" + $(INSTALL_DATA) encode/*.h "$(RELSYSDIR)/src/encode" + $(INSTALL_DATA) epmd/*.h "$(RELSYSDIR)/src/epmd" + $(INSTALL_DATA) misc/*.h "$(RELSYSDIR)/src/misc" -+ $(INSTALL_DATA) registry/*.h "$(RELSYSDIR)/src/registry" -+ $(INSTALL_DATA) legacy/*.h "$(RELSYSDIR)/src/legacy" -+ $(INSTALL_DATA) prog/*.h "$(RELSYSDIR)/src/prog" release_docs: -diff --git a/lib/ic/c_src/Makefile.in b/lib/ic/c_src/Makefile.in -index ed860ab..96206ae 100644 ---- a/lib/ic/c_src/Makefile.in -+++ b/lib/ic/c_src/Makefile.in -@@ -144,12 +144,10 @@ $(OBJDIR)/%.o: %.c - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/c_src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib" - $(INSTALL_DIR) "$(RELEASE_PATH)/usr/include" - $(INSTALL_DIR) "$(RELEASE_PATH)/usr/lib" -- $(INSTALL_DATA) ic.c ic_tmo.c "$(RELSYSDIR)/c_src" - $(INSTALL_DATA) $(IDL_FILES) $(H_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(LIBRARY) "$(RELSYSDIR)/priv/lib" - $(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 3649e2c392..d8c5c68b99 100644 --- a/lib/megaco/src/flex/Makefile.in +++ b/lib/megaco/src/flex/Makefile.in -@@ -270,7 +270,7 @@ release_spec: opt +@@ -251,7 +251,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) @@ -102,10 +63,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 d1b26743a6..cf8faae1f5 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 @@ -118,10 +79,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 27b156a2c9..f11ff303b6 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 @@ -130,30 +91,3 @@ index f84ccf7..05d194f 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 d315a90..7b4b9fb 100644 ---- a/lib/runtime_tools/c_src/Makefile.in -+++ b/lib/runtime_tools/c_src/Makefile.in -@@ -177,9 +177,7 @@ docs: - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj" - $(INSTALL_DIR) "$(RELSYSDIR)/priv/lib" -- $(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj" - $(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib" - - release_docs_spec: -diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in -index aea5686..a0c8883 100644 ---- a/lib/tools/c_src/Makefile.in -+++ b/lib/tools/c_src/Makefile.in -@@ -189,8 +189,6 @@ include ../vsn.mk - RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN) - - release_spec: all -- $(INSTALL_DIR) "$(RELSYSDIR)/c_src" -- $(INSTALL_DATA) $(EMEM_SRCS) $(EMEM_HEADERS) "$(RELSYSDIR)/c_src" - ifneq ($(PROGS),) - $(INSTALL_DIR) "$(RELSYSDIR)/bin" - $(INSTALL_PROGRAM) $(PROGS) "$(RELSYSDIR)/bin" diff --git a/otp-0004-Do-not-install-Java-sources.patch b/otp-0004-Do-not-install-Java-sources.patch index 378e86d..a8037ea 100644 --- a/otp-0004-Do-not-install-Java-sources.patch +++ b/otp-0004-Do-not-install-Java-sources.patch @@ -4,24 +4,11 @@ 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 ---- 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: - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/java_src/com/ericsson/otp/ic" -- $(INSTALL_DATA) $(JAVA_FILES) "$(RELSYSDIR)/java_src/com/ericsson/otp/ic" - $(INSTALL_DIR) "$(RELSYSDIR)/priv" - $(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv" - diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile -index f476d45..44429a4 100644 +index 089cf4ab1a..404654a437 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile -@@ -102,8 +102,6 @@ release release_docs release_tests release_html: +@@ -123,8 +123,6 @@ release release_docs release_tests release_html: $(V_at)$(MAKE) $(MFLAGS) RELEASE_PATH="$(RELEASE_PATH)" $(TARGET_MAKEFILE) $@_spec release_spec: opt @@ -29,4 +16,4 @@ index f476d45..44429a4 100644 - $(V_at)$(INSTALL_DATA) $(JAVA_SRC) "$(RELSYSDIR)/java_src/com/ericsson/otp/erlang" $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/priv" $(V_at)$(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) "$(RELSYSDIR)/priv" - + $(V_at)$(INSTALL_DIR) "$(RELSYSDIR)/ebin" 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..1965881 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 8e3882bfdc..ea999cf9c7 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) +@@ -31,11 +31,16 @@ APPLICATION=os_mon # Target Specs # ---------------------------------------------------- XML_APPLICATION_FILES = ref_man.xml @@ -21,33 +21,32 @@ index 08fd23e..5606cfc 100644 XML_REF3_FILES = cpu_sup.xml \ disksup.xml \ memsup.xml \ - os_mon_mib.xml \ os_sup.xml \ - nteventlog.xml + $(NTEVENTLOG_DOCFILE) - XML_REF6_FILES = os_mon_app.xml + XML_REF6_FILES = os_mon_app.xml diff --git a/lib/os_mon/src/Makefile b/lib/os_mon/src/Makefile -index cd2dade..4e78cf8 100644 +index e28fb12548..ee32f3946f 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,7 +34,13 @@ RELSYSDIR = $(RELEASE_PATH)/lib/os_mon-$(VSN) # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- +-MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo nteventlog +ifeq ($(findstring win32,$(TARGET)),win32) +NTEVENTLOG=nteventlog +else +NTEVENTLOG= +endif - MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo \ -- nteventlog ++MODULES= disksup memsup cpu_sup os_mon os_mon_mib os_sup os_mon_sysinfo \ + $(NTEVENTLOG) INCLUDE=../include CSRC=../c_src -@@ -78,7 +83,11 @@ docs: +@@ -78,7 +84,11 @@ docs: # ---------------------------------------------------- $(APP_TARGET): $(APP_SRC) ../vsn.mk diff --git a/otp-0006-Add-extra-search-directory.patch b/otp-0006-Add-extra-search-directory.patch new file mode 100644 index 0000000..2f872ef --- /dev/null +++ b/otp-0006-Add-extra-search-directory.patch @@ -0,0 +1,32 @@ +From: Peter Lemenkov +Date: Wed, 2 Aug 2017 16:12:19 +0300 +Subject: [PATCH] Add extra search directory + +Signed-off-by: Peter Lemenkov + +diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl +index 7327636751..2e92e77598 100644 +--- a/lib/kernel/src/code_server.erl ++++ b/lib/kernel/src/code_server.erl +@@ -90,11 +90,17 @@ init(Ref, Parent, [Root,Mode]) -> + IPath = + case Mode of + interactive -> +- LibDir = filename:append(Root, "lib"), +- {ok,Dirs} = erl_prim_loader:list_dir(LibDir), +- Paths = make_path(LibDir, Dirs), ++ F = fun(R) -> ++ LD = filename:append(R, "lib"), ++ case erl_prim_loader:list_dir(LD) of ++ error -> []; ++ {ok, D} -> make_path(LD, D) ++ end ++ end, ++ Paths = F(Root), ++ SharedPaths = F("/usr/share/erlang"), + UserLibPaths = get_user_lib_dirs(), +- ["."] ++ UserLibPaths ++ Paths; ++ ["."] ++ UserLibPaths ++ Paths ++ SharedPaths; + _ -> + [] + end, diff --git a/otp-0006-Do-not-install-erlang-sources.patch b/otp-0006-Do-not-install-erlang-sources.patch deleted file mode 100644 index 843e052..0000000 --- a/otp-0006-Do-not-install-erlang-sources.patch +++ /dev/null @@ -1,1033 +0,0 @@ -From: Hans Ulrich Niedermann -Date: Mon, 21 Mar 2011 15:41:49 +0100 -Subject: [PATCH] Do not install erlang sources - -Don't install *.erl, *.xrl, *.yrl, and *.asn1 files at all. - -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 ---- a/erts/preloaded/src/Makefile -+++ b/erts/preloaded/src/Makefile -@@ -85,8 +85,6 @@ $(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: $(APP_TARGET) -- $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(BEAM_FILES) $(STUBS_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(STATIC_TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin" - -diff --git a/lib/appmon/src/Makefile b/lib/appmon/src/Makefile -index c1620bc..02c0984 100644 ---- a/lib/appmon/src/Makefile -+++ b/lib/appmon/src/Makefile -@@ -95,7 +95,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/asn1/src/Makefile b/lib/asn1/src/Makefile -index 500f4a1..e707394 100644 ---- a/lib/asn1/src/Makefile -+++ b/lib/asn1/src/Makefile -@@ -153,7 +153,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(APP_SRC) $(APPUP_SRC) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/examples" - $(INSTALL_DATA) $(EXAMPLES) "$(RELSYSDIR)/examples" - -diff --git a/lib/common_test/src/Makefile b/lib/common_test/src/Makefile -index 4600c0a..1675a4a 100644 ---- a/lib/common_test/src/Makefile -+++ b/lib/common_test/src/Makefile -@@ -139,7 +139,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- a/lib/compiler/src/Makefile -+++ b/lib/compiler/src/Makefile -@@ -165,8 +165,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \ -- $(YRL_FILE) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(EXTRA_FILES) \ -+ "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/cosEvent/src/Makefile b/lib/cosEvent/src/Makefile -index 2864ee0..0e27bb6 100644 ---- a/lib/cosEvent/src/Makefile -+++ b/lib/cosEvent/src/Makefile -@@ -202,7 +202,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include" - -diff --git a/lib/cosEventDomain/src/Makefile b/lib/cosEventDomain/src/Makefile -index b4b74bd..420f566 100644 ---- a/lib/cosEventDomain/src/Makefile -+++ b/lib/cosEventDomain/src/Makefile -@@ -171,7 +171,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include" - -diff --git a/lib/cosFileTransfer/src/Makefile b/lib/cosFileTransfer/src/Makefile -index 9d3abb9..c3d83a5 100644 ---- a/lib/cosFileTransfer/src/Makefile -+++ b/lib/cosFileTransfer/src/Makefile -@@ -179,9 +179,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(GEN_HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" -- $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include" - - release_docs_spec: -diff --git a/lib/cosNotification/src/Makefile b/lib/cosNotification/src/Makefile -index 13153bd..0860700 100644 ---- a/lib/cosNotification/src/Makefile -+++ b/lib/cosNotification/src/Makefile -@@ -370,8 +370,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) $(YECC_FILES) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(IDL_FILES) $(YECC_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(GEN_HRL_FILES) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include" - -diff --git a/lib/cosProperty/src/Makefile b/lib/cosProperty/src/Makefile -index d7b75d8..fba8746 100644 ---- a/lib/cosProperty/src/Makefile -+++ b/lib/cosProperty/src/Makefile -@@ -179,8 +179,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(GEN_HRL_FILES) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include" - -diff --git a/lib/cosTime/src/Makefile b/lib/cosTime/src/Makefile -index 0ab2b41..c29caeb 100644 ---- a/lib/cosTime/src/Makefile -+++ b/lib/cosTime/src/Makefile -@@ -198,8 +198,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(GEN_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(GEN_HRL_FILES) $(HRL_FILES) $(IDL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(GEN_HRL_FILES) "$(RELSYSDIR)/include" - -diff --git a/lib/cosTransactions/src/Makefile b/lib/cosTransactions/src/Makefile -index 7b4a9cf..290707c 100644 ---- a/lib/cosTransactions/src/Makefile -+++ b/lib/cosTransactions/src/Makefile -@@ -173,7 +173,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(GEN_ERL_FILES) $(IDL_FILE) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILE) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include" - -diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile -index 574c207..52320b0 100644 ---- a/lib/crypto/src/Makefile -+++ b/lib/crypto/src/Makefile -@@ -83,8 +83,6 @@ docs: - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) \ - $(APPUP_TARGET) "$(RELSYSDIR)/ebin" -diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile -index 85754da..5a6f298 100644 ---- a/lib/debugger/src/Makefile -+++ b/lib/debugger/src/Makefile -@@ -130,7 +130,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/dialyzer/src/Makefile b/lib/dialyzer/src/Makefile -index bb2edd4..6b20995 100644 ---- a/lib/dialyzer/src/Makefile -+++ b/lib/dialyzer/src/Makefile -@@ -156,7 +156,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \ -+ $(INSTALL_DATA) $(HRL_FILES) $(EXTRA_FILES) \ - "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin" -diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile -index 578bbae..647cfde 100644 ---- a/lib/diameter/src/Makefile -+++ b/lib/diameter/src/Makefile -@@ -242,11 +242,8 @@ release_spec: opt - $(MAKE) $(EXAMPLE_DIRS:%/=release_examples_%) - - $(TARGET_DIRS:%/=release_src_%): release_src_%: -- $(INSTALL_DIR) "$(RELSYSDIR)/src/$*" -- $(INSTALL_DATA) $(filter $*/%, $(TARGET_MODULES:%=%.erl) \ -- $(INTERNAL_HRLS)) \ -- $(filter $*/%, compiler/$(DICT_YRL).yrl) \ -- "$(RELSYSDIR)/src/$*" -+ $(INSTALL_DATA) $(filter $*/%, $(INTERNAL_HRLS)) \ -+ "$(RELSYSDIR)/src/$*" || true - - $(EXAMPLE_DIRS:%/=release_examples_%): release_examples_%: - $(INSTALL_DIR) "$(RELSYSDIR)/examples/$*" -diff --git a/lib/edoc/src/Makefile b/lib/edoc/src/Makefile -index 4e5a418..c0bb0c3 100644 ---- a/lib/edoc/src/Makefile -+++ b/lib/edoc/src/Makefile -@@ -88,7 +88,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(OBJECTS) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(SOURCES) $(HRL_FILES) $(YRL_FILE) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - - release_docs_spec: - -diff --git a/lib/eldap/src/Makefile b/lib/eldap/src/Makefile -index ebb7967..b6337cb 100644 ---- a/lib/eldap/src/Makefile -+++ b/lib/eldap/src/Makefile -@@ -98,10 +98,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" -- $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" -- $(INSTALL_DIR) "$(RELSYSDIR)/asn1" -- $(INSTALL_DATA) ../asn1/$(ASN1_FILES) "$(RELSYSDIR)/asn1" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/erl_docgen/src/Makefile -+++ b/lib/erl_docgen/src/Makefile -@@ -89,8 +89,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)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile -index 386169f..216b548 100644 ---- a/lib/et/src/Makefile -+++ b/lib/et/src/Makefile -@@ -108,7 +108,6 @@ release_spec: opt - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" -diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile -index e6dab67..a5e147d 100644 ---- a/lib/eunit/src/Makefile -+++ b/lib/eunit/src/Makefile -@@ -117,8 +117,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin" -- $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(PARSE_TRANSFORM) $(SOURCES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include" - -diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile -index 0a63d54..8a49249 100644 ---- a/lib/gs/src/Makefile -+++ b/lib/gs/src/Makefile -@@ -108,8 +108,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(APP_SRC) $(ERL_FILES) $(HRL_FILES) $(GEN_HRL_FILES) \ -- $(GSTK_GENERIC) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(GEN_HRL_FILES) \ -+ "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/priv/bitmap" -diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile -index 506e993..d74b75c 100644 ---- a/lib/hipe/cerl/Makefile -+++ b/lib/hipe/cerl/Makefile -@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/cerl" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/cerl" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/cerl" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/hipe/flow/Makefile b/lib/hipe/flow/Makefile -index 75e156b..5e394ca 100644 ---- a/lib/hipe/flow/Makefile -+++ b/lib/hipe/flow/Makefile -@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/flow" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(INC_FILES) "$(RELSYSDIR)/flow" -+ $(INSTALL_DATA) $(HRL_FILES) $(INC_FILES) "$(RELSYSDIR)/flow" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile -index 87015aa..84f870d 100644 ---- a/lib/hipe/icode/Makefile -+++ b/lib/hipe/icode/Makefile -@@ -119,7 +119,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/icode" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/icode" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/icode" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/hipe/main/Makefile b/lib/hipe/main/Makefile -index 66e4c3e..2f11670 100644 ---- a/lib/hipe/main/Makefile -+++ b/lib/hipe/main/Makefile -@@ -117,7 +117,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DATA) ../vsn.mk "$(RELSYSDIR)" - $(INSTALL_DIR) "$(RELSYSDIR)/main" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/main" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/main" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/hipe/misc/Makefile b/lib/hipe/misc/Makefile -index 16166f5..0ba5845 100644 ---- a/lib/hipe/misc/Makefile -+++ b/lib/hipe/misc/Makefile -@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/misc" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/misc" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/misc" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/hipe/rtl/Makefile b/lib/hipe/rtl/Makefile -index 751e876..98b7911 100644 ---- a/lib/hipe/rtl/Makefile -+++ b/lib/hipe/rtl/Makefile -@@ -104,7 +104,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/rtl" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/rtl" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/rtl" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/hipe/util/Makefile b/lib/hipe/util/Makefile -index a5ee232..f03e41d 100644 ---- a/lib/hipe/util/Makefile -+++ b/lib/hipe/util/Makefile -@@ -49,7 +49,6 @@ HIPE_MODULES = - endif - MODULES = hipe_timing hipe_dot hipe_digraph $(HIPE_MODULES) - --HRL_FILES= - ERL_FILES= $(MODULES:%=%.erl) - TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) - DOC_FILES= $(MODULES:%=$(DOCS)/%.html) -@@ -103,8 +102,6 @@ $(DOCS)/%.html:%.erl - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/util" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/util" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/ic/src/Makefile b/lib/ic/src/Makefile -index e8769d2..965d0e7 100644 ---- a/lib/ic/src/Makefile -+++ b/lib/ic/src/Makefile -@@ -199,7 +199,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(YRL_FILE) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/examples" - $(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 ---- a/lib/inets/src/ftp/Makefile -+++ b/lib/inets/src/ftp/Makefile -@@ -90,7 +90,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/ftp" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/ftp" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/ftp" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- 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 - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/http_client" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/http_client" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/http_client" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- 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 - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/http_lib" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/http_lib" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/http_lib" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- 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 - 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" - -diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile -index 22426ee..0b0cfb8 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 - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/inets_app" -- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/inets_app" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/inets_app" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/inets/src/tftp/Makefile -+++ b/lib/inets/src/tftp/Makefile -@@ -95,7 +95,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/tftp" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src/tftp" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/tftp" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(BEHAVIOUR_TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile -index cb3c0a4..dbda2a2 100644 ---- a/lib/kernel/src/Makefile -+++ b/lib/kernel/src/Makefile -@@ -198,7 +198,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) "$(RELSYSDIR)/src" - $(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 ---- a/lib/megaco/src/app/Makefile -+++ b/lib/megaco/src/app/Makefile -@@ -113,7 +113,7 @@ release_spec: opt - $(INSTALL_DATA) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/app" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/app" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/app" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/megaco/src/binary/Makefile -+++ b/lib/megaco/src/binary/Makefile -@@ -175,7 +175,7 @@ release_spec: opt - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/binary" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(ASN1_FILES) "$(RELSYSDIR)/src/binary" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/binary" - - - release_docs_spec: -diff --git a/lib/megaco/src/engine/Makefile b/lib/megaco/src/engine/Makefile -index 7cecef1..841a88a 100644 ---- a/lib/megaco/src/engine/Makefile -+++ b/lib/megaco/src/engine/Makefile -@@ -101,7 +101,7 @@ release_spec: opt - $(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/engine" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/engine" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/engine" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - - -diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in -index bd62e8b..cce5a8d 100644 ---- a/lib/megaco/src/flex/Makefile.in -+++ b/lib/megaco/src/flex/Makefile.in -@@ -267,8 +267,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" - 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 ---- a/lib/megaco/src/tcp/Makefile -+++ b/lib/megaco/src/tcp/Makefile -@@ -93,7 +93,7 @@ release_spec: opt - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/tcp" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/tcp" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/tcp" - - - release_docs_spec: -diff --git a/lib/megaco/src/text/Makefile b/lib/megaco/src/text/Makefile -index cab4256..d5cf217 100644 ---- a/lib/megaco/src/text/Makefile -+++ b/lib/megaco/src/text/Makefile -@@ -134,7 +134,7 @@ release_spec: opt - $(INSTALL_DATA) $(BEAM_TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/text" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_YRL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/text" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/text" - - - release_docs_spec: -diff --git a/lib/megaco/src/udp/Makefile b/lib/megaco/src/udp/Makefile -index 9486804..ea4830c 100644 ---- a/lib/megaco/src/udp/Makefile -+++ b/lib/megaco/src/udp/Makefile -@@ -93,7 +93,7 @@ release_spec: opt - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/udp" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/udp" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/udp" - - - release_docs_spec: -diff --git a/lib/mnesia/src/Makefile b/lib/mnesia/src/Makefile -index ac38fa0..20bce7e 100644 ---- a/lib/mnesia/src/Makefile -+++ b/lib/mnesia/src/Makefile -@@ -132,7 +132,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile -index 42f5c19..a98b706 100644 ---- a/lib/observer/src/Makefile -+++ b/lib/observer/src/Makefile -@@ -131,7 +131,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) "$(RELSYSDIR)/src" - $(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 ---- a/lib/odbc/src/Makefile -+++ b/lib/odbc/src/Makefile -@@ -109,7 +109,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/orber/COSS/CosNaming/Makefile -+++ b/lib/orber/COSS/CosNaming/Makefile -@@ -144,8 +144,8 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/COSS/CosNaming" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(IDL_FILE) "$(RELSYSDIR)/COSS/CosNaming" -- $(INSTALL_DATA) $(GEN_FILES) "$(RELSYSDIR)/COSS/CosNaming" -+ $(INSTALL_DATA) $(HRL_FILES) $(IDL_FILE) "$(RELSYSDIR)/COSS/CosNaming" -+ $(INSTALL_DATA) $(GEN_HRL_FILES) $(GEN_EXT_HRL_FILES) "$(RELSYSDIR)/COSS/CosNaming" - - - release_docs_spec: -diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile -index 1c6781e..e471f88 100644 ---- a/lib/orber/src/Makefile -+++ b/lib/orber/src/Makefile -@@ -256,7 +256,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(YRL_FILE) $(GEN_HRL_FILES_LOC) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(GEN_HRL_FILES_LOC) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/os_mon/src/Makefile -+++ b/lib/os_mon/src/Makefile -@@ -104,7 +104,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(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 4f03d02..756db7b 100644 ---- a/lib/otp_mibs/src/Makefile -+++ b/lib/otp_mibs/src/Makefile -@@ -95,8 +95,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)/ebin" - $(INSTALL_DATA) $(TARGETS) "$(RELSYSDIR)/ebin" - -diff --git a/lib/parsetools/src/Makefile b/lib/parsetools/src/Makefile -index 2ee2285..ea075ed 100644 ---- a/lib/parsetools/src/Makefile -+++ b/lib/parsetools/src/Makefile -@@ -90,8 +90,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)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/include" -diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile -index 6bf0af9..e501539 100644 ---- a/lib/percept/src/Makefile -+++ b/lib/percept/src/Makefile -@@ -93,8 +93,6 @@ docs: - 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_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" -diff --git a/lib/pman/src/Makefile b/lib/pman/src/Makefile -index eb0413b..4f5419b 100644 ---- a/lib/pman/src/Makefile -+++ b/lib/pman/src/Makefile -@@ -104,7 +104,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) $(TOOLBOX_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile -index a4e36c7..432e73a 100644 ---- a/lib/public_key/asn1/Makefile -+++ b/lib/public_key/asn1/Makefile -@@ -95,8 +95,8 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/asn1" -- $(INSTALL_DATA) $(ASN_ASNS) $(ASN_ERLS) $(ASN_HRLS) $(ASN_CONFIGS) \ -- $(GEN_ERLS) "$(RELSYSDIR)/asn1" -+ $(INSTALL_DATA) $(ASN_ASNS) $(ASN_HRLS) $(ASN_CONFIGS) \ -+ "$(RELSYSDIR)/asn1" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/public_key/src/Makefile b/lib/public_key/src/Makefile -index 09393e8..eb4c54d 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 - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -- $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/reltool/src/Makefile -+++ b/lib/reltool/src/Makefile -@@ -99,7 +99,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- a/lib/runtime_tools/src/Makefile -+++ b/lib/runtime_tools/src/Makefile -@@ -96,8 +96,6 @@ docs: - 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_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 ---- a/lib/sasl/src/Makefile -+++ b/lib/sasl/src/Makefile -@@ -92,7 +92,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) "$(RELSYSDIR)/src" - $(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 ---- a/lib/snmp/src/agent/Makefile -+++ b/lib/snmp/src/agent/Makefile -@@ -130,7 +130,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/agent" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/agent" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/agent" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- a/lib/snmp/src/app/Makefile -+++ b/lib/snmp/src/app/Makefile -@@ -131,7 +131,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/app" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/app" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/app" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- a/lib/snmp/src/compile/Makefile -+++ b/lib/snmp/src/compile/Makefile -@@ -122,7 +122,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/compiler" -- $(INSTALL_DATA) $(ESCRIPT_SRC) $(PARSER_SRC) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/compiler" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src/compiler" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- a/lib/snmp/src/manager/Makefile -+++ b/lib/snmp/src/manager/Makefile -@@ -113,7 +113,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/manager" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/manager" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/manager" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 ---- a/lib/snmp/src/misc/Makefile -+++ b/lib/snmp/src/misc/Makefile -@@ -111,7 +111,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/misc" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src/misc" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src/misc" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - # $(INSTALL_DIR) "$(RELSYSDIR)/include" -diff --git a/lib/ssh/src/Makefile b/lib/ssh/src/Makefile -index 2ef2859..aac91a3 100644 ---- a/lib/ssh/src/Makefile -+++ b/lib/ssh/src/Makefile -@@ -134,7 +134,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 131b615..c456bfc 100644 ---- a/lib/ssl/src/Makefile -+++ b/lib/ssl/src/Makefile -@@ -136,7 +136,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(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 f3387d6..4c5e622 100644 ---- a/lib/stdlib/src/Makefile -+++ b/lib/stdlib/src/Makefile -@@ -202,7 +202,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) erl_parse.yrl "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(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 ---- a/lib/syntax_tools/src/Makefile -+++ b/lib/syntax_tools/src/Makefile -@@ -82,8 +82,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: - -diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile -index ab4dd4d..bcb1bc3 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 - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" -diff --git a/lib/toolbar/src/Makefile b/lib/toolbar/src/Makefile -index a248469..96c42df 100644 ---- a/lib/toolbar/src/Makefile -+++ b/lib/toolbar/src/Makefile -@@ -85,7 +85,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/tools/src/Makefile b/lib/tools/src/Makefile -index e606b97..1beb8cc 100644 ---- a/lib/tools/src/Makefile -+++ b/lib/tools/src/Makefile -@@ -106,7 +106,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(YRL_FILE) $(HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) \ - "$(RELSYSDIR)/ebin" -diff --git a/lib/tv/src/Makefile b/lib/tv/src/Makefile -index 3d680c1..e6ed610 100644 ---- a/lib/tv/src/Makefile -+++ b/lib/tv/src/Makefile -@@ -127,7 +127,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/typer/src/Makefile b/lib/typer/src/Makefile -index 13af466..c29a597 100644 ---- a/lib/typer/src/Makefile -+++ b/lib/typer/src/Makefile -@@ -101,9 +101,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) $(YRL_FILES) \ -- "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin" - -diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile -index f28c777..346ce37 100644 ---- a/lib/webtool/src/Makefile -+++ b/lib/webtool/src/Makefile -@@ -87,8 +87,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 26574ed..266a5d6 100644 ---- a/lib/wx/src/Makefile -+++ b/lib/wx/src/Makefile -@@ -121,9 +121,9 @@ $(EBIN)/%.beam: $(EGEN)/%.erl $(HEADER_FILES) - include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/src/gen" -- $(INSTALL_DATA) $(GEN_HRL) $(GEN_FILES) "$(RELSYSDIR)/src/gen" -+ $(INSTALL_DATA) $(GEN_HRL) "$(RELSYSDIR)/src/gen" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(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 ---- a/lib/xmerl/src/Makefile -+++ b/lib/xmerl/src/Makefile -@@ -217,9 +217,7 @@ release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin" - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) $(APP_SRC) $(APPUP_SRC) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) xmerl_xpath_parse.yrl "$(RELSYSDIR)/src" -- $(INSTALL_DATA) xmerl_b64Bin.yrl "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - diff --git a/otp-0007-Avoid-forking-sed-to-get-basename.patch b/otp-0007-Avoid-forking-sed-to-get-basename.patch new file mode 100644 index 0000000..d146ab2 --- /dev/null +++ b/otp-0007-Avoid-forking-sed-to-get-basename.patch @@ -0,0 +1,31 @@ +From: Jan Pazdziora +Date: Thu, 10 May 2018 18:35:02 +0200 +Subject: [PATCH] Avoid forking sed to get basename. + + +diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src +index 536fa139d9..4dcffbc4c8 100644 +--- a/erts/etc/unix/erl.src.src ++++ b/erts/etc/unix/erl.src.src +@@ -49,7 +49,7 @@ else + fi + BINDIR="$ROOTDIR/erts-%VSN%/bin" + EMU=%EMULATOR%%EMULATOR_NUMBER% +-PROGNAME=`basename "$0"` ++PROGNAME=${0##*/} + export EMU + export ROOTDIR + export BINDIR +diff --git a/erts/etc/unix/start_erl.src b/erts/etc/unix/start_erl.src +index 34e0369710..62e613bba1 100644 +--- a/erts/etc/unix/start_erl.src ++++ b/erts/etc/unix/start_erl.src +@@ -37,7 +37,7 @@ VSN=`awk '{print $2}' $DataFile` + + BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin + EMU=beam +-PROGNAME=`echo $0 | sed 's/.*\///'` ++PROGNAME=${0##*/} + export EMU + export ROOTDIR + export BINDIR diff --git a/otp-0007-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch b/otp-0007-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch deleted file mode 100644 index 33b5973..0000000 --- a/otp-0007-Ugly-workaround-for-java-1.5.0-gcj-which-doesn-t-sup.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Peter Lemenkov -Date: Sun, 21 Nov 2010 00:17:49 +0300 -Subject: [PATCH] Ugly workaround for java-1.5.0-gcj which doesn't support - UNICODE fully - -Signed-off-by: Peter Lemenkov -Fedora-Spec-Comment: Required only for el5, el6 on PowerPC -Fedora-Spec-Before: %if 0%{?el4}%{?el5}%{?el6} -Fedora-Spec-Before: %ifnarch %{ix86} x86_64 -Fedora-Spec-After: %endif -Fedora-Spec-After: %endif - -diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java -index 3456fd7..86cd411 100644 ---- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java -+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java -@@ -389,19 +389,7 @@ public class OtpErlangList extends OtpErlangObject implements - */ - - public String stringValue() throws OtpErlangException { -- if (! isProper()) { -- throw new OtpErlangException("Non-proper list: " + this); -- } -- final int[] values = new int[arity()]; -- for (int i = 0; i < values.length; ++i) { -- final OtpErlangObject o = elementAt(i); -- if (! (o instanceof OtpErlangLong)) { -- throw new OtpErlangException("Non-integer term: " + o); -- } -- final OtpErlangLong l = (OtpErlangLong) o; -- values[i] = l.intValue(); -- } -- return new String(values, 0, values.length); -+ throw new OtpErlangException("No UNICODE support in java-1.5.0-gcj"); - } - - -diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java -index 9dc1728..76e380d 100644 ---- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java -+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java -@@ -1112,17 +1112,8 @@ public class OtpInputStream extends ByteArrayInputStream { - case OtpExternal.nilTag: - return ""; - case OtpExternal.listTag: // List when unicode + -- len = read4BE(); -- intbuf = new int[len]; -- for (int i = 0; i < len; i++) { -- intbuf[i] = read_int(); -- if (! OtpErlangString.isValidCodePoint(intbuf[i])) { -- throw new OtpErlangDecodeException -- ("Invalid CodePoint: " + intbuf[i]); -- } -- } -- read_nil(); -- return new String(intbuf, 0, intbuf.length); -+ throw new OtpErlangDecodeException( -+ "No UNICODE support in java-1.5.0-gcj"); - default: - throw new OtpErlangDecodeException( - "Wrong tag encountered, expected " + OtpExternal.stringTag diff --git a/otp-0008-Fix-for-armv7hl-architecture.patch b/otp-0008-Fix-for-armv7hl-architecture.patch deleted file mode 100644 index b7d8b32..0000000 --- a/otp-0008-Fix-for-armv7hl-architecture.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Peter Lemenkov -Date: Thu, 26 Sep 2013 22:01:03 +0400 -Subject: [PATCH] Fix for armv7hl architecture - -Taken from openSUSE: - -* https://build.opensuse.org/package/view_file/devel:languages:erlang:Factory/erlang/fix-armv7hl.patch?expand=1 - -Signed-off-by: Peter Lemenkov - -diff --git a/erts/configure.in b/erts/configure.in -index bad748d..230f27a 100644 ---- a/erts/configure.in -+++ b/erts/configure.in -@@ -621,6 +621,7 @@ case $chk_arch_ in - armv5tejl) ARCH=arm;; - armv6l) ARCH=arm;; - armv7l) ARCH=arm;; -+ armv7hl) ARCH=arm;; - tile) ARCH=tile;; - *) ARCH=noarch;; - esac diff --git a/otp-0008-Load-man-pages-from-system-wide-directory.patch b/otp-0008-Load-man-pages-from-system-wide-directory.patch new file mode 100644 index 0000000..e014671 --- /dev/null +++ b/otp-0008-Load-man-pages-from-system-wide-directory.patch @@ -0,0 +1,25 @@ +From: Francois-Denis Gonthier +Date: Thu, 20 Sep 2018 15:01:18 +0300 +Subject: [PATCH] Load man-pages from system-wide directory + +Patch allows one to use standard man path with erl -man command. +(Erlang manual pages are placed to /usr/share/man/ hierarchy +as required by Debian policy.) + +diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c +index 888df87e35..14272f06c6 100644 +--- a/erts/etc/common/erlexec.c ++++ b/erts/etc/common/erlexec.c +@@ -716,8 +716,10 @@ int main(int argc, char **argv) + error("-man not supported on Windows"); + #else + argv[i] = "man"; +- erts_snprintf(tmpStr, sizeof(tmpStr), "%s/man", rootdir); +- set_env("MANPATH", tmpStr); ++ /* ++ * Conform to erlang-manpages content. ++ */ ++ putenv(strsave("MANSECT=3erl:1:5:7")); + execvp("man", argv+i); + error("Could not execute the 'man' command."); + #endif diff --git a/otp-0009-Add-GDB-tools.patch b/otp-0009-Add-GDB-tools.patch new file mode 100644 index 0000000..462324e --- /dev/null +++ b/otp-0009-Add-GDB-tools.patch @@ -0,0 +1,464 @@ +From: Peter Lemenkov +Date: Thu, 19 Jun 2025 13:17:52 +0200 +Subject: [PATCH] Add GDB tools + +* https://github.com/erlang/otp-gdb-tools +* Commit 7b864f58c534699e4124e31ecfda86041b941037. + +Signed-off-by: Peter Lemenkov + +diff --git a/erts/etc/unix/gdb-tools/README.md b/erts/etc/unix/gdb-tools/README.md +new file mode 100644 +index 0000000000..8a6cf92b1d +--- /dev/null ++++ b/erts/etc/unix/gdb-tools/README.md +@@ -0,0 +1,42 @@ ++# Erlang/OTP GDB Tools ++ ++This repository contains GDB tools that cannot ++be part of the main Erlang/OTP repository for licensing ++reasons. The tools are used when building and debugging ++Erlang/OTP with gdb and are installed as needed by the ++Erlang/OTP build system. ++ ++Right now the only tool in this repository is the jit-reader ++which is a plugin to gdb that allows it to read the stack of ++Erlang processes when using the JIT. This allows commands ++such as `backtrace` to show Erlang stackframes. For example: ++ ++``` ++(gdb) bt ++#0 0x00007fffa40005ee in global::call_bif_shared () ++#1 0x00007fffa411eaac in erl_eval:eval_lc1/7 () at erl_eval.erl:929 ++#2 0x00007fffa411e7bc in erl_eval:eval_lc/7 () at erl_eval.erl:917 ++#3 0x00007fffa4296528 in lists:map_1/2 () at lists.erl:2082 ++#4 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082 ++#5 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082 ++#6 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082 ++..... ++#98 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082 ++#99 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082 ++#100 0x00007fffa4296554 in lists:map_1/2 () at lists.erl:2082 ++#101 0x00007fffa42963d4 in lists:map/2 () at lists.erl:2077 ++#102 0x00007fffa411e45c in erl_eval:do_apply/7 () at erl_eval.erl:904 ++#103 0x00007fffa45f4c58 in shell:exprs/7 () at shell.erl:893 ++#104 0x00007fffa45f42c4 in shell:eval_exprs/7 () at shell.erl:849 ++#105 0x00007fffa45f3dac in shell:eval_loop/4 () at shell.erl:834 ++#106 0x00007fffa40024b8 in erts_beamasm:normal_exit/0-CodeInfoPrologue () ++Backtrace stopped: previous frame inner to this frame (corrupt stack?) ++(gdb) ++``` ++ ++## Updates of jit-reader ++ ++When updating jit-reader you first need to update this repository ++and push the new version here. Then you need to run ++`./otp_build update_gdb_tools` in the Erlang/OTP repo for ++it to use the correct commit. +diff --git a/erts/etc/unix/gdb-tools/jit-reader.c b/erts/etc/unix/gdb-tools/jit-reader.c +new file mode 100644 +index 0000000000..3c39c5540d +--- /dev/null ++++ b/erts/etc/unix/gdb-tools/jit-reader.c +@@ -0,0 +1,386 @@ ++#include ++ ++#include ++#include ++#include ++#include ++ ++/* Useful links ++ * - https://pwparchive.wordpress.com/2011/11/20/new-jit-interface-for-gdb/ ++ * - https://sourceware.org/gdb/current/onlinedocs/gdb/Custom-Debug-Info.html ++ * - https://github.com/tetzank/asmjit-utilities ++ * - https://github.com/bminor/binutils-gdb/blob/master/gdb/testsuite/gdb.base/jitreader.c ++ */ ++ ++GDB_DECLARE_GPL_COMPATIBLE_READER ++ ++#if 0 ++#define HARD_DEBUG ++static FILE *log = NULL; ++#define LOG(...) do { fprintf(log, ##__VA_ARGS__); fflush(log); } while(0) ++#else ++#define LOG(...) ++#endif ++ ++typedef enum { ++ X64_RBP = 6, /* Frame pointer iff native frames are enabled */ ++ X64_RSP = 7, /* Stack pointer when using native stack */ ++ X64_R12 = 12, /* Stack pointer when using non-native stack */ ++ X64_R13 = 13, /* Current process */ ++ X64_RIP = 16 ++} X64Register; ++ ++typedef enum { ++ /* Return address only */ ++ ERTS_FRAME_LAYOUT_RA, ++ /* Frame pointer, return address */ ++ ERTS_FRAME_LAYOUT_FP_RA ++} ErtsFrameLayout; ++ ++struct emulator_info { ++ /* 0 = regular, 1 = frame pointers */ ++ int frame_layout; ++ const void *normal_exit; ++}; ++ ++struct erlang_module_info { ++ uint64_t base_address; ++ uint32_t range_count; ++ uint32_t code_size; ++ /* Module name, including null terminator. */ ++ uint16_t name_length; ++ char name[]; ++ /* array of range_info structures */ ++}; ++ ++struct range_info { ++ uint32_t start_offset; ++ uint32_t end_offset; ++ uint32_t line_count; ++ /* Range name, including null terminator. */ ++ uint16_t name_length; ++ char name[]; ++ /* array of line_info structures */ ++}; ++ ++struct line_info { ++ uint32_t start_offset; ++ uint32_t line_number; ++ /* File name, including null terminator. */ ++ uint16_t file_length; ++ char file[]; ++}; ++ ++enum debug_info_header { ++ DEBUG_INFO_HEADER_EMULATOR = 0, ++ DEBUG_INFO_HEADER_MODULE = 1, ++}; ++ ++struct debug_info { ++ enum debug_info_header header; ++ union { ++ struct emulator_info emu; ++ struct erlang_module_info mod; ++ } payload; ++}; ++ ++typedef struct range { ++ GDB_CORE_ADDR start; ++ GDB_CORE_ADDR end; ++#ifdef HARD_DEBUG ++ char *name; ++#endif ++} range; ++ ++typedef struct priv { ++ range *ranges; ++ int num_ranges; ++ ErtsFrameLayout frame_layout; ++ const void *normal_exit; ++} priv; ++ ++static enum gdb_status read_module_info(struct gdb_reader_funcs *self, ++ struct gdb_symbol_callbacks *cb, ++ struct erlang_module_info *module_info) { ++ struct gdb_object *obj = cb->object_open(cb); ++ GDB_CORE_ADDR mod_start, mod_end; ++ char *symfile = (char*)module_info; ++ priv *priv = self->priv_data; ++ ++ symfile += sizeof(*module_info) + module_info->name_length; ++ ++ mod_start = module_info->base_address; ++ mod_end = mod_start + module_info->code_size; ++ ++ priv->ranges = realloc(priv->ranges, (priv->num_ranges + 1) * sizeof(range)); ++ priv->ranges[priv->num_ranges].start = mod_start; ++ priv->ranges[priv->num_ranges].end = mod_end; ++#ifdef HARD_DEBUG ++ priv->ranges[priv->num_ranges].name = strdup(module_info->name); ++#endif ++ priv->num_ranges += 1; ++ ++ LOG("Add module `%s` (0x%lx, 0x%lx)\r\n", ++ module_info->name, mod_start, mod_end); ++ ++ for (int range = 0; range < module_info->range_count; range++) { ++ struct range_info *range_info; ++ struct gdb_symtab *symtab; ++ GDB_CORE_ADDR begin, end; ++ ++ range_info = (struct range_info *)symfile; ++ symfile += sizeof(*range_info) + range_info->name_length; ++ ++ begin = mod_start + range_info->start_offset; ++ end = mod_start + range_info->end_offset; ++ ++ LOG("Add range `%s` (0x%lx, 0x%lx), %u lines\r\n", ++ range_info->name, ++ begin, end, ++ range_info->line_count); ++ ++ /* A bug in GDB < 9 forces us to open and close the symtab for each ++ * iteration. */ ++ symtab = cb->symtab_open(cb, obj, module_info->name); ++ cb->block_open(cb, symtab, NULL, begin, end, range_info->name); ++ cb->symtab_close(cb, symtab); ++ ++ for (int line = 0; line < range_info->line_count; line++) { ++ struct gdb_line_mapping line_mapping; ++ struct line_info *line_info; ++ ++ line_info = (struct line_info *)symfile; ++ symfile += sizeof(*line_info) + line_info->file_length; ++ ++ line_mapping.pc = mod_start + line_info->start_offset; ++ line_mapping.line = line_info->line_number; ++ ++ LOG("\t%s:%u\r\n", line_info->file, line_info->line_number); ++ ++ /* The symbol table must be opened and closed on every single line ++ * for file names to work properly, as there is no other way to ++ * tell GDB that a certain line belongs to a different file than ++ * the rest of the table. Sigh. */ ++ symtab = cb->symtab_open(cb, obj, line_info->file); ++ ++ cb->block_open(cb, symtab, NULL, line_mapping.pc, end, ++ range_info->name); ++ cb->line_mapping_add(cb, symtab, 1, &line_mapping); ++ cb->symtab_close(cb, symtab); ++ } ++ } ++ ++ cb->object_close(cb, obj); ++ ++ return GDB_SUCCESS; ++} ++ ++static enum gdb_status read_emulator_info(struct gdb_reader_funcs *self, ++ struct gdb_symbol_callbacks *cb, ++ struct emulator_info *emulator_info) { ++ priv *priv = self->priv_data; ++ ++ priv->frame_layout = emulator_info->frame_layout; ++ priv->normal_exit = emulator_info->normal_exit; ++ ++ LOG("initialize: frame layout = %i\r\n", priv->frame_layout); ++ ++ return GDB_SUCCESS; ++} ++ ++static enum gdb_status read_debug_info(struct gdb_reader_funcs *self, ++ struct gdb_symbol_callbacks *cb, ++ void *memory, long memory_sz) { ++ struct debug_info *debug_info = memory; ++ ++ (void)memory_sz; ++ ++ switch (debug_info->header) { ++ case DEBUG_INFO_HEADER_EMULATOR: ++ return read_emulator_info(self, cb, &debug_info->payload.emu); ++ case DEBUG_INFO_HEADER_MODULE: ++ return read_module_info(self, cb, &debug_info->payload.mod); ++ } ++ ++ return GDB_FAIL; ++} ++ ++static void regfree(struct gdb_reg_value *reg) { ++ free(reg); ++} ++ ++static struct range *get_range(priv *priv, GDB_CORE_ADDR rip) { ++ for (int i = 0; i < priv->num_ranges; i++) { ++ if (rip >= priv->ranges[i].start && rip < priv->ranges[i].end) { ++ return &priv->ranges[i]; ++ } ++ } ++ ++ return NULL; ++} ++ ++static enum gdb_status unwind(struct gdb_reader_funcs *self, ++ struct gdb_unwind_callbacks *cb) { ++ GDB_CORE_ADDR rbp, rsp, rip; ++ struct range *range; ++ priv *priv; ++ ++ rbp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RBP)->value; ++ rsp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RSP)->value; ++ rip = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RIP)->value; ++ ++ priv = self->priv_data; ++ range = get_range(priv, rip); ++ ++ /* Check that rip points to one of the addresses that we handle */ ++ if (range) { ++ struct gdb_reg_value *prev_rbp, *prev_rsp, *prev_rip; ++ ++ prev_rbp = malloc(sizeof(struct gdb_reg_value) + sizeof(char*)); ++ prev_rsp = malloc(sizeof(struct gdb_reg_value) + sizeof(char*)); ++ prev_rip = malloc(sizeof(struct gdb_reg_value) + sizeof(char*)); ++ ++ LOG("UNWIND match %s: rbp: 0x%lx rsp: 0x%lx rip: 0x%lx \r\n", ++ range->name, rbp, rsp, rip); ++ ++ prev_rbp->free = ®free; ++ prev_rbp->defined = 1; ++ prev_rbp->size = sizeof(char*); ++ prev_rsp->free = ®free; ++ prev_rsp->defined = 1; ++ prev_rsp->size = sizeof(char*); ++ prev_rip->free = ®free; ++ prev_rip->defined = 1; ++ prev_rip->size = sizeof(char*); ++ ++ if (priv->frame_layout == ERTS_FRAME_LAYOUT_FP_RA) { ++ /* Frame pointers are enabled, which means that rbp will point to ++ * where we stored the previous frames rbp. Also the previous ++ * frames address will be at rbp + 8 and the previous frames rsp ++ * will be rbp + 16. ++ * ++ * 0x00: <- prev_rsp ++ * 0x08: prev call addr ++ * 0x10: prev rbp <- curr rbp ++ * 0x18: current frame ++ * 0x20: <- curr rip */ ++ cb->target_read(rbp + 1 * sizeof(char*), &prev_rip->value, ++ sizeof(char*)); ++ cb->target_read(rbp + 0 * sizeof(char*), &prev_rbp->value, ++ sizeof(char*)); ++ *(GDB_CORE_ADDR*)prev_rsp->value = rbp + sizeof(char*[2]); ++ } else { ++ /* Normal frame layout, we need to scan the stack. */ ++ cb->target_read(rsp, &prev_rip->value, sizeof(char*)); ++ ++ for (rsp += sizeof(char*); ; rsp += sizeof(char*)) { ++ cb->target_read(rsp, &prev_rip->value, sizeof(char*)); ++ ++ LOG("rsp: 0x%lx rip: 0x%lx\r\n", ++ rsp, *(GDB_CORE_ADDR*)prev_rip->value); ++ ++ /* Check if it is a cp */ ++ if ((*(GDB_CORE_ADDR*)prev_rip->value & 0x3) == 0) { ++ break; ++ } ++ } ++ ++ *(GDB_CORE_ADDR*)prev_rsp->value = rsp; ++ *(GDB_CORE_ADDR*)prev_rbp->value = rsp - sizeof(char*); ++ } ++ ++ if (*(GDB_CORE_ADDR*)prev_rip->value == (uintptr_t)priv->normal_exit) { ++ LOG("Normal exit\r\n"); ++ *(GDB_CORE_ADDR*)prev_rsp->value = 0; ++ *(GDB_CORE_ADDR*)prev_rbp->value = 0; ++ } else { ++ LOG("UNWIND prev: rbp: 0x%lx rsp: 0x%lx rip: 0x%lx\r\n", ++ *(GDB_CORE_ADDR*)prev_rbp->value, ++ *(GDB_CORE_ADDR*)prev_rsp->value, ++ *(GDB_CORE_ADDR*)prev_rip->value); ++ } ++ ++ cb->reg_set(cb, X64_RIP, prev_rip); ++ cb->reg_set(cb, X64_RSP, prev_rsp); ++ cb->reg_set(cb, X64_RBP, prev_rbp); ++ ++ return GDB_SUCCESS; ++ } ++ ++ LOG("UNWIND no match: rbp: 0x%lx rsp: 0x%lx rip: 0x%lx\r\n", rbp, rsp, rip); ++ return GDB_FAIL; ++} ++ ++static struct gdb_frame_id get_frame_id(struct gdb_reader_funcs *self, ++ struct gdb_unwind_callbacks *cb){ ++ struct gdb_frame_id frame = {0, 0}; ++ GDB_CORE_ADDR rbp, rsp, rip; ++ struct range *range; ++ priv *priv; ++ ++ rbp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RBP)->value; ++ rsp = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RSP)->value; ++ rip = *(GDB_CORE_ADDR*)cb->reg_get(cb, X64_RIP)->value; ++ ++ priv = self->priv_data; ++ range = get_range(priv, rip); ++ ++ LOG("FRAME: rip: 0x%lx rsp: 0x%lx rbp: 0x%lx \r\n", rip, rsp, rbp); ++ ++ if (range) { ++ frame.code_address = rip; ++ ++ if (priv->frame_layout == ERTS_FRAME_LAYOUT_FP_RA) { ++ frame.stack_address = rbp + sizeof(char*); ++ } else { ++ GDB_CORE_ADDR prev_rip; ++ ++ for (rsp += sizeof(char*); ; rsp += sizeof(char*)) { ++ cb->target_read(rsp, &prev_rip, sizeof(char*)); ++ ++ LOG("rsp: 0x%lx rip: 0x%lx\r\n", rsp, prev_rip); ++ ++ /* Check if it is a cp */ ++ if ((prev_rip & 0x3) == 0) { ++ break; ++ } ++ } ++ ++ frame.stack_address = rsp; ++ } ++ } ++ ++ LOG("FRAME: code_address: 0x%lx stack_address: 0x%lx\r\n", ++ frame.code_address, frame.stack_address); ++ ++ return frame; ++} ++ ++static void destroy(struct gdb_reader_funcs *self){ ++ free(self); ++} ++ ++struct gdb_reader_funcs *gdb_init_reader(void){ ++ struct gdb_reader_funcs *funcs = malloc(sizeof(struct gdb_reader_funcs)); ++ priv *priv_data = malloc(sizeof(priv)); ++ ++ priv_data->num_ranges = 1; ++ priv_data->ranges = malloc(sizeof(range)); ++ priv_data->ranges[0].start = 0; ++ priv_data->ranges[0].end = 0; ++ ++ funcs->reader_version = GDB_READER_INTERFACE_VERSION; ++ funcs->priv_data = priv_data; ++ ++ funcs->read = read_debug_info; ++ funcs->unwind = unwind; ++ funcs->get_frame_id = get_frame_id; ++ funcs->destroy = destroy; ++ ++#ifdef HARD_DEBUG ++ log = fopen("/tmp/jit-reader.log","w+"); ++ if (!log) fprintf(stderr,"Could not open /tmp/jit-reader.log"); ++#endif ++ ++ return funcs; ++} +diff --git a/erts/etc/unix/gdb-tools/jit-reader.mk b/erts/etc/unix/gdb-tools/jit-reader.mk +new file mode 100644 +index 0000000000..8ef0bccec2 +--- /dev/null ++++ b/erts/etc/unix/gdb-tools/jit-reader.mk +@@ -0,0 +1,9 @@ ++EXTRA_LIBS = $(BINDIR)/jit-reader.so ++ ++jit-reader: $(EXTRA_LIBS) ++ ++$(OBJDIR)/jit-reader.o: $(GDB_TOOLS)/jit-reader.c $(GDB_TOOLS)/jit-reader.h ++ $(V_CC) $(DED_CFLAGS) -I$(ETC) -o $@ -c $< ++ ++$(BINDIR)/jit-reader.so: $(OBJDIR)/jit-reader.o ++ $(V_LD) $(DED_LDFLAGS) -o $@ $^ diff --git a/otp-0009-TEMPORARILY-disable-ECC-until-dust-settles.patch b/otp-0009-TEMPORARILY-disable-ECC-until-dust-settles.patch deleted file mode 100644 index 4dc7759..0000000 --- a/otp-0009-TEMPORARILY-disable-ECC-until-dust-settles.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Peter Lemenkov -Date: Thu, 24 Oct 2013 16:44:22 +0400 -Subject: [PATCH] TEMPORARILY disable ECC until dust settles - -Signed-off-by: Peter Lemenkov - -diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c -index 42fb172..eb99719 100644 ---- a/lib/crypto/c_src/crypto.c -+++ b/lib/crypto/c_src/crypto.c -@@ -74,13 +74,6 @@ - # define HAVE_DES_ede3_cfb_encrypt - #endif - --#if OPENSSL_VERSION_NUMBER >= 0x009080ffL \ -- && !defined(OPENSSL_NO_EC) \ -- && !defined(OPENSSL_NO_ECDH) \ -- && !defined(OPENSSL_NO_ECDSA) --# define HAVE_EC --#endif -- - #if defined(HAVE_EC) - #include - #include diff --git a/otp-0010-Fix-for-powerpc-architecture.patch b/otp-0010-Fix-for-powerpc-architecture.patch deleted file mode 100644 index 8eb1f35..0000000 --- a/otp-0010-Fix-for-powerpc-architecture.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Peter Lemenkov -Date: Mon, 28 Oct 2013 17:11:11 +0400 -Subject: [PATCH] Fix for powerpc architecture - -Taken from openSUSE: - -* https://build.opensuse.org/package/view_file/devel:languages:erlang:Factory/erlang/erlang-ppc.patch?expand=1 - -See also: - -* https://bugzilla.redhat.com/1023960 - -Signed-off-by: Peter Lemenkov - -diff --git a/erts/configure.in b/erts/configure.in -index 230f27a..9ad3671 100644 ---- a/erts/configure.in -+++ b/erts/configure.in -@@ -612,6 +612,7 @@ case $chk_arch_ in - x86_64) ARCH=amd64;; - amd64) ARCH=amd64;; - macppc) ARCH=ppc;; -+ powerpc) ARCH=ppc;; - ppc) ARCH=ppc;; - ppc64) ARCH=ppc64;; - "Power Macintosh") ARCH=ppc;; diff --git a/otp-0011-Add-systemd-option-to-empd.-Check-for-include-system.patch b/otp-0011-Add-systemd-option-to-empd.-Check-for-include-system.patch deleted file mode 100644 index bb13893..0000000 --- a/otp-0011-Add-systemd-option-to-empd.-Check-for-include-system.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: "Matwey V. Kornilov" -Date: Tue, 17 Dec 2013 18:16:56 +0400 -Subject: [PATCH] Add -systemd option to empd. Check for include - systemd/sd-daemon.h and wrap systemd code into ifdef-s. - - -diff --git a/erts/configure.in b/erts/configure.in -index 9ad3671..125e579 100644 ---- a/erts/configure.in -+++ b/erts/configure.in -@@ -1565,6 +1565,8 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_enaddr], [], [], - #endif - ]) - -+AC_CHECK_HEADERS(systemd/sd-daemon.h) -+ - dnl ---------------------------------------------------------------------- - dnl Check the availability for libdlpi - dnl ---------------------------------------------------------------------- -diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c -index 2d55b37..fc58882 100644 ---- a/erts/epmd/src/epmd.c -+++ b/erts/epmd/src/epmd.c -@@ -175,6 +175,9 @@ int main(int argc, char** argv) - g->nodes.reg = g->nodes.unreg = g->nodes.unreg_tail = NULL; - g->nodes.unreg_count = 0; - g->active_conn = 0; -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ g->is_systemd = 0; -+#endif - - for (i = 0; i < MAX_LISTEN_SOCKETS; i++) - g->listenfd[i] = -1; -@@ -248,8 +251,12 @@ int main(int argc, char** argv) - else - usage(g); - epmd_cleanup_exit(g,0); -- } -- else -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ } else if (strcmp(argv[0], "-systemd") == 0) { -+ g->is_systemd = 1; -+ argv++; argc--; -+#endif -+ } else - usage(g); - } - dbg_printf(g,1,"epmd running - daemon = %d",g->is_daemon); -@@ -454,6 +461,11 @@ static void usage(EpmdVars *g) - fprintf(stderr, " Forcibly unregisters a name with epmd\n"); - fprintf(stderr, " (only allowed if -relaxed_command_check was given when \n"); - fprintf(stderr, " epmd was started).\n"); -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ fprintf(stderr, " -systemd\n"); -+ fprintf(stderr, " Wait for socket from systemd. The option makes sense\n"); -+ fprintf(stderr, " when started from .socket unit.\n"); -+#endif - epmd_cleanup_exit(g,1); - } - -diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h -index 656dbd1..bf1ddd8 100644 ---- a/erts/epmd/src/epmd_int.h -+++ b/erts/epmd/src/epmd_int.h -@@ -321,6 +321,9 @@ typedef struct { - int listenfd[MAX_LISTEN_SOCKETS]; - char *addresses; - char **argv; -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ int is_systemd; -+#endif - } EpmdVars; - - void dbg_printf(EpmdVars*,int,const char*,...); diff --git a/otp-0012-Add-systemd-support-to-epmd.patch b/otp-0012-Add-systemd-support-to-epmd.patch deleted file mode 100644 index 3535601..0000000 --- a/otp-0012-Add-systemd-support-to-epmd.patch +++ /dev/null @@ -1,111 +0,0 @@ -From: "Matwey V. Kornilov" -Date: Tue, 17 Dec 2013 18:57:54 +0400 -Subject: [PATCH] Add systemd support to epmd - - -diff --git a/erts/configure.in b/erts/configure.in -index 125e579..d9bc1ec 100644 ---- a/erts/configure.in -+++ b/erts/configure.in -@@ -969,6 +969,8 @@ AC_CHECK_LIB(dl, dlopen) - AC_CHECK_LIB(inet, main) - AC_CHECK_LIB(util, openpty) - -+AC_CHECK_LIB(systemd-daemon, sd_listen_fds) -+ - dnl Try to find a thread library. - dnl - dnl ETHR_LIB_NAME, ETHR_LIBS, ETHR_X_LIBS, ETHR_THR_LIB_BASE and ETHR_DEFS -diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h -index bf1ddd8..363923e 100644 ---- a/erts/epmd/src/epmd_int.h -+++ b/erts/epmd/src/epmd_int.h -@@ -110,6 +110,10 @@ - - #include - -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+# include -+#endif -+ - /* ************************************************************************ */ - /* Replace some functions by others by making the function name a macro */ - -diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c -index 90df7cc..cb8ca96 100644 ---- a/erts/epmd/src/epmd_srv.c -+++ b/erts/epmd/src/epmd_srv.c -@@ -208,6 +208,39 @@ void run(EpmdVars *g) - node_init(g); - g->conn = conn_init(g); - -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ if (g->is_systemd) -+ { -+ int n; -+ -+ dbg_printf(g,2,"try to obtain sockets from systemd"); -+ -+ n = sd_listen_fds(0); -+ if (n < 0) -+ { -+ dbg_perror(g,"cannot obtain sockets from systemd"); -+ epmd_cleanup_exit(g,1); -+ } -+ else if (n == 0) -+ { -+ dbg_tty_printf(g,0,"systemd provides no sockets"); -+ epmd_cleanup_exit(g,1); -+ } -+ else if (n > MAX_LISTEN_SOCKETS) -+ { -+ dbg_tty_printf(g,0,"cannot listen on more than %d IP addresses", MAX_LISTEN_SOCKETS); -+ epmd_cleanup_exit(g,1); -+ } -+ num_sockets = n; -+ for (i = 0; i < num_sockets; i++) -+ { -+ g->listenfd[i] = listensock[i] = SD_LISTEN_FDS_START + i; -+ } -+ } -+ else -+ { -+#endif -+ - dbg_printf(g,2,"try to initiate listening port %d", g->port); - - if (g->addresses != NULL && /* String contains non-separator characters if: */ -@@ -272,6 +305,9 @@ void run(EpmdVars *g) - SET_ADDR(iserv_addr[0],EPMD_ADDR_ANY,sport); - num_sockets = 1; - } -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ } -+#endif - - #if !defined(__WIN32__) - /* We ignore the SIGPIPE signal that is raised when we call write -@@ -289,6 +325,13 @@ void run(EpmdVars *g) - FD_ZERO(&g->orig_read_mask); - g->select_fd_top = 0; - -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ if (g->is_systemd) -+ for (i = 0; i < num_sockets; i++) -+ select_fd_set(g, listensock[i]); -+ else -+ { -+#endif - for (i = 0; i < num_sockets; i++) - { - if ((listensock[i] = socket(FAMILY,SOCK_STREAM,0)) < 0) -@@ -351,6 +394,9 @@ void run(EpmdVars *g) - } - select_fd_set(g, listensock[i]); - } -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ } -+#endif - - dbg_tty_printf(g,2,"entering the main select() loop"); - diff --git a/otp-0013-Added-systemd-notify-support-to-EPMD.patch b/otp-0013-Added-systemd-notify-support-to-EPMD.patch deleted file mode 100644 index b41ce99..0000000 --- a/otp-0013-Added-systemd-notify-support-to-EPMD.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Peter Lemenkov -Date: Fri, 6 Jun 2014 15:29:49 +0400 -Subject: [PATCH] Added systemd notify support to EPMD - -Signed-off-by: Peter Lemenkov - -Conflicts: - erts/configure.in - -diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c -index fc58882..1757fa9 100644 ---- a/erts/epmd/src/epmd.c -+++ b/erts/epmd/src/epmd.c -@@ -589,9 +589,11 @@ void epmd_cleanup_exit(EpmdVars *g, int exitval) - for(i=0; g->argv[i] != NULL; ++i) - free(g->argv[i]); - free(g->argv); -- } -- -- -+ } -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+ sd_notifyf(0, "STATUS=Exited.\n" -+ "ERRNO=%i", exitval); -+#endif // HAVE_SYSTEMD_SD_DAEMON_H - exit(exitval); - } - -diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c -index cb8ca96..78524a6 100644 ---- a/erts/epmd/src/epmd_srv.c -+++ b/erts/epmd/src/epmd_srv.c -@@ -394,8 +394,11 @@ void run(EpmdVars *g) - } - select_fd_set(g, listensock[i]); - } --#ifdef HAVE_SYSTEMD_SD_DAEMON_H -+#ifdef HAVE_SYSTEMD_SD_DAEMON_H - } -+ sd_notifyf(0, "READY=1\n" -+ "STATUS=Processing port mapping requests...\n" -+ "MAINPID=%lu", (unsigned long) getpid()); - #endif - - dbg_tty_printf(g,2,"entering the main select() loop"); diff --git a/otp-0014-Install-internal-hrl-files-when-necessary.patch b/otp-0014-Install-internal-hrl-files-when-necessary.patch deleted file mode 100644 index 14cf312..0000000 --- a/otp-0014-Install-internal-hrl-files-when-necessary.patch +++ /dev/null @@ -1,97 +0,0 @@ -From: Peter Lemenkov -Date: Tue, 26 Aug 2014 13:53:49 +0400 -Subject: [PATCH] Install internal hrl files when necessary - -Sometimes we install *.erl files. Some these files include a private -*.hrl files, so in order to make these *.erl files usable we have to -install these private includes as well. - -Signed-off-by: Peter Lemenkov - -Conflicts: - lib/eunit/src/Makefile - lib/percept/src/Makefile - lib/test_server/src/Makefile - -diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile -index 5a6f298..b40ef23 100644 ---- a/lib/debugger/src/Makefile -+++ b/lib/debugger/src/Makefile -@@ -77,7 +77,7 @@ MODULES= \ - - HRL_FILES= - --INTERNAL_HRL_FILES= dbg_ieval.hrl -+INTERNAL_HRL_FILES= dbg_ieval.hrl dbg_wx_filedialog_win.hrl - - ERL_FILES= $(MODULES:%=%.erl) - -diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile -index a5e147d..8483e28 100644 ---- a/lib/eunit/src/Makefile -+++ b/lib/eunit/src/Makefile -@@ -46,6 +46,8 @@ SOURCES= \ - - INCLUDE_FILES = eunit.hrl - -+INTERNAL_HRL_FILES= eunit_internal.hrl -+ - PARSE_TRANSFORM_BIN = $(PARSE_TRANSFORM:%.erl=$(EBIN)/%.$(EMULATOR)) - - TARGET_FILES= $(SOURCES:%.erl=$(EBIN)/%.$(EMULATOR)) -@@ -117,6 +119,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" - $(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin" -+ $(INSTALL_DIR) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include" - -diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile -index dbda2a2..3e1792f 100644 ---- a/lib/kernel/src/Makefile -+++ b/lib/kernel/src/Makefile -@@ -122,6 +122,7 @@ HRL_FILES= ../include/file.hrl ../include/inet.hrl ../include/inet_sctp.hrl \ - ../include/net_address.hrl - - INTERNAL_HRL_FILES= application_master.hrl disk_log.hrl \ -+ erl_epmd.hrl hipe_ext_format.hrl \ - inet_dns.hrl inet_res.hrl \ - inet_boot.hrl inet_config.hrl inet_int.hrl \ - inet_dns_record_adts.hrl -diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile -index e501539..5902da3 100644 ---- a/lib/percept/src/Makefile -+++ b/lib/percept/src/Makefile -@@ -50,6 +50,8 @@ MODULES= \ - - #HRL_FILES= ../include/ - -+INTERNAL_HRL_FILES= egd.hrl percept.hrl -+ - ERL_FILES= $(MODULES:%=%.erl) - - TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET) -@@ -93,6 +95,8 @@ docs: - include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt -+ $(INSTALL_DIR) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" - # $(INSTALL_DIR) "$(RELSYSDIR)/include" - # $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" -diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile -index bcb1bc3..deb7caf 100644 ---- a/lib/test_server/src/Makefile -+++ b/lib/test_server/src/Makefile -@@ -123,7 +123,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk - - release_spec: opt - $(INSTALL_DIR) "$(RELSYSDIR)/src" -- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src" -+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src" - $(INSTALL_DIR) "$(RELSYSDIR)/include" - $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include" - $(INSTALL_DIR) "$(RELSYSDIR)/ebin" diff --git a/otp-0015-Expose-NIF-version.patch b/otp-0015-Expose-NIF-version.patch deleted file mode 100644 index 3ae0096..0000000 --- a/otp-0015-Expose-NIF-version.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Peter Lemenkov -Date: Sun, 2 Nov 2014 19:49:55 +0300 -Subject: [PATCH] Expose NIF version - -This patch allows checking for NIF API version in a way similar to -driver version. E.g. by calling erlang:system_info(nif_version). - -Signed-off-by: Peter Lemenkov - -Conflicts: - erts/emulator/test/driver_SUITE.erl - -diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml -index e3ef48a..b9d7230 100644 ---- a/erts/doc/src/erlang.xml -+++ b/erts/doc/src/erlang.xml -@@ -5903,6 +5903,11 @@ ok - erlang:system_info(multi_scheduling), and - erlang:system_info(schedulers).

- -+ nif_version -+ -+

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

-+
- otp_release - -

Returns a string containing the OTP release number.

-diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c -index d7f1e2d..7a7f23e 100755 ---- 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" -@@ -2428,6 +2429,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/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl -index 2919265..c0f14ad 100644 ---- a/erts/preloaded/src/erlang.erl -+++ b/erts/preloaded/src/erlang.erl -@@ -2124,6 +2124,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 1d4b878..64f1b82 100644 ---- a/lib/runtime_tools/src/system_information.erl -+++ b/lib/runtime_tools/src/system_information.erl -@@ -344,6 +344,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 0900ead..9ded5a1 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-0016-Split-off-webtool-dependency-from-tools.patch b/otp-0016-Split-off-webtool-dependency-from-tools.patch deleted file mode 100644 index f2de8ac..0000000 --- a/otp-0016-Split-off-webtool-dependency-from-tools.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Peter Lemenkov -Date: Sat, 8 Nov 2014 22:54:57 +0300 -Subject: [PATCH] Split off webtool dependency from tools - -Signed-off-by: Peter Lemenkov - -diff --git a/lib/tools/src/cover_web.erl b/lib/tools/src/cover_web.erl -index 69f2f3b..9085300 100644 ---- a/lib/tools/src/cover_web.erl -+++ b/lib/tools/src/cover_web.erl -@@ -50,14 +50,25 @@ - %%%---------------------------------------------------------------------- - %% Start webtool and webcover from erlang shell - start() -> -- webtool:start(), -- webtool:start_tools([],"app=webcover"), -+ try -+ % Disable automatic dependency picking up -+ erlang:apply(webtool, start, []), -+ erlang:apply(webtool, start_tools, [[],"app=webcover"]) -+ catch -+ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n") -+ end, - ok. - - %% Stop webtool and webcover from erlang shell - stop() -> -- webtool:stop_tools([],"app=webcover"), -- webtool:stop(). -+ try -+ % Disable automatic dependency picking up -+ erlang:apply(webtool, stop_tools, [[],"app=webcover"]), -+ erlang:apply(webtool, stop, []) -+ catch -+ error:undef -> error_logger:error_msg("No erlang-webtool found.~nPlease install erlang-webtool package first.~n") -+ end, -+ ok. - - - diff --git a/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch b/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch deleted file mode 100644 index 7b7ad77..0000000 --- a/otp-0017-lib-inets-src-ftp-ftp.erl-Check-the-filenames-userna.patch +++ /dev/null @@ -1,430 +0,0 @@ -From: Sergei Golovan -Date: Sun, 9 Feb 2014 23:06:25 +0400 -Subject: [PATCH] lib/inets/src/ftp/ftp.erl: Check the filenames, usernames, - passwords etc. for and in them and return error if these - offending chars are found. See - http://erlang.org/pipermail/erlang-bugs/2014-January/003998.html for - details. lib/inets/test/ftp_suite_lib.erl: Added checks for in file - and directory names. - - -diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl -index 520db1b..5674599 100644 ---- a/lib/inets/src/ftp/ftp.erl -+++ b/lib/inets/src/ftp/ftp.erl -@@ -192,7 +192,12 @@ do_open(Pid, OpenOptions, TLSOpts) -> - 'ok' | {'error', Reason :: 'euser' | common_reason()}. - - user(Pid, User, Pass) -> -- call(Pid, {user, User, Pass}, atom). -+ case {is_name_sane(User), is_name_sane(Pass)} of -+ {true, true} -> -+ call(Pid, {user, User, Pass}, atom); -+ _ -> -+ {error, euser} -+ end. - - -spec user(Pid :: pid(), - User :: string(), -@@ -201,7 +206,12 @@ user(Pid, User, Pass) -> - 'ok' | {'error', Reason :: 'euser' | common_reason()}. - - user(Pid, User, Pass, Acc) -> -- call(Pid, {user, User, Pass, Acc}, atom). -+ case {is_name_sane(User), is_name_sane(Pass), is_name_sane(Acc)} of -+ {true, true, true} -> -+ call(Pid, {user, User, Pass, Acc}, atom); -+ _ -> -+ {error, euser} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -216,7 +226,12 @@ user(Pid, User, Pass, Acc) -> - 'ok' | {'error', Reason :: 'eacct' | common_reason()}. - - account(Pid, Acc) -> -- call(Pid, {account, Acc}, atom). -+ case is_name_sane(Acc) of -+ true -> -+ call(Pid, {account, Acc}, atom); -+ _ -> -+ {error, eacct} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -262,7 +277,12 @@ lpwd(Pid) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - cd(Pid, Dir) -> -- call(Pid, {cd, Dir}, atom). -+ case is_name_sane(Dir) of -+ true -> -+ call(Pid, {cd, Dir}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -305,7 +325,12 @@ ls(Pid) -> - {'error', Reason :: restriction_reason() | common_reason()}. - - ls(Pid, Dir) -> -- call(Pid, {dir, long, Dir}, string). -+ case is_name_sane(Dir) of -+ true -> -+ call(Pid, {dir, long, Dir}, string); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -333,7 +358,12 @@ nlist(Pid) -> - {'error', Reason :: restriction_reason() | common_reason()}. - - nlist(Pid, Dir) -> -- call(Pid, {dir, short, Dir}, string). -+ case is_name_sane(Dir) of -+ true -> -+ call(Pid, {dir, short, Dir}, string); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -349,7 +379,12 @@ nlist(Pid, Dir) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - rename(Pid, Old, New) -> -- call(Pid, {rename, Old, New}, string). -+ case {is_name_sane(Old), is_name_sane(New)} of -+ {true, true} -> -+ call(Pid, {rename, Old, New}, string); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -365,7 +400,12 @@ rename(Pid, Old, New) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - delete(Pid, File) -> -- call(Pid, {delete, File}, string). -+ case is_name_sane(File) of -+ true -> -+ call(Pid, {delete, File}, string); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -380,7 +420,12 @@ delete(Pid, File) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - mkdir(Pid, Dir) -> -- call(Pid, {mkdir, Dir}, atom). -+ case is_name_sane(Dir) of -+ true -> -+ call(Pid, {mkdir, Dir}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -395,7 +440,12 @@ mkdir(Pid, Dir) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - rmdir(Pid, Dir) -> -- call(Pid, {rmdir, Dir}, atom). -+ case is_name_sane(Dir) of -+ true -> -+ call(Pid, {rmdir, Dir}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -437,7 +487,12 @@ recv(Pid, RemotFileName) -> - 'ok' | {'error', Reason :: term()}. - - recv(Pid, RemotFileName, LocalFileName) -> -- call(Pid, {recv, RemotFileName, LocalFileName}, atom). -+ case is_name_sane(RemotFileName) of -+ true -> -+ call(Pid, {recv, RemotFileName, LocalFileName}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -456,7 +511,12 @@ recv(Pid, RemotFileName, LocalFileName) -> - {'error', Reason :: restriction_reason() | common_reason()}. - - recv_bin(Pid, RemoteFile) -> -- call(Pid, {recv_bin, RemoteFile}, bin). -+ case is_name_sane(RemoteFile) of -+ true -> -+ call(Pid, {recv_bin, RemoteFile}, bin); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -473,7 +533,12 @@ recv_bin(Pid, RemoteFile) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - recv_chunk_start(Pid, RemoteFile) -> -- call(Pid, {recv_chunk_start, RemoteFile}, atom). -+ case is_name_sane(RemoteFile) of -+ true -> -+ call(Pid, {recv_chunk_start, RemoteFile}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -521,7 +586,12 @@ send(Pid, LocalFileName) -> - shortage_reason()}. - - send(Pid, LocalFileName, RemotFileName) -> -- call(Pid, {send, LocalFileName, RemotFileName}, atom). -+ case is_name_sane(RemotFileName) of -+ true -> -+ call(Pid, {send, LocalFileName, RemotFileName}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -541,7 +611,12 @@ send(Pid, LocalFileName, RemotFileName) -> - shortage_reason()}. - - send_bin(Pid, Bin, RemoteFile) when is_binary(Bin) -> -- call(Pid, {send_bin, Bin, RemoteFile}, atom); -+ case is_name_sane(RemoteFile) of -+ true -> -+ call(Pid, {send_bin, Bin, RemoteFile}, atom); -+ _ -> -+ {error, efnamena} -+ end; - send_bin(_Pid, _Bin, _RemoteFile) -> - {error, enotbinary}. - -@@ -559,7 +634,12 @@ send_bin(_Pid, _Bin, _RemoteFile) -> - 'ok' | {'error', Reason :: restriction_reason() | common_reason()}. - - send_chunk_start(Pid, RemoteFile) -> -- call(Pid, {send_chunk_start, RemoteFile}, atom). -+ case is_name_sane(RemoteFile) of -+ true -> -+ call(Pid, {send_chunk_start, RemoteFile}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -575,7 +655,12 @@ send_chunk_start(Pid, RemoteFile) -> - 'ok' | {'error', Reason :: term()}. - - append_chunk_start(Pid, RemoteFile) -> -- call(Pid, {append_chunk_start, RemoteFile}, atom). -+ case is_name_sane(RemoteFile) of -+ true -> -+ call(Pid, {append_chunk_start, RemoteFile}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -683,7 +768,12 @@ append(Pid, LocalFileName) -> - 'ok' | {'error', Reason :: term()}. - - append(Pid, LocalFileName, RemotFileName) -> -- call(Pid, {append, LocalFileName, RemotFileName}, atom). -+ case is_name_sane(RemotFileName) of -+ true -> -+ call(Pid, {append, LocalFileName, RemotFileName}, atom); -+ _ -> -+ {error, efnamena} -+ end. - - - %%-------------------------------------------------------------------------- -@@ -705,7 +795,12 @@ append(Pid, LocalFileName, RemotFileName) -> - shortage_reason()}. - - append_bin(Pid, Bin, RemoteFile) when is_binary(Bin) -> -- call(Pid, {append_bin, Bin, RemoteFile}, atom); -+ case is_name_sane(RemoteFile) of -+ true -> -+ call(Pid, {append_bin, Bin, RemoteFile}, atom); -+ _ -> -+ {error, efnamena} -+ end; - append_bin(_Pid, _Bin, _RemoteFile) -> - {error, enotbinary}. - -@@ -2302,6 +2397,15 @@ send_bin(State, Bin) -> - mk_cmd(Fmt, Args) -> - [io_lib:format(Fmt, Args)| [?CR, ?LF]]. % Deep list ok. - -+is_name_sane([]) -> -+ true; -+is_name_sane([?CR| _]) -> -+ false; -+is_name_sane([?LF| _]) -> -+ false; -+is_name_sane([_| Rest]) -> -+ is_name_sane(Rest). -+ - pwd_result(Lines) -> - {_, [?DOUBLE_QUOTE | Rest]} = - lists:splitwith(fun(?DOUBLE_QUOTE) -> false; (_) -> true end, Lines), -diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl -index 35f21cc..daee1bd 100644 ---- a/lib/inets/test/ftp_suite_lib.erl -+++ b/lib/inets/test/ftp_suite_lib.erl -@@ -1266,6 +1266,8 @@ read_log_6035([]) -> - %%-------------------------------------------------------------------- - do_user(Pid) -> - {error, euser} = ftp:user(Pid, ?BAD_USER, ?FTP_PASS), -+ {error, euser} = ftp:user(Pid, ?FTP_USER++"\r\nPASS "++?FTP_PASS, ?FTP_PASS), -+ {error, euser} = ftp:user(Pid, ?FTP_USER, ?FTP_PASS++"\r\nCWD ."), - ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS), - ok. - -@@ -1278,6 +1280,7 @@ do_pwd(Pid) -> - do_cd(Pid) -> - ok = ftp:cd(Pid, "/pub"), - {error, epath} = ftp:cd(Pid, ?BAD_DIR), -+ {error, efnamena} = ftp:cd(Pid, "/pub\r\nCWD ."), - ok. - - do_lcd(Pid, Dir) -> -@@ -1294,11 +1297,14 @@ do_ls(Pid) -> - %% directory, but can also be a filename or a group - %% of files (including wildcards). - {ok, _} = ftp:ls(Pid, "incom*"), -+ %% but \r\n can't be in the wildcard -+ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."), - ok. - - do_nlist(Pid, WildcardSupport) -> - {ok, _} = ftp:nlist(Pid), - {ok, _} = ftp:nlist(Pid, "incoming"), -+ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."), - %% neither nlist nor ls operates on a directory - %% they operate on a pathname, which *can* be a - %% directory, but can also be a filename or a group -@@ -1324,6 +1330,8 @@ do_rename(Pid, Config) -> - ftp:delete(Pid, NewLFile), % reset - ok = ftp:send(Pid, LFile), - {error, epath} = ftp:rename(Pid, NewLFile, LFile), -+ {error, efnamena} = ftp:rename(Pid, NewLFile++"\r\nRNTO "++LFile++"\r\nRNFR "++NewLFile, LFile), -+ {error, efnamena} = ftp:rename(Pid, NewLFile, LFile++"\r\nCWD ."), - ok = ftp:rename(Pid, LFile, NewLFile), - ftp:delete(Pid, LFile), % cleanup - ftp:delete(Pid, NewLFile), % cleanup -@@ -1338,6 +1346,7 @@ do_delete(Pid, Config) -> - ok = ftp:cd(Pid, "incoming"), - ok = ftp:lcd(Pid, PrivDir), - ftp:delete(Pid,LFile), % reset -+ {error, efnamena} = ftp:delete(Pid,LFile++"\r\nCWD ."), - ok = ftp:send(Pid, LFile), - ok = ftp:delete(Pid,LFile), - ok. -@@ -1348,6 +1357,8 @@ do_mkdir(Pid) -> - integer_to_list(B) ++ "_" ++ integer_to_list(C), - ok = ftp:cd(Pid, "incoming"), - {ok, CurrDir} = ftp:pwd(Pid), -+ {error, efnamena} = ftp:mkdir(Pid, NewDir++"\r\nCWD ."), -+ {error, efnamena} = ftp:rmdir(Pid, NewDir++"\r\nCWD ."), - ok = ftp:mkdir(Pid, NewDir), - ok = ftp:cd(Pid, NewDir), - ok = ftp:cd(Pid, CurrDir), -@@ -1363,6 +1374,7 @@ do_send(Pid, Config) -> - ok = file:write_file(AbsLFile, list_to_binary(Contents)), - ok = ftp:cd(Pid, "incoming"), - ok = ftp:lcd(Pid, PrivDir), -+ {error, efnamena} = ftp:send(Pid, LFile, RFile++"1\r\nCWD ."), - ok = ftp:send(Pid, LFile, RFile), - {ok, RFilesString} = ftp:nlist(Pid), - RFiles = split(RFilesString), -@@ -1392,6 +1404,7 @@ do_append(Pid, Config) -> - ftp:delete(Pid, RFile), - ftp:delete(Pid, LFile), - -+ {error, efnamena} = ftp:append(Pid, LFile, RFile++"1\r\nCWD ."), - ok = ftp:append(Pid, LFile, RFile), - ok = ftp:append(Pid, LFile, RFile), - ok = ftp:append(Pid, LFile), -@@ -1413,6 +1426,7 @@ do_send_bin(Pid, Config) -> - Bin = list_to_binary(Contents), - ok = ftp:cd(Pid, "incoming"), - {error, enotbinary} = ftp:send_bin(Pid, Contents, File), -+ {error, efnamena} = ftp:send_bin(Pid, Bin, File++"1\r\nCWD ."), - ok = ftp:send_bin(Pid, Bin, File), - {ok, RFilesString} = ftp:nlist(Pid), - RFiles = split(RFilesString), -@@ -1426,6 +1440,7 @@ do_append_bin(Pid, Config) -> - Bin = list_to_binary(Contents), - ok = ftp:cd(Pid, "incoming"), - {error, enotbinary} = ftp:append_bin(Pid, Contents, File), -+ {error, efnamena} = ftp:append_bin(Pid, Bin, File++"1\r\nCWD ."), - ok = ftp:append_bin(Pid, Bin, File), - ok = ftp:append_bin(Pid, Bin, File), - %% Control the contents of the file -@@ -1438,6 +1453,7 @@ do_send_chunk(Pid, Config) -> - Contents = "ftp_SUITE test ...", - Bin = list_to_binary(Contents), - ok = ftp:cd(Pid, "incoming"), -+ {error, efnamena} = ftp:send_chunk_start(Pid, File++"1\r\nCWD ."), - ok = ftp:send_chunk_start(Pid, File), - {error, echunk} = ftp:cd(Pid, "incoming"), - {error, enotbinary} = ftp:send_chunk(Pid, Contents), -@@ -1454,6 +1470,7 @@ do_append_chunk(Pid, Config) -> - File = ?config(file, Config), - Contents = ["ER","LE","RL"], - ok = ftp:cd(Pid, "incoming"), -+ {error, efnamena} = ftp:append_chunk_start(Pid, File++"1\r\nCWD ."), - ok = ftp:append_chunk_start(Pid, File), - {error, enotbinary} = ftp:append_chunk(Pid, lists:nth(1,Contents)), - ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(1,Contents))), -@@ -1480,6 +1497,7 @@ do_recv(Pid, Config) -> - ok = file:delete(AbsFile), % cleanup - test_server:sleep(100), - ok = ftp:lcd(Pid, PrivDir), -+ {error, efnamena} = ftp:recv(Pid, File++"\r\nCWD ."), - ok = ftp:recv(Pid, File), - {ok, Files} = file:list_dir(PrivDir), - true = lists:member(File, Files), -@@ -1495,6 +1513,7 @@ do_recv_bin(Pid, Config) -> - ok = ftp:cd(Pid, "incoming"), - ok = ftp:send_bin(Pid, Bin1, File), - test_server:sleep(100), -+ {error, efnamena} = ftp:recv_bin(Pid, File++"\r\nCWD ."), - {ok, Bin2} = ftp:recv_bin(Pid, File), - ok = ftp:delete(Pid, File), % cleanup - Contents2 = binary_to_list(Bin2), -@@ -1520,6 +1539,7 @@ do_recv_chunk(Pid, Config) -> - ok = ftp:send_bin(Pid, Bin1, File), - test_server:sleep(100), - {error, "ftp:recv_chunk_start/2 not called"} = recv_chunk(Pid, <<>>), -+ {error, efnamena} = ftp:recv_chunk_start(Pid, File++"\r\nCWD ."), - ok = ftp:recv_chunk_start(Pid, File), - {ok, Contents2} = recv_chunk(Pid, <<>>), - ok = ftp:delete(Pid, File), % cleanup diff --git a/otp-0018-Introduce-os-getenv-2.patch b/otp-0018-Introduce-os-getenv-2.patch deleted file mode 100644 index 7ee1429..0000000 --- a/otp-0018-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 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 deleted file mode 100644 index 359c011..0000000 --- a/otp-0019-Patch-removes-support-for-SSLv3-protocol-because-it-.patch +++ /dev/null @@ -1,99 +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 1d74faf..912acc2 100644 ---- a/lib/ssl/doc/src/ssl.xml -+++ b/lib/ssl/doc/src/ssl.xml -@@ -123,7 +123,7 @@ - -

sslsocket() - opaque to the user.

- --

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

-+

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

- -

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

- -diff --git a/lib/ssl/doc/src/ssl_app.xml b/lib/ssl/doc/src/ssl_app.xml -index 0ee5b23..c65f8a3 100644 ---- a/lib/ssl/doc/src/ssl_app.xml -+++ b/lib/ssl/doc/src/ssl_app.xml -@@ -47,10 +47,10 @@ -

-

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

--

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

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

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

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

-+

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

-
- - ]]> -diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl -index 0186f9f..6f84830 100644 ---- a/lib/ssl/src/ssl_internal.hrl -+++ b/lib/ssl/src/ssl_internal.hrl -@@ -67,8 +67,8 @@ - -define(TRUE, 0). - -define(FALSE, 1). - ---define(ALL_SUPPORTED_VERSIONS, ['tlsv1.2', 'tlsv1.1', tlsv1, sslv3]). ---define(MIN_SUPPORTED_VERSIONS, ['tlsv1.1', tlsv1, sslv3]). -+-define(ALL_SUPPORTED_VERSIONS, ['tlsv1.2', 'tlsv1.1', tlsv1]). -+-define(MIN_SUPPORTED_VERSIONS, ['tlsv1.1', tlsv1]). - -define(ALL_DATAGRAM_SUPPORTED_VERSIONS, ['dtlsv1.2', dtlsv1]). - -define(MIN_DATAGRAM_SUPPORTED_VERSIONS, ['dtlsv1.2', dtlsv1]). - -diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl -index c17fa53..f4be9be 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 8810755..3c5c7e9 100644 ---- a/lib/ssl/src/tls_record.erl -+++ b/lib/ssl/src/tls_record.erl -@@ -269,13 +269,19 @@ supported_protocol_versions([_|_] = Vsns) -> - %% - %%-------------------------------------------------------------------- - 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. - - is_acceptable_version({N,_} = Version, Versions) -- when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION -> -+ when N > ?LOWEST_MAJOR_SUPPORTED_VERSION -> -+ lists:member(Version, Versions); -+is_acceptable_version({N,M} = Version, Versions) -+ when N == ?LOWEST_MAJOR_SUPPORTED_VERSION andalso M >= ?LOWEST_MINOR_SUPPORTED_VERSION -> - lists:member(Version, Versions); - is_acceptable_version(_,_) -> - false. diff --git a/otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch b/otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch deleted file mode 100644 index 18645fb..0000000 --- a/otp-0020-R16B03-1-backport-of-TLS-1.0-padding-check.patch +++ /dev/null @@ -1,566 +0,0 @@ -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 - -diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml -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()) -> -

-
- -+ {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

-+ -+
-+ - -- -+ - -- --
-+ -+
- SSL OPTION DESCRIPTIONS - CLIENT SIDE - -

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 6f84830..8c12141 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 3c5c7e9..dd99d10 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>>}. -+ 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 deleted file mode 100644 index 6849686..0000000 --- a/otp-0021-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 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); diff --git a/otp-0022-kernel-inet6_tcp_dist-reuse-inet_tcp_dist-code.patch b/otp-0022-kernel-inet6_tcp_dist-reuse-inet_tcp_dist-code.patch deleted file mode 100644 index 581f39d..0000000 --- a/otp-0022-kernel-inet6_tcp_dist-reuse-inet_tcp_dist-code.patch +++ /dev/null @@ -1,891 +0,0 @@ -From: Danil Zagoskin -Date: Sat, 2 May 2015 00:40:53 +0300 -Subject: [PATCH] kernel: inet6_tcp_dist: reuse inet_tcp_dist code - -inet6_tcp_dist module is an old copy of inet_tcp_dist with changed -address family. -New features (such as listening port range, interface and generic -options) are implemented in inet_tcp_dist only, inet6_tcp_dist looks -abandoned (it does not even have tests). -This patch makes inet_tcp_dist internals work with abstract driver, -and inet6_tcp_dist becomes just a thin wrapper for it. - -diff --git a/lib/kernel/src/inet6_tcp.erl b/lib/kernel/src/inet6_tcp.erl -index c714b2b..b31f05b 100644 ---- a/lib/kernel/src/inet6_tcp.erl -+++ b/lib/kernel/src/inet6_tcp.erl -@@ -24,10 +24,29 @@ - -export([controlling_process/2]). - -export([fdopen/2]). - -+-export([family/0, mask/2, parse_address/1]). - -export([getserv/1, getaddr/1, getaddr/2, getaddrs/1, getaddrs/2]). - - -include("inet_int.hrl"). - -+%% my address family -+family() -> inet6. -+ -+%% Apply netmask on address -+mask({M1,M2,M3,M4,M5,M6,M7,M8}, {IP1,IP2,IP3,IP4,IP5,IP6,IP7,IP8}) -> -+ {M1 band IP1, -+ M2 band IP2, -+ M3 band IP3, -+ M4 band IP4, -+ M5 band IP5, -+ M6 band IP6, -+ M7 band IP7, -+ M8 band IP8 }. -+ -+%% Parse address string -+parse_address(Host) -> -+ inet_parse:ipv6strict_address(Host). -+ - %% inet_tcp port lookup - getserv(Port) when is_integer(Port) -> {ok, Port}; - getserv(Name) when is_atom(Name) -> inet:getservbyname(Name,tcp). -diff --git a/lib/kernel/src/inet6_tcp_dist.erl b/lib/kernel/src/inet6_tcp_dist.erl -index 2cb0e10..1488bf4 100644 ---- a/lib/kernel/src/inet6_tcp_dist.erl -+++ b/lib/kernel/src/inet6_tcp_dist.erl -@@ -23,28 +23,6 @@ - -export([listen/1, accept/1, accept_connection/5, - setup/5, close/1, select/1, is_node_name/1]). - --%% internal exports -- ---export([accept_loop/2,do_accept/6,do_setup/6, getstat/1,tick/1]). -- ---import(error_logger,[error_msg/2]). -- ---include("net_address.hrl"). -- -- -- ---define(to_port(Socket, Data, Opts), -- case inet6_tcp:send(Socket, Data, Opts) of -- {error, closed} -> -- self() ! {tcp_closed, Socket}, -- {error, closed}; -- R -> -- R -- end). -- -- ---include("dist.hrl"). ---include("dist_util.hrl"). - - %% ------------------------------------------------------------ - %% Select this protocol based on node name -@@ -52,14 +30,7 @@ - %% ------------------------------------------------------------ - - select(Node) -> -- case split_node(atom_to_list(Node), $@, []) of -- [_, Host] -> -- case inet:getaddr(Host,inet6) of -- {ok,_} -> true; -- _ -> false -- end; -- _ -> false -- end. -+ inet_tcp_dist:gen_select(inet6_tcp, Node). - - %% ------------------------------------------------------------ - %% Create the listen socket, i.e. the port that this erlang -@@ -67,59 +38,14 @@ select(Node) -> - %% ------------------------------------------------------------ - - listen(Name) -> -- case inet6_tcp:listen(0, [{active, false}, {packet,2}]) of -- {ok, Socket} -> -- TcpAddress = get_tcp_address(Socket), -- {_,Port} = TcpAddress#net_address.address, -- case erl_epmd:register_node(Name, Port) of -- {ok, Creation} -> -- {ok, {Socket, TcpAddress, Creation}}; -- Error -> -- Error -- end; -- Error -> -- Error -- end. -+ inet_tcp_dist:gen_listen(inet6_tcp, Name). - - %% ------------------------------------------------------------ - %% Accepts new connection attempts from other Erlang nodes. - %% ------------------------------------------------------------ - - accept(Listen) -> -- spawn_opt(?MODULE, accept_loop, [self(), Listen], [link, {priority, max}]). -- --accept_loop(Kernel, Listen) -> -- case inet6_tcp:accept(Listen) of -- {ok, Socket} -> -- Kernel ! {accept,self(),Socket,inet6,tcp}, -- controller(Kernel, Socket), -- accept_loop(Kernel, Listen); -- Error -> -- exit(Error) -- end. -- --controller(Kernel, Socket) -> -- receive -- {Kernel, controller, Pid} -> -- flush_controller(Pid, Socket), -- inet6_tcp:controlling_process(Socket, Pid), -- flush_controller(Pid, Socket), -- Pid ! {self(), controller}; -- {Kernel, unsupported_protocol} -> -- exit(unsupported_protocol) -- end. -- --flush_controller(Pid, Socket) -> -- receive -- {tcp, Socket, Data} -> -- Pid ! {tcp, Socket, Data}, -- flush_controller(Pid, Socket); -- {tcp_closed, Socket} -> -- Pid ! {tcp_closed, Socket}, -- flush_controller(Pid, Socket) -- after 0 -> -- ok -- end. -+ inet_tcp_dist:gen_accept(inet6_tcp, Listen). - - %% ------------------------------------------------------------ - %% Accepts a new connection attempt from another Erlang node. -@@ -127,85 +53,7 @@ flush_controller(Pid, Socket) -> - %% ------------------------------------------------------------ - - accept_connection(AcceptPid, Socket, MyNode, Allowed, SetupTime) -> -- spawn_opt(?MODULE, do_accept, -- [self(), AcceptPid, Socket, MyNode, Allowed, SetupTime], -- [link, {priority, max}]). -- --do_accept(Kernel, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> -- receive -- {AcceptPid, controller} -> -- Timer = dist_util:start_timer(SetupTime), -- case check_ip(Socket) of -- true -> -- HSData = #hs_data{ -- kernel_pid = Kernel, -- this_node = MyNode, -- socket = Socket, -- timer = Timer, -- this_flags = 0, -- allowed = Allowed, -- f_send = fun(S,D) -> inet6_tcp:send(S,D) end, -- f_recv = fun(S,N,T) -> inet6_tcp:recv(S,N,T) -- end, -- f_setopts_pre_nodeup = -- fun(S) -> -- inet:setopts(S, -- [{active, false}, -- {packet, 4}, -- nodelay()]) -- end, -- f_setopts_post_nodeup = -- fun(S) -> -- inet:setopts(S, -- [{active, true}, -- {deliver, port}, -- {packet, 4}, -- nodelay()]) -- end, -- f_getll = fun(S) -> -- inet:getll(S) -- end, -- f_address = fun get_remote_id/2, -- mf_tick = fun ?MODULE:tick/1, -- mf_getstat = fun ?MODULE:getstat/1 -- }, -- dist_util:handshake_other_started(HSData); -- {false,IP} -> -- error_msg("** Connection attempt from " -- "disallowed IP ~w ** ~n", [IP]), -- ?shutdown(no_node) -- end -- end. -- -- --%% we may not always want the nodelay behaviour --%% for performance reasons -- --nodelay() -> -- case application:get_env(kernel, dist_nodelay) of -- undefined -> -- {nodelay, true}; -- {ok, true} -> -- {nodelay, true}; -- {ok, false} -> -- {nodelay, false}; -- _ -> -- {nodelay, true} -- end. -- -- --%% ------------------------------------------------------------ --%% Get remote information about a Socket. --%% ------------------------------------------------------------ -- --get_remote_id(Socket, Node) -> -- {ok, Address} = inet:peername(Socket), -- [_, Host] = split_node(atom_to_list(Node), $@, []), -- #net_address { -- address = Address, -- host = Host, -- protocol = tcp, -- family = inet6 }. -+ inet_tcp_dist:gen_accept_connection(inet6_tcp, AcceptPid, Socket, MyNode, Allowed, SetupTime). - - %% ------------------------------------------------------------ - %% Setup a new connection to another Erlang node. -@@ -213,214 +61,13 @@ get_remote_id(Socket, Node) -> - %% ------------------------------------------------------------ - - setup(Node, Type, MyNode, LongOrShortNames,SetupTime) -> -- spawn_opt(?MODULE, do_setup, -- [self(), Node, Type, MyNode, LongOrShortNames, SetupTime], -- [link, {priority, max}]). -- --do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> -- ?trace("~p~n",[{?MODULE,self(),setup,Node}]), -- [Name, Address] = splitnode(Node, LongOrShortNames), -- case inet:getaddr(Address, inet6) of -- {ok, Ip} -> -- Timer = dist_util:start_timer(SetupTime), -- case erl_epmd:port_please(Name, Ip) of -- {port, TcpPort, Version} -> -- ?trace("port_please(~p) -> version ~p~n", -- [Node,Version]), -- dist_util:reset_timer(Timer), -- case inet6_tcp:connect(Ip, TcpPort, -- [{active, false}, -- {packet,2}]) of -- {ok, Socket} -> -- HSData = #hs_data{ -- kernel_pid = Kernel, -- other_node = Node, -- this_node = MyNode, -- socket = Socket, -- timer = Timer, -- this_flags = 0, -- other_version = Version, -- f_send = fun inet6_tcp:send/2, -- f_recv = fun inet6_tcp:recv/3, -- f_setopts_pre_nodeup = -- fun(S) -> -- inet:setopts -- (S, -- [{active, false}, -- {packet, 4}, -- nodelay()]) -- end, -- f_setopts_post_nodeup = -- fun(S) -> -- inet:setopts -- (S, -- [{active, true}, -- {deliver, port}, -- {packet, 4}, -- nodelay()]) -- end, -- f_getll = fun inet:getll/1, -- f_address = -- fun(_,_) -> -- #net_address { -- address = {Ip,TcpPort}, -- host = Address, -- protocol = tcp, -- family = inet6} -- end, -- mf_tick = fun ?MODULE:tick/1, -- mf_getstat = fun ?MODULE:getstat/1, -- request_type = Type -- }, -- dist_util:handshake_we_started(HSData); -- _ -> -- %% Other Node may have closed since -- %% port_please ! -- ?trace("other node (~p) " -- "closed since port_please.~n", -- [Node]), -- ?shutdown(Node) -- end; -- _ -> -- ?trace("port_please (~p) " -- "failed.~n", [Node]), -- ?shutdown(Node) -- end; -- __Other -> -- ?trace("inet_getaddr(~p) " -- "failed (~p).~n", [Node,__Other]), -- ?shutdown(Node) -- end. -+ inet_tcp_dist:gen_setup(inet6_tcp, Node, Type, MyNode, LongOrShortNames, SetupTime). - - %% - %% Close a socket. - %% - close(Socket) -> - inet6_tcp:close(Socket). -- -- --%% If Node is illegal terminate the connection setup!! --splitnode(Node, LongOrShortNames) -> -- case split_node(atom_to_list(Node), $@, []) of -- [Name|Tail] when Tail =/= [] -> -- Host = lists:append(Tail), -- case split_node(Host, $., []) of -- [_] when LongOrShortNames =:= longnames -> -- case inet_parse:ipv6strict_address(Host) of -- {ok, _} -> -- [Name, Host]; -- _ -> -- error_msg("** System running to use " -- "fully qualified " -- "hostnames **~n" -- "** Hostname ~s is illegal **~n", -- [Host]), -- ?shutdown(Node) -- end; -- L when length(L) > 1, LongOrShortNames =:= shortnames -> -- error_msg("** System NOT running to use fully qualified " -- "hostnames **~n" -- "** Hostname ~s is illegal **~n", -- [Host]), -- ?shutdown(Node); -- _ -> -- [Name, Host] -- end; -- [_] -> -- error_msg("** Nodename ~p illegal, no '@' character **~n", -- [Node]), -- ?shutdown(Node); -- _ -> -- error_msg("** Nodename ~p illegal **~n", [Node]), -- ?shutdown(Node) -- end. -- --split_node([Chr|T], Chr, Ack) -> [lists:reverse(Ack)|split_node(T, Chr, [])]; --split_node([H|T], Chr, Ack) -> split_node(T, Chr, [H|Ack]); --split_node([], _, Ack) -> [lists:reverse(Ack)]. -- --%% ------------------------------------------------------------ --%% Fetch local information about a Socket. --%% ------------------------------------------------------------ --get_tcp_address(Socket) -> -- {ok, Address} = inet:sockname(Socket), -- {ok, Host} = inet:gethostname(), -- #net_address { -- address = Address, -- host = Host, -- protocol = tcp, -- family = inet6 -- }. -- --%% ------------------------------------------------------------ --%% Do only accept new connection attempts from nodes at our --%% own LAN, if the check_ip environment parameter is true. --%% ------------------------------------------------------------ --check_ip(Socket) -> -- case application:get_env(check_ip) of -- {ok, true} -> -- case get_ifs(Socket) of -- {ok, IFs, IP} -> -- check_ip(IFs, IP); -- _ -> -- ?shutdown(no_node) -- end; -- _ -> -- true -- end. -- --get_ifs(Socket) -> -- case inet:peername(Socket) of -- {ok, {IP, _}} -> -- case inet:getif(Socket) of -- {ok, IFs} -> {ok, IFs, IP}; -- Error -> Error -- end; -- Error -> -- Error -- end. -- --check_ip([{OwnIP, _, Netmask}|IFs], PeerIP) -> -- case {mask(Netmask, PeerIP), mask(Netmask, OwnIP)} of -- {M, M} -> true; -- _ -> check_ip(IFs, PeerIP) -- end; --check_ip([], PeerIP) -> -- {false, PeerIP}. - --mask({M1,M2,M3,M4,M5,M6,M7,M8}, {IP1,IP2,IP3,IP4,IP5,IP6,IP7,IP8}) -> -- {M1 band IP1, -- M2 band IP2, -- M3 band IP3, -- M4 band IP4, -- M5 band IP5, -- M6 band IP6, -- M7 band IP7, -- M8 band IP8 }. -- - is_node_name(Node) when is_atom(Node) -> -- case split_node(atom_to_list(Node), $@, []) of -- [_,_Host] -> true; -- _ -> false -- end; --is_node_name(_Node) -> -- false. --tick(Sock) -> -- ?to_port(Sock,[],[force]). --getstat(Socket) -> -- case inet:getstat(Socket, [recv_cnt, send_cnt, send_pend]) of -- {ok, Stat} -> -- split_stat(Stat,0,0,0); -- Error -> -- Error -- end. -- --split_stat([{recv_cnt, R}|Stat], _, W, P) -> -- split_stat(Stat, R, W, P); --split_stat([{send_cnt, W}|Stat], R, _, P) -> -- split_stat(Stat, R, W, P); --split_stat([{send_pend, P}|Stat], R, W, _) -> -- split_stat(Stat, R, W, P); --split_stat([], R, W, P) -> -- {ok, R, W, P}. -- -+ inet_tcp_dist:is_node_name(Node). -diff --git a/lib/kernel/src/inet_tcp.erl b/lib/kernel/src/inet_tcp.erl -index 4c2db16..71d35ca 100644 ---- a/lib/kernel/src/inet_tcp.erl -+++ b/lib/kernel/src/inet_tcp.erl -@@ -26,11 +26,25 @@ - -export([controlling_process/2]). - -export([fdopen/2]). - -+-export([family/0, mask/2, parse_address/1]). - -export([getserv/1, getaddr/1, getaddr/2, getaddrs/1, getaddrs/2]). - -- - -include("inet_int.hrl"). - -+%% my address family -+family() -> inet. -+ -+%% Apply netmask on address -+mask({M1,M2,M3,M4}, {IP1,IP2,IP3,IP4}) -> -+ {M1 band IP1, -+ M2 band IP2, -+ M3 band IP3, -+ M4 band IP4}. -+ -+%% Parse address string -+parse_address(Host) -> -+ inet_parse:ipv4strict_address(Host). -+ - %% inet_tcp port lookup - getserv(Port) when is_integer(Port) -> {ok, Port}; - getserv(Name) when is_atom(Name) -> inet:getservbyname(Name,tcp). -diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl -index 8005eff..0739cf3 100644 ---- a/lib/kernel/src/inet_tcp_dist.erl -+++ b/lib/kernel/src/inet_tcp_dist.erl -@@ -23,9 +23,13 @@ - -export([listen/1, accept/1, accept_connection/5, - setup/5, close/1, select/1, is_node_name/1]). - -+%% Generalized dist API -+-export([gen_listen/2, gen_accept/2, gen_accept_connection/6, -+ gen_setup/6, gen_select/2]). -+ - %% internal exports - ---export([accept_loop/2,do_accept/6,do_setup/6,getstat/1,tick/1]). -+-export([accept_loop/3,do_accept/7,do_setup/7,getstat/1]). - - -import(error_logger,[error_msg/2]). - -@@ -33,15 +37,6 @@ - - - ---define(to_port(Socket, Data, Opts), -- case inet_tcp:send(Socket, Data, Opts) of -- {error, closed} -> -- self() ! {tcp_closed, Socket}, -- {error, closed}; -- R -> -- R -- end). -- - - -include("dist.hrl"). - -include("dist_util.hrl"). -@@ -52,8 +47,15 @@ - %% ------------------------------------------------------------ - - select(Node) -> -+ gen_select(inet_tcp, Node). -+ -+gen_select(Driver, Node) -> - case split_node(atom_to_list(Node), $@, []) of -- [_,_Host] -> true; -+ [_, Host] -> -+ case inet:getaddr(Host, Driver:family()) of -+ {ok,_} -> true; -+ _ -> false -+ end; - _ -> false - end. - -@@ -63,9 +65,12 @@ select(Node) -> - %% ------------------------------------------------------------ - - listen(Name) -> -- case do_listen([{active, false}, {packet,2}, {reuseaddr, true}]) of -+ gen_listen(inet_tcp, Name). -+ -+gen_listen(Driver, Name) -> -+ case do_listen(Driver, [{active, false}, {packet,2}, {reuseaddr, true}]) of - {ok, Socket} -> -- TcpAddress = get_tcp_address(Socket), -+ TcpAddress = get_tcp_address(Driver, Socket), - {_,Port} = TcpAddress#net_address.address, - case erl_epmd:register_node(Name, Port) of - {ok, Creation} -> -@@ -77,7 +82,7 @@ listen(Name) -> - Error - end. - --do_listen(Options0) -> -+do_listen(Driver, Options) -> - {First,Last} = case application:get_env(kernel,inet_dist_listen_min) of - {ok,N} when is_integer(N) -> - case application:get_env(kernel, -@@ -90,46 +95,60 @@ do_listen(Options0) -> - _ -> - {0,0} - end, -- Options = case application:get_env(kernel, inet_dist_use_interface) of -- {ok, Ip} -> -- [{ip, Ip} | Options0]; -- _ -> -- Options0 -- end, -- do_listen(First, Last, [{backlog,128}|Options]). -- --do_listen(First,Last,_) when First > Last -> -+ do_listen(Driver, First, Last, listen_options([{backlog,128}|Options])). -+ -+do_listen(_Driver, First,Last,_) when First > Last -> - {error,eaddrinuse}; --do_listen(First,Last,Options) -> -- case inet_tcp:listen(First, Options) of -+do_listen(Driver, First,Last,Options) -> -+ case Driver:listen(First, Options) of - {error, eaddrinuse} -> -- do_listen(First+1,Last,Options); -+ do_listen(Driver, First+1,Last,Options); - Other -> - Other - end. - -+listen_options(Opts0) -> -+ Opts1 = -+ case application:get_env(kernel, inet_dist_use_interface) of -+ {ok, Ip} -> -+ [{ip, Ip} | Opts0]; -+ _ -> -+ Opts0 -+ end, -+ case application:get_env(kernel, inet_dist_listen_options) of -+ {ok,ListenOpts} -> -+ erlang:display({inet_dist_listen_options, ListenOpts}), -+ ListenOpts ++ Opts1; -+ _ -> -+ Opts1 -+ end. -+ -+ - %% ------------------------------------------------------------ - %% Accepts new connection attempts from other Erlang nodes. - %% ------------------------------------------------------------ - - accept(Listen) -> -- spawn_opt(?MODULE, accept_loop, [self(), Listen], [link, {priority, max}]). -+ gen_accept(inet_tcp, Listen). - --accept_loop(Kernel, Listen) -> -- case inet_tcp:accept(Listen) of -+gen_accept(Driver, Listen) -> -+ spawn_opt(?MODULE, accept_loop, [Driver, self(), Listen], [link, {priority, max}]). -+ -+accept_loop(Driver, Kernel, Listen) -> -+ case Driver:accept(Listen) of - {ok, Socket} -> -- Kernel ! {accept,self(),Socket,inet,tcp}, -- controller(Kernel, Socket), -- accept_loop(Kernel, Listen); -+ Kernel ! {accept,self(),Socket,Driver:family(),tcp}, -+ _ = controller(Driver, Kernel, Socket), -+ accept_loop(Driver, Kernel, Listen); - Error -> - exit(Error) - end. - --controller(Kernel, Socket) -> -+controller(Driver, Kernel, Socket) -> - receive - {Kernel, controller, Pid} -> - flush_controller(Pid, Socket), -- inet_tcp:controlling_process(Socket, Pid), -+ Driver:controlling_process(Socket, Pid), - flush_controller(Pid, Socket), - Pid ! {self(), controller}; - {Kernel, unsupported_protocol} -> -@@ -154,15 +173,18 @@ flush_controller(Pid, Socket) -> - %% ------------------------------------------------------------ - - accept_connection(AcceptPid, Socket, MyNode, Allowed, SetupTime) -> -+ gen_accept_connection(inet_tcp, AcceptPid, Socket, MyNode, Allowed, SetupTime). -+ -+gen_accept_connection(Driver, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> - spawn_opt(?MODULE, do_accept, -- [self(), AcceptPid, Socket, MyNode, Allowed, SetupTime], -+ [Driver, self(), AcceptPid, Socket, MyNode, Allowed, SetupTime], - [link, {priority, max}]). - --do_accept(Kernel, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> -+do_accept(Driver, Kernel, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> - receive - {AcceptPid, controller} -> - Timer = dist_util:start_timer(SetupTime), -- case check_ip(Socket) of -+ case check_ip(Driver, Socket) of - true -> - HSData = #hs_data{ - kernel_pid = Kernel, -@@ -171,9 +193,8 @@ do_accept(Kernel, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> - timer = Timer, - this_flags = 0, - allowed = Allowed, -- f_send = fun(S,D) -> inet_tcp:send(S,D) end, -- f_recv = fun(S,N,T) -> inet_tcp:recv(S,N,T) -- end, -+ f_send = fun Driver:send/2, -+ f_recv = fun Driver:recv/3, - f_setopts_pre_nodeup = - fun(S) -> - inet:setopts(S, -@@ -192,8 +213,8 @@ do_accept(Kernel, AcceptPid, Socket, MyNode, Allowed, SetupTime) -> - f_getll = fun(S) -> - inet:getll(S) - end, -- f_address = fun get_remote_id/2, -- mf_tick = fun ?MODULE:tick/1, -+ f_address = fun(S, Node) -> get_remote_id(Driver, S, Node) end, -+ mf_tick = fun(S) -> tick(Driver, S) end, - mf_getstat = fun ?MODULE:getstat/1 - }, - dist_util:handshake_other_started(HSData); -@@ -224,13 +245,13 @@ nodelay() -> - %% ------------------------------------------------------------ - %% Get remote information about a Socket. - %% ------------------------------------------------------------ --get_remote_id(Socket, Node) -> -+get_remote_id(Driver, Socket, Node) -> - case inet:peername(Socket) of - {ok,Address} -> - case split_node(atom_to_list(Node), $@, []) of - [_,Host] -> - #net_address{address=Address,host=Host, -- protocol=tcp,family=inet}; -+ protocol=tcp,family=Driver:family()}; - _ -> - %% No '@' or more than one '@' in node name. - ?shutdown(no_node) -@@ -245,14 +266,18 @@ get_remote_id(Socket, Node) -> - %% ------------------------------------------------------------ - - setup(Node, Type, MyNode, LongOrShortNames,SetupTime) -> -+ gen_setup(inet_tcp, Node, Type, MyNode, LongOrShortNames, SetupTime). -+ -+gen_setup(Driver, Node, Type, MyNode, LongOrShortNames, SetupTime) -> - spawn_opt(?MODULE, do_setup, -- [self(), Node, Type, MyNode, LongOrShortNames, SetupTime], -+ [Driver, self(), Node, Type, MyNode, LongOrShortNames, SetupTime], - [link, {priority, max}]). - --do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> -+do_setup(Driver, Kernel, Node, Type, MyNode, LongOrShortNames, SetupTime) -> - ?trace("~p~n",[{inet_tcp_dist,self(),setup,Node}]), -- [Name, Address] = splitnode(Node, LongOrShortNames), -- case inet:getaddr(Address, inet) of -+ [Name, Address] = splitnode(Driver, Node, LongOrShortNames), -+ AddressFamily = Driver:family(), -+ case inet:getaddr(Address, AddressFamily) of - {ok, Ip} -> - Timer = dist_util:start_timer(SetupTime), - case erl_epmd:port_please(Name, Ip) of -@@ -260,9 +285,11 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> - ?trace("port_please(~p) -> version ~p~n", - [Node,Version]), - dist_util:reset_timer(Timer), -- case inet_tcp:connect(Ip, TcpPort, -- [{active, false}, -- {packet,2}]) of -+ case -+ Driver:connect( -+ Ip, TcpPort, -+ connect_options([{active, false}, {packet, 2}])) -+ of - {ok, Socket} -> - HSData = #hs_data{ - kernel_pid = Kernel, -@@ -272,8 +299,8 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> - timer = Timer, - this_flags = 0, - other_version = Version, -- f_send = fun inet_tcp:send/2, -- f_recv = fun inet_tcp:recv/3, -+ f_send = fun Driver:send/2, -+ f_recv = fun Driver:recv/3, - f_setopts_pre_nodeup = - fun(S) -> - inet:setopts -@@ -298,9 +325,9 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> - address = {Ip,TcpPort}, - host = Address, - protocol = tcp, -- family = inet} -+ family = AddressFamily} - end, -- mf_tick = fun ?MODULE:tick/1, -+ mf_tick = fun(S) -> tick(Driver, S) end, - mf_getstat = fun ?MODULE:getstat/1, - request_type = Type - }, -@@ -324,6 +351,15 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) -> - ?shutdown(Node) - end. - -+connect_options(Opts) -> -+ case application:get_env(kernel, inet_dist_connect_options) of -+ {ok,ConnectOpts} -> -+ erlang:display({inet_dist_connect_options, ConnectOpts}), -+ ConnectOpts ++ Opts; -+ _ -> -+ Opts -+ end. -+ - %% - %% Close a socket. - %% -@@ -332,18 +368,23 @@ close(Socket) -> - - - %% If Node is illegal terminate the connection setup!! --splitnode(Node, LongOrShortNames) -> -+splitnode(Driver, Node, LongOrShortNames) -> - case split_node(atom_to_list(Node), $@, []) of - [Name|Tail] when Tail =/= [] -> - Host = lists:append(Tail), - case split_node(Host, $., []) of - [_] when LongOrShortNames =:= longnames -> -- error_msg("** System running to use " -- "fully qualified " -- "hostnames **~n" -- "** Hostname ~s is illegal **~n", -- [Host]), -- ?shutdown(Node); -+ case Driver:parse_address(Host) of -+ {ok, _} -> -+ [Name, Host]; -+ _ -> -+ error_msg("** System running to use " -+ "fully qualified " -+ "hostnames **~n" -+ "** Hostname ~s is illegal **~n", -+ [Host]), -+ ?shutdown(Node) -+ end; - L when length(L) > 1, LongOrShortNames =:= shortnames -> - error_msg("** System NOT running to use fully qualified " - "hostnames **~n" -@@ -369,26 +410,26 @@ split_node([], _, Ack) -> [lists:reverse(Ack)]. - %% ------------------------------------------------------------ - %% Fetch local information about a Socket. - %% ------------------------------------------------------------ --get_tcp_address(Socket) -> -+get_tcp_address(Driver, Socket) -> - {ok, Address} = inet:sockname(Socket), - {ok, Host} = inet:gethostname(), - #net_address { - address = Address, - host = Host, - protocol = tcp, -- family = inet -+ family = Driver:family() - }. - - %% ------------------------------------------------------------ - %% Do only accept new connection attempts from nodes at our - %% own LAN, if the check_ip environment parameter is true. - %% ------------------------------------------------------------ --check_ip(Socket) -> -+check_ip(Driver, Socket) -> - case application:get_env(check_ip) of - {ok, true} -> - case get_ifs(Socket) of - {ok, IFs, IP} -> -- check_ip(IFs, IP); -+ check_ip(Driver, IFs, IP); - _ -> - ?shutdown(no_node) - end; -@@ -407,20 +448,14 @@ get_ifs(Socket) -> - Error - end. - --check_ip([{OwnIP, _, Netmask}|IFs], PeerIP) -> -- case {mask(Netmask, PeerIP), mask(Netmask, OwnIP)} of -+check_ip(Driver, [{OwnIP, _, Netmask}|IFs], PeerIP) -> -+ case {Driver:mask(Netmask, PeerIP), Driver:mask(Netmask, OwnIP)} of - {M, M} -> true; -- _ -> check_ip(IFs, PeerIP) -+ _ -> check_ip(Driver, IFs, PeerIP) - end; --check_ip([], PeerIP) -> -+check_ip(_Driver, [], PeerIP) -> - {false, PeerIP}. - --mask({M1,M2,M3,M4}, {IP1,IP2,IP3,IP4}) -> -- {M1 band IP1, -- M2 band IP2, -- M3 band IP3, -- M4 band IP4}. -- - is_node_name(Node) when is_atom(Node) -> - case split_node(atom_to_list(Node), $@, []) of - [_, _Host] -> true; -@@ -429,8 +464,14 @@ is_node_name(Node) when is_atom(Node) -> - is_node_name(_Node) -> - false. - --tick(Sock) -> -- ?to_port(Sock,[],[force]). -+tick(Driver, Socket) -> -+ case Driver:send(Socket, [], [force]) of -+ {error, closed} -> -+ self() ! {tcp_closed, Socket}, -+ {error, closed}; -+ R -> -+ R -+ end. - - getstat(Socket) -> - case inet:getstat(Socket, [recv_cnt, send_cnt, send_pend]) of diff --git a/otp-0023-epmd-support-IPv6-node-registration.patch b/otp-0023-epmd-support-IPv6-node-registration.patch deleted file mode 100644 index 7d46bae..0000000 --- a/otp-0023-epmd-support-IPv6-node-registration.patch +++ /dev/null @@ -1,737 +0,0 @@ -From: Michael Santos -Date: Sun, 18 Oct 2015 16:20:37 -0400 -Subject: [PATCH] epmd: support IPv6 node registration - -Allow IPv6 nodes to register with and query epmd. On systems with -IPv6 support: - -* epmd listens on both the IPv4 and IPv6 ANY or loopback sockets - -* the epmd cli client connects to epmd over the IPv6 loopback - -* distributed nodes started with "-proto_dist inet6_tcp" will register - with epmd over IPv6 - -To work on IPv6 capable systems that have IPv6 support disabled, -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. - -Update the minimum supported version of Windows to Windows Vista to -support IPv6. - -diff --git a/erts/configure.in b/erts/configure.in -index d9bc1ec..756f3cb 100644 ---- a/erts/configure.in -+++ b/erts/configure.in -@@ -424,7 +424,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 3e70054..3c9313e 100644 ---- a/erts/doc/src/epmd.xml -+++ b/erts/doc/src/epmd.xml -@@ -36,7 +36,7 @@ - -

Erlang Port Mapper Daemon

- -- -+ - -

Starts the port mapper daemon

-
-diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml -index 528a2d9..0b8f821 100644 ---- a/erts/doc/src/erl.xml -+++ b/erts/doc/src/erl.xml -@@ -381,6 +381,33 @@ - similar to . See - code(3).

- -+ -+ -+

Replaces the path specified in the boot script. See -+ script(4).

-+
-+ -+ -+

Specify a protocol for Erlang distribution.

-+ -+ inet_tcp -+ -+

TCP over IPv4 (the default)

-+
-+ inet_tls -+ -+

distribution over TLS/SSL

-+
-+ inet6_tcp -+ -+

TCP over IPv6

-+
-+
-+

For example, to start up IPv6 distributed nodes:

-+
-+% erl -name test@ipv6node.example.com -proto_dist inet6_tcp
-+
-+
- - -

Starts Erlang with a remote shell connected to .

-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 -- inform it of that the log is closed. */ -+ inform it that the log is closed. */ - closelog(); - - /* These chouldn't be needed but for safety... */ -diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c -index 8817bde..ea7dac7 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; -+ 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 363923e..c6d9173 100644 ---- a/erts/epmd/src/epmd_int.h -+++ b/erts/epmd/src/epmd_int.h -@@ -47,6 +47,7 @@ - # ifndef WINDOWS_H_INCLUDES_WINSOCK2_H - # include - # endif -+# include - # include - # include - #endif -@@ -114,6 +115,10 @@ - # include - #endif - -+#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 */ - -@@ -167,33 +172,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 { \ -@@ -203,8 +228,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 78524a6..28e30d4 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); -+static int conn_local_peer_check(EpmdVars*, int); - static int conn_close_fd(EpmdVars*,int); - - static void node_init(EpmdVars*); -@@ -200,10 +201,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); -@@ -246,64 +248,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_SD_DAEMON_H - } -@@ -334,13 +354,39 @@ void run(EpmdVars *g) - #endif - 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. -@@ -372,8 +418,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) - { -@@ -394,6 +439,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_SD_DAEMON_H - } - sd_notifyf(0, "READY=1\n" -@@ -438,8 +488,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() -@@ -1001,15 +1051,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]; - -@@ -1020,20 +1061,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"); - -@@ -1041,7 +1069,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"); -@@ -1059,6 +1087,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 cc24a55..8dfc21f 100644 ---- a/erts/epmd/test/epmd_SUITE.erl -+++ b/erts/epmd/test/epmd_SUITE.erl -@@ -42,6 +42,7 @@ - -export( - [ - register_name/1, -+ register_name_ipv6/1, - register_names_1/1, - register_names_2/1, - register_duplicate_name/1, -@@ -108,7 +109,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, -@@ -165,6 +167,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) -> -@@ -238,13 +258,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]} -> -@@ -1129,7 +1150,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 d511f2e..99ee635 100644 ---- a/lib/erl_interface/configure.in -+++ b/lib/erl_interface/configure.in -@@ -250,7 +250,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 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, - 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, -@@ -106,7 +106,9 @@ names1(HostName) -> - - - 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 -@@ -124,10 +126,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, -@@ -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). - --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 3756786..be73888 100755 ---- a/lib/wx/configure.in -+++ b/lib/wx/configure.in -@@ -163,14 +163,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-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 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 deleted file mode 100644 index dda297d..0000000 --- a/otp-0026-Revert-Remove-unused-code-in-error-logger-handlers.patch +++ /dev/null @@ -1,1064 +0,0 @@ -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 deleted file mode 100644 index 3e817d5..0000000 --- a/otp-0027-Respect-proto_dist-switch-while-connection-to-EPMD.patch +++ /dev/null @@ -1,34 +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 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 deleted file mode 100644 index 9514c34..0000000 --- a/otp-0028-mnesia-Send-mnesia_down-messages-to-waiting-transact.patch +++ /dev/null @@ -1,38 +0,0 @@ -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) diff --git a/otp-0029-Fix-a-few-javadoc-errors.patch b/otp-0029-Fix-a-few-javadoc-errors.patch deleted file mode 100644 index c808303..0000000 --- a/otp-0029-Fix-a-few-javadoc-errors.patch +++ /dev/null @@ -1,139 +0,0 @@ -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)). -- *

- * - * @see #exit(OtpErlangObject) - */ -diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java -index 6f507bf..31a5d0f 100644 ---- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java -+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMsg.java -@@ -30,14 +30,14 @@ package com.ericsson.otp.erlang; - *

- * - *

-- * 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. -+ * is {@link OtpMsg#regSendTag regSendTag} contain sender information.
- * - *

- * Message are sent using the Erlang external format (see separate -diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java -index 78f47aa..fd4eba3 100644 ---- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java -+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java -@@ -202,7 +202,7 @@ public class OtpOutputStream extends ByteArrayOutputStream { - /** - * Write an array of bytes to the stream. - * -- * @param buf -+ * @param bytes - * the array of bytes to write. - * - */ -@@ -637,7 +637,7 @@ public class OtpOutputStream extends ByteArrayOutputStream { - * Write a positive short to the stream. The short is interpreted as a two's - * complement unsigned short even if it is negative. - * -- * @param s -+ * @param us - * the short to use. - */ - public void write_ushort(final short us) { diff --git a/otp-get-patches.sh b/otp-get-patches.sh index 033db0e..75d4a54 100755 --- a/otp-get-patches.sh +++ b/otp-get-patches.sh @@ -17,18 +17,6 @@ # # # start of autogenerated patch tag list # # end of autogenerated patch tag list -# # start of autogenerated prep patch list -# # end of autogenerated prep patch list -# -# The following special comment lines in the git commit messages -# will be interpreted: -# -# Fedora-Spec-Comment: This patch only applies to EL6 builds -# Fedora-Spec-Before: %if 0%?el6} -# Fedora-Spec-After: %endif -# -# If there is no "Fedora-Spec-Comment:" line, we will use -# "Fedora specific patch". # Command line parsing otp_dir="${1:?'Fatal: otp git repo dir required'}" @@ -49,44 +37,29 @@ test -s "$tmpdir/patch-list.txt" # Process patch files echo "# start of autogenerated patch tag list" > "$tmpdir/patch-list-tags.txt" -echo "# start of autogenerated prep patch list" > "$tmpdir/patch-list-prep.txt" n=1 while read patch do otppatch="$(dirname "$patch")/otp-$(basename "$patch")" ${SED-sed} -e '1d' -e '/^-- $/,$d' "$patch" > "$otppatch" rm -f "$patch" - comment="$(sed -n 's/^Fedora-Spec-Comment:\s*//p' "$otppatch")" - if test "x$comment" = "x"; then comment="Fedora specific patch"; fi - echo "# ${comment}" >> "$tmpdir/patch-list-tags.txt" - echo "# $(sed -n 's/^Subject: \[PATCH\] //p' "$otppatch")" >> "$tmpdir/patch-list-tags.txt" echo "Patch$n: $(basename "$otppatch")" >> "$tmpdir/patch-list-tags.txt" - base="$(basename "$patch" ".patch" | sed 's/^00[0-9][0-9]-//')" - backupext=".$(echo -n "$base" | tr -c -s '[:alnum:]' '_')" - sed -n 's/^Fedora-Spec-Before:\s*//p' "$otppatch" >> "$tmpdir/patch-list-prep.txt" - echo "%patch$n -p1 -b ${backupext}" >> "$tmpdir/patch-list-prep.txt" - sed -n 's/^Fedora-Spec-After:\s*//p' "$otppatch" >> "$tmpdir/patch-list-prep.txt" n=$(($n + 1)) done < "$tmpdir/patch-list.txt" echo "# end of autogenerated patch tag list" >> "$tmpdir/patch-list-tags.txt" -echo "# end of autogenerated prep patch list" >> "$tmpdir/patch-list-prep.txt" # Create updated spec file specfile="erlang.spec" newspec1="${tmpdir}/${specfile}.new1" -newspec2="${tmpdir}/${specfile}.new2" sed '/^# start of autogenerated patch tag list$/,$d' "$specfile" > "$newspec1" cat "$tmpdir/patch-list-tags.txt" >> "$newspec1" sed '1,/^# end of autogenerated patch tag list/d' "$specfile" >> "$newspec1" -sed '/^# start of autogenerated prep patch list$/,$d' "$newspec1" > "$newspec2" -cat "$tmpdir/patch-list-prep.txt" >> "$newspec2" -sed '1,/^# end of autogenerated prep patch list/d' "$newspec1" >> "$newspec2" # Actually put all changes into git index git rm -f otp-00*.patch mv "$tmpdir/otp-00"*.patch . git add otp-00*.patch -mv -f "$newspec2" "$specfile" +mv -f "$newspec1" "$specfile" git add "$specfile" rm -rf "$tmpdir" diff --git a/otp-make-subpackages.py b/otp-make-subpackages.py new file mode 100644 index 0000000..fd9df5e --- /dev/null +++ b/otp-make-subpackages.py @@ -0,0 +1,174 @@ +import glob +import os +import re +import rpm +import sys + +ts = rpm.TransactionSet() + +packages = [] +for arg in sys.argv[1:]: + packages += glob.glob(arg) + +erlang_provides = {} +erlang_requires = {} + +package_names = [] +package_headers = {} + +## +## Custom tweaks begins here +## + +# These packages should be marked as noarch +package_noarch = [ + "emacs-erlang", + "emacs-erlang-el", + "erlang-doc"] + +# These are additional Requires which cannot be picked up automatically (yet). +# TODO these should be added automatically +package_additional_requires = { + "emacs-erlang": ["emacs-common-erlang = %{version}-%{release}", "emacs(bin) >= %{_emacs_version}" ], + "emacs-erlang-el": ["emacs-erlang = %{version}-%{release}"], + "erlang-dialyzer": ["graphviz"], + "erlang-erl_interface": ["%{name}-erts%{?_isa} = %{version}-%{release}"], + # This library (lksctp-tools) is dlopened so it can't be picked + # up automatically by the RPM dependency checker + "erlang-erts": ["lksctp-tools"], + "erlang-gs": ["tk"], + # Stores files/links in /usr/share/java so has to depend on jpackage-utils + "erlang-ic": ["jpackage-utils"], + # Stores files/links in /usr/share/java so has to depend on jpackage-utils + "erlang-jinterface": ["%{name}-erts%{?_isa} = %{version}-%{release}", "jpackage-utils"], + "erlang-wx": ["mesa-libGL", "mesa-libGLU"], + } + +package_additional_buildrequires = { + "emacs-erlang": ["emacs", "emacs-el"], + "erlang-crypto": ["openssl-devel"], + "erlang-diameter": ["ed"], + + # BEWARE. No fop for EPEL5, and only for x86/x86_64 in EPEL6, + # so we cannot regenerate docs here. (Un)Fortunately we dropped + # support for EPEL6 and older versions. + # FIXME add bootstrap condition first. + "erlang-doc": ["fop", "libxslt"], + + "erlang-erts": ["lksctp-tools-devel", "m4", "ncurses-devel", "zlib-devel"], + "erlang-gs": ["tcl-devel", "tk-devel"], + + # in EPEL6 on arches different from %{ix86} x86_64 we have to + # use java-devel-gcj, so technically this requirement makes it + # impossible to build Java support there. (Un)Fortunately we + # already dropped full support for EPEL6 and older versions. + "erlang-ic": ["java-devel"], + "erlang-jinterface": ["java-devel"], + + "erlang-odbc": ["unixODBC-devel"], + } + +package_additional_obsoletes = { + "erlang-erts": [ + "erlang-appmon", + "erlang-docbuilder", + "erlang-inviso", + "erlang-pman", + "erlang-toolbar", + "erlang-tv"], + } + +## +## Custom tweaks ends here +## + +# To match 'erlang(asn1ct_eval_ext:transform_to_EXTERNAL1994/1)' +prog = re.compile("^erlang(.*:.*/\d+)") +rpmmask = re.compile(".*\.rpm") + +# iterate over all rpms +for package in sorted([p for p in packages if rpmmask.match(p)]): + + # A tricky part. We are processing packages, rebuilt with + # %{__erlang_provides_requires}. Otherwise we won't get information + # about imports/exports (until we learn how to parse Erlang BEAM file + # headers with Python. + fd = os.open(package, os.O_RDONLY) + h = ts.hdrFromFdno(fd) + os.close(fd) + + rpm_name = h[rpm.RPMTAG_NAME] + + # Let's calculate provides + # We'll create dictionary to speedup future use + # FIXME duplicate provides + local_provides = [p for p in h[rpm.RPMTAG_PROVIDENAME] if prog.match(p)] + erlang_provides.update({k: rpm_name for k in local_provides}) + + # Let's calculate requires + erlang_requires.update({rpm_name: [r for r in h[rpm.RPMTAG_REQUIRENAME] if prog.match(r) and not r in local_provides]}) + + package_headers.update({rpm_name: h}) + + package_names.append(rpm_name) + +namemask = re.compile("^erlang-[a-zA-Z0-9_]*$") + +print "### BEGIN OF AUTOGENERATED LIST ###" +print "" + +for name in package_names: + h = package_headers[name] + + if name == "erlang-doc": + # Additional ifdef just for this sub-package (see below) + print "%if %{with doc}" + + if namemask.match(name): + print "%%package %s" % name.replace("erlang-", "") + else: + print "%%package -n %s" % name + + print "Summary: %s" % h[rpm.RPMTAG_SUMMARY] + print "Group: %s" % h[rpm.RPMTAG_GROUP] + + rawdeps = [erlang_provides.get(r, "Error: missing requires: %s" % r) for r in erlang_requires[name]] + + deps = set() + dependency_add = deps.add + [x for x in rawdeps if not (x in deps or dependency_add(x))] + + # Additional BuildRequires (if any): + for br in package_additional_buildrequires.get(name, []): + print "BuildRequires: %s" % br + + # Add basic autogenerated Requires: + for r in sorted(deps): + #Requires: %{name}-stdlib%{?_isa} = %{version}-%{release} + print "Requires: %s%%{?_isa} = %%{version}-%%{release}" % r.replace("erlang-", "%{name}-") + + # Add custom additional Requires (if any): + for r in package_additional_requires.get(name, []): + print "Requires: %s" % r + + # Add custom additional Obsoletes (if any): + for os in package_additional_obsoletes.get(name, []): + print "Obsoletes: %s" % os + + if name in package_noarch: + print "BuildArch: noarch" + + print "" + if namemask.match(name): + print "%%description %s" % name.replace("erlang-", "") + else: + print "%%description -n %s" % name + print "%s" % h[rpm.RPMTAG_DESCRIPTION] + + if name == "erlang-doc": + # Additional ifdef just for this sub-package (see above) + print "%endif" + + print "" + +print "### END OF AUTOGENERATED LIST ###" diff --git a/sources b/sources index aa69160..674a546 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5ece977375197338c1b93b3d88514f8 otp_src_R16B03-1.tar.gz +SHA512 (otp-OTP-26.2.5.16.tar.gz) = 4e973be7e8ccad196d59759108a521535b0f046268eb0406f789a50f411fa27c9c11fcfb61a7218605bf1b32921bb52c52fc7c99917e1acfc0d3ed09437129b2