Erlang ver. 17.2.1

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
This commit is contained in:
Peter Lemenkov 2014-08-27 17:38:36 +04:00
commit eeecf737fa
15 changed files with 267 additions and 632 deletions

1
.gitignore vendored
View file

@ -50,3 +50,4 @@ otp_src_R14A.tar.gz
/otp_doc_html_R16B03-1.tar.gz
/otp_doc_man_R16B03-1.tar.gz
/otp_src_R16B03-1.tar.gz
/otp-OTP-17.2.1.tar.gz

View file

@ -1,49 +1,25 @@
%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
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
%if 0%{upstream_rel}
%global upstream_rel_for_rpm %{upstream_rel}
%else
%global upstream_rel_for_rpm 0
%endif
%bcond_without doc
# No fop for EPEL5, and only for x86/x86_64 in EPEL6, so just disable there too
%if 0%{?el5}%{?el6}
%global use_prebuilt_docs 1
%else
%global use_prebuilt_docs 0
%endif
%ifarch %{arm} %{ix86} x86_64 ppc %{power64}
%global __with_hipe 1
%endif
%global n_uvr %{name}-%{upstream_ver}-%{upstream_rel_for_rpm}
Name: erlang
Version: %{upstream_ver}
Release: %{upstream_rel_for_rpm}.7%{?dist}.1
Version: 17.2.1
Release: 1%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
License: ERPL
URL: http://www.erlang.org
Source0: http://www.erlang.org/download/otp_src_%{upstream_ver}%{upstream_rel}-1.tar.gz
%if %{use_prebuilt_docs}
Source1: http://erlang.org/download/otp_doc_html_%{upstream_ver}%{upstream_rel}-1.tar.gz
Source2: http://erlang.org/download/otp_doc_man_%{upstream_ver}%{upstream_rel}-1.tar.gz
%if 0%{?el7}%{?fedora}
VCS: scm:git:https://github.com/erlang/otp
%endif
Source4: http://www.erlang.org/download/otp_src_%{upstream_ver}%{upstream_rel}-1.readme
Source0: https://github.com/erlang/otp/archive/OTP-%{version}/otp-OTP-%{version}.tar.gz
Source5: epmd.service
Source6: epmd.socket
Source7: epmd@.service
@ -83,32 +59,14 @@ 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
Patch7: otp-0007-Added-systemd-notify-support-to-EPMD.patch
# Fedora specific patch
# Install internal hrl files when necessary
Patch8: otp-0008-Install-internal-hrl-files-when-necessary.patch
# end of autogenerated patch tag list
# BuildRoot not strictly needed since F10, but keep it for spec file robustness
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: lksctp-tools-devel
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
@ -116,8 +74,7 @@ BuildRequires: zlib-devel
BuildRequires: flex
BuildRequires: m4
%if %{with doc}
%if %{use_prebuilt_docs}
%else
# BEWARE. No fop for EPEL5, and only for x86/x86_64 in EPEL6, so we cannot regenerate docs here
BuildRequires: fop
BuildRequires: libxslt
@ -126,14 +83,11 @@ BuildRequires: libxslt
BuildRequires: erlang
%endif
%endif
%endif
%if 0%{?el6}%{?fedora}
BuildRequires: emacs
BuildRequires: xemacs
BuildRequires: emacs-el
BuildRequires: xemacs-packages-extra-el
%endif
%if 0%{?el7}%{?fedora}
# for <systemd/sd-daemon.h>
@ -144,7 +98,6 @@ Requires(postun):systemd
Requires: systemd
%endif
Requires: erlang-appmon%{?_isa} = %{version}-%{release}
Requires: erlang-asn1%{?_isa} = %{version}-%{release}
Requires: erlang-common_test%{?_isa} = %{version}-%{release}
Requires: erlang-compiler%{?_isa} = %{version}-%{release}
@ -157,7 +110,6 @@ Requires: erlang-cosTime%{?_isa} = %{version}-%{release}
Requires: erlang-cosTransactions%{?_isa} = %{version}-%{release}
Requires: erlang-crypto%{?_isa} = %{version}-%{release}
Requires: erlang-debugger%{?_isa} = %{version}-%{release}
Requires: erlang-dialyzer%{?_isa} = %{version}-%{release}
Requires: erlang-diameter%{?_isa} = %{version}-%{release}
Requires: erlang-edoc%{?_isa} = %{version}-%{release}
@ -167,7 +119,6 @@ Requires: erlang-erl_interface%{?_isa} = %{version}-%{release}
Requires: erlang-erts%{?_isa} = %{version}-%{release}
Requires: erlang-et%{?_isa} = %{version}-%{release}
Requires: erlang-eunit%{?_isa} = %{version}-%{release}
Requires: erlang-examples%{?_isa} = %{version}-%{release}
Requires: erlang-gs%{?_isa} = %{version}-%{release}
Requires: erlang-hipe%{?_isa} = %{version}-%{release}
Requires: erlang-ic%{?_isa} = %{version}-%{release}
@ -180,10 +131,10 @@ Requires: erlang-observer%{?_isa} = %{version}-%{release}
Requires: erlang-odbc%{?_isa} = %{version}-%{release}
Requires: erlang-orber%{?_isa} = %{version}-%{release}
Requires: erlang-os_mon%{?_isa} = %{version}-%{release}
Requires: erlang-ose%{?_isa} = %{version}-%{release}
Requires: erlang-otp_mibs%{?_isa} = %{version}-%{release}
Requires: erlang-parsetools%{?_isa} = %{version}-%{release}
Requires: erlang-percept%{?_isa} = %{version}-%{release}
Requires: erlang-pman%{?_isa} = %{version}-%{release}
Requires: erlang-public_key%{?_isa} = %{version}-%{release}
Requires: erlang-reltool%{?_isa} = %{version}-%{release}
Requires: erlang-runtime_tools%{?_isa} = %{version}-%{release}
@ -194,15 +145,11 @@ Requires: erlang-ssl%{?_isa} = %{version}-%{release}
Requires: erlang-stdlib%{?_isa} = %{version}-%{release}
Requires: erlang-syntax_tools%{?_isa} = %{version}-%{release}
Requires: erlang-test_server%{?_isa} = %{version}-%{release}
Requires: erlang-toolbar%{?_isa} = %{version}-%{release}
Requires: erlang-tools%{?_isa} = %{version}-%{release}
Requires: erlang-tv%{?_isa} = %{version}-%{release}
Requires: erlang-typer%{?_isa} = %{version}-%{release}
Requires: erlang-webtool%{?_isa} = %{version}-%{release}
Requires: erlang-wx%{?_isa} = %{version}-%{release}
Requires: erlang-xmerl%{?_isa} = %{version}-%{release}
Obsoletes: erlang-docbuilder
Obsoletes: erlang-inviso
%description
Erlang is a general-purpose programming language and runtime
@ -210,19 +157,6 @@ 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.
%package asn1
Summary: Provides support for Abstract Syntax Notation One
Group: Development/Languages
@ -367,7 +301,6 @@ Summary: A debugger for debugging and testing of Erlang programs
Group: Development/Languages
Requires: %{name}-compiler%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-gs%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
Requires: %{name}-wx%{?_isa} = %{version}-%{release}
@ -380,7 +313,6 @@ Summary: A DIscrepancy AnaLYZer for ERlang programs
Group: Development/Languages
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}
@ -408,9 +340,7 @@ Diameter (RFC 3588) library
%package doc
Summary: Erlang documentation
Group: Development/Languages
%if 0%{?el6}%{?el7}%{?fedora}
BuildArch: noarch
%endif
%description doc
Documentation for Erlang.
@ -464,9 +394,18 @@ Summary: Functionality necessary to run the Erlang System itself
Group: Development/Languages
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
Provides: erlang(erl_drv_version) = 2.2
Provides: erlang(erl_nif_version) = 2.4
Provides: erlang(erl_drv_version) = 3.0
Provides: erlang(erl_nif_version) = 2.6
# These sub-packages were removed once
Obsoletes: erlang-appmon
Obsoletes: erlang-docbuilder
Obsoletes: erlang-inviso
Obsoletes: erlang-pman
Obsoletes: erlang-toolbar
Obsoletes: erlang-tv
%description erts
Functionality necessary to run the Erlang System itself.
@ -475,7 +414,6 @@ Functionality necessary to run the Erlang System itself.
Summary: An event tracer for Erlang programs
Group: Development/Languages
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}
@ -558,7 +496,7 @@ Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
# FIXME see erlang-ic also
#Requires: jpackage-utils
%if 0%{?fedora}%{?el7}
%if 0%{?el7}%{?fedora}
BuildRequires: java-devel
%else
%ifarch %{ix86} x86_64
@ -583,6 +521,7 @@ Main erlang library.
%package megaco
Summary: Megaco/H.248 support library
Group: Development/Languages
# FIXME Error:erlang(megaco_flex_scanner:scan/2)
Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
Requires: %{name}-debugger%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
@ -611,12 +550,10 @@ Summary: A set of tools for tracing and investigation of distributed systems
Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-et%{?_isa} = %{version}-%{release}
Requires: %{name}-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
@ -661,6 +598,15 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description os_mon
A monitor which allows inspection of the underlying operating system.
%package ose
Summary: A module for interacting with Enea OSE
Group: Development/Languages
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description ose
A module for interacting with Enea OSE.
%package otp_mibs
Summary: SNMP management information base for Erlang/OTP nodes
Group: Development/Languages
@ -695,17 +641,6 @@ 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
@ -788,7 +723,6 @@ Secure Shell application with sftp and ssh support.
%package ssl
Summary: Secure Socket Layer support
Group: Development/Languages
#Requires: %{name}-asn1%{?_isa} = %{version}-%{release}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: %{name}-erts%{?_isa} = %{version}-%{release}
Requires: %{name}-kernel%{?_isa} = %{version}-%{release}
@ -828,24 +762,12 @@ 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}-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.
%package tools
Summary: A set of programming tools including a coverage analyzer etc
Group: Development/Languages
@ -861,19 +783,6 @@ Provides: emacs-common-erlang = %{version}-%{release}
%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
@ -922,7 +831,6 @@ Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
%description xmerl
Provides support for XML 1.0.
%if 0%{?el6}%{?fedora}
%package -n emacs-erlang
Summary: Compiled elisp files for erlang-mode under GNU Emacs
Requires: emacs-common-erlang = %{version}-%{release}
@ -960,10 +868,9 @@ BuildArch: noarch
%description -n xemacs-erlang-el
Erlang mode for XEmacs (source lisp files).
%endif
%prep
%setup -q -n otp_src_%{upstream_ver}%{upstream_rel}-1
%setup -q -n otp-OTP-%{version}
# start of autogenerated prep patch list
%patch1 -p1 -b .Do_not_format_man_pages_and_do_not_install_miscellan
@ -972,17 +879,8 @@ Erlang mode for XEmacs (source lisp files).
%patch4 -p1 -b .Do_not_install_Java_sources
%patch5 -p1 -b .Do_not_install_nteventlog_and_related_doc_files_on_n
%patch6 -p1 -b .Do_not_install_erlang_sources
%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
%patch7 -p1 -b .Added_systemd_notify_support_to_EPMD
%patch8 -p1 -b .Install_internal_hrl_files_when_necessary
# end of autogenerated prep patch list
# FIXME we should come up with a better solution
@ -1005,9 +903,9 @@ rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old
%build
%ifarch sparcv9 sparc64
CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp %{?__with_hipe:--enable-hipe}
CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
%else
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp %{?__with_hipe:--enable-hipe}
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-systemd %{?__with_hipe:--enable-hipe}
%endif
# Remove pre-built BEAM files
@ -1016,7 +914,6 @@ make clean
# GNU Emacs/XEmacs related stuff
erlang_tools_vsn="$(sed -n 's/TOOLS_VSN = //p' lib/tools/vsn.mk)"
%if 0%{?el6}%{?fedora}
# GNU Emacs related stuff
cat > emacs-erlang-init.el << EOF
(setq load-path (cons "%{_emacs_sitelispdir}/erlang" load-path))
@ -1043,12 +940,10 @@ rm -f xemacs-erlang/erlang-flymake.el
pushd xemacs-erlang
%{_xemacs_bytecompile} *.el
popd
%endif
make
%if %{with doc}
%if %{use_prebuilt_docs}
%else
# should use FOP_OPTS after #832323 is resolved
%ifnarch ppc %{power64}
export BASE_OPTIONS=-Xmx1024m
@ -1057,13 +952,9 @@ export BASE_OPTIONS=-Xmx1536m
%endif
make docs
%endif
%endif
%install
rm -rf $RPM_BUILD_ROOT
%if 0%{?el6}%{?fedora}
# GNU Emacs/XEmacs related stuff
erlang_tools_vsn="$(sed -n 's/TOOLS_VSN = //p' lib/tools/vsn.mk)"
@ -1089,25 +980,12 @@ for f in lib/tools/emacs/{README,*.el}; do
done
rm -f "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/erlang-flymake.el"
install -m 0644 xemacs-erlang/*.elc "$RPM_BUILD_ROOT%{_xemacs_sitelispdir}/erlang/"
%endif
make DESTDIR=$RPM_BUILD_ROOT install
%if %{with doc}
%if %{use_prebuilt_docs}
# extract prebuilt docs and man-pages
tar xf %{SOURCE1} -C $RPM_BUILD_ROOT%{_libdir}/erlang
tar xf %{SOURCE2} -C $RPM_BUILD_ROOT%{_libdir}/erlang
# rm Win32-specific functionality
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/man/man3/nteventlog.*
# rm VxWorks specific
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/man/man3/erl_set_memory_block.*
# rm unneeded files
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/erts-*/info
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/*-*/info
%else
env ERL_LIBS="$RPM_BUILD_ROOT%{_libdir}/erlang/lib" make DESTDIR=$RPM_BUILD_ROOT install-docs
%endif
%endif
# Do not install info files - they are almost empty and useless
find $RPM_BUILD_ROOT%{_libdir}/erlang -type f -name info -exec rm -f {} \;
@ -1119,18 +997,18 @@ 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 ; 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 EPLICENCE README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/PR.template $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv -v $RPM_BUILD_ROOT%{_libdir}/erlang/COPYRIGHT $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif
# Win32-specific man-pages
@ -1187,6 +1065,11 @@ install -D -p -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/epmd@.socket
%endif
%check
# FIXME run tests somehow
# make tests || exit 0
%pre erts
getent group epmd >/dev/null || groupadd -r epmd
getent passwd epmd >/dev/null || \
@ -1194,25 +1077,15 @@ useradd -r -g epmd -d /tmp -s /sbin/nologin \
-c "Erlang Port Mapper Daemon" epmd 2>/dev/null || :
%clean
rm -rf $RPM_BUILD_ROOT
%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}/EPLICENCE
%doc %{_docdir}/%{name}-%{version}/PR.template
%doc %{_docdir}/%{name}-%{version}/README
%doc %{_docdir}/%{name}-%{version}/README.md
%endif
%files asn1
@ -1412,9 +1285,9 @@ rm -rf $RPM_BUILD_ROOT
%files doc
%if %{with doc}
%doc %{_docdir}/%{n_uvr}/doc
%doc %{_docdir}/%{n_uvr}/erts-*/
%doc %{_docdir}/%{n_uvr}/lib/
%doc %{_docdir}/%{name}-%{version}/doc
%doc %{_docdir}/%{name}-%{version}/erts-*/
%doc %{_docdir}/%{name}-%{version}/lib/
%endif
%files edoc
@ -1455,7 +1328,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%files erts
# TODO these directories should be packaged separately
# TODO
# In order to have a parallel-installable Erlang packages these directories
# should be packaged separately
%dir %{_libdir}/erlang/
%dir %{_libdir}/erlang/bin/
%dir %{_libdir}/erlang/lib/
@ -1556,6 +1431,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}/erlang/lib/eunit-*/
%{_libdir}/erlang/lib/eunit-*/ebin
%{_libdir}/erlang/lib/eunit-*/include
%{_libdir}/erlang/lib/eunit-*/src
%if %{with doc}
%{_libdir}/erlang/man/man3/eunit.*
%{_libdir}/erlang/man/man3/eunit_surefire.*
@ -1725,6 +1601,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/lib/observer-*/priv/
%{_libdir}/erlang/lib/observer-*/src/
%if %{with doc}
%{_libdir}/erlang/man/man1/cdv.*
%{_libdir}/erlang/man/man3/crashdump.*
%{_libdir}/erlang/man/man3/observer.*
%{_libdir}/erlang/man/man3/ttb.*
@ -1777,6 +1654,15 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man6/os_mon.*
%endif
%files ose
%dir %{_libdir}/erlang/lib/ose-*/
%{_libdir}/erlang/lib/ose-*/ebin/
%if %{with doc}
%{_libdir}/erlang/man/man3/ose.*
%{_libdir}/erlang/man/man3/ose_erl_driver.*
%{_libdir}/erlang/man/man6/ose.*
%endif
%files otp_mibs
%{_libdir}/erlang/lib/otp_mibs-*/
%if %{with doc}
@ -1798,12 +1684,6 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/percept_profile.*
%endif
%files pman
%{_libdir}/erlang/lib/pman-*/
%if %{with doc}
%{_libdir}/erlang/man/man3/pman.*
%endif
%files public_key
%{_libdir}/erlang/lib/public_key-*/
%if %{with doc}
@ -1827,6 +1707,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/dbg.*
%{_libdir}/erlang/man/man3/dyntrace.*
%{_libdir}/erlang/man/man3/erts_alloc_config.*
%{_libdir}/erlang/man/man3/system_information.*
%{_libdir}/erlang/man/man6/runtime_tools.*
%endif
@ -1975,6 +1856,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/lib.*
%{_libdir}/erlang/man/man3/lists.*
%{_libdir}/erlang/man/man3/log_mf_h.*
%{_libdir}/erlang/man/man3/maps.*
%{_libdir}/erlang/man/man3/math.*
%{_libdir}/erlang/man/man3/ms_transform.*
%{_libdir}/erlang/man/man3/orddict.*
@ -2025,12 +1907,6 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man6/test_server.*
%endif
%files toolbar
%{_libdir}/erlang/lib/toolbar-*/
%if %{with doc}
%{_libdir}/erlang/man/man3/toolbar.*
%endif
%files tools
%dir %{_libdir}/erlang/lib/tools-*/
%{_libdir}/erlang/lib/tools-*/bin
@ -2051,12 +1927,6 @@ rm -rf $RPM_BUILD_ROOT
%{_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
@ -2086,6 +1956,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/wx_object.*
%{_libdir}/erlang/man/man3/wxAcceleratorEntry.*
%{_libdir}/erlang/man/man3/wxAcceleratorTable.*
%{_libdir}/erlang/man/man3/wxActivateEvent.*
%{_libdir}/erlang/man/man3/wxArtProvider.*
%{_libdir}/erlang/man/man3/wxAuiDockArt.*
%{_libdir}/erlang/man/man3/wxAuiManager.*
@ -2188,6 +2059,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/wxIdleEvent.*
%{_libdir}/erlang/man/man3/wxImage.*
%{_libdir}/erlang/man/man3/wxImageList.*
%{_libdir}/erlang/man/man3/wxInitDialogEvent.*
%{_libdir}/erlang/man/man3/wxJoystickEvent.*
%{_libdir}/erlang/man/man3/wxKeyEvent.*
%{_libdir}/erlang/man/man3/wxLayoutAlgorithm.*
@ -2198,6 +2070,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/wxListItem.*
%{_libdir}/erlang/man/man3/wxListItemAttr.*
%{_libdir}/erlang/man/man3/wxListView.*
%{_libdir}/erlang/man/man3/wxLocale.*
%{_libdir}/erlang/man/man3/wxLogNull.*
%{_libdir}/erlang/man/man3/wxMask.*
%{_libdir}/erlang/man/man3/wxMaximizeEvent.*
@ -2230,6 +2103,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/wxPasswordEntryDialog.*
%{_libdir}/erlang/man/man3/wxPen.*
%{_libdir}/erlang/man/man3/wxPickerBase.*
%{_libdir}/erlang/man/man3/wxPopupTransientWindow.*
%{_libdir}/erlang/man/man3/wxPopupWindow.*
%{_libdir}/erlang/man/man3/wxPostScriptDC.*
%{_libdir}/erlang/man/man3/wxPreviewCanvas.*
%{_libdir}/erlang/man/man3/wxPreviewControlBar.*
@ -2313,7 +2188,6 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/erlang/man/man3/xmerl_xsd.*
%endif
%if 0%{?el6}%{?fedora}
%files -n emacs-erlang
%dir %{_emacs_sitelispdir}/erlang
%doc %{_emacs_sitelispdir}/erlang/README
@ -2331,10 +2205,17 @@ rm -rf $RPM_BUILD_ROOT
%files -n xemacs-erlang-el
%{_xemacs_sitelispdir}/erlang/*.el
%endif
%changelog
* Tue Aug 26 2014 Peter Lemenkov <lemenkov@gmail.com> - 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 <rel-eng@lists.fedoraproject.org> - R16B-03.7.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Do not format man-pages and do not install miscellaneous
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in
index 5c1ce51..5a07855 100644
index 0cf965f..94e82a8 100644
--- a/erts/etc/common/Makefile.in
+++ b/erts/etc/common/Makefile.in
@@ -474,10 +474,6 @@ endif
@@ -550,10 +550,6 @@ endif
ifneq ($(INSTALL_TOP_BIN),)
$(INSTALL_PROGRAM) $(INSTALL_TOP_BIN) "$(RELEASE_PATH)"
endif
@ -17,9 +17,9 @@ 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
--- a/erts/etc/unix/Install.src

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Remove rpath
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
index a20ddff..e890927 100644
index 8c92b5b..5b36c19 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -85,7 +85,7 @@ endif
@@ -89,7 +89,7 @@ endif
DYNAMIC_CRYPTO_LIB=@SSL_DYNAMIC_ONLY@
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)

View file

@ -14,36 +14,37 @@ https://bugzilla.redhat.com/818419
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
index 7023833..8bf8eb9 100644
index a7cd03f..6da4d75 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
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
@@ -142,8 +142,6 @@ release_spec: opt
ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib"
endif
- $(INSTALL_DIR) "$(RELSYSDIR)/c_src"
- $(INSTALL_DATA) *.c "$(RELSYSDIR)/c_src"
release_docs_spec:
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
index e890927..1377654 100644
index 5b36c19..470821e 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -160,13 +160,9 @@ docs:
@@ -199,14 +199,10 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
- $(INSTALL_DATA) $(NIF_MAKEFILE) "$(RELSYSDIR)/priv/obj"
ifneq ($(findstring ose,$(TARGET)),ose)
- $(INSTALL_PROGRAM) $(CRYPTO_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) "$(RELSYSDIR)/priv/lib"
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
- $(INSTALL_PROGRAM) $(CALLBACK_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(CALLBACK_LIB) "$(RELSYSDIR)/priv/lib"
endif
endif
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
index e36b39c..fd377bb 100644
--- a/lib/erl_interface/src/Makefile.in
@ -131,24 +132,25 @@ index f84ccf7..05d194f 100644
$(INSTALL_PROGRAM) $(TARGET_FILES) "$(RELSYSDIR)/priv/bin"
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
index d315a90..7b4b9fb 100644
index d46b499..4309aae 100644
--- a/lib/runtime_tools/c_src/Makefile.in
+++ b/lib/runtime_tools/c_src/Makefile.in
@@ -177,9 +177,7 @@ docs:
@@ -156,10 +156,8 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
ifneq ($(findstring ose,$(TARGET)),ose)
- $(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
endif
release_docs_spec:
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
index aea5686..a0c8883 100644
index b1eb69f..1acfdbf 100644
--- a/lib/tools/c_src/Makefile.in
+++ b/lib/tools/c_src/Makefile.in
@@ -189,8 +189,6 @@ include ../vsn.mk
@@ -197,8 +197,6 @@ include ../vsn.mk
RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)
release_spec: all

View file

@ -20,24 +20,11 @@ index 4ea2d41..e1466c1 100644
$(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
index 6798da0..4e3ae0e 100644
--- a/lib/asn1/src/Makefile
+++ b/lib/asn1/src/Makefile
@@ -153,7 +153,7 @@ release_spec: opt
@@ -154,7 +154,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -171,10 +158,10 @@ index 7b4a9cf..290707c 100644
$(INSTALL_DATA) $(EXTERNAL_GEN_HRL_FILES) "$(RELSYSDIR)/include"
diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile
index 574c207..52320b0 100644
index c185c15..68bacba 100644
--- a/lib/crypto/src/Makefile
+++ b/lib/crypto/src/Makefile
@@ -83,8 +83,6 @@ docs:
@@ -81,8 +81,6 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
@ -184,10 +171,10 @@ index 574c207..52320b0 100644
$(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
index 90189dd..1e8f51d 100644
--- a/lib/debugger/src/Makefile
+++ b/lib/debugger/src/Makefile
@@ -130,7 +130,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -116,7 +116,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -197,10 +184,10 @@ index 85754da..5a6f298 100644
$(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
index 91fbdca..01fb30c 100644
--- a/lib/dialyzer/src/Makefile
+++ b/lib/dialyzer/src/Makefile
@@ -156,7 +156,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -151,7 +151,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -210,10 +197,10 @@ index bb2edd4..6b20995 100644
$(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
index 9afccf2..107d65b 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
@@ -242,11 +242,8 @@ release_spec: opt
@@ -250,11 +250,8 @@ release_spec: opt
$(MAKE) $(EXAMPLE_DIRS:%/=release_examples_%)
$(TARGET_DIRS:%/=release_src_%): release_src_%:
@ -241,7 +228,7 @@ index 4e5a418..c0bb0c3 100644
release_docs_spec:
diff --git a/lib/eldap/src/Makefile b/lib/eldap/src/Makefile
index ebb7967..b6337cb 100644
index 2e1110e..b7f9b09 100644
--- a/lib/eldap/src/Makefile
+++ b/lib/eldap/src/Makefile
@@ -98,10 +98,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@ -269,7 +256,7 @@ index ef96f5d..d9a2f0d 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/et/src/Makefile b/lib/et/src/Makefile
index 386169f..216b548 100644
index 377e593..668e278 100644
--- a/lib/et/src/Makefile
+++ b/lib/et/src/Makefile
@@ -108,7 +108,6 @@ release_spec: opt
@ -294,7 +281,7 @@ index e6dab67..a5e147d 100644
$(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile
index 0a63d54..8a49249 100644
index f0200ca..86d3f74 100644
--- a/lib/gs/src/Makefile
+++ b/lib/gs/src/Makefile
@@ -108,8 +108,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@ -309,7 +296,7 @@ index 0a63d54..8a49249 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/bitmap"
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index 506e993..d74b75c 100644
index d13dfb3..b09d62b 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -101,7 +101,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@ -347,6 +334,19 @@ index 87015aa..84f870d 100644
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/hipe/llvm/Makefile b/lib/hipe/llvm/Makefile
index 92f3789..82f3e77 100644
--- a/lib/hipe/llvm/Makefile
+++ b/lib/hipe/llvm/Makefile
@@ -102,7 +102,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/llvm
- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)/llvm
+ $(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/llvm
$(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
@ -615,10 +615,10 @@ index ac38fa0..20bce7e 100644
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
index 42f5c19..a98b706 100644
index c120865..6831d23 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
@@ -131,7 +131,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -149,7 +149,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -655,10 +655,10 @@ index 8140620..73df530 100644
release_docs_spec:
diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile
index 1c6781e..e471f88 100644
index 398e481..f079e77 100644
--- a/lib/orber/src/Makefile
+++ b/lib/orber/src/Makefile
@@ -256,7 +256,7 @@ release_spec: opt
@@ -252,7 +252,7 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -679,6 +679,20 @@ index 4e78cf8..69d434c 100644
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/ose/src/Makefile b/lib/ose/src/Makefile
index 88f8957..ab08a88 100644
--- a/lib/ose/src/Makefile
+++ b/lib/ose/src/Makefile
@@ -93,9 +93,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
- $(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
- $(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/otp_mibs/src/Makefile b/lib/otp_mibs/src/Makefile
index 4f03d02..756db7b 100644
--- a/lib/otp_mibs/src/Makefile
@ -718,21 +732,8 @@ index 6bf0af9..e501539 100644
# $(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
index c1b3bc8..3d021cf 100644
--- a/lib/public_key/asn1/Makefile
+++ b/lib/public_key/asn1/Makefile
@@ -95,8 +95,8 @@ release_spec: opt
@ -885,10 +886,10 @@ index 2ef2859..aac91a3 100644
$(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \
$(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/ssl/src/Makefile b/lib/ssl/src/Makefile
index 131b615..c456bfc 100644
index 7c4c8ec..99efbe4 100644
--- a/lib/ssl/src/Makefile
+++ b/lib/ssl/src/Makefile
@@ -136,7 +136,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -137,7 +137,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -898,10 +899,10 @@ index 131b615..c456bfc 100644
$(INSTALL_DATA) $(BEHAVIOUR_TARGET_FILES) $(TARGET_FILES) $(APP_TARGET) \
$(APPUP_TARGET) "$(RELSYSDIR)/ebin"
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
index f3387d6..4c5e622 100644
index 9ab2cd4..876bfd2 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
@@ -202,7 +202,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
@@ -203,7 +203,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
@ -934,19 +935,6 @@ index ab4dd4d..bcb1bc3 100644
$(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
@ -960,21 +948,8 @@ index e606b97..1beb8cc 100644
$(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
index a7059de..0b1ae2a 100644
--- a/lib/typer/src/Makefile
+++ b/lib/typer/src/Makefile
@@ -101,9 +101,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
@ -988,7 +963,7 @@ index 13af466..c29a597 100644
$(INSTALL_DATA) $(INSTALL_FILES) "$(RELSYSDIR)/ebin"
diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile
index f28c777..346ce37 100644
index af565c8..6c65b26 100644
--- a/lib/webtool/src/Makefile
+++ b/lib/webtool/src/Makefile
@@ -87,8 +87,6 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk

View file

@ -8,7 +8,7 @@ Conflicts:
erts/configure.in
diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c
index fc58882..1757fa9 100644
index 3cfa7a7..67e8b49 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)
@ -27,10 +27,10 @@ index fc58882..1757fa9 100644
}
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index cb8ca96..78524a6 100644
index 48fd7a5..18d898a 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -394,8 +394,11 @@ void run(EpmdVars *g)
@@ -399,8 +399,11 @@ void run(EpmdVars *g)
}
select_fd_set(g, listensock[i]);
}

View file

@ -1,61 +0,0 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 21 Nov 2010 00:17:49 +0300
Subject: [PATCH] Ugly workaround for java-1.5.0-gcj which doesn't support
UNICODE fully
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Fedora-Spec-Comment: Required only for el5, el6 on PowerPC
Fedora-Spec-Before: %if 0%{?el4}%{?el5}%{?el6}
Fedora-Spec-Before: %ifnarch %{ix86} x86_64
Fedora-Spec-After: %endif
Fedora-Spec-After: %endif
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

View file

@ -1,22 +0,0 @@
From: Peter Lemenkov <lemenkov@gmail.com>
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 <lemenkov@gmail.com>
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

View file

@ -0,0 +1,97 @@
From: Peter Lemenkov <lemenkov@gmail.com>
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 <lemenkov@gmail.com>
Conflicts:
lib/eunit/src/Makefile
lib/percept/src/Makefile
lib/test_server/src/Makefile
diff --git a/lib/debugger/src/Makefile b/lib/debugger/src/Makefile
index 1e8f51d..bfdb0c9 100644
--- a/lib/debugger/src/Makefile
+++ b/lib/debugger/src/Makefile
@@ -63,7 +63,7 @@ MODULES= \
HRL_FILES=
-INTERNAL_HRL_FILES= dbg_ieval.hrl
+INTERNAL_HRL_FILES= dbg_ieval.hrl dbg_wx_filedialog_win.hrl
ERL_FILES= $(MODULES:%=%.erl)
diff --git a/lib/eunit/src/Makefile b/lib/eunit/src/Makefile
index a5e147d..8483e28 100644
--- a/lib/eunit/src/Makefile
+++ b/lib/eunit/src/Makefile
@@ -46,6 +46,8 @@ SOURCES= \
INCLUDE_FILES = eunit.hrl
+INTERNAL_HRL_FILES= eunit_internal.hrl
+
PARSE_TRANSFORM_BIN = $(PARSE_TRANSFORM:%.erl=$(EBIN)/%.$(EMULATOR))
TARGET_FILES= $(SOURCES:%.erl=$(EBIN)/%.$(EMULATOR))
@@ -117,6 +119,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(PARSE_TRANSFORM_BIN) $(OBJECTS) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(INCLUDE_DELIVERABLES) "$(RELSYSDIR)/include"
diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
index dbda2a2..3e1792f 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
@@ -122,6 +122,7 @@ HRL_FILES= ../include/file.hrl ../include/inet.hrl ../include/inet_sctp.hrl \
../include/net_address.hrl
INTERNAL_HRL_FILES= application_master.hrl disk_log.hrl \
+ erl_epmd.hrl hipe_ext_format.hrl \
inet_dns.hrl inet_res.hrl \
inet_boot.hrl inet_config.hrl inet_int.hrl \
inet_dns_record_adts.hrl
diff --git a/lib/percept/src/Makefile b/lib/percept/src/Makefile
index e501539..5902da3 100644
--- a/lib/percept/src/Makefile
+++ b/lib/percept/src/Makefile
@@ -50,6 +50,8 @@ MODULES= \
#HRL_FILES= ../include/
+INTERNAL_HRL_FILES= egd.hrl percept.hrl
+
ERL_FILES= $(MODULES:%=%.erl)
TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
@@ -93,6 +95,8 @@ docs:
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
# $(INSTALL_DIR) "$(RELSYSDIR)/include"
# $(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
diff --git a/lib/test_server/src/Makefile b/lib/test_server/src/Makefile
index bcb1bc3..deb7caf 100644
--- a/lib/test_server/src/Makefile
+++ b/lib/test_server/src/Makefile
@@ -123,7 +123,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/src"
- $(INSTALL_DATA) $(INTERNAL_HRL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(TS_HRL_FILES) "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"

View file

@ -1,24 +0,0 @@
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 24 Oct 2013 16:44:22 +0400
Subject: [PATCH] TEMPORARILY disable ECC until dust settles
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
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 <openssl/ec.h>
#include <openssl/ecdh.h>

View file

@ -1,26 +0,0 @@
From: Peter Lemenkov <lemenkov@gmail.com>
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 <lemenkov@gmail.com>
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;;

View file

@ -1,74 +0,0 @@
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
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*,...);

View file

@ -1,111 +0,0 @@
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
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 <stdarg.h>
+#ifdef HAVE_SYSTEMD_SD_DAEMON_H
+# include <systemd/sd-daemon.h>
+#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");

View file

@ -1,4 +1 @@
d27250e9ee98d6388e7f2e65379a0406 otp_src_R16B03-1.readme
eff44490c9bbae3a5c5741bec2390ba3 otp_doc_html_R16B03-1.tar.gz
39113c0d2515bdd8cd7e0f975a380122 otp_doc_man_R16B03-1.tar.gz
e5ece977375197338c1b93b3d88514f8 otp_src_R16B03-1.tar.gz
d3d62b967033bb684f8537548bdfa456 otp-OTP-17.2.1.tar.gz