From bdd773313b8d0eef9d0a80fee36eea210482b2a4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Oct 17 2019 20:01:03 +0000 Subject: Add information on automatic R dependencies. --- diff --git a/guidelines/modules/ROOT/pages/R.adoc b/guidelines/modules/ROOT/pages/R.adoc index 3a2e1b0..8103dfc 100644 --- a/guidelines/modules/ROOT/pages/R.adoc +++ b/guidelines/modules/ROOT/pages/R.adoc @@ -87,13 +87,36 @@ rm -f %{buildroot}%{rlibdir}/R.css * Noarch packages install into `+%{_datadir}/R/library/%{packname}+`; arch-specific packages install into `+%{_libdir}/R/library/%{packname}+`. + Change the `+%global rlibdir+` at the top of the file to use `+%{_datadir}+` instead of `+%{_libdir}+`. -* Noarch packages have `+Requires: R-core+`. For arch-specific packages, RPM will automatically add an appropriate dependency on the needed shared libraries but noarch packages need this added manually. === R2spec R2spec is an excellent little tool to assist in creating Fedora-compliant packages for R libraries. Using it as a starting point is recommended (but certainly not mandated). More information here : https://pagure.io/r2spec/ +== Automatically generated dependencies + +All R packages that depend on `+R-devel+` will automatically produce Provides, Requires, Suggests, and Enhances via a generator in `+R-rpm-macros+`. +This generator uses upstream metadata in `+DESCRIPTION+` files to determine what the package should depend on. + +=== Provides with a standardized name + +The generator adds run time Provides in the form of `+R(foo) = packageVersion+`. + +No mangling will be performed on the version from the metadata +(as specified in <<_r_version>> for package versioning). + +=== Dependencies on standardized names + +The generator adds run time requires in the form of `+R(foo)+` +(with versions as specified in the metadata if supplied.) + +The packager MUST inspect the generated Requires for correctness. +All dependencies MUST be resolvable within the targeted Fedora version. + +Unwanted dependencies may be removed by editing the installed `+DESCRIPTION+` file +or using https://rpm.org/user_doc/dependency_generators.html#tweaking-dependency-generators[rpm's `+%__requires_exclude+`] +(substitute `+suggests+` or `+enhances+` if necessary). + == R packaging tips === Naming of R packages