[elixir] Patch around a failing test
by Ricky Elrod
commit 0098cb90d1ba81203b2c379f8ec78550293d52ab
Author: Ricky Elrod <ricky(a)elrod.me>
Date: Sat Jan 11 04:49:51 2014 -0500
Patch around a failing test
elixir.spec | 5 +++++
mix-test-nogit.patch | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/elixir.spec b/elixir.spec
index d50c791..a726a18 100644
--- a/elixir.spec
+++ b/elixir.spec
@@ -16,6 +16,10 @@ BuildRequires: git
Requires: erlang-erts >= R16B
Requires: erlang-inets
+# https://github.com/elixir-lang/elixir/commit/407427f627f7d07f6a6275978b9d...
+# This just fixes a test that failed when it wasn't run from a git clone of Elixir.
+Patch0: mix-test-nogit.patch
+
%description
Elixir is a programming language built on top of the Erlang VM.
As Erlang, it is a functional language built to support distributed,
@@ -23,6 +27,7 @@ fault-tolerant, non-stop applications with hot code swapping.
%prep
%setup -q
+%patch0 -p1
rm rebar
sed -i '/REBAR := /d' Makefile
sed -i '1i REBAR := "$(shell which rebar || echo `pwd`/rebar)"' Makefile
diff --git a/mix-test-nogit.patch b/mix-test-nogit.patch
new file mode 100644
index 0000000..c995edf
--- /dev/null
+++ b/mix-test-nogit.patch
@@ -0,0 +1,17 @@
+diff --git a/lib/mix/lib/mix/scm/git.ex b/lib/mix/lib/mix/scm/git.ex
+index f67086f..47881b5 100644
+--- a/lib/mix/lib/mix/scm/git.ex
++++ b/lib/mix/lib/mix/scm/git.ex
+@@ -143,9 +143,10 @@ defmodule Mix.SCM.Git do
+ end
+
+ defp get_rev_info do
+- [origin, rev] = System.cmd('git config remote.origin.url && git rev-parse --verify --quiet HEAD')
+- |> iolist_to_binary
+- |> String.split("\n", trim: true)
++ destructure [origin, rev],
++ System.cmd('git config remote.origin.url && git rev-parse --verify --quiet HEAD')
++ |> iolist_to_binary
++ |> String.split("\n", trim: true)
+ [ origin: origin, rev: rev ]
+ end
10 years, 3 months
[elixir] Latest elixir release
by Ricky Elrod
commit 9c7b00fbd3b58bca40f71c01a2745eac47563fe2
Author: Ricky Elrod <ricky(a)elrod.me>
Date: Sat Jan 11 03:28:11 2014 -0500
Latest elixir release
.gitignore | 1 +
elixir.spec | 12 +++++-------
sources | 2 +-
3 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c38106d..28de9d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/elixir-0.11.0.tar.gz
/elixir-0.11.2.tar.gz
/elixir-0.12.0.tar.gz
+/elixir-0.12.1.tar.gz
diff --git a/elixir.spec b/elixir.spec
index e963020..d50c791 100644
--- a/elixir.spec
+++ b/elixir.spec
@@ -1,5 +1,5 @@
Name: elixir
-Version: 0.12.0
+Version: 0.12.1
Release: 1%{?dist}
Summary: A modern approach to programming for the Erlang VM
@@ -8,12 +8,7 @@ Group: Development/Languages
License: ASL 2.0 and ERPL
URL: http://elixir-lang.org/
-# Source0 retrieved by pulling a Github tarball.
-# You can obtain the source code by executing:
-# git clone git://github.com/elixir-lang/elixir.git
-# git checkout v0.12.0
-
-Source0: %{name}-%{version}.tar.gz
+Source0: https://github.com/elixir-lang/elixir/archive/v0.12.1/%{name}-%{version}....
BuildArch: noarch
BuildRequires: erlang >= R16B
BuildRequires: erlang-rebar
@@ -61,6 +56,9 @@ ln -s %{_datadir}/%{name}/%{version}/bin/{elixir,elixirc,iex,mix} %{buildroot}/%
%{_datadir}/%{name}
%changelog
+* Sat Jan 11 2014 Ricky Elrod <codeblock(a)fedoraproject.org> - 0.12.1-1
+- Update to upstream 0.12.1.
+
* Sun Dec 15 2013 Ricky Elrod <codeblock(a)fedoraproject.org> - 0.12.0-1
- Update to upstream 0.12.0.
diff --git a/sources b/sources
index 58bf5bf..49e8a0a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6a5eae88e7576f4180dd9698e5c6b175 elixir-0.12.0.tar.gz
+b403769f5c9e47aa6d159405f8ec66f4 elixir-0.12.1.tar.gz
10 years, 3 months
[erlang-oauth/f20] Ver. 1.4.0
by Peter Lemenkov
Summary of changes:
8f486f4... Ver. 1.4.0 (*)
(*) This commit already existed in another branch; no separate mail sent
10 years, 3 months
[erlang-oauth] Ver. 1.4.0
by Peter Lemenkov
commit 8f486f4afad910f44d9a556f72777d4e35ecd1ae
Author: Peter Lemenkov <lemenkov(a)gmail.com>
Date: Fri Jan 10 16:56:03 2014 +0400
Ver. 1.4.0
- Ver. 1.4.0 (API incompatible update)
- Removed compatibility with Fedora < 12, RHEL < 6
Signed-off-by: Peter Lemenkov <lemenkov(a)gmail.com>
.gitignore | 1 +
...time-switching-with-parse_transform-rewri.patch | 92 ++++++++++++++++++++
...-0001-add-support-of-erlang-R15B-in-oauth.patch | 25 ------
erlang-oauth.spec | 40 +++------
sources | 2 +-
5 files changed, 107 insertions(+), 53 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cf1191c..6a70dd5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ erlang-oauth-0.gite8aecf0.tar.bz2
/tim-erlang-oauth-7d85d3e.tar.gz
/tim-erlang-oauth-v1.0.1-0-g2c9269b.tar.gz
/tim-erlang-oauth-v1.1.1-0-g18cee77.tar.gz
+/erlang-oauth-1.4.0.tar.gz
diff --git a/erlang-oauth-0001-Replace-runtime-switching-with-parse_transform-rewri.patch b/erlang-oauth-0001-Replace-runtime-switching-with-parse_transform-rewri.patch
new file mode 100644
index 0000000..85b0135
--- /dev/null
+++ b/erlang-oauth-0001-Replace-runtime-switching-with-parse_transform-rewri.patch
@@ -0,0 +1,92 @@
+From: Tim Fletcher <mail(a)tfletcher.com>
+Date: Wed, 18 Sep 2013 17:57:06 +0100
+Subject: [PATCH] Replace runtime switching with parse_transform rewriting of
+ crypto:hmac/3
+
+
+diff --git a/Emakefile b/Emakefile
+index a961122..9665af7 100644
+--- a/Emakefile
++++ b/Emakefile
+@@ -1 +1,3 @@
+-{"src/*", [debug_info, warn_unused_vars, warn_unused_import, {outdir, "ebin"}]}.
+\ No newline at end of file
++{"src/crypto_sha_mac.erl", []}.
++
++{"src/oauth.erl", [debug_info, warn_unused_vars, warn_unused_import, {outdir, "ebin"}, {parse_transform, crypto_sha_mac}]}.
+diff --git a/Makefile b/Makefile
+index e4b31b9..b9310b3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ all: clean compile
+
+ clean:
+- @rm -rf ebin/*.beam
++ @rm -rf ebin/*.beam *.beam
+
+ compile:
+ @test -d ebin || mkdir ebin
+diff --git a/src/crypto_sha_mac.erl b/src/crypto_sha_mac.erl
+new file mode 100644
+index 0000000..1eb917f
+--- /dev/null
++++ b/src/crypto_sha_mac.erl
+@@ -0,0 +1,29 @@
++-module(crypto_sha_mac).
++
++-export([parse_transform/2]).
++
++parse_transform(Forms, _Options) ->
++ application:load(crypto),
++ crypto:start(),
++ case erlang:function_exported(crypto, hmac, 3) of
++ true ->
++ Forms;
++ false ->
++ io:format("Rewriting crypto:hmac/3 calls with crypto_sha_mac parse transform~n", []),
++ lists:map(fun rewrite/1, Forms)
++ end.
++
++rewrite(Function={function, _, _, _, Clauses}) ->
++ setelement(5, Function, recursive_rewrite(Clauses));
++rewrite(Form) ->
++ Form.
++
++recursive_rewrite(Terms) when is_list(Terms) ->
++ lists:map(fun recursive_rewrite/1, Terms);
++recursive_rewrite({call, L1, {remote, L2, {atom, L3, crypto}, {atom, L4, hmac}}, [{atom, _, sha} | Args]}) ->
++ {call, L1, {remote, L2, {atom, L3, crypto}, {atom, L4, sha_mac}}, Args};
++recursive_rewrite(Term) when is_tuple(Term) ->
++ [Type, Line | Elements] = tuple_to_list(Term),
++ list_to_tuple([Type, Line | lists:map(fun recursive_rewrite/1, Elements)]);
++recursive_rewrite(Term) ->
++ Term.
+diff --git a/src/oauth.erl b/src/oauth.erl
+index d9234f4..d5de04b 100644
+--- a/src/oauth.erl
++++ b/src/oauth.erl
+@@ -128,7 +128,7 @@ hmac_sha1_signature(HttpMethod, URL, Params, Consumer, TokenSecret) ->
+
+ hmac_sha1_signature(BaseString, Consumer, TokenSecret) ->
+ Key = uri_join([consumer_secret(Consumer), TokenSecret]),
+- base64:encode_to_string(hmac_sha(Key, BaseString)).
++ base64:encode_to_string(crypto:hmac(sha, Key, BaseString)).
+
+ hmac_sha1_verify(Signature, HttpMethod, URL, Params, Consumer, TokenSecret) ->
+ verify_in_constant_time(Signature, hmac_sha1_signature(HttpMethod, URL, Params, Consumer, TokenSecret)).
+@@ -136,14 +136,6 @@ hmac_sha1_verify(Signature, HttpMethod, URL, Params, Consumer, TokenSecret) ->
+ hmac_sha1_verify(Signature, BaseString, Consumer, TokenSecret) ->
+ verify_in_constant_time(Signature, hmac_sha1_signature(BaseString, Consumer, TokenSecret)).
+
+-hmac_sha(Key, Data) ->
+- case erlang:function_exported(crypto, hmac, 3) of
+- true ->
+- crypto:hmac(sha, Key, Data);
+- false ->
+- crypto:sha_mac(Key, Data)
+- end.
+-
+ rsa_sha1_signature(HttpMethod, URL, Params, Consumer) ->
+ BaseString = signature_base_string(HttpMethod, URL, Params),
+ rsa_sha1_signature(BaseString, Consumer).
diff --git a/erlang-oauth.spec b/erlang-oauth.spec
index 3c80a2b..23ff82e 100644
--- a/erlang-oauth.spec
+++ b/erlang-oauth.spec
@@ -1,21 +1,16 @@
%global realname oauth
-%global upstream tim
%global debug_package %{nil}
-%global git_tag 18cee77
-%global patchnumber 0
Name: erlang-%{realname}
-Version: 1.1.1
-Release: 4%{?dist}
+Version: 1.4.0
+Release: 1%{?dist}
Summary: An Erlang OAuth implementation
Group: Development/Languages
License: MIT
-URL: http://github.com/tim/erlang-oauth
-# wget --no-check-certificate --content-disposition https://github.com/tim/erlang-oauth/tarball/v1.1.1
-Source0: %{upstream}-erlang-%{realname}-v%{version}-%{patchnumber}-g%{git_tag}.tar.gz
-Patch1: erlang-oauth-0001-add-support-of-erlang-R15B-in-oauth.patch
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+URL: https://github.com/tim/erlang-oauth
+Source0: https://github.com/tim/erlang-oauth/archive/v%{version}/%{name}-%{version...
+Patch1: erlang-oauth-0001-Replace-runtime-switching-with-parse_transform-rewri.patch
BuildRequires: erlang-erts
BuildRequires: erlang-public_key
BuildRequires: erlang-tools
@@ -29,7 +24,6 @@ Requires: erlang-kernel
# Error:erlang(public_key:verify/4) in R13B and below
Requires: erlang-public_key >= R14B
Requires: erlang-stdlib
-Requires: erlang-xmerl
%description
@@ -37,8 +31,8 @@ An Erlang OAuth implementation.
%prep
-%setup -q -n %{upstream}-%{name}-%{git_tag}
-%patch1 -p1 -b .R15B
+%setup -q
+%patch1 -p1 -b .R16B01
%build
@@ -46,31 +40,23 @@ make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
install -D -m 644 ebin/%{realname}.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
-install -m 644 ebin/*.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+install -D -m 644 ebin/%{realname}.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.beam
%files
-%defattr(-,root,root,-)
-%doc License.txt README.txt THANKS.txt
+%doc CHANGELOG.md License.txt README.md THANKS.txt
%dir %{_libdir}/erlang/lib/%{realname}-%{version}
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.beam
-%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_client.beam
-%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_hmac_sha1.beam
-%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_http.beam
-%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_plaintext.beam
-%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_rsa_sha1.beam
-%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_uri.beam
%changelog
+* Fri Jan 10 2014 Peter Lemenkov <lemenkov(a)gmail.com> - 1.4.0-1
+- Ver. 1.4.0 (API incompatible update)
+- Removed compatibility with Fedora < 12, RHEL < 6
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 9cc6e22..4c3e534 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3f55b5ed326ab1317f2588f908235012 tim-erlang-oauth-v1.1.1-0-g18cee77.tar.gz
+ce6833322e1f02c4d0084395650a4d31 erlang-oauth-1.4.0.tar.gz
10 years, 3 months