Patchwork [22/22] dependencies: check that SSL certificates are installed

login
register
mail settings
Submitter Thomas Petazzoni
Date March 24, 2013, 8:26 a.m.
Message ID <1364113606-20836-23-git-send-email-thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/230398/
State Accepted
Headers show

Comments

Thomas Petazzoni - March 24, 2013, 8:26 a.m.
Some packages are hosted on https:// servers, and wget only works on
these if the SSL certificates are installed. For example, downloading
the kernel sources from kernel.org requires those SSL certificates to
be installed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 support/dependencies/dependencies.sh |    9 +++++++++
 1 file changed, 9 insertions(+)

\ No newline at end of file
Peter Korsgaard - March 24, 2013, 1 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Some packages are hosted on https:// servers, and wget only works on
 Thomas> these if the SSL certificates are installed. For example, downloading
 Thomas> the kernel sources from kernel.org requires those SSL certificates to
 Thomas> be installed.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  support/dependencies/dependencies.sh |    9 +++++++++
 Thomas>  1 file changed, 9 insertions(+)

 Thomas> diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
 Thomas> index 5fb4c19..9ee63b5 100755
 Thomas> --- a/support/dependencies/dependencies.sh
 Thomas> +++ b/support/dependencies/dependencies.sh
 Thomas> @@ -199,4 +199,13 @@ if ! perl  -e "require Data::Dumper" > /dev/null 2>&1 ; then
 Thomas>      /bin/echo -e "Your Perl installation is not complete enough, at least Data::Dumper is missing."
 Thomas>      /bin/echo -e "On Debian/Ubuntu distributions, install the 'perl' package."
 Thomas>      exit 1
 Thomas> +fi
 Thomas> +
 Thomas> +# Check that we have the SSL certificates to make https:// downloads
 Thomas> +# work.
 Thomas> +if ! test -d /etc/ssl/certs; then

I don't know if all distributions install them here, hopefully they do.

 Thomas> +    /bin/echo -e "Your system lacks Common CA certificates for SSL."
 Thomas> +    /bin/echo -e "This prevents https:// downloads from suceeding."

s/suceeding/succeeding/

Committed with that fixed, thanks.

Patch

diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 5fb4c19..9ee63b5 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -199,4 +199,13 @@  if ! perl  -e "require Data::Dumper" > /dev/null 2>&1 ; then
     /bin/echo -e "Your Perl installation is not complete enough, at least Data::Dumper is missing."
     /bin/echo -e "On Debian/Ubuntu distributions, install the 'perl' package."
     exit 1
+fi
+
+# Check that we have the SSL certificates to make https:// downloads
+# work.
+if ! test -d /etc/ssl/certs; then
+    /bin/echo -e "Your system lacks Common CA certificates for SSL."
+    /bin/echo -e "This prevents https:// downloads from suceeding."
+    /bin/echo -e "On Debian/Ubuntu distributions, install 'ca-certificates' package."
+    exit 1
 fi