Skip to content

Commit

Permalink
Merge pull request #1351 from TI-Tokyo/2.1
Browse files Browse the repository at this point in the history
Remove EE and OSS differentiation. signature_v4 access via riak-cs.conf
  • Loading branch information
Martin Cox committed Feb 28, 2019
2 parents fb00fc0 + 99fecf9 commit 890024e
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 255 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ log/
*~
current_counterexample.eqc
.client_test/
pkg.vars.config
client_tests/python/ceph_tests/s3-tests
riak-cs.png
.local_dialyzer_plt
Expand Down
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,11 @@ PLT ?= $(HOME)/.riak-cs_dialyzer_plt
.PHONY: package
export PKG_VERSION PKG_ID PKG_BUILD BASE_DIR ERLANG_BIN REBAR OVERLAY_VARS RELEASE

## Do not export RIAK_CS_EE_DEPS unless it is set, since even an empty
## variable will affect the build and 'export' by default makes it empty
## if it is unset
BUILD_EE = $(shell test -n "$${RIAK_CS_EE_DEPS+x}" && echo "true" || echo "false")
ifeq ($(BUILD_EE),true)
export RIAK_CS_EE_DEPS=true
endif


package.src: deps
mkdir -p package
rm -rf package/$(PKG_ID)
git archive --format=tar --prefix=$(PKG_ID)/ $(PKG_REVISION)| (cd package && tar -xf -)
cp rebar.config.script package/$(PKG_ID)
cp pkg.vars.config package/$(PKG_ID)
make -C package/$(PKG_ID) deps
mkdir -p package/$(PKG_ID)/priv
git --git-dir=.git describe --tags >package/$(PKG_ID)/priv/vsn.git
Expand Down
6 changes: 3 additions & 3 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Riak CS 2.1.2 Release Notes
#Riak CS 2.1.2 Release Candidate Notes

Released March 31, 2016.
Released February 24, 2019.

