rstudio / renv

renv: Project environments for R.
https://rstudio.github.io/renv/
MIT License
1k stars 152 forks source link

renv snapshots RSPM binary repository paths wrongly #640

Closed johanneswaage closed 3 years ago

johanneswaage commented 3 years ago
library(renv)
renv::activate()

options(repos = c("CRAN" = "https://internal_rspm_instance/prod-cran/__linux__/centos7/latest"))

renv::snapshot()

cat(readLines("renv.lock"), sep = "\n")
{
  "R": {
    "Version": "3.6.0",
    "Repositories": [
      {
        "Name": "CRAN",
        "URL": "https://internal_rspm_instance/prod-cran/latest"
      }
    ]
  },
  "Packages": {}
}
sessionInfo()´

R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS:   /opt/R/3.6.0/lib64/R/lib/libRblas.so
LAPACK: /opt/R/3.6.0/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5             compiler_3.6.0         later_1.1.0.1          pfarepos_1.1.4        
 [5] shinyjs_2.0.0          shinyWidgets_0.5.4     remotes_2.2.0          tools_3.6.0           
 [9] testthat_3.0.1         digest_0.6.27          pkgload_1.1.0          evaluate_0.14         
[13] lifecycle_0.2.0        jsonlite_1.7.2         rlang_0.4.10           shiny_1.5.0           
[17] cli_2.2.0              rstudioapi_0.13        yaml_2.2.1             golem_0.3.0           
[21] xfun_0.20              fastmap_1.0.1          withr_2.3.0            stringr_1.4.0         
[25] roxygen2_7.1.1         knitr_1.30             xml2_1.3.2             desc_1.2.0            
[29] fs_1.5.0               shinydashboard_0.7.1   attempt_0.3.1          rprojroot_2.0.2       
[33] snakecase_0.11.0       glue_1.4.2             R6_2.5.0               fansi_0.4.1           
[37] rmarkdown_2.6          logger_0.1             purrr_0.3.4            magrittr_2.0.1        
[41] dockerfiler_0.1.3      shinycssloaders_1.0.0  usethis_2.0.0          promises_1.1.1        
[45] htmltools_0.5.0        PensionstjekTest_0.0.4 rsconnect_0.8.16       assertthat_0.2.1      
[49] mime_0.9               xtable_1.8-4           renv_0.12.3            httpuv_1.5.4          
[53] config_0.3.1           stringi_1.5.3          crayon_1.3.4   
kevinushey commented 3 years ago

Unless I'm misunderstanding something, this is the correct behavior: renv always stores the non-binary URL, so that the lockfile is portable to different platforms. The correct binary URL is constructed at restore + install time, based on the platform being used to handle the restore.

kevinushey commented 3 years ago

Re-opening based on separate discussion: it sounds like the primary issue is that the proper binary URL is not being restored by renv when the project is loaded.

kevinushey commented 3 years ago

I was able to reproduce on a CentOS 7 Docker image. Can you confirm what the output of:

utils::getCRANmirrors(local.only = TRUE)

is?

johanneswaage commented 3 years ago
                               Name           Country              City                                               URL                                                                                                                            Host                                                               Maintainer OK CountryCode                    Comment
1                   0-Cloud [https]           0-Cloud           0-Cloud                      https://cloud.r-project.org/                                                      Automatic redirection to servers worldwide, currently sponsored by Rstudio                                                     winston # stdout.org  1          us  secure_mirror_from_master
2                           0-Cloud           0-Cloud           0-Cloud                       http://cloud.r-project.org/                                                      Automatic redirection to servers worldwide, currently sponsored by Rstudio                                                     winston # stdout.org  1          us  secure_mirror_from_master
3                   Algeria [https]           Algeria           Algiers                            https://cran.usthb.dz/                                                                          University of Science and Technology Houari Boumediene                                        Boukala m c <mboukala # usthb.dz>  1          dz  secure_mirror_from_master
4                           Algeria           Algeria           Algiers                             http://cran.usthb.dz/                                                                          University of Science and Technology Houari Boumediene                                        Boukala m c <mboukala # usthb.dz>  1          dz  secure_mirror_from_master
5              Argentina (La Plata)         Argentina          La Plata            http://mirror.fcaglp.unlp.edu.ar/CRAN/                                                                                                Universidad Nacional de La Plata                                             esuarez # Fcaglp.unlp.edu.ar  1          ar                           
6      Australia (Canberra) [https]         Australia          Canberra                            https://cran.csiro.au/                                                                                                                           CSIRO ben.tan # csiro.au, Jayesh.joshi # csiro.au, CSIROServiceDesk # csiro.au  1          au  secure_mirror_from_master
7              Australia (Canberra)         Australia          Canberra                             http://cran.csiro.au/                                                                                                                           CSIRO ben.tan # csiro.au, Jayesh.joshi # csiro.au, CSIROServiceDesk # csiro.au  1          au  secure_mirror_from_master
8   Australia (Melbourne 1) [https]         Australia         Melbourne            https://mirror.aarnet.edu.au/pub/CRAN/                                                                                                                          AARNET                                               <sysadmin # aarnet.edu.au>  1          au  secure_mirror_from_master
9   Australia (Melbourne 2) [https]         Australia         Melbourne                   https://cran.ms.unimelb.edu.au/                                                                   School of Mathematics and Statistics, University of Melbourne                                          unix-ops # lists.unimelb.edu.au  1          au  secure_mirror_from_master
10        Australia (Perth) [https]         Australia             Perth                       https://cran.curtin.edu.au/                                                                                                 Curtin University of Technology                                                     unix # curtin.edu.au  1          au  secure_mirror_from_master
11                  Austria [https]           Austria              Wien                            https://cran.wu.ac.at/                                                                                                     Wirtschaftsuniversität Wien                                                     CRAN # R-project.org  1          at  secure_mirror_from_master
12                          Austria           Austria              Wien                             http://cran.wu.ac.at/                                                                                                     Wirtschaftsuniversität Wien                                                     CRAN # R-project.org  1          at  secure_mirror_from_master
13        Belgium (Antwerp) [https]           Belgium           Antwerp              https://www.freestatistics.org/cran/                                                                                                                   Patrick Wessa                                                      patrick # wessa.net  1          be                           
14                Belgium (Antwerp)           Belgium           Antwerp               http://www.freestatistics.org/cran/                                                                                                                   Patrick Wessa                                                      patrick # wessa.net  1          be                           
15          Belgium (Ghent) [https]           Belgium             Ghent                        https://lib.ugent.be/CRAN/                                                                                                        Ghent University Library                   Patrick Hochstenbach <Patrick.Hochstenbach # UGent.be>  1          be  secure_mirror_from_master
16                  Belgium (Ghent)           Belgium             Ghent                         http://lib.ugent.be/CRAN/                                                                                                        Ghent University Library                   Patrick Hochstenbach <Patrick.Hochstenbach # UGent.be>  1          be  secure_mirror_from_master
17                      Brazil (BA)            Brazil            Ilheus               http://nbcgib.uesc.br/mirrors/cran/                                                             Computational Biology Center at Universidade Estadual de Santa Cruz                                  <nbcgib # uesc.br>, <eacosta # uesc.br>  1          br  secure_mirror_from_master
18              Brazil (PR) [https]            Brazil          Curitiba                      https://cran-r.c3sl.ufpr.br/                                                                                                  Universidade Federal do Parana                                                      root # c3sl.ufpr.br  1          br  secure_mirror_from_master
19                      Brazil (PR)            Brazil          Curitiba                       http://cran-r.c3sl.ufpr.br/                                                                                                  Universidade Federal do Parana                                                      root # c3sl.ufpr.br  1          br  secure_mirror_from_master
20              Brazil (RJ) [https]            Brazil    Rio de Janeiro                          https://cran.fiocruz.br/                                                                                         Oswaldo Cruz Foundation, Rio de Janeiro                                                oswaldo.cruz # fiocruz.br  1          br  secure_mirror_from_master
21                      Brazil (RJ)            Brazil    Rio de Janeiro                           http://cran.fiocruz.br/                                                                                         Oswaldo Cruz Foundation, Rio de Janeiro                                                oswaldo.cruz # fiocruz.br  1          br  secure_mirror_from_master
22            Brazil (SP 1) [https]            Brazil         Sao Paulo                     https://vps.fmvz.usp.br/CRAN/                                                                                              University of Sao Paulo, Sao Paulo                           Fernando Ferreira <fernando # vps.fmvz.usp.br>  1          br  secure_mirror_from_master
23                    Brazil (SP 1)            Brazil         Sao Paulo                      http://vps.fmvz.usp.br/CRAN/                                                                                              University of Sao Paulo, Sao Paulo                           Fernando Ferreira <fernando # vps.fmvz.usp.br>  1          br  secure_mirror_from_master
24            Brazil (SP 2) [https]            Brazil        Piracicaba                https://brieger.esalq.usp.br/CRAN/                                                                                             University of Sao Paulo, Piracicaba       A Augusto F Garcia <aafgarci # gmail.com>, augusto.garcia # usp.br  1          br  secure_mirror_from_master
25                    Brazil (SP 2)            Brazil        Piracicaba                 http://brieger.esalq.usp.br/CRAN/                                                                                             University of Sao Paulo, Piracicaba       A Augusto F Garcia <aafgarci # gmail.com>, augusto.garcia # usp.br  1          br  secure_mirror_from_master
26                 Bulgaria [https]          Bulgaria             Sofia                    https://ftp.uni-sofia.bg/CRAN/                                                                                                                Sofia University                                       Alexander Velin <velin # fccf.net>  1          bg  secure_mirror_from_master
27                         Bulgaria          Bulgaria             Sofia                     http://ftp.uni-sofia.bg/CRAN/                                                                                                                Sofia University                                       Alexander Velin <velin # fccf.net>  1          bg  secure_mirror_from_master
28              Canada (BC) [https]            Canada           Burnaby            https://mirror.its.sfu.ca/mirror/CRAN/                                                                                                Simon Fraser University, Burnaby                                                research-support # sfu.ca  1          ca                           
29                      Canada (BC)            Canada           Burnaby                          http://cran.stat.sfu.ca/                                                                                                Simon Fraser University, Burnaby                                                research-support # sfu.ca  1          ca                           
30              Canada (MB) [https]            Canada          Winnipeg                      https://muug.ca/mirror/cran/                                                                                                        Manitoba Unix User Group                                                         mirror # muug.ca  1          ca                           
31                      Canada (MB)            Canada          Winnipeg                       http://muug.ca/mirror/cran/                                                                                                        Manitoba Unix User Group                                                         mirror # muug.ca  1          ca                           
32              Canada (NS) [https]            Canada           Halifax                   https://mirror.its.dal.ca/cran/                                                                                                   Dalhousie University, Halifax                                                    mirror # lists.dal.ca  1          ca                           
33                      Canada (NS)            Canada           Halifax                    http://mirror.its.dal.ca/cran/                                                                                                   Dalhousie University, Halifax                                                    mirror # lists.dal.ca  1          ca                           
34                      Canada (ON)            Canada           Toronto                   http://cran.utstat.utoronto.ca/                                                                                                           University of Toronto                             Dermot Whelan <wheland # utstat.utoronto.ca>  1          ca                           
35                  Chile 1 [https]             Chile          Santiago                     https://dirichlet.mat.puc.cl/                                                                              Pontificia Universidad Catolica de Chile, Santiago                                Fernando Quintana <quintana # mat.puc.cl>  1          cl  secure_mirror_from_master
36                          Chile 1             Chile          Santiago                      http://dirichlet.mat.puc.cl/                                                                              Pontificia Universidad Catolica de Chile, Santiago                                Fernando Quintana <quintana # mat.puc.cl>  1          cl  secure_mirror_from_master
37                  Chile 2 [https]             Chile          Santiago                       https://cran.dcc.uchile.cl/                                                                Departamento de Ciencias de la Computación, Universidad de Chile                                Mauricio Vargas <mvargas # dcc.uchile.cl>  1          cl  secure_mirror_from_master
38          China (Beijing) [https]             China           Beijing        https://mirrors.tuna.tsinghua.edu.cn/CRAN/                                                                                                  TUNA Team, Tsinghua University                                    Justin Wong <justin.w.xd # gmail.com>  1          cn                           
39                  China (Beijing)             China           Beijing         http://mirrors.tuna.tsinghua.edu.cn/CRAN/                                                                                                  TUNA Team, Tsinghua University                                    Justin Wong <justin.w.xd # gmail.com>  1          cn                           
40            China (Hefei) [https]             China             Hefei                 https://mirrors.ustc.edu.cn/CRAN/                                                                                   University of Science and Technology of China                                                    mirrors # Ustc.edu.cn  1          cn                           
41                    China (Hefei)             China             Hefei                  http://mirrors.ustc.edu.cn/CRAN/                                                                                   University of Science and Technology of China                                                    mirrors # Ustc.edu.cn  1          cn                           
42        China (Hong Kong) [https]             China         Hong Kong                https://mirror-hk.koddos.net/CRAN/                                                                                                             KoDDoS in Hong Kong                                                      mirror # koddos.net  1          cn  secure_mirror_from_master
43        China (Guangzhou) [https]             China         Guangzhou                   https://mirrors.eliteu.cn/CRAN/                                                                                                                 Elite Education                                                        x.liu # eliteu.cn  1          cn  secure_mirror_from_master
44          China (Lanzhou) [https]             China           Lanzhou                   https://mirror.lzu.edu.cn/CRAN/                                                                                          Lanzhou University Open Source Society                                               oss.lzu.edu.cn # gmail.com  1          cn  secure_mirror_from_master
45                  China (Lanzhou)             China           Lanzhou                    http://mirror.lzu.edu.cn/CRAN/                                                                                          Lanzhou University Open Source Society                                               oss.lzu.edu.cn # gmail.com  1          cn  secure_mirror_from_master
46       China (Shanghai 1) [https]             China          Shanghai               https://mirrors.tongji.edu.cn/CRAN/                                                                                                               Tongji University                                                     mirrors # opentj.org  1          cn  secure_mirror_from_master
47       China (Shanghai 2) [https]             China          Shanghai                  https://mirrors.shu.edu.cn/CRAN/                                                                                                             Shanghai University                                   osc # oa.shu.edu.cn, zhonger # live.cn  1          cn  secure_mirror_from_master
48          Colombia (Cali) [https]          Colombia              Cali                    https://www.icesi.edu.co/CRAN/                                                                                                                Icesi University                                                  adminred # Icesi.edu.co  1          co  secure_mirror_from_master
49                  Colombia (Cali)          Colombia              Cali                     http://www.icesi.edu.co/CRAN/                                                                                                                Icesi University                                                  adminred # Icesi.edu.co  1          co  secure_mirror_from_master
50           Czech Republic [https]    Czech Republic            Prague                         https://mirrors.nic.cz/R/                                                                                                                  CZ.NIC, Prague                                                         mirrors # nic.cz  1          cz  secure_mirror_from_master
51                   Czech Republic    Czech Republic            Prague                          http://mirrors.nic.cz/R/                                                                                                                  CZ.NIC, Prague                                                         mirrors # nic.cz  1          cz  secure_mirror_from_master
52                  Denmark [https]           Denmark           Aalborg                  https://mirrors.dotsrc.org/cran/                                                                                                              Aalborg University                                                       staff # dotsrc.org  1          dk  secure_mirror_from_master
53                          Denmark           Denmark           Aalborg                   http://mirrors.dotsrc.org/cran/                                                                                                              Aalborg University                                                       staff # dotsrc.org  1          dk  secure_mirror_from_master
54                East Asia [https] 0-Cloud-East-Asia 0-Cloud-East-Asia                                https://cran.asia/ Personnel Psychology Laboratory, Industrial Psychology Department, Kwangwoon University (sites: Tokyo, Seoul/Wonjoo, Singapore)                                                        admin # cran.asia  1        asia  secure_mirror_from_master
55         Ecuador (Cuenca) [https]           Ecuador            Cuenca                 https://mirror.cedia.org.ec/CRAN/                                                                                                                           CEDIA                                               paul.bernal # cedia.org.ec  1          ec  secure_mirror_from_master
56                 Ecuador (Cuenca)           Ecuador            Cuenca                  http://mirror.cedia.org.ec/CRAN/                                                                                                                           CEDIA                                               paul.bernal # cedia.org.ec  1          ec  secure_mirror_from_master
57          Ecuador (Quito) [https]           Ecuador             Quito                   https://mirror.epn.edu.ec/CRAN/                                                                                                    Escuela Politécnica Nacional                                               paul.bernal # cedia.org.ec  1          ec  secure_mirror_from_master
58                      El Salvador       El Salvador      San Salvador                         http://cran.salud.gob.sv/                                                                                        Ministry of Health (Ministerio de Salud)                                                    mirror # salud.gob.sv  1          sv                           
59                  Estonia [https]           Estonia             Tartu                    https://ftp.eenet.ee/pub/cran/                                                                                                                           EENet                                                         eenet # eenet.ee  1          ee  secure_mirror_from_master
60                          Estonia           Estonia             Tartu                     http://ftp.eenet.ee/pub/cran/                                                                                                                           EENet                                                         eenet # eenet.ee  1          ee  secure_mirror_from_master
61          France (Lyon 1) [https]            France              Lyon                  https://pbil.univ-lyon1.fr/CRAN/                                                                           Dept. of Biometry & Evol. Biology, University of Lyon                        Jean Thioulouse <Jean.Thioulouse # univ-lyon1.fr>  1          fr  secure_mirror_from_master
62          France (Lyon 2) [https]            France              Lyon                  https://mirror.ibcp.fr/pub/CRAN/                                                                                                                 CNRS IBCP, Lyon                                                  alexis.michon # ibcp.fr  1          fr  secure_mirror_from_master
63                  France (Lyon 2)            France              Lyon                   http://mirror.ibcp.fr/pub/CRAN/                                                                                                                 CNRS IBCP, Lyon                                                  alexis.michon # ibcp.fr  1          fr  secure_mirror_from_master
64       France (Marseille) [https]            France         Marseille                         https://cran.biotools.fr/                                                                                                                 IBDM, Marseille                                              andrew.saurin # univ-amu.fr  1          fr  secure_mirror_from_master
65               France (Marseille)            France         Marseille                          http://cran.biotools.fr/                                                                                                                 IBDM, Marseille                                              andrew.saurin # univ-amu.fr  1          fr  secure_mirror_from_master
66     France (Montpellier) [https]            France       Montpellier                 https://ftp.igh.cnrs.fr/pub/CRAN/                                                                                      Institut de Genetique Humaine, Montpellier                                           guillaume.gielly # igh.cnrs.fr  1          fr  secure_mirror_from_master
67             France (Montpellier)            France       Montpellier                  http://ftp.igh.cnrs.fr/pub/CRAN/                                                                                      Institut de Genetique Humaine, Montpellier                                           guillaume.gielly # igh.cnrs.fr  1          fr  secure_mirror_from_master
68                 France (Paris 1)            France             Paris                              http://cran.irsn.fr/                                                                                          French Nuclear Safety Institute, Paris                                                    yann.richet # irsn.fr  1          fr                           
69         France (Paris 2) [https]            France             Paris                      https://cran.univ-paris1.fr/                                                                                      SAMM, Université Paris 1 Panthéon-Sorbonne                                         pierre.latouche # univ-paris1.fr  1          fr  secure_mirror_from_master
70                 France (Paris 2)            France             Paris                       http://cran.univ-paris1.fr/                                                                                      SAMM, Université Paris 1 Panthéon-Sorbonne                                         pierre.latouche # univ-paris1.fr  1          fr  secure_mirror_from_master
71       Germany (Erlangen) [https]           Germany          Erlangen                          https://ftp.fau.de/cran/                                                                         Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)                                                 rrze-ftp-admins # fau.de  1          de  secure_mirror_from_master
72      Germany (Göttingen) [https]           Germany         Göttingen                https://ftp.gwdg.de/pub/misc/cran/                                                                                                                  GWDG Göttingen                                                       ftpadmin # gwdg.de  1          de  secure_mirror_from_master
73              Germany (Göttingen)           Germany         Göttingen                 http://ftp.gwdg.de/pub/misc/cran/                                                                                                                  GWDG Göttingen                                                       ftpadmin # gwdg.de  1          de  secure_mirror_from_master
74        Germany (Münster) [https]           Germany           Münster                     https://cran.uni-muenster.de/                                                                                                  University of Münster, Germany                          Edzer Pebesma <edzer.pebesma # uni-muenster.de>  1          de  secure_mirror_from_master
75                Germany (Münster)           Germany           Münster                      http://cran.uni-muenster.de/                                                                                                  University of Münster, Germany                          Edzer Pebesma <edzer.pebesma # uni-muenster.de>  1          de  secure_mirror_from_master
76                   Greece [https]            Greece             Crete               https://ftp.cc.uoc.gr/mirrors/CRAN/                                                                                                             University of Crete                                                      mirrors # Cc.uoc.gr  1          gr  secure_mirror_from_master
77                           Greece            Greece             Crete                http://ftp.cc.uoc.gr/mirrors/CRAN/                                                                                                             University of Crete                                                      mirrors # Cc.uoc.gr  1          gr  secure_mirror_from_master
78                  Hungary [https]           Hungary          Budapest                       https://cran.rapporter.net/                                                                                                         Rapporter.net, Budapest                                    Daróczi Gergely <gergely # snowl.net>  1          hu                           
79                          Hungary           Hungary          Budapest                        http://cran.rapporter.net/                                                                                                         Rapporter.net, Budapest                                    Daróczi Gergely <gergely # snowl.net>  1          hu                           
80                  Iceland [https]           Iceland         Reykjavik                            https://cran.hafro.is/                                                                                                       Marine Research Institute                                                          cran # hafro.is  1          is  secure_mirror_from_master
81                          Iceland           Iceland         Reykjavik                             http://cran.hafro.is/                                                                                                       Marine Research Institute                                                          cran # hafro.is  1          is  secure_mirror_from_master
82      Indonesia (Jakarta) [https]         Indonesia           Jakarta                     https://repo.bppt.go.id/cran/                                                                         Agency for The Application and Assessment of Technology                               Imam Cartealy <imam.cartealy # bppt.go.id>  1          id  secure_mirror_from_master
83                     Iran [https]              Iran           Mashhad                            https://cran.um.ac.ir/                                                                                                  Ferdowsi University of Mashhad                                         Majid Sarmad <sarmad # um.ac.ir>  1          ir                           
84                             Iran              Iran           Mashhad                             http://cran.um.ac.ir/                                                                                                  Ferdowsi University of Mashhad                                         Majid Sarmad <sarmad # um.ac.ir>  1          ir                           
85                  Ireland [https]           Ireland            Dublin https://ftp.heanet.ie/mirrors/cran.r-project.org/                                                                                                                   HEAnet,Dublin                                                      mirrors # heanet.ie  1          ie  secure_mirror_from_master
86                          Ireland           Ireland            Dublin  http://ftp.heanet.ie/mirrors/cran.r-project.org/                                                                                                                   HEAnet,Dublin                                                      mirrors # heanet.ie  1          ie  secure_mirror_from_master
87                   Italy (Milano)             Italy            Milano          http://cran.mirror.garr.it/mirrors/CRAN/                                                                                                             Garr Mirror, Milano                                                 mirror-service # garr.it  1          it                           
88            Italy (Padua) [https]             Italy             Padua                       https://cran.stat.unipd.it/                                                                                                             University of Padua                                                     cran # stat.unipd.it  1          it  secure_mirror_from_master
89                    Italy (Padua)             Italy             Padua                        http://cran.stat.unipd.it/                                                                                                             University of Padua                                                     cran # stat.unipd.it  1          it  secure_mirror_from_master
90            Japan (Tokyo) [https]             Japan             Tokyo                           https://cran.ism.ac.jp/                                                                                 The Institute of Statistical Mathematics, Tokyo                                       Junji Nakano <nakanoj # ism.ac.jp>  1          jp  secure_mirror_from_master
91                    Japan (Tokyo)             Japan             Tokyo                            http://cran.ism.ac.jp/                                                                                 The Institute of Statistical Mathematics, Tokyo                                       Junji Nakano <nakanoj # ism.ac.jp>  1          jp  secure_mirror_from_master
92         Japan (Yonezawa) [https]             Japan          Yonezawa         https://ftp.yz.yamagata-u.ac.jp/pub/cran/                                                                                                             Yamagata University                                      www-admin # ftp.yz.yamagata-u.ac.jp  1          jp  secure_mirror_from_master
93            Korea (Busan) [https]             Korea             Busan                   https://ftp.harukasan.org/CRAN/                                                        Information and Database Systems Laboratory, Pukyong National University                                  Jongmin Kim <jmkim # ftp.harukasan.org>  1          kr  secure_mirror_from_master
94     Korea (Gyeongsan-si) [https]             Korea      Gyeongsan-si                            https://cran.yu.ac.kr/                                                                                                             Yeungnam University                                                         sysop # yu.ac.kr  1          kr  secure_mirror_from_master
95          Korea (Seoul 1) [https]             Korea             Seoul                         https://cran.seoul.go.kr/                                                                                   Bigdata Campus, Seoul Metropolitan Govermment                                                      leewj # seoul.go.kr  1          kr  secure_mirror_from_master
96                  Korea (Seoul 2)             Korea             Seoul                 http://healthstat.snu.ac.kr/CRAN/                                                              Graduate School of Public Health, Seoul National University, Seoul                                                      Sunghow # gmail.com  1          kr  secure_mirror_from_master
97            Korea (Ulsan) [https]             Korea             Ulsan                         https://cran.biodisk.org/                                              The Genome Institute of UNIST (Ulsan National Institute of Science and Technology)                                               dr.kyusang.lee # gmail.com  1          kr  secure_mirror_from_master
98                    Korea (Ulsan)             Korea             Ulsan                          http://cran.biodisk.org/                                              The Genome Institute of UNIST (Ulsan National Institute of Science and Technology)                                               dr.kyusang.lee # gmail.com  1          kr  secure_mirror_from_master
99                 Malaysia [https]          Malaysia           Serdang                      https://wbc.upm.edu.my/cran/                                                                                                      Univerisiti Putra Malaysia                                       Ng Keng Yap <kengyap # upm.edu.my>  1          my  secure_mirror_from_master
100                        Malaysia          Malaysia           Serdang                       http://wbc.upm.edu.my/cran/                                                                                                      Univerisiti Putra Malaysia                                       Ng Keng Yap <kengyap # upm.edu.my>  1          my  secure_mirror_from_master
101    Mexico (Mexico City) [https]            Mexico       Mexico City                             https://cran.itam.mx/                                                                                        Instituto Tecnologico Autonomo de Mexico                                     Ernesto Barrios <ebarrios # Itam.mx>  1          mx  secure_mirror_from_master
102            Mexico (Mexico City)            Mexico       Mexico City                              http://cran.itam.mx/                                                                                        Instituto Tecnologico Autonomo de Mexico                                     Ernesto Barrios <ebarrios # Itam.mx>  1          mx  secure_mirror_from_master
104             New Zealand [https]       New Zealand          Auckland                 https://cran.stat.auckland.ac.nz/                                                                                                          University of Auckland                                               w.schmidt # auckland.ac.nz  1          nz                           
105                     New Zealand       New Zealand          Auckland                  http://cran.stat.auckland.ac.nz/                                                                                                          University of Auckland                                               w.schmidt # auckland.ac.nz  1          nz                           
106                  Norway [https]            Norway            Bergen                              https://cran.uib.no/                                                                                                            University of Bergen                                                     sundrift # It.uib.no  1          no  secure_mirror_from_master
107                          Norway            Norway            Bergen                               http://cran.uib.no/                                                                                                            University of Bergen                                                     sundrift # It.uib.no  1          no  secure_mirror_from_master
108             Philippines [https]       Philippines       Quezon City                     https://cran.stat.upd.edu.ph/                                                                                      University of the Philippines and PREGINET                  Bert Mendoza <bert # asti.dost.gov.ph>, ops # pregi.net  1          ph  secure_mirror_from_master
109                     Philippines       Philippines       Quezon City                      http://cran.stat.upd.edu.ph/                                                                                      University of the Philippines and PREGINET                  Bert Mendoza <bert # asti.dost.gov.ph>, ops # pregi.net  1          ph  secure_mirror_from_master
110               Portugal (Lisbon)          Portugal            Lisbon                   http://cran.radicaldevelop.com/                                                                                                             RadicalDevelop, Lda                                               geral # radicaldevelop.com  1          pt                           
111                Portugal (Porto)          Portugal             Porto                         http://cran.dcc.fc.up.pt/                                                                                                             University of Porto                                               labcc # labcc.dcc.fc.up.pt  1          pt                           
112                  Serbia [https]            Serbia          Belgrade                 https://fourdots.com/mirror/CRAN/                                                                                                                       Four Dots                               Goran Tepsic <goran.tepsic # fourdots.com>  1          rs  secure_mirror_from_master
113   Singapore (Singapore) [https]         Singapore         Singapore                     https://cran.stat.nus.edu.sg/                                                                                     National University of Singapore, Singapore                                                       ccezr # nus.edu.sg  1          sg                           
114           Singapore (Singapore)         Singapore         Singapore                      http://cran.stat.nus.edu.sg/                                                                                     National University of Singapore, Singapore                                                       ccezr # nus.edu.sg  1          sg                           
115        South Africa (Cape Town)      South Africa         Cape Town                              http://r.adu.org.za/                                                                                                         University of Cape Town                                               michael.brooks # uct.ac.za  1          za                           
116     South Africa (Johannesburg)      South Africa      Johannesburg                         http://cran.mirror.ac.za/                                                                                                             TENET, Johannesburg                                 Patrick Holahan <patrickh # tenet.ac.za>  1          za                           
117        Spain (A Coruña) [https]             Spain          A Coruña                        https://ftp.cixug.es/CRAN/                                                                                               Oficina de software libre (CIXUG)                                                         <osl # cixug.es>  1          es  secure_mirror_from_master
118                Spain (A Coruña)             Spain          A Coruña                         http://ftp.cixug.es/CRAN/                                                                                               Oficina de software libre (CIXUG)                                                         <osl # cixug.es>  1          es  secure_mirror_from_master
119          Spain (Madrid) [https]             Spain            Madrid                          https://cran.rediris.es/                                                                                       Spanish National Research Network, Madrid                         Jose Manuel Macias <jmanuel.macias # rediris.es>  1          es  secure_mirror_from_master
120                  Spain (Madrid)             Spain            Madrid                           http://cran.rediris.es/                                                                                       Spanish National Research Network, Madrid                         Jose Manuel Macias <jmanuel.macias # rediris.es>  1          es  secure_mirror_from_master
121                  Sweden [https]            Sweden              Umeå               https://ftp.acc.umu.se/mirror/CRAN/                                                                                         Academic Computer Club, Umeå University                                                   <ftp-adm # acc.umu.se>  1          se  secure_mirror_from_master
122                          Sweden            Sweden              Umeå                http://ftp.acc.umu.se/mirror/CRAN/                                                                                         Academic Computer Club, Umeå University                                                   <ftp-adm # acc.umu.se>  1          se  secure_mirror_from_master
123             Switzerland [https]       Switzerland            Zürich                        https://stat.ethz.ch/CRAN/                                                                                                                      ETH Zürich                                          Martin.Maechler # R-project.org  1          ch  secure_mirror_from_master
124                     Switzerland       Switzerland            Zürich                         http://stat.ethz.ch/CRAN/                                                                                                                      ETH Zürich                                          Martin.Maechler # R-project.org  1          ch  secure_mirror_from_master
125        Taiwan (Chungli) [https]            Taiwan           Chungli                      https://ftp.yzu.edu.tw/CRAN/                                                              Department of Computer Science and Engineering, Yuan Ze University                              Peter Dave Hello <hsu # peterdavehello.org>  1          tw                           
126                Taiwan (Chungli)            Taiwan           Chungli                       http://ftp.yzu.edu.tw/CRAN/                                                              Department of Computer Science and Engineering, Yuan Ze University                              Peter Dave Hello <hsu # peterdavehello.org>  1          tw                           
127                 Taiwan (Taipei)            Taiwan            Taipei                      http://cran.csie.ntu.edu.tw/                                                                                              National Taiwan University, Taipei                                         Rong-En Fan  <rafan # infor.org>  1          tw maintainer_address_bounces
128                        Thailand          Thailand            Hatyai                http://mirrors.psu.ac.th/pub/cran/                                                                                            Prince of Songkla University, Hatyai                                                      wipat.s # psu.ac.th  1          th                           
129        Turkey (Denizli) [https]            Turkey           Denizli                          https://cran.pau.edu.tr/                                                                                                   Pamukkale University, Denizli                                       Ugur Zeybek <uzeybek # pau.edu.tr>  1          tr  secure_mirror_from_master
130                Turkey (Denizli)            Turkey           Denizli                           http://cran.pau.edu.tr/                                                                                                   Pamukkale University, Denizli                                       Ugur Zeybek <uzeybek # pau.edu.tr>  1          tr  secure_mirror_from_master
131         Turkey (Mersin) [https]            Turkey            Mersin                     https://cran.ncc.metu.edu.tr/                                                                 Middle East Technical University Northern Cyprus Campus, Mersin                             atasiran # metu.edu.tr, ncc-cc # metu.edu.tr  1          tr  secure_mirror_from_master
132                 Turkey (Mersin)            Turkey            Mersin                      http://cran.ncc.metu.edu.tr/                                                                 Middle East Technical University Northern Cyprus Campus, Mersin                             atasiran # metu.edu.tr, ncc-cc # metu.edu.tr  1          tr  secure_mirror_from_master
133            UK (Bristol) [https]                UK           Bristol                   https://www.stats.bris.ac.uk/R/                                                                                                           University of Bristol         Guy Nason <G.P.Nason # bristol.ac.uk>, it-zone-d # bristol.ac.uk  1          uk  secure_mirror_from_master
134                    UK (Bristol)                UK           Bristol                    http://www.stats.bris.ac.uk/R/                                                                                                           University of Bristol         Guy Nason <G.P.Nason # bristol.ac.uk>, it-zone-d # bristol.ac.uk  1          uk  secure_mirror_from_master
135           UK (London 1) [https]                UK            London                   https://cran.ma.imperial.ac.uk/                                                                                                         Imperial College London                                             andy.thomas # imperial.ac.uk  1          uk  secure_mirror_from_master
136                   UK (London 1)                UK            London                    http://cran.ma.imperial.ac.uk/                                                                                                         Imperial College London                                             andy.thomas # imperial.ac.uk  1          uk  secure_mirror_from_master
137              USA (CA 1) [https]               USA          Berkeley                    https://cran.cnr.berkeley.edu/                                                                                          University of California, Berkeley, CA                                           casterln # nature.berkeley.edu  1          us  secure_mirror_from_master
138                      USA (CA 1)               USA          Berkeley                     http://cran.cnr.berkeley.edu/                                                                                          University of California, Berkeley, CA                                           casterln # nature.berkeley.edu  1          us  secure_mirror_from_master
139                      USA (CA 2)               USA       Los Angeles                        http://cran.stat.ucla.edu/                                                                                       University of California, Los Angeles, CA                                 Jose Hales-Garcia <jose # stat.ucla.edu>  1          us                           
140                USA (IA) [https]               USA              Ames              https://mirror.las.iastate.edu/CRAN/                                                                                                 Iowa State University, Ames, IA                                                     statit # iastate.edu  1          us  secure_mirror_from_master
141                        USA (IA)               USA              Ames               http://mirror.las.iastate.edu/CRAN/                                                                                                 Iowa State University, Ames, IA                                                     statit # iastate.edu  1          us  secure_mirror_from_master
142                USA (IN) [https]               USA       Bloomington                     https://ftp.ussg.iu.edu/CRAN/                                                                                                              Indiana University                                                    rtadmin # indiana.edu  1          us                           
143                        USA (IN)               USA       Bloomington                      http://ftp.ussg.iu.edu/CRAN/                                                                                                              Indiana University                                                    rtadmin # indiana.edu  1          us                           
144                USA (KS) [https]               USA          Lawrence                   https://rweb.crmda.ku.edu/cran/                                                                                              University of Kansas, Lawrence, KS                                         Paul Johnson <pauljohn # ku.edu>  1          us  secure_mirror_from_master
145                        USA (KS)               USA          Lawrence                    http://rweb.crmda.ku.edu/cran/                                                                                              University of Kansas, Lawrence, KS                                         Paul Johnson <pauljohn # ku.edu>  1          us  secure_mirror_from_master
146              USA (MI 1) [https]               USA          Houghton                             https://cran.mtu.edu/                                                                                 Michigan Technological University, Houghton, MI                                         Robert Froese <froese # mtu.edu>  1          us  secure_mirror_from_master
147                      USA (MI 1)               USA          Houghton                              http://cran.mtu.edu/                                                                                 Michigan Technological University, Houghton, MI                                         Robert Froese <froese # mtu.edu>  1          us  secure_mirror_from_master
148                        USA (MO)               USA         St. Louis                            http://cran.wustl.edu/                                                                                            Washington University, St. Louis, MO                                                     admartin # wustl.edu  1          us maintainer_address_bounces
149                        USA (NC)               USA            Durham               http://archive.linux.duke.edu/cran/                                                                                                     Duke University, Durham, NC                                              csi-linux-admins # duke.edu  1          us                           
150                USA (OH) [https]               USA         Cleveland                            https://cran.case.edu/                                                                                  Case Western Reserve University, Cleveland, OH                                   "Alberto H. Santana" <ahs4 # case.edu>  1          us                           
151                        USA (OH)               USA         Cleveland                             http://cran.case.edu/                                                                                  Case Western Reserve University, Cleveland, OH                                   "Alberto H. Santana" <ahs4 # case.edu>  1          us                           
152                USA (OR) [https]               USA         Corvallis                  https://ftp.osuosl.org/pub/cran/                                                                                                         Oregon State University                                                     support # Osuosl.org  1          us  secure_mirror_from_master
153                        USA (OR)               USA         Corvallis                   http://ftp.osuosl.org/pub/cran/                                                                                                         Oregon State University                                                     support # Osuosl.org  1          us  secure_mirror_from_master
154                      USA (PA 1)               USA        Pittsburgh                   http://lib.stat.cmu.edu/R/CRAN/                                                                             Statlib, Carnegie Mellon University, Pittsburgh, PA                                    Carl Skipper <remarks # stat.cmu.edu>  1          us                           
155                      USA (PA 2)               USA        Pittsburgh                   http://cran.mirrors.hoobly.com/                                                                                              Hoobly Classifieds, Pittsburgh, PA                                      Peter Grigor <pgrigor # hoobly.com>  1          us                           
156                USA (TN) [https]               USA         Oak Ridge                https://mirrors.nics.utk.edu/cran/                                                                    National Institute for Computational Sciences, Oak Ridge, TN                                                      help # nics.utk.edu  1          us  secure_mirror_from_master
157                        USA (TN)               USA         Oak Ridge                 http://mirrors.nics.utk.edu/cran/                                                                    National Institute for Computational Sciences, Oak Ridge, TN                                                      help # nics.utk.edu  1          us  secure_mirror_from_master
158              USA (TX 1) [https]               USA            Dallas             https://cran.revolutionanalytics.com/                                                                                                Revolution Analytics, Dallas, TX                            David Smith <david # revolutionanalytics.com>  1          us  secure_mirror_from_master
159                      USA (TX 1)               USA            Dallas              http://cran.revolutionanalytics.com/                                                                                                Revolution Analytics, Dallas, TX                            David Smith <david # revolutionanalytics.com>  1          us  secure_mirror_from_master
160                 Uruguay [https]           Uruguay        Montevideo                https://espejito.fder.edu.uy/cran/                                                                                Facultad de Derecho, Universidad de la República                                                       root # fder.edu.uy  1          uy  secure_mirror_from_master
161                       Venezuela         Venezuela          Valencia               http://camoruco.ing.uc.edu.ve/cran/                                                                                               Universidad de Carabobo Venezuela                                                    dir-imyca # uc.edu.ve  1          ve  
kevinushey commented 3 years ago

That looks correct to me; there must be something else going on. What about:

repos <- getOption("repos")
print(repos)
lapply(repos, renv:::renv_rspm_transform_impl)

Does that emit an error for you?

johanneswaage commented 3 years ago
library(renv)
renv::activate()

options(repos = c("CRAN" = "https://internal_rspm_instance/prod-cran/__linux__/centos7/latest"))

renv::snapshot(force = TRUE)
repos <- getOption("repos")
print(repos)

#                                                                    CRAN 
#"https://internal_rspm_instance/prod-cran/__linux__/centos7/latest" 

lapply(repos, renv:::renv_rspm_transform_impl)
# $CRAN
# [1] "https://internal_rspm_instance/prod-cran/__linux__/centos7/latest"

cat(readLines("renv.lock"), sep = "\n")
{
  "R": {
    "Version": "3.6.0",
    "Repositories": [
      {
        "Name": "CRAN",
        "URL": "https://pfanpml03.prod.pfaintern.dk/prod-cran/latest"
      }
    ]
  },
  "Packages": {
    "renv": {
      "Package": "renv",
      "Version": "0.13.0",
      "Source": "Repository",
      "Repository": "RSPM",
      "Hash": "9f10d9db5b50400c348920c5c603385e"
    }
  }
}
johanneswaage commented 3 years ago

Any updates on this irl renv-release`?

kevinushey commented 3 years ago

Sorry, I've lost the context of the original issue. If all you want is for renv to stop trying to transform RSPM URLs, you can set:

options(renv.config.rspm.enabled = FALSE)

and renv will disable any of its RSPM-related integration. (Note that your lockfile will then not be portable to other operating systems, since it relies on a CentOS 7 specific repository URL.)

johanneswaage commented 3 years ago

I want renv to snapshot binary repos serviced by RSPM. Would the mentioned option allow this? Thanks

kevinushey commented 3 years ago

Yes, it would. See the entry in https://rstudio.github.io/renv/reference/config.html for more details.

johanneswaage commented 3 years ago

I still see this as a bug in either renv or RSPM, as we should be able to use binary repos with renv and RSPM out of the box, but thanks for the workaround - it works.

kevinushey commented 3 years ago

The bug here evidently is that renv is failing to transform the "source" repository URL into the "binary" repository URL on your system.