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

Teach "make bootstrap" to use curl if wget is not available #1866

Closed
fingolfin opened this issue Nov 7, 2017 · 3 comments · Fixed by #3504
Closed

Teach "make bootstrap" to use curl if wget is not available #1866

fingolfin opened this issue Nov 7, 2017 · 3 comments · Fixed by #3504
Labels
good first issue Issues that can be understood and addressed by newcomers to GAP development kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: build system

Comments

@fingolfin
Copy link
Member

On macOS, curl is available but wget is not.

@fingolfin fingolfin added topic: build system kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements labels Nov 7, 2017
@fingolfin fingolfin mentioned this issue Nov 7, 2017
@fingolfin
Copy link
Member Author

Would be great to get this into 4.9. Shouldn't be too hard either. E.g. we could add an etc/download.sh shell script, which looks something like this (untested):

#/bin/sh
set -e
command -v wget >/dev/null 2>&1 && exec wget "$@"
command -v curl >/dev/null 2>&1 && exec curl -O "$@"
echo "Error, failed to download: neither wget nor curl available"
exit 1

Then change Makefile.rules to use that script.

Caveat: This disables a trick we use to make our Travis builds a bit more robust, by passing lots of extra options to wget in etc/ci-prepare.sh, like this:

make bootstrap-pkg-full WGET="wget -N --no-check-certificate --tries=5 --waitretry=5 --retry-connrefused"

It should still be possible to get this "robust" variant. Easiest would be to just add those options into download.sh (and similar options for curl), but I am not sure we really want that for every user. E.g. the --no-check-certificate worries me (and I am not sure why I added that in ae866b6 anyway, perhaps we should just drop it?)

Another option would be to simply replace WGET = wget -N in Makefile.rules by DOWNLOAD = etc/download.sh, and then use $(DOWNLOAD) instead of $(WGET) later on. This, it still is possible to insert a custom download command (so any PR doing all of this should of course also adjust etc/ci-prepare.sh accordingly).

@fingolfin fingolfin modified the milestone: GAP 4.9.0 Nov 8, 2017
@fingolfin
Copy link
Member Author

As @alex-konovalov correctly pointed out to me, end users won't care about these targets, so no need to get this into 4.9 (won't hurt either, of course).

@olexandr-konovalov
Copy link
Member

Put this under GAP 4.10 milestone to help @cdwensley

@fingolfin fingolfin modified the milestones: GAP 4.10.0, GAP 4.11 Sep 28, 2018
@fingolfin fingolfin added the good first issue Issues that can be understood and addressed by newcomers to GAP development label Nov 27, 2018
@fingolfin fingolfin removed this from the GAP 4.11 milestone Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that can be understood and addressed by newcomers to GAP development kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: build system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants