fef13e
From b29c83584843a1e4081efa8369c66ded142869eb Mon Sep 17 00:00:00 2001
fef13e
From: Cole Robinson <crobinso@redhat.com>
fef13e
Date: Sun, 21 Sep 2014 15:41:51 -0400
fef13e
Subject: [PATCH] fedora: Add F21 info
fef13e
fef13e
This is a squash of 4 patches from upstream:
fef13e
fef13e
-----------
fef13e
oses: Add Fedora21
fef13e
fef13e
This just adds a plain Fedora21 entry. F21 is going to have different
fef13e
versions like 'Workstation' and 'Server' but we don't seem to distinguish
fef13e
for other distros so I just stuck with the pattern here.
fef13e
fef13e
This currently doesn't work for detecting Workstation media, since their
fef13e
volume IDs are truncated. Bug tracking that:
fef13e
fef13e
https://bugzilla.redhat.com/show_bug.cgi?id=1145264
fef13e
fef13e
-----------
fef13e
fedora: Mark F21 as released
fef13e
fef13e
F21 was release on Dec 3, 2014. Add release date for F21 and update
fef13e
release status.
fef13e
fef13e
-----------
fef13e
schema: Allow variants for install trees
fef13e
fef13e
Allow install trees to be associated with specific variants of the OS.
fef13e
fef13e
-----------
fef13e
fedora: Add/update media & tree info for F21
fef13e
fef13e
Fedora now has variants and simply updating the ISO URLs is not a good
fef13e
way forward. This patch adds information about media/tree of each
fef13e
variant seperately.
fef13e
fef13e
Unfortunately, there is no installer media for Workstation variant and
fef13e
even though Server netiso is actually generic enough to let user install
fef13e
Workstation as well, both netiso and full installer ISO have the exact
fef13e
same volume-id so we can't simply assign netiso a (fake) generic variant
fef13e
and be done with it. :( For more details:
fef13e
fef13e
https://bugzilla.redhat.com/show_bug.cgi?id=1178787
fef13e
fef13e
-----------
fef13e
Allow tree/media elements in any order
fef13e
fef13e
Put all child elements for <tree> and <media> inside an
fef13e
<interleave> to allow them to appear in any order
fef13e
---
fef13e
 data/oses/fedora.xml.in                            | 168 ++++++++++++++++++++-
fef13e
 data/schemas/libosinfo.rng                         |  50 +++---
fef13e
 .../Fedora-Server-DVD-x86_64-21_Alpha_TC7.iso.txt  |  29 ++++
fef13e
 3 files changed, 221 insertions(+), 26 deletions(-)
fef13e
 create mode 100644 test/isodata/fedora/fedora21/Fedora-Server-DVD-x86_64-21_Alpha_TC7.iso.txt
fef13e
fef13e
diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in
fef13e
index 27cdd4a..0c01ab9 100644
fef13e
--- a/data/oses/fedora.xml.in
fef13e
+++ b/data/oses/fedora.xml.in
fef13e
@@ -1533,6 +1533,161 @@
fef13e
     </installer>
fef13e
   </os>
fef13e
 
fef13e
+  <os id="http://fedoraproject.org/fedora/21">
fef13e
+    <short-id>fedora21</short-id>
fef13e
+    <_name>Fedora 21</_name>
fef13e
+    <version>21</version>
fef13e
+    <_vendor>Fedora Project</_vendor>
fef13e
+    <family>linux</family>
fef13e
+    <distro>fedora</distro>
fef13e
+    <upgrades id="http://fedoraproject.org/fedora/20"/>
fef13e
+    <derives-from id="http://fedoraproject.org/fedora/20"/>
fef13e
+
fef13e
+    <release-date>2014-12-03</release-date>
fef13e
+
fef13e
+    <variant id="workstation">
fef13e
+      <_name>Fedora 21 Workstation</_name>
fef13e
+    </variant>
fef13e
+    <variant id="server">
fef13e
+      <_name>Fedora 21 Server</_name>
fef13e
+    </variant>
fef13e
+    <variant id="cloud">
fef13e
+      <_name>Fedora 21 Cloud</_name>
fef13e
+    </variant>
fef13e
+
fef13e
+    
fef13e
+
fef13e
+    
fef13e
+               netiso is actually generic enough to let user install
fef13e
+               Workstation as well, both netiso and full installer ISO have the
fef13e
+               exact same volume-id so we can't simply assign netiso a (fake)
fef13e
+               generic variant and be done with it. :( For more details:
fef13e
+
fef13e
+              https://bugzilla.redhat.com/show_bug.cgi?id=1178787
fef13e
+    !-->
fef13e
+
fef13e
+    <media arch="i686" live="true">
fef13e
+      <variant id="workstation"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Workstation/i386/iso/Fedora-Live-Workstation-i686-21-5.iso</url>
fef13e
+      <iso>
fef13e
+        <volume-id>Fedora-Live-WS-i686-21.*</volume-id>
fef13e
+        <system-id>LINUX</system-id>
fef13e
+      </iso>
fef13e
+      <kernel>isolinux/vmlinuz0</kernel>
fef13e
+      <initrd>isolinux/initrd0.img</initrd>
fef13e
+    </media>
fef13e
+    <media arch="x86_64" live="true">
fef13e
+      <variant id="workstation"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Workstation/x86_64/iso/Fedora-Live-Workstation-x86_64-21-5.iso</url>
fef13e
+      <iso>
fef13e
+        <volume-id>Fedora-Live-WS-x86_64-21.*</volume-id>
fef13e
+        <system-id>LINUX</system-id>
fef13e
+      </iso>
fef13e
+      <kernel>isolinux/vmlinuz0</kernel>
fef13e
+      <initrd>isolinux/initrd0.img</initrd>
fef13e
+    </media>
fef13e
+
fef13e
+    
fef13e
+
fef13e
+    <media arch="i686">
fef13e
+      <variant id="server"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/i386/iso/Fedora-Server-DVD-i386-21.iso</url>
fef13e
+      <iso>
fef13e
+        <volume-id>Fedora-S.*21.*-i386</volume-id>
fef13e
+        <system-id>LINUX</system-id>
fef13e
+      </iso>
fef13e
+      <kernel>isolinux/vmlinuz</kernel>
fef13e
+      <initrd>isolinux/initrd.img</initrd>
fef13e
+    </media>
fef13e
+    <media arch="x86_64">
fef13e
+      <variant id="server"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/x86_64/iso/Fedora-Server-DVD-x86_64-21.iso</url>
fef13e
+      <iso>
fef13e
+        <volume-id>Fedora-S.*-21.*-x86_64</volume-id>
fef13e
+        <system-id>LINUX</system-id>
fef13e
+      </iso>
fef13e
+      <kernel>isolinux/vmlinuz</kernel>
fef13e
+      <initrd>isolinux/initrd.img</initrd>
fef13e
+    </media>
fef13e
+
fef13e
+    <tree arch="i686">
fef13e
+      <variant id="server"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/i386/os/</url>
fef13e
+      <treeinfo>
fef13e
+        <family>Fedora</family>
fef13e
+        <version>21</version>
fef13e
+        <arch>i386</arch>
fef13e
+      </treeinfo>
fef13e
+    </tree>
fef13e
+    <tree arch="x86_64">
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/x86_64/os/</url>
fef13e
+      <variant id="server"/>
fef13e
+      <treeinfo>
fef13e
+        <family>Fedora</family>
fef13e
+        <version>21</version>
fef13e
+        <arch>x86_64</arch>
fef13e
+      </treeinfo>
fef13e
+    </tree>
fef13e
+
fef13e
+    
fef13e
+
fef13e
+    <media arch="i686">
fef13e
+      <variant id="cloud"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/i386/iso/Fedora-Cloud-netinst-i386-21.iso</url>
fef13e
+      <iso>
fef13e
+        <volume-id>Fedora-C.*21.*-i386</volume-id>
fef13e
+        <system-id>LINUX</system-id>
fef13e
+      </iso>
fef13e
+      <kernel>isolinux/vmlinuz</kernel>
fef13e
+      <initrd>isolinux/initrd.img</initrd>
fef13e
+    </media>
fef13e
+    <media arch="x86_64">
fef13e
+      <variant id="cloud"/>
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/x86_64/iso/Fedora-Cloud-netinst-x86_64-21.iso</url>
fef13e
+      <iso>
fef13e
+        <volume-id>Fedora-C.*-21.*-x86_64</volume-id>
fef13e
+        <system-id>LINUX</system-id>
fef13e
+      </iso>
fef13e
+      <kernel>isolinux/vmlinuz</kernel>
fef13e
+      <initrd>isolinux/initrd.img</initrd>
fef13e
+    </media>
fef13e
+
fef13e
+    <tree arch="i686">
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/i386/os/</url>
fef13e
+      <variant id="cloud"/>
fef13e
+      <treeinfo>
fef13e
+        <family>Fedora</family>
fef13e
+        <version>21</version>
fef13e
+        <arch>i386</arch>
fef13e
+      </treeinfo>
fef13e
+    </tree>
fef13e
+    <tree arch="x86_64">
fef13e
+      <url>http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/x86_64/os/</url>
fef13e
+      <variant id="cloud"/>
fef13e
+      <treeinfo>
fef13e
+        <family>Fedora</family>
fef13e
+        <version>21</version>
fef13e
+        <arch>x86_64</arch>
fef13e
+      </treeinfo>
fef13e
+    </tree>
fef13e
+
fef13e
+    <resources arch="all">
fef13e
+      <minimum>
fef13e
+        <n-cpus>1</n-cpus>
fef13e
+        <cpu>1000000000</cpu>
fef13e
+        <ram>1073741824</ram>
fef13e
+        <storage>10737418240</storage>
fef13e
+      </minimum>
fef13e
+    </resources>
fef13e
+
fef13e
+    
fef13e
+    
fef13e
+      <script id='http://fedoraproject.org/scripts/fedora/jeos'/>
fef13e
+      <script id='http://fedoraproject.org/scripts/fedora/desktop'/>
fef13e
+    </installer>-->
fef13e
+  </os>
fef13e
+
fef13e
+
fef13e
   
fef13e
        'derives-from', 'volume-id' and 'resources' nodes accordingly each time
fef13e
        you add a new (specific) entry for a new release. -->
fef13e
@@ -1543,19 +1698,19 @@
fef13e
     <_vendor>Fedora Project</_vendor>
fef13e
     <family>linux</family>
fef13e
     <distro>fedora</distro>
fef13e
-    <upgrades id="http://fedoraproject.org/fedora/20"/>
fef13e
-    <derives-from id="http://fedoraproject.org/fedora/20"/>
fef13e
+    <upgrades id="http://fedoraproject.org/fedora/21"/>
fef13e
+    <derives-from id="http://fedoraproject.org/fedora/21"/>
fef13e
     <release-status>prerelease</release-status>
fef13e
 
fef13e
     <media arch="i686">
fef13e
       <iso>
fef13e
-        <volume-id>Fedora ([2-9][1-9]|[0-9]{3,}).* i386</volume-id>
fef13e
+        <volume-id>Fedora.*-([2-9][1-9]|[0-9]{3,}).*-i386</volume-id>
fef13e
         <system-id>LINUX</system-id>
fef13e
       </iso>
fef13e
     </media>
fef13e
     <media arch="x86_64">
fef13e
       <iso>
fef13e
-        <volume-id>Fedora ([2-9][1-9]|[0-9]{3,}).* x86_64</volume-id>
fef13e
+        <volume-id>Fedora.*-([2-9][1-9]|[0-9]{3,}).*-x86_64</volume-id>
fef13e
         <system-id>LINUX</system-id>
fef13e
       </iso>
fef13e
       <kernel>isolinux/vmlinuz</kernel>
fef13e
@@ -1584,4 +1739,9 @@
fef13e
       </minimum>
fef13e
     </resources>
fef13e
   </os>
fef13e
+
fef13e
+  
fef13e
+       And if adding a new entry, make sure to update fedora-unknown as
fef13e
+       mentioned in the comment above. -->
fef13e
+
fef13e
 </libosinfo>
fef13e
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
fef13e
index e693674..1580d9a 100644
fef13e
--- a/data/schemas/libosinfo.rng
fef13e
+++ b/data/schemas/libosinfo.rng
fef13e
@@ -337,22 +337,22 @@
fef13e
           <ref name='num'/>
fef13e
         </attribute>
fef13e
       </optional>
fef13e
-      <optional>
fef13e
-        <element name='variant'>
fef13e
-          <attribute name='id'>
fef13e
-          </attribute>
fef13e
-        </element>
fef13e
-      </optional>
fef13e
-      <optional>
fef13e
-        <element name='url'>
fef13e
-          <ref name='url'/>
fef13e
-        </element>
fef13e
-      </optional>
fef13e
-      <optional>
fef13e
-        <ref name='iso'/>
fef13e
-      </optional>
fef13e
       <interleave>
fef13e
         <optional>
fef13e
+          <element name='variant'>
fef13e
+            <attribute name='id'>
fef13e
+            </attribute>
fef13e
+          </element>
fef13e
+        </optional>
fef13e
+        <optional>
fef13e
+          <element name='url'>
fef13e
+            <ref name='url'/>
fef13e
+          </element>
fef13e
+        </optional>
fef13e
+        <optional>
fef13e
+          <ref name='iso'/>
fef13e
+        </optional>
fef13e
+        <optional>
fef13e
           <element name='initrd'>
fef13e
             <text/>
fef13e
           </element>
fef13e
@@ -414,16 +414,22 @@
fef13e
       <attribute name='arch'>
fef13e
         <ref name='archnames'/>
fef13e
       </attribute>
fef13e
-      <optional>
fef13e
-        <element name='url'>
fef13e
-          <ref name='url'/>
fef13e
-        </element>
fef13e
-      </optional>
fef13e
-      <optional>
fef13e
-        <ref name='treeinfo'/>
fef13e
-      </optional>
fef13e
       <interleave>
fef13e
         <optional>
fef13e
+          <element name='variant'>
fef13e
+            <attribute name='id'>
fef13e
+            </attribute>
fef13e
+          </element>
fef13e
+        </optional>
fef13e
+        <optional>
fef13e
+          <element name='url'>
fef13e
+            <ref name='url'/>
fef13e
+          </element>
fef13e
+        </optional>
fef13e
+        <optional>
fef13e
+          <ref name='treeinfo'/>
fef13e
+        </optional>
fef13e
+        <optional>
fef13e
           <element name='initrd'>
fef13e
             <text/>
fef13e
           </element>
fef13e
diff --git a/test/isodata/fedora/fedora21/Fedora-Server-DVD-x86_64-21_Alpha_TC7.iso.txt b/test/isodata/fedora/fedora21/Fedora-Server-DVD-x86_64-21_Alpha_TC7.iso.txt
fef13e
new file mode 100644
fef13e
index 0000000..f4e9436
fef13e
--- /dev/null
fef13e
+++ b/test/isodata/fedora/fedora21/Fedora-Server-DVD-x86_64-21_Alpha_TC7.iso.txt
fef13e
@@ -0,0 +1,29 @@
fef13e
+CD-ROM is in ISO 9660 format
fef13e
+System id: LINUX
fef13e
+Volume id: Fedora-S-21_A_T7-x86_64
fef13e
+Volume set id: 
fef13e
+Publisher id: 
fef13e
+Data preparer id: 
fef13e
+Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM
fef13e
+Copyright File id: 
fef13e
+Abstract File id: 
fef13e
+Bibliographic File id: 
fef13e
+Volume set size is: 1
fef13e
+Volume set sequence number is: 1
fef13e
+Logical block size is: 2048
fef13e
+Volume size is: 979923
fef13e
+El Torito VD version 1 found, boot catalog is in sector 439
fef13e
+Joliet with UCS level 3 found
fef13e
+Rock Ridge signatures version 1 found
fef13e
+Eltorito validation header:
fef13e
+    Hid 1
fef13e
+    Arch 0 (x86)
fef13e
+    ID ''
fef13e
+    Key 55 AA
fef13e
+    Eltorito defaultboot header:
fef13e
+        Bootid 88 (bootable)
fef13e
+        Boot media 0 (No Emulation Boot)
fef13e
+        Load segment 0
fef13e
+        Sys type 0
fef13e
+        Nsect 4
fef13e
+        Bootoff 1B8 440
fef13e
-- 
fef13e
2.1.0
fef13e