#823 Proposal: Use immutable CRAN URLs
Closed: accepted 4 years ago by tibbs. Opened 6 years ago by iucar.

Currently, most of the R packages included in Fedora use the following lines in the SPEC:

URL: https://cran.r-project.org/web/packages/%{packname}/
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz

This URL format is not recommended by CRAN, but more importantly, the Source0 format does not work anymore, as this contributor noted, when a new version is released. However, there is an immutable format available, as Kurt Hornik pointed out. So my proposal is to use always the following lines instead:

URL: https://cran.r-project.org/package=%{packname}
Source0: %{url}&version=%{version}

@tibbs proposed a new macro for this, something like %r_source, similar to the existing %pypi_source macro in Python.

My proposal would be %cran_source instead, and %cran_url for the URL field:

URL: %cran_url
Source0: %cran_source

Or we can go one step further and set a new macro called %cran_origin, for instance, which would directly resolve into the above two lines.

The good news is that I've checked and the use of %packname is adhered by all packages. So, for the new macro(s), the name of the R package should default to %packname if defined, and the version, to %version. Then a mass change should be straightforward.


Metadata Update from @tibbs:
- Issue assigned to tibbs

5 years ago

I've been working on providing these macros. Just working with the CRAN folks to make sure that what we use is acceptable before incorporating them.

Metadata Update from @tibbs:
- Issue priority set to: In Committee (was: Needs Review)

5 years ago

I haven't forgotten about this, but I've been mostly unable to work on Fedora things for about three weeks now. With the holidays coming up I will be off for a couple of weeks and may be able to find some time to work on this again.

I'm in a similar situation. I'll try to find some time to test the macros and give some feedback in the next couple of weeks.

The R guidelines in #919 include these immutable URLs and I sent a PR to R2spec to generate specs that way.

No reason for this to stay open.

Metadata Update from @tibbs:
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

4 years ago

Log in to comment on this ticket.

Metadata