On Fri, 8 Feb 2008, Troy Dawson wrote:

> Jon Peatfield wrote:
>>  http://www.damtp.cam.ac.uk/linux/sl/damtp/5x/SRPMS/R-2.6.2-1.SL51.src.rpm
>>
>>  The re-build finished quicker than I expected or the typing of that last
>>  message took longer (or both).
>
> Hi Jon,
> I got one change for your spec file.
> Right now when you get the release version you do
>
>    %define VER %(rpmquery --qf '%{VERSION}' sl-release | sed 's/\\.//g')
>
> I have changed it to
>
>    %define VER %(rpmquery --qf '%{VERSION}' sl-release | cut -d'.' -f1)
>
> This gives us the major release number (SL4, SL5) instead of the minor 
> release number (41, 51).
> I like this better for two reasons.
> First - The rpm should be able to run on any SL4 or SL5 machine, so the minor 
> number isn't really needed.
> Second (and the real reason I changed it) - Later on you have
>    %if %{VER} >= 5
> And 41 is greater than 5, so it doesn't build on SL 4, because it's wanting 
> everything that is in SL5.

Quite right.  The old code was my fault anyway...

> OK, one other change, but this is very minor.  For the distro is has SL in 
> capitol letters, while RedHat and Centos are in lower case letters (rh, 
> centos).
> This is a personal thing, but I like it better in lower case letters.
> Like I said, this change is minor and purely a personal preference, but if 
> you want it in capitol letters, leave it.

Changed (I use sl5x as my default disttag).  I can't remember why SL was 
put in here.

I also spotted that I'd left in a hack:

  Release: %{REL}.%{DISTTAG}%{VER}{%?EXTRAREL}

from when I was trying something silly earlier, and that actually despite 
the entries in %changelog the epoch in 
http://cran.r-project.org/bin/linux/redhat/SRPMS/R.spec was already set to 
'2'.  I've no idea how I managed to set it to '1' in my build attempts 
earlier.

I've removed some (of my) stupidity from the %changelog and attach the 
diff -bu against http://cran.r-project.org/bin/linux/redhat/SRPMS/R.spec

I'm rebuilding it again at the moment.

> Thank you for your work on this.

This is nothing compared to our debts to you.

  -- Jon