From ea4b8ca990fc9e0fdf942434a1ed47ddd5aa25b9 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Apr 16 2019 14:05:10 +0000 Subject: Disable check for endianness during startup Disable check for endianness during startup. Apparently this causes issues with RabbitMQ (?). Signed-off-by: Peter Lemenkov --- diff --git a/elixir-0001-Don-t-check-for-endianness-when-starting.patch b/elixir-0001-Don-t-check-for-endianness-when-starting.patch new file mode 100644 index 0000000..afc451d --- /dev/null +++ b/elixir-0001-Don-t-check-for-endianness-when-starting.patch @@ -0,0 +1,42 @@ +From: Peter Lemenkov +Date: Tue, 16 Apr 2019 16:58:58 +0300 +Subject: [PATCH] Don't check for endianness when starting + +Signed-off-by: Peter Lemenkov + +diff --git a/lib/elixir/src/elixir.erl b/lib/elixir/src/elixir.erl +index e0cc49b09..ea68e8ba7 100644 +--- a/lib/elixir/src/elixir.erl ++++ b/lib/elixir/src/elixir.erl +@@ -31,7 +31,6 @@ start(_Type, _Args) -> + preload_common_modules(), + set_stdio_and_stderr_to_binary_and_maybe_utf8(), + check_file_encoding(Encoding), +- check_endianness(), + + Tokenizer = case code:ensure_loaded('Elixir.String.Tokenizer') of + {module, Mod} -> Mod; +@@ -114,23 +113,6 @@ parse_otp_release() -> + erlang:halt(1) + end. + +-check_endianness() -> +- case code:ensure_loaded(?system) of +- {module, ?system} -> +- Endianness = ?system:endianness(), +- case ?system:compiled_endianness() of +- Endianness -> +- ok; +- _ -> +- io:format(standard_error, +- "warning: Elixir is running in a system with a different endianness than the one its " +- "source code was compiled in. Please make sure Elixir and all source files were compiled " +- "in a machine with the same endianness as the current one: ~ts~n", [Endianness]) +- end; +- {error, _} -> +- ok +- end. +- + check_file_encoding(Encoding) -> + case Encoding of + latin1 -> diff --git a/elixir.spec b/elixir.spec index cbbbe37..8f0e991 100644 --- a/elixir.spec +++ b/elixir.spec @@ -5,7 +5,7 @@ Name: elixir Version: 1.8.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modern approach to programming for the Erlang VM License: ASL 2.0 @@ -13,6 +13,7 @@ URL: http://elixir-lang.org/ Source0: https://github.com/elixir-lang/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://github.com/elixir-lang/%{name}/releases/download/v%{version}/Docs.zip#/%{name}-%{version}-doc.zip +Patch1: elixir-0001-Don-t-check-for-endianness-when-starting.patch #BuildArch: noarch BuildRequires: erlang-compiler BuildRequires: erlang-crypto @@ -58,6 +59,7 @@ find -name ".build" -exec rm \{\} \; # Unpack elixir itself (Source0) %setup -q -D +%patch1 -p1 -b .endiannes_check # Remove windows-specific scripts find -name '*.bat' -exec rm \{\} \; @@ -150,6 +152,10 @@ HTML documentation for eex, elixir, iex, logger and mix. %doc docs/doc/eex docs/doc/elixir docs/doc/iex docs/doc/logger docs/doc/mix %changelog +* Tue Apr 16 2019 Peter Lemenkov - 1.8.1-3 +- Disable check for endianness during startup. Apparently this causes issues + with RabbitMQ (?). + * Thu Mar 07 2019 Peter Lemenkov - 1.8.1-2 - Let it to be built and tested w/o rebar/rebar3