jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.18k stars 1.73k forks source link

autogen.sh and configure fail when git.savannah.gnu.org is down #960

Closed bluca closed 4 years ago

bluca commented 4 years ago
$ ./configure
configure: error: cannot run /bin/bash build-aux/config.sub
$ cat build-aux/config.sub 
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Trisquel GNU/Linux)</center>
</body>
</html>

I know there is a env variable to avoid downloading new files, but having a simple sanity check before overwriting existing files in build-aux would be very helpful for automated build systems. Without inspecting the build root, the error from ./configure is not helpful when reading the log.

jedisct1 commented 4 years ago

Unfortunately the Internet is not always reliable.

But autogen.sh is only meant to be occasionally run by developers, so this is not really an issue. An empty config.sub would not be be pushed to the stable branch.

jedisct1 commented 4 years ago

Looks like curl has a --fail option that should prevent this. Let's add this, then!

bluca commented 4 years ago

Unfortunately the Internet is not always reliable.

But autogen.sh is only meant to be occasionally run by developers, so this is not really an issue. An empty config.sub would not be be pushed to the stable branch.

There are CI systems, like oss-fuzz, which require building from scratch due to the need to instrument code. This is how I found this issue in the first place.

ebfull commented 4 years ago

We vendor dependencies in our project so that we can perform integrity checks as part of our build process. autogen.sh should not be, by default, downloading files that are later executed without an integrity check.

jedisct1 commented 4 years ago

Added in f057d474e2303f93cd745054e8915a33c88b4e7d, thanks!