When I try to install gnatprove using alire, with fails part way through downloading https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatprove-x86_64-linux-14.1.0-1.tar.gz with curl. I’m still condemned to DSL, so I expect that it is simply timing out at some time. It has done this ever time I’ve tried to install gnatprove on this machine.
Is there any way for me to download it manually and provide it to alire directly?
Can I change the download tool to something else, wget perhaps, and see if that will download it ok?
Just as a data point, I’m able to download that file just fine with wget.
jere
January 27, 2025, 1:01am
3
It might be more helpful to have the full error message you get as well. Might help identify what is crashing vs wget. I have troubles on my work computer, but my home computer works just fine.
It also might be worthwhile opening a github issue so the Alire team can maybe highlight what is going on (though definitely provide more specific details like error messages there for sure).
I’m too new to Alire to be of much help, but maybe someone else will recognize the error message.
Here’s the error with -v.
$ alr -v install gnatprove
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
detail: Found 1 indexes
info: ⓘ Computing solutions...
detail: Spawning: ["cat", "/etc/os-release"] > /run/user/1010/alr-iywc.tmp
detail: Spawning: ["uname", "-m"] > /run/user/1010/alr-xyug.tmp
detail: Loading index found at /home/tkb/.config/alire/indexes/community/repo/index
info: ✓ Installation targets fully solved
info: ⓘ Deploying gnatprove=14.1.1...
detail: Downloading file: https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatpro
ve-x86_64-linux-14.1.0-1.tar.gz
detail: Spawning: ["curl", "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatp
rove-x86_64-linux-14.1.0-1.tar.gz", "--location", "--progress-bar", "--output", "/home/tkb/.alire/alr-mqiv.tmp/gnatprov
e-x86_64-linux-14.1.0-1.tar.gz"]
########################################################### 53.4%
curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
error: Command ["curl", "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatprov
e-x86_64-linux-14.1.0-1.tar.gz", "--location", "--progress-bar", "--output", "/home/tkb/.alire/alr-mqiv.tmp/gnatprove-x
86_64-linux-14.1.0-1.tar.gz"] exited with code 92
1 Like
jere
January 27, 2025, 4:17am
5
Thanks!
So based on that, it looks like that is hardcoded into Alire to use curl. I think I found the location here: alire/src/alire/alire-os_lib-download.adb at b44efe6a062e3a9a81f9cf32b123ebb30a6aeadf · alire-project/alire · GitHub
So I think unless you just want to change that section of code locally to use wget and build alire yourself (I’ve built it in windows pretty easily, but never tried in linux), you may have to put in a github issue with the alire team to get an option to change it added (maybe if you are experienced in this kind of stuff you could even offer a PR, but I’m not good enough for that kind of thing).
I looked up that error with curl and it seems to happen to a lot of folks. For most it seems like some sort of load balancing timeout, but there are some other reasons for it too.
Thanks for finding that location. I’ll plan on submitting a GitHub issue, and then take a look at the code.
jere
January 27, 2025, 4:38am
7
No problem. I realized I posted link to a specific commit. Updated the previous post with the master branch version of the link. Hopefully they can do something more to help out. EDIT: Nevermind, the forums keep changing the link back after a few mins.
mgrojo
January 27, 2025, 8:00pm
8
It seems the possibility to change the download command has been implemented recently.
alire-project:master
← Seb-MCaw:feat/archive-download-command
opened 05:07PM - 06 Jan 25 UTC
At the moment, the biggest obstacle to using Alire for private development is th… at source archives cannot be fetched from servers which require user authentication (this is already possible for private Git repositories, since the `git` command implements all authentication schemes commonly used for Git repositories).
Unfortunately, there is a much wider variety of commonly used schemes and protocols for authenticated file downloads than for Git repos, so it does not seem feasible to support all of them natively. This PR therefore makes the command used for downloads (globally) configurable with the `alr settings` key `origins.archive.download_cmd`, without changing the default behaviour.
This PR also:
- Prevents the `editor.cmd` setting being read from the local crate's `settings.toml` (this seemed to me unexpected behaviour, and possibly something of a security vulnerability)
- Adds support for mocking commands when testing on Windows
- Fixes validation of the `distribution.override` setting
- Fixes the deprecated (and ignored) `fail_on_error` in the `spellcheck` workflow
- Adds a first draft of a new section to the documentation to better signpost support for private crates/indexes
---
##### PR creation checklist
- [x] A test is included, if required by the changes.
- [x] `doc/user-changes.md` has been updated.
1 Like
Thanks! I’ll see if I can fix my problem using that.