Bioconductor / bioconductor_docker

Docker Containers for Bioconductor
https://bioconductor.org/help/docker/
Artistic License 2.0
73 stars 31 forks source link

fix: update curl to secured http link #85

Closed js2264 closed 1 year ago

js2264 commented 1 year ago

Not sure whether PRs are welcome for this repo, feel free to close it if not.

The Dockerfile attempts to fetch Renviron.bioc hosted by Bioconductor, but it looks like unsecured HTTP links are not available anymore for bioconductor.org domain.

$ curl http://bioconductor.org/checkResults/devel/bioc-LATEST/Renviron.bioc | head

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>CloudFront</center>
</body>
</html>

$ curl https//bioconductor.org/checkResults/devel/bioc-LATEST/Renviron.bioc | head

# ====================================================================
# Environment variables used on the Bioconductor build machines to
# control the behavior of R 4.3 for the BioC 3.18 builds
# ====================================================================
#
# BIOCONDUCTOR PACKAGE DEVELOPERS/MAINTAINERS: Please use the settings
# below on your machine when working on the devel branch of your
# package. Also make sure to use a recent version of R 4.3. This
# should allow you to reproduce any error or warning you see on the
# Bioconductor build reports. The easiest way to use the settings

When in the devel docker container, this results in installation of system dependencies to fail when using this command (from neurogenomics/rworkflows):

$ sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))')

$ echo $sysreqs
File /usr/local/lib/R/etc//Renviron.site contains invalid line(s) <html> <head><title>301 Moved Permanently</title></head> <body> <center><h1>301 Moved Permanently</h1></center> <hr><center>CloudFront</center> </body> </html> They were ignored apt-get update -y && apt-get install -y libcurl4-openssl-dev libssl-dev pandoc make libicu-dev libxml2-dev

And more generally an invalid Renviron.site file:

$ R

   File /usr/local/lib/R/etc//Renviron.site contains invalid line(s)
      <html>
      <head><title>301 Moved Permanently</title></head>
      <body>
      <center><h1>301 Moved Permanently</h1></center>
      <hr><center>CloudFront</center>
      </body>
      </html>
   They were ignored

R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
almahmoud commented 1 year ago

PRs are certainly welcome! Thank you for catching that and finding a potential solution! We started forcing https last week. I have slightly changed the solution, instead adding the -L flag so that the curl request follows redirects. I believe this is a better long-term solution in case we ever redirect from bioconductor.org to somewhere else in the future (eg an object-store bucket)