From eeb9b42a548d796ffd4c3c24da9953a310a62880 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: May 16 2012 09:43:45 +0000 Subject: Ver. 1.1.1 (Incompatible with R13B and below) Signed-off-by: Peter Lemenkov --- diff --git a/.gitignore b/.gitignore index 1406dfc..cf1191c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,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 diff --git a/erlang-oauth-0001-Use-http-instead-of-httpc-in-old-Erlang.patch b/erlang-oauth-0001-Use-http-instead-of-httpc-in-old-Erlang.patch deleted file mode 100644 index e4d7bae..0000000 --- a/erlang-oauth-0001-Use-http-instead-of-httpc-in-old-Erlang.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 598b3bf3de345e40a0c2942c77c24f37353b3cec Mon Sep 17 00:00:00 2001 -From: Peter Lemenkov -Date: Fri, 26 Nov 2010 23:44:29 +0300 -Subject: [PATCH] Use http instead of httpc in old Erlang - -Signed-off-by: Peter Lemenkov ---- - src/oauth_client.erl | 2 +- - src/oauth_http.erl | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/oauth_client.erl b/src/oauth_client.erl -index 2bd24c0..73a7869 100644 ---- a/src/oauth_client.erl -+++ b/src/oauth_client.erl -@@ -68,7 +68,7 @@ oauth_get(header, URL, Params, Consumer, Token, TokenSecret) -> - Signed = oauth:signed_params("GET", URL, Params, Consumer, Token, TokenSecret), - {AuthorizationParams, QueryParams} = lists:partition(fun({K, _}) -> lists:prefix("oauth_", K) end, Signed), - Request = {oauth:uri(URL, QueryParams), [oauth:header(AuthorizationParams)]}, -- httpc:request(get, Request, [{autoredirect, false}], []); -+ http:request(get, Request, [{autoredirect, false}], []); - oauth_get(querystring, URL, Params, Consumer, Token, TokenSecret) -> - oauth:get(URL, Params, Consumer, Token, TokenSecret). - -diff --git a/src/oauth_http.erl b/src/oauth_http.erl -index 92c806c..bf5a4ba 100644 ---- a/src/oauth_http.erl -+++ b/src/oauth_http.erl -@@ -10,7 +10,7 @@ post(URL, Data) -> - request(post, {URL, [], "application/x-www-form-urlencoded", Data}). - - request(Method, Request) -> -- httpc:request(Method, Request, [{autoredirect, false}], []). -+ http:request(Method, Request, [{autoredirect, false}], []). - - response_params(Response) -> - oauth_uri:params_from_string(response_body(Response)). --- -1.7.2.3 - diff --git a/erlang-oauth-0001-add-support-of-erlang-R15B-in-oauth.patch b/erlang-oauth-0001-add-support-of-erlang-R15B-in-oauth.patch new file mode 100644 index 0000000..8e026c5 --- /dev/null +++ b/erlang-oauth-0001-add-support-of-erlang-R15B-in-oauth.patch @@ -0,0 +1,25 @@ +From aeb614640b98e85c8cdb6c20f54761b154d610d0 Mon Sep 17 00:00:00 2001 +From: benoitc +Date: Mon, 2 Jan 2012 17:39:01 +0100 +Subject: [PATCH 1/1] add support of erlang R15B in oauth. + +--- + src/oauth_uri.erl | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/oauth_uri.erl b/src/oauth_uri.erl +index 5c33a1e..7d51bba 100644 +--- a/src/oauth_uri.erl ++++ b/src/oauth_uri.erl +@@ -7,6 +7,8 @@ + + normalize(URI) -> + case http_uri:parse(URI) of ++ {ok, {Scheme, UserInfo, Host, Port, Path, _Query}} -> % R15B ++ normalize(Scheme, UserInfo, string:to_lower(Host), Port, [Path]); + {Scheme, UserInfo, Host, Port, Path, _Query} -> + normalize(Scheme, UserInfo, string:to_lower(Host), Port, [Path]); + Else -> +-- +1.7.10.1 + diff --git a/erlang-oauth.spec b/erlang-oauth.spec index 2412801..143bf0b 100644 --- a/erlang-oauth.spec +++ b/erlang-oauth.spec @@ -1,28 +1,34 @@ %global realname oauth +%global upstream tim %global debug_package %{nil} -%global git_tag 2c9269b +%global git_tag 18cee77 +%global patchnumber 0 Name: erlang-%{realname} -Version: 1.0.1 -Release: 3%{?dist} +Version: 1.1.1 +Release: 1%{?dist} Summary: An Erlang OAuth implementation Group: Development/Languages License: MIT URL: http://github.com/tim/erlang-oauth -# wget --no-check-certificate https://github.com/tim/erlang-oauth/tarball/v1.0.1 -Source0: tim-%{name}-v%{version}-0-g%{git_tag}.tar.gz -Patch1: erlang-oauth-0001-Use-http-instead-of-httpc-in-old-Erlang.patch +# 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) BuildRequires: erlang-erts -BuildRequires: erlang-public_key >= R12B +BuildRequires: erlang-public_key BuildRequires: erlang-tools Requires: erlang-crypto Requires: erlang-erts +# Error:erlang(httpc:request/4) in R12B and below Requires: erlang-inets Requires: erlang-kernel -Requires: erlang-public_key >= R12B -Requires: erlang-stdlib >= R12B +# Error:erlang(public_key:pem_decode/1) in R13B and below +# Error:erlang(public_key:pem_entry_decode/1) in R13B and below +# Error:erlang(public_key:verify/4) in R13B and below +Requires: erlang-public_key >= R14B +Requires: erlang-stdlib Requires: erlang-xmerl @@ -31,11 +37,8 @@ An Erlang OAuth implementation. %prep -%setup -q -n tim-%{name}-%{git_tag} -%if 0%{?el5} -# Erlang/OTP R12B5 -%patch1 -p1 -b .no_httpc_request_4 -%endif +%setup -q -n %{upstream}-%{name}-%{git_tag} +%patch1 -p1 -b .R15B %build @@ -54,7 +57,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc License.txt README.txt +%doc License.txt README.txt THANKS.txt %dir %{_libdir}/erlang/lib/%{realname}-%{version} %dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app @@ -64,11 +67,13 @@ rm -rf $RPM_BUILD_ROOT %{_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}_unix.beam %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}_uri.beam %changelog +* Mon May 16 2011 Peter Lemenkov - 1.1.1-1 +- Ver. 1.1.1 (Incompatible with Erlang/OTP < R14B) + * Fri Jan 13 2012 Fedora Release Engineering - 1.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index 97aafe8..9cc6e22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -401394d0a1f25d24467e1d7a909c870f tim-erlang-oauth-v1.0.1-0-g2c9269b.tar.gz +3f55b5ed326ab1317f2588f908235012 tim-erlang-oauth-v1.1.1-0-g18cee77.tar.gz