diff --git a/go.mod b/go.mod index 2f15202e..8c5a0748 100644 --- a/go.mod +++ b/go.mod @@ -14,13 +14,13 @@ require ( github.com/hashicorp/go-msgpack v1.1.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/raft v1.5.0 - github.com/hashicorp/raft-boltdb/v2 v2.2.2 github.com/labstack/gommon v0.4.0 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mkideal/cli v0.2.7 github.com/mkideal/pkg v0.1.3 github.com/rqlite/go-sqlite3 v1.27.1 + github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48 github.com/rqlite/rqlite-disco-clients v0.0.0-20230505011544-70f7602795ff github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0 go.etcd.io/bbolt v1.3.7 diff --git a/go.sum b/go.sum index 9a8232d9..2ff6b866 100644 --- a/go.sum +++ b/go.sum @@ -631,7 +631,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -876,10 +875,7 @@ github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4 github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= github.com/hashicorp/raft v1.5.0 h1:uNs9EfJ4FwiArZRxxfd/dQ5d33nV31/CdCHArH89hT8= github.com/hashicorp/raft v1.5.0/go.mod h1:pKHB2mf/Y25u3AHNSXVRv+yT+WAnmeTX0BwVppVQV+M= -github.com/hashicorp/raft-boltdb v0.0.0-20210409134258-03c10cc3d4ea h1:RxcPJuutPRM8PUOyiweMmkuNO+RJyfy2jds2gfvgNmU= github.com/hashicorp/raft-boltdb v0.0.0-20210409134258-03c10cc3d4ea/go.mod h1:qRd6nFJYYS6Iqnc/8HcUmko2/2Gw8qTFEmxDLii6W5I= -github.com/hashicorp/raft-boltdb/v2 v2.2.2 h1:rlkPtOllgIcKLxVT4nutqlTH2NRFn+tO1wwZk/4Dxqw= -github.com/hashicorp/raft-boltdb/v2 v2.2.2/go.mod h1:N8YgaZgNJLpZC+h+by7vDu5rzsRgONThTEeUS3zWbfY= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= @@ -1023,6 +1019,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rqlite/go-sqlite3 v1.27.1 h1:BZMF7lB7kflMgWbULsM8TpKHM9vzcINEknbe0YC6Ti0= github.com/rqlite/go-sqlite3 v1.27.1/go.mod h1:nd4ooHtz396nqTudi+5u7stMN8EEkHjceyUARVYOceY= +github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48 h1:NZ62M+kT0JqhyFUMc8I4SMmfmD4NGJxhb2ePJQXjryc= +github.com/rqlite/raft-boltdb/v2 v2.0.0-20230523104317-c08e70f4de48/go.mod h1:CRnsxgy5G8fAf5J+AM0yrsSdxXHKkIYOaq2sm+Q4DYc= github.com/rqlite/rqlite-disco-clients v0.0.0-20230505011544-70f7602795ff h1:NRe0uU1s3f2nYMV+xaASReg0w13FR+pLMn/kVUSuao4= github.com/rqlite/rqlite-disco-clients v0.0.0-20230505011544-70f7602795ff/go.mod h1:pym85nj6JnCI7rM9RxTZ4cubkTQyyg7uLwVydso9B80= github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0 h1:C8DZB5okjhCSd7zvkOM+zxGz7S6ulUFIL34bpkqFk+0= diff --git a/log/log.go b/log/log.go index c31a89c2..7b13db94 100644 --- a/log/log.go +++ b/log/log.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/hashicorp/raft" - "github.com/hashicorp/raft-boltdb/v2" + "github.com/rqlite/raft-boltdb/v2" "go.etcd.io/bbolt" ) diff --git a/log/log_test.go b/log/log_test.go index 62794f0d..f573a7e3 100644 --- a/log/log_test.go +++ b/log/log_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/hashicorp/raft" - raftboltdb "github.com/hashicorp/raft-boltdb/v2" + raftboltdb "github.com/rqlite/raft-boltdb/v2" ) func Test_LogNewEmpty(t *testing.T) { diff --git a/scripts/package.sh b/scripts/package.sh index e3b74df3..d8d093a7 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -14,6 +14,7 @@ # # sudo apt-get -y install gcc make gcc-arm-linux-gnueabi binutils-arm-linux-gnueabi # sudo apt-get -y install gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu +# sudo apt-get -y install gcc-mips-linux-gnu g++-mips-linux-gnu REPO_URL="https://github.com/rqlite/rqlite" @@ -126,53 +127,30 @@ if [ "$kernel" != "Linux" ]; then fi ################################################################################ -# Build version for Docker use -rm -f $GOPATH/bin/* -cd $tmp_build/src/github.com/rqlite/rqlite -CGO_ENABLED=1 CC=musl-gcc go install -a -tags sqlite_omit_load_extension -ldflags="$LDFLAGS" ./... - -# Package the musl release -release=`echo rqlite-$VERSION-$kernel-$machine-musl | tr '[:upper:]' '[:lower:]'` -tarball=${release}.tar.gz -mkdir $tmp_musl_pkg/$release -copy_binaries $tmp_musl_pkg/$release $GOPATH/bin -( cd $tmp_musl_pkg; tar cvfz $tarball $release ) - -if [ -n "$API_TOKEN" ]; then - upload_asset $tmp_musl_pkg/$tarball $RELEASE_ID $API_TOKEN - fi - -################################################################################ -# Build version for ARM64 -rm -f $GOPATH/bin/* -cd $tmp_build/src/github.com/rqlite/rqlite -CGO_ENABLED=1 GOARCH=arm64 CC=aarch64-linux-gnu-gcc go install -a -tags sqlite_omit_load_extension -ldflags="$LDFLAGS" ./... - -# Package the ARM64 release -release=`echo rqlite-$VERSION-$kernel-arm64 | tr '[:upper:]' '[:lower:]'` -tarball=${release}.tar.gz -mkdir $tmp_linux_arm64_pkg/$release -copy_binaries $tmp_linux_arm64_pkg/$release $GOPATH/bin/linux_arm64 -( cd $tmp_linux_arm64_pkg; tar cvfz $tarball $release ) - -if [ -n "$API_TOKEN" ]; then - upload_asset $tmp_linux_arm64_pkg/$tarball $RELEASE_ID $API_TOKEN -fi - -################################################################################ -# Build version for ARM32 -rm -f $GOPATH/bin/* -cd $tmp_build/src/github.com/rqlite/rqlite -CGO_ENABLED=1 GOARCH=arm CC=arm-linux-gnueabi-gcc go install -a -tags sqlite_omit_load_extension -ldflags="$LDFLAGS" ./... - -# Package the ARM32 release -release=`echo rqlite-$VERSION-$kernel-arm | tr '[:upper:]' '[:lower:]'` -tarball=${release}.tar.gz -mkdir $tmp_linux_arm_pkg/$release -copy_binaries $tmp_linux_arm_pkg/$release $GOPATH/bin/linux_arm -( cd $tmp_linux_arm_pkg; tar cvfz $tarball $release ) - -if [ -n "$API_TOKEN" ]; then - upload_asset $tmp_linux_arm_pkg/$tarball $RELEASE_ID $API_TOKEN -fi - +# Package all other releases +declare -A versions +versions=( + ["musl"]="musl-gcc" + ["arm64"]="aarch64-linux-gnu-gcc" + ["arm"]="arm-linux-gnueabi-gcc" + ["riscv64"]="riscv64-linux-gnu-gcc" + ["mips"]="mips-linux-gnu-gcc" +) + +for version in "${!versions[@]}"; do + compiler=${versions[$version]} + + rm -f $GOPATH/bin/* + cd $tmp_build/src/github.com/rqlite/rqlite + CGO_ENABLED=1 GOARCH=$version CC=$compiler go install -a -tags sqlite_omit_load_extension -ldflags="$LDFLAGS" ./... + + release=`echo rqlite-$VERSION-$kernel-$version | tr '[:upper:]' '[:lower:]'` + tarball=${release}.tar.gz + mkdir $tmp_linux_${version}_pkg/$release + copy_binaries $tmp_linux_${version}_pkg/$release $GOPATH/bin/linux_$version + ( cd $tmp_linux_${version}_pkg; tar cvfz $tarball $release ) + + if [ -n "$API_TOKEN" ]; then + upload_asset $tmp_linux_${version}_pkg/$tarball $RELEASE_ID $API_TOKEN + fi +done