[erlang-riak_kv] Initial commit (see rhbz #652629)

Peter Lemenkov peter at fedoraproject.org
Wed Jul 25 19:28:51 UTC 2012


commit 4d828a113109118bdd3a7927edbb7c205b646059
Author: Peter Lemenkov <lemenkov at gmail.com>
Date:   Wed Jul 25 23:28:44 2012 +0400

    Initial commit (see rhbz #652629)
    
    Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>

 .gitignore                                         |    1 +
 ...Don-t-check-for-deps-Fedora-EPEL-specific.patch |   41 +++++++
 erlang-riak_kv-0002-Don-t-fail-on-warnings.patch   |   26 ++++
 ...g-riak_kv-0003-Use-system-wide-mochijson2.patch |   27 ++++
 erlang-riak_kv-0004-Fixes-Issue-326.patch          |   25 ++++
 ...-include-to-prevent-automatic-dependency-.patch |   45 +++++++
 ...Drop-check-for-specific-version-of-Erlang.patch |   22 ++++
 erlang-riak_kv.spec                                |  125 ++++++++++++++++++++
 sources                                            |    1 +
 9 files changed, 313 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4c978a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/basho-riak_kv-1.1.2-0-gc732840.tar.gz
diff --git a/erlang-riak_kv-0001-Don-t-check-for-deps-Fedora-EPEL-specific.patch b/erlang-riak_kv-0001-Don-t-check-for-deps-Fedora-EPEL-specific.patch
new file mode 100644
index 0000000..de4a1fe
--- /dev/null
+++ b/erlang-riak_kv-0001-Don-t-check-for-deps-Fedora-EPEL-specific.patch
@@ -0,0 +1,41 @@
+From 797b4ad190d297b3d770ebc715071d1c50607318 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Sat, 27 Nov 2010 20:05:09 +0300
+Subject: [PATCH 1/6] Don't check for deps (Fedora/EPEL specific)
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ rebar.config |   20 --------------------
+ 1 file changed, 20 deletions(-)
+
+diff --git a/rebar.config b/rebar.config
+index ff98df2..9a009c0 100644
+--- a/rebar.config
++++ b/rebar.config
+@@ -7,23 +7,3 @@
+                    "src/riak_kv_backend.erl",
+                    "src/riak_index_backend.erl"
+                   ]}.
+-
+-{deps, [
+-        {riak_core, "1.1.2", {git, "git://github.com/basho/riak_core", {tag, "1.1.2"}}},
+-        {riakc, "1.2.1", {git, "git://github.com/basho/riak-erlang-client",
+-                               {tag, "1.2.1"}}},
+-        {luke, "0.2.5", {git, "git://github.com/basho/luke", {tag, "0.2.5"}}},
+-        {erlang_js, "1.0.2", {git, "git://github.com/basho/erlang_js", {tag, "1.0.2"}}},
+-        {bitcask, "1.5.1", {git, "git://github.com/basho/bitcask", {tag, "1.5.1"}}},
+-        {merge_index, "1.1.0", {git, "git://github.com/basho/merge_index",
+-                                 {tag, "1.1.0"}}},
+-        {ebloom, "1.1.1", {git, "git://github.com/basho/ebloom", {tag, "1.1.1"}}},
+-        {eper, "0.61", {git, "git://github.com/basho/eper.git", {tag, "fdfd63c0"}}},
+-        {eleveldb, "1.1.0", {git, "git://github.com/basho/eleveldb.git",
+-                          {tag, "1.1.0"}}},
+-        {sext, ".*", {git, "git://github.com/esl/sext", {tag, "0.4.1"}}},
+-        {riak_pipe, "1.1.2", {git, "git://github.com/basho/riak_pipe.git",
+-                                {tag, "1.1.2"}}},
+-        {basho_metrics, "1.0.0", {git, "git://github.com/basho/basho_metrics.git",
+-                                {tag, "1.0.0"}}}
+-       ]}.
+-- 
+1.7.10.4
+
diff --git a/erlang-riak_kv-0002-Don-t-fail-on-warnings.patch b/erlang-riak_kv-0002-Don-t-fail-on-warnings.patch
new file mode 100644
index 0000000..dc6d108
--- /dev/null
+++ b/erlang-riak_kv-0002-Don-t-fail-on-warnings.patch
@@ -0,0 +1,26 @@
+From 4a3a9466ff58edc3cadc362506cf4eed01c28d2f Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Sat, 27 Nov 2010 20:09:59 +0300
+Subject: [PATCH 2/6] Don't fail on warnings
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ rebar.config |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rebar.config b/rebar.config
+index 9a009c0..ada00f5 100644
+--- a/rebar.config
++++ b/rebar.config
+@@ -1,7 +1,7 @@
+ {require_otp_vsn, "R13B04|R14"}.
+ {cover_enabled, true}.
+ {edoc_opts, [{preprocess, true}]}.
+-{erl_opts, [warnings_as_errors, {parse_transform, lager_transform}]}.
++{erl_opts, [{parse_transform, lager_transform}]}.
+ 
+ {erl_first_files, [
+                    "src/riak_kv_backend.erl",
+-- 
+1.7.10.4
+
diff --git a/erlang-riak_kv-0003-Use-system-wide-mochijson2.patch b/erlang-riak_kv-0003-Use-system-wide-mochijson2.patch
new file mode 100644
index 0000000..f56a68e
--- /dev/null
+++ b/erlang-riak_kv-0003-Use-system-wide-mochijson2.patch
@@ -0,0 +1,27 @@
+From fd3750cde428c2ee4f2fa31f648765f11e5c7edd Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Wed, 18 Jul 2012 22:41:10 +0400
+Subject: [PATCH 3/6] Use system-wide mochijson2
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ src/riak_kv_js_vm.erl |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/riak_kv_js_vm.erl b/src/riak_kv_js_vm.erl
+index 2cf6367..66cb7fa 100644
+--- a/src/riak_kv_js_vm.erl
++++ b/src/riak_kv_js_vm.erl
+@@ -372,7 +372,7 @@ maybe_idle(#state{in_batch=true}) ->
+ build_arg_list([], Accum) ->
+     lists:reverse(Accum);
+ build_arg_list([H|[]], Accum) ->
+-    build_arg_list([], [js_mochijson2:encode(H)|Accum]);
++    build_arg_list([], [mochijson2:encode(H)|Accum]);
+ build_arg_list([H|T], Accum) ->
+-    build_arg_list(T, [[js_mochijson2:encode(H), ","]|Accum]).
++    build_arg_list(T, [[mochijson2:encode(H), ","]|Accum]).
+ 
+-- 
+1.7.10.4
+
diff --git a/erlang-riak_kv-0004-Fixes-Issue-326.patch b/erlang-riak_kv-0004-Fixes-Issue-326.patch
new file mode 100644
index 0000000..5022558
--- /dev/null
+++ b/erlang-riak_kv-0004-Fixes-Issue-326.patch
@@ -0,0 +1,25 @@
+From 75c78ed9b3235e8d5487f07ec2e66c75f2e23e34 Mon Sep 17 00:00:00 2001
+From: Michajlo Matijkiw <michajlo.matijkiw at gmail.com>
+Date: Tue, 22 May 2012 16:26:33 -0400
+Subject: [PATCH 4/6] Fixes Issue #326
+
+---
+ src/riak_client.erl |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/riak_client.erl b/src/riak_client.erl
+index 0c881c4..357102e 100644
+--- a/src/riak_client.erl
++++ b/src/riak_client.erl
+@@ -540,7 +540,7 @@ stream_list_keys(Input, Timeout, Client, ClientType) when is_pid(Client) ->
+             ReqId = mk_reqid(),
+             case Input of
+                 {Bucket, FilterInput} ->
+-                    case riak_kv_mapred_filter:build_filter(FilterInput) of
++                    case riak_kv_mapred_filters:build_filter(FilterInput) of
+                         {error, _Error} ->
+                             {error, _Error};
+                         {ok, FilterExprs} ->
+-- 
+1.7.10.4
+
diff --git a/erlang-riak_kv-0005-Guard-eunit-include-to-prevent-automatic-dependency-.patch b/erlang-riak_kv-0005-Guard-eunit-include-to-prevent-automatic-dependency-.patch
new file mode 100644
index 0000000..af27a58
--- /dev/null
+++ b/erlang-riak_kv-0005-Guard-eunit-include-to-prevent-automatic-dependency-.patch
@@ -0,0 +1,45 @@
+From d2bd69a63cbdfa4281d50b8250bcb4635f50c99b Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Wed, 18 Jul 2012 22:55:53 +0400
+Subject: [PATCH 5/6] Guard eunit include to prevent automatic dependency
+ picking up
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ src/riak_kv_bucket.erl  |    2 ++
+ src/riak_kv_put_fsm.erl |    4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/riak_kv_bucket.erl b/src/riak_kv_bucket.erl
+index 63a1794..eeb1ae8 100644
+--- a/src/riak_kv_bucket.erl
++++ b/src/riak_kv_bucket.erl
+@@ -25,7 +25,9 @@
+ 
+ -export([validate/1]).
+ 
++-ifdef(TEST).
+ -include_lib("eunit/include/eunit.hrl").
++-endif.
+ 
+ -type prop() :: {PropName::atom(), PropValue::any()}.
+ -type error() :: {PropName::atom(), ErrorReason::atom()}.
+diff --git a/src/riak_kv_put_fsm.erl b/src/riak_kv_put_fsm.erl
+index d6a8128..0e2b00b 100644
+--- a/src/riak_kv_put_fsm.erl
++++ b/src/riak_kv_put_fsm.erl
+@@ -23,9 +23,9 @@
+ %% @doc coordination of Riak PUT requests
+ 
+ -module(riak_kv_put_fsm).
+-%-ifdef(TEST).
++-ifdef(TEST).
+ -include_lib("eunit/include/eunit.hrl").
+-%-endif.
++-endif.
+ -include_lib("riak_kv_vnode.hrl").
+ -include_lib("riak_kv_js_pools.hrl").
+ -include("riak_kv_wm_raw.hrl").
+-- 
+1.7.10.4
+
diff --git a/erlang-riak_kv-0006-Drop-check-for-specific-version-of-Erlang.patch b/erlang-riak_kv-0006-Drop-check-for-specific-version-of-Erlang.patch
new file mode 100644
index 0000000..1481198
--- /dev/null
+++ b/erlang-riak_kv-0006-Drop-check-for-specific-version-of-Erlang.patch
@@ -0,0 +1,22 @@
+From 9b404250665ee49b5c1c520b04301eb6d4eb9a93 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Wed, 18 Jul 2012 23:15:33 +0400
+Subject: [PATCH 6/6] Drop check for specific version of Erlang
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ rebar.config |    1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/rebar.config b/rebar.config
+index ada00f5..9df3c65 100644
+--- a/rebar.config
++++ b/rebar.config
+@@ -1,4 +1,3 @@
+-{require_otp_vsn, "R13B04|R14"}.
+ {cover_enabled, true}.
+ {edoc_opts, [{preprocess, true}]}.
+ {erl_opts, [{parse_transform, lager_transform}]}.
+-- 
+1.7.10.4
+
diff --git a/erlang-riak_kv.spec b/erlang-riak_kv.spec
new file mode 100644
index 0000000..f5c8569
--- /dev/null
+++ b/erlang-riak_kv.spec
@@ -0,0 +1,125 @@
+%global realname riak_kv
+%global upstream basho
+%global debug_package %{nil}
+%global git_tag c732840
+%global patchnumber 0
+
+Name:		erlang-%{realname}
+Version:	1.1.2
+Release:	1%{?dist}
+Summary:	Riak Key/Value Store
+Group:		Development/Languages
+License:	ASL 2.0
+URL:		https://github.com/basho/riak_kv
+# wget --content-disposition https://github.com/basho/riak_kv/tarball/1.1.2
+Source0:	%{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz
+# Fedora/EPEL specific patch
+Patch1:		erlang-riak_kv-0001-Don-t-check-for-deps-Fedora-EPEL-specific.patch
+# Fedora/EPEL specific patch
+Patch2:		erlang-riak_kv-0002-Don-t-fail-on-warnings.patch
+# Fedora/EPEL specific patch
+Patch3:		erlang-riak_kv-0003-Use-system-wide-mochijson2.patch
+# Backported
+Patch4:		erlang-riak_kv-0004-Fixes-Issue-326.patch
+# Will be proposed for inclusion to upstream
+Patch5:		erlang-riak_kv-0005-Guard-eunit-include-to-prevent-automatic-dependency-.patch
+# Fedora/EPEL specific patch
+Patch6:		erlang-riak_kv-0006-Drop-check-for-specific-version-of-Erlang.patch
+#BuildRequires:erlang-basho_metrics
+BuildRequires:	erlang-bitcask
+BuildRequires:	erlang-ebloom
+BuildRequires:	erlang-eleveldb
+BuildRequires:	erlang-erts
+BuildRequires:	erlang-js
+BuildRequires:	erlang-luke
+BuildRequires:	erlang-rebar
+BuildRequires:	erlang-riak_client
+BuildRequires:	erlang-riak_core
+BuildRequires:	erlang-riak_pipe
+BuildRequires:	erlang-sext
+Requires: erlang-basho_metrics%{?_isa}
+Requires: erlang-bitcask%{?_isa}
+Requires: erlang-cluster_info%{?_isa}
+Requires: erlang-crypto%{?_isa}
+Requires: erlang-ebloom%{?_isa}
+Requires: erlang-eleveldb%{?_isa}
+Requires: erlang-erts%{?_isa}
+Requires: erlang-eunit%{?_isa}
+Requires: erlang-inets%{?_isa}
+Requires: erlang-js%{?_isa}
+Requires: erlang-kernel%{?_isa}
+Requires: erlang-lager%{?_isa}
+# Error:erlang(luke_flow:add_inputs/1)
+Requires: erlang-luke%{?_isa}
+Requires: erlang-mochiweb%{?_isa}
+Requires: erlang-os_mon%{?_isa}
+Requires: erlang-riak_client%{?_isa}
+Requires: erlang-riak_core%{?_isa}
+Requires: erlang-riak_pipe%{?_isa}
+Requires: erlang-sext%{?_isa}
+Requires: erlang-stdlib%{?_isa}
+Requires: erlang-webmachine%{?_isa}
+# Error:erlang(riak_kv_keys_fsm:start_link/6)
+# Error:erlang(riak_kv_mapred_filter:build_filter/1)
+
+
+%description
+Riak Key/Value Store.
+
+
+%prep
+%setup -q -n %{upstream}-%{realname}-79b80f2
+%patch1 -p1 -b .nodeps
+%patch2 -p1 -b .no_fail_on_warn
+%patch3 -p1 -b .systemwide_mochijson2
+%patch4 -p1
+%patch5 -p1 -b .noeunit
+%patch6 -p1
+# remove bundled rebar copy - just to be absolutely sure
+rm -f ./rebar
+
+
+%build
+rebar compile -v
+
+
+%install
+mkdir -p %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/{ebin,include,priv}
+install -p -m 0644 ebin/%{realname}.app %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/
+install -p -m 0644 ebin/*.beam %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin
+install -p -m 0644 include/*.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/include
+install -p -m 0644 src/riak_kv_wm_raw.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/include
+install -p -m 0755 priv/mapred_builtins.js %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/priv/
+
+
+%check
+# Several tests requires epmd to run
+epmd -daemon
+rebar eunit -v
+epmd -kill
+
+
+%files
+%dir %{_libdir}/erlang/lib/%{realname}-%{version}
+%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
+%dir %{_libdir}/erlang/lib/%{realname}-%{version}/include
+%dir %{_libdir}/erlang/lib/%{realname}-%{version}/priv
+%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/%{realname}.app
+%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.beam
+%{_libdir}/erlang/lib/%{realname}-%{version}/include/*.hrl
+%{_libdir}/erlang/lib/%{realname}-%{version}/priv/mapred_builtins.js
+
+
+%changelog
+* Tue Jun 19 2012 Peter Lemenkov <lemenkov at gmail.com> - 1.1.2-1
+- Ver. 1.1.2
+
+* Sat Feb 26 2011 Peter Lemenkov <lemenkov at gmail.com> - 0.14.1-1
+- Ver. 0.14.1
+
+* Sun Jan 23 2011 Peter Lemenkov <lemenkov at gmail.com> - 0.14.0-1
+- Ver. 0.14.0
+
+* Fri Nov 12 2010 Peter Lemenkov <lemenkov at gmail.com> - 0.13.0-1
+- Initial build
+
diff --git a/sources b/sources
index e69de29..5d92248 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2af11fa2a754b22d897cb7512099edf5  basho-riak_kv-1.1.2-0-gc732840.tar.gz


More information about the scm-commits mailing list