Bug 503108

Summary: R2spec-2.5.2 loses Version information
Product: [Fedora] Fedora Reporter: R P Herrold <herrold>
Component: R2specAssignee: Pierre-YvesChibon <pingou>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: pingou
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://cran.at.r-project.org/src/contrib/chron_2.3-30.tar.gz
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-04 08:29:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description R P Herrold 2009-05-28 22:08:56 UTC
Description of problem:

Sadly, it appears that R2spec is silently losing version information.

Version-Release number of selected component (if applicable):

R2spec-2.5.2

How reproducible:

$ R2spec --cran -u http://cran.at.r-project.org/src/contrib/chron_2.3-30.tar.gz

Steps to Reproduce:

reviewing the spec file it yields, the '-30' information is lost
 
%define packname  chron

Name:             R-%{packname}
Version:          2.3
Release:          1%{?dist}
Summary:          Chronological objects which can handle dates and times

Group:            Applications/Engineering
License:          GPL-2
URL:              http://cran.r-project.org/web/packages/chron/index.html
Source0:          http://cran.at.r-project.org/src/contrib/chron_2.3-30.tar.gz
 ...

Actual results:

I think probably I expected two things:

1.  not to lose information
2.  some reasonable 'flattening' similar to:

Version: 2.3-30  =>  2.3_30

Expected results:

As above ... I am sorry to expose this, as I have packaged a lot of files without noticing it, and I need to audit and fix them  ;)
Additional info:

Comment 1 Pierre-YvesChibon 2009-05-29 05:56:04 UTC
To me this sounds like not a bug, but I've asked the question on the fedora-r-devel mailing list:
https://www.redhat.com/archives/fedora-r-devel-list/2009-May/msg00000.html

and I am open for discussion :)

Comment 2 R P Herrold 2009-05-29 16:26:42 UTC
Reading further in an example as to how Red Hat's internal release engineering does its packaging, I find (unhappily):


%define packname DBI
%define packrel 4

Name:             R-%{packname}
Version:          0.2
Release:          3%{?dist}
Source0:          ftp://cran.r-project.org/pub/R/contrib/main/%{packname}_%{version}-%{packrel}.tar.gz
License:          LGPLv2+
URL:              http://cran.r-project.org/web/packages/DBI/index.html
Group:            Applications/Engineering
Summary:          Database interface module for R

------------------

I think their  use of the '%packrel' construct into the Release space represents an error in approach [it also conceals the upstream version information, which version information sadly contains the '-'].

This is because mis-packagings cannot be 'corrected' by bumping the Release tag, and issuing a new offering, which RPM using perhaps YUM, can use the customary RPMVERCMP rules to drop in a replacement.

A workaround may be to add the 'local packagers' release AFTER a separator in the '${dist}' tag ... something like this:

Release:          ${packrel}%{?dist}.%{localrel}

This may require putting forward a proposed R packager's standard for Fedora, to merge your approach in R2spec, and Red Hat release engineering's differing approaches.

-- Russ herrold

Comment 3 Pierre-YvesChibon 2009-06-03 11:14:09 UTC
I think this issue should be brought to the fedora-devel list for further discussion.

Could you start the discussion there ?

Comment 4 R P Herrold 2009-06-03 14:01:44 UTC
I wanted to complete my packaging run in cran toward a few targets I mentioned in my blog a while back first, to get 'seasoned' on where the remaining issues in packaging in that archive were.

I also have a 'circular dependencies' solution method, to outline as well; and an automated 'prospector' like builder to handle version bumps in R automatically in process.

I will perhaps add it there, or simply send you patches to implement my variant of 'Version:' mungeing with a command line switch;  the circular dependencies solution also will be submitted with a different command line switch

Curiously, the 'doc' directory, and the NEWS file are very often missing in CRAN packages, and I would default R2spec to omit including these by default.

Let me do some more development first, before floating this upstream, to make sure I understand where most of the the problems are. ;)

-- Russ herrold

Comment 5 Pierre-YvesChibon 2009-06-04 08:29:56 UTC
Base on the discussion on Fedora-r-devel we decided that for the R package any '-' in the version can be replace to '.'

R2spec therefore now replaces the '-' to '.'