Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
dcb46ea
Switch to branches with 292 and OTP 22 support
martinsumner Apr 9, 2020
c312eee
Uplift versions
martinsumner Apr 17, 2020
f8bc4f7
Tidy make test
martinsumner Apr 29, 2020
e159521
Include lager_syslog in the release. (#1019)
May 1, 2020
055a041
Update rebar.config to develop-3.0
martinsumner May 13, 2020
abc8c6d
Update riak_repl pointer
martinsumner May 14, 2020
3f152f1
draft 3.0 Release Notes
martinsumner May 29, 2020
d6f0355
Add default vm args in schema to prevent breaking in main process wit…
Jun 3, 2020
95691ec
Merge pull request #1018 from basho/develop-3.0-292
martinsumner Jun 16, 2020
98bfbda
Update RELEASE-NOTES.md
martinsumner Jun 19, 2020
7a47a9b
Update rebar.lock
martinsumner Jun 19, 2020
9cf5487
Support debian make
martinsumner Jun 30, 2020
de63a2b
Remove legacy files
martinsumner Jun 30, 2020
0990824
Try to avoid regressing make rel and make devrel
martinsumner Jul 1, 2020
6e1c5cc
Update vars.config
martinsumner Jul 1, 2020
4399acf
Update rebar.config
martinsumner Jul 1, 2020
f6e39f8
Update vars.config
martinsumner Jul 1, 2020
dd502f4
Temp repoint of riak_kv
martinsumner Jul 1, 2020
0ebbf73
Update vars.config
martinsumner Jul 1, 2020
3fd7dad
Tidy of vars.config
martinsumner Jul 1, 2020
4c1b92d
Avoid extra riak reference - as should be in repo tag
martinsumner Jul 1, 2020
23b4881
Use numeric part of tag as release in change log
martinsumner Jul 1, 2020
88c6008
Revert back to standard KV (change merged)
martinsumner Jul 1, 2020
3c8bc91
Update rebar.config
martinsumner Jul 1, 2020
4a408d5
Merge pull request #1023 from basho/mas-3.0-debianmake
martinsumner Jul 1, 2020
2b62099
Bring RPM packaging inline with DEB (#1024)
Jul 7, 2020
46a5cb8
script name is passed through from riak-admin to clique (#1025)
Jul 8, 2020
3ca35f1
Remove need for riakpre and riakrun
martinsumner Jul 8, 2020
ee63e44
Update rebar.config
martinsumner Jul 8, 2020
44a4b94
Update rebar.config
martinsumner Jul 8, 2020
9bee38c
Update riak
martinsumner Jul 8, 2020
463f82f
Update riak
martinsumner Jul 8, 2020
77b495c
Update riak
martinsumner Jul 8, 2020
d706f75
remove pre/run scripts from rpm specfile.
Jul 9, 2020
0e7e85d
Merge pull request #1026 from basho/mas-3.0-riakrunpath
martinsumner Jul 9, 2020
a68cd75
Update rebar.config
martinsumner Jul 9, 2020
e8567df
Merge pull request #1027 from basho/mas-3.0-yokoupdate
martinsumner Jul 9, 2020
3f75e07
Merge release notes with 2.9
martinsumner Jul 9, 2020
54702cf
Merge pull request #1028 from basho/mas-3.0-docupdate
martinsumner Jul 9, 2020
0b86770
rpm install to sbin (#1029)
Jul 10, 2020
614e694
stop copying init.d dir into /etc/riak - remove wildcard copy in rpm …
Jul 14, 2020
413e7af
Wrong run path for pid (#1032)
Jul 23, 2020
ebee307
Set run erl log maz size to higher default
martinsumner Aug 13, 2020
674ca25
Update rebar.lock
martinsumner Aug 13, 2020
c8f20c6
Attempt to force export of max log size
martinsumner Aug 17, 2020
0cae1c5
Define and export as pre-start hook
martinsumner Aug 17, 2020
5cea887
Merge pull request #1033 from basho/develop-3.0-defaultlogsize
martinsumner Aug 18, 2020
4afd6df
Updated rebar for release
martinsumner Aug 18, 2020
6bd729b
Correct release notes
martinsumner Aug 19, 2020
8caacaa
Merge pull request #1034 from basho/develop3.0-release
martinsumner Aug 19, 2020
d548ae8
Fix plugin tags
martinsumner Aug 20, 2020
dbd9d09
Update rebar.lock
martinsumner Aug 20, 2020
67f2cd1
Merge pull request #5 from basho/develop-3.0
Nov 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ _build
.DS_Store
rel/vars/*_vars.config
riak.png
log/*
rebar3.crashdump
.eunit
118 changes: 22 additions & 96 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl 2>/dev/null) 2>/dev/null)
REBAR ?= $(BASE_DIR)/rebar3
OVERLAY_VARS ?=
TEST_IGNORE ?= riak
TEST_IGNORE ?= lager riak basho_bench
TEST_DEPS_DIR ?= _build/test/lib
REL_DIR ?= _build/default/rel
DEPS = $(patsubst $(TEST_DEPS_DIR)/%, %, $(wildcard $(TEST_DEPS_DIR)/*))
Expand All @@ -28,18 +28,15 @@ compile:
$(REBAR) compile

deps:
$(if $(HEAD_REVISION),$(warning "Warning: you have checked out a tag ($(HEAD_REVISION)) and should use the locked-deps target"))
$(REBAR) get-deps
$(if $(HEAD_REVISION),$(warning "Warning: you have checked out a tag ($(HEAD_REVISION)) and should use the compile target"))
$(REBAR) upgrade

clean: testclean
$(REBAR) clean

distclean: clean devclean relclean ballclean
@rm -rf _build

locked-deps:
$(REBAR) upgrade

##
## Test targets
##
Expand All @@ -65,24 +62,27 @@ test-deps : compile testclean $(patsubst %, testdep-%, $(TEST_DEPS))
echo Tested the dependencies: $(TEST_DEPS)

# Test each dependency individually in its own VM
test : test-deps
test : testclean eunit test-deps
@if test -s $(TEST_LOG_FILE) ; then \
cat $(TEST_LOG_FILE) | grep FAILED && \
exit `cat $(TEST_LOG_FILE) | grep FAILED | wc -l`; \
fi
$(REBAR) eunit


cat $(TEST_LOG_FILE) && \
exit `cat $(TEST_LOG_FILE) | grep FAILED | wc -l`; \
fi


##
## Release targets
##
rel: locked-deps compile
rel: compile
$(REBAR) as rel release
cp -a _build/rel/rel/riak rel/

rel-rpm: locked-deps compile
$(REBAR) as rel,rpm release
rel-rpm: compile
$(REBAR) as rpm release
cp -a _build/rpm/rel/riak rel/

rel-deb: compile
$(REBAR) as deb release
cp -a _build/deb/rel/riak rel/

relclean:
rm -rf $(REL_DIR)
Expand Down Expand Up @@ -110,7 +110,7 @@ $(eval devrel : $(foreach n,$(SEQ),dev$(n)))

dev% : all
rel/gen_dev dev$* rel/vars/dev_vars.config.src rel/vars/$*_vars.config
$(REBAR) release -o dev/dev$* --overlay_vars rel/vars/$*_vars.config
$(REBAR) as dev release -o dev/dev$* --overlay_vars rel/vars/$*_vars.config

stagedev% : all
rel/gen_dev dev$* rel/vars/dev_vars.config.src rel/vars/$*_vars.config
Expand Down Expand Up @@ -212,46 +212,6 @@ REVISION = $(shell echo $(REPO_TAG) | sed -e 's/^$(REPO)-//')
# Changes to 1.0.3 or 1.1.0pre1 from example above
MAJOR_VERSION ?= $(shell echo $(REVISION) | sed -e 's/\([0-9.]*\)-.*/\1/')


##
## Release tarball creation
## Generates a tarball that includes all the deps sources so no checkouts are necessary
##

# Use git archive make a clean copy of a repository at a current
# revision and copy to a new directory
archive_git = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -)

# Alternative to git archive to remove .git directory, but not any
# other files outside of the source tree (used for eleveldb which
# brings in leveldb)
clean_git = cp -R ../../$(1) $(2)/deps/ && find $(2)/$(1) -name .git -type d | xargs rm -rf

# Determines which function to call. eleveldb is treated as a special case
archive = if [ "$(1)" = "deps/eleveldb" ]; then \
$(call clean_git,$(1),$(2)); \
else \
$(call archive_git,$(1),$(2)); \
fi


# Checkout tag, fetch deps (so we don't have to do it multiple times) and collect
# the version of all the dependencies into the MANIFEST_FILE
CLONEDIR ?= riak-clone
MANIFEST_FILE ?= dependency_manifest.git
get_dist_deps = mkdir distdir && \
git clone . distdir/$(CLONEDIR) && \
cd distdir/$(CLONEDIR) && \
git checkout $(REPO_TAG) && \
$(MAKE) locked-deps && \
echo "- Dependencies and their tags at build time of $(REPO) at $(REPO_TAG)" > $(MANIFEST_FILE) && \
for dep in deps/*; do \
cd $${dep} && \
printf "$${dep} version `git describe --long --tags 2>/dev/null || git rev-parse HEAD`\n" >> ../../$(MANIFEST_FILE) && \
cd ../..; done && \
LC_ALL=POSIX && export LC_ALL && sort $(MANIFEST_FILE) > $(MANIFEST_FILE).tmp && mv $(MANIFEST_FILE).tmp $(MANIFEST_FILE);


# Name resulting directory & tar file based on current status of the git tag
# If it is a tagged release (PKG_VERSION == MAJOR_VERSION), use the toplevel
# tag as the package name, otherwise generate a unique hash of all the
Expand All @@ -261,41 +221,6 @@ get_dist_deps = mkdir distdir && \
NAME_HASH = $(shell git hash-object distdir/$(CLONEDIR)/$(MANIFEST_FILE) 2>/dev/null | cut -c 1-8)
PKG_ID := $(REPO_TAG)

# To ensure a clean build, copy the CLONEDIR at a specific tag to a new directory
# which will be the basis of the src tar file (and packages)
# The vsn.git file is required by rebar to be able to build from the resulting
# tar file
build_clean_dir = cd distdir/$(CLONEDIR) && \
$(call archive_git,$(PKG_ID),..) && \
cp $(MANIFEST_FILE) ../$(PKG_ID)/ && \
mkdir ../$(PKG_ID)/deps && \
for dep in deps/*; do \
cd $${dep} && \
$(call archive,$${dep},../../../$(PKG_ID)) && \
mkdir -p ../../../$(PKG_ID)/$${dep}/priv && \
printf "`git describe --long --tags 2>/dev/null || git rev-parse HEAD`" > ../../../$(PKG_ID)/$${dep}/priv/vsn.git && \
cd ../..; \
done


distdir/$(CLONEDIR)/$(MANIFEST_FILE):
$(if $(REPO_TAG), $(call get_dist_deps), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))

distdir/$(PKG_ID): distdir/$(CLONEDIR)/$(MANIFEST_FILE)
$(call build_clean_dir)

distdir/$(PKG_ID).tar.gz: distdir/$(PKG_ID)
tar -C distdir -czf distdir/$(PKG_ID).tar.gz $(PKG_ID)

dist: distdir/$(PKG_ID).tar.gz
cp distdir/$(PKG_ID).tar.gz .

ballclean:
rm -rf $(PKG_ID).tar.gz distdir

pkgclean: ballclean
rm -rf package

##
## Packaging targets
##
Expand All @@ -305,8 +230,9 @@ pkgclean: ballclean
PKG_VERSION = $(shell echo $(PKG_ID) | sed -e 's/^$(REPO)-//')

package:
git archive --format=tar HEAD | gzip >rel/pkg/out/riak-$(PKG_ID).tar.gz
$(MAKE) -C rel/pkg/ -f Makefile
mkdir rel/pkg/out/riak-$(PKG_ID)
git archive --format=tar HEAD | gzip >rel/pkg/out/$(PKG_ID).tar.gz
$(MAKE) -f rel/pkg/Makefile

packageclean:
rm -rf rel/pkg/out/*
Expand All @@ -316,10 +242,10 @@ packageclean:
export PKG_VERSION PKG_ID PKG_BUILD BASE_DIR ERLANG_BIN REBAR OVERLAY_VARS RELEASE

# Package up a devrel to save time later rebuilding it
pkg-devrel: locked-deps devrel
pkg-devrel: devrel
echo -n $(PKG_REVISION) > VERSION
tar -czf $(PKG_ID)-devrel.tar.gz dev/ VERSION
rm -rf VERSION

pkg-rel: locked-deps rel
pkg-rel: rel
tar -czf $(PKG_ID)-rel.tar.gz -C rel/ .
Loading