Pull request 1747: chlog-and-proj-skel
Merge in DNS/adguard-home from chlog-and-proj-skel to master Squashed commit of the following: commit 8e7c3e2eb50c559bdcd5862e72c16511dd8272da Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 21 16:52:10 2023 +0300 all: upd proj skel
This commit is contained in:
parent
20531de760
commit
ff9b24ad69
29
CHANGELOG.md
29
CHANGELOG.md
|
@ -14,11 +14,11 @@ and this project adheres to
|
||||||
<!--
|
<!--
|
||||||
## [v0.108.0] - TBA
|
## [v0.108.0] - TBA
|
||||||
|
|
||||||
## [v0.107.25] - 2023-03-09 (APPROX.)
|
## [v0.107.26] - 2023-03-09 (APPROX.)
|
||||||
|
|
||||||
See also the [v0.107.25 GitHub milestone][ms-v0.107.25].
|
See also the [v0.107.26 GitHub milestone][ms-v0.107.26].
|
||||||
|
|
||||||
[ms-v0.107.25]: https://github.com/AdguardTeam/AdGuardHome/milestone/61?closed=1
|
[ms-v0.107.26]: https://github.com/AdguardTeam/AdGuardHome/milestone/62?closed=1
|
||||||
|
|
||||||
NOTE: Add new changes BELOW THIS COMMENT.
|
NOTE: Add new changes BELOW THIS COMMENT.
|
||||||
-->
|
-->
|
||||||
|
@ -27,11 +27,9 @@ NOTE: Add new changes BELOW THIS COMMENT.
|
||||||
|
|
||||||
- Requirements to domain names in domain-specific upstream configurations have
|
- Requirements to domain names in domain-specific upstream configurations have
|
||||||
been relaxed to meet those from [RFC 3696][rfc3696] ([#4884]).
|
been relaxed to meet those from [RFC 3696][rfc3696] ([#4884]).
|
||||||
- Panic when using unencrypted DNS-over-HTTPS ([#5518]).
|
|
||||||
- Failing service installation via script on FreeBSD ([#5431]).
|
- Failing service installation via script on FreeBSD ([#5431]).
|
||||||
|
|
||||||
[#4884]: https://github.com/AdguardTeam/AdGuardHome/issues/4884
|
[#4884]: https://github.com/AdguardTeam/AdGuardHome/issues/4884
|
||||||
[#5518]: https://github.com/AdguardTeam/AdGuardHome/issues/5518
|
|
||||||
[#5431]: https://github.com/AdguardTeam/AdGuardHome/issues/5431
|
[#5431]: https://github.com/AdguardTeam/AdGuardHome/issues/5431
|
||||||
|
|
||||||
[rfc3696]: https://datatracker.ietf.org/doc/html/rfc3696
|
[rfc3696]: https://datatracker.ietf.org/doc/html/rfc3696
|
||||||
|
@ -42,6 +40,20 @@ NOTE: Add new changes ABOVE THIS COMMENT.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [v0.107.25] - 2023-02-21
|
||||||
|
|
||||||
|
See also the [v0.107.25 GitHub milestone][ms-v0.107.25].
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Panic when using unencrypted DNS-over-HTTPS ([#5518]).
|
||||||
|
|
||||||
|
[#5518]: https://github.com/AdguardTeam/AdGuardHome/issues/5518
|
||||||
|
|
||||||
|
[ms-v0.107.25]: https://github.com/AdguardTeam/AdGuardHome/milestone/61?closed=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [v0.107.24] - 2023-02-15
|
## [v0.107.24] - 2023-02-15
|
||||||
|
|
||||||
See also the [v0.107.24 GitHub milestone][ms-v0.107.24].
|
See also the [v0.107.24 GitHub milestone][ms-v0.107.24].
|
||||||
|
@ -1682,11 +1694,12 @@ See also the [v0.104.2 GitHub milestone][ms-v0.104.2].
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.25...HEAD
|
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.26...HEAD
|
||||||
[v0.107.25]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.24...v0.107.25
|
[v0.107.26]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.25...v0.107.26
|
||||||
-->
|
-->
|
||||||
|
|
||||||
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.24...HEAD
|
[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.25...HEAD
|
||||||
|
[v0.107.25]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.24...v0.107.25
|
||||||
[v0.107.24]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.23...v0.107.24
|
[v0.107.24]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.23...v0.107.24
|
||||||
[v0.107.23]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.22...v0.107.23
|
[v0.107.23]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.22...v0.107.23
|
||||||
[v0.107.22]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.21...v0.107.22
|
[v0.107.22]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.21...v0.107.22
|
||||||
|
|
32
Makefile
32
Makefile
|
@ -4,17 +4,26 @@
|
||||||
# See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html.
|
# See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html.
|
||||||
.POSIX:
|
.POSIX:
|
||||||
|
|
||||||
|
# This comment is used to simplify checking local copies of the
|
||||||
|
# Makefile. Bump this number every time a significant change is made to
|
||||||
|
# this Makefile.
|
||||||
|
#
|
||||||
|
# AdGuard-Project-Version: 2
|
||||||
|
|
||||||
|
# Don't name these macros "GO" etc., because GNU Make apparently makes
|
||||||
|
# them exported environment variables with the literal value of
|
||||||
|
# "${GO:-go}" and so on, which is not what we need. Use a dot in the
|
||||||
|
# name to make sure that users don't have an environment variable with
|
||||||
|
# the same name.
|
||||||
|
#
|
||||||
|
# See https://unix.stackexchange.com/q/646255/105635.
|
||||||
|
GO.MACRO = $${GO:-go}
|
||||||
|
VERBOSE.MACRO = $${VERBOSE:-0}
|
||||||
|
|
||||||
CHANNEL = development
|
CHANNEL = development
|
||||||
CLIENT_DIR = client
|
CLIENT_DIR = client
|
||||||
COMMIT = $$( git rev-parse --short HEAD )
|
COMMIT = $$( git rev-parse --short HEAD )
|
||||||
DIST_DIR = dist
|
DIST_DIR = dist
|
||||||
# Don't name this macro "GO", because GNU Make apparenly makes it an
|
|
||||||
# exported environment variable with the literal value of "${GO:-go}",
|
|
||||||
# which is not what we need. Use a dot in the name to make sure that
|
|
||||||
# users don't have an environment variable with the same name.
|
|
||||||
#
|
|
||||||
# See https://unix.stackexchange.com/q/646255/105635.
|
|
||||||
GO.MACRO = $${GO:-go}
|
|
||||||
GOPROXY = https://goproxy.cn|https://proxy.golang.org|direct
|
GOPROXY = https://goproxy.cn|https://proxy.golang.org|direct
|
||||||
GOSUMDB = sum.golang.google.cn
|
GOSUMDB = sum.golang.google.cn
|
||||||
GPG_KEY = devteam@adguard.com
|
GPG_KEY = devteam@adguard.com
|
||||||
|
@ -25,7 +34,6 @@ NPM_INSTALL_FLAGS = $(NPM_FLAGS) --quiet --no-progress --ignore-engines\
|
||||||
--ignore-optional --ignore-platform --ignore-scripts
|
--ignore-optional --ignore-platform --ignore-scripts
|
||||||
RACE = 0
|
RACE = 0
|
||||||
SIGN = 1
|
SIGN = 1
|
||||||
VERBOSE = 0
|
|
||||||
VERSION = v0.0.0
|
VERSION = v0.0.0
|
||||||
YARN = yarn
|
YARN = yarn
|
||||||
|
|
||||||
|
@ -59,13 +67,13 @@ ENV = env\
|
||||||
RACE='$(RACE)'\
|
RACE='$(RACE)'\
|
||||||
SIGN='$(SIGN)'\
|
SIGN='$(SIGN)'\
|
||||||
NEXTAPI='$(NEXTAPI)'\
|
NEXTAPI='$(NEXTAPI)'\
|
||||||
VERBOSE='$(VERBOSE)'\
|
VERBOSE="$(VERBOSE.MACRO)"\
|
||||||
VERSION='$(VERSION)'\
|
VERSION='$(VERSION)'\
|
||||||
|
|
||||||
# Keep the line above blank.
|
# Keep the line above blank.
|
||||||
|
|
||||||
# Keep this target first, so that a naked make invocation triggers
|
# Keep this target first, so that a naked make invocation triggers a
|
||||||
# a full build.
|
# full build.
|
||||||
build: deps quick-build
|
build: deps quick-build
|
||||||
|
|
||||||
quick-build: js-build go-build
|
quick-build: js-build go-build
|
||||||
|
@ -119,4 +127,4 @@ go-os-check:
|
||||||
openapi-lint: ; cd ./openapi/ && $(YARN) test
|
openapi-lint: ; cd ./openapi/ && $(YARN) test
|
||||||
openapi-show: ; cd ./openapi/ && $(YARN) start
|
openapi-show: ; cd ./openapi/ && $(YARN) start
|
||||||
|
|
||||||
txt-lint: ; $(ENV) "$(SHELL)" ./scripts/make/txt-lint.sh
|
txt-lint: ; $(ENV) "$(SHELL)" ./scripts/make/txt-lint.sh
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//go:build tools
|
//go:build tools
|
||||||
// +build tools
|
|
||||||
|
|
||||||
package tools
|
package tools
|
||||||
|
|
||||||
|
|
1
main.go
1
main.go
|
@ -1,5 +1,4 @@
|
||||||
//go:build !next
|
//go:build !next
|
||||||
// +build !next
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//go:build next
|
//go:build next
|
||||||
// +build next
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,18 @@
|
||||||
|
|
||||||
set -e -f -u
|
set -e -f -u
|
||||||
|
|
||||||
# Only show interactive prompts if there is a terminal attached. This
|
# This comment is used to simplify checking local copies of the script.
|
||||||
# should work on all of our supported Unix systems.
|
# Bump this number every time a significant change is made to this
|
||||||
|
# script.
|
||||||
|
#
|
||||||
|
# AdGuard-Project-Version: 1
|
||||||
|
|
||||||
|
# Only show interactive prompts if there a terminal is attached to
|
||||||
|
# stdout. While this technically doesn't guarantee that reading from
|
||||||
|
# /dev/tty works, this should work reasonably well on all of our
|
||||||
|
# supported development systems and in most terminal emulators.
|
||||||
is_tty='0'
|
is_tty='0'
|
||||||
if [ -e /dev/tty ]
|
if [ -t '1' ]
|
||||||
then
|
then
|
||||||
is_tty='1'
|
is_tty='1'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
# only has superficial knowledge of the POSIX shell language and alike.
|
# only has superficial knowledge of the POSIX shell language and alike.
|
||||||
# Experienced readers may find it overly verbose.
|
# Experienced readers may find it overly verbose.
|
||||||
|
|
||||||
|
# This comment is used to simplify checking local copies of the script. Bump
|
||||||
|
# this number every time a significant change is made to this script.
|
||||||
|
#
|
||||||
|
# AdGuard-Project-Version: 1
|
||||||
|
|
||||||
# The default verbosity level is 0. Show every command that is run and every
|
# The default verbosity level is 0. Show every command that is run and every
|
||||||
# package that is processed if the caller requested verbosity level greater than
|
# package that is processed if the caller requested verbosity level greater than
|
||||||
# 0. Also show subcommands if the requested verbosity level is greater than 1.
|
# 0. Also show subcommands if the requested verbosity level is greater than 1.
|
||||||
|
@ -111,17 +116,17 @@ readonly o_flags
|
||||||
# must be enabled.
|
# must be enabled.
|
||||||
if [ "${RACE:-0}" -eq '0' ]
|
if [ "${RACE:-0}" -eq '0' ]
|
||||||
then
|
then
|
||||||
cgo_enabled='0'
|
CGO_ENABLED='0'
|
||||||
race_flags='--race=0'
|
race_flags='--race=0'
|
||||||
else
|
else
|
||||||
cgo_enabled='1'
|
CGO_ENABLED='1'
|
||||||
race_flags='--race=1'
|
race_flags='--race=1'
|
||||||
fi
|
fi
|
||||||
readonly cgo_enabled race_flags
|
readonly CGO_ENABLED race_flags
|
||||||
|
export CGO_ENABLED
|
||||||
|
|
||||||
CGO_ENABLED="$cgo_enabled"
|
|
||||||
GO111MODULE='on'
|
GO111MODULE='on'
|
||||||
export CGO_ENABLED GO111MODULE
|
export GO111MODULE
|
||||||
|
|
||||||
# Build the new binary if requested.
|
# Build the new binary if requested.
|
||||||
if [ "${NEXTAPI:-0}" -eq '0' ]
|
if [ "${NEXTAPI:-0}" -eq '0' ]
|
||||||
|
@ -132,5 +137,16 @@ else
|
||||||
fi
|
fi
|
||||||
readonly tags_flags
|
readonly tags_flags
|
||||||
|
|
||||||
"$go" build --ldflags "$ldflags" "$race_flags" "$tags_flags" --trimpath "$o_flags" "$v_flags"\
|
if [ "$verbose" -gt '0' ]
|
||||||
|
then
|
||||||
|
"$go" env
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$go" build\
|
||||||
|
--ldflags "$ldflags"\
|
||||||
|
"$race_flags"\
|
||||||
|
"$tags_flags"\
|
||||||
|
--trimpath\
|
||||||
|
"$o_flags"\
|
||||||
|
"$v_flags"\
|
||||||
"$x_flags"
|
"$x_flags"
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This comment is used to simplify checking local copies of the script. Bump
|
||||||
|
# this number every time a significant change is made to this script.
|
||||||
|
#
|
||||||
|
# AdGuard-Project-Version: 1
|
||||||
|
|
||||||
verbose="${VERBOSE:-0}"
|
verbose="${VERBOSE:-0}"
|
||||||
readonly verbose
|
readonly verbose
|
||||||
|
|
||||||
|
@ -7,14 +12,14 @@ if [ "$verbose" -gt '1' ]
|
||||||
then
|
then
|
||||||
env
|
env
|
||||||
set -x
|
set -x
|
||||||
x_flags='-x'
|
x_flags='-x=1'
|
||||||
elif [ "$verbose" -gt '0' ]
|
elif [ "$verbose" -gt '0' ]
|
||||||
then
|
then
|
||||||
set -x
|
set -x
|
||||||
x_flags=''
|
x_flags='-x=0'
|
||||||
else
|
else
|
||||||
set +x
|
set +x
|
||||||
x_flags=''
|
x_flags='-x=0'
|
||||||
fi
|
fi
|
||||||
readonly x_flags
|
readonly x_flags
|
||||||
|
|
||||||
|
@ -23,6 +28,4 @@ set -e -f -u
|
||||||
go="${GO:-go}"
|
go="${GO:-go}"
|
||||||
readonly go
|
readonly go
|
||||||
|
|
||||||
# Don't use quotes with flag variables because we want an empty space if those
|
"$go" mod download "$x_flags"
|
||||||
# aren't set.
|
|
||||||
"$go" mod download $x_flags
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This comment is used to simplify checking local copies of the script. Bump
|
||||||
|
# this number every time a significant change is made to this script.
|
||||||
|
#
|
||||||
|
# AdGuard-Project-Version: 1
|
||||||
|
|
||||||
verbose="${VERBOSE:-0}"
|
verbose="${VERBOSE:-0}"
|
||||||
readonly verbose
|
readonly verbose
|
||||||
|
|
||||||
|
@ -43,5 +48,12 @@ shuffle_flags='--shuffle=on'
|
||||||
timeout_flags="${TIMEOUT_FLAGS:---timeout=90s}"
|
timeout_flags="${TIMEOUT_FLAGS:---timeout=90s}"
|
||||||
readonly count_flags cover_flags shuffle_flags timeout_flags
|
readonly count_flags cover_flags shuffle_flags timeout_flags
|
||||||
|
|
||||||
"$go" test "$count_flags" "$cover_flags" "$race_flags" "$shuffle_flags" "$timeout_flags"\
|
"$go" test\
|
||||||
"$x_flags" "$v_flags" ./...
|
"$count_flags"\
|
||||||
|
"$cover_flags"\
|
||||||
|
"$shuffle_flags"\
|
||||||
|
"$race_flags"\
|
||||||
|
"$timeout_flags"\
|
||||||
|
"$x_flags"\
|
||||||
|
"$v_flags"\
|
||||||
|
./...
|
||||||
|
|
|
@ -1,22 +1,27 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This comment is used to simplify checking local copies of the script. Bump
|
||||||
|
# this number every time a significant change is made to this script.
|
||||||
|
#
|
||||||
|
# AdGuard-Project-Version: 2
|
||||||
|
|
||||||
verbose="${VERBOSE:-0}"
|
verbose="${VERBOSE:-0}"
|
||||||
readonly verbose
|
readonly verbose
|
||||||
|
|
||||||
if [ "$verbose" -gt '1' ]
|
if [ "$verbose" -gt '1' ]
|
||||||
then
|
then
|
||||||
set -x
|
set -x
|
||||||
v_flags='-v'
|
v_flags='-v=1'
|
||||||
x_flags='-x'
|
x_flags='-x=1'
|
||||||
elif [ "$verbose" -gt '0' ]
|
elif [ "$verbose" -gt '0' ]
|
||||||
then
|
then
|
||||||
set -x
|
set -x
|
||||||
v_flags='-v'
|
v_flags='-v=1'
|
||||||
x_flags=''
|
x_flags='-x=0'
|
||||||
else
|
else
|
||||||
set +x
|
set +x
|
||||||
v_flags=''
|
v_flags='-v=0'
|
||||||
x_flags=''
|
x_flags='-x=0'
|
||||||
fi
|
fi
|
||||||
readonly v_flags x_flags
|
readonly v_flags x_flags
|
||||||
|
|
||||||
|
@ -27,6 +32,25 @@ readonly go
|
||||||
|
|
||||||
# TODO(a.garipov): Add goconst?
|
# TODO(a.garipov): Add goconst?
|
||||||
|
|
||||||
|
# Remove only the actual binaries in the bin/ directory, as developers may add
|
||||||
|
# their own scripts there. Most commonly, a script named “go” for tools that
|
||||||
|
# call the go binary and need a particular version.
|
||||||
|
rm -f\
|
||||||
|
bin/errcheck\
|
||||||
|
bin/fieldalignment\
|
||||||
|
bin/gocyclo\
|
||||||
|
bin/gofumpt\
|
||||||
|
bin/gosec\
|
||||||
|
bin/govulncheck\
|
||||||
|
bin/ineffassign\
|
||||||
|
bin/looppointer\
|
||||||
|
bin/misspell\
|
||||||
|
bin/nilness\
|
||||||
|
bin/shadow\
|
||||||
|
bin/staticcheck\
|
||||||
|
bin/unparam\
|
||||||
|
;
|
||||||
|
|
||||||
# Reset GOARCH and GOOS to make sure we install the tools for the native
|
# Reset GOARCH and GOOS to make sure we install the tools for the native
|
||||||
# architecture even when we're cross-compiling the main binary, and also to
|
# architecture even when we're cross-compiling the main binary, and also to
|
||||||
# prevent the "cannot install cross-compiled binaries when GOBIN is set" error.
|
# prevent the "cannot install cross-compiled binaries when GOBIN is set" error.
|
||||||
|
@ -37,14 +61,15 @@ env\
|
||||||
GOWORK='off'\
|
GOWORK='off'\
|
||||||
"$go" install\
|
"$go" install\
|
||||||
--modfile=./internal/tools/go.mod\
|
--modfile=./internal/tools/go.mod\
|
||||||
$v_flags\
|
"$v_flags"\
|
||||||
$x_flags\
|
"$x_flags"\
|
||||||
github.com/fzipp/gocyclo/cmd/gocyclo\
|
github.com/fzipp/gocyclo/cmd/gocyclo\
|
||||||
github.com/golangci/misspell/cmd/misspell\
|
github.com/golangci/misspell/cmd/misspell\
|
||||||
github.com/gordonklaus/ineffassign\
|
github.com/gordonklaus/ineffassign\
|
||||||
github.com/kisielk/errcheck\
|
github.com/kisielk/errcheck\
|
||||||
github.com/kyoh86/looppointer/cmd/looppointer\
|
github.com/kyoh86/looppointer/cmd/looppointer\
|
||||||
github.com/securego/gosec/v2/cmd/gosec\
|
github.com/securego/gosec/v2/cmd/gosec\
|
||||||
|
golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment\
|
||||||
golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness\
|
golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness\
|
||||||
golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow\
|
golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow\
|
||||||
golang.org/x/vuln/cmd/govulncheck\
|
golang.org/x/vuln/cmd/govulncheck\
|
||||||
|
|
Loading…
Reference in New Issue