[libvirt] [osinfo PATCH 1/8] Add #include <string.h> for strcmp

--- tools/osinfo-detect.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c index 6afa30a..be36afb 100644 --- a/tools/osinfo-detect.c +++ b/tools/osinfo-detect.c @@ -23,6 +23,7 @@ */ #include <osinfo/osinfo.h> +#include <string.h> #define FORMAT_STR_PLAIN "plain" #define FORMAT_STR_ENV "env" -- 1.7.7.1

--- data/oses/Makefile.am | 1 + data/oses/opensuse.xml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 data/oses/opensuse.xml diff --git a/data/oses/Makefile.am b/data/oses/Makefile.am index 2ee9cee..30168d5 100644 --- a/data/oses/Makefile.am +++ b/data/oses/Makefile.am @@ -4,6 +4,7 @@ database_DATA = \ fedora.xml \ rhel.xml \ centos.xml \ + opensuse.xml \ suse.xml \ mandriva.xml \ debian.xml \ diff --git a/data/oses/opensuse.xml b/data/oses/opensuse.xml new file mode 100644 index 0000000..ffbe4cd --- /dev/null +++ b/data/oses/opensuse.xml @@ -0,0 +1,35 @@ +<libosinfo version="0.0.1"> + + <os id="http://opensuse.org/linux/11.4"> + <short-id>opensuse114</short-id> + <name>openSUSE 11.4</name> + <version>11.4</version> + <vendor>openSUSE</vendor> + <family>Linux</family> + + <media arch="i386"> + <url>http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-i586.iso</url> + <iso> + <volume-id>openSUSE-DVD-i586-Build0024</volume-id> + <system-id>LINUX</system-id> + </iso> + + </media> + <media arch="x86_64"> + <url>http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-x86_64.iso</url> + <iso> + <volume-id>openSUSE-DVD-x86_640024</volume-id> + <system-id>LINUX</system-id> + </iso> + </media> + </os> + + <os id="http://opensuse.org/linux/12.1"> + <short-id>opensuse121</short-id> + <name>openSUSE 12.1</name> + <version>12.1</version> + <vendor>openSUSE</vendor> + <family>Linux</family> + </os> + +</libosinfo> -- 1.7.7.1

There was a typo. --- data/oses/rhel.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/data/oses/rhel.xml b/data/oses/rhel.xml index 6ad634d..c6eeaab 100644 --- a/data/oses/rhel.xml +++ b/data/oses/rhel.xml @@ -62,7 +62,7 @@ <os id="http://redhat.com/rhel/5.4"> <short-id>rhel-5.4</short-id> <name>Red Hat Enterprise Linux 5.4</name> - <version>5.6</version> + <version>5.4</version> <vendor>Red Hat, Inc</vendor> <family>Linux</family> -- 1.7.7.1

The VolumeID for RHEL 5.x was RHEL/5.x, it was changed to RHEL_6.x for RHEL6. I checked this with ISOs straight from RHN. --- data/oses/rhel.xml | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/oses/rhel.xml b/data/oses/rhel.xml index c6eeaab..e6c9d1e 100644 --- a/data/oses/rhel.xml +++ b/data/oses/rhel.xml @@ -69,13 +69,13 @@ <media arch="i386"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_5.4 i386.*</volume-id> + <volume-id>.*RHEL/5.4 i386.*</volume-id> </iso> </media> <media arch="x86_64"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_5.4 x86_64.*</volume-id> + <volume-id>.*RHEL/5.4 x86_64.*</volume-id> </iso> </media> </os> @@ -95,13 +95,13 @@ <media arch="i386"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_5.6 i386.*</volume-id> + <volume-id>.*RHEL/5.6 i386.*</volume-id> </iso> </media> <media arch="x86_64"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_5.6 x86_64.*</volume-id> + <volume-id>.*RHEL/5.6 x86_64.*</volume-id> </iso> </media> </os> @@ -117,13 +117,13 @@ <media arch="i386"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_5.7 i386.*</volume-id> + <volume-id>.*RHEL/5.7 i386.*</volume-id> </iso> </media> <media arch="x86_64"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_5.7 x86_64.*</volume-id> + <volume-id>.*RHEL/5.7 x86_64.*</volume-id> </iso> </media> </os> -- 1.7.7.1

The VolumeID for RHEL 4.x was RHEL/4-Ux, it was changed to RHEL_6.x for RHEL6. I checked this with ISOs straight from RHN. --- data/oses/rhel.xml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/oses/rhel.xml b/data/oses/rhel.xml index e6c9d1e..ac6149b 100644 --- a/data/oses/rhel.xml +++ b/data/oses/rhel.xml @@ -26,13 +26,13 @@ <media arch="i386"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_4.8 i386.*</volume-id> + <volume-id>.*RHEL/4-U8 i386.*</volume-id> </iso> </media> <media arch="x86_64"> <iso> <system-id>LINUX</system-id> - <volume-id>.*RHEL_4.8 x86_64.*</volume-id> + <volume-id>.*RHEL/4-U8 x86_64.*</volume-id> </iso> </media> </os> -- 1.7.7.1

