From e48940194aa34212765439f2c552fd8e5b34cc69f7abe4919dd533d7682f800f Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Mon, 13 Nov 2023 06:43:33 +0000 Subject: [PATCH 1/3] Accepting request 1125152 from home:matwey:branches:devel:languages:erlang - Update to Elixir 1.15.7: * Fix build for Erlang 26 * Changelog available at https://hexdocs.pm/elixir/1.15.7/changelog.html - Add 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch: * Fix build for 32bit - Add 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch: * Fix build for 32bit OBS-URL: https://build.opensuse.org/request/show/1125152 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/elixir?expand=0&rev=88 --- ...alid-for-32-bit-systems-closes-12741.patch | 28 +++++++++++++ ...r-32-bit-systems-followup-to-12741-1.patch | 39 +++++++++++++++++++ elixir-1.14.2.tar.gz | 3 -- elixir-1.15.7.tar.gz | 3 ++ elixir-doc.spec | 2 +- elixir.changes | 11 ++++++ elixir.spec | 10 +++-- 7 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch create mode 100644 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch delete mode 100644 elixir-1.14.2.tar.gz create mode 100644 elixir-1.15.7.tar.gz diff --git a/0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch b/0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch new file mode 100644 index 0000000..9515aef --- /dev/null +++ b/0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch @@ -0,0 +1,28 @@ +From 8bc67d384b0c21d9bbc7145829ecd49e128038b3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Valim?= +Date: Sun, 2 Jul 2023 10:28:58 +0200 +Subject: [PATCH] Use PID valid for 32-bit systems, closes #12741 + +--- + lib/logger/test/logger/formatter_test.exs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/logger/test/logger/formatter_test.exs b/lib/logger/test/logger/formatter_test.exs +index 82a2ac6a9..2ea4ca08b 100644 +--- a/lib/logger/test/logger/formatter_test.exs ++++ b/lib/logger/test/logger/formatter_test.exs +@@ -116,9 +116,9 @@ test "format with format string" do + format = format(compiled, :error, nil, nil, meta: :data) + assert IO.chardata_to_string(format) == "meta=data " + +- pid = :erlang.list_to_pid(~c"<0.123.4>") ++ pid = :erlang.list_to_pid(~c"<0.123.0>") + format = format(compiled, :error, nil, nil, meta: :data, pid: pid) +- assert IO.chardata_to_string(format) == "meta=data pid=<0.123.4> " ++ assert IO.chardata_to_string(format) == "meta=data pid=<0.123.0> " + + # Hack to get the same predictable reference for every test run. + ref = +-- +2.35.3 + diff --git a/0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch b/0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch new file mode 100644 index 0000000..9b39450 --- /dev/null +++ b/0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch @@ -0,0 +1,39 @@ +From e00524ba5b0e682488fa99bca4aa89e4e7071aa0 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Fri, 7 Jul 2023 20:47:26 +0200 +Subject: [PATCH] Use PID valid for 32-bit systems, followup to #12741 (#12772) + +Signed-off-by: Peter Lemenkov +--- + lib/iex/test/iex/helpers_test.exs | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/iex/test/iex/helpers_test.exs b/lib/iex/test/iex/helpers_test.exs +index 31984a390..ed5190e82 100644 +--- a/lib/iex/test/iex/helpers_test.exs ++++ b/lib/iex/test/iex/helpers_test.exs +@@ -1364,8 +1364,8 @@ test "reloads Erlang modules" do + + describe "pid/1,3" do + test "builds a PID from string" do +- assert inspect(pid("0.32767.3276")) == "#PID<0.32767.3276>" +- assert inspect(pid("0.5.6")) == "#PID<0.5.6>" ++ assert inspect(pid("0.32767.0")) == "#PID<0.32767.0>" ++ assert inspect(pid("0.5.0")) == "#PID<0.5.0>" + + assert_raise ArgumentError, fn -> + pid("0.6.-6") +@@ -1381,8 +1381,8 @@ test "builds a PID from atom" do + end + + test "builds a PID from integers" do +- assert inspect(pid(0, 32767, 3276)) == "#PID<0.32767.3276>" +- assert inspect(pid(0, 5, 6)) == "#PID<0.5.6>" ++ assert inspect(pid(0, 32767, 0)) == "#PID<0.32767.0>" ++ assert inspect(pid(0, 5, 0)) == "#PID<0.5.0>" + + assert_raise FunctionClauseError, fn -> + pid(0, 6, -6) +-- +2.35.3 + diff --git a/elixir-1.14.2.tar.gz b/elixir-1.14.2.tar.gz deleted file mode 100644 index 7908473..0000000 --- a/elixir-1.14.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f79e384706495725119f60982fa16ea82d510c3fbeacfc6ee1a77c792bf152a -size 3085613 diff --git a/elixir-1.15.7.tar.gz b/elixir-1.15.7.tar.gz new file mode 100644 index 0000000..bf8ae6a --- /dev/null +++ b/elixir-1.15.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78bde2786b395515ae1eaa7d26faa7edfdd6632bfcfcd75bccb6341a18e8798f +size 3151775 diff --git a/elixir-doc.spec b/elixir-doc.spec index 1030414..8ed318e 100644 --- a/elixir-doc.spec +++ b/elixir-doc.spec @@ -17,7 +17,7 @@ Name: elixir-doc -Version: 1.14.2 +Version: 1.15.7 Release: 0 Summary: Documentation for elixir License: Apache-2.0 diff --git a/elixir.changes b/elixir.changes index c807ec8..fd00b3c 100644 --- a/elixir.changes +++ b/elixir.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sat Nov 11 10:23:18 UTC 2023 - Matwey Kornilov + +- Update to Elixir 1.15.7: + * Fix build for Erlang 26 + * Changelog available at https://hexdocs.pm/elixir/1.15.7/changelog.html +- Add 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch: + * Fix build for 32bit +- Add 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch: + * Fix build for 32bit + ------------------------------------------------------------------- Thu May 4 11:26:04 UTC 2023 - Dominique Leuenberger diff --git a/elixir.spec b/elixir.spec index 5e4d9e8..654ed73 100644 --- a/elixir.spec +++ b/elixir.spec @@ -17,7 +17,7 @@ Name: elixir -Version: 1.14.2 +Version: 1.15.7 Release: 0 Summary: Functional meta-programming aware language built atop Erlang License: Apache-2.0 @@ -25,10 +25,12 @@ Group: Development/Languages/Other URL: http://elixir-lang.org Source0: https://github.com/elixir-lang/elixir/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source2: macros.elixir +Patch0: 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch +Patch1: 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch BuildRequires: gcc BuildRequires: make -Requires: erlang >= 23 -BuildRequires: erlang >= 23 +Requires: erlang >= 24 +BuildRequires: erlang >= 24 BuildRequires: erlang-dialyzer BuildRequires: erlang-src # required by Mix.SCM.Git see also (https://github.com/elixir-lang/elixir/issues/1386) @@ -64,6 +66,8 @@ Elixir source code. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build # Elixir wants UTF-8 locale, force it From 1a8ef9cb5a4302bd46fc394e0cbf6980781c879ca6e53928a90d9fb02c73b9d9 Mon Sep 17 00:00:00 2001 From: Matwey Kornilov Date: Thu, 16 Nov 2023 14:18:54 +0000 Subject: [PATCH 2/3] Accepting request 1125398 from home:simotek:branches:devel:languages:erlang - swap to %autosetup OBS-URL: https://build.opensuse.org/request/show/1125398 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/elixir?expand=0&rev=89 --- elixir-doc.changes | 5 +++++ elixir-doc.spec | 2 +- elixir.changes | 5 +++++ elixir.spec | 4 +--- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/elixir-doc.changes b/elixir-doc.changes index aaefe35..bb50f88 100644 --- a/elixir-doc.changes +++ b/elixir-doc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 13 06:46:25 UTC 2023 - Simon Lees + +- swap to %autosetup + ------------------------------------------------------------------- Wed Dec 19 18:56:20 UTC 2018 - matwey.kornilov@gmail.com diff --git a/elixir-doc.spec b/elixir-doc.spec index 8ed318e..ecbddd2 100644 --- a/elixir-doc.spec +++ b/elixir-doc.spec @@ -35,7 +35,7 @@ Requires: elixir = %{version} Documentation for the Elixir language. %prep -%setup -q -n elixir-%{version} +%autosetup -n elixir-%{version} -p1 %build # Elixir wants UTF-8 locale, force it diff --git a/elixir.changes b/elixir.changes index fd00b3c..395fcfb 100644 --- a/elixir.changes +++ b/elixir.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 13 06:45:28 UTC 2023 - Simon Lees + +- Switch from %patch0 to %autosetup + ------------------------------------------------------------------- Sat Nov 11 10:23:18 UTC 2023 - Matwey Kornilov diff --git a/elixir.spec b/elixir.spec index 654ed73..16cd975 100644 --- a/elixir.spec +++ b/elixir.spec @@ -65,9 +65,7 @@ Elixir source code. %define elixirdir %{_prefix}/lib/elixir %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 %build # Elixir wants UTF-8 locale, force it From 7c4a1f521c5b8a760679863017f3b6443644b1091364f67ad6d33b2b7dd30da0 Mon Sep 17 00:00:00 2001 From: Matwey Kornilov Date: Sat, 25 Nov 2023 14:26:16 +0000 Subject: [PATCH 3/3] Accepting request 1127963 from home:matwey:branches:devel:languages:erlang Use pregenerated documentation OBS-URL: https://build.opensuse.org/request/show/1127963 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/elixir?expand=0&rev=90 --- _multibuild | 4 ---- elixir-1.15.7-doc.zip | 3 +++ elixir-doc.changes | 15 ------------ elixir-doc.spec | 56 ------------------------------------------- elixir.changes | 5 ++++ elixir.spec | 40 ++++++++++++++++++++++--------- 6 files changed, 37 insertions(+), 86 deletions(-) delete mode 100644 _multibuild create mode 100644 elixir-1.15.7-doc.zip delete mode 100644 elixir-doc.changes delete mode 100644 elixir-doc.spec diff --git a/_multibuild b/_multibuild deleted file mode 100644 index 3d08dc7..0000000 --- a/_multibuild +++ /dev/null @@ -1,4 +0,0 @@ - - elixir-doc - - diff --git a/elixir-1.15.7-doc.zip b/elixir-1.15.7-doc.zip new file mode 100644 index 0000000..e16a95d --- /dev/null +++ b/elixir-1.15.7-doc.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:115afa2842dd630dd15c6488849007b6f08bb661d072a812d53b11e5f4f6dfdf +size 4246858 diff --git a/elixir-doc.changes b/elixir-doc.changes deleted file mode 100644 index bb50f88..0000000 --- a/elixir-doc.changes +++ /dev/null @@ -1,15 +0,0 @@ -------------------------------------------------------------------- -Mon Nov 13 06:46:25 UTC 2023 - Simon Lees - -- swap to %autosetup - -------------------------------------------------------------------- -Wed Dec 19 18:56:20 UTC 2018 - matwey.kornilov@gmail.com - -- Set License to Apache-2.0. - I have not found where did ErlPL come from. - -------------------------------------------------------------------- -Mon Dec 10 11:16:45 UTC 2018 - matwey.kornilov@gmail.com - -- Add elixir-doc.changes diff --git a/elixir-doc.spec b/elixir-doc.spec deleted file mode 100644 index ecbddd2..0000000 --- a/elixir-doc.spec +++ /dev/null @@ -1,56 +0,0 @@ -# -# spec file for package elixir-doc -# -# Copyright (c) 2023 SUSE LLC -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ -# - - -Name: elixir-doc -Version: 1.15.7 -Release: 0 -Summary: Documentation for elixir -License: Apache-2.0 -Group: Documentation/Other -URL: http://elixir-lang.org -Source0: https://github.com/elixir-lang/elixir/archive/v%{version}.tar.gz#/elixir-%{version}.tar.gz -BuildRequires: elixir -BuildRequires: elixir-ex_doc -BuildRequires: unzip -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch -Requires: elixir = %{version} - -%description -Documentation for the Elixir language. - -%prep -%autosetup -n elixir-%{version} -p1 - -%build -# Elixir wants UTF-8 locale, force it -export LANG=en_US.UTF-8 -ex_doc "Elixir" "%{version}" "lib/elixir/ebin" -m "Kernel" -u "https://github.com/elixir-lang/elixir" -o doc/elixir -p http://elixir-lang.org/docs.html -ex_doc "EEx" "%{version}" "lib/eex/ebin" -m "EEx" -u "https://github.com/elixir-lang/elixir" -o doc/eex -p http://elixir-lang.org/docs.html -ex_doc "Mix" "%{version}" "lib/mix/ebin" -m "Mix" -u "https://github.com/elixir-lang/elixir" -o doc/mix -p http://elixir-lang.org/docs.html -ex_doc "IEx" "%{version}" "lib/iex/ebin" -m "IEx" -u "https://github.com/elixir-lang/elixir" -o doc/iex -p http://elixir-lang.org/docs.html -ex_doc "ExUnit" "%{version}" "lib/ex_unit/ebin" -m "ExUint" -u "https://github.com/elixir-lang/elixir" -o doc/ex_unit -p http://elixir-lang.org/docs.html -ex_doc "Logger" "%{version}" "lib/logger/ebin" -m "Logger" -u "https://github.com/elixir-lang/elixir" -o doc/logger -p http://elixir-lang.org/docs.html - -%install - -%files -%defattr(-,root,root) -%doc doc - -%changelog diff --git a/elixir.changes b/elixir.changes index 395fcfb..a087730 100644 --- a/elixir.changes +++ b/elixir.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 21 15:47:29 UTC 2023 - Matwey Kornilov + +- Use pregenerated documentation + ------------------------------------------------------------------- Mon Nov 13 06:45:28 UTC 2023 - Simon Lees diff --git a/elixir.spec b/elixir.spec index 16cd975..3494709 100644 --- a/elixir.spec +++ b/elixir.spec @@ -16,6 +16,8 @@ # +%define elixirdir %{_prefix}/lib/elixir + Name: elixir Version: 1.15.7 Release: 0 @@ -23,10 +25,12 @@ Summary: Functional meta-programming aware language built atop Erlang License: Apache-2.0 Group: Development/Languages/Other URL: http://elixir-lang.org -Source0: https://github.com/elixir-lang/elixir/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/elixir-lang/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: https://github.com/elixir-lang/%{name}/releases/download/v%{version}/Docs.zip#/%{name}-%{version}-doc.zip Source2: macros.elixir Patch0: 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch Patch1: 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch +BuildRequires: fdupes BuildRequires: gcc BuildRequires: make Requires: erlang >= 24 @@ -54,19 +58,21 @@ Finally, Elixir and Erlang share the same bytecode and data types. This means one can invoke Erlang code from Elixir (and vice-versa) without any conversion or performance impact. -%package src -Summary: Elixir programming language sources -Group: Development/Sources -Requires: %{name} = %{version} +%package doc +Summary: Documentation for elixir +Group: Documentation/Other +BuildArch: noarch +Requires: elixir = %{version} -%description src -Elixir source code. - -%define elixirdir %{_prefix}/lib/elixir +%description doc +Documentation for the Elixir language. %prep %autosetup -p1 +unzip -o %{SOURCE1} +find doc \( -name ".build" -or -name ".ex_doc" \) -delete + %build # Elixir wants UTF-8 locale, force it export LANG=en_US.UTF-8 @@ -75,14 +81,21 @@ make %install make install DESTDIR=%{buildroot} PREFIX=%{_prefix} -# install -D -m 0644 -# Relink + +mkdir -p %{buildroot}%{_bindir} for I in iex elixir elixirc mix do ln -sf %{elixirdir}/bin/$I %{buildroot}%{_bindir}/$I done + install -D -m 0644 %{S:2} %{buildroot}%{_rpmmacrodir}/macros.elixir +mkdir -p %{buildroot}%{_defaultdocdir} +cp -pa doc %{buildroot}%{_defaultdocdir}/elixir-doc + +%fdupes -s %{buildroot}/%{_mandir} +%fdupes %{buildroot}/%{_prefix} + %check export LANG=en_US.UTF-8 make test @@ -109,4 +122,9 @@ make test %{elixirdir}/lib/* %{_rpmmacrodir}/macros.elixir +%files doc +%defattr(-,root,root) +%license LICENSE +%{_defaultdocdir}/elixir-doc + %changelog