Skip to content

Commit 179d1d1

Browse files
authored
Merge pull request #8208 from ipfs/release-v0.9.0
Release v0.9.0
2 parents ce693d7 + e5b02b3 commit 179d1d1

File tree

148 files changed

+6636
-4948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+6636
-4948
lines changed

.circleci/config.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ default_environment: &default_environment
3333
executors:
3434
golang:
3535
docker:
36-
- image: circleci/golang:1.14.4
36+
- image: circleci/golang:1.15.2
3737
working_directory: ~/ipfs/go-ipfs
3838
environment:
3939
<<: *default_environment
@@ -44,13 +44,13 @@ executors:
4444
TEST_VERBOSE: 1
4545
node:
4646
docker:
47-
- image: circleci/node:12
47+
- image: circleci/node:14
4848
working_directory: ~/ipfs/go-ipfs
4949
environment:
5050
<<: *default_environment
5151
node-browsers:
5252
docker:
53-
- image: circleci/node:12-browsers
53+
- image: circleci/node:14-browsers
5454
working_directory: ~/ipfs/go-ipfs
5555
environment:
5656
<<: *default_environment
@@ -60,7 +60,7 @@ executors:
6060
E2E_IPFSD_TYPE: go
6161
dockerizer:
6262
docker:
63-
- image: circleci/golang:1.14.4
63+
- image: circleci/golang:1.15.2
6464
environment:
6565
IMAGE_NAME: ipfs/go-ipfs
6666
WIP_IMAGE_TAG: wip
@@ -129,7 +129,8 @@ jobs:
129129
GOPATH: /home/circleci/go
130130
TEST_VERBOSE: 1
131131
steps:
132-
- run: sudo apt install socat
132+
- run: sudo apt update
133+
- run: sudo apt install socat net-tools
133134
- checkout
134135

135136
- run:

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "11:00"
8+
open-pull-requests-limit: 10
9+
labels:
10+
- "topic/dependencies"

.github/workflows/codeql-analysis.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
2+
name: "CodeQL"
3+
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
# The branches below must be a subset of the branches above
9+
branches: [ master ]
10+
schedule:
11+
- cron: '30 12 * * 2'
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: [ 'go' ]
22+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
23+
# Learn more:
24+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v1
33+
with:
34+
languages: ${{ matrix.language }}
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v1
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v1

CHANGELOG.md

+710
Large diffs are not rendered by default.

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml
2-
FROM golang:1.14.4-buster
2+
FROM golang:1.15.2-buster
33
LABEL maintainer="Steven Allen <[email protected]>"
44

55
# Install deps

README.md

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# go-ipfs
22

3-
![banner](https://ipfs.io/ipfs/QmVk7srrwahXLNmcDYvyUEJptyoxpndnRa57YJ11L4jV26/ipfs.go.png)
3+
![banner](https://ipfs.io/ipfs/bafykbzacecaesuqmivkauix25v6i6xxxsvsrtxknhgb5zak3xxsg2nb4dhs2u/ipfs.go.png)
44

55
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
66
[![Matrix](https://img.shields.io/badge/matrix-%23ipfs%3Amatrix.org-blue.svg?style=flat-square)](https://matrix.to/#/room/#ipfs:matrix.org)
@@ -160,7 +160,7 @@ PS> scoop install go-ipfs
160160

161161
### Build from Source
162162

163-
go-ipfs's build system requires Go 1.14.4 and some standard POSIX build tools:
163+
go-ipfs's build system requires Go 1.15.2 and some standard POSIX build tools:
164164

165165
* GNU make
166166
* Git
@@ -170,7 +170,7 @@ To build without GCC, build with `CGO_ENABLED=0` (e.g., `make build CGO_ENABLED=
170170

171171
#### Install Go
172172

173-
The build process for ipfs requires Go 1.14.4 or higher. If you don't have it: [Download Go 1.14+](https://golang.org/dl/).
173+
The build process for ipfs requires Go 1.15.2 or higher. If you don't have it: [Download Go 1.15+](https://golang.org/dl/).
174174

175175
You'll need to add Go's bin directories to your `$PATH` environment variable e.g., by adding these lines to your `/etc/profile` (for a system-wide installation) or `$HOME/.profile`:
176176

@@ -288,29 +288,33 @@ Basic proof of 'ipfs working' locally:
288288
289289
SUBCOMMANDS
290290
BASIC COMMANDS
291-
init Initialize ipfs local configuration
292-
add <path> Add a file to ipfs
293-
cat <ref> Show ipfs object data
294-
get <ref> Download ipfs objects
291+
init Initialize local IPFS configuration
292+
add <path> Add a file to IPFS
293+
cat <ref> Show IPFS object data
294+
get <ref> Download IPFS objects
295295
ls <ref> List links from an object
296296
refs <ref> List hashes of links from an object
297297
298298
DATA STRUCTURE COMMANDS
299+
dag Interact with IPLD DAG nodes
300+
files Interact with files as if they were a unix filesystem
299301
block Interact with raw blocks in the datastore
300-
object Interact with raw dag nodes
301-
files Interact with objects as if they were a unix filesystem
302302
303303
ADVANCED COMMANDS
304304
daemon Start a long-running daemon process
305-
mount Mount an ipfs read-only mount point
305+
mount Mount an IPFS read-only mount point
306306
resolve Resolve any type of name
307-
name Publish or resolve IPNS names
307+
name Publish and resolve IPNS names
308+
key Create and list IPNS name keypairs
308309
dns Resolve DNS links
309310
pin Pin objects to local storage
310-
repo Manipulate an IPFS repository
311+
repo Manipulate the IPFS repository
312+
stats Various operational stats
313+
p2p Libp2p stream mounting
314+
filestore Manage the filestore (experimental)
311315
312316
NETWORK COMMANDS
313-
id Show info about ipfs peers
317+
id Show info about IPFS peers
314318
bootstrap Add or remove bootstrap peers
315319
swarm Manage connections to the p2p network
316320
dht Query the DHT for values or peers
@@ -319,9 +323,11 @@ SUBCOMMANDS
319323
320324
TOOL COMMANDS
321325
config Manage configuration
322-
version Show ipfs version information
326+
version Show IPFS version information
323327
update Download and apply go-ipfs updates
324328
commands List all available commands
329+
cid Convert and discover properties of CIDs
330+
log Manage and show logs of running daemon
325331
326332
Use 'ipfs <command> --help' to learn more about each command.
327333

assets/assets.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//go:generate git submodule update --init ./dir-index-html
22
//go:generate go run github.com/go-bindata/go-bindata/v3/go-bindata -mode=0644 -modtime=1403768328 -pkg=assets init-doc dir-index-html/dir-index.html dir-index-html/knownIcons.txt
3-
//go:generate gofmt -w bindata.go
3+
//go:generate gofmt -s -w bindata.go
44
//go:generate sh -c "sed -i \"s/.*BindataVersionHash.*/BindataVersionHash=\\\"$(git hash-object bindata.go)\\\"/\" bindata_version_hash.go"
5-
//go:generate gofmt -w bindata_version_hash.go
5+
//go:generate gofmt -s -w bindata_version_hash.go
66
package assets
77

88
import (

assets/bindata.go

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/check_version

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ check_at_least_version() {
3434
# We expect a version to be of form X.X.X
3535
# if the second dot doesn't match, we consider it a prerelease
3636

37-
if MIN_MIN=$(expr "$MIN_VERS" : "[^.]*\.\([0-9]\+\)"); then
37+
if MIN_MIN=$(expr "$MIN_VERS" : "[^.]*\.\([0-9][0-9]*\)"); then
3838
# this captured digit is necessary, since expr returns code 1 if the output is empty
3939
if expr "$MIN_VERS" : "[^.]*\.[0-9]*\([0-9]\.\|[0-9]\$\)" >/dev/null; then
4040
MIN_PRERELEASE="0"
4141
else
4242
MIN_PRERELEASE="1"
4343
fi
44-
MIN_FIX=$(expr "$MIN_VERS" : "[^.]*\.[0-9]\+[^0-9]\+\([0-9]\+\)") || MIN_FIX="0"
44+
MIN_FIX=$(expr "$MIN_VERS" : "[^.]*\.[0-9][0-9]*[^0-9][^0-9]*\([0-9][0-9]*\)") || MIN_FIX="0"
4545
else
4646
MIN_MIN="0"
4747
MIN_PRERELEASE="0"
4848
MIN_FIX="0"
4949
fi
50-
if CUR_MIN=$(expr "$CUR_VERS" : "[^.]*\.\([0-9]\+\)"); then
50+
if CUR_MIN=$(expr "$CUR_VERS" : "[^.]*\.\([0-9][0-9]*\)"); then
5151
# this captured digit is necessary, since expr returns code 1 if the output is empty
5252
if expr "$CUR_VERS" : "[^.]*\.[0-9]*\([0-9]\.\|[0-9]\$\)" >/dev/null; then
5353
CUR_PRERELEASE="0"
5454
else
5555
CUR_PRERELEASE="1"
5656
fi
57-
CUR_FIX=$(expr "$CUR_VERS" : "[^.]*\.[0-9]\+[^0-9]\+\([0-9]\+\)") || CUR_FIX="0"
57+
CUR_FIX=$(expr "$CUR_VERS" : "[^.]*\.[0-9][0-9]*[^0-9][^0-9]*\([0-9][0-9]*\)") || CUR_FIX="0"
5858
else
5959
CUR_MIN="0"
6060
CUR_PRERELEASE="0"

bin/mkreleaselog

+27-16
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ msg() {
4040
}
4141

4242
statlog() {
43-
local rpath="$GOPATH/src/$1"
43+
local module="$1"
44+
local rpath="$GOPATH/src/$(strip_version "$module")"
4445
local start="${2:-}"
4546
local end="${3:-HEAD}"
4647
local mailmap_file="$rpath/.mailmap"
@@ -106,9 +107,10 @@ pr_link() {
106107
release_log() {
107108
setopt local_options BASH_REMATCH
108109

109-
local repo="$1"
110+
local module="$1"
110111
local start="$2"
111112
local end="${3:-HEAD}"
113+
local repo="$(strip_version "$1")"
112114
local dir="$GOPATH/src/$repo"
113115

114116
local commit pr
@@ -139,11 +141,11 @@ indent() {
139141
}
140142

141143
mod_deps() {
142-
go list -json -m all | jq 'select(.Version != null)'
144+
go list -mod=mod -json -m all | jq 'select(.Version != null)'
143145
}
144146

145147
ensure() {
146-
local repo="$1"
148+
local repo="$(strip_version "$1")"
147149
local commit="$2"
148150
local rpath="$GOPATH/src/$repo"
149151
if [[ ! -d "$rpath" ]]; then
@@ -164,14 +166,23 @@ statsummary() {
164166
jq '. + {Lines: (.Deletions + .Insertions)}'
165167
}
166168

169+
strip_version() {
170+
local repo="$1"
171+
if [[ "$repo" =~ '.*/v[0-9]+$' ]]; then
172+
repo="$(dirname "$repo")"
173+
fi
174+
echo "$repo"
175+
}
176+
167177
recursive_release_log() {
168178
local start="${1:-$(git tag -l | sort -V | grep -v -- '-rc' | grep 'v'| tail -n1)}"
169179
local end="${2:-$(git rev-parse HEAD)}"
170180
local repo_root="$(git rev-parse --show-toplevel)"
171-
local package="$(cd "$repo_root" && go list)"
181+
local module="$(go list -m)"
182+
local dir="$(go list -m -f '{{.Dir}}')"
172183

173-
if ! [[ "${GOPATH}/${package}" != "${repo_root}" ]]; then
174-
echo "This script requires the target package and all dependencies to live in a GOPATH."
184+
if [[ "${GOPATH}/${module}" -ef "${dir}" ]]; then
185+
echo "This script requires the target module and all dependencies to live in a GOPATH."
175186
return 1
176187
fi
177188

@@ -191,28 +202,28 @@ recursive_release_log() {
191202

192203
rm -f go.mod go.sum
193204

194-
printf -- "Generating Changelog for %s %s..%s\n" "$package" "$start" "$end" >&2
205+
printf -- "Generating Changelog for %s %s..%s\n" "$module" "$start" "$end" >&2
195206

196-
printf -- "- %s:\n" "$package"
197-
release_log "$package" "$start" "$end" | indent
207+
printf -- "- %s:\n" "$module"
208+
release_log "$module" "$start" "$end" | indent
198209

199210

200-
statlog "$package" "$start" "$end" > statlog.json
211+
statlog "$module" "$start" "$end" > statlog.json
201212

202213
dep_changes old_deps.json new_deps.json |
203214
jq --arg filter "$REPO_FILTER" 'select(.Path | match($filter))' |
204215
# Compute changelogs
205216
jq -r '"\(.Path) \(.New.Version) \(.New.Ref) \(.Old.Version) \(.Old.Ref // "")"' |
206-
while read repo new new_ref old old_ref; do
207-
if ! ensure "$repo" "$new_ref"; then
217+
while read module new new_ref old old_ref; do
218+
if ! ensure "$module" "$new_ref"; then
208219
result=1
209220
local changelog="failed to fetch repo"
210221
else
211-
statlog "$repo" "$old_ref" "$new_ref" >> statlog.json
212-
local changelog="$(release_log "$repo" "$old_ref" "$new_ref")"
222+
statlog "$module" "$old_ref" "$new_ref" >> statlog.json
223+
local changelog="$(release_log "$module" "$old_ref" "$new_ref")"
213224
fi
214225
if [[ -n "$changelog" ]]; then
215-
printf -- "- %s (%s -> %s):\n" "$repo" "$old" "$new"
226+
printf -- "- %s (%s -> %s):\n" "$module" "$old" "$new"
216227
echo "$changelog" | indent
217228
fi
218229
done

bin/push-docker-tags.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# A bit like dockerhub autobuild config, but somewhere we can version control it.
77
#
88
# The `docker-build` job in .circleci/config.yml builds the current commit
9-
# in docker and tags it as ipfs/go-ipfs:wip
9+
# in docker and tags it as ipfs/go-ipfs:wip
1010
#
1111
# Then the `docker-publish` job runs this script to decide what tag, if any,
1212
# to publish to dockerhub.
@@ -59,9 +59,13 @@ pushTag () {
5959
fi
6060
}
6161

62-
if [[ $GIT_TAG =~ ^v[0-9]+ ]]; then
62+
if [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc ]]; then
63+
pushTag "$GIT_TAG"
64+
65+
elif [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
6366
pushTag "$GIT_TAG"
6467
pushTag "latest"
68+
pushTag "release" # see: https://github.com/ipfs/go-ipfs/issues/3999#issuecomment-742228981
6569

6670
elif [ "$GIT_BRANCH" = "feat/stabilize-dht" ]; then
6771
pushTag "bifrost-${BUILD_NUM}-${GIT_SHA1_SHORT}"

bin/test-go-fmt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ T="$(mktemp)"
44
find . \
55
-path ./test/sharness -prune \
66
-o -path ./plugin/loader/preload.go -prune \
7-
-o -name '*.go' -print0 | xargs -0 gofmt -l > "$T"
7+
-o -name '*.go' -print0 | xargs -0 gofmt -s -l > "$T"
88

99
if [ -n "$(cat $T)" ]; then
1010
echo "Following Go code is not formatted."

0 commit comments

Comments
 (0)