diff --git a/erlang.spec b/erlang.spec index 0168b40..efe2026 100644 --- a/erlang.spec +++ b/erlang.spec @@ -66,7 +66,7 @@ Name: erlang Version: 19.3.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: General-purpose programming language and runtime environment Group: Development/Languages @@ -122,6 +122,9 @@ Patch7: otp-0007-Fix-CVE-2016-10253.patch # Fedora specific patch # Fix erl_epmd:port_please when using IPv6 Patch8: otp-0008-Fix-erl_epmd-port_please-when-using-IPv6.patch +# Fedora specific patch +# Add extra search directory +Patch9: otp-0009-Add-extra-search-directory.patch # end of autogenerated patch tag list BuildRequires: flex @@ -936,6 +939,7 @@ Provides support for XML 1.0. %patch6 -p1 -b .Do_not_install_erlang_sources %patch7 -p1 -b .Fix_CVE_2016_10253 %patch8 -p1 -b .Fix_erl_epmd_port_please_when_using_IPv6 +%patch9 -p1 -b .Add_extra_search_directory # end of autogenerated prep patch list # FIXME we should come up with a better solution @@ -1162,6 +1166,10 @@ do 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 + %check TARGET="$(make target_configured)" @@ -1445,6 +1453,8 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \ # 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/ @@ -2326,6 +2336,9 @@ useradd -r -g epmd -d /dev/null -s /sbin/nologin \ %changelog +* 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 diff --git a/otp-0009-Add-extra-search-directory.patch b/otp-0009-Add-extra-search-directory.patch new file mode 100644 index 0000000..baa993f --- /dev/null +++ b/otp-0009-Add-extra-search-directory.patch @@ -0,0 +1,30 @@ +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 59b26176bf..5f3d68db2a 100644 +--- a/lib/kernel/src/code_server.erl ++++ b/lib/kernel/src/code_server.erl +@@ -79,11 +79,15 @@ 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"), ++ {ok,D} = erl_prim_loader:list_dir(LD), ++ make_path(LD, D) ++ end, ++ Paths = F(Root), ++ SharedPaths = F("/usr/share/erlang"), + UserLibPaths = get_user_lib_dirs(), +- ["."] ++ UserLibPaths ++ Paths; ++ ["."] ++ UserLibPaths ++ Paths ++ SharedPaths; + _ -> + [] + end,