Skip to content

fix: release for armv7l #1300

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

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Conversation

mstruebing
Copy link
Contributor

@mstruebing mstruebing commented Jul 24, 2023

Summary

This should release devbox for an armv7l machine.

I've added the default values in case there was no value found here: https://goreleaser.com/customization/builds/#builds

Closes #1299

How was it tested?

Manually created a release: TELEMETRY_KEY=whatever SENTRY_DSN=whatever EDGE_TAG=0.0.0-dev goreleaser release --clean --skip-publish --skip-announce --snapshot unpacked the armv7l binary and ran it on my Raspberry PI.

@Lagoja Lagoja requested review from mikeland73, ipince and gcurtis July 25, 2023 15:18
@gcurtis
Copy link
Collaborator

gcurtis commented Jul 25, 2023

Thanks! Do you happen to know how goreleaser handles naming the binaries to distinguish the arm versions? From the docs it sounds like it might be adding a suffix.

We might need to update our launcher/install script (which lives outside this repo) to handle the new filenames. I'll double check on that before merging.

@mstruebing
Copy link
Contributor Author

No not really - I wasn't able to test this out as stated in the PR description.
I'm happy to let others enhance this PR or I could have a second look if I find time.

@mstruebing
Copy link
Contributor Author

@gcurtis I was able to run goreleaser locally and get the following output (with my latest change applied)

➜  devbox git:(mstruebing/1299/armv7) ✗ ls dist
total 56M
drwxr-xr-x 1 maex maex  866 Jul 26 11:48 .
drwxr-xr-x 1 maex maex  452 Jul 26 11:48 ..
-rw-r--r-- 1 maex maex 5.1K Jul 26 11:48 artifacts.json
-rw-r--r-- 1 maex maex  719 Jul 26 11:48 checksums.txt
-rw-r--r-- 1 maex maex 4.0K Jul 26 11:48 config.yaml
-rw-r--r-- 1 maex maex 8.5M Jul 26 11:48 devbox_0.0.0-dev_darwin_amd64_.tar.gz
-rw-r--r-- 1 maex maex 8.2M Jul 26 11:48 devbox_0.0.0-dev_darwin_arm64_.tar.gz
-rw-r--r-- 1 maex maex 7.8M Jul 26 11:48 devbox_0.0.0-dev_linux_386_.tar.gz
-rw-r--r-- 1 maex maex 8.2M Jul 26 11:48 devbox_0.0.0-dev_linux_amd64_.tar.gz
-rw-r--r-- 1 maex maex 7.5M Jul 26 11:48 devbox_0.0.0-dev_linux_arm64_.tar.gz
-rw-r--r-- 1 maex maex 7.7M Jul 26 11:48 devbox_0.0.0-dev_linux_arm_6.tar.gz
-rw-r--r-- 1 maex maex 7.7M Jul 26 11:48 devbox_0.0.0-dev_linux_arm_7.tar.gz
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_darwin_amd64_v1
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_darwin_arm64
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_linux_386
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_linux_amd64_v1
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_linux_arm64
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_linux_arm_6
drwxr-xr-x 1 maex maex   12 Jul 26 11:48 devbox_linux_arm_7
-rw-r--r-- 1 maex maex  221 Jul 26 11:48 metadata.json

If we remove 6 from goarm we could remove the {{ .Arm }} from the name template and we would only have devbox_0.0.0-dev_linux_arm.tar.gz

@mstruebing
Copy link
Contributor Author

I think the install script needs to be adjusted for the arm versions but I'm not sure where to find the source.
Or we need to adjust the name template but I guess this will break the install script too.

@mstruebing mstruebing force-pushed the mstruebing/1299/armv7 branch from 8ced733 to 7a50e05 Compare August 8, 2023 15:49
@mstruebing
Copy link
Contributor Author

mstruebing commented Aug 8, 2023

I've updated the PR and Ithink we now have everything in place:

➜  devbox git:(mstruebing/1299/armv7) ✗ ls dist
total 48M
drwxr-xr-x 1 maex maex  752 Aug  8 17:56 .
drwxr-xr-x 1 maex maex  452 Aug  8 17:49 ..
-rw-r--r-- 1 maex maex 4.4K Aug  8 17:47 artifacts.json
-rw-r--r-- 1 maex maex  613 Aug  8 17:47 checksums.txt
-rw-r--r-- 1 maex maex 4.0K Aug  8 17:47 config.yaml
-rw-r--r-- 1 maex maex 8.5M Aug  8 17:47 devbox_0.0.0-dev_darwin_amd64.tar.gz
-rw-r--r-- 1 maex maex 8.2M Aug  8 17:47 devbox_0.0.0-dev_darwin_arm64.tar.gz
-rw-r--r-- 1 maex maex 7.8M Aug  8 17:47 devbox_0.0.0-dev_linux_386.tar.gz
-rw-r--r-- 1 maex maex 8.2M Aug  8 17:47 devbox_0.0.0-dev_linux_amd64.tar.gz
-rw-r--r-- 1 maex maex 7.5M Aug  8 17:47 devbox_0.0.0-dev_linux_arm64.tar.gz
-rw-r--r-- 1 maex maex 7.7M Aug  8 17:47 devbox_0.0.0-dev_linux_armv7l.tar.gz
drwxr-xr-x 1 maex maex   12 Aug  8 17:47 devbox_darwin_amd64_v1
drwxr-xr-x 1 maex maex   12 Aug  8 17:47 devbox_darwin_arm64
drwxr-xr-x 1 maex maex   12 Aug  8 17:47 devbox_linux_386
drwxr-xr-x 1 maex maex   12 Aug  8 17:47 devbox_linux_amd64_v1
drwxr-xr-x 1 maex maex   12 Aug  8 17:47 devbox_linux_arm64
drwxr-xr-x 1 maex maex   12 Aug  8 17:47 devbox_linux_arm_7
-rw-r--r-- 1 maex maex  221 Aug  8 17:47 metadata.json

This looks like all archives are named correctly.
I tried to run the armv7l binary on my Raspberry PI and it works \o/

volumio@volumio:~/dist$ uname -a
Linux volumio 5.10.92-v7+ #1514 SMP Mon Jan 17 17:36:39 GMT 2022 armv7l GNU/Linux
volumio@volumio:~/dist$ ./devbox version --verbose
Version:     0.0.0-dev
Platform:    linux_arm
Commit:      8ced733342fce407c145b607e33a000f6ff0fd20
Commit Time: 2023-07-26T09:48:47Z
Go Version:  go1.20.4
Launcher:

@gcurtis is there anything else needed?

Copy link
Collaborator

@gcurtis gcurtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring out the binary naming. This looks good to me.

Just a disclaimer (which you're probably already aware of) that Nix's support for armv7l is limited. Devbox/Nix will probably end up building most packages from source unless you set up your own binary cache. That said, let us know how it goes and thanks for the PR!

@gcurtis gcurtis merged commit f70eb1e into jetify-com:main Aug 8, 2023
@mstruebing
Copy link
Contributor Author

Thank you, you are right - just installing htop takes ages but I will look into how far I get with it.
It's more about experimentation and playing around with it at least for me and for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Not able to install on linux_armv7l.
2 participants