Skip to content

Commit 410dd4a

Browse files
committed
Merge branch 'develop' into feature-reduce-binary-size
2 parents f6a2584 + 233d825 commit 410dd4a

Some content is hidden

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

52 files changed

+1653
-788
lines changed

.editorconfig

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# EditorConfig: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default preferences
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# IDEA specific
12+
curly_bracket_next_line = false
13+
wildcard_import_limit = 0
14+
15+
16+
# Generic XML
17+
# https://google.github.io/styleguide/xmlstyle.html
18+
[*.xml]
19+
indent_size = 2
20+
indent_style = space
21+
22+
# Maven
23+
# https://maven.apache.org/
24+
[pom.xml]
25+
indent_size = 4
26+
indent_style = space
27+
28+
# Groovy (gradle)
29+
# ?
30+
[*.{groovy, gradle}]
31+
indent_size = 4
32+
indent_style = space
33+
34+
# Bazel: https://bazel.build/
35+
# https://github.com/bazelbuild/buildtools/blob/master/BUILD.bazel
36+
[*.{bazel, bzl}]
37+
indent_size = 4
38+
indent_style = space
39+
40+
# CSS
41+
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
42+
# http://cssguidelin.es/#syntax-and-formatting
43+
[*.css]
44+
indent_size = 2
45+
indent_style = space
46+
trim_trailing_whitespace = true
47+
48+
# GNU make
49+
# https://www.gnu.org/software/make/manual/html_node/Recipe-Syntax.html
50+
[Makefile]
51+
indent_style = tab
52+
53+
# Go
54+
# https://golang.org/cmd/gofmt/
55+
[{go.mod, *.go}]
56+
indent_style = tab
57+
58+
# GraphQL
59+
# https://graphql.org/learn/
60+
# https://prettier.io
61+
[*.graphql]
62+
indent_size = 2
63+
indent_style = space
64+
65+
# HTML
66+
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
67+
[*.{htm, html}]
68+
indent_size = 2
69+
indent_style = space
70+
trim_trailing_whitespace = true
71+
72+
# Java
73+
# https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation
74+
[*.java]
75+
indent_size = 2
76+
indent_style = space
77+
78+
# JavaScript, JSON, JSX, JavaScript Modules, TypeScript
79+
# https://github.com/feross/standard
80+
# https://prettier.io
81+
# https://github.com/angular/angular-cli/blob/master/.editorconfig
82+
[*.{cjs, js, json, jsx, mjs, ts, tsx}]
83+
indent_size = 2
84+
indent_style = space
85+
trim_trailing_whitespace = true
86+
quote_type = single
87+
88+
89+
# Kotlin (and gradle.kts)
90+
# https://android.github.io/kotlin-guides/style.html#indentation
91+
[*.{kt, kts}]
92+
indent_size = 4
93+
indent_style = space
94+
95+
# LESS
96+
# https://github.com/less/less-docs#less-standards
97+
[*.less]
98+
indent_size = 2
99+
indent_style = space
100+
101+
# PHP
102+
# http://www.php-fig.org/psr/psr-2/
103+
[*.php]
104+
indent_size = 4
105+
indent_style = space
106+
107+
# Python
108+
# https://www.python.org/dev/peps/pep-0008/#code-lay-out
109+
[*.py]
110+
indent_size = 4
111+
indent_style = space
112+
113+
# Ruby
114+
# http://www.caliban.org/ruby/rubyguide.shtml#indentation
115+
[*.rb]
116+
indent_size = 2
117+
indent_style = space
118+
119+
# Rust
120+
# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
121+
[*.rs]
122+
indent_size = 4
123+
indent_style = space
124+
insert_final_newline = false
125+
trim_trailing_whitespace = true
126+
127+
# SASS
128+
# https://sass-guidelin.es/#syntax--formatting
129+
[*.{sass, scss}]
130+
indent_size = 2
131+
indent_style = space
132+
133+
# Shell
134+
# https://google.github.io/styleguide/shell.xml#Indentation
135+
[*.{bash, sh, zsh}]
136+
indent_size = 2
137+
indent_style = space
138+
139+
# TOML
140+
# https://github.com/toml-lang/toml/tree/master/examples
141+
[*.toml]
142+
indent_size = 2
143+
indent_style = space
144+
145+
# YAML
146+
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
147+
[*.{yaml, yml}]
148+
indent_size = 2
149+
indent_style = space

.github/renovate.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,15 @@
22
"extends": [
33
"config:base"
44
],
5-
"rebaseWhen": "behind-base-branch"
5+
"packageRules": [
6+
{
7+
"matchUpdateTypes": ["patch"],
8+
"automerge": true
9+
}
10+
],
11+
"rebaseWhen": "behind-base-branch",
12+
"ignoreDeps": [
13+
"golang.org/x/net",
14+
"golang.org/x/sys"
15+
]
616
}

.github/workflows/push.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,38 @@ jobs:
1414
GO111MODULE: "on"
1515

1616
steps:
17-
- name: Install Go
18-
uses: actions/setup-go@v1
19-
with:
20-
go-version: ${{ matrix.go-version }}
21-
- name: Install libgtk-3-dev
22-
if: matrix.platform == 'ubuntu-18.04'
23-
run: |
24-
sudo apt-get update -y
25-
sudo apt-get install -y libgtk-3-dev
26-
- name: Install goversioninfo
27-
shell: bash
28-
run: |
29-
export GOPATH="${HOME}/go"
30-
mkdir -p ${GOPATH}/bin
31-
mkdir -p ${GOPATH}/pkg
32-
mkdir -p ${GOPATH}/src
33-
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
34-
- name: Checkout repository
35-
uses: actions/checkout@v1
36-
- name: Test and build
37-
shell: bash
38-
run: |
39-
export GOPATH="${HOME}/go"
40-
export PATH="${GOPATH}/bin:${PATH}"
41-
make test
42-
make copy-test-files
43-
make
44-
make tools
45-
- name: Build and push Docker image
46-
shell: bash
47-
run: |
48-
printf "%s" "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
49-
docker build -f docker/validator-service.Dockerfile -t ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/} .
50-
docker push ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/}
51-
docker logout
17+
- name: Install Go
18+
uses: actions/setup-go@v2.1.3
19+
with:
20+
go-version: ${{ matrix.go-version }}
21+
- name: Install libgtk-3-dev
22+
if: matrix.platform == 'ubuntu-18.04'
23+
run: |
24+
sudo apt-get update -y
25+
sudo apt-get install -y libgtk-3-dev
26+
- name: Install goversioninfo
27+
shell: bash
28+
run: |
29+
export GOPATH="${HOME}/go"
30+
mkdir -p ${GOPATH}/bin
31+
mkdir -p ${GOPATH}/pkg
32+
mkdir -p ${GOPATH}/src
33+
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
34+
- name: Checkout repository
35+
uses: actions/checkout@v2.3.4
36+
- name: Test and build
37+
shell: bash
38+
run: |
39+
export GOPATH="${HOME}/go"
40+
export PATH="${GOPATH}/bin:${PATH}"
41+
make test
42+
make copy-test-files
43+
make
44+
make tools
45+
- name: Build and push Docker image
46+
shell: bash
47+
run: |
48+
printf "%s" "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
49+
docker build -f docker/validator-service.Dockerfile -t ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/} .
50+
docker push ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/}
51+
docker logout

.github/workflows/test.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,37 @@ jobs:
1515
GO111MODULE: "on"
1616

1717
steps:
18-
- name: Install Go
19-
uses: actions/setup-go@v1
20-
with:
21-
go-version: ${{ matrix.go-version }}
22-
- name: Install libgtk-3-dev
23-
if: matrix.platform == 'ubuntu-18.04'
24-
run: |
25-
sudo apt-get update -y
26-
sudo apt-get install -y libgtk-3-dev
27-
- name: Install UPX (Linux)
28-
if: matrix.platform == 'ubuntu-18.04'
29-
run: sudo apt-get update && sudo apt-get install upx-ucl
30-
- name: Install UPX (Windows)
31-
if: matrix.platform == 'windows-2019'
32-
run: choco install upx -y
33-
- name: Install goversioninfo
34-
shell: bash
35-
run: |
36-
export GOPATH="${HOME}/go"
37-
mkdir -p ${GOPATH}/bin
38-
mkdir -p ${GOPATH}/pkg
39-
mkdir -p ${GOPATH}/src
40-
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
41-
- name: Checkout repository
42-
uses: actions/checkout@v1
43-
- name: Test and build
44-
shell: bash
45-
run: |
46-
export GOPATH="${HOME}/go"
47-
export PATH="${GOPATH}/bin:${PATH}"
48-
make test
49-
make copy-test-files
50-
make
51-
make tools
18+
- name: Install Go
19+
uses: actions/setup-go@v2.1.3
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
- name: Install libgtk-3-dev
23+
if: matrix.platform == 'ubuntu-18.04'
24+
run: |
25+
sudo apt-get update -y
26+
sudo apt-get install -y libgtk-3-dev
27+
- name: Install UPX (Linux)
28+
if: matrix.platform == 'ubuntu-18.04'
29+
run: sudo apt-get update && sudo apt-get install upx-ucl
30+
- name: Install UPX (Windows)
31+
if: matrix.platform == 'windows-2019'
32+
run: choco install upx -y
33+
- name: Install goversioninfo
34+
shell: bash
35+
run: |
36+
export GOPATH="${HOME}/go"
37+
mkdir -p ${GOPATH}/bin
38+
mkdir -p ${GOPATH}/pkg
39+
mkdir -p ${GOPATH}/src
40+
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
41+
- name: Checkout repository
42+
uses: actions/checkout@v2.3.4
43+
- name: Test and build
44+
shell: bash
45+
run: |
46+
export GOPATH="${HOME}/go"
47+
export PATH="${GOPATH}/bin:${PATH}"
48+
make test
49+
make copy-test-files
50+
make
51+
make tools

.hound.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
go:
2+
enabled: true

.whitesource

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"scanSettings": {
3+
"baseBranches": []
4+
},
5+
"checkRunSettings": {
6+
"vulnerableCheckRunConclusionLevel": "failure",
7+
"displayMode": "diff"
8+
},
9+
"issueSettings": {
10+
"minSeverityLevel": "LOW"
11+
}
12+
}

CHANGES.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
# Release-Changelog
22

3-
## 1.5.0 (TBD)
3+
## TBD (TBD)
44
### Changes
55
* DWARF symbols are now stripped from the trivrost binary to reduce file size. This can save a few bytes on some platforms.
66
* The binary is now compressed with UPX when using `make`. Reduces the final filesystem to under 50%.
7-
* Shorter log-output for proxy detection. Reduces size of the log output by 5–15%.
8-
* Update some dependencies:
9-
* gopsutils: v2.19.4 -> v2.20.3
7+
* Shorter log-output for proxy detection. Reduces average size of the log output by 5–15%.
8+
* Shorter log-output for HTTP errors, reduces size of log output by a few percent.
9+
* Update dependencies to recent versions: gopsutils, testify, gojsonschema, logrus, prometheus/client_golang, go_ieproxy, fatih/color, golang/x/sys, golang/x/net
10+
* Do not hide the download speed label, even if the speed is zero.
11+
* The download-speed label now shows a 3 second average.
12+
* `hasher` will no longer blindly overwrite an existing bundleinfo.json but instead error out.
13+
### Features
14+
* trivrost will log the progress of downloads if the connection was interrupted for any reason.
15+
### Fixes
16+
* `hasher` will no longer create a directory if a non-existing one is passed as an argument.
17+
* trivrost will no longer attempt to repeat range requests to a host after it has failed to conformly respond while displaying the confusing message `Taking longer than usual: HTTP Status 200` and will now fail immediately in such cases instead.
18+
* trivrost will no longer fail to comply with HTTP 2 strictly using lower-case HTTP Header names. This had been caused by methods of `http.Header` still being oriented around HTTP 1 canonical header names due to Go's backwards compatibility promise.
19+
20+
## 1.4.6 (2021-01-25)
21+
### Fixes
22+
* Windows binary signing: Use RFC-3161 timestamp server with sha 256 config. SHA-1 ciphers are considered deprecated. Nothing should change for the enduser.
23+
24+
## 1.4.5 (2021-01-04)
25+
### Fixes
26+
* Switch timestamp server for signing from Verisign to Globalsign.
1027

1128
## 1.4.4 (2020-01-17)
1229
### Changes

0 commit comments

Comments
 (0)