Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Make Go an own install option (ID=188) #4272

Merged
merged 15 commits into from
Apr 16, 2021
Merged

DietPi-Software | Make Go an own install option (ID=188) #4272

merged 15 commits into from
Apr 16, 2021

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Apr 14, 2021

Status: Ready

Commit list/description:

  • DietPi-Software | Make Golang Go an own install option (ID=188)
  • DietPi-Patches | Mark now dedicated Golang Go as installed if OpenBazaar is
  • DietPi-Patches | Load DietPi-Globals at the beginning of the script now and implement G_EXEC error handler where applicable

+ DietPi-Software | Make Golang Go an own install option (ID=188)
+ CHANGELOG | Golang Go: Being previously tied into the OpenBazaar install, Golang Go has now become a dedicated install option with the software ID 188
+ DietPi-Patches | Mark now dedicated Golang Go as installed if OpenBazaar is
+ DietPi-Patches | Load DietPi-Globals at the beginning of the script now and implement G_EXEC error handler where applicable
@Joulinar
Copy link
Collaborator

ok working fine on RPi OS 32bit + 64bit

root@DietPi3:~# go version
go version go1.16.3 linux/arm
root@DietPi3:~#
root@DietPi4:~# go version
go version go1.16.3 linux/arm64
root@DietPi4:~#

Joulinar
Joulinar previously approved these changes Apr 14, 2021
@MichaIng MichaIng changed the title DietPi-Software | Make Golang Go an own install option (ID=188) DietPi-Software | Make Go an own install option (ID=188) Apr 15, 2021
+ DietPi-Patches | It's simply "Go"
+ CHANGELOG | It's simply "Go"
+ DietPi-Software | Go: It's named "Go" only
+ DietPi-Software | Go: Grab latest available version automatically from JSON version of the download page
+ DietPi-Software | Go: Add a note to uninstall section about keeping GOPATH /mnt/dietpi_userdata/go
@MichaIng
Copy link
Owner Author

I switched to automatic Go version detection. From the install docs, which use JavaScript to always show the latest version, I found a JSON version of the download page which can be effectively scraped.

Note: For now we keep /mnt/dietpi_userdata/go in place on uninstall. This is where package installs, custom compilations, downloaded sources etc are stored. This is especially important as long as we don't have a good dependency system that blocks uninstalls of dependencies. Otherwise it would be possible to uninstall Go while OpenBazaar is installed, but together with /mnt/dietpi_userdata/go, OpenBazaar would be gone, too.

+ DietPi-Software | Main menu entry renaming: #4270 (comment)
+ DietPi-Software | Go: Omit curl error 23 as "grep -m1" terminates the pipe when found the first match. The page is too large for the curl cache to have the download fully completed, like it is for "api.github.com/.../latest" pages. This omits all curl errors, which is okay as of the G_DIETPI-NOTIFY below, which makes us verify the download already.
+ DietPi-Software | Go: Since Go v1.16, GOPATH vs module mode is not auto-detected anymore by default, but module mode is forced. Since we want to install and control package instances in our defined GOPATH, revert this change via /etc/bashrc.d/go.sh for bash shell sessions, so that the presence of a go.mod file in cwd triggers module mode, while otherwise GOPATH is used: https://golang.org/ref/mod#mod-commands
+ DietPi-Software | OpenBazaar: Remove doubled install notification and force GOPATH mode
+ DietPi-Software | OpenBazaar: Add documentation URL to systemd unit and assure it starts after network is up to allow IP binding
+ DietPi-Software | OpenBazaar: Error-handle init and credentials input, as e.g. when not being able to confirm/repeat the password, there is no clean way to retry: CTRL+C terminates the attempt, but leaves the instance without credentials set and more importantly it leaves the terminal in a broken state, manipulated by OB to hide the typed password and not reset on regular termination, which is bad. Piping the output through "tee" via G_EXEC_OUTPUT=1 limits the terminal manipulation to the tee instance, so exiting or retrying can be done fine.
+ DietPi-Software | OpenBazaar: Make build verbose to allow following the longer taking process
+ DietPi-Software | YaCy: Detect latest version automatically, using a similar method as with OpenBazaar
+ DietPi-Software | YaCy: Start enabled service after network, to allow IP binding, and add official Wiki to systemd documentation
+ CHANGELOG | YaCy: New installs and reinstalls will now have the latest version detected and downloaded automatically. This enables an easy update method by simply reinstalling YaCy via "dietpi-software reinstall 133", independent of the DietPi version.
+ README | Add newly added software titles to sources list
+ DietPi-Survey_report | Add Go support
+ DietPi-Software | OpenBazaar: Little config edit tweak: Single line arrays are perfectly possible
+ DietPi-Software | OpenBazaar: Little uninstall enhancement: Especially remove data dir as well
@MichaIng MichaIng merged commit 7217579 into dev Apr 16, 2021
@MichaIng MichaIng deleted the go branch April 16, 2021 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants