From 9c1e2fd26e07275ae298fae5a88fe0d368fec218 Mon Sep 17 00:00:00 2001 From: Moses Narrow <36607567+0pcom@users.noreply.github.com> Date: Thu, 3 Nov 2022 17:27:24 -0500 Subject: [PATCH 1/2] Improve readme documentation ; comment out faulty logic --- README.md | 373 +++++++++++++++++++++--- cmd/skywire-cli/commands/reward/root.go | 12 +- cmd/skywire-cli/commands/survey/root.go | 26 +- 3 files changed, 354 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index d993b6e846..522967f83d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,14 @@ Skywire requires a Golang version of `1.16` or higher. # Skywire - [Skywire](#skywire) - - [Build](#build) +- [Commands and Subcommands](#commands-and-subcommands) +- [Build Overview](#build-overview) +- [Dependencies](#dependencies) +- [Runtime Deps](#runtime-deps) +- [Build Deps](#build-deps) + + - [Prepare](#prepare) + - [Build](#build) - [Configure Skywire](#configure-skywire) - [Expose hypervisorUI](#expose-hypervisorui) - [Add remote hypervisor](#add-remote-hypervisor) @@ -14,51 +21,335 @@ Skywire requires a Golang version of `1.16` or higher. - [Creating a GitHub release](#creating-a-github-release) - [How to create a GitHub release](#how-to-create-a-github-release) -## Run from source +## Commands and Subcommands + +* [skywire-cli](cmd/skywire-cli/README.md) +* [skywire-visor](cmd/skywire-visor/README.md) + +## App documentation + +apps are not executed by the user, but hosted by the visor process + +* [skychat](cmd/apps/skychat/README.md) +* [skysocks](cmd/apps/skysocks/README.md) +* [skysocks-client](cmd/apps/skysocks-client/README.md) +* [vpn-client](cmd/apps/vpn-client/README.md) +* [vpn-server](cmd/apps/vpn-server/README.md) + +further documentation can be found in the [skywire wiki](https://github.com/skycoin/skywire/wiki) + +## Installing Skywire + +* [Windows installer](https://github.com/skycoin/skywire/releases/download/v1.2.1/skywire-installer-v1.2.1-windows-amd64.msi) +* [MacOS amd64 package](https://github.com/skycoin/skywire/releases/download/v1.2.1/skywire-installer-v1.2.1-darwin-amd64.pkg) +* [MacOS m1 / arm64](https://github.com/skycoin/skywire/releases/download/v1.2.1/skywire-installer-v1.2.1-darwin-arm64.pkg) +* [Debian Package Installation](github.com/skycoin/skywire/wiki/Skywire-Package-Installation) +* [Binary Releases](https://github.com/skycoin/skywire/releases) + +## Build Overview + +A high-level overview of the process for building skywire from source and the paths and files which comprise the package-based installation is contained in the [PKGBUILD](https://github.com/skycoin/AUR/blob/main/skywire/PKGBUILD) + +## Dependencies + +The systray app requires other build and runtime dependencies and further steps to compile. These are listed in [/docs/systray-builds.md](/docs/systray-builds.md) + +### Runtime Deps + +* ` glibc` or `libc6` _unless statically compiled_ + +### Build Deps + +* `golang` +* `git` (optional) +* `musl` and `kernel-headers-musl` or equivalent - _for static compilation_ + +For more information on static compilation, see [docs/static-builds.md](docs/static-builds.md). + +## Prepare + +The standard procedure for building software with `go` uses the `GOPATH` which is conventionally `$HOME/go` + +Software sources are cloned via `git` to a path such as `$HOME/go/src/github.com/skycoin/skywire` + +Optionally, the source archive of a versioned release is downloaded from the [release section](https://github.com/skycoin/skywire/releases) + +The binaries which are compiled may optionally be placed in the `GOBIN` and then `GOBIN` may be added to the `PATH` in order that any binaries placed in the `GOBIN` will then appear as commands available to execute in the shell or terminal. + +basic setup of `go` is further described [here](https://github.com/skycoin/skycoin/blob/develop/INSTALLATION.md#setup-your-gopath) + +Such a setup is optional, but it is documented below, and other examples will refer to this -```bash -$ mkdir -p $HOME/go/src/github.com/skycoin && cd $HOME/go/src/github.com/skycoin -$ git clone https://github.com/skycoin/skywire.git -$ cd skywire -$ make run-source +``` +mkdir -p "${HOME}/go/src/github.com/skycoin/" "${HOME}"/go/bin "${HOME}"/go/apps || true +cd "${HOME}/go/src/src/github.com/skycoin/" +git clone https://github.com/skycoin/skywire +#optionally checkout any branch +git checkout develop ``` ## Build -```bash -# Clone. -$ git clone https://github.com/skycoin/skywire.git -$ cd skywire +the code below is a rough approximation of `make install` which is used in the build function of the skywire packages + +``` +export GOPATH="${HOME}/go" +export GOBIN="${GOPATH}/bin" +export _GOAPPS="${GOPATH}/apps" +export GOOS=linux +#use musl-gcc for static compilation +export CC=musl-gcc + +cd "${HOME}/go/src/github.com/skycoin/skywire" + +#binary versioning +local _version=$(make version) +DMSG_BASE="github.com/skycoin/dmsg" +BUILDINFO_PATH="${DMSG_BASE}/buildinfo" +BUILDINFO_VERSION="${BUILDINFO_PATH}.version=${_version}" +BUILDINFO="${BUILDINFO_VERSION} ${BUILDINFO_DATE} ${BUILDINFO_COMMIT}" + +#create the skywire binaries +_pkggopath=github.com/skycoin/skywire +cd "${HOME}"/go/src/${_pkggopath} +_cmddir="${HOME}"/go/src/${_pkggopath}/cmd +cd "${_cmddir}"/apps +_app="$(ls)" +for _i in ${_app}; do +echo "building ${_i} binary" +cd "${_cmddir}/apps/${_i}" +go build -trimpath --ldflags="" --ldflags "${BUILDINFO} -s -w -linkmode external -extldflags '-static' -buildid=" -o $_GOAPPS . +done +echo "building skywire-visor binary" +cd "${_cmddir}"/skywire-visor +go build -trimpath --ldflags="" --ldflags "${BUILDINFO} -s -w -linkmode external -extldflags '-static' -buildid=" -o $GOBIN . +echo "building skywire-cli binary" +cd "${_cmddir}"/skywire-cli +go build -trimpath --ldflags="" --ldflags "${BUILDINFO} -s -w -linkmode external -extldflags '-static' -buildid=" -o $GOBIN . +``` + +## Install + +The installation paths for the skywire as present in the skywire package are detailed below + +Note that `make install-system-linux` will place the binaries into the system where the package would install them, and is best used for quickly testing changes to ensure they work with the autoconfig script included with the package + +``` +#to install directly into the system, use "/" +_pkgdir="/" + +#use the appropriate systemd unit installation path for your linux distribution +_systemddir="usr/lib/systemd/system" + +#the base path where skywire is installed +_skydir="opt/skywire" + +#application binaries ; started by the visor process +_skyapps="${_skydir}/apps" + +#main binaries go here +_skybin="${_skydir}/bin" + +#scripts included +_skyscripts="${_skydir}/scripts" + +#create the directories +mkdir -p "${_pkgdir}/usr/bin" +mkdir -p "${_pkgdir}/${_skydir}/bin" +mkdir -p "${_pkgdir}/${_skydir}/apps" +mkdir -p "${_pkgdir}/${_skydir}/scripts" +mkdir -p "${_pkgdir}/${_systemddir}" +#the local folder is otherwise produced by the visor on startup +mkdir -p "${_pkgdir}/${_skydir}/local" + +# instal binaries - assumes nothing else was already in your GOBIN + install -Dm755 "${GOBIN}"/* "${_pkgdir}/${_skybin}/" + +#Symlink the binaries into the executable path +for _i in "${_pkgdir}/${_skybin}"/* ; do + ln -rTsf "${_i}" "${_pkgdir}/usr/bin/${_i##*/}" +done + +#install the app binaries +install -Dm755 "${_GOAPPS}"/* "${_pkgdir}/${_skyapps}/" +#it is not necessary to symlink these binaries to the executable path but may be useful for debugging +for _i in "${_pkgdir}/${_skyapps}"/* ; do + ln -rTsf "${_i}" "${_pkgdir}/usr/bin/${_i##*/}" +done + +#install the dmsghttp-config.json' +install -Dm644 "${HOME}"/go/src/${_pkggopath}/skywire/dmsghttp-config.json" "${_pkgdir}/${_skydir}/dmsghttp-config.json" +``` + +Desktop integration, maintenance scripts, and systemd service files are included in the skywire package from the [skywire AUR](https://aur.archlinux.org/cgit/aur.git/tree/?h=skywire-bin) which is managed as a subtree from [github.com/skycoin/aur](https://github.com/skycoin/AUR/tree/main/skywire-bin) + +`${srcdir}` in the code below is in reference to the directory containing these other source files + +``` +#Install scripts +install -Dm755 "${srcdir}"/skywire-autoconfig "${_pkgdir}/${_skyscripts}/" +ln -rTsf "${_pkgdir}/${_skyscripts}/skywire-autoconfig" "${_pkgdir}"/usr/bin/skywire-autoconfig + +#Installing systemd services' +install -Dm644 "${srcdir}"/*.service "${_pkgdir}/${_systemddir}/" + +# instal desktop files and icons +mkdir -p "${_pkgdir}"/usr/share/applications/ "${_pkgdir}"/usr/share/icons/hicolor/48x48/apps/ +install -Dm644 "${srcdir}"/*.desktop "${_pkgdir}"/usr/share/applications/ +install -Dm644 "${srcdir}"/*.png "${_pkgdir}"/usr/share/icons/hicolor/48x48/apps/ +``` + +## Skywire-autoconfig + +[skywire-autoconfig](https://github.com/skycoin/AUR/blob/main/skywire/skywire-autoconfig) is a script is provided with the package which is executed as part of the postinstall process. It serves as a utility for automating: + +* config management and updates +* setting remote hypervisors +* restarting the skywire process (via systemd) +* printing helpful text for the user to know what is happening +* generating configuration on boot (for skybian images / chroot installations of skywire) +* detecting environmental variables + +for more information regarding this script and the skywire package installation, refer to [this wiki article](https://github.com/skycoin/AUR/wiki/skywire-bin) + +### Package tree +``` +/ +├── opt +│ └── skywire +│ ├── apps +│ │ ├── skychat +│ │ ├── skysocks +│ │ ├── skysocks-client +│ │ ├── vpn-client +│ │ └── vpn-server +│ ├── bin +│ │ ├── skywire-cli +│ │ └── skywire-visor +│ ├── dmsghttp-config.json +│ ├── local +│ └── scripts +│ └── skywire-autoconfig +└── usr + ├── bin + │ ├── skychat -> ../../opt/skywire/apps/skychat + │ ├── skysocks -> ../../opt/skywire/apps/skysocks + │ ├── skysocks-client -> ../../opt/skywire/apps/skysocks-client + │ ├── skywire -> ../../opt/skywire/bin/skywire-visor + │ ├── skywire-autoconfig -> ../../opt/skywire/scripts/skywire-autoconfig + │ ├── skywire-cli -> ../../opt/skywire/bin/skywire-cli + │ ├── skywire-visor -> ../../opt/skywire/bin/skywire-visor + │ ├── vpn-client -> ../../opt/skywire/apps/vpn-client + │ └── vpn-server -> ../../opt/skywire/apps/vpn-server + ├── lib + │ └── systemd + │ └── system + │ ├── skywire-autoconfig.service + │ ├── skywire.service + └── share + ├── applications + │ ├── skywire.desktop + │ └── skywirevpn.desktop + └── icons + └── hicolor + └── 48x48 + └── apps + ├── skywire.png + └── skywirevpn.png + +17 directories, 24 files +``` + +## Build with make + +build the binaries and apps with `go build` +``` +make build +``` + +output tree + +``` +├──skywire-cli +└─┬skywire-visor +└─┬apps +├──skychat +├──skysocks +├──skysocks-client +├──vpn-client +├──vpn-server +└──skychat +``` + +install these executables to the `GOPATH` +``` +make install +``` -# Build and Install -$ make build; make install -# OR build docker image +## Build docker image +``` $ ./ci_scripts/docker-push.sh -t $(git rev-parse --abbrev-ref HEAD) -b ``` -Skywire can be statically built. For instructions check [the docs](docs/static-builds.md). + +## Run from source + +Running from source as outlined here does not write the config to disk or explicitly compile any binaries. The config is piped from skywire-cli stdout to the visor stdin, and all are executed via `go run`. + +``` + mkdir -p $HOME/go/src/github.com/skycoin && cd $HOME/go/src/github.com/skycoin + git clone https://github.com/skycoin/skywire.git + cd skywire + make run-source +``` + +## Files and folders created by skywire + +``` +├──skywire-config.json +└─┬local + ├──skychat + ├──skysocks + ├──apps-pid.txt + ├──skychat_log.db + ├──reward.txt + ├──node-info.json + └─┬transport_logs + └──2022-11-12.csv +``` + +the + ## Configure Skywire +The skywire visor requires a config to run. This config is produced by `skywire-cli config gen` + +The skywire-autoconfig script included with the skywire package handles config generation and updates for the user + +Examples of config generation and command / flag documentation can be found in the [cmd/skywire-cli/README.md](cmd/skywire-cli/README.md) and [cmd/skywire-visor/README.md](cmd/skywire-visor/README.md) + +The most important flags are noted below + ### Expose hypervisorUI In order to expose the hypervisor UI, generate a config file with `--is-hypervisor` or `-i` flag: -```bash -$ skywire-cli config gen -i +``` + skywire-cli config gen -i ``` Docker container will create config automatically for you, should you want to run it manually, you can do: -```bash -$ docker run --rm -v :/opt/skywire \ +``` + docker run --rm -v :/opt/skywire \ skycoin/skywire:test skywire-cli config gen -i ``` Docker container will create config automatically for you, should you want to run it manually, you can do: -```bash +``` $ docker run --rm -v :/opt/skywire \ skycoin/skywire:latest skywire-cli visor gen-config --is-hypervisor ``` @@ -70,33 +361,30 @@ After starting up the visor, the UI will be exposed by default on `localhost:800 Every visor can be controlled by one or more hypervisors. To allow a hypervisor to access a visor, the PubKey of the hypervisor needs to be specified in the configuration file. You can add a remote hypervisor to the config with: -```bash -$ skywire-cli config update --hypervisor-pks ``` - -If the rpc server is exposed on the local network, or the config has been generated with the `--public-rpc` flag, the hypervisor public key can be queried over the network with skywire-cli: - -```bash -$ skywire-cli --rpc visor pk +skywire-cli config update --hypervisor-pks +``` +or +``` +skywire-cli config gen --hvpk ``` -The previous two commands can be nested: - -```bash -$ skywire-cli config update --hypervisor-pks $(skywire-cli --rpc visor pk) +alternatively, this can be done with the skywire-autoconfg script +``` +skywire-autoconfig ``` Or from docker image: -```bash -$ docker run --rm -v :/opt/skywire \ +``` +docker run --rm -v :/opt/skywire \ skycoin/skywire:test skywire-cli config update hypervisor-pks ``` Or from docker image: -```bash -$ docker run --rm -v :/opt/skywire \ +``` +docker run --rm -v :/opt/skywire \ skycoin/skywire:latest skywire-cli update-config hypervisor-pks ``` @@ -107,17 +395,21 @@ $ docker run --rm -v :/opt/skywire \ `skywire-visor` requires a valid configuration to be provided. If you want to run a VPN client locally, run the visor as `sudo`. -```bash -$ sudo skywire-visor -c skywire-config.json +``` + sudo skywire-visor -c skywire-config.json +``` +if the default `skywire-config.json` exists in the current dir, this can be shortened to +``` + sudo skywire-visor ``` Or from docker image: -```bash +``` # with custom config mounted on docker volume -$ docker run --rm -p 8000:8000 -v :/opt/skywire --name=skywire skycoin/skywire:test skywire-visor -c /opt/skywire/.json +docker run --rm -p 8000:8000 -v :/opt/skywire --name=skywire skycoin/skywire:test skywire-visor -c /opt/skywire/.json # without custom config (config is automatically generated) -$ docker run --rm -p 8000:8000 --name=skywire skycoin/skywire:test skywire-visor +docker run --rm -p 8000:8000 --name=skywire skycoin/skywire:test skywire-visor ``` `skywire-visor` can be run on Windows. The setup requires additional setup steps that are specified @@ -129,6 +421,7 @@ If you are interested in running the Skywire VPN as either a client or a server, - [Setup the Skywire VPN](https://github.com/skycoin/skywire/wiki/Skywire-VPN-Client) - [Setup the Skywire VPN server](https://github.com/skycoin/skywire/wiki/Skywire-VPN-Server) +- [Package Installation Guide](https://github.com/skycoin/skywire/wiki/Skywire-Package-Installation) ## Creating a GitHub release diff --git a/cmd/skywire-cli/commands/reward/root.go b/cmd/skywire-cli/commands/reward/root.go index f64ff9e861..953fb6c426 100644 --- a/cmd/skywire-cli/commands/reward/root.go +++ b/cmd/skywire-cli/commands/reward/root.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/bitfield/script" +// "github.com/bitfield/script" coincipher "github.com/skycoin/skycoin/src/cipher" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -56,13 +56,13 @@ func init() { //the above was insufficient in practice //TODO: re-implement this simple check for the visor running - _, err := script.Exec(`skywire-cli visor pk`).String() - if err == nil { - useRPC = true - } else { +// _, err := script.Exec(`skywire-cli visor pk`).String() +// if err == nil { +// useRPC = true +// } else { useRPC = false rpcFlagTxt = "default: false - visor is not running" - } +// } if skyenv.IsRoot() { useRPC = false rpcFlagTxt = "default: false - root permissions available" diff --git a/cmd/skywire-cli/commands/survey/root.go b/cmd/skywire-cli/commands/survey/root.go index d3cfbee99b..59eb740fcc 100644 --- a/cmd/skywire-cli/commands/survey/root.go +++ b/cmd/skywire-cli/commands/survey/root.go @@ -7,7 +7,7 @@ import ( "fmt" "os" - "github.com/bitfield/script" +// "github.com/bitfield/script" "github.com/spf13/cobra" "github.com/skycoin/skywire-utilities/pkg/cipher" @@ -38,17 +38,21 @@ var surveyCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { survey, err := skyenv.SystemSurvey() if err != nil { - internal.PrintFatalError(cmd.Flags(), fmt.Errorf("Failed to generate system survey: %v", err)) - } - //non-critical logic implemented with bitfield/script - pkString, err = script.Exec(`skywire-cli visor pk -p`).String() - //fail silently or proceed on nil error - if err == nil { - err = pk.Set(pkString) - if err == nil { - survey.PubKey = pk - } + internal.Catch(cmd.Flags(), fmt.Errorf("Failed to generate system survey: %v", err)) } +// //non-critical logic implemented with bitfield/script +// pkString, err = script.Exec(`skywire-cli visor pk -p`).String() +// //fail silently or proceed on nil error +// if err != nil { +// internal.Catch(cmd.Flags(), fmt.Errorf("failed to fetch visor public key: %v", err)) +// } else { +// err = pk.Set(pkString) +// if err != nil { +// internal.Catch(cmd.Flags(), fmt.Errorf("failed to validate visor public key: %v", err)) +// } else { +// survey.PubKey = pk +// } +// } skyaddr, err := os.ReadFile(skyenv.PackageConfig().LocalPath + "/" + skyenv.RewardFile) //nolint if err == nil { survey.SkycoinAddress = string(skyaddr) From 394c84f42bb936e85a8bac0c82192da9b853b905 Mon Sep 17 00:00:00 2001 From: Moses Narrow <36607567+0pcom@users.noreply.github.com> Date: Thu, 3 Nov 2022 18:13:45 -0500 Subject: [PATCH 2/2] update readme.md & fix appveyor errors --- README.md | 29 +++++++++++++++++++-- cmd/skywire-cli/commands/reward/root.go | 15 +++++------ cmd/skywire-cli/commands/survey/root.go | 34 ++++++++++++------------- pkg/skyenv/values_linux.go | 3 +-- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 522967f83d..6551ad4b6f 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,32 @@ further documentation can be found in the [skywire wiki](https://github.com/skyc A high-level overview of the process for building skywire from source and the paths and files which comprise the package-based installation is contained in the [PKGBUILD](https://github.com/skycoin/AUR/blob/main/skywire/PKGBUILD) +this and other build variants can be built into a package with a single command, using `yay` on archlinux + +installing [skywire-bin](https://aur.archlinux.org/packages/skywire-bin) will install the release binaries provided by the release section of this repo + +``` +yay -S skywire-bin +``` + +to build the debian packages using the release binaries + +``` +yay --mflags " -p cc.deb.PKGBUILD " -S skywire-bin +``` + +installing [skywire](https://aur.archlinux.org/packages/skywire) will compile binaries using the source archive for the latest version release + +``` +yay -S skywire +``` + +build from git sources to the develop branch + +``` +yay --mflags " -p git.PKGBUILD " -S skywire +``` + ## Dependencies The systray app requires other build and runtime dependencies and further steps to compile. These are listed in [/docs/systray-builds.md](/docs/systray-builds.md) @@ -319,8 +345,7 @@ Running from source as outlined here does not write the config to disk or explic └──2022-11-12.csv ``` -the - +Some of these files are served via the [dmsghttp logserver](https://github.com/skycoin/skywire/wiki/DMSGHTTP-logserver) ## Configure Skywire diff --git a/cmd/skywire-cli/commands/reward/root.go b/cmd/skywire-cli/commands/reward/root.go index 953fb6c426..02b571cffd 100644 --- a/cmd/skywire-cli/commands/reward/root.go +++ b/cmd/skywire-cli/commands/reward/root.go @@ -6,7 +6,6 @@ import ( "os" "strings" -// "github.com/bitfield/script" coincipher "github.com/skycoin/skycoin/src/cipher" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -56,13 +55,13 @@ func init() { //the above was insufficient in practice //TODO: re-implement this simple check for the visor running -// _, err := script.Exec(`skywire-cli visor pk`).String() -// if err == nil { -// useRPC = true -// } else { - useRPC = false - rpcFlagTxt = "default: false - visor is not running" -// } + // _, err := script.Exec(`skywire-cli visor pk`).String() + // if err == nil { + // useRPC = true + // } else { + useRPC = false + rpcFlagTxt = "default: false - visor is not running" + // } if skyenv.IsRoot() { useRPC = false rpcFlagTxt = "default: false - root permissions available" diff --git a/cmd/skywire-cli/commands/survey/root.go b/cmd/skywire-cli/commands/survey/root.go index 59eb740fcc..41acbd7d15 100644 --- a/cmd/skywire-cli/commands/survey/root.go +++ b/cmd/skywire-cli/commands/survey/root.go @@ -7,18 +7,16 @@ import ( "fmt" "os" -// "github.com/bitfield/script" "github.com/spf13/cobra" - "github.com/skycoin/skywire-utilities/pkg/cipher" "github.com/skycoin/skywire/cmd/skywire-cli/internal" "github.com/skycoin/skywire/pkg/skyenv" ) var ( - pk cipher.PubKey - pkString string - isCksum bool + // pk cipher.PubKey + // pkString string + isCksum bool ) func init() { @@ -40,19 +38,19 @@ var surveyCmd = &cobra.Command{ if err != nil { internal.Catch(cmd.Flags(), fmt.Errorf("Failed to generate system survey: %v", err)) } -// //non-critical logic implemented with bitfield/script -// pkString, err = script.Exec(`skywire-cli visor pk -p`).String() -// //fail silently or proceed on nil error -// if err != nil { -// internal.Catch(cmd.Flags(), fmt.Errorf("failed to fetch visor public key: %v", err)) -// } else { -// err = pk.Set(pkString) -// if err != nil { -// internal.Catch(cmd.Flags(), fmt.Errorf("failed to validate visor public key: %v", err)) -// } else { -// survey.PubKey = pk -// } -// } + // //non-critical logic implemented with bitfield/script + // pkString, err = script.Exec(`skywire-cli visor pk -p`).String() + // //fail silently or proceed on nil error + // if err != nil { + // internal.Catch(cmd.Flags(), fmt.Errorf("failed to fetch visor public key: %v", err)) + // } else { + // err = pk.Set(pkString) + // if err != nil { + // internal.Catch(cmd.Flags(), fmt.Errorf("failed to validate visor public key: %v", err)) + // } else { + // survey.PubKey = pk + // } + // } skyaddr, err := os.ReadFile(skyenv.PackageConfig().LocalPath + "/" + skyenv.RewardFile) //nolint if err == nil { survey.SkycoinAddress = string(skyaddr) diff --git a/pkg/skyenv/values_linux.go b/pkg/skyenv/values_linux.go index dea3636442..731c0cb220 100644 --- a/pkg/skyenv/values_linux.go +++ b/pkg/skyenv/values_linux.go @@ -6,11 +6,10 @@ package skyenv import ( "runtime" - "periph.io/x/periph/host/distro" - "github.com/google/uuid" "github.com/jaypipes/ghw" "github.com/zcalusic/sysinfo" + "periph.io/x/periph/host/distro" "github.com/skycoin/skywire-utilities/pkg/cipher" )