This is a backwards-compatible* release that updates node_package to address a recent [Product Advisory](http://docs.basho.com/riak/latest/community/product-advisories/codeinjectioninitfiles/), as well as fixes several bugs.

Expand All @@ -15,7 +15,7 @@ Riak CS 2.1 is designed to work with Riak KV 2.1.1+.
During the update to 2.1.2, a '==' omitted upload ID might be passed to a Riak CS node running an older version of CS. This may lead to process-crash by failing on decoding upload ID.

##Changes

* For s3cmd users, experimental signature_v4 support has been made available through a simple on/off toggle in riak-cs.conf. With a default setting of "off", it allows in-situ upgrades without the need to change s3cfg files until after all nodes have been upgraded. Note: this function is currently unfinished and suffers from compatibility issues with some clients ([#1058](https://github.com/basho/riak_cs/issues/1058) / [#1060](https://github.com/basho/riak_cs/issues/1060)) and one potential security issue ([#1059](https://github.com/basho/riak_cs/issues/1059)
* Due to a recent [Product Advisory](http://docs.basho.com/riak/latest/community/product-advisories/codeinjectioninitfiles/), node_package was bumped to version 3.0.0 to prevent a potential code injection on the riak init file. [[Issue 1297](https://github.com/basho/riak_cs/issues/1297), [PR 1306](https://github.com/basho/riak_cs/pull/1306), & [PR 109](https://github.com/basho/stanchion/pull/109)]
* Multipart upload IDs no longer contain trailing '=' characters, which caused trouble for some clients. This change also makes upload IDs URL-safe. [[PR 1316](https://github.com/basho/riak_cs/pull/1316)]
* When Riak is unavailable due to network partition or node being offline, a 500 error is returned. [[PR 1298](https://github.com/basho/riak_cs/pull/1298)]
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions dialyzer.ignore-warnings.oss

This file was deleted.

3 changes: 1 addition & 2 deletions misc/mapdeps.erl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ map_dir(BaseDir) ->
map_rebar(BaseDir, Path, Acc) ->
case file:consult(Path) of
{ok, Opts} ->
Deps = proplists:get_value(deps, Opts, []) ++
proplists:get_value(deps_ee, Opts, []),
Deps = proplists:get_value(deps, Opts, []),
lists:foldl(
fun({DepName, _, _}, A) ->
From = app_name(Path),
Expand Down
23 changes: 23 additions & 0 deletions pkg.vars.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-

%%
%% Packaging
%%
{package_name, "riak-cs"}.
{package_install_name, "riak-cs"}.
{package_install_user, "riakcs"}.
{package_install_group, "riak"}.
{package_install_user_desc, "Riak CS user"}.
{package_commands, {list, [[{name, "riak-cs"}], [{name, "riak-cs-access"}], [{name, "riak-cs-gc"}], [{name, "riak-cs-storage"}], [{name, "riak-cs-stanchion"}], [{name, "riak-cs-debug"}], [{name, "riak-cs-admin"}], [{name, "riak-cs-supercluster"}], [{name, "riak-cs-multibag"}]]}}.
{package_shortdesc, "Riak CS"}.
{package_patch_dir, "basho-patches"}.
{package_desc, "Riak CS"}.
{bin_or_sbin, "sbin"}.
{license_type, "Apache License, Version 2.0"}.
{copyright, "2013 Basho Technologies, Inc"}.
{vendor_name, "Basho Technologies, Inc"}.
{vendor_url, "http://basho.com"}.
{vendor_contact_name, "Basho Package Maintainer"}.
{vendor_contact_email, "packaging@basho.com"}.
{license_full_text, "This software is provided under license from Basho Technologies."}.
{solaris_pkgname, "BASHOriak-cs"}.
11 changes: 3 additions & 8 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

{xref_checks, []}.
{xref_queries,
[{"(XC - UC) || (XU - X - B - \"(^riak$|^riak_cs_dummy_reader$|^riak_core_bucket$|^app_helper$|^riakc_pb_socket_fake$|^riak_object$|^riak_repl_pb_api$|^riak_cs_multibag$)\" : Mod)", []}]}.
{xref_queries_ee,
[{"(XC - UC) || (XU - X - B - \"(^riak$|^riak_cs_dummy_reader$|^riak_core_bucket$|^app_helper$|^riakc_pb_socket_fake$|^riak_object$)\" : Mod)", []}]}.

{reset_after_eunit, true}.
Expand Down Expand Up @@ -51,10 +49,7 @@
{cluster_info, ".*", {git, "git://github.com/basho/cluster_info", {tag, "2.0.3"}}},
{xmerl, ".*", {git, "git://github.com/shino/xmerl", "1b016a05473e086abadbb3c12f63d167fe96c00f"}},
{erlcloud, ".*", {git, "git://github.com/basho/erlcloud.git", {tag, "0.4.6"}}},
{rebar_lock_deps_plugin, ".*", {git, "git://github.com/seth/rebar_lock_deps_plugin.git", {tag, "3.1.0"}}}
]}.

{deps_ee, [
{riak_repl_pb_api,".*",{git,"git@github.com:basho/riak_repl_pb_api.git", {tag, "2.1.1"}}},
{riak_cs_multibag,".*",{git,"git@github.com:basho/riak_cs_multibag.git", {tag, "2.1.0p1"}}}
{rebar_lock_deps_plugin, ".*", {git, "git://github.com/seth/rebar_lock_deps_plugin.git", {tag, "3.1.0"}}},
{riak_repl_pb_api,".*",{git,"git://github.com/basho/riak_repl_pb_api.git", {tag, "2.1.1"}}},
{riak_cs_multibag,".*",{git,"git://github.com/basho/riak_cs_multibag.git", {tag, "2.1.0p1"}}}
]}.
115 changes: 0 additions & 115 deletions rebar.config.lock

This file was deleted.

96 changes: 0 additions & 96 deletions rebar.config.script

This file was deleted.

11 changes: 11 additions & 0 deletions rel/files/riak_cs.schema
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@
hidden
]}.

%% @doc Enable experimental signature_v4 compatibility.
%% Changing this setting to on will allow s3cmd to utilise
%% signature_v4 and thus function without the need to manually add
%% v2_signature support to your .s3cfg file,
%% Note: this function is unfinished and suffers from issues:
%% #1058, #1059, #1060. Use at your own risk.
{mapping, "auth_v4", "riak_cs.auth_v4_enabled", [
{default, off},
{datatype, flag}
]}.

%% @doc Root host name which Riak CS accepts.
%% Your CS bucket at s3.example.com will be accessible
%% via URL like http://bucket.s3.example.com/object/name
Expand Down
20 changes: 10 additions & 10 deletions riak_test/tests/repl_v3_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@

-define(TEST_BUCKET, "riak-test-bucket").

confirm() ->
case rt_config:get(build_type, oss) of
ee ->
confirm_ee();
_ ->
lager:info("~s test is only valid on riak_ee, skipping", [?MODULE]),
pass
end.

confirm_ee() ->
confirm()
->case rt_config:get(build_type, oss) of
ee ->
confirm_ee();
_ ->
lager:info("~s test is only valid on riak_ee, skipping", [?MODULE]),
pass
end.
confirm_ee() ->
{UserConfig, {RiakNodes, _CSNodes, _Stanchion}} = rtcs:setup2x2(),
lager:info("UserConfig = ~p", [UserConfig]),
[A,B,C,D] = RiakNodes,
Expand Down

0 comments on commit 890024e

Please sign in to comment.