Bug 235922

Summary: Does not recognize "Fedora release" as Fedora
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: cfengineAssignee: Jeff Sheltren <sheltren>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.1.22-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-13 13:13:33 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 Orion Poplawski 2007-04-10 20:00:25 UTC
Description of problem:

This should fix (untested):

--- ./src/misc.c.fedora 2007-01-04 04:05:05.000000000 -0700
+++ ./src/misc.c        2007-04-10 13:59:34.000000000 -0600
@@ -540,13 +540,13 @@

 int linux_fedora_version(void)
 {
-#define FEDORA_ID "Fedora Core"
+#define FEDORA_ID "Fedora"

 #define RELEASE_FLAG "release "

 /* We are looking for one of the following strings...
  *
- * Fedora Core release 1 (Yarrow)
+ * Fedora release 6.92 (Rawhide)
  */

 #define FEDORA_REL_FILENAME "/etc/fedora-release"
@@ -573,7 +573,7 @@
  fgets(relstring, sizeof(relstring), fp);
  fclose(fp);

- Verbose("Looking for fedora core linux info...\n");
+ Verbose("Looking for fedora linux info...\n");

  /* First, try to grok the vendor */
  if(!strncmp(relstring, FEDORA_ID, strlen(FEDORA_ID)))
@@ -629,7 +629,7 @@
 #define REDHAT_WS_ID "Red Hat Enterprise Linux WS"
 #define MANDRAKE_ID "Linux Mandrake"
 #define MANDRAKE_10_1_ID "Mandrakelinux"
-#define FEDORA_ID "Fedora Core"
+#define FEDORA_ID "Fedora"
 #define WHITEBOX_ID "White Box Enterprise Linux"
 #define CENTOS_ID "CentOS"
 #define SCIENTIFIC_SL_ID "Scientific Linux SL"
@@ -645,6 +645,7 @@
  * Linux Mandrake release 7.1 (helium)
  * Red Hat Enterprise Linux ES release 2.1 (Panama)
  * Fedora Core release 1 (Yarrow)
+ * Fedora release 6.92 (Rawhide)
  * White Box Enterprise linux release 3.0 (Liberation)
  * Scientific Linux SL Release 4.0 (Beryllium)
  * CentOS release 4.0 (Final)

Comment 1 Jeff Sheltren 2007-04-11 14:12:25 UTC
Hi Orion, thanks for the report.  I've been meaning to patch this and somehow
forgot all about it.  It looks like there's a patch for this already in upstream
svn, so I'm going to try using that so that we're more in-sync with the upstream
code for future updates.

Comment 2 Jeff Sheltren 2007-04-13 13:13:33 UTC
Just built for rawhide.