[Rd] RE: [R] Re: failed rpm installation of R 1.2-1 (fwd) (PR#841)

plummer@iarc.fr plummer@iarc.fr
Thu, 8 Feb 2001 09:09:54 +0100 (MET)

I'm forwarding this to R-bugs.

In R 1.2.1 the file $R_HOME/bin/maketitle.awk is installed as an
executable. It should not be since it is just a set of awk commands,
not a script file that can be run from the shell (This is a change from
R 1.2.0 in which the file $R_HOME/bin/maketitle was a shell script).

This confuses an rpm utility called "find-requires" which scans all
executable files in an effort to determine the dependencies of 
the rpm package.
- binaries are scanned for the dynamic libraries they are linked against
- The heads of script files are scanned to see what language they
  are written in. In this case the first line of maketitle.awk is
  the awk command BEGIN, which is misinterpreted as a dependency for R.


On 07-Feb-01 Albrecht Gebhardt wrote:
> On Wed, 7 Feb 2001, Faheem Mitha wrote:
>> Dear Albrecht,
>> Just sent the following message out to r-help. Have you any idea what this
>> problem could be?
>>                          Sincerely, Faheem Mitha.
>> ---------- Forwarded message ----------
>> Date: Wed, 7 Feb 2001 00:04:35 -0500 (EST)
>> From: Faheem Mitha <faheem@email.unc.edu>
>> To: r-help@stat.math.ethz.ch
>> Subject: failed rpm installation of R 1.2-1
>> Dear People,
>> Just tried to compile an rpm for R 1.2-1 (using Albrecht Gebhardt's spec
>> file). The compile went successfully and produced a binary rpm, but when I
>> tried to install it, I got an error
>> error: failed dependencies:
>>         BEGIN is needed by R-base-1.2.1-1
>> I see this was also listed in the Requires list at the end of the rpm
>> compilation: 
>> Requires: /bin/sh /usr/bin/perl BEGIN ...
>> Of course I could force installation of the package, but I would like to
>> know what I am doing first. Albrecht does not say anything about BEGIN in
>> his spec file, so this must be somethin internal to R. Does anyone have
>> any idea what? I have no idea.
> I guess, there is some executable file (a snippet of some script with mode
> 755 or similar) which starts with a line "BEGIN". ....
> Well, I just found it, it is an awk script:
> find -type f -exec grep -l BEGIN {} \;
> ...
> ./bin/maketitle.awk
> Clearly it doesn't need the executable bits so simply add
> chmod 644 $RPM_BUILD_ROOT/%{prefix}/R/bin/maketitle.awk
> to the end of the %install section of my spec file.
> Albrecht

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch