Bug 178211

Summary: rpm does not recognise dothan as pentium3
Product: [Fedora] Fedora Reporter: Olivier Lahaye <aol002>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideKeywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-20 19:52:54 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 Olivier Lahaye 2006-01-18 16:52:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.2 (like Gecko)

Description of problem:
rpm does not recognize centrino dothan (family6,model13) as pentium3 cpu while  
centrino banias (family6,model9) is.  
  
Newer centrino cpu (family15,model 3 and 4) should be seen as pentium4 (not  
sure)  
  
in rpm sources lib/rpmrc.c, in the function is_pentium3()  
case 9: // Pentium M  
should be replaced by  
case 9: // Pentium M - Banias  
and a new line should be added  
case 13: // Pentium M - Dothan and Sonoma 
  
for newer centrino cpu (Yonah): don't know. 
 
http://hackers.progeny.com/~darrint/rpm-4.4/apidocs/html/rpmrc_8c-source.html 
(around line 1044) 
  

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

How reproducible:
Always

Steps to Reproduce:
1. Create a .pentium3.rpm on a centrino Banias (cpu family 6 model 9) 
2. try to install it on a centrino Dothan (cpu family 6 model 13) 
   

Actual Results:  Error message stating that this rpm is not for the current architecture  

Expected Results:  The rpm would have been installed  

Additional info:

Comment 1 Olivier Lahaye 2006-01-18 17:04:03 UTC
Don't have acces to CVS from my company so I cannot retrieve the latest RPM     
source code and create a patch file.     
ftp://jbj.org/pub/ seems down too.     
     
But this fix should be very easy to do anyway ;-)    
vi rpmrc.c 
:1044 
... 

Comment 2 Jeff Johnson 2006-01-19 21:31:21 UTC
What is in /etc/rpm/platform?

Put "pentium3-vendor-linux" there, create the file if it does not exist.


Comment 3 Olivier Lahaye 2006-01-20 09:00:15 UTC
Thank you very much, it works fine :-)  
The /etc/rpm/platform was empty. I filled it up as  
pentium3-fedora-Linux.  
  
Would be cool to have rpm recognize all gcc arch. Thus, optimized packages  
could be created according to arch (example: atlas, ...)  
  
thanks a lot for your help.  
Best regards.  

Comment 4 Jeff Johnson 2006-01-20 19:52:54 UTC
arch is the wrong name space for packaging, and the voo-doo assembly language is the wrong 
implementation. E.g. a new chip breaks every version of rpm installed everywhere.

WONTFIX in the sense above, use /etc/rpm/platform to set your arch, and (in rpm-4.4.4 and later)
use the cpuinfo dependency name space to add precise dependencies on specific cpu's

(Note: rpmlib parses /proc/cpuinfo and presents run-time Provides: for the values found within.
Display the cpuinfo() provides with rpm -v --showrc).

Comment 5 Olivier Lahaye 2006-02-01 09:50:15 UTC
Ok, so IMHO in lib/rpmrc.c you should remove the is_pentium3() function as it   
is half coded.    
Either recogninze all centrino or recognize none. Make a choice as right now,     
half of centrinos CPU are recognized (model 9) as pentium3 and others are    
recongnized as i686 (model 13) which is no coherent.  
 
Regarding cpuinfo, it's IMHO good to use informations from the system instad 
of having it's own detection routines. The only problem is that there is no 
naming convention regarding CPU in /rpoc/cpuinfo. 
example: cpu 6 model 9:  Intel(R) Pentium(R) M processor 1600MHz 
         cpu 6 model 13: Intel(R) Pentium(R) M processor 1.60GHz 
 
Anyway, I'm happy as I have a working solution :-)