diff --git a/.gitignore b/.gitignore index 00dea67..7a07874 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /basho-riak_control-0.1.2-0-gc7fd3a9.tar.gz /basho-riak_control-1.2.1-0-gef4ddb4.tar.gz +/basho-riak_control-1.3.0-0-gab681d7.tar.gz diff --git a/erlang-riak_control-0001-Fix-includes.patch b/erlang-riak_control-0001-Fix-includes.patch new file mode 100644 index 0000000..35f5df0 --- /dev/null +++ b/erlang-riak_control-0001-Fix-includes.patch @@ -0,0 +1,138 @@ +From 80ed96246ac4cd088ac4f172b7e275fb1a0a6317 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Thu, 26 Jul 2012 23:51:32 +0400 +Subject: [PATCH 1/1] Fix includes + +Signed-off-by: Peter Lemenkov +--- + src/admin_cluster_down.erl | 2 +- + src/admin_cluster_join.erl | 2 +- + src/admin_gui.erl | 2 +- + src/admin_node.erl | 2 +- + src/admin_node_leave.erl | 2 +- + src/admin_node_stop.erl | 2 +- + src/admin_nodes.erl | 2 +- + src/admin_partitions.erl | 2 +- + src/riak_control_session.erl | 2 +- + 9 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/admin_cluster_down.erl b/src/admin_cluster_down.erl +index a971449..fce953c 100644 +--- a/src/admin_cluster_down.erl ++++ b/src/admin_cluster_down.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_cluster_join.erl b/src/admin_cluster_join.erl +index 50c33a8..cfe2a41 100644 +--- a/src/admin_cluster_join.erl ++++ b/src/admin_cluster_join.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_gui.erl b/src/admin_gui.erl +index d1314e9..d6f5584 100644 +--- a/src/admin_gui.erl ++++ b/src/admin_gui.erl +@@ -31,7 +31,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_node.erl b/src/admin_node.erl +index 6eaa1bf..36e4ad9 100644 +--- a/src/admin_node.erl ++++ b/src/admin_node.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_node_leave.erl b/src/admin_node_leave.erl +index bf759a2..e04f51e 100644 +--- a/src/admin_node_leave.erl ++++ b/src/admin_node_leave.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_node_stop.erl b/src/admin_node_stop.erl +index a5fecdb..32b464e 100644 +--- a/src/admin_node_stop.erl ++++ b/src/admin_node_stop.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_nodes.erl b/src/admin_nodes.erl +index 44e889c..d393a27 100644 +--- a/src/admin_nodes.erl ++++ b/src/admin_nodes.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/admin_partitions.erl b/src/admin_partitions.erl +index 90383ce..59da3f2 100644 +--- a/src/admin_partitions.erl ++++ b/src/admin_partitions.erl +@@ -29,7 +29,7 @@ + ]). + + %% riak_control and webmachine dependencies +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + -include_lib("webmachine/include/webmachine.hrl"). + + %% mappings to the various content types supported for this resource +diff --git a/src/riak_control_session.erl b/src/riak_control_session.erl +index 2b34fcb..99e5cac 100644 +--- a/src/riak_control_session.erl ++++ b/src/riak_control_session.erl +@@ -48,7 +48,7 @@ + -export([get_my_info/0]). + + %% record definitions +--include_lib("riak_control/include/riak_control.hrl"). ++-include("../include/riak_control.hrl"). + + -record(state, + { vsn :: version(), +-- +1.8.1.4 + diff --git a/erlang-riak_control-0001-Typo-fix-no-such-function-gen_server-cast-3.patch b/erlang-riak_control-0001-Typo-fix-no-such-function-gen_server-cast-3.patch deleted file mode 100644 index e32d8fe..0000000 --- a/erlang-riak_control-0001-Typo-fix-no-such-function-gen_server-cast-3.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 125d07084b46461f8f794070670d11c83f615159 Mon Sep 17 00:00:00 2001 -From: Peter Lemenkov -Date: Fri, 29 Jun 2012 16:05:10 +0400 -Subject: [PATCH 1/5] Typo fix (no such function - gen_server:cast/3) - -Signed-off-by: Peter Lemenkov ---- - src/riak_control_session.erl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/riak_control_session.erl b/src/riak_control_session.erl -index cc551d9..2b34fcb 100644 ---- a/src/riak_control_session.erl -+++ b/src/riak_control_session.erl -@@ -88,7 +88,7 @@ get_partitions () -> - gen_server:call(?MODULE,get_partitions,infinity). - - force_update () -> -- gen_server:cast(?MODULE,update_ring,infinity). -+ gen_server:cast(?MODULE,update_ring). - - %% =================================================================== - %% gen_server callbacks --- -1.8.0 - diff --git a/erlang-riak_control-0002-Re-export-admin_ring-node_ring_details-2-back.patch b/erlang-riak_control-0002-Re-export-admin_ring-node_ring_details-2-back.patch deleted file mode 100644 index f80ad67..0000000 --- a/erlang-riak_control-0002-Re-export-admin_ring-node_ring_details-2-back.patch +++ /dev/null @@ -1,39 +0,0 @@ -From aee0f9c59ff802f9183ad14a9f1d6c300e26fe86 Mon Sep 17 00:00:00 2001 -From: Peter Lemenkov -Date: Fri, 29 Jun 2012 16:13:42 +0400 -Subject: [PATCH 2/5] Re-export admin_ring:node_ring_details/2 back - -Signed-off-by: Peter Lemenkov ---- - src/admin_node.erl | 2 +- - src/admin_ring.erl | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/admin_node.erl b/src/admin_node.erl -index f12575e..abe5920 100644 ---- a/src/admin_node.erl -+++ b/src/admin_node.erl -@@ -86,5 +86,5 @@ get_node_details(Req,C) -> - Node=target_node(Req), - {ok,Ring}=riak_core_ring_manager:get_my_ring(), - Indices=rpc:call(Node,riak_core_ring,my_indices,[Ring]), -- PS=[{struct,admin_ring:node_ring_details(Ring,{P,Node})} || P <- Indices], -+ PS=[{struct,admin_ring:node_ring_details(P,Node)} || P <- Indices], - {mochijson2:encode(PS),Req,C}. -diff --git a/src/admin_ring.erl b/src/admin_ring.erl -index ef811b1..867fc4a 100644 ---- a/src/admin_ring.erl -+++ b/src/admin_ring.erl -@@ -25,7 +25,8 @@ - to_json/2, - is_authorized/2, - service_available/2, -- forbidden/2 -+ forbidden/2, -+ node_ring_details/2 - ]). - - %% riak_control and webmachine dependencies --- -1.8.0 - diff --git a/erlang-riak_control-0003-Fix-includes.patch b/erlang-riak_control-0003-Fix-includes.patch deleted file mode 100644 index 425a099..0000000 --- a/erlang-riak_control-0003-Fix-includes.patch +++ /dev/null @@ -1,166 +0,0 @@ -From dde867867ee4942f3d8138f7c22c79aa09066512 Mon Sep 17 00:00:00 2001 -From: Peter Lemenkov -Date: Thu, 26 Jul 2012 23:51:32 +0400 -Subject: [PATCH 3/5] Fix includes - -Signed-off-by: Peter Lemenkov ---- - src/admin_cluster.erl | 2 +- - src/admin_cluster_down.erl | 2 +- - src/admin_cluster_join.erl | 2 +- - src/admin_fallbacks.erl | 2 +- - src/admin_gui.erl | 2 +- - src/admin_node.erl | 2 +- - src/admin_node_leave.erl | 2 +- - src/admin_node_stop.erl | 2 +- - src/admin_overview.erl | 2 +- - src/admin_ring.erl | 2 +- - src/riak_control_session.erl | 2 +- - 11 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/admin_cluster.erl b/src/admin_cluster.erl -index beaaf72..70c6fc0 100644 ---- a/src/admin_cluster.erl -+++ b/src/admin_cluster.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_cluster_down.erl b/src/admin_cluster_down.erl -index a971449..fce953c 100644 ---- a/src/admin_cluster_down.erl -+++ b/src/admin_cluster_down.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_cluster_join.erl b/src/admin_cluster_join.erl -index 50c33a8..cfe2a41 100644 ---- a/src/admin_cluster_join.erl -+++ b/src/admin_cluster_join.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_fallbacks.erl b/src/admin_fallbacks.erl -index 84d1eaa..51c4b3a 100644 ---- a/src/admin_fallbacks.erl -+++ b/src/admin_fallbacks.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_gui.erl b/src/admin_gui.erl -index ad60c9c..58fb3eb 100644 ---- a/src/admin_gui.erl -+++ b/src/admin_gui.erl -@@ -31,7 +31,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_node.erl b/src/admin_node.erl -index abe5920..05b7113 100644 ---- a/src/admin_node.erl -+++ b/src/admin_node.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_node_leave.erl b/src/admin_node_leave.erl -index bf759a2..e04f51e 100644 ---- a/src/admin_node_leave.erl -+++ b/src/admin_node_leave.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_node_stop.erl b/src/admin_node_stop.erl -index a5fecdb..32b464e 100644 ---- a/src/admin_node_stop.erl -+++ b/src/admin_node_stop.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_overview.erl b/src/admin_overview.erl -index 7e23755..d5bc8f8 100644 ---- a/src/admin_overview.erl -+++ b/src/admin_overview.erl -@@ -29,7 +29,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/admin_ring.erl b/src/admin_ring.erl -index 867fc4a..5ae3cae 100644 ---- a/src/admin_ring.erl -+++ b/src/admin_ring.erl -@@ -30,7 +30,7 @@ - ]). - - %% riak_control and webmachine dependencies ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - -include_lib("webmachine/include/webmachine.hrl"). - - %% mappings to the various content types supported for this resource -diff --git a/src/riak_control_session.erl b/src/riak_control_session.erl -index 2b34fcb..99e5cac 100644 ---- a/src/riak_control_session.erl -+++ b/src/riak_control_session.erl -@@ -48,7 +48,7 @@ - -export([get_my_info/0]). - - %% record definitions ---include_lib("riak_control/include/riak_control.hrl"). -+-include("../include/riak_control.hrl"). - - -record(state, - { vsn :: version(), --- -1.8.0 - diff --git a/erlang-riak_control-0004-Fedora-specific-remove-rebar-explicit-deps.patch b/erlang-riak_control-0004-Fedora-specific-remove-rebar-explicit-deps.patch deleted file mode 100644 index c10c50a..0000000 --- a/erlang-riak_control-0004-Fedora-specific-remove-rebar-explicit-deps.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bd5e30a1008f8d5a6869d9425c38d86fea5c54ee Mon Sep 17 00:00:00 2001 -From: Peter Lemenkov -Date: Sat, 28 Jul 2012 22:32:58 +0400 -Subject: [PATCH 4/5] Fedora-specific: remove rebar explicit deps - -Signed-off-by: Peter Lemenkov ---- - rebar.config | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/rebar.config b/rebar.config -index 1230dbf..5b46ea0 100644 ---- a/rebar.config -+++ b/rebar.config -@@ -2,8 +2,3 @@ - {erl_opts, [warnings_as_errors, debug_info]}. - {edoc_opts, [{preprocess, true}]}. - {cover_enabled, true}. --{deps, [ -- {webmachine, "1.9.2", {git, "git://github.com/basho/webmachine", {tag, "1.9.2p1"}}}, -- {riak_core, "1.2.*", {git, "git://github.com/basho/riak_core", {tag, "1.2.1"}}}, -- {erlydtl, "0.7.0", {git, "git://github.com/evanmiller/erlydtl.git", {tag, "8411bacd"}}} -- ]}. --- -1.8.0 - diff --git a/erlang-riak_control-0005-Do-not-require-secure-only-cookie.patch b/erlang-riak_control-0005-Do-not-require-secure-only-cookie.patch deleted file mode 100644 index bfd2f51..0000000 --- a/erlang-riak_control-0005-Do-not-require-secure-only-cookie.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d79429b40bc93206175ff57f8c44069a1759716e Mon Sep 17 00:00:00 2001 -From: Christopher Meiklejohn -Date: Wed, 3 Oct 2012 15:24:48 -0400 -Subject: [PATCH 5/5] Do not require secure only cookie. - ---- - src/admin_gui.erl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/admin_gui.erl b/src/admin_gui.erl -index 58fb3eb..d6f5584 100644 ---- a/src/admin_gui.erl -+++ b/src/admin_gui.erl -@@ -94,7 +94,7 @@ get_file(Req) -> - to_resource(Req,Ctx=index) -> - Token = riak_control_security:csrf_token(Req, Ctx), - {ok, Content} = index_dtl:render([{csrf_token, Token}]), -- {Content, wrq:set_resp_header("Set-Cookie", "csrf_token="++Token++"; secure; httponly", Req), Ctx}; -+ {Content, wrq:set_resp_header("Set-Cookie", "csrf_token="++Token++"; httponly", Req), Ctx}; - - %% respond to a file request - to_resource(Req,Ctx) -> --- -1.8.0 - diff --git a/erlang-riak_control.spec b/erlang-riak_control.spec index d4785bd..ab31740 100644 --- a/erlang-riak_control.spec +++ b/erlang-riak_control.spec @@ -1,35 +1,27 @@ %global realname riak_control %global upstream basho %global debug_package %{nil} -%global git_tag ef4ddb4 +%global git_tag ab681d7 %global patchnumber 0 Name: erlang-%{realname} -Version: 1.2.1 -Release: 3%{?dist} +Version: 1.3.0 +Release: 1%{?dist} Summary: Admin UI for Riak Group: Development/Languages License: ASL 2.0 URL: https://github.com/basho/riak_control -# wget --content-disposition https://github.com/basho/riak_control/tarball/1.2.1 +# wget --content-disposition https://github.com/basho/riak_control/tarball/1.3.0 Source0: %{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz -# Sent upstream - https://github.com/basho/riak_control/pull/26 -Patch1: %{name}-0001-Typo-fix-no-such-function-gen_server-cast-3.patch -# Sent upstream - https://github.com/basho/riak_control/pull/27 -Patch2: %{name}-0002-Re-export-admin_ring-node_ring_details-2-back.patch -# Will be proposed for upstream. -Patch3: %{name}-0003-Fix-includes.patch -# Fedora/EPEL-specific - remove rebar dependency checks -Patch4: %{name}-0004-Fedora-specific-remove-rebar-explicit-deps.patch -# https://github.com/basho/riak_control/issues/43 -# https://github.com/basho/riak_control/pull/44 -Patch5: %{name}-0005-Do-not-require-secure-only-cookie.patch +# Fedora/EPEL-specific - will be proposed for upstream. +Patch1: erlang-riak_control-0001-Fix-includes.patch +BuildRequires: erlang-erlydtl >= 0.7.0 BuildRequires: erlang-rebar -BuildRequires: erlang-riak_core -BuildRequires: erlang-webmachine +BuildRequires: erlang-riak_core >= 1.3.0 +BuildRequires: erlang-webmachine >= 1.9.3 Requires: erlang-crypto%{?_isa} -Requires: erlang-erlydtl%{?_isa} +Requires: erlang-erlydtl%{?_isa} >= 0.7.0 # Error:erlang(binary:replace/4) # Error:erlang(erlang:max/2) in R12B and below # Error:erlang(erlang:min/2) in R12B and below @@ -38,9 +30,11 @@ Requires: erlang-erts%{?_isa} >= R13B Requires: erlang-kernel%{?_isa} Requires: erlang-mochiweb%{?_isa} Requires: erlang-os_mon%{?_isa} -Requires: erlang-riak_core%{?_isa} +# Error:erlang(rebar_js_uglifier_plugin:compress/3) +Requires: erlang-rebar%{?_isa} +Requires: erlang-riak_core%{?_isa} >= 1.3.0 Requires: erlang-stdlib%{?_isa} -Requires: erlang-webmachine%{?_isa} +Requires: erlang-webmachine%{?_isa} >= 1.9.3 %description @@ -50,14 +44,9 @@ it in various ways. %prep -%setup -q -n %{upstream}-%{realname}-82c362a -chmod 644 priv/admin/fonts/rokkitt-bold.woff -chmod 644 priv/admin/fonts/rokkitt.woff -%patch1 -p1 -b .typo -%patch2 -p1 -b .reexport -%patch3 -p1 -b .includes -%patch4 -p1 -b .nodeps -%patch5 -p1 -b .http_cookie_fix +%setup -q -n %{upstream}-%{realname}-8d3b5f2 +chmod 644 priv/admin/fonts/* +%patch1 -p1 -b .includes # remove bundled rebar copy - just to be absolutely sure rm -f ./rebar @@ -71,13 +60,12 @@ mkdir -p %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/{ebin,include, install -p -m 0644 ebin/%{realname}.app %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app install -p -m 0644 ebin/*.beam %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin install -p -m 0644 include/%{realname}.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/include/ -cp -ar priv/* %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/priv +cp -arv priv/* %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/priv %check -# In order to run tests we need a QuickCheck library which is proprietary -# so no tests for 1.2.1 version. -rebar eunit -v +# Some tests requires a proprietary library - QuickCheck +rebar eunit skip_deps=true -v %files @@ -93,6 +81,9 @@ rebar eunit -v %changelog +* Tue Mar 12 2013 Peter Lemenkov - 1.3.0-1 +- Ver. 1.3.0 + * Wed Feb 13 2013 Fedora Release Engineering - 1.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 4f8c238..61a5bd9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -73defff003982fd85bcc4c37a7f0530d basho-riak_control-1.2.1-0-gef4ddb4.tar.gz +8d07ab46335e109fdf1d4e2ecb9297a2 basho-riak_control-1.3.0-0-gab681d7.tar.gz