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

Wrong permissions for the downloaded toolchain #1

Open
adrienluitot opened this issue Feb 1, 2021 · 10 comments
Open

Wrong permissions for the downloaded toolchain #1

adrienluitot opened this issue Feb 1, 2021 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@adrienluitot
Copy link

The binaries of the toolchain for Linux (riscv64-unknown-elf-linux-0.0.1.zip) have bad permissions and require some modifications from the user. They don't have the executable bit.

These binaries are located in:

  • riscv64-unknown-elf/0.0.1/bin/
  • riscv64-unknown-elf/0.0.1/riscv64-unknown-elf/bin/
  • riscv64-unknown-elf/0.0.1/libexec/gcc/riscv64-unknown-elf/8.3.0/

Thanks to @9names for pointing me these paths.

As the purpose is, I think, to simplify things, it might be better to change the permissions in the downloaded archive.

I don't know if MacOS is also impacted, and I suppose that Windows isn't.

@gamelaster
Copy link
Member

Will take look, thanks

@gamelaster gamelaster self-assigned this Feb 4, 2021
@gamelaster gamelaster added the bug Something isn't working label Feb 4, 2021
@pfeerick
Copy link
Contributor

pfeerick commented Feb 8, 2021

I'll be looking into this this week, in pfeerick/ArduinoCore-bouffalo-packages#1

I think the underlying issue is the choice of archive... a zip was used instead of a tar, which would preserve file permissions. Not a issue for windows, but it is for linux and mac.

@adrienluitot
Copy link
Author

This could be good indeed, though if a zip file is needed, I think that if the archive is made on linux, it keeps the permissions.

@pfeerick
Copy link
Contributor

pfeerick commented Feb 8, 2021 via email

@gamelaster
Copy link
Member

@pfeerick the reason why is everything hosted on PINE64 Cluster is because many times Github CDN is terribly slow and I wait ages until it downloads something. Anyway, I think we can have multiple "mirrors". I'm open to merge your work @pfeerick here.

@adrienluitot
Copy link
Author

I've made some tests few days ago, and without special flags the permissions seemed to be kept after a zip and an unzip, but I don't know if there are default parameters on my distro. 🤷

For the hosting, maybe the Pine64 cluster could regularly pull the files from the Github repo ?
So we would have the speed of Pine64, and the last updates of Github.

@pfeerick
Copy link
Contributor

pfeerick commented Feb 8, 2021

@gamelaster I'm not complaining about the files being on the pine64 cluster, more that they are a black box at the moment, with no idea as to the source of the files, or how the packages were put together ;) For example, where do the toolchains come from? Because knowting that, the next question is, is it possible to get an arm64 toolchain happening as well? i.e. lets get a little pinebook pro love happening as well ;)

Hence why I'd ideally like to automate generation of the various packages via a github action if practical, and which also means the upload / generation of the files is all done on the github side, and then simply mirrored to the pine64 cluster if that's faster / more reliable at times. Plus it makes the builds reproducible. The packages repo I've got might just turn into a bunch of scripts, which generate a release, which all the binaries... don't quite know how it will play out just yet.

The other aspect to this is once I know enough about the full layout, I can look at getting a PlatformIO platform package going also...

@danielbarry
Copy link

Just to add that this problem still exists in Linux, it is needed to run:

cd ~/.arduino15/packages/bouffalo/tools/riscv64-unknown-elf/0.0.1/bin
chmod +x *
cd ~/.arduino15/packages/bouffalo/tools/riscv64-unknown-elf/0.0.1/libexec/gcc/riscv64-unknown-elf/8.3.0
chmod +x *

@gamelaster
Copy link
Member

@pfeerick well, you made really good points, having a mirror is good. I will think about this.

@MartijnBraam
Copy link

Somehow still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants