[CentOS] creating RPMs from CRAN tarballs

Thu Jun 4 22:46:22 UTC 2015
Leon Fauster <leonfauster at googlemail.com>

Am 04.06.2015 um 18:03 schrieb Tony Schreiner <anthony.schreiner at bc.edu>:
> Thanks for the suggestion, but after putting that at the top of the spec
> and running rpmbuild, I still get
> 
> Resolving Dependencies
> --> Running transaction check
> ---> Package R-RPostgreSQL.x86_64 0:0.4-1.el6 will be installed
> --> Processing Dependency: /usr/bin/r for package:
> R-RPostgreSQL-0.4-1.el6.x86_64
> --> Processing Dependency: /usr/bin/r for package:
> R-RPostgreSQL-0.4-1.el6.x86_64
> --> Finished Dependency ResolutionError: Package:
> R-RPostgreSQL-0.4-1.el6.x86_64 (/R-RPostgreSQL-0.4-1.el6.x86_64)
> Requires: /usr/bin/r
> when trying to install the resulting RPM


Oh, I was a bit lazy/busy to look closer. The r-scripts 
are parsed by /usr/lib/rpm/find-requires that is defined via
__find_requires. You can "disable" this build-step with

%define __find_requires %{nil}

AFAIK this will disable the generation of dependencies 
for all files (e.g. deps like libc.so.6(GLIBC_2.3)(64bit)). 

I suggest a custom script for a specific handling (filtering r-scripts out). 

BTW - why is /usr/bin/r not packaged (symlink to /usr/bin/R)? 
Then the above approach would be obsolete and you would stay 
closer to the standard build process.

--
LF