Note that due to a bug in libosinfo, the detection of 11.10 won't work. The 11.10 isos don't have a system id nor a publisher id, so they end up as NULL in the parsed database, but they are a string of N consecutive space when read from the iso. This prevents the match from working. --- data/oses/ubuntu.xml | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/data/oses/ubuntu.xml b/data/oses/ubuntu.xml index 284c38e..86cf559 100644 --- a/data/oses/ubuntu.xml +++ b/data/oses/ubuntu.xml @@ -68,6 +68,19 @@ <vendor>Canonical</vendor> <family>Linux</family> <upgrades id="http://ubuntu.com/maverick"/> + + <media arch="i386"> + <iso> + <volume-id>.*Ubuntu.* 11.04 i386.*</volume-id> + <system-id>LINUX</system-id> + </iso> + </media> + <media arch="x86_64"> + <iso> + <volume-id>Ubuntu.* 11.04 amd64.*</volume-id> + <system-id>LINUX</system-id> + </iso> + </media> </os> <os id="http://ubuntu.com/oneiric"> @@ -77,6 +90,17 @@ <vendor>Canonical</vendor> <family>Linux</family> <upgrades id="http://ubuntu.com/natty"/> + + <media arch="i386"> + <iso> + <volume-id>.*Ubuntu.* 11.10 i386.*</volume-id> + </iso> + </media> + <media arch="x86_64"> + <iso> + <volume-id>.*Ubuntu.* 11.10 amd64.*</volume-id> + </iso> + </media> </os> </libosinfo> -- 1.7.7.1

There were a few copy and paste typos --- data/oses/centos.xml | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/oses/centos.xml b/data/oses/centos.xml index 96c7442..9c2e647 100644 --- a/data/oses/centos.xml +++ b/data/oses/centos.xml @@ -9,14 +9,14 @@ <clones id="http://redhat.com/rhel/6.0"/> </os> - <os id="http://redhat.com/rhel-6.1"> + <os id="http://centos.org/centos/6.1"> <short-id>centos-6.1</short-id> <name>CentOS 6.1</name> <version>6.1</version> <vendor>CentOS</vendor> <family>Linux</family> <upgrades id="http://centos.org/centos/6.0"/> - <clones id="http://redhat.com/rhel/6.0"/> + <clones id="http://redhat.com/rhel/6.1"/> </os> </libosinfo> -- 1.7.7.1

It doesn't seem to be possible to make the difference between a 32 or 64 bit CentOS iso just by looking at its headers so the iso type guessing will need to be improved --- data/oses/centos.xml | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/data/oses/centos.xml b/data/oses/centos.xml index 9c2e647..452c53e 100644 --- a/data/oses/centos.xml +++ b/data/oses/centos.xml @@ -7,6 +7,21 @@ <vendor>CentOS</vendor> <family>Linux</family> <clones id="http://redhat.com/rhel/6.0"/> + + <!-- there is no obvious difference between x86 and x86_64 isos, + maybe we can lookup files on the iso to decide which arch it is? --> + <media arch="i386"> + <iso> + <system-id>LINUX</system-id> + <volume-id>CentOS_6.0_Final</volume-id> + </iso> + </media> + <media arch="x86_64"> + <iso> + <system-id>LINUX</system-id> + <volume-id>CentOS_6.0_Final</volume-id> + </iso> + </media> </os> <os id="http://centos.org/centos/6.1"> -- 1.7.7.1

[adding virt-tools-list] On 11/18/2011 11:04 AM, Christophe Fergeau wrote:
--- tools/osinfo-detect.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c index 6afa30a..be36afb 100644 --- a/tools/osinfo-detect.c +++ b/tools/osinfo-detect.c @@ -23,6 +23,7 @@ */
#include <osinfo/osinfo.h> +#include <string.h>
I've typically seen libosinfo patches sent to virt-tools-list@redhat.com. However, I just glanced through README in libosinfo.git and didn't see any mention of the preferred address for patch submission, nor mention of a project web page. Those would be some useful patches, to help steer further patches to the best list. As to patch 1/8, it's trivial enough that I can ACK, even if I haven't done anything else with libosinfo myself (I'll leave others to review the rest of the series). -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Nov 18, 2011 at 11:26:21AM -0700, Eric Blake wrote:
I've typically seen libosinfo patches sent to virt-tools-list@redhat.com. However, I just glanced through README in libosinfo.git and didn't see any mention of the preferred address for patch submission, nor mention of a project web page. Those would be some useful patches, to help steer further patches to the best list.
Oh right, I sent the patches here because there were some osinfo patches from Zeeshan on this list. Now I remember he was told that virt-tools-list is a better destination for such patches. Sorry for the noise, and thanks for the pointer! Christophe

On Fri, Nov 18, 2011 at 11:26:21AM -0700, Eric Blake wrote:
[adding virt-tools-list]
On 11/18/2011 11:04 AM, Christophe Fergeau wrote:
--- tools/osinfo-detect.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c index 6afa30a..be36afb 100644 --- a/tools/osinfo-detect.c +++ b/tools/osinfo-detect.c @@ -23,6 +23,7 @@ */
#include <osinfo/osinfo.h> +#include <string.h>
I've typically seen libosinfo patches sent to virt-tools-list@redhat.com. However, I just glanced through README in libosinfo.git and didn't see any mention of the preferred address for patch submission, nor mention of a project web page. Those would be some useful patches, to help steer further patches to the best list.
I'll change the README for that.
As to patch 1/8, it's trivial enough that I can ACK, even if I haven't done anything else with libosinfo myself (I'll leave others to review the rest of the series).
ACK to all the other patches too Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Christophe Fergeau
-
Daniel P. Berrange
-
Eric Blake