#1 Change the license to ASL 2.0 only; Package man pages and HTML documentation
Closed 2 years ago by fnux. Opened 2 years ago by fnux.
rpms/ fnux/elixir master  into  master

@@ -0,0 +1,65 @@ 

+ --- lib/iex/test/iex/helpers_test.exs.orig	2018-05-07 12:36:01.000000000 +0200

+ +++ lib/iex/test/iex/helpers_test.exs	2018-06-07 10:20:27.196176134 +0200

+ @@ -195,30 +195,38 @@

+                 ~r/#{@elixir_erl}:\d+$/

+      end

+  

+ -    test "opens OTP lists module" do

+ -      assert capture_iex("open(:lists)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/

+ -    end

+ -

+ -    test "opens OTP lists module.function" do

+ -      assert capture_iex("open(:lists.reverse)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/

+ -    end

+ -

+ -    test "opens OTP lists module.function/arity" do

+ -      assert capture_iex("open(:lists.reverse/1)") |> maybe_trim_quotes() =~

+ -               ~r/#{@lists_erl}:\d+$/

+ -    end

+ -

+ -    test "opens OTP httpc module" do

+ -      assert capture_iex("open(:httpc)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/

+ -    end

+ -

+ -    test "opens OTP httpc module.function" do

+ -      assert capture_iex("open(:httpc.request)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/

+ -    end

+ -

+ -    test "opens OTP httpc module.function/arity" do

+ -      assert capture_iex("open(:httpc.request/1)") |> maybe_trim_quotes() =~

+ -               ~r/#{@httpc_erl}:\d+$/

+ +    # Some installations remove the source file once Erlang is compiled. See #7348.

+ +    if File.regular?(@lists_erl) do

+ +      test "opens OTP lists module" do

+ +        assert capture_iex("open(:lists)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/

+ +      end

+ +

+ +      test "opens OTP lists module.function" do

+ +        assert capture_iex("open(:lists.reverse)") |> maybe_trim_quotes() =~

+ +                 ~r/#{@lists_erl}:\d+$/

+ +      end

+ +

+ +      test "opens OTP lists module.function/arity" do

+ +        assert capture_iex("open(:lists.reverse/1)") |> maybe_trim_quotes() =~

+ +                 ~r/#{@lists_erl}:\d+$/

+ +      end

+ +    end

+ +

+ +    # Some installations remove the source file once Erlang is compiled. See #7348.

+ +    if File.regular?(@httpc_erl) do

+ +      test "opens OTP httpc module" do

+ +        assert capture_iex("open(:httpc)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/

+ +      end

+ +

+ +      test "opens OTP httpc module.function" do

+ +        assert capture_iex("open(:httpc.request)") |> maybe_trim_quotes() =~

+ +                 ~r/#{@httpc_erl}:\d+$/

+ +      end

+ +

+ +      test "opens OTP httpc module.function/arity" do

+ +        assert capture_iex("open(:httpc.request/1)") |> maybe_trim_quotes() =~

+ +                 ~r/#{@httpc_erl}:\d+$/

+ +      end

+      end

+  

+      test "errors OTP preloaded module" do

file modified
+20 -6

@@ -2,7 +2,7 @@ 

  

  Name:           elixir

  Version:        1.6.5

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        A modern approach to programming for the Erlang VM

  

  Group:          Development/Languages

@@ -11,6 +11,9 @@ 

  

  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

+ # Backported from upstream:

+ # https://github.com/elixir-lang/elixir/pull/7711

+ Patch0:         elixir-1.6.5-disable_tests_on_erlang_sources_if_unavailable.patch

  #BuildArch:      noarch

  BuildRequires:  erlang-rebar

  BuildRequires:  git

@@ -38,23 +41,29 @@ 

  

  # Unpack elixir itself (Source0)

  %setup -q -D

- sed -i -e "s/time //g" Makefile

+ %patch0

+ 

+ # Remove windows-specific scripts

  find -name '*.bat' -exec rm \{\} \;

  

  # This contains a failing test. We want `make test` for most tests, but

  # this deals with ANSI codes which rpmbuild strips.

  rm lib/elixir/test/elixir/io/ansi_test.exs

  

+ # Let the Makefile speak!

+ sed -i 's/$(Q)//g' Makefile

+ 

  %build

  export LANG="en_US.UTF-8"

- %{rebar_compile}

- 

- # This target requires `sed`.

+ export REBAR=/usr/bin/rebar

+ export ERL_LIBS=/usr/share/erlang/lib/

+ export REBAR_DEPS_PREFER_LIBS=TRUE

+ make compile

  make build_man

  

  %check

  export LANG="en_US.UTF-8"

- %{rebar_eunit}

+ make test

  

  %install

  mkdir -p %{buildroot}/%{_datadir}/%{name}/%{version}

@@ -91,6 +100,11 @@ 

  %doc docs/doc/eex docs/doc/elixir docs/doc/iex docs/doc/logger docs/doc/mix

  

  %changelog

+ * Thu Jun 07 2018 Timothée Floure <fnux@fedoraproject.org> - 1.6.5-2

+ - Switch from the rebar_* macros to upstream's makefile (without forgetting to

+   properly set the environment) and fix the build section.

+ - Backport patch0 from upstream to fix some failing tests.

+ 

  * Wed May 23 2018 Peter Lemenkov <lemenkov@gmail.com> - 1.6.5-1

  - New upstream release

  

This PR address a few issues:
* Upstream changed the license fromASL 2.0 and ERP to ASL 2.0 only. I did not find an official announcement but this commit should be enough.
* Package the man pages. (Bugzilla Bug 1517850)
* Package the HTML documentation in the elixir-doc subpackage. (Bugzilla Bug 1519195)

Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=26697164

I will (in a few days) submit separate PRs fixing rpmlint's errors and updating to the latest upstream version.

This all sounds reasonable to me. +1

Hum. I merged myself and pushed to master... but pagure didn't match it to this PR. How was I suppposed to do ?

I might have gone a bit to fast merging myself, I forgot we're more than 2 maintainers here. Sorry about that !

rebased onto 9cd769b

2 years ago

It doesn't make any sense to keep this PR around.

Pull-Request has been closed by fnux

2 years ago