Skip to content

Commit

Permalink
Pull request: all: imp new plat docs
Browse files Browse the repository at this point in the history
Updates AdguardTeam#2441.
Updates AdguardTeam#2443.

Squashed commit of the following:

commit 6e52189
Author: Ainar Garipov <[email protected]>
Date:   Tue Jun 1 15:56:21 2021 +0300

    all: imp new plat docs
  • Loading branch information
ainar-g committed Jun 1, 2021
1 parent 3fb3288 commit be4e110
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to

### Added

- `darwin/arm64` support ([#2443]).
- `freebsd/arm64` support ([#2441]).
- Output of the default addresses of the upstreams used for resolving PTRs for
private addresses ([#3136]).
- Detection and handling of recurrent PTR requests for locally-served addresses
Expand Down Expand Up @@ -48,6 +50,8 @@ released by then.

- Go 1.15 support.

[#2441]: https://github.com/AdguardTeam/AdGuardHome/issues/2441
[#2443]: https://github.com/AdguardTeam/AdGuardHome/issues/2443
[#3184]: https://github.com/AdguardTeam/AdGuardHome/issues/3184
[#3185]: https://github.com/AdguardTeam/AdGuardHome/issues/3185
[#3186]: https://github.com/AdguardTeam/AdGuardHome/issues/3186
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scrip
* Linux ARM: [32-bit ARMv6](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_armv6.tar.gz) (recommended for Raspberry Pi), [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_arm64.tar.gz), [32-bit ARMv5](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_armv5.tar.gz), [32-bit ARMv7](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_armv7.tar.gz)
* Linux MIPS: [32-bit MIPS](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_mips_softfloat.tar.gz), [32-bit MIPSLE](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_mipsle_softfloat.tar.gz), [64-bit MIPS](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_mips64_softfloat.tar.gz), [64-bit MIPSLE](https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_mips64le_softfloat.tar.gz)
* Windows: [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_windows_amd64.zip), [32-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_windows_386.zip)
* MacOS: [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_darwin_amd64.zip), [32-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_darwin_386.zip)
* macOS: [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_darwin_amd64.zip), [32-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_darwin_386.zip)
* macOS ARM: [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_darwin_arm64.zip)
* FreeBSD: [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_freebsd_amd64.tar.gz), [32-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_freebsd_386.tar.gz)
* FreeBSD ARM: [64-bit](https://static.adguard.com/adguardhome/beta/AdGuardHome_freebsd_arm64.tar.gz), [32-bit ARMv5](https://static.adguard.com/adguardhome/beta/AdGuardHome_freebsd_armv5.tar.gz), [32-bit ARMv6](https://static.adguard.com/adguardhome/beta/AdGuardHome_freebsd_armv6.tar.gz), [32-bit ARMv7](https://static.adguard.com/adguardhome/beta/AdGuardHome_freebsd_armv7.tar.gz)

Expand All @@ -294,7 +295,8 @@ curl -sSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scrip
* Linux ARM: [32-bit ARMv6](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_armv6.tar.gz) (recommended for Raspberry Pi), [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_arm64.tar.gz), [32-bit ARMv5](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_armv5.tar.gz), [32-bit ARMv7](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_armv7.tar.gz)
* Linux MIPS: [32-bit MIPS](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips_softfloat.tar.gz), [32-bit MIPSLE](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mipsle_softfloat.tar.gz), [64-bit MIPS](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips64_softfloat.tar.gz), [64-bit MIPSLE](https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips64le_softfloat.tar.gz)
* Windows: [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_windows_amd64.zip), [32-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_windows_386.zip)
* MacOS: [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_darwin_amd64.zip), [32-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_darwin_386.zip)
* macOS: [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_darwin_amd64.zip), [32-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_darwin_386.zip)
* macOS ARM: [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_darwin_arm64.zip)
* FreeBSD: [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_freebsd_amd64.tar.gz), [32-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_freebsd_386.tar.gz)
* FreeBSD ARM: [64-bit](https://static.adguard.com/adguardhome/edge/AdGuardHome_freebsd_arm64.tar.gz), [32-bit ARMv5](https://static.adguard.com/adguardhome/edge/AdGuardHome_freebsd_armv5.tar.gz), [32-bit ARMv6](https://static.adguard.com/adguardhome/edge/AdGuardHome_freebsd_armv6.tar.gz), [32-bit ARMv7](https://static.adguard.com/adguardhome/edge/AdGuardHome_freebsd_armv7.tar.gz)

Expand Down
4 changes: 2 additions & 2 deletions bamboo-specs/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
# need to build a few of these.
'variables':
'channel': 'beta'
'dockerGo': 'adguard/golang-ubuntu:2.0'
'dockerGo': 'adguard/golang-ubuntu:3.1'
# release-vX.Y.Z branches are the branches from which the actual final release
# is built.
- '^release-v[0-9]+\.[0-9]+\.[0-9]+':
Expand All @@ -276,4 +276,4 @@
# are the ones that actually get released.
'variables':
'channel': 'release'
'dockerGo': 'adguard/golang-ubuntu:2.0'
'dockerGo': 'adguard/golang-ubuntu:3.1'
4 changes: 3 additions & 1 deletion internal/home/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,16 @@ func handleServiceUninstallCommand(s service.Service) {
func configureService(c *service.Config) {
c.Option = service.KeyValue{}

// OS X
// macOS

// Redefines the launchd config file template
// The purpose is to enable stdout/stderr redirect by default
c.Option["LaunchdConfig"] = launchdConfig
// This key is used to start the job as soon as it has been loaded. For daemons this means execution at boot time, for agents execution at login.
c.Option["RunAtLoad"] = true

// POSIX

// Redirect StdErr & StdOut to files.
c.Option["LogOutput"] = true

Expand Down
68 changes: 41 additions & 27 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,20 @@ check_required() {

# Split with space.
required="curl"
if [ "$os" = 'linux' ] || [ "$os" = 'freebsd' ]
then
case "$os"
in
('freebsd'|'linux')
required="$required $required_unix"
elif [ "$os" = 'darwin' ]
then
;;
('darwin')
required="$required $required_darwin"
fi
;;
(*)
# Generally shouldn't happen, since the OS has already been
# validated.
error_exit "unsupported operating system: $os"
;;
esac

# Don't use quotes to get word splitting.
for cmd in ${required}
Expand Down Expand Up @@ -88,7 +95,7 @@ check_out_dir() {

# Function parse_opts parses the options list and validates it's combinations.
parse_opts() {
while getopts "C:c:hO:o:rRuUvV" opt $*
while getopts "C:c:hO:o:rRuUvV" opt "$@"
do
case "$opt"
in
Expand Down Expand Up @@ -181,11 +188,11 @@ set_os() {
# Validate.
case "$os"
in
('linux'|'freebsd'|'darwin')
('darwin'|'freebsd'|'linux')
# All right, go on.
;;
(*)
error_exit "unsupported operating system: $os"
error_exit "unsupported operating system: '$os'"
;;
esac

Expand Down Expand Up @@ -247,29 +254,42 @@ set_cpu() {
log "cpu type: $cpu"
}

# Function fix_darwin performs some configuration changes for macOS if
# needed.
# Function fix_darwin performs some configuration changes for macOS if needed.
#
# TODO(a.garipov): Remove after the final v0.107.0 release.
#
# See https://github.com/AdguardTeam/AdGuardHome/issues/2443.
fix_darwin() {
if ! [ "$os" = 'darwin' ]
if [ "$os" != 'darwin' ]
then
return 0
fi

# TODO(e.burkov): Remove after we release at least one stable release
# with Apple Silicon support.
#
# See https://github.com/AdguardTeam/AdGuardHome/issues/2443.
if [ "$cpu" = 'arm64' ]
then
cpu='amd64'
log "use $cpu build on Mac M1 until the native ARM support is added."
case "$channel"
in
('beta'|'development'|'edge')
# Everything is fine, we have Apple Silicon support on
# these channels.
;;
('release')
cpu='amd64'
log "use $cpu build on Mac M1 until the native ARM support is added."
;;
(*)
# Generally shouldn't happen, since the release channel
# has already been validated.
error_exit "invalid channel '$channel'"
;;
esac
fi

# Set the package extension.
pkg_ext='zip'

# It is important to install AdGuard Home into the /Applications
# directory on MacOS. Otherwise, it may not grant enough privileges to
# directory on macOS. Otherwise, it may not grant enough privileges to
# the AdGuard Home.
out_dir='/Applications'
}
Expand Down Expand Up @@ -355,8 +375,7 @@ rerun_with_root() {

log 'restarting with root privileges'

curl -L -S -s "$script_url" | sudo sh -s -- $opts
exit $?
curl -L -S -s "$script_url" | sudo sh -s -- $opts
}

# Function download downloads the file from the URL and saves it to the
Expand Down Expand Up @@ -391,11 +410,6 @@ unpack() {
;;
esac

if [ "$?" != '0' ]
then
error_exit "cannot unpack the package into $out_dir"
fi

rm "$pkg_name"
}

Expand All @@ -418,7 +432,7 @@ handle_existing() {
then
log 'the existing AdGuard Home installation is detected'

if [ "$reinstall" != '1' ] && [ "$uninstall" != '1' ]
if [ "$reinstall" -ne '1' ] && [ "$uninstall" -ne '1' ]
then
error_exit \
"to reinstall/uninstall the AdGuard Home using\this script specify one of the '-r' or '-u' flags"
Expand Down Expand Up @@ -489,7 +503,7 @@ cpu=''
os=''
out_dir='/opt'
pkg_ext='tar.gz'
parse_opts $*
parse_opts "$@"

echo 'starting AdGuard Home installation script'

Expand Down

0 comments on commit be4e110

Please sign in to comment.