From crobinso at redhat.com Fri May 1 22:37:36 2015 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 01 May 2015 18:37:36 -0400 Subject: [Libosinfo] New virtio-win repo and isos Message-ID: <55440030.4060804@redhat.com> Hey all, Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are still available for direct download, just at a different URL. All the details are here: https://fedoraproject.org/wiki/Windows_Virtio_Drivers FWIW the rpm and iso now match the layout of what we ship with RHEL, and match the content (except still no WHQL signature). Not sure how interesting it is to libosinfo/boxes in its current form. But it's a fresh base to start from if you have any ideas or suggestions about how to improve things in this area. The most obvious bit is keying in spice-guest-tools to this. Is spice-guest-tools buildable with mingw? Generating a new spice-guest-tools with every virtio-win build would be pretty cool - Cole From zeeshanak at gnome.org Tue May 5 12:12:41 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 5 May 2015 13:12:41 +0100 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: <55440030.4060804@redhat.com> References: <55440030.4060804@redhat.com> Message-ID: On Fri, May 1, 2015 at 11:37 PM, Cole Robinson wrote: > Hey all, Hi Cole, > Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are > still available for direct download, just at a different URL. All the details > are here: > > https://fedoraproject.org/wiki/Windows_Virtio_Drivers > > FWIW the rpm and iso now match the layout of what we ship with RHEL, and match > the content (except still no WHQL signature). Thats really awesome. Thanks for working on this. > Not sure how interesting it is to libosinfo/boxes in its current form. > But > it's a fresh base to start from if you have any ideas or suggestions about how > to improve things in this area. Well it would be really good to have all drivers files available in unpacked form at a canonical location (than zeenix.fedorapeople.org). If you could make that happen, that would be very helpful. Currently I manually unpack the latest ISO and upload the driver files to my personal webspace and then update the libosinfo db. So a lot of manual work and I tend to forget about such tasks and hence the reason you'd find drivers we currently use in libosinfo are a bit old. > The most obvious bit is keying in spice-guest-tools to this. Is > spice-guest-tools buildable with mingw? Generating a new spice-guest-tools > with every virtio-win build would be pretty cool Indeed. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From crobinso at redhat.com Tue May 5 17:22:54 2015 From: crobinso at redhat.com (Cole Robinson) Date: Tue, 5 May 2015 13:22:54 -0400 Subject: [Libosinfo] [PATCH libosinfo] oses: Detect RHEL Server for AArch64 as RHEL 7.0 Message-ID: RHELSA will be its own release for a short while, but long term it's expected to just be another RHEL architecture. So piggyback on the rhel7.0 entry for now. If needed we can add a toplevel rhelsa entry later. Signed-off-by: Cole Robinson --- data/oses/rhel.xml.in | 9 +++++++ data/schemas/libosinfo.rng | 1 + ...ELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt | 29 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in index 791d470..23cc0f2 100644 --- a/data/oses/rhel.xml.in +++ b/data/oses/rhel.xml.in @@ -1135,6 +1135,15 @@ isolinux/initrd.img + + + LINUX + RHELSA-.* Server\.aarch64 + + isolinux/vmlinuz + isolinux/initrd.img + + 1 diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng index db6e145..a129745 100644 --- a/data/schemas/libosinfo.rng +++ b/data/schemas/libosinfo.rng @@ -700,6 +700,7 @@ + aarch64 alpha armv7l cris diff --git a/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt new file mode 100644 index 0000000..6f017e9 --- /dev/null +++ b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: RHELSA-1.5 Server.aarch64 +Volume set id: +Publisher id: +Data preparer id: +Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1417692 +El Torito VD version 1 found, boot catalog is in sector 523 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 239 (Unknown Arch) + ID '' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 29E8 + Bootoff 1DED2 122578 -- 2.4.0 From crobinso at redhat.com Tue May 5 17:34:34 2015 From: crobinso at redhat.com (Cole Robinson) Date: Tue, 05 May 2015 13:34:34 -0400 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: References: <55440030.4060804@redhat.com> Message-ID: <5548FF2A.8080509@redhat.com> On 05/05/2015 08:12 AM, Zeeshan Ali (Khattak) wrote: > On Fri, May 1, 2015 at 11:37 PM, Cole Robinson wrote: >> Hey all, > > Hi Cole, > >> Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are >> still available for direct download, just at a different URL. All the details >> are here: >> >> https://fedoraproject.org/wiki/Windows_Virtio_Drivers >> >> FWIW the rpm and iso now match the layout of what we ship with RHEL, and match >> the content (except still no WHQL signature). > > Thats really awesome. Thanks for working on this. > >> Not sure how interesting it is to libosinfo/boxes in its current form. >> But >> it's a fresh base to start from if you have any ideas or suggestions about how >> to improve things in this area. > > Well it would be really good to have all drivers files available in > unpacked form at a canonical location (than zeenix.fedorapeople.org). > If you could make that happen, that would be very helpful. Currently I > manually unpack the latest ISO and upload the driver files to my > personal webspace and then update the libosinfo db. So a lot of manual > work and I tend to forget about such tasks and hence the reason you'd > find drivers we currently use in libosinfo are a bit old. > So looks like the only drivers you need there are the virtio-block bits, though we should probably expose virtio-scsi as well since it seems storage is the only bit that's needed (virt-v2v has similar requirements though they get the drivers from /usr/share via the virtio-win RPM). Exposing those extracted bits should be easy enough. Can you file a bug at Product=Virtualization Tools Component=virtio-win ? However I'd suggest libosinfo still controls the URL, even if it's just a redirect to the new bits. And I would also suggest that the URL only points at known tested versions, since it's plausible the automated builds could be completely busted sometimes, they will often hit the public repo before anyone but the developer has tested them Also might be cool to have an enviroment variable that tells libosinfo to get the drivers from a different URL, for easy testing of a different driver set for bug triage - Cole From zeeshanak at gnome.org Wed May 6 12:51:45 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 6 May 2015 13:51:45 +0100 Subject: [Libosinfo] [PATCH libosinfo] oses: Detect RHEL Server for AArch64 as RHEL 7.0 In-Reply-To: References: Message-ID: Hi Cole, On Tue, May 5, 2015 at 6:22 PM, Cole Robinson wrote: > RHELSA will be its own release for a short while, but long term it's > expected to just be another RHEL architecture. So piggyback on the rhel7.0 > entry for now. If needed we can add a toplevel rhelsa entry later. > > Signed-off-by: Cole Robinson Patch looks good. Just one nit-pick below. > diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng > index db6e145..a129745 100644 > --- a/data/schemas/libosinfo.rng > +++ b/data/schemas/libosinfo.rng > @@ -700,6 +700,7 @@ > > > > + aarch64 I think this should be a separate patch. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 6 12:55:20 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 6 May 2015 13:55:20 +0100 Subject: [Libosinfo] [PATCH libosinfo] oses: Detect RHEL Server for AArch64 as RHEL 7.0 In-Reply-To: References: Message-ID: And while I'm nitpicking only, I think the shortlog could be shorter to follow the git guidelines. I'd go for "rhel: Add AArch64 ISO" but up to you. On Wed, May 6, 2015 at 1:51 PM, Zeeshan Ali (Khattak) wrote: > Hi Cole, > > On Tue, May 5, 2015 at 6:22 PM, Cole Robinson wrote: >> RHELSA will be its own release for a short while, but long term it's >> expected to just be another RHEL architecture. So piggyback on the rhel7.0 >> entry for now. If needed we can add a toplevel rhelsa entry later. >> >> Signed-off-by: Cole Robinson > > Patch looks good. Just one nit-pick below. > >> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng >> index db6e145..a129745 100644 >> --- a/data/schemas/libosinfo.rng >> +++ b/data/schemas/libosinfo.rng >> @@ -700,6 +700,7 @@ >> >> >> >> + aarch64 > > I think this should be a separate patch. > > > -- > Regards, > > Zeeshan Ali (Khattak) > ________________________________________ > Befriend GNOME: http://www.gnome.org/friends/ -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 6 13:57:53 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 6 May 2015 14:57:53 +0100 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: <5548FF2A.8080509@redhat.com> References: <55440030.4060804@redhat.com> <5548FF2A.8080509@redhat.com> Message-ID: On Tue, May 5, 2015 at 6:34 PM, Cole Robinson wrote: > On 05/05/2015 08:12 AM, Zeeshan Ali (Khattak) wrote: >> On Fri, May 1, 2015 at 11:37 PM, Cole Robinson wrote: >>> Hey all, >> >> Hi Cole, >> >>> Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are >>> still available for direct download, just at a different URL. All the details >>> are here: >>> >>> https://fedoraproject.org/wiki/Windows_Virtio_Drivers >>> >>> FWIW the rpm and iso now match the layout of what we ship with RHEL, and match >>> the content (except still no WHQL signature). >> >> Thats really awesome. Thanks for working on this. >> >>> Not sure how interesting it is to libosinfo/boxes in its current form. >>> But >>> it's a fresh base to start from if you have any ideas or suggestions about how >>> to improve things in this area. >> >> Well it would be really good to have all drivers files available in >> unpacked form at a canonical location (than zeenix.fedorapeople.org). >> If you could make that happen, that would be very helpful. Currently I >> manually unpack the latest ISO and upload the driver files to my >> personal webspace and then update the libosinfo db. So a lot of manual >> work and I tend to forget about such tasks and hence the reason you'd >> find drivers we currently use in libosinfo are a bit old. >> > > So looks like the only drivers you need there are the virtio-block bits, > though we should probably expose virtio-scsi as well since it seems storage is > the only bit that's needed (virt-v2v has similar requirements though they get > the drivers from /usr/share via the virtio-win RPM). Exposing those extracted > bits should be easy enough. Can you file a bug at Product=Virtualization Tools > Component=virtio-win ? Done: https://bugzilla.redhat.com/show_bug.cgi?id=1219042 > However I'd suggest libosinfo still controls the URL, even if it's just a > redirect to the new bits. And I would also suggest that the URL only points at > known tested versions, since it's plausible the automated builds could be > completely busted sometimes, they will often hit the public repo before anyone > but the developer has tested them Hm.. true but can't you separate the tested ones from completely untested newly build ones on http://alt.fedoraproject.org itself? The thing is being incharge on the whole thing, you'd be far less likely to notice new versions available (and also be the best judge of which ones can and cant be marked as stable/tested). Also we don't currently have any canonical location for these drivers. > Also might be cool to have an enviroment variable that tells libosinfo to get > the drivers from a different URL, for easy testing of a different driver set > for bug triage Sounds like a good idea but it would be a bit hard to implement I think in libosinfo itself since the URL comes from XML/data and not from code. I guess the simplest way would be to have a env variable that affects *all* URLs but then you'll need to ensure all the drivers are available in the overriiden location. So I think it'd be better to have these in apps. Boxes, for example, already does caching of driver files and it even supports system cache (/var/cache/gnome-boxes) of drivers so you could already do this with Boxes at least. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From crobinso at redhat.com Wed May 6 16:04:08 2015 From: crobinso at redhat.com (Cole Robinson) Date: Wed, 06 May 2015 12:04:08 -0400 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: References: <55440030.4060804@redhat.com> <5548FF2A.8080509@redhat.com> Message-ID: <554A3B78.7020509@redhat.com> On 05/06/2015 09:57 AM, Zeeshan Ali (Khattak) wrote: > On Tue, May 5, 2015 at 6:34 PM, Cole Robinson wrote: >> On 05/05/2015 08:12 AM, Zeeshan Ali (Khattak) wrote: >>> On Fri, May 1, 2015 at 11:37 PM, Cole Robinson wrote: >>>> Hey all, >>> >>> Hi Cole, >>> >>>> Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are >>>> still available for direct download, just at a different URL. All the details >>>> are here: >>>> >>>> https://fedoraproject.org/wiki/Windows_Virtio_Drivers >>>> >>>> FWIW the rpm and iso now match the layout of what we ship with RHEL, and match >>>> the content (except still no WHQL signature). >>> >>> Thats really awesome. Thanks for working on this. >>> >>>> Not sure how interesting it is to libosinfo/boxes in its current form. >>>> But >>>> it's a fresh base to start from if you have any ideas or suggestions about how >>>> to improve things in this area. >>> >>> Well it would be really good to have all drivers files available in >>> unpacked form at a canonical location (than zeenix.fedorapeople.org). >>> If you could make that happen, that would be very helpful. Currently I >>> manually unpack the latest ISO and upload the driver files to my >>> personal webspace and then update the libosinfo db. So a lot of manual >>> work and I tend to forget about such tasks and hence the reason you'd >>> find drivers we currently use in libosinfo are a bit old. >>> >> >> So looks like the only drivers you need there are the virtio-block bits, >> though we should probably expose virtio-scsi as well since it seems storage is >> the only bit that's needed (virt-v2v has similar requirements though they get >> the drivers from /usr/share via the virtio-win RPM). Exposing those extracted >> bits should be easy enough. Can you file a bug at Product=Virtualization Tools >> Component=virtio-win ? > > Done: https://bugzilla.redhat.com/show_bug.cgi?id=1219042 > >> However I'd suggest libosinfo still controls the URL, even if it's just a >> redirect to the new bits. And I would also suggest that the URL only points at >> known tested versions, since it's plausible the automated builds could be >> completely busted sometimes, they will often hit the public repo before anyone >> but the developer has tested them > > Hm.. true but can't you separate the tested ones from completely > untested newly build ones on http://alt.fedoraproject.org itself? The > thing is being incharge on the whole thing, you'd be far less likely > to notice new versions available (and also be the best judge of which > ones can and cant be marked as stable/tested). Also we don't currently > have any canonical location for these drivers. > Check the fedora wiki page, we do have links for stable vs. latest. Stable points to the build that roughly correlates with what was shipped with the latest public RHEL release, so they should be reasonably trustworthy. But I say reasonably because I don't think RHEL QE is testing libosinfo autoinstall or anything However... I want to avoid this situation: - stable link is updated - boxes installs are now busted for, say, winxp - panic ensues, much scrambling to get the bug fixed and update the stable/ link If instead libosinfo/boxes had its own stable link like libosinfo.org/virtio, it could point to the virtio-win stable/ link by default, but if a nasty regression is found, you could change libosinfo.org/virtio to point back to the old working repo while we wait for an update Thanks, Cole From crobinso at redhat.com Wed May 6 16:17:02 2015 From: crobinso at redhat.com (Cole Robinson) Date: Wed, 6 May 2015 12:17:02 -0400 Subject: [Libosinfo] [PATCH libosinfo v2 1/2] schema: Sync arch names with libvirt Message-ID: Next patch will add aarch64, and we will may have ppc64le variants in the future too Signed-off-by: Cole Robinson --- v2: Break out the aarch64 addition Add ppc64le while we're at it data/schemas/libosinfo.rng | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng index db6e145..b23d210 100644 --- a/data/schemas/libosinfo.rng +++ b/data/schemas/libosinfo.rng @@ -700,6 +700,7 @@ + aarch64 alpha armv7l cris @@ -718,6 +719,7 @@ parisc64 ppc ppc64 + ppc64le ppcemb s390 s390x -- 2.4.0 From crobinso at redhat.com Wed May 6 16:17:03 2015 From: crobinso at redhat.com (Cole Robinson) Date: Wed, 6 May 2015 12:17:03 -0400 Subject: [Libosinfo] [PATCH libosinfo v2 2/2] rhel: Add AArch64 ISO In-Reply-To: References: Message-ID: RHELSA will be its own release for a short while, but long term it's expected to just be another RHEL architecture. So piggyback on the rhel7.0 entry for now. If needed we can add a toplevel rhelsa entry later. Signed-off-by: Cole Robinson --- v2: Shorten subject Break out schema change data/oses/rhel.xml.in | 9 +++++++ ...ELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in index 791d470..23cc0f2 100644 --- a/data/oses/rhel.xml.in +++ b/data/oses/rhel.xml.in @@ -1135,6 +1135,15 @@ isolinux/initrd.img + + + LINUX + RHELSA-.* Server\.aarch64 + + isolinux/vmlinuz + isolinux/initrd.img + + 1 diff --git a/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt new file mode 100644 index 0000000..6f017e9 --- /dev/null +++ b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: RHELSA-1.5 Server.aarch64 +Volume set id: +Publisher id: +Data preparer id: +Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1417692 +El Torito VD version 1 found, boot catalog is in sector 523 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 239 (Unknown Arch) + ID '' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 29E8 + Bootoff 1DED2 122578 -- 2.4.0 From zeeshanak at gnome.org Wed May 6 16:36:12 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 6 May 2015 17:36:12 +0100 Subject: [Libosinfo] [PATCH libosinfo v2 2/2] rhel: Add AArch64 ISO In-Reply-To: References: Message-ID: Thanks for reworking it. ACK On Wed, May 6, 2015 at 5:17 PM, Cole Robinson wrote: > RHELSA will be its own release for a short while, but long term it's > expected to just be another RHEL architecture. So piggyback on the rhel7.0 > entry for now. If needed we can add a toplevel rhelsa entry later. > > Signed-off-by: Cole Robinson > --- > v2: > Shorten subject > Break out schema change > > data/oses/rhel.xml.in | 9 +++++++ > ...ELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt | 29 ++++++++++++++++++++++ > 2 files changed, 38 insertions(+) > create mode 100644 test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt > > diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in > index 791d470..23cc0f2 100644 > --- a/data/oses/rhel.xml.in > +++ b/data/oses/rhel.xml.in > @@ -1135,6 +1135,15 @@ > isolinux/initrd.img > > > + > + > + LINUX > + RHELSA-.* Server\.aarch64 > + > + isolinux/vmlinuz > + isolinux/initrd.img > + > + > > > 1 > diff --git a/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt > new file mode 100644 > index 0000000..6f017e9 > --- /dev/null > +++ b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: RHELSA-1.5 Server.aarch64 > +Volume set id: > +Publisher id: > +Data preparer id: > +Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 1417692 > +El Torito VD version 1 found, boot catalog is in sector 523 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 239 (Unknown Arch) > + ID '' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 29E8 > + Bootoff 1DED2 122578 > -- > 2.4.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 6 16:37:07 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 6 May 2015 17:37:07 +0100 Subject: [Libosinfo] [PATCH libosinfo v2 1/2] schema: Sync arch names with libvirt In-Reply-To: References: Message-ID: ACK On Wed, May 6, 2015 at 5:17 PM, Cole Robinson wrote: > Next patch will add aarch64, and we will may have ppc64le variants > in the future too > > Signed-off-by: Cole Robinson > --- > v2: > Break out the aarch64 addition > Add ppc64le while we're at it > > data/schemas/libosinfo.rng | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng > index db6e145..b23d210 100644 > --- a/data/schemas/libosinfo.rng > +++ b/data/schemas/libosinfo.rng > @@ -700,6 +700,7 @@ > > > > + aarch64 > alpha > armv7l > cris > @@ -718,6 +719,7 @@ > parisc64 > ppc > ppc64 > + ppc64le > ppcemb > s390 > s390x > -- > 2.4.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From crobinso at redhat.com Wed May 6 16:41:00 2015 From: crobinso at redhat.com (Cole Robinson) Date: Wed, 06 May 2015 12:41:00 -0400 Subject: [Libosinfo] [PATCH libosinfo v2 2/2] rhel: Add AArch64 ISO In-Reply-To: References: Message-ID: <554A441C.6010005@redhat.com> Thanks, pushed both now - Cole On 05/06/2015 12:36 PM, Zeeshan Ali (Khattak) wrote: > Thanks for reworking it. ACK > > On Wed, May 6, 2015 at 5:17 PM, Cole Robinson wrote: >> RHELSA will be its own release for a short while, but long term it's >> expected to just be another RHEL architecture. So piggyback on the rhel7.0 >> entry for now. If needed we can add a toplevel rhelsa entry later. >> >> Signed-off-by: Cole Robinson >> --- >> v2: >> Shorten subject >> Break out schema change >> >> data/oses/rhel.xml.in | 9 +++++++ >> ...ELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt | 29 ++++++++++++++++++++++ >> 2 files changed, 38 insertions(+) >> create mode 100644 test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt >> >> diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in >> index 791d470..23cc0f2 100644 >> --- a/data/oses/rhel.xml.in >> +++ b/data/oses/rhel.xml.in >> @@ -1135,6 +1135,15 @@ >> isolinux/initrd.img >> >> >> + >> + >> + LINUX >> + RHELSA-.* Server\.aarch64 >> + >> + isolinux/vmlinuz >> + isolinux/initrd.img >> + >> + >> >> >> 1 >> diff --git a/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt >> new file mode 100644 >> index 0000000..6f017e9 >> --- /dev/null >> +++ b/test/isodata/rhel/rhel7.0/RHELSA-1.5-20141017.1-Server-aarch64-dvd1.iso.txt >> @@ -0,0 +1,29 @@ >> +CD-ROM is in ISO 9660 format >> +System id: LINUX >> +Volume id: RHELSA-1.5 Server.aarch64 >> +Volume set id: >> +Publisher id: >> +Data preparer id: >> +Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM >> +Copyright File id: >> +Abstract File id: >> +Bibliographic File id: >> +Volume set size is: 1 >> +Volume set sequence number is: 1 >> +Logical block size is: 2048 >> +Volume size is: 1417692 >> +El Torito VD version 1 found, boot catalog is in sector 523 >> +Joliet with UCS level 3 found >> +Rock Ridge signatures version 1 found >> +Eltorito validation header: >> + Hid 1 >> + Arch 239 (Unknown Arch) >> + ID '' >> + Key 55 AA >> + Eltorito defaultboot header: >> + Bootid 88 (bootable) >> + Boot media 0 (No Emulation Boot) >> + Load segment 0 >> + Sys type 0 >> + Nsect 29E8 >> + Bootoff 1DED2 122578 >> -- >> 2.4.0 >> >> _______________________________________________ >> Libosinfo mailing list >> Libosinfo at redhat.com >> https://www.redhat.com/mailman/listinfo/libosinfo > > > From zeeshanak at gnome.org Thu May 7 12:41:03 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 13:41:03 +0100 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: <554A3B78.7020509@redhat.com> References: <55440030.4060804@redhat.com> <5548FF2A.8080509@redhat.com> <554A3B78.7020509@redhat.com> Message-ID: On Wed, May 6, 2015 at 5:04 PM, Cole Robinson wrote: > On 05/06/2015 09:57 AM, Zeeshan Ali (Khattak) wrote: >> On Tue, May 5, 2015 at 6:34 PM, Cole Robinson wrote: >>> On 05/05/2015 08:12 AM, Zeeshan Ali (Khattak) wrote: >>>> On Fri, May 1, 2015 at 11:37 PM, Cole Robinson wrote: >>>>> Hey all, >>>> >>>> Hi Cole, >>>> >>>>> Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are >>>>> still available for direct download, just at a different URL. All the details >>>>> are here: >>>>> >>>>> https://fedoraproject.org/wiki/Windows_Virtio_Drivers >>>>> >>>>> FWIW the rpm and iso now match the layout of what we ship with RHEL, and match >>>>> the content (except still no WHQL signature). >>>> >>>> Thats really awesome. Thanks for working on this. >>>> >>>>> Not sure how interesting it is to libosinfo/boxes in its current form. >>>>> But >>>>> it's a fresh base to start from if you have any ideas or suggestions about how >>>>> to improve things in this area. >>>> >>>> Well it would be really good to have all drivers files available in >>>> unpacked form at a canonical location (than zeenix.fedorapeople.org). >>>> If you could make that happen, that would be very helpful. Currently I >>>> manually unpack the latest ISO and upload the driver files to my >>>> personal webspace and then update the libosinfo db. So a lot of manual >>>> work and I tend to forget about such tasks and hence the reason you'd >>>> find drivers we currently use in libosinfo are a bit old. >>>> >>> >>> So looks like the only drivers you need there are the virtio-block bits, >>> though we should probably expose virtio-scsi as well since it seems storage is >>> the only bit that's needed (virt-v2v has similar requirements though they get >>> the drivers from /usr/share via the virtio-win RPM). Exposing those extracted >>> bits should be easy enough. Can you file a bug at Product=Virtualization Tools >>> Component=virtio-win ? >> >> Done: https://bugzilla.redhat.com/show_bug.cgi?id=1219042 >> >>> However I'd suggest libosinfo still controls the URL, even if it's just a >>> redirect to the new bits. And I would also suggest that the URL only points at >>> known tested versions, since it's plausible the automated builds could be >>> completely busted sometimes, they will often hit the public repo before anyone >>> but the developer has tested them >> >> Hm.. true but can't you separate the tested ones from completely >> untested newly build ones on http://alt.fedoraproject.org itself? The >> thing is being incharge on the whole thing, you'd be far less likely I'm hoping you guessed that I meant to write "more likely" here. >> to notice new versions available (and also be the best judge of which >> ones can and cant be marked as stable/tested). Also we don't currently >> have any canonical location for these drivers. >> > > Check the fedora wiki page, we do have links for stable vs. latest. Stable Ah sorry, I'm blind sometimes. > points to the build that roughly correlates with what was shipped with the > latest public RHEL release, so they should be reasonably trustworthy. But I > say reasonably because I don't think RHEL QE is testing libosinfo autoinstall > or anything > > However... I want to avoid this situation: > > - stable link is updated > - boxes installs are now busted for, say, winxp > - panic ensues, much scrambling to get the bug fixed and update the stable/ link > > If instead libosinfo/boxes had its own stable link like libosinfo.org/virtio, > it could point to the virtio-win stable/ link by default, but if a nasty > regression is found, you could change libosinfo.org/virtio to point back to > the old working repo while we wait for an update Sounds good but 1. I think we'll need Daniel's help to setup this webspace on libosinfo.org. 2. I'm guessing this would mean you'd keep hosting at least the last stable release of drivers? -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From crobinso at redhat.com Thu May 7 14:20:52 2015 From: crobinso at redhat.com (Cole Robinson) Date: Thu, 07 May 2015 10:20:52 -0400 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: References: <55440030.4060804@redhat.com> <5548FF2A.8080509@redhat.com> <554A3B78.7020509@redhat.com> Message-ID: <554B74C4.4090108@redhat.com> On 05/07/2015 08:41 AM, Zeeshan Ali (Khattak) wrote: > On Wed, May 6, 2015 at 5:04 PM, Cole Robinson wrote: >> On 05/06/2015 09:57 AM, Zeeshan Ali (Khattak) wrote: >>> On Tue, May 5, 2015 at 6:34 PM, Cole Robinson wrote: >>>> On 05/05/2015 08:12 AM, Zeeshan Ali (Khattak) wrote: >>>>> On Fri, May 1, 2015 at 11:37 PM, Cole Robinson wrote: >>>>>> Hey all, >>>>> >>>>> Hi Cole, >>>>> >>>>>> Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are >>>>>> still available for direct download, just at a different URL. All the details >>>>>> are here: >>>>>> >>>>>> https://fedoraproject.org/wiki/Windows_Virtio_Drivers >>>>>> >>>>>> FWIW the rpm and iso now match the layout of what we ship with RHEL, and match >>>>>> the content (except still no WHQL signature). >>>>> >>>>> Thats really awesome. Thanks for working on this. >>>>> >>>>>> Not sure how interesting it is to libosinfo/boxes in its current form. >>>>>> But >>>>>> it's a fresh base to start from if you have any ideas or suggestions about how >>>>>> to improve things in this area. >>>>> >>>>> Well it would be really good to have all drivers files available in >>>>> unpacked form at a canonical location (than zeenix.fedorapeople.org). >>>>> If you could make that happen, that would be very helpful. Currently I >>>>> manually unpack the latest ISO and upload the driver files to my >>>>> personal webspace and then update the libosinfo db. So a lot of manual >>>>> work and I tend to forget about such tasks and hence the reason you'd >>>>> find drivers we currently use in libosinfo are a bit old. >>>>> >>>> >>>> So looks like the only drivers you need there are the virtio-block bits, >>>> though we should probably expose virtio-scsi as well since it seems storage is >>>> the only bit that's needed (virt-v2v has similar requirements though they get >>>> the drivers from /usr/share via the virtio-win RPM). Exposing those extracted >>>> bits should be easy enough. Can you file a bug at Product=Virtualization Tools >>>> Component=virtio-win ? >>> >>> Done: https://bugzilla.redhat.com/show_bug.cgi?id=1219042 >>> >>>> However I'd suggest libosinfo still controls the URL, even if it's just a >>>> redirect to the new bits. And I would also suggest that the URL only points at >>>> known tested versions, since it's plausible the automated builds could be >>>> completely busted sometimes, they will often hit the public repo before anyone >>>> but the developer has tested them >>> >>> Hm.. true but can't you separate the tested ones from completely >>> untested newly build ones on http://alt.fedoraproject.org itself? The >>> thing is being incharge on the whole thing, you'd be far less likely > > I'm hoping you guessed that I meant to write "more likely" here. > >>> to notice new versions available (and also be the best judge of which >>> ones can and cant be marked as stable/tested). Also we don't currently >>> have any canonical location for these drivers. >>> >> >> Check the fedora wiki page, we do have links for stable vs. latest. Stable > > Ah sorry, I'm blind sometimes. > >> points to the build that roughly correlates with what was shipped with the >> latest public RHEL release, so they should be reasonably trustworthy. But I >> say reasonably because I don't think RHEL QE is testing libosinfo autoinstall >> or anything >> >> However... I want to avoid this situation: >> >> - stable link is updated >> - boxes installs are now busted for, say, winxp >> - panic ensues, much scrambling to get the bug fixed and update the stable/ link >> >> If instead libosinfo/boxes had its own stable link like libosinfo.org/virtio, >> it could point to the virtio-win stable/ link by default, but if a nasty >> regression is found, you could change libosinfo.org/virtio to point back to >> the old working repo while we wait for an update > > Sounds good but > > 1. I think we'll need Daniel's help to setup this webspace on libosinfo.org. You could even continue to use zeenix.fedorapeople.org now as well and use .htaccess for redirects > 2. I'm guessing this would mean you'd keep hosting at least the last > stable release of drivers? > Yeah we will keep permanent links around here: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/ So stable/ and latest/ will change where they point, but the archive links will always be stable - Cole From zeeshanak at gnome.org Thu May 7 16:36:35 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:35 +0100 Subject: [Libosinfo] Installer for Fedora netiso/F21 Message-ID: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> This series of patches make installer scripts working for Fedora 21 netiso. Unfortunately this couldn't have been handled (nicely) without addition of new API. So apps will have to change code to fix installer for Fedora 21. Things still yet to be addressed: * Install scripts are still only associated with os entries but installer scripts don't work for all medias/variants. This is not a new problem though. For example our Fedora script was never working for netiso but we still advertised it as such (or at least we didn't inform apps in any way about this). I think we'll need API to optionally associate installer to variants to fix this issue. * Netiso requires internet and we don't have any API to inform app about this. We already have API to inform apps that an installer (always) require internet but not if its the media that requires it. The solution here would simply be to add 'needs-internet' param/api to media entries IMO. From zeeshanak at gnome.org Thu May 7 16:36:36 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:36 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-2-git-send-email-zeeshanak@gnome.org> --- osinfo/osinfo_install_script.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 9304b97..a6a5bab 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -891,7 +891,19 @@ static void osinfo_install_script_template_loaded(GObject *src, g_free(uri); } - +/** + * osinfo_install_script_generate_async: + * @script: the install script + * @os: the os + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate(). From the callback, + * call #osinfo_install_script_generate_finish() to conclude this call and get + * the generated script. + */ void osinfo_install_script_generate_async(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, @@ -1040,6 +1052,18 @@ static void osinfo_install_script_generate_done(GObject *src, g_main_loop_quit(data->loop); } +/** + * osinfo_install_script_generate: + * @script: the install script + * @os: the os entity + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script. + * + * Returns: (transfer full): the script as string. + */ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, @@ -1101,6 +1125,21 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, } } +/** + * osinfo_install_script_generate_output_async: + * @script: the install script + * @os: the os + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate_output(). From the + * callback, call #osinfo_install_script_generate_output_finish() to conclude + * this call and get the generated script. + */ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:38 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:38 +0100 Subject: [Libosinfo] [PATCH 03/10] Add osinfo_install_script_generate_output_for_media*() In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-4-git-send-email-zeeshanak@gnome.org> Add variant of osinfo_install_script_generate_for_media*() that generates the script into a file. --- osinfo/libosinfo.syms | 4 + osinfo/osinfo_install_script.c | 250 +++++++++++++++++++++++++++++++++-------- osinfo/osinfo_install_script.h | 17 +++ 3 files changed, 224 insertions(+), 47 deletions(-) diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index ba4c020..3906f89 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -511,6 +511,10 @@ LIBOSINFO_0.2.12 { osinfo_install_script_generate_for_media_async; osinfo_install_script_generate_for_media_finish; + osinfo_install_script_generate_output_for_media; + osinfo_install_script_generate_output_for_media_async; + osinfo_install_script_generate_output_for_media_finish; + osinfo_media_get_volume_size; } LIBOSINFO_0.2.11; diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 621c56f..a251557 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -1061,6 +1061,25 @@ GFile *osinfo_install_script_generate_output_finish(OsinfoInstallScript *script, error); } +/** + * osinfo_install_script_generate_output_for_media_finish: + * @script: the install script + * @res: a #GAsyncResult + * @error: The location where to store any error, or NULL + * + * Returns: (transfer full): a file containing the script, or NULL on error. + * + * Since: 0.2.12 + */ +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error) +{ + return osinfo_install_script_generate_finish_common(script, + res, + error); +} + struct _OsinfoInstallScriptGenerateSyncData { GMainLoop *loop; GError *error; @@ -1081,6 +1100,19 @@ static void osinfo_install_script_generate_output_done(GObject *src, g_main_loop_quit(data->loop); } +static void osinfo_install_script_generate_output_for_media_done(GObject *src, + GAsyncResult *res, + gpointer user_data) +{ + OsinfoInstallScriptGenerateSyncData *data = user_data; + + data->file = + osinfo_install_script_generate_output_for_media_finish(OSINFO_INSTALL_SCRIPT(src), + res, + &data->error); + g_main_loop_quit(data->loop); +} + static void osinfo_install_script_generate_output_close_file(GObject *src, GAsyncResult *res, gpointer user_data) @@ -1279,28 +1311,14 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, } } -/** - * osinfo_install_script_generate_output_async: - * @script: the install script - * @os: the os - * @config: the install script config - * @output_dir: the directory where file containing the output script - * will be written - * @cancellable: (allow-none): a #GCancellable, or %NULL - * @callback: Function to call when result of this call is ready - * @user_data: The user data to pass to @callback, or %NULL - * - * Asynchronous variant of #osinfo_install_script_generate_output(). From the - * callback, call #osinfo_install_script_generate_output_finish() to conclude - * this call and get the generated script. - */ -void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, - OsinfoOs *os, - OsinfoInstallConfig *config, - GFile *output_dir, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +static void osinfo_install_script_generate_output_async_common(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { const gchar *filename; const gchar *prefix; @@ -1312,15 +1330,23 @@ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, data->res = g_simple_async_result_new(G_OBJECT(script), callback, user_data, - osinfo_install_script_generate_output_async); + osinfo_install_script_generate_output_async_common); data->cancellable = cancellable; data->error = data_sync->error; - data->output = osinfo_install_script_generate(script, - os, - config, - cancellable, - &data->error); + if (media != NULL) { + data->output = osinfo_install_script_generate_for_media (script, + media, + config, + cancellable, + &data->error); + } else { + data->output = osinfo_install_script_generate(script, + os, + config, + cancellable, + &data->error); + } data->output_pos = 0; data->output_len = strlen(data->output); @@ -1348,25 +1374,45 @@ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, } /** - * osinfo_install_script_generate_output: + * osinfo_install_script_generate_output_async: * @script: the install script - * @os: the os entity + * @os: the os * @config: the install script config * @output_dir: the directory where file containing the output script * will be written * @cancellable: (allow-none): a #GCancellable, or %NULL - * @error: The location where to store any error, or %NULL - * - * Creates an install script that is written to the returned file. + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL * - * Returns: (transfer full): a file containing the script + * Asynchronous variant of #osinfo_install_script_generate_output(). From the + * callback, call #osinfo_install_script_generate_output_finish() to conclude + * this call and get the generated script. */ -GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, - OsinfoOs *os, - OsinfoInstallConfig *config, - GFile *output_dir, - GCancellable *cancellable, - GError **error) +void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + osinfo_install_script_generate_output_async_common(script, + os, + NULL, + config, + output_dir, + cancellable, + callback, + user_data); +} + +static GFile *osinfo_install_script_generate_output_common(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error) { GMainLoop *loop = g_main_loop_new(g_main_context_get_thread_default(), TRUE); @@ -1374,13 +1420,25 @@ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, loop, NULL, NULL, NULL }; - osinfo_install_script_generate_output_async(script, - os, - config, - output_dir, - cancellable, - osinfo_install_script_generate_output_done, - &data); + if (media != NULL) { + osinfo_install_script_generate_output_for_media_async + (script, + media, + config, + output_dir, + cancellable, + osinfo_install_script_generate_output_for_media_done, + &data); + } else { + osinfo_install_script_generate_output_async + (script, + os, + config, + output_dir, + cancellable, + osinfo_install_script_generate_output_done, + &data); + } if (g_main_loop_is_running(loop)) g_main_loop_run(loop); @@ -1394,6 +1452,104 @@ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, } /** + * osinfo_install_script_generate_output: + * @script: the install script + * @os: the os entity + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script that is written to the returned file. + * + * Returns: (transfer full): a file containing the script + */ +GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error) +{ + return osinfo_install_script_generate_output_common(script, + os, + NULL, + config, + output_dir, + cancellable, + error); +} + +/** + * osinfo_install_script_generate_output_for_media_async: + * @script: the install script + * @media: the media + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate_output_for_media(). + * From the callback, call + * #osinfo_install_script_generate_output_for_media_finish() to conclude this + * call and get the generated file. + * + * Since: 0.2.12 + */ +void osinfo_install_script_generate_output_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + osinfo_install_script_generate_output_async_common(script, + NULL, + media, + config, + output_dir, + cancellable, + callback, + user_data); +} + +/** + * osinfo_install_script_generate_output_for_media: + * @script: the install script + * @media: the media + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script that is written to the returned file. + * + * Returns: (transfer full): a file containing the script. + * + * Since: 0.2.12 + */ +GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error) +{ + return osinfo_install_script_generate_output_common(script, + NULL, + media, + config, + output_dir, + cancellable, + error); +} + +/** * osinfo_install_script_generate_command_line: * @script: the install script * @os: the os entity diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index cd0b033..0a6afcb 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -215,6 +215,23 @@ gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, GCancellable *cancellable, GError **error); +void osinfo_install_script_generate_output_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error); +GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error); + gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config); -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:37 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:37 +0100 Subject: [Libosinfo] [PATCH 02/10] Add osinfo_install_script_generate_for_media*() In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-3-git-send-email-zeeshanak@gnome.org> Add API that allows apps to pass the media matched against the OS they are generating the script for. Scripts can use this information to make decisions about how installation should be setup. For example, we are going to use this in the Fedora installer script to decide whether to install from ISO or from network, based on whether or not media is a network installer. --- osinfo/libosinfo.syms | 4 + osinfo/osinfo_install_script.c | 197 ++++++++++++++++++++++++++++++++++++----- osinfo/osinfo_install_script.h | 16 ++++ 3 files changed, 196 insertions(+), 21 deletions(-) diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index 2dba411..ba4c020 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -507,6 +507,10 @@ LIBOSINFO_0.2.11 { LIBOSINFO_0.2.12 { global: + osinfo_install_script_generate_for_media; + osinfo_install_script_generate_for_media_async; + osinfo_install_script_generate_for_media_finish; + osinfo_media_get_volume_size; } LIBOSINFO_0.2.11; diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index a6a5bab..621c56f 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -533,6 +533,7 @@ OsinfoAvatarFormat *osinfo_install_script_get_avatar_format(OsinfoInstallScript struct _OsinfoInstallScriptGenerateData { GSimpleAsyncResult *res; OsinfoOs *os; + OsinfoMedia *media; OsinfoInstallConfig *config; OsinfoInstallScript *script; }; @@ -541,6 +542,8 @@ struct _OsinfoInstallScriptGenerateData { static void osinfo_install_script_generate_data_free(OsinfoInstallScriptGenerateData *data) { g_object_unref(data->os); + if (data->media != NULL) + g_object_unref(data->media); g_object_unref(data->config); g_object_unref(data->script); g_object_unref(data->res); @@ -731,6 +734,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript *script, OsinfoOs *os, + OsinfoMedia *media, OsinfoInstallConfig *config, const gchar *node_name, GError **error) @@ -767,6 +771,19 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * goto error; } + if (media != NULL) { + if (!(node = osinfo_install_script_generate_entity_xml(script, + OSINFO_ENTITY(media), + "media", + error))) + goto error; + if (!(xmlAddChild(root, node))) { + xmlErrorPtr err = xmlGetLastError(); + g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); + goto error; + } + } + if (!(node = osinfo_install_script_generate_entity_xml(script, OSINFO_ENTITY(config), "config", @@ -819,6 +836,7 @@ static gchar *osinfo_install_script_apply_xslt(xsltStylesheetPtr ss, static gboolean osinfo_install_script_apply_template(OsinfoInstallScript *script, OsinfoOs *os, + OsinfoMedia *media, const gchar *templateUri, const gchar *template, const gchar *node_name, @@ -828,7 +846,7 @@ static gboolean osinfo_install_script_apply_template(OsinfoInstallScript *script { gboolean ret = FALSE; xsltStylesheetPtr templateXsl = osinfo_install_script_load_template(templateUri, template, error); - xmlDocPtr configXml = osinfo_install_script_generate_config_xml(script, os, config, node_name, error); + xmlDocPtr configXml = osinfo_install_script_generate_config_xml(script, os, media, config, node_name, error); if (!templateXsl || !configXml) goto cleanup; @@ -871,6 +889,7 @@ static void osinfo_install_script_template_loaded(GObject *src, if (!osinfo_install_script_apply_template(data->script, data->os, + data->media, uri, input, "install-script-config", @@ -891,43 +910,35 @@ static void osinfo_install_script_template_loaded(GObject *src, g_free(uri); } -/** - * osinfo_install_script_generate_async: - * @script: the install script - * @os: the os - * @config: the install script config - * @cancellable: (allow-none): a #GCancellable, or %NULL - * @callback: Function to call when result of this call is ready - * @user_data: The user data to pass to @callback, or %NULL - * - * Asynchronous variant of #osinfo_install_script_generate(). From the callback, - * call #osinfo_install_script_generate_finish() to conclude this call and get - * the generated script. - */ -void osinfo_install_script_generate_async(OsinfoInstallScript *script, - OsinfoOs *os, - OsinfoInstallConfig *config, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) + +static void osinfo_install_script_generate_async_common(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { OsinfoInstallScriptGenerateData *data = g_new0(OsinfoInstallScriptGenerateData, 1); const gchar *templateData = osinfo_install_script_get_template_data(script); const gchar *templateUri = osinfo_install_script_get_template_uri(script); data->os = g_object_ref(os); + if (media != NULL) + data->media = g_object_ref(media); data->config = g_object_ref(config); data->script = g_object_ref(script); data->res = g_simple_async_result_new(G_OBJECT(script), callback, user_data, - osinfo_install_script_generate_async); + osinfo_install_script_generate_async_common); if (templateData) { GError *error = NULL; gchar *output; if (!osinfo_install_script_apply_template(script, os, + media, "", templateData, "install-script-config", @@ -954,6 +965,35 @@ void osinfo_install_script_generate_async(OsinfoInstallScript *script, } } +/** + * osinfo_install_script_generate_async: + * @script: the install script + * @os: the os + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate(). From the callback, + * call #osinfo_install_script_generate_finish() to conclude this call and get + * the generated script. + */ +void osinfo_install_script_generate_async(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + osinfo_install_script_generate_async_common(script, + os, + NULL, + config, + cancellable, + callback, + user_data); +} + static gpointer osinfo_install_script_generate_finish_common(OsinfoInstallScript *script, GAsyncResult *res, GError **error) @@ -986,6 +1026,25 @@ gchar *osinfo_install_script_generate_finish(OsinfoInstallScript *script, } /** + * osinfo_install_script_generate_for_media_finish: + * @script: the install script + * @res: a #GAsyncResult + * @error: The location where to store any error, or NULL + * + * Returns: (transfer full): the generated script, or NULL on error + * + * Since: 0.2.12 + */ +gchar *osinfo_install_script_generate_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error) +{ + return osinfo_install_script_generate_finish_common(script, + res, + error); +} + +/** * osinfo_install_script_generate_output_finish: * @script: the install script * @res: a #GAsyncResult @@ -1094,6 +1153,101 @@ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, return data.output; } +/** + * osinfo_install_script_generate_for_media_async: + * @script: the install script + * @media: the media + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate_for_media(). From the + * callback, call #osinfo_install_script_generate_for_media_finish() to + * conclude this call and get the generated script. + * + * Since: 0.2.12 + */ +void osinfo_install_script_generate_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { + OsinfoOs *os; + + g_return_if_fail (media != NULL); + + os = osinfo_media_get_os (media); + g_return_if_fail (os != NULL); + + osinfo_install_script_generate_async_common(script, + os, + media, + config, + cancellable, + callback, + user_data); +} + +static void osinfo_install_script_generate_for_media_done(GObject *src, + GAsyncResult *res, + gpointer user_data) +{ + OsinfoInstallScriptGenerateSyncData *data = user_data; + + data->output = + osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), + res, + &data->error); + g_main_loop_quit(data->loop); +} + +/** + * osinfo_install_script_generate_for_media: + * @script: the install script + * @media: the media + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script. The media @media must have been identified + * successfully using #osinfo_db_identify_media() before calling this function. + * + * Returns: (transfer full): the script as string. + * + * Since: 0.2.12 + */ +gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GError **error) +{ + GMainLoop *loop = g_main_loop_new(g_main_context_get_thread_default(), + TRUE); + OsinfoInstallScriptGenerateSyncData data = { + loop, NULL, NULL, NULL + }; + + osinfo_install_script_generate_for_media_async(script, + media, + config, + cancellable, + osinfo_install_script_generate_for_media_done, + &data); + + if (g_main_loop_is_running(loop)) + g_main_loop_run(loop); + + if (data.error) + g_propagate_error(error, data.error); + + g_main_loop_unref(loop); + + return data.output; +} + static void osinfo_install_script_generate_output_write_file(GObject *src, GAsyncResult *res, gpointer user_data) @@ -1264,6 +1418,7 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, GError *error = NULL; if (!osinfo_install_script_apply_template(script, os, + NULL, "", templateData, "command-line", diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index f8083b4..cd0b033 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -40,6 +40,7 @@ #define OSINFO_INSTALL_SCRIPT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OSINFO_TYPE_INSTALL_SCRIPT, OsinfoInstallScriptClass)) typedef struct _OsinfoOs OsinfoOs; +typedef struct _OsinfoMedia OsinfoMedia; typedef struct _OsinfoInstallScript OsinfoInstallScript; typedef struct _OsinfoInstallScriptClass OsinfoInstallScriptClass; typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate; @@ -199,6 +200,21 @@ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, GCancellable *cancellable, GError **error); +void osinfo_install_script_generate_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gchar *osinfo_install_script_generate_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error); +gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GError **error); + gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config); -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:40 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:40 +0100 Subject: [Libosinfo] [PATCH 05/10] Recommend osinfo_install_script_generate_*for_media() In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-6-git-send-email-zeeshanak@gnome.org> Recommend the use of the new script generation API that takes an identified media object as arugment rather than OS, in the docs. --- osinfo/osinfo_install_script.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 66593bb..5b1ee4f 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -977,6 +977,10 @@ static void osinfo_install_script_generate_async_common(OsinfoInstallScript *scr * Asynchronous variant of #osinfo_install_script_generate(). From the callback, * call #osinfo_install_script_generate_finish() to conclude this call and get * the generated script. + * + * If you are generating the script for a specific media, it is highly + * recommended that you use #osinfo_install_script_generate_for_media_async() + * instead. */ void osinfo_install_script_generate_async(OsinfoInstallScript *script, OsinfoOs *os, @@ -1154,6 +1158,9 @@ static void osinfo_install_script_generate_done(GObject *src, * Creates an install script. * * Returns: (transfer full): the script as string. + * + * If you are generating the script for a specific media, it is highly + * recommended that you use #osinfo_install_script_generate_for_media() instead. */ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, OsinfoOs *os, @@ -1387,6 +1394,10 @@ static void osinfo_install_script_generate_output_async_common(OsinfoInstallScri * Asynchronous variant of #osinfo_install_script_generate_output(). From the * callback, call #osinfo_install_script_generate_output_finish() to conclude * this call and get the generated script. + * + * If you are generating the script for a specific media, it is highly + * recommended that you use + * #osinfo_install_script_generate_output_for_media_async() instead. */ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, OsinfoOs *os, @@ -1464,6 +1475,10 @@ static GFile *osinfo_install_script_generate_output_common(OsinfoInstallScript * * Creates an install script that is written to the returned file. * * Returns: (transfer full): a file containing the script + * + * If you are generating the script for a specific media, it is highly + * recommended that you use #osinfo_install_script_generate_output_for_media() + * instead. */ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, OsinfoOs *os, @@ -1561,6 +1576,10 @@ GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *scri * (http://wiki.qemu.org/download/qemu-doc.html#direct_005flinux_005fboot) * the OS in order to pass the needed commandline to it. * + * If you are generating the command line for a specific media, it is highly + * recommended that you use + * #osinfo_install_script_generate_command_line_for_media() instead. + * * Returns: (transfer full): The generated command line string, NULL otherwise. */ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:39 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:39 +0100 Subject: [Libosinfo] [PATCH 04/10] Add osinfo_install_script_generate_command_line_for_media() In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-5-git-send-email-zeeshanak@gnome.org> Add variant of osinfo_install_script_generate_command_line() that takes (an identified) media instead of an OS. Currently no commandline template needs access to media but lets add this to be future safe and be consistent with other osinfo_install_script_generation*() API. --- osinfo/libosinfo.syms | 2 ++ osinfo/osinfo_install_script.c | 47 ++++++++++++++++++++++++++++++++++++++++++ osinfo/osinfo_install_script.h | 3 +++ 3 files changed, 52 insertions(+) diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index 3906f89..68d54ff 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -507,6 +507,8 @@ LIBOSINFO_0.2.11 { LIBOSINFO_0.2.12 { global: + osinfo_install_script_generate_command_line_for_media; + osinfo_install_script_generate_for_media; osinfo_install_script_generate_for_media_async; osinfo_install_script_generate_for_media_finish; diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index a251557..66593bb 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -1588,6 +1588,53 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, return output; } +/** + * osinfo_install_script_generate_command_line_for_media: + * @script: the install script + * @media: the media + * @config: the install script config + * + * Some install scripts need to pass a command line to the kernel, Such install + * scripts belong to OSs that provide paths to the kernel and initrd files that + * can be used to directly boot + * (http://wiki.qemu.org/download/qemu-doc.html#direct_005flinux_005fboot) + * the OS in order to pass the needed commandline to it. + * + * The media @media must have been identified successfully using + * #osinfo_db_identify_media() before calling this function. + * + * Returns: (transfer full): The generated command line string, NULL otherwise. + */ +gchar *osinfo_install_script_generate_command_line_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config) +{ + const gchar *templateData = osinfo_install_script_get_template_data(script); + gchar *output = NULL; + OsinfoOs *os; + + g_return_val_if_fail (media != NULL, NULL); + + os = osinfo_media_get_os (media); + g_return_val_if_fail (os != NULL, NULL); + + if (templateData) { + GError *error = NULL; + if (!osinfo_install_script_apply_template(script, + os, + media, + "", + templateData, + "command-line", + &output, + config, + &error)) { + g_prefix_error(&error, "%s", _("Failed to apply script template: ")); + } + } + + return output; +} OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *script) { diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index 0a6afcb..c494192 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -235,6 +235,9 @@ GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *scri gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config); +gchar *osinfo_install_script_generate_command_line_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config); gboolean osinfo_install_script_has_config_param(const OsinfoInstallScript *script, const OsinfoInstallConfigParam *config_param); -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:41 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:41 +0100 Subject: [Libosinfo] [PATCH 06/10] tests: Pass media to script generator In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-7-git-send-email-zeeshanak@gnome.org> Now that we have an API to pass media to script generation methods, let's test that API instead since its not only the recommended API but also this way we get to test both passing of OS and media information to script template. One of the test cases still uses the existing API on purpose to keep the case of 'no media available' covered as well. --- .../dbdata/install-scripts/test-install-script.xml | 6 ++ test/dbdata/oses/test-os-data.xml | 23 +++++ test/install-script.xsl | 7 +- test/test-install-script.c | 98 +++++++++++++++++----- 4 files changed, 110 insertions(+), 24 deletions(-) create mode 100644 test/dbdata/oses/test-os-data.xml diff --git a/test/dbdata/install-scripts/test-install-script.xml b/test/dbdata/install-scripts/test-install-script.xml index 48469ef..e3c05b7 100644 --- a/test/dbdata/install-scripts/test-install-script.xml +++ b/test/dbdata/install-scripts/test-install-script.xml @@ -16,6 +16,12 @@ +# OS id= +# + Media id= + Unknown media + +# Profile: keyboard lang timezone --utc diff --git a/test/dbdata/oses/test-os-data.xml b/test/dbdata/oses/test-os-data.xml new file mode 100644 index 0000000..88ef431 --- /dev/null +++ b/test/dbdata/oses/test-os-data.xml @@ -0,0 +1,23 @@ + + + + fedora16 + Fedora 16 + 16 + Fedora Project + linux + fedora + Verne + + + http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/i386/iso/Fedora-16-i386-DVD.iso + + Fedora 16 i386 DVD + LINUX + 3806375936 + + isolinux/vmlinuz + isolinux/initrd.img + + + diff --git a/test/install-script.xsl b/test/install-script.xsl index f52e99f..f355152 100644 --- a/test/install-script.xsl +++ b/test/install-script.xsl @@ -6,7 +6,12 @@ -# OS id= profile +# OS id= +# + Media id= + Unknown media + +# Profile: install text keyboard diff --git a/test/test-install-script.c b/test/test-install-script.c index 4da3bb4..c067e9d 100644 --- a/test/test-install-script.c +++ b/test/test-install-script.c @@ -30,7 +30,9 @@ static GError *error = NULL; static gchar *actualData = NULL; static const gchar *expectData = \ "\n" \ - "# OS id=http://fedoraproject.org/fedora/16 profile jeos\n" \ + "# OS id=http://fedoraproject.org/fedora/16\n" \ + "# Media id=http://fedoraproject.org/fedora/16:0\n" \ + "# Profile: jeos\n" \ "install\n" \ "text\n" \ "keyboard uk\n" \ @@ -58,10 +60,26 @@ static const gchar *expectData = \ static const gchar *expectData2 = \ "\n" \ + "# OS id=http://fedoraproject.org/fedora/16\n" \ + "# Unknown media\n" \ + "# Profile: jeos\n" \ "keyboard FOOBAR\n" \ "lang French\n" \ "timezone --utc Europe/Paris"; +static void test_generate_for_media_finish(GObject *src, + GAsyncResult *res, + gpointer user_data) +{ + GMainLoop *loop = user_data; + + actualData = osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), + res, + &error); + + g_main_loop_quit(loop); +} + static void test_generate_finish(GObject *src, GAsyncResult *res, gpointer user_data) @@ -100,23 +118,41 @@ START_TEST(test_script_file) { OsinfoInstallScript *script; OsinfoInstallConfig *config = test_get_config(); - OsinfoOs *os; + OsinfoLoader *loader = osinfo_loader_new(); + OsinfoDb *db; + OsinfoMedia *media; GMainLoop *loop; script = osinfo_install_script_new_uri("http://example.com", "jeos", "file://" SRCDIR "/test/install-script.xsl"); + osinfo_loader_process_path(loader, SRCDIR "/test/dbdata", &error); + fail_unless(error == NULL, error ? error->message : "none"); + db = g_object_ref(osinfo_loader_get_db(loader)); + g_object_unref(loader); + loop = g_main_loop_new(g_main_context_get_thread_default(), TRUE); - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); - osinfo_install_script_generate_async(script, - os, - config, - NULL, - test_generate_finish, - loop); + media = osinfo_media_new("http://fedoraproject.org/fedora/16:0", "i686"); + osinfo_entity_set_param(OSINFO_ENTITY (media), + OSINFO_MEDIA_PROP_VOLUME_ID, + "Fedora 16 i386 DVD"); + osinfo_entity_set_param(OSINFO_ENTITY (media), + OSINFO_MEDIA_PROP_SYSTEM_ID, + "LINUX"); + osinfo_entity_set_param_int64(OSINFO_ENTITY (media), + OSINFO_MEDIA_PROP_VOLUME_SIZE, + 3806375936); + fail_unless(osinfo_db_identify_media (db, media), "Failed to identify media"); + + osinfo_install_script_generate_for_media_async(script, + media, + config, + NULL, + test_generate_for_media_finish, + loop); if (g_main_loop_is_running(loop)) g_main_loop_run(loop); @@ -127,7 +163,8 @@ START_TEST(test_script_file) fail_unless(strcmp(actualData, expectData) == 0, "Actual '%s' match expect '%s'", actualData, expectData); - g_object_unref(os); + g_object_unref(media); + g_object_unref(db); g_object_unref(config); g_object_unref(script); g_main_loop_unref(loop); @@ -140,7 +177,9 @@ START_TEST(test_script_data) { OsinfoInstallScript *script; OsinfoInstallConfig *config = test_get_config(); - OsinfoOs *os; + OsinfoLoader *loader = osinfo_loader_new(); + OsinfoDb *db; + OsinfoMedia *media; GMainLoop *loop; GFile *file = g_file_new_for_uri("file://" SRCDIR "/test/install-script.xsl"); gchar *data; @@ -148,10 +187,23 @@ START_TEST(test_script_data) g_file_load_contents(file, NULL, &data, NULL, NULL, &error); fail_unless(error == NULL, error ? error->message : "none"); - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); - osinfo_entity_set_param(OSINFO_ENTITY(os), - OSINFO_PRODUCT_PROP_SHORT_ID, - "fedora16"); + osinfo_loader_process_path(loader, SRCDIR "/test/dbdata", &error); + fail_unless(error == NULL, error ? error->message : "none"); + db = g_object_ref(osinfo_loader_get_db(loader)); + g_object_unref(loader); + + media = osinfo_media_new("http://fedoraproject.org/fedora/16:0", "i686"); + osinfo_entity_set_param(OSINFO_ENTITY (media), + OSINFO_MEDIA_PROP_VOLUME_ID, + "Fedora 16 i386 DVD"); + osinfo_entity_set_param(OSINFO_ENTITY (media), + OSINFO_MEDIA_PROP_SYSTEM_ID, + "LINUX"); + osinfo_entity_set_param_int64(OSINFO_ENTITY (media), + OSINFO_MEDIA_PROP_VOLUME_SIZE, + 3806375936); + fail_unless(osinfo_db_identify_media (db, media), "Failed to identify media"); + script = osinfo_install_script_new_data("http://example.com", "jeos", data); @@ -159,12 +211,12 @@ START_TEST(test_script_data) loop = g_main_loop_new(g_main_context_get_thread_default(), TRUE); - osinfo_install_script_generate_async(script, - os, - config, - NULL, - test_generate_finish, - loop); + osinfo_install_script_generate_for_media_async(script, + media, + config, + NULL, + test_generate_for_media_finish, + loop); if (g_main_loop_is_running(loop)) g_main_loop_run(loop); @@ -172,7 +224,8 @@ START_TEST(test_script_data) unlink(BUILDDIR "/test/install-script-actual.txt"); fail_unless(error == NULL, error ? error->message : "none"); - g_object_unref(os); + g_object_unref(media); + g_object_unref(db); g_object_unref(config); g_object_unref(script); } @@ -225,7 +278,6 @@ START_TEST(test_script_datamap) osinfo_install_config_set_l10n_language(config, "fr_FR"); osinfo_install_config_set_l10n_timezone(config, "Europe/Paris"); - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); osinfo_entity_set_param(OSINFO_ENTITY(os), OSINFO_PRODUCT_PROP_SHORT_ID, -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:42 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:42 +0100 Subject: [Libosinfo] [PATCH 07/10] tools, install-script: Allow arg to be a media file In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-8-git-send-email-zeeshanak@gnome.org> Now that we have API to generate scripts for specific media and since its the recommended path to generating scripts, let's allow users of this tool to provide an installer or live media as argument. --- tools/osinfo-install-script.c | 56 ++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c index 5d5f0e2..96f7bc4 100644 --- a/tools/osinfo-install-script.c +++ b/tools/osinfo-install-script.c @@ -220,7 +220,7 @@ static gboolean list_script_inj_method(OsinfoOs *os) } -static gboolean generate_script(OsinfoOs *os) +static gboolean generate_script(OsinfoOs *os, OsinfoMedia *media) { OsinfoInstallScriptList *scripts = osinfo_os_get_install_script_list(os); OsinfoInstallScriptList *profile_scripts; @@ -253,12 +253,21 @@ static gboolean generate_script(OsinfoOs *os) if (prefix) osinfo_install_script_set_output_prefix(script, prefix); - osinfo_install_script_generate_output(script, - os, - config, - dir, - NULL, - &error); + if (media != NULL) { + osinfo_install_script_generate_output_for_media(script, + media, + config, + dir, + NULL, + &error); + } else { + osinfo_install_script_generate_output(script, + os, + config, + dir, + NULL, + &error); + } if (error != NULL) { g_printerr(_("Unable to generate install script: %s\n"), error->message ? error->message : "unknown"); @@ -287,6 +296,7 @@ gint main(gint argc, gchar **argv) OsinfoLoader *loader = NULL; OsinfoDb *db = NULL; OsinfoOs *os = NULL; + OsinfoMedia *media = NULL; gint ret = 0; setlocale(LC_ALL, ""); @@ -338,11 +348,22 @@ gint main(gint argc, gchar **argv) } db = osinfo_loader_get_db(loader); - os = find_os(db, argv[1]); - if (!os) { - g_printerr(_("Error finding OS: %s\n"), argv[1]); - ret = -4; - goto EXIT; + + /* First assume its a path to a media that can be indentified */ + media = osinfo_media_create_from_location(argv[1], NULL, NULL); + if (media != NULL) + if (!osinfo_db_identify_media (db, media)) + media = NULL; + + if (media == NULL) { + os = find_os(db, argv[1]); + if (!os) { + g_printerr(_("Error finding OS: %s\n"), argv[1]); + ret = -4; + goto EXIT; + } + } else { + os = osinfo_media_get_os (media); } if (list_config) { @@ -361,7 +382,7 @@ gint main(gint argc, gchar **argv) goto EXIT; } } else { - if (!generate_script(os)) { + if (!generate_script(os, media)) { ret = -5; goto EXIT; } @@ -370,6 +391,8 @@ gint main(gint argc, gchar **argv) EXIT: if (config) g_object_unref(config); + if (media != NULL) + g_object_unref(media); g_clear_error(&error); g_clear_object(&loader); g_option_context_free(context); @@ -386,13 +409,14 @@ osinfo-install-script - generate a script for automated installation =head1 SYNOPSIS -osinfo-install-script [OPTIONS...] OS-ID +osinfo-install-script [OPTIONS...] MEDIA-FILE|OS-ID =head1 DESCRIPTION Generate a script suitable for performing an automated installation -of C. C should be a URI identifying the operating -system, or its short ID. +for C or C. C should be a path to an +installer or live media (typically an ISO file). C should be +a URI identifying the operating system, or its short ID. By default a script will be generated for a C style install. -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:43 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:43 +0100 Subject: [Libosinfo] [PATCH 08/10] fedora: Separate variant for F21 netiso In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-9-git-send-email-zeeshanak@gnome.org> --- data/oses/fedora.xml.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in index 9eaa691..b41c84d 100644 --- a/data/oses/fedora.xml.in +++ b/data/oses/fedora.xml.in @@ -3907,6 +3907,9 @@ <_name>Fedora 21 Server + + <_name>Fedora 21 + <_name>Fedora 21 Cloud @@ -3971,9 +3974,14 @@ isolinux/initrd.img - + - + http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/i386/iso/Fedora-Server-netinst-i386-21.iso Fedora-S.*21.*-i386 @@ -3984,7 +3992,7 @@ isolinux/initrd.img - + http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/x86_64/iso/Fedora-Server-netinst-x86_64-21.iso Fedora-S.*-21.*-x86_64 -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:45 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:45 +0100 Subject: [Libosinfo] [PATCH 10/10] fedora: Enable installer scripts for F21 In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-11-git-send-email-zeeshanak@gnome.org> Now that these scripts work for at least one of the variants (which was always the case for all Fedora versions we supported the installer scripts for anyway), let's enable them. --- data/oses/fedora.xml.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in index b41c84d..2e4b898 100644 --- a/data/oses/fedora.xml.in +++ b/data/oses/fedora.xml.in @@ -4075,11 +4075,10 @@ - - + -- 2.1.0 From zeeshanak at gnome.org Thu May 7 16:36:44 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Thu, 7 May 2015 17:36:44 +0100 Subject: [Libosinfo] [PATCH 09/10] fedora,script: Correctly handle netiso In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431016605-24446-10-git-send-email-zeeshanak@gnome.org> The fedora install script was written for and tested against installer DVDs so it does not work for netiso. This patch fixes the issue by removing the install method commands and adding remote repos if the media is detected to be a netiso. https://bugzilla.redhat.com/show_bug.cgi?id=1178787 --- data/install-scripts/fedora.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml index c4264e5..ec37005 100644 --- a/data/install-scripts/fedora.xml +++ b/data/install-scripts/fedora.xml @@ -94,8 +94,10 @@ # Install script for profile + install cdrom + text keyboard '' lang @@ -127,6 +129,12 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow logvol / --fstype --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow reboot + +repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch +repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch + + %packages @@ -250,8 +258,10 @@ reboot # Install script for profile + install cdrom + keyboard '' lang network --onboot yes --bootproto dhcp --noipv6 --hostname= @@ -274,6 +284,12 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow logvol / --fstype --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow reboot + +repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch +repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch + + %packages -- 2.1.0 From cfergeau at redhat.com Mon May 11 08:17:06 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 11 May 2015 10:17:06 +0200 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: <55440030.4060804@redhat.com> References: <55440030.4060804@redhat.com> Message-ID: <20150511081706.GA4970@edamame.cdg.redhat.com> Hey, On Fri, May 01, 2015 at 06:37:36PM -0400, Cole Robinson wrote: > Hey all, > > Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are > still available for direct download, just at a different URL. All the details > are here: > > https://fedoraproject.org/wiki/Windows_Virtio_Drivers Ah cool, thanks for the heads up! Couple of comments: - the stable version is -0.96, the latest one is -0.103. alt.fedoraproject.org had -0.100 I assume this was not considered stable? - any reason not to ship SPICE vdagent while shipping the QXL driver? - has there been any testing of the qxldod driver? My understanding is that it's still a bit young (but wider exposure/testing is probably good at this point). > FWIW the rpm and iso now match the layout of what we ship with RHEL, and match > the content (except still no WHQL signature). The QXL driver should have a WHQL signature, do you know if that is the case? The latest builds uploaded to spice-space.org did have the WHQL signature. > The most obvious bit is keying in spice-guest-tools to this. Is > spice-guest-tools buildable with mingw? Generating a new spice-guest-tools > with every virtio-win build would be pretty cool Once you have all the drivers/agent binaries, the installer by itself can be built on a linux box with mingw32-nsis. Fetching the drivers/putting them in the right directory structure is still half manual/half automated at this point, so a bit more work might be needed, but this should definitely be doable. Tracking new vdagent releases/QXL releases might need to be done manually though. Well, we'll see, all in all, interesting idea ;) Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon May 11 08:22:28 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 11 May 2015 10:22:28 +0200 Subject: [Libosinfo] Installer for Fedora netiso/F21 In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <20150511082228.GB4970@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:35PM +0100, Zeeshan Ali (Khattak) wrote: > This series of patches make installer scripts working for Fedora 21 netiso. Unfortunately this couldn't have been handled (nicely) without addition of new API. So apps will have to change code to fix installer for Fedora 21. Things still yet to be addressed: > > * Install scripts are still only associated with os entries but installer scripts don't work for all medias/variants. This is not a new problem though. For example our Fedora script was never working for netiso but we still advertised it as such (or at least we didn't inform apps in any way about this). > > I think we'll need API to optionally associate installer to variants to fix this issue. > > * Netiso requires internet and we don't have any API to inform app about this. We already have API to inform apps that an installer (always) require internet but not if its the media that requires it. > > The solution here would simply be to add 'needs-internet' param/api to media entries IMO. Once you have a way of associating install scripts with variants, isn't it a matter of having an install script with 'needs-internet' set for the installer associated with the net-install medias? Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Mon May 11 11:08:50 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Mon, 11 May 2015 12:08:50 +0100 Subject: [Libosinfo] Installer for Fedora netiso/F21 In-Reply-To: <20150511082228.GB4970@edamame.cdg.redhat.com> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <20150511082228.GB4970@edamame.cdg.redhat.com> Message-ID: On Mon, May 11, 2015 at 9:22 AM, Christophe Fergeau wrote: > On Thu, May 07, 2015 at 05:36:35PM +0100, Zeeshan Ali (Khattak) wrote: >> This series of patches make installer scripts working for Fedora 21 netiso. Unfortunately this couldn't have been handled (nicely) without addition of new API. So apps will have to change code to fix installer for Fedora 21. Things still yet to be addressed: >> >> * Install scripts are still only associated with os entries but installer scripts don't work for all medias/variants. This is not a new problem though. For example our Fedora script was never working for netiso but we still advertised it as such (or at least we didn't inform apps in any way about this). >> >> I think we'll need API to optionally associate installer to variants to fix this issue. >> >> * Netiso requires internet and we don't have any API to inform app about this. We already have API to inform apps that an installer (always) require internet but not if its the media that requires it. >> >> The solution here would simply be to add 'needs-internet' param/api to media entries IMO. > > Once you have a way of associating install scripts with variants, isn't > it a matter of having an install script with 'needs-internet' set for > the installer associated with the net-install medias? No since install scripts could be associated with multiple variants, some of which might require internet and some not. Its just a coincidence that Fedora installer isn't associated with both net and DVD installer. Also media requires internet even if installer script isn't used with it, which is the case with netiso. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Mon May 11 15:58:14 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 11 May 2015 17:58:14 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <1431016605-24446-2-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-2-git-send-email-zeeshanak@gnome.org> Message-ID: <20150511155814.GG3352@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:36PM +0100, Zeeshan Ali (Khattak) wrote: > --- > osinfo/osinfo_install_script.c | 41 ++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 40 insertions(+), 1 deletion(-) > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index 9304b97..a6a5bab 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -891,7 +891,19 @@ static void osinfo_install_script_template_loaded(GObject *src, > g_free(uri); > } > > - > +/** > + * osinfo_install_script_generate_async: > + * @script: the install script > + * @os: the os Here @os is "the os" > > +/** > + * osinfo_install_script_generate: > + * @script: the install script > + * @os: the os entity and here it's "the os entity". > + * @config: the install script config > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @error: The location where to store any error, or %NULL > + * > + * Creates an install script. > + * > + * Returns: (transfer full): the script as string. > + */ > gchar *osinfo_install_script_generate(OsinfoInstallScript *script, > OsinfoOs *os, > OsinfoInstallConfig *config, > @@ -1101,6 +1125,21 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, > } > } > > +/** > + * osinfo_install_script_generate_output_async: > + * @script: the install script > + * @os: the os ditto Ack with this discrepancy fixed. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From crobinso at redhat.com Mon May 11 16:19:05 2015 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 11 May 2015 12:19:05 -0400 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: <20150511081706.GA4970@edamame.cdg.redhat.com> References: <55440030.4060804@redhat.com> <20150511081706.GA4970@edamame.cdg.redhat.com> Message-ID: <5550D679.4050806@redhat.com> On 05/11/2015 04:17 AM, Christophe Fergeau wrote: > Hey, > > On Fri, May 01, 2015 at 06:37:36PM -0400, Cole Robinson wrote: >> Hey all, >> >> Wanted to give a heads up about a new repo with virtio-win RPMs. Isos are >> still available for direct download, just at a different URL. All the details >> are here: >> >> https://fedoraproject.org/wiki/Windows_Virtio_Drivers > > Ah cool, thanks for the heads up! > > Couple of comments: > - the stable version is -0.96, the latest one is -0.103. > alt.fedoraproject.org had -0.100 I assume this was not considered > stable? The stable/ name is really only 'this is the latest version that shipped with the latest RHEL release'. It has a higher stability guarantee because the bits passed RH QE, but beyond that you have to look at the actual build changes to judge whether later builds are less trust worthy. In this case, I think build -100 had a few additional bug fixes but not any major changes, so it should be reliable, but it doesn't strictly meet the 'stable' definition I listed above. > - any reason not to ship SPICE vdagent while shipping the QXL driver? For starters we just duplicated RHEL content, and historically RHEL hasn't shipped it. There's a few internal bugs I included you on where it's being discussed. But mostly I think it's a case of 'nobody made it happen yet'. (It may make sense to diverge the RHEL and Fedora bits at some point, but only after an explicit discussion) > - has there been any testing of the qxldod driver? My understanding is > that it's still a bit young (but wider exposure/testing is probably > good at this point). > It has had some RH QE testing, and I know some users have been consuming the builds that vadim has published on his people page. But it hasn't been submitted to WHQL yet or shipped in a RHEL release, and there's no clear timeline when that will be. So it's still very much pre-release state. That said if people want to give it a shot and report issues, it might help move things along, it's under active development >> FWIW the rpm and iso now match the layout of what we ship with RHEL, and match >> the content (except still no WHQL signature). > > The QXL driver should have a WHQL signature, do you know if that is the > case? The latest builds uploaded to spice-space.org did have the WHQL > signature. > My scripts are set up to watch for and consume internal prewhql builds for qxl, not the spice-space content. That probably explains the discrepancy. >> The most obvious bit is keying in spice-guest-tools to this. Is >> spice-guest-tools buildable with mingw? Generating a new spice-guest-tools >> with every virtio-win build would be pretty cool > > Once you have all the drivers/agent binaries, the installer by itself > can be built on a linux box with mingw32-nsis. Fetching the > drivers/putting them in the right directory structure is still half > manual/half automated at this point, so a bit more work might be needed, > but this should definitely be doable. Tracking new vdagent releases/QXL > releases might need to be done manually though. Well, we'll see, all in > all, interesting idea ;) > Rearranging files is about 80% of the iso/rpm build process anyways, so hopefully it's not much more work to have my scripts spit out the needed spice-guest-tools layout as well. Do you have a description of the file layout, or a pointer to the code that moves the files around? Thanks, Cole From cfergeau at redhat.com Tue May 12 09:47:18 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 11:47:18 +0200 Subject: [Libosinfo] New virtio-win repo and isos In-Reply-To: <5550D679.4050806@redhat.com> References: <55440030.4060804@redhat.com> <20150511081706.GA4970@edamame.cdg.redhat.com> <5550D679.4050806@redhat.com> Message-ID: <20150512094718.GN3352@edamame.cdg.redhat.com> On Mon, May 11, 2015 at 12:19:05PM -0400, Cole Robinson wrote: > Rearranging files is about 80% of the iso/rpm build process anyways, so > hopefully it's not much more work to have my scripts spit out the needed > spice-guest-tools layout as well. Do you have a description of the file > layout, or a pointer to the code that moves the files around? I'll just change the installer code to use your layout, should not be too hard. The current layout is ${winver}/${arch}, yours is ${drivername}/${winver}/${arch}, so the bigger change will be to prepend the driver name to the driver path. The script moving around the drivers is http://cgit.freedesktop.org/~teuf/spice-nsis/tree/tools/virtio.py Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 11:31:33 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 13:31:33 +0200 Subject: [Libosinfo] [PATCH 02/10] Add osinfo_install_script_generate_for_media*() In-Reply-To: <1431016605-24446-3-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-3-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512113133.GA4913@edamame.cdg.redhat.com> Hey, On Thu, May 07, 2015 at 05:36:37PM +0100, Zeeshan Ali (Khattak) wrote: > Add API that allows apps to pass the media matched against the OS they > are generating the script for. Scripts can use this information to make > decisions about how installation should be setup. For example, we are > going to use this in the Fedora installer script to decide whether to > install from ISO or from network, based on whether or not media is a > network installer. > --- > osinfo/libosinfo.syms | 4 + > osinfo/osinfo_install_script.c | 197 ++++++++++++++++++++++++++++++++++++----- > osinfo/osinfo_install_script.h | 16 ++++ > 3 files changed, 196 insertions(+), 21 deletions(-) > > diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms > index 2dba411..ba4c020 100644 > --- a/osinfo/libosinfo.syms > +++ b/osinfo/libosinfo.syms > @@ -507,6 +507,10 @@ LIBOSINFO_0.2.11 { > > LIBOSINFO_0.2.12 { > global: > + osinfo_install_script_generate_for_media; > + osinfo_install_script_generate_for_media_async; > + osinfo_install_script_generate_for_media_finish; > + > osinfo_media_get_volume_size; > } LIBOSINFO_0.2.11; > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index a6a5bab..621c56f 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -533,6 +533,7 @@ OsinfoAvatarFormat *osinfo_install_script_get_avatar_format(OsinfoInstallScript > struct _OsinfoInstallScriptGenerateData { > GSimpleAsyncResult *res; > OsinfoOs *os; > + OsinfoMedia *media; > OsinfoInstallConfig *config; > OsinfoInstallScript *script; > }; > @@ -541,6 +542,8 @@ struct _OsinfoInstallScriptGenerateData { > static void osinfo_install_script_generate_data_free(OsinfoInstallScriptGenerateData *data) > { > g_object_unref(data->os); > + if (data->media != NULL) > + g_object_unref(data->media); > g_object_unref(data->config); > g_object_unref(data->script); > g_object_unref(data->res); > @@ -731,6 +734,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > > static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript *script, > OsinfoOs *os, > + OsinfoMedia *media, > OsinfoInstallConfig *config, > const gchar *node_name, > GError **error) > @@ -767,6 +771,19 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > } > > + if (media != NULL) { > + if (!(node = osinfo_install_script_generate_entity_xml(script, > + OSINFO_ENTITY(media), > + "media", > + error))) > + goto error; > + if (!(xmlAddChild(root, node))) { > + xmlErrorPtr err = xmlGetLastError(); > + g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); Error message could most likely be better, eg "Unable to set 'media' node: %s" > + goto error; > + } > + } > + > if (!(node = osinfo_install_script_generate_entity_xml(script, > OSINFO_ENTITY(config), > "config", > @@ -819,6 +836,7 @@ static gchar *osinfo_install_script_apply_xslt(xsltStylesheetPtr ss, > > static gboolean osinfo_install_script_apply_template(OsinfoInstallScript *script, > OsinfoOs *os, > + OsinfoMedia *media, > const gchar *templateUri, > const gchar *template, > const gchar *node_name, > @@ -828,7 +846,7 @@ static gboolean osinfo_install_script_apply_template(OsinfoInstallScript *script > { > gboolean ret = FALSE; > xsltStylesheetPtr templateXsl = osinfo_install_script_load_template(templateUri, template, error); > - xmlDocPtr configXml = osinfo_install_script_generate_config_xml(script, os, config, node_name, error); > + xmlDocPtr configXml = osinfo_install_script_generate_config_xml(script, os, media, config, node_name, error); > > if (!templateXsl || !configXml) > goto cleanup; > @@ -871,6 +889,7 @@ static void osinfo_install_script_template_loaded(GObject *src, > > if (!osinfo_install_script_apply_template(data->script, > data->os, > + data->media, > uri, > input, > "install-script-config", > @@ -891,43 +910,35 @@ static void osinfo_install_script_template_loaded(GObject *src, > g_free(uri); > } > > -/** > - * osinfo_install_script_generate_async: > - * @script: the install script > - * @os: the os > - * @config: the install script config > - * @cancellable: (allow-none): a #GCancellable, or %NULL > - * @callback: Function to call when result of this call is ready > - * @user_data: The user data to pass to @callback, or %NULL > - * > - * Asynchronous variant of #osinfo_install_script_generate(). From the callback, > - * call #osinfo_install_script_generate_finish() to conclude this call and get > - * the generated script. > - */ > -void osinfo_install_script_generate_async(OsinfoInstallScript *script, > - OsinfoOs *os, > - OsinfoInstallConfig *config, > - GCancellable *cancellable, > - GAsyncReadyCallback callback, > - gpointer user_data) > + > +static void osinfo_install_script_generate_async_common(OsinfoInstallScript *script, > + OsinfoOs *os, > + OsinfoMedia *media, > + OsinfoInstallConfig *config, > + GCancellable *cancellable, > + GAsyncReadyCallback callback, > + gpointer user_data) > { > OsinfoInstallScriptGenerateData *data = g_new0(OsinfoInstallScriptGenerateData, 1); > const gchar *templateData = osinfo_install_script_get_template_data(script); > const gchar *templateUri = osinfo_install_script_get_template_uri(script); > > data->os = g_object_ref(os); > + if (media != NULL) > + data->media = g_object_ref(media); > data->config = g_object_ref(config); > data->script = g_object_ref(script); > data->res = g_simple_async_result_new(G_OBJECT(script), > callback, > user_data, > - osinfo_install_script_generate_async); > + osinfo_install_script_generate_async_common); > > if (templateData) { > GError *error = NULL; > gchar *output; > if (!osinfo_install_script_apply_template(script, > os, > + media, > "", > templateData, > "install-script-config", > @@ -954,6 +965,35 @@ void osinfo_install_script_generate_async(OsinfoInstallScript *script, > } > } > > +/** > + * osinfo_install_script_generate_async: > + * @script: the install script > + * @os: the os > + * @config: the install script config > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @callback: Function to call when result of this call is ready > + * @user_data: The user data to pass to @callback, or %NULL > + * > + * Asynchronous variant of #osinfo_install_script_generate(). From the callback, > + * call #osinfo_install_script_generate_finish() to conclude this call and get > + * the generated script. > + */ > +void osinfo_install_script_generate_async(OsinfoInstallScript *script, > + OsinfoOs *os, > + OsinfoInstallConfig *config, > + GCancellable *cancellable, > + GAsyncReadyCallback callback, > + gpointer user_data) > +{ > + osinfo_install_script_generate_async_common(script, > + os, > + NULL, > + config, > + cancellable, > + callback, > + user_data); > +} > + > static gpointer osinfo_install_script_generate_finish_common(OsinfoInstallScript *script, > GAsyncResult *res, > GError **error) > @@ -986,6 +1026,25 @@ gchar *osinfo_install_script_generate_finish(OsinfoInstallScript *script, > } > > /** > + * osinfo_install_script_generate_for_media_finish: > + * @script: the install script > + * @res: a #GAsyncResult > + * @error: The location where to store any error, or NULL > + * > + * Returns: (transfer full): the generated script, or NULL on error > + * > + * Since: 0.2.12 > + */ > +gchar *osinfo_install_script_generate_for_media_finish(OsinfoInstallScript *script, > + GAsyncResult *res, > + GError **error) > +{ > + return osinfo_install_script_generate_finish_common(script, > + res, > + error); > +} > + > +/** > * osinfo_install_script_generate_output_finish: > * @script: the install script > * @res: a #GAsyncResult > @@ -1094,6 +1153,101 @@ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, > return data.output; > } > > +/** > + * osinfo_install_script_generate_for_media_async: > + * @script: the install script > + * @media: the media > + * @config: the install script config > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @callback: Function to call when result of this call is ready > + * @user_data: The user data to pass to @callback, or %NULL > + * > + * Asynchronous variant of #osinfo_install_script_generate_for_media(). From the > + * callback, call #osinfo_install_script_generate_for_media_finish() to > + * conclude this call and get the generated script. > + * > + * Since: 0.2.12 > + */ > +void osinfo_install_script_generate_for_media_async(OsinfoInstallScript *script, > + OsinfoMedia *media, > + OsinfoInstallConfig *config, > + GCancellable *cancellable, > + GAsyncReadyCallback callback, > + gpointer user_data) { > + OsinfoOs *os; > + > + g_return_if_fail (media != NULL); > + > + os = osinfo_media_get_os (media); > + g_return_if_fail (os != NULL); This bit could go in _async_common? > + > + osinfo_install_script_generate_async_common(script, > + os, > + media, > + config, > + cancellable, > + callback, > + user_data); > +} > + > +static void osinfo_install_script_generate_for_media_done(GObject *src, > + GAsyncResult *res, > + gpointer user_data) > +{ > + OsinfoInstallScriptGenerateSyncData *data = user_data; > + > + data->output = > + osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), > + res, > + &data->error); > + g_main_loop_quit(data->loop); > +} > + > +/** > + * osinfo_install_script_generate_for_media: > + * @script: the install script > + * @media: the media > + * @config: the install script config > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @error: The location where to store any error, or %NULL > + * > + * Creates an install script. The media @media must have been identified > + * successfully using #osinfo_db_identify_media() before calling this function. > + * > + * Returns: (transfer full): the script as string. > + * > + * Since: 0.2.12 > + */ > +gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, > + OsinfoMedia *media, > + OsinfoInstallConfig *config, > + GCancellable *cancellable, > + GError **error) > +{ > + GMainLoop *loop = g_main_loop_new(g_main_context_get_thread_default(), > + TRUE); > + OsinfoInstallScriptGenerateSyncData data = { > + loop, NULL, NULL, NULL > + }; > + > + osinfo_install_script_generate_for_media_async(script, > + media, > + config, > + cancellable, > + osinfo_install_script_generate_for_media_done, > + &data); > + > + if (g_main_loop_is_running(loop)) > + g_main_loop_run(loop); > + > + if (data.error) > + g_propagate_error(error, data.error); > + > + g_main_loop_unref(loop); > + > + return data.output; Any reason not to have a generate_for_media_common helper here? Looks good apart from these small details/questions. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 11:47:40 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 13:47:40 +0200 Subject: [Libosinfo] [PATCH 03/10] Add osinfo_install_script_generate_output_for_media*() In-Reply-To: <1431016605-24446-4-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-4-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512114740.GB4913@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:38PM +0100, Zeeshan Ali (Khattak) wrote: > Add variant of osinfo_install_script_generate_for_media*() that > generates the script into a file. > --- > osinfo/libosinfo.syms | 4 + > osinfo/osinfo_install_script.c | 250 +++++++++++++++++++++++++++++++++-------- > osinfo/osinfo_install_script.h | 17 +++ > 3 files changed, 224 insertions(+), 47 deletions(-) > > diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms > index ba4c020..3906f89 100644 > --- a/osinfo/libosinfo.syms > +++ b/osinfo/libosinfo.syms > @@ -511,6 +511,10 @@ LIBOSINFO_0.2.12 { > osinfo_install_script_generate_for_media_async; > osinfo_install_script_generate_for_media_finish; > > + osinfo_install_script_generate_output_for_media; > + osinfo_install_script_generate_output_for_media_async; > + osinfo_install_script_generate_output_for_media_finish; > + > osinfo_media_get_volume_size; > } LIBOSINFO_0.2.11; > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index 621c56f..a251557 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -1061,6 +1061,25 @@ GFile *osinfo_install_script_generate_output_finish(OsinfoInstallScript *script, > error); > } > > +/** > + * osinfo_install_script_generate_output_for_media_finish: > + * @script: the install script > + * @res: a #GAsyncResult > + * @error: The location where to store any error, or NULL > + * > + * Returns: (transfer full): a file containing the script, or NULL on error. > + * > + * Since: 0.2.12 > + */ > +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, > + GAsyncResult *res, > + GError **error) > +{ > + return osinfo_install_script_generate_finish_common(script, > + res, > + error); > +} > + > struct _OsinfoInstallScriptGenerateSyncData { > GMainLoop *loop; > GError *error; > @@ -1081,6 +1100,19 @@ static void osinfo_install_script_generate_output_done(GObject *src, > g_main_loop_quit(data->loop); > } > > +static void osinfo_install_script_generate_output_for_media_done(GObject *src, > + GAsyncResult *res, > + gpointer user_data) > +{ > + OsinfoInstallScriptGenerateSyncData *data = user_data; > + > + data->file = > + osinfo_install_script_generate_output_for_media_finish(OSINFO_INSTALL_SCRIPT(src), > + res, > + &data->error); > + g_main_loop_quit(data->loop); > +} > + > static void osinfo_install_script_generate_output_close_file(GObject *src, > GAsyncResult *res, > gpointer user_data) > @@ -1279,28 +1311,14 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, > } > } > > -/** > - * osinfo_install_script_generate_output_async: > - * @script: the install script > - * @os: the os > - * @config: the install script config > - * @output_dir: the directory where file containing the output script > - * will be written > - * @cancellable: (allow-none): a #GCancellable, or %NULL > - * @callback: Function to call when result of this call is ready > - * @user_data: The user data to pass to @callback, or %NULL > - * > - * Asynchronous variant of #osinfo_install_script_generate_output(). From the > - * callback, call #osinfo_install_script_generate_output_finish() to conclude > - * this call and get the generated script. > - */ > -void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, > - OsinfoOs *os, > - OsinfoInstallConfig *config, > - GFile *output_dir, > - GCancellable *cancellable, > - GAsyncReadyCallback callback, > - gpointer user_data) > +static void osinfo_install_script_generate_output_async_common(OsinfoInstallScript *script, > + OsinfoOs *os, > + OsinfoMedia *media, > + OsinfoInstallConfig *config, > + GFile *output_dir, > + GCancellable *cancellable, > + GAsyncReadyCallback callback, > + gpointer user_data) > { > const gchar *filename; > const gchar *prefix; > @@ -1312,15 +1330,23 @@ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, > data->res = g_simple_async_result_new(G_OBJECT(script), > callback, > user_data, > - osinfo_install_script_generate_output_async); > + osinfo_install_script_generate_output_async_common); > > data->cancellable = cancellable; > data->error = data_sync->error; > - data->output = osinfo_install_script_generate(script, > - os, > - config, > - cancellable, > - &data->error); > + if (media != NULL) { > + data->output = osinfo_install_script_generate_for_media (script, > + media, > + config, > + cancellable, > + &data->error); > + } else { > + data->output = osinfo_install_script_generate(script, > + os, > + config, > + cancellable, > + &data->error); > + } This is preexisting, but having an async function call into a sync function while an async variant exists is unexpected. All in all, looks good, Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:19:57 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:19:57 +0200 Subject: [Libosinfo] [PATCH 04/10] Add osinfo_install_script_generate_command_line_for_media() In-Reply-To: <1431016605-24446-5-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-5-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512121957.GC4913@edamame.cdg.redhat.com> ACK. On Thu, May 07, 2015 at 05:36:39PM +0100, Zeeshan Ali (Khattak) wrote: > Add variant of osinfo_install_script_generate_command_line() that takes > (an identified) media instead of an OS. Currently no commandline > template needs access to media but lets add this to be future safe and > be consistent with other osinfo_install_script_generation*() API. > --- > osinfo/libosinfo.syms | 2 ++ > osinfo/osinfo_install_script.c | 47 ++++++++++++++++++++++++++++++++++++++++++ > osinfo/osinfo_install_script.h | 3 +++ > 3 files changed, 52 insertions(+) > > diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms > index 3906f89..68d54ff 100644 > --- a/osinfo/libosinfo.syms > +++ b/osinfo/libosinfo.syms > @@ -507,6 +507,8 @@ LIBOSINFO_0.2.11 { > > LIBOSINFO_0.2.12 { > global: > + osinfo_install_script_generate_command_line_for_media; > + > osinfo_install_script_generate_for_media; > osinfo_install_script_generate_for_media_async; > osinfo_install_script_generate_for_media_finish; > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index a251557..66593bb 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -1588,6 +1588,53 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, > return output; > } > > +/** > + * osinfo_install_script_generate_command_line_for_media: > + * @script: the install script > + * @media: the media > + * @config: the install script config > + * > + * Some install scripts need to pass a command line to the kernel, Such install > + * scripts belong to OSs that provide paths to the kernel and initrd files that > + * can be used to directly boot > + * (http://wiki.qemu.org/download/qemu-doc.html#direct_005flinux_005fboot) > + * the OS in order to pass the needed commandline to it. > + * > + * The media @media must have been identified successfully using > + * #osinfo_db_identify_media() before calling this function. > + * > + * Returns: (transfer full): The generated command line string, NULL otherwise. > + */ > +gchar *osinfo_install_script_generate_command_line_for_media(OsinfoInstallScript *script, > + OsinfoMedia *media, > + OsinfoInstallConfig *config) > +{ > + const gchar *templateData = osinfo_install_script_get_template_data(script); > + gchar *output = NULL; > + OsinfoOs *os; > + > + g_return_val_if_fail (media != NULL, NULL); > + > + os = osinfo_media_get_os (media); > + g_return_val_if_fail (os != NULL, NULL); > + > + if (templateData) { > + GError *error = NULL; > + if (!osinfo_install_script_apply_template(script, > + os, > + media, > + "", > + templateData, > + "command-line", > + &output, > + config, > + &error)) { > + g_prefix_error(&error, "%s", _("Failed to apply script template: ")); > + } > + } > + > + return output; > +} > > OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *script) > { > diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h > index 0a6afcb..c494192 100644 > --- a/osinfo/osinfo_install_script.h > +++ b/osinfo/osinfo_install_script.h > @@ -235,6 +235,9 @@ GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *scri > gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, > OsinfoOs *os, > OsinfoInstallConfig *config); > +gchar *osinfo_install_script_generate_command_line_for_media(OsinfoInstallScript *script, > + OsinfoMedia *media, > + OsinfoInstallConfig *config); > > gboolean osinfo_install_script_has_config_param(const OsinfoInstallScript *script, const OsinfoInstallConfigParam *config_param); > > -- > 2.1.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:28:47 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:28:47 +0200 Subject: [Libosinfo] [PATCH 06/10] tests: Pass media to script generator In-Reply-To: <1431016605-24446-7-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-7-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512122847.GD4913@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:41PM +0100, Zeeshan Ali (Khattak) wrote: > Now that we have an API to pass media to script generation methods, let's > test that API instead since its not only the recommended API but also this > way we get to test both passing of OS and media information to script > template. > > One of the test cases still uses the existing API on purpose to keep the > case of 'no media available' covered as well. > --- > .../dbdata/install-scripts/test-install-script.xml | 6 ++ > test/dbdata/oses/test-os-data.xml | 23 +++++ > test/install-script.xsl | 7 +- > test/test-install-script.c | 98 +++++++++++++++++----- > 4 files changed, 110 insertions(+), 24 deletions(-) > create mode 100644 test/dbdata/oses/test-os-data.xml > > diff --git a/test/dbdata/install-scripts/test-install-script.xml b/test/dbdata/install-scripts/test-install-script.xml > index 48469ef..e3c05b7 100644 > --- a/test/dbdata/install-scripts/test-install-script.xml > +++ b/test/dbdata/install-scripts/test-install-script.xml > @@ -16,6 +16,12 @@ > > > > +# OS id= > +# > + Media id= > + Unknown media > + > +# Profile: > keyboard > lang > timezone --utc > diff --git a/test/dbdata/oses/test-os-data.xml b/test/dbdata/oses/test-os-data.xml > new file mode 100644 > index 0000000..88ef431 > --- /dev/null > +++ b/test/dbdata/oses/test-os-data.xml > @@ -0,0 +1,23 @@ > + > + > + > + fedora16 > + Fedora 16 > + 16 > + Fedora Project > + linux > + fedora > + Verne > + > + > + http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/i386/iso/Fedora-16-i386-DVD.iso > + > + Fedora 16 i386 DVD > + LINUX > + 3806375936 > + > + isolinux/vmlinuz > + isolinux/initrd.img > + > + > + > diff --git a/test/install-script.xsl b/test/install-script.xsl > index f52e99f..f355152 100644 > --- a/test/install-script.xsl > +++ b/test/install-script.xsl > @@ -6,7 +6,12 @@ > > > > -# OS id= profile > +# OS id= > +# > + Media id= > + Unknown media > + > +# Profile: > install > text > keyboard > diff --git a/test/test-install-script.c b/test/test-install-script.c > index 4da3bb4..c067e9d 100644 > --- a/test/test-install-script.c > +++ b/test/test-install-script.c > @@ -30,7 +30,9 @@ static GError *error = NULL; > static gchar *actualData = NULL; > static const gchar *expectData = \ > "\n" \ > - "# OS id=http://fedoraproject.org/fedora/16 profile jeos\n" \ > + "# OS id=http://fedoraproject.org/fedora/16\n" \ > + "# Media id=http://fedoraproject.org/fedora/16:0\n" \ > + "# Profile: jeos\n" \ > "install\n" \ > "text\n" \ > "keyboard uk\n" \ > @@ -58,10 +60,26 @@ static const gchar *expectData = \ > > static const gchar *expectData2 = \ > "\n" \ > + "# OS id=http://fedoraproject.org/fedora/16\n" \ > + "# Unknown media\n" \ > + "# Profile: jeos\n" \ > "keyboard FOOBAR\n" \ > "lang French\n" \ > "timezone --utc Europe/Paris"; > > +static void test_generate_for_media_finish(GObject *src, > + GAsyncResult *res, > + gpointer user_data) > +{ > + GMainLoop *loop = user_data; > + > + actualData = osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), > + res, > + &error); > + > + g_main_loop_quit(loop); > +} > + > static void test_generate_finish(GObject *src, > GAsyncResult *res, > gpointer user_data) > @@ -100,23 +118,41 @@ START_TEST(test_script_file) > { > OsinfoInstallScript *script; > OsinfoInstallConfig *config = test_get_config(); > - OsinfoOs *os; > + OsinfoLoader *loader = osinfo_loader_new(); > + OsinfoDb *db; > + OsinfoMedia *media; > GMainLoop *loop; > > script = osinfo_install_script_new_uri("http://example.com", > "jeos", > "file://" SRCDIR "/test/install-script.xsl"); > > + osinfo_loader_process_path(loader, SRCDIR "/test/dbdata", &error); > + fail_unless(error == NULL, error ? error->message : "none"); > + db = g_object_ref(osinfo_loader_get_db(loader)); > + g_object_unref(loader); > + > loop = g_main_loop_new(g_main_context_get_thread_default(), > TRUE); > > - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); > - osinfo_install_script_generate_async(script, > - os, > - config, > - NULL, > - test_generate_finish, > - loop); > + media = osinfo_media_new("http://fedoraproject.org/fedora/16:0", "i686"); > + osinfo_entity_set_param(OSINFO_ENTITY (media), > + OSINFO_MEDIA_PROP_VOLUME_ID, > + "Fedora 16 i386 DVD"); > + osinfo_entity_set_param(OSINFO_ENTITY (media), > + OSINFO_MEDIA_PROP_SYSTEM_ID, > + "LINUX"); > + osinfo_entity_set_param_int64(OSINFO_ENTITY (media), > + OSINFO_MEDIA_PROP_VOLUME_SIZE, > + 3806375936); > + fail_unless(osinfo_db_identify_media (db, media), "Failed to identify media"); > + This bit seems duplicated below, I'd tend to have a small helper to create the media/identify it. ACK either way. > + osinfo_install_script_generate_for_media_async(script, > + media, > + config, > + NULL, > + test_generate_for_media_finish, > + loop); > > if (g_main_loop_is_running(loop)) > g_main_loop_run(loop); > @@ -127,7 +163,8 @@ START_TEST(test_script_file) > fail_unless(strcmp(actualData, expectData) == 0, "Actual '%s' match expect '%s'", > actualData, expectData); > > - g_object_unref(os); > + g_object_unref(media); > + g_object_unref(db); > g_object_unref(config); > g_object_unref(script); > g_main_loop_unref(loop); > @@ -140,7 +177,9 @@ START_TEST(test_script_data) > { > OsinfoInstallScript *script; > OsinfoInstallConfig *config = test_get_config(); > - OsinfoOs *os; > + OsinfoLoader *loader = osinfo_loader_new(); > + OsinfoDb *db; > + OsinfoMedia *media; > GMainLoop *loop; > GFile *file = g_file_new_for_uri("file://" SRCDIR "/test/install-script.xsl"); > gchar *data; > @@ -148,10 +187,23 @@ START_TEST(test_script_data) > g_file_load_contents(file, NULL, &data, NULL, NULL, &error); > fail_unless(error == NULL, error ? error->message : "none"); > > - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); > - osinfo_entity_set_param(OSINFO_ENTITY(os), > - OSINFO_PRODUCT_PROP_SHORT_ID, > - "fedora16"); > + osinfo_loader_process_path(loader, SRCDIR "/test/dbdata", &error); > + fail_unless(error == NULL, error ? error->message : "none"); > + db = g_object_ref(osinfo_loader_get_db(loader)); > + g_object_unref(loader); > + > + media = osinfo_media_new("http://fedoraproject.org/fedora/16:0", "i686"); > + osinfo_entity_set_param(OSINFO_ENTITY (media), > + OSINFO_MEDIA_PROP_VOLUME_ID, > + "Fedora 16 i386 DVD"); > + osinfo_entity_set_param(OSINFO_ENTITY (media), > + OSINFO_MEDIA_PROP_SYSTEM_ID, > + "LINUX"); > + osinfo_entity_set_param_int64(OSINFO_ENTITY (media), > + OSINFO_MEDIA_PROP_VOLUME_SIZE, > + 3806375936); > + fail_unless(osinfo_db_identify_media (db, media), "Failed to identify media"); > + > script = osinfo_install_script_new_data("http://example.com", > "jeos", > data); > @@ -159,12 +211,12 @@ START_TEST(test_script_data) > loop = g_main_loop_new(g_main_context_get_thread_default(), > TRUE); > > - osinfo_install_script_generate_async(script, > - os, > - config, > - NULL, > - test_generate_finish, > - loop); > + osinfo_install_script_generate_for_media_async(script, > + media, > + config, > + NULL, > + test_generate_for_media_finish, > + loop); > > if (g_main_loop_is_running(loop)) > g_main_loop_run(loop); > @@ -172,7 +224,8 @@ START_TEST(test_script_data) > unlink(BUILDDIR "/test/install-script-actual.txt"); > fail_unless(error == NULL, error ? error->message : "none"); > > - g_object_unref(os); > + g_object_unref(media); > + g_object_unref(db); > g_object_unref(config); > g_object_unref(script); > } > @@ -225,7 +278,6 @@ START_TEST(test_script_datamap) > osinfo_install_config_set_l10n_language(config, "fr_FR"); > osinfo_install_config_set_l10n_timezone(config, "Europe/Paris"); > > - > os = osinfo_os_new("http://fedoraproject.org/fedora/16"); > osinfo_entity_set_param(OSINFO_ENTITY(os), > OSINFO_PRODUCT_PROP_SHORT_ID, > -- > 2.1.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:31:07 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:31:07 +0200 Subject: [Libosinfo] [PATCH 05/10] Recommend osinfo_install_script_generate_*for_media() In-Reply-To: <1431016605-24446-6-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-6-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512123107.GE4913@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:40PM +0100, Zeeshan Ali (Khattak) wrote: > Recommend the use of the new script generation API that takes an > identified media object as arugment rather than OS, in the docs. > --- > osinfo/osinfo_install_script.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index 66593bb..5b1ee4f 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -977,6 +977,10 @@ static void osinfo_install_script_generate_async_common(OsinfoInstallScript *scr > * Asynchronous variant of #osinfo_install_script_generate(). From the callback, > * call #osinfo_install_script_generate_finish() to conclude this call and get > * the generated script. > + * > + * If you are generating the script for a specific media, it is highly > + * recommended that you use #osinfo_install_script_generate_for_media_async() > + * instead. I'd tend to drop the 'highly', but ACK either way. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:37:43 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:37:43 +0200 Subject: [Libosinfo] [PATCH 07/10] tools, install-script: Allow arg to be a media file In-Reply-To: <1431016605-24446-8-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-8-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512123743.GF4913@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:42PM +0100, Zeeshan Ali (Khattak) wrote: > Now that we have API to generate scripts for specific media and since > its the recommended path to generating scripts, let's allow users of "it is", not "its" > this tool to provide an installer or live media as argument. > --- > tools/osinfo-install-script.c | 56 ++++++++++++++++++++++++++++++------------- > 1 file changed, 40 insertions(+), 16 deletions(-) > > diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c > index 5d5f0e2..96f7bc4 100644 > --- a/tools/osinfo-install-script.c > +++ b/tools/osinfo-install-script.c > @@ -220,7 +220,7 @@ static gboolean list_script_inj_method(OsinfoOs *os) > } > > > -static gboolean generate_script(OsinfoOs *os) > +static gboolean generate_script(OsinfoOs *os, OsinfoMedia *media) > { > OsinfoInstallScriptList *scripts = osinfo_os_get_install_script_list(os); > OsinfoInstallScriptList *profile_scripts; > @@ -253,12 +253,21 @@ static gboolean generate_script(OsinfoOs *os) > if (prefix) > osinfo_install_script_set_output_prefix(script, prefix); > > - osinfo_install_script_generate_output(script, > - os, > - config, > - dir, > - NULL, > - &error); > + if (media != NULL) { > + osinfo_install_script_generate_output_for_media(script, > + media, > + config, > + dir, > + NULL, > + &error); > + } else { > + osinfo_install_script_generate_output(script, > + os, > + config, > + dir, > + NULL, > + &error); > + } > if (error != NULL) { > g_printerr(_("Unable to generate install script: %s\n"), > error->message ? error->message : "unknown"); > @@ -287,6 +296,7 @@ gint main(gint argc, gchar **argv) > OsinfoLoader *loader = NULL; > OsinfoDb *db = NULL; > OsinfoOs *os = NULL; > + OsinfoMedia *media = NULL; > gint ret = 0; > > setlocale(LC_ALL, ""); > @@ -338,11 +348,22 @@ gint main(gint argc, gchar **argv) > } > > db = osinfo_loader_get_db(loader); > - os = find_os(db, argv[1]); > - if (!os) { > - g_printerr(_("Error finding OS: %s\n"), argv[1]); > - ret = -4; > - goto EXIT; > + > + /* First assume its a path to a media that can be indentified */ s/its/it is/ s/indentified/identified/ > + media = osinfo_media_create_from_location(argv[1], NULL, NULL); > + if (media != NULL) > + if (!osinfo_db_identify_media (db, media)) > + media = NULL; You are leaking 'media' here. > + > + if (media == NULL) { > + os = find_os(db, argv[1]); > + if (!os) { > + g_printerr(_("Error finding OS: %s\n"), argv[1]); > + ret = -4; > + goto EXIT; > + } > + } else { > + os = osinfo_media_get_os (media); > } > > if (list_config) { > @@ -361,7 +382,7 @@ gint main(gint argc, gchar **argv) > goto EXIT; > } > } else { > - if (!generate_script(os)) { > + if (!generate_script(os, media)) { > ret = -5; > goto EXIT; > } > @@ -370,6 +391,8 @@ gint main(gint argc, gchar **argv) > EXIT: > if (config) > g_object_unref(config); > + if (media != NULL) > + g_object_unref(media); > g_clear_error(&error); > g_clear_object(&loader); > g_option_context_free(context); > @@ -386,13 +409,14 @@ osinfo-install-script - generate a script for automated installation > > =head1 SYNOPSIS > > -osinfo-install-script [OPTIONS...] OS-ID > +osinfo-install-script [OPTIONS...] MEDIA-FILE|OS-ID > > =head1 DESCRIPTION > > Generate a script suitable for performing an automated installation > -of C. C should be a URI identifying the operating > -system, or its short ID. > +for C or C. C should be a path to an I'd tend to keep "of " rather than "for", but very not sure, both sound acceptable to me. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:38:44 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:38:44 +0200 Subject: [Libosinfo] [PATCH 08/10] fedora: Separate variant for F21 netiso In-Reply-To: <1431016605-24446-9-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-9-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512123844.GG4913@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:43PM +0100, Zeeshan Ali (Khattak) wrote: > --- > data/oses/fedora.xml.in | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in > index 9eaa691..b41c84d 100644 > --- a/data/oses/fedora.xml.in > +++ b/data/oses/fedora.xml.in > @@ -3907,6 +3907,9 @@ > > <_name>Fedora 21 Server > > + > + <_name>Fedora 21 > + Do we want a more specific name here which mentions it's a network install? ACK either way. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:39:06 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:39:06 +0200 Subject: [Libosinfo] [PATCH 10/10] fedora: Enable installer scripts for F21 In-Reply-To: <1431016605-24446-11-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-11-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512123906.GH4913@edamame.cdg.redhat.com> ACK. On Thu, May 07, 2015 at 05:36:45PM +0100, Zeeshan Ali (Khattak) wrote: > Now that these scripts work for at least one of the variants (which was > always the case for all Fedora versions we supported the installer > scripts for anyway), let's enable them. > --- > data/oses/fedora.xml.in | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in > index b41c84d..2e4b898 100644 > --- a/data/oses/fedora.xml.in > +++ b/data/oses/fedora.xml.in > @@ -4075,11 +4075,10 @@ > > > > - > - > + > > > > -- > 2.1.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:43:17 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:43:17 +0200 Subject: [Libosinfo] [PATCH 09/10] fedora, script: Correctly handle netiso In-Reply-To: <1431016605-24446-10-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-10-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512124317.GI4913@edamame.cdg.redhat.com> On Thu, May 07, 2015 at 05:36:44PM +0100, Zeeshan Ali (Khattak) wrote: > The fedora install script was written for and tested against installer > DVDs so it does not work for netiso. This patch fixes the issue by > removing the install method commands and adding remote repos if the > media is detected to be a netiso. > > https://bugzilla.redhat.com/show_bug.cgi?id=1178787 > --- > data/install-scripts/fedora.xml | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml > index c4264e5..ec37005 100644 > --- a/data/install-scripts/fedora.xml > +++ b/data/install-scripts/fedora.xml > @@ -94,8 +94,10 @@ > > > # Install script for profile > + Wouldn't be enough? ACK. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Tue May 12 12:55:45 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 12 May 2015 13:55:45 +0100 Subject: [Libosinfo] [PATCH 02/10] Add osinfo_install_script_generate_for_media*() In-Reply-To: <20150512113133.GA4913@edamame.cdg.redhat.com> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-3-git-send-email-zeeshanak@gnome.org> <20150512113133.GA4913@edamame.cdg.redhat.com> Message-ID: On Tue, May 12, 2015 at 12:31 PM, Christophe Fergeau wrote: > Hey, > > On Thu, May 07, 2015 at 05:36:37PM +0100, Zeeshan Ali (Khattak) wrote: >> Add API that allows apps to pass the media matched against the OS they >> are generating the script for. Scripts can use this information to make >> decisions about how installation should be setup. For example, we are >> going to use this in the Fedora installer script to decide whether to >> install from ISO or from network, based on whether or not media is a >> network installer. >> --- >> osinfo/libosinfo.syms | 4 + >> osinfo/osinfo_install_script.c | 197 ++++++++++++++++++++++++++++++++++++----- >> osinfo/osinfo_install_script.h | 16 ++++ >> 3 files changed, 196 insertions(+), 21 deletions(-) >> >> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms >> index 2dba411..ba4c020 100644 >> --- a/osinfo/libosinfo.syms >> +++ b/osinfo/libosinfo.syms >> @@ -507,6 +507,10 @@ LIBOSINFO_0.2.11 { >> >> LIBOSINFO_0.2.12 { >> global: >> + osinfo_install_script_generate_for_media; >> + osinfo_install_script_generate_for_media_async; >> + osinfo_install_script_generate_for_media_finish; >> + >> osinfo_media_get_volume_size; >> } LIBOSINFO_0.2.11; >> >> diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c >> index a6a5bab..621c56f 100644 >> --- a/osinfo/osinfo_install_script.c >> +++ b/osinfo/osinfo_install_script.c >> @@ -533,6 +533,7 @@ OsinfoAvatarFormat *osinfo_install_script_get_avatar_format(OsinfoInstallScript >> struct _OsinfoInstallScriptGenerateData { >> GSimpleAsyncResult *res; >> OsinfoOs *os; >> + OsinfoMedia *media; >> OsinfoInstallConfig *config; >> OsinfoInstallScript *script; >> }; >> @@ -541,6 +542,8 @@ struct _OsinfoInstallScriptGenerateData { >> static void osinfo_install_script_generate_data_free(OsinfoInstallScriptGenerateData *data) >> { >> g_object_unref(data->os); >> + if (data->media != NULL) >> + g_object_unref(data->media); >> g_object_unref(data->config); >> g_object_unref(data->script); >> g_object_unref(data->res); >> @@ -731,6 +734,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript >> >> static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript *script, >> OsinfoOs *os, >> + OsinfoMedia *media, >> OsinfoInstallConfig *config, >> const gchar *node_name, >> GError **error) >> @@ -767,6 +771,19 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * >> goto error; >> } >> >> + if (media != NULL) { >> + if (!(node = osinfo_install_script_generate_entity_xml(script, >> + OSINFO_ENTITY(media), >> + "media", >> + error))) >> + goto error; >> + if (!(xmlAddChild(root, node))) { >> + xmlErrorPtr err = xmlGetLastError(); >> + g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > > Error message could most likely be better, eg "Unable to set 'media' node: %s" Yeah, I just copied the existing error handers around it. >> +/** >> + * osinfo_install_script_generate_for_media_async: >> + * @script: the install script >> + * @media: the media >> + * @config: the install script config >> + * @cancellable: (allow-none): a #GCancellable, or %NULL >> + * @callback: Function to call when result of this call is ready >> + * @user_data: The user data to pass to @callback, or %NULL >> + * >> + * Asynchronous variant of #osinfo_install_script_generate_for_media(). From the >> + * callback, call #osinfo_install_script_generate_for_media_finish() to >> + * conclude this call and get the generated script. >> + * >> + * Since: 0.2.12 >> + */ >> +void osinfo_install_script_generate_for_media_async(OsinfoInstallScript *script, >> + OsinfoMedia *media, >> + OsinfoInstallConfig *config, >> + GCancellable *cancellable, >> + GAsyncReadyCallback callback, >> + gpointer user_data) { >> + OsinfoOs *os; >> + >> + g_return_if_fail (media != NULL); >> + >> + os = osinfo_media_get_os (media); >> + g_return_if_fail (os != NULL); > > This bit could go in _async_common? > >> + >> + osinfo_install_script_generate_async_common(script, >> + os, >> + media, >> + config, >> + cancellable, >> + callback, >> + user_data); >> +} >> + >> +static void osinfo_install_script_generate_for_media_done(GObject *src, >> + GAsyncResult *res, >> + gpointer user_data) >> +{ >> + OsinfoInstallScriptGenerateSyncData *data = user_data; >> + >> + data->output = >> + osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), >> + res, >> + &data->error); >> + g_main_loop_quit(data->loop); >> +} >> + >> +/** >> + * osinfo_install_script_generate_for_media: >> + * @script: the install script >> + * @media: the media >> + * @config: the install script config >> + * @cancellable: (allow-none): a #GCancellable, or %NULL >> + * @error: The location where to store any error, or %NULL >> + * >> + * Creates an install script. The media @media must have been identified >> + * successfully using #osinfo_db_identify_media() before calling this function. >> + * >> + * Returns: (transfer full): the script as string. >> + * >> + * Since: 0.2.12 >> + */ >> +gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, >> + OsinfoMedia *media, >> + OsinfoInstallConfig *config, >> + GCancellable *cancellable, >> + GError **error) >> +{ >> + GMainLoop *loop = g_main_loop_new(g_main_context_get_thread_default(), >> + TRUE); >> + OsinfoInstallScriptGenerateSyncData data = { >> + loop, NULL, NULL, NULL >> + }; >> + >> + osinfo_install_script_generate_for_media_async(script, >> + media, >> + config, >> + cancellable, >> + osinfo_install_script_generate_for_media_done, >> + &data); >> + >> + if (g_main_loop_is_running(loop)) >> + g_main_loop_run(loop); >> + >> + if (data.error) >> + g_propagate_error(error, data.error); >> + >> + g_main_loop_unref(loop); >> + >> + return data.output; > > Any reason not to have a generate_for_media_common helper here? Just that it wasn't a lot of code so I was being lazy. :) -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Tue May 12 12:57:47 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 12 May 2015 13:57:47 +0100 Subject: [Libosinfo] [PATCH 03/10] Add osinfo_install_script_generate_output_for_media*() In-Reply-To: <20150512114740.GB4913@edamame.cdg.redhat.com> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-4-git-send-email-zeeshanak@gnome.org> <20150512114740.GB4913@edamame.cdg.redhat.com> Message-ID: On Tue, May 12, 2015 at 12:47 PM, Christophe Fergeau wrote: > On Thu, May 07, 2015 at 05:36:38PM +0100, Zeeshan Ali (Khattak) wrote: >> Add variant of osinfo_install_script_generate_for_media*() that >> generates the script into a file. >> --- >> osinfo/libosinfo.syms | 4 + >> osinfo/osinfo_install_script.c | 250 +++++++++++++++++++++++++++++++++-------- >> osinfo/osinfo_install_script.h | 17 +++ >> 3 files changed, 224 insertions(+), 47 deletions(-) >> >> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms >> index ba4c020..3906f89 100644 >> --- a/osinfo/libosinfo.syms >> +++ b/osinfo/libosinfo.syms >> @@ -511,6 +511,10 @@ LIBOSINFO_0.2.12 { >> osinfo_install_script_generate_for_media_async; >> osinfo_install_script_generate_for_media_finish; >> >> + osinfo_install_script_generate_output_for_media; >> + osinfo_install_script_generate_output_for_media_async; >> + osinfo_install_script_generate_output_for_media_finish; >> + >> osinfo_media_get_volume_size; >> } LIBOSINFO_0.2.11; >> >> diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c >> index 621c56f..a251557 100644 >> --- a/osinfo/osinfo_install_script.c >> +++ b/osinfo/osinfo_install_script.c >> @@ -1061,6 +1061,25 @@ GFile *osinfo_install_script_generate_output_finish(OsinfoInstallScript *script, >> error); >> } >> >> +/** >> + * osinfo_install_script_generate_output_for_media_finish: >> + * @script: the install script >> + * @res: a #GAsyncResult >> + * @error: The location where to store any error, or NULL >> + * >> + * Returns: (transfer full): a file containing the script, or NULL on error. >> + * >> + * Since: 0.2.12 >> + */ >> +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, >> + GAsyncResult *res, >> + GError **error) >> +{ >> + return osinfo_install_script_generate_finish_common(script, >> + res, >> + error); >> +} >> + >> struct _OsinfoInstallScriptGenerateSyncData { >> GMainLoop *loop; >> GError *error; >> @@ -1081,6 +1100,19 @@ static void osinfo_install_script_generate_output_done(GObject *src, >> g_main_loop_quit(data->loop); >> } >> >> +static void osinfo_install_script_generate_output_for_media_done(GObject *src, >> + GAsyncResult *res, >> + gpointer user_data) >> +{ >> + OsinfoInstallScriptGenerateSyncData *data = user_data; >> + >> + data->file = >> + osinfo_install_script_generate_output_for_media_finish(OSINFO_INSTALL_SCRIPT(src), >> + res, >> + &data->error); >> + g_main_loop_quit(data->loop); >> +} >> + >> static void osinfo_install_script_generate_output_close_file(GObject *src, >> GAsyncResult *res, >> gpointer user_data) >> @@ -1279,28 +1311,14 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, >> } >> } >> >> -/** >> - * osinfo_install_script_generate_output_async: >> - * @script: the install script >> - * @os: the os >> - * @config: the install script config >> - * @output_dir: the directory where file containing the output script >> - * will be written >> - * @cancellable: (allow-none): a #GCancellable, or %NULL >> - * @callback: Function to call when result of this call is ready >> - * @user_data: The user data to pass to @callback, or %NULL >> - * >> - * Asynchronous variant of #osinfo_install_script_generate_output(). From the >> - * callback, call #osinfo_install_script_generate_output_finish() to conclude >> - * this call and get the generated script. >> - */ >> -void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, >> - OsinfoOs *os, >> - OsinfoInstallConfig *config, >> - GFile *output_dir, >> - GCancellable *cancellable, >> - GAsyncReadyCallback callback, >> - gpointer user_data) >> +static void osinfo_install_script_generate_output_async_common(OsinfoInstallScript *script, >> + OsinfoOs *os, >> + OsinfoMedia *media, >> + OsinfoInstallConfig *config, >> + GFile *output_dir, >> + GCancellable *cancellable, >> + GAsyncReadyCallback callback, >> + gpointer user_data) >> { >> const gchar *filename; >> const gchar *prefix; >> @@ -1312,15 +1330,23 @@ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, >> data->res = g_simple_async_result_new(G_OBJECT(script), >> callback, >> user_data, >> - osinfo_install_script_generate_output_async); >> + osinfo_install_script_generate_output_async_common); >> >> data->cancellable = cancellable; >> data->error = data_sync->error; >> - data->output = osinfo_install_script_generate(script, >> - os, >> - config, >> - cancellable, >> - &data->error); >> + if (media != NULL) { >> + data->output = osinfo_install_script_generate_for_media (script, >> + media, >> + config, >> + cancellable, >> + &data->error); >> + } else { >> + data->output = osinfo_install_script_generate(script, >> + os, >> + config, >> + cancellable, >> + &data->error); >> + } > > This is preexisting, but having an async function call into a sync > function while an async variant exists is unexpected. Indeed. Do you think its worth it to change already or its ok to correct that later. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Tue May 12 12:58:12 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:58:12 +0200 Subject: [Libosinfo] Installer for Fedora netiso/F21 In-Reply-To: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> Message-ID: <20150512125812.GB1014@edamame.cdg.redhat.com> One last comment which I don't know exactly which patch is responsible for, make syntax-check gets worse with these patches applied, this needs to be fixed as well. Christophe On Thu, May 07, 2015 at 05:36:35PM +0100, Zeeshan Ali (Khattak) wrote: > This series of patches make installer scripts working for Fedora 21 netiso. Unfortunately this couldn't have been handled (nicely) without addition of new API. So apps will have to change code to fix installer for Fedora 21. Things still yet to be addressed: > > * Install scripts are still only associated with os entries but installer scripts don't work for all medias/variants. This is not a new problem though. For example our Fedora script was never working for netiso but we still advertised it as such (or at least we didn't inform apps in any way about this). > > I think we'll need API to optionally associate installer to variants to fix this issue. > > * Netiso requires internet and we don't have any API to inform app about this. We already have API to inform apps that an installer (always) require internet but not if its the media that requires it. > > The solution here would simply be to add 'needs-internet' param/api to media entries IMO. > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 12 12:59:19 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 14:59:19 +0200 Subject: [Libosinfo] [PATCH] test: Fix make syntax-check Message-ID: <1431435559-5441-1-git-send-email-cfergeau@redhat.com> This is currently failing with: GEN sc_bracket_spacing_check test/test-isodetect.c:153: blk_size = (gint64) atoll (line + 23); test/test-isodetect.c:155: vol_size = atoll (line + 16); --- test/test-isodetect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-isodetect.c b/test/test-isodetect.c index a051df7..b427d54 100644 --- a/test/test-isodetect.c +++ b/test/test-isodetect.c @@ -150,9 +150,9 @@ static struct ISOInfo *load_iso(GFile *file, const gchar *shortid, const gchar * OSINFO_MEDIA_PROP_APPLICATION_ID, line + 16); } else if (g_str_has_prefix(line, "Logical block size is:")) { - blk_size = (gint64) atoll (line + 23); + blk_size = (gint64) atoll(line + 23); } else if (g_str_has_prefix(line, "Volume size is:")) { - vol_size = atoll (line + 16); + vol_size = atoll(line + 16); } } -- 2.4.0 From zeeshanak at gnome.org Tue May 12 13:01:16 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 12 May 2015 14:01:16 +0100 Subject: [Libosinfo] [PATCH 08/10] fedora: Separate variant for F21 netiso In-Reply-To: <20150512123844.GG4913@edamame.cdg.redhat.com> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-9-git-send-email-zeeshanak@gnome.org> <20150512123844.GG4913@edamame.cdg.redhat.com> Message-ID: On Tue, May 12, 2015 at 1:38 PM, Christophe Fergeau wrote: > On Thu, May 07, 2015 at 05:36:43PM +0100, Zeeshan Ali (Khattak) wrote: >> --- >> data/oses/fedora.xml.in | 14 +++++++++++--- >> 1 file changed, 11 insertions(+), 3 deletions(-) >> >> diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in >> index 9eaa691..b41c84d 100644 >> --- a/data/oses/fedora.xml.in >> +++ b/data/oses/fedora.xml.in >> @@ -3907,6 +3907,9 @@ >> >> <_name>Fedora 21 Server >> >> + >> + <_name>Fedora 21 >> + > > Do we want a more specific name here which mentions it's a network > install? I wasn't sure either so I didn't add that. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Tue May 12 13:03:03 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 12 May 2015 15:03:03 +0200 Subject: [Libosinfo] [PATCH 03/10] Add osinfo_install_script_generate_output_for_media*() In-Reply-To: References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-4-git-send-email-zeeshanak@gnome.org> <20150512114740.GB4913@edamame.cdg.redhat.com> Message-ID: <20150512130303.GC1014@edamame.cdg.redhat.com> On Tue, May 12, 2015 at 01:57:47PM +0100, Zeeshan Ali (Khattak) wrote: > > This is preexisting, but having an async function call into a sync > > function while an async variant exists is unexpected. > > Indeed. Do you think its worth it to change already or its ok to > correct that later. I don't really mind when this is done. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Tue May 12 13:03:01 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 12 May 2015 14:03:01 +0100 Subject: [Libosinfo] [PATCH 09/10] fedora, script: Correctly handle netiso In-Reply-To: <20150512124317.GI4913@edamame.cdg.redhat.com> References: <1431016605-24446-1-git-send-email-zeeshanak@gnome.org> <1431016605-24446-10-git-send-email-zeeshanak@gnome.org> <20150512124317.GI4913@edamame.cdg.redhat.com> Message-ID: On Tue, May 12, 2015 at 1:43 PM, Christophe Fergeau wrote: > On Thu, May 07, 2015 at 05:36:44PM +0100, Zeeshan Ali (Khattak) wrote: >> The fedora install script was written for and tested against installer >> DVDs so it does not work for netiso. This patch fixes the issue by >> removing the install method commands and adding remote repos if the >> media is detected to be a netiso. >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1178787 >> --- >> data/install-scripts/fedora.xml | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml >> index c4264e5..ec37005 100644 >> --- a/data/install-scripts/fedora.xml >> +++ b/data/install-scripts/fedora.xml >> @@ -94,8 +94,10 @@ >> >> >> # Install script for profile >> + > > Wouldn't be enough? For some weird unknown reason, that doesn't work for the case of media not present. '!=' evals to true somehow. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Tue May 12 13:05:20 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 12 May 2015 14:05:20 +0100 Subject: [Libosinfo] [PATCH] test: Fix make syntax-check In-Reply-To: <1431435559-5441-1-git-send-email-cfergeau@redhat.com> References: <1431435559-5441-1-git-send-email-cfergeau@redhat.com> Message-ID: On Tue, May 12, 2015 at 1:59 PM, Christophe Fergeau wrote: > This is currently failing with: > > GEN sc_bracket_spacing_check > test/test-isodetect.c:153: blk_size = (gint64) atoll (line + 23); > test/test-isodetect.c:155: vol_size = atoll (line + 16); > --- One small nitpick: I prefer to summarize the change in shortlog, rather than effect/benefit. ACK either way. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 13 17:48:27 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:27 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs Message-ID: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> --- osinfo/osinfo_install_script.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 9304b97..626eea8 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -891,7 +891,19 @@ static void osinfo_install_script_template_loaded(GObject *src, g_free(uri); } - +/** + * osinfo_install_script_generate_async: + * @script: the install script + * @os: the os + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate(). From the callback, + * call #osinfo_install_script_generate_finish() to conclude this call and get + * the generated script. + */ void osinfo_install_script_generate_async(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, @@ -1040,6 +1052,18 @@ static void osinfo_install_script_generate_done(GObject *src, g_main_loop_quit(data->loop); } +/** + * osinfo_install_script_generate: + * @script: the install script + * @os: the os + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script. + * + * Returns: (transfer full): the script as string. + */ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, @@ -1101,6 +1125,21 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, } } +/** + * osinfo_install_script_generate_output_async: + * @script: the install script + * @os: the os + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate_output(). From the + * callback, call #osinfo_install_script_generate_output_finish() to conclude + * this call and get the generated script. + */ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config, -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:28 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:28 +0100 Subject: [Libosinfo] [PATCH 02/10] Add osinfo_install_script_generate_for_media*() In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-2-git-send-email-zeeshanak@gnome.org> Add API that allows apps to pass the media matched against the OS they are generating the script for. Scripts can use this information to make decisions about how installation should be setup. For example, we are going to use this in the Fedora installer script to decide whether to install from ISO or from network, based on whether or not media is a network installer. --- osinfo/libosinfo.syms | 4 + osinfo/osinfo_install_script.c | 208 ++++++++++++++++++++++++++++++++++++----- osinfo/osinfo_install_script.h | 16 ++++ 3 files changed, 204 insertions(+), 24 deletions(-) diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index 2dba411..ba4c020 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -507,6 +507,10 @@ LIBOSINFO_0.2.11 { LIBOSINFO_0.2.12 { global: + osinfo_install_script_generate_for_media; + osinfo_install_script_generate_for_media_async; + osinfo_install_script_generate_for_media_finish; + osinfo_media_get_volume_size; } LIBOSINFO_0.2.11; diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 626eea8..95471b0 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -533,6 +533,7 @@ OsinfoAvatarFormat *osinfo_install_script_get_avatar_format(OsinfoInstallScript struct _OsinfoInstallScriptGenerateData { GSimpleAsyncResult *res; OsinfoOs *os; + OsinfoMedia *media; OsinfoInstallConfig *config; OsinfoInstallScript *script; }; @@ -541,6 +542,8 @@ struct _OsinfoInstallScriptGenerateData { static void osinfo_install_script_generate_data_free(OsinfoInstallScriptGenerateData *data) { g_object_unref(data->os); + if (data->media != NULL) + g_object_unref(data->media); g_object_unref(data->config); g_object_unref(data->script); g_object_unref(data->res); @@ -731,6 +734,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript *script, OsinfoOs *os, + OsinfoMedia *media, OsinfoInstallConfig *config, const gchar *node_name, GError **error) @@ -767,6 +771,19 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * goto error; } + if (media != NULL) { + if (!(node = osinfo_install_script_generate_entity_xml(script, + OSINFO_ENTITY(media), + "media", + error))) + goto error; + if (!(xmlAddChild(root, node))) { + xmlErrorPtr err = xmlGetLastError(); + g_set_error(error, 0, 0, _("Unable to set 'media' node: '%s'"), err ? err->message : ""); + goto error; + } + } + if (!(node = osinfo_install_script_generate_entity_xml(script, OSINFO_ENTITY(config), "config", @@ -819,6 +836,7 @@ static gchar *osinfo_install_script_apply_xslt(xsltStylesheetPtr ss, static gboolean osinfo_install_script_apply_template(OsinfoInstallScript *script, OsinfoOs *os, + OsinfoMedia *media, const gchar *templateUri, const gchar *template, const gchar *node_name, @@ -828,7 +846,7 @@ static gboolean osinfo_install_script_apply_template(OsinfoInstallScript *script { gboolean ret = FALSE; xsltStylesheetPtr templateXsl = osinfo_install_script_load_template(templateUri, template, error); - xmlDocPtr configXml = osinfo_install_script_generate_config_xml(script, os, config, node_name, error); + xmlDocPtr configXml = osinfo_install_script_generate_config_xml(script, os, media, config, node_name, error); if (!templateXsl || !configXml) goto cleanup; @@ -871,6 +889,7 @@ static void osinfo_install_script_template_loaded(GObject *src, if (!osinfo_install_script_apply_template(data->script, data->os, + data->media, uri, input, "install-script-config", @@ -891,43 +910,41 @@ static void osinfo_install_script_template_loaded(GObject *src, g_free(uri); } -/** - * osinfo_install_script_generate_async: - * @script: the install script - * @os: the os - * @config: the install script config - * @cancellable: (allow-none): a #GCancellable, or %NULL - * @callback: Function to call when result of this call is ready - * @user_data: The user data to pass to @callback, or %NULL - * - * Asynchronous variant of #osinfo_install_script_generate(). From the callback, - * call #osinfo_install_script_generate_finish() to conclude this call and get - * the generated script. - */ -void osinfo_install_script_generate_async(OsinfoInstallScript *script, - OsinfoOs *os, - OsinfoInstallConfig *config, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) + +static void osinfo_install_script_generate_async_common(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { - OsinfoInstallScriptGenerateData *data = g_new0(OsinfoInstallScriptGenerateData, 1); - const gchar *templateData = osinfo_install_script_get_template_data(script); - const gchar *templateUri = osinfo_install_script_get_template_uri(script); + OsinfoInstallScriptGenerateData *data; + const gchar *templateData; + const gchar *templateUri; + + g_return_if_fail(os != NULL); + + data = g_new0(OsinfoInstallScriptGenerateData, 1); + templateData = osinfo_install_script_get_template_data(script); + templateUri = osinfo_install_script_get_template_uri(script); data->os = g_object_ref(os); + if (media != NULL) + data->media = g_object_ref(media); data->config = g_object_ref(config); data->script = g_object_ref(script); data->res = g_simple_async_result_new(G_OBJECT(script), callback, user_data, - osinfo_install_script_generate_async); + osinfo_install_script_generate_async_common); if (templateData) { GError *error = NULL; gchar *output; if (!osinfo_install_script_apply_template(script, os, + media, "", templateData, "install-script-config", @@ -954,6 +971,35 @@ void osinfo_install_script_generate_async(OsinfoInstallScript *script, } } +/** + * osinfo_install_script_generate_async: + * @script: the install script + * @os: the os + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate(). From the callback, + * call #osinfo_install_script_generate_finish() to conclude this call and get + * the generated script. + */ +void osinfo_install_script_generate_async(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + osinfo_install_script_generate_async_common(script, + os, + NULL, + config, + cancellable, + callback, + user_data); +} + static gpointer osinfo_install_script_generate_finish_common(OsinfoInstallScript *script, GAsyncResult *res, GError **error) @@ -986,6 +1032,25 @@ gchar *osinfo_install_script_generate_finish(OsinfoInstallScript *script, } /** + * osinfo_install_script_generate_for_media_finish: + * @script: the install script + * @res: a #GAsyncResult + * @error: The location where to store any error, or NULL + * + * Returns: (transfer full): the generated script, or NULL on error + * + * Since: 0.2.12 + */ +gchar *osinfo_install_script_generate_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error) +{ + return osinfo_install_script_generate_finish_common(script, + res, + error); +} + +/** * osinfo_install_script_generate_output_finish: * @script: the install script * @res: a #GAsyncResult @@ -1094,6 +1159,100 @@ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, return data.output; } +/** + * osinfo_install_script_generate_for_media_async: + * @script: the install script + * @media: the media + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate_for_media(). From the + * callback, call #osinfo_install_script_generate_for_media_finish() to + * conclude this call and get the generated script. + * + * Since: 0.2.12 + */ +void osinfo_install_script_generate_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { + OsinfoOs *os; + + g_return_if_fail(media != NULL); + + os = osinfo_media_get_os(media); + + osinfo_install_script_generate_async_common(script, + os, + media, + config, + cancellable, + callback, + user_data); +} + +static void osinfo_install_script_generate_for_media_done(GObject *src, + GAsyncResult *res, + gpointer user_data) +{ + OsinfoInstallScriptGenerateSyncData *data = user_data; + + data->output = + osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), + res, + &data->error); + g_main_loop_quit(data->loop); +} + +/** + * osinfo_install_script_generate_for_media: + * @script: the install script + * @media: the media + * @config: the install script config + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script. The media @media must have been identified + * successfully using #osinfo_db_identify_media() before calling this function. + * + * Returns: (transfer full): the script as string. + * + * Since: 0.2.12 + */ +gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GError **error) +{ + GMainLoop *loop = g_main_loop_new(g_main_context_get_thread_default(), + TRUE); + OsinfoInstallScriptGenerateSyncData data = { + loop, NULL, NULL, NULL + }; + + osinfo_install_script_generate_for_media_async(script, + media, + config, + cancellable, + osinfo_install_script_generate_for_media_done, + &data); + + if (g_main_loop_is_running(loop)) + g_main_loop_run(loop); + + if (data.error) + g_propagate_error(error, data.error); + + g_main_loop_unref(loop); + + return data.output; +} + static void osinfo_install_script_generate_output_write_file(GObject *src, GAsyncResult *res, gpointer user_data) @@ -1264,6 +1423,7 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, GError *error = NULL; if (!osinfo_install_script_apply_template(script, os, + NULL, "", templateData, "command-line", diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index f8083b4..cd0b033 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -40,6 +40,7 @@ #define OSINFO_INSTALL_SCRIPT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OSINFO_TYPE_INSTALL_SCRIPT, OsinfoInstallScriptClass)) typedef struct _OsinfoOs OsinfoOs; +typedef struct _OsinfoMedia OsinfoMedia; typedef struct _OsinfoInstallScript OsinfoInstallScript; typedef struct _OsinfoInstallScriptClass OsinfoInstallScriptClass; typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate; @@ -199,6 +200,21 @@ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, GCancellable *cancellable, GError **error); +void osinfo_install_script_generate_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gchar *osinfo_install_script_generate_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error); +gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GCancellable *cancellable, + GError **error); + gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config); -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:29 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:29 +0100 Subject: [Libosinfo] [PATCH 03/10] Add osinfo_install_script_generate_output_for_media*() In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-3-git-send-email-zeeshanak@gnome.org> Add variant of osinfo_install_script_generate_for_media*() that generates the script into a file. --- osinfo/libosinfo.syms | 4 + osinfo/osinfo_install_script.c | 250 +++++++++++++++++++++++++++++++++-------- osinfo/osinfo_install_script.h | 17 +++ 3 files changed, 224 insertions(+), 47 deletions(-) diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index ba4c020..3906f89 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -511,6 +511,10 @@ LIBOSINFO_0.2.12 { osinfo_install_script_generate_for_media_async; osinfo_install_script_generate_for_media_finish; + osinfo_install_script_generate_output_for_media; + osinfo_install_script_generate_output_for_media_async; + osinfo_install_script_generate_output_for_media_finish; + osinfo_media_get_volume_size; } LIBOSINFO_0.2.11; diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 95471b0..009a473 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -1067,6 +1067,25 @@ GFile *osinfo_install_script_generate_output_finish(OsinfoInstallScript *script, error); } +/** + * osinfo_install_script_generate_output_for_media_finish: + * @script: the install script + * @res: a #GAsyncResult + * @error: The location where to store any error, or NULL + * + * Returns: (transfer full): a file containing the script, or NULL on error. + * + * Since: 0.2.12 + */ +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error) +{ + return osinfo_install_script_generate_finish_common(script, + res, + error); +} + struct _OsinfoInstallScriptGenerateSyncData { GMainLoop *loop; GError *error; @@ -1087,6 +1106,19 @@ static void osinfo_install_script_generate_output_done(GObject *src, g_main_loop_quit(data->loop); } +static void osinfo_install_script_generate_output_for_media_done(GObject *src, + GAsyncResult *res, + gpointer user_data) +{ + OsinfoInstallScriptGenerateSyncData *data = user_data; + + data->file = + osinfo_install_script_generate_output_for_media_finish(OSINFO_INSTALL_SCRIPT(src), + res, + &data->error); + g_main_loop_quit(data->loop); +} + static void osinfo_install_script_generate_output_close_file(GObject *src, GAsyncResult *res, gpointer user_data) @@ -1284,28 +1316,14 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, } } -/** - * osinfo_install_script_generate_output_async: - * @script: the install script - * @os: the os - * @config: the install script config - * @output_dir: the directory where file containing the output script - * will be written - * @cancellable: (allow-none): a #GCancellable, or %NULL - * @callback: Function to call when result of this call is ready - * @user_data: The user data to pass to @callback, or %NULL - * - * Asynchronous variant of #osinfo_install_script_generate_output(). From the - * callback, call #osinfo_install_script_generate_output_finish() to conclude - * this call and get the generated script. - */ -void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, - OsinfoOs *os, - OsinfoInstallConfig *config, - GFile *output_dir, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +static void osinfo_install_script_generate_output_async_common(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { const gchar *filename; const gchar *prefix; @@ -1317,15 +1335,23 @@ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, data->res = g_simple_async_result_new(G_OBJECT(script), callback, user_data, - osinfo_install_script_generate_output_async); + osinfo_install_script_generate_output_async_common); data->cancellable = cancellable; data->error = data_sync->error; - data->output = osinfo_install_script_generate(script, - os, - config, - cancellable, - &data->error); + if (media != NULL) { + data->output = osinfo_install_script_generate_for_media(script, + media, + config, + cancellable, + &data->error); + } else { + data->output = osinfo_install_script_generate(script, + os, + config, + cancellable, + &data->error); + } data->output_pos = 0; data->output_len = strlen(data->output); @@ -1353,25 +1379,45 @@ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, } /** - * osinfo_install_script_generate_output: + * osinfo_install_script_generate_output_async: * @script: the install script - * @os: the os entity + * @os: the os * @config: the install script config * @output_dir: the directory where file containing the output script * will be written * @cancellable: (allow-none): a #GCancellable, or %NULL - * @error: The location where to store any error, or %NULL - * - * Creates an install script that is written to the returned file. + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL * - * Returns: (transfer full): a file containing the script + * Asynchronous variant of #osinfo_install_script_generate_output(). From the + * callback, call #osinfo_install_script_generate_output_finish() to conclude + * this call and get the generated script. */ -GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, - OsinfoOs *os, - OsinfoInstallConfig *config, - GFile *output_dir, - GCancellable *cancellable, - GError **error) +void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + osinfo_install_script_generate_output_async_common(script, + os, + NULL, + config, + output_dir, + cancellable, + callback, + user_data); +} + +static GFile *osinfo_install_script_generate_output_common(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error) { GMainLoop *loop = g_main_loop_new(g_main_context_get_thread_default(), TRUE); @@ -1379,13 +1425,25 @@ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, loop, NULL, NULL, NULL }; - osinfo_install_script_generate_output_async(script, - os, - config, - output_dir, - cancellable, - osinfo_install_script_generate_output_done, - &data); + if (media != NULL) { + osinfo_install_script_generate_output_for_media_async + (script, + media, + config, + output_dir, + cancellable, + osinfo_install_script_generate_output_for_media_done, + &data); + } else { + osinfo_install_script_generate_output_async + (script, + os, + config, + output_dir, + cancellable, + osinfo_install_script_generate_output_done, + &data); + } if (g_main_loop_is_running(loop)) g_main_loop_run(loop); @@ -1399,6 +1457,104 @@ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, } /** + * osinfo_install_script_generate_output: + * @script: the install script + * @os: the os entity + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script that is written to the returned file. + * + * Returns: (transfer full): a file containing the script + */ +GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, + OsinfoOs *os, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error) +{ + return osinfo_install_script_generate_output_common(script, + os, + NULL, + config, + output_dir, + cancellable, + error); +} + +/** + * osinfo_install_script_generate_output_for_media_async: + * @script: the install script + * @media: the media + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @callback: Function to call when result of this call is ready + * @user_data: The user data to pass to @callback, or %NULL + * + * Asynchronous variant of #osinfo_install_script_generate_output_for_media(). + * From the callback, call + * #osinfo_install_script_generate_output_for_media_finish() to conclude this + * call and get the generated file. + * + * Since: 0.2.12 + */ +void osinfo_install_script_generate_output_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + osinfo_install_script_generate_output_async_common(script, + NULL, + media, + config, + output_dir, + cancellable, + callback, + user_data); +} + +/** + * osinfo_install_script_generate_output_for_media: + * @script: the install script + * @media: the media + * @config: the install script config + * @output_dir: the directory where file containing the output script + * will be written + * @cancellable: (allow-none): a #GCancellable, or %NULL + * @error: The location where to store any error, or %NULL + * + * Creates an install script that is written to the returned file. + * + * Returns: (transfer full): a file containing the script. + * + * Since: 0.2.12 + */ +GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error) +{ + return osinfo_install_script_generate_output_common(script, + NULL, + media, + config, + output_dir, + cancellable, + error); +} + +/** * osinfo_install_script_generate_command_line: * @script: the install script * @os: the os entity diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index cd0b033..0a6afcb 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -215,6 +215,23 @@ gchar *osinfo_install_script_generate_for_media(OsinfoInstallScript *script, GCancellable *cancellable, GError **error); +void osinfo_install_script_generate_output_for_media_async(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, + GAsyncResult *res, + GError **error); +GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config, + GFile *output_dir, + GCancellable *cancellable, + GError **error); + gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config); -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:30 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:30 +0100 Subject: [Libosinfo] [PATCH 04/10] Add osinfo_install_script_generate_command_line_for_media() In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-4-git-send-email-zeeshanak@gnome.org> Add variant of osinfo_install_script_generate_command_line() that takes (an identified) media instead of an OS. Currently no commandline template needs access to media but lets add this to be future safe and be consistent with other osinfo_install_script_generation*() API. --- osinfo/libosinfo.syms | 2 ++ osinfo/osinfo_install_script.c | 47 ++++++++++++++++++++++++++++++++++++++++++ osinfo/osinfo_install_script.h | 3 +++ 3 files changed, 52 insertions(+) diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index 3906f89..68d54ff 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -507,6 +507,8 @@ LIBOSINFO_0.2.11 { LIBOSINFO_0.2.12 { global: + osinfo_install_script_generate_command_line_for_media; + osinfo_install_script_generate_for_media; osinfo_install_script_generate_for_media_async; osinfo_install_script_generate_for_media_finish; diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 009a473..9863633 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -1593,6 +1593,53 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, return output; } +/** + * osinfo_install_script_generate_command_line_for_media: + * @script: the install script + * @media: the media + * @config: the install script config + * + * Some install scripts need to pass a command line to the kernel, Such install + * scripts belong to OSs that provide paths to the kernel and initrd files that + * can be used to directly boot + * (http://wiki.qemu.org/download/qemu-doc.html#direct_005flinux_005fboot) + * the OS in order to pass the needed commandline to it. + * + * The media @media must have been identified successfully using + * #osinfo_db_identify_media() before calling this function. + * + * Returns: (transfer full): The generated command line string, NULL otherwise. + */ +gchar *osinfo_install_script_generate_command_line_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config) +{ + const gchar *templateData = osinfo_install_script_get_template_data(script); + gchar *output = NULL; + OsinfoOs *os; + + g_return_val_if_fail(media != NULL, NULL); + + os = osinfo_media_get_os(media); + g_return_val_if_fail(os != NULL, NULL); + + if (templateData) { + GError *error = NULL; + if (!osinfo_install_script_apply_template(script, + os, + media, + "", + templateData, + "command-line", + &output, + config, + &error)) { + g_prefix_error(&error, "%s", _("Failed to apply script template: ")); + } + } + + return output; +} OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *script) { diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index 0a6afcb..c494192 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -235,6 +235,9 @@ GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *scri gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, OsinfoOs *os, OsinfoInstallConfig *config); +gchar *osinfo_install_script_generate_command_line_for_media(OsinfoInstallScript *script, + OsinfoMedia *media, + OsinfoInstallConfig *config); gboolean osinfo_install_script_has_config_param(const OsinfoInstallScript *script, const OsinfoInstallConfigParam *config_param); -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:31 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:31 +0100 Subject: [Libosinfo] [PATCH 05/10] Recommend osinfo_install_script_generate_*for_media() In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-5-git-send-email-zeeshanak@gnome.org> Recommend the use of the new script generation API that takes an identified media object as arugment rather than OS, in the docs. --- osinfo/osinfo_install_script.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 9863633..99372a9 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -983,6 +983,9 @@ static void osinfo_install_script_generate_async_common(OsinfoInstallScript *scr * Asynchronous variant of #osinfo_install_script_generate(). From the callback, * call #osinfo_install_script_generate_finish() to conclude this call and get * the generated script. + * + * If you are generating the script for a specific media, it is recommended that + * you use #osinfo_install_script_generate_for_media_async() instead. */ void osinfo_install_script_generate_async(OsinfoInstallScript *script, OsinfoOs *os, @@ -1160,6 +1163,9 @@ static void osinfo_install_script_generate_done(GObject *src, * Creates an install script. * * Returns: (transfer full): the script as string. + * + * If you are generating the script for a specific media, it is recommended + * that you use #osinfo_install_script_generate_for_media() instead. */ gchar *osinfo_install_script_generate(OsinfoInstallScript *script, OsinfoOs *os, @@ -1392,6 +1398,9 @@ static void osinfo_install_script_generate_output_async_common(OsinfoInstallScri * Asynchronous variant of #osinfo_install_script_generate_output(). From the * callback, call #osinfo_install_script_generate_output_finish() to conclude * this call and get the generated script. + * + * If you are generating the script for a specific media, it is recommended that + * you use #osinfo_install_script_generate_output_for_media_async() instead. */ void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, OsinfoOs *os, @@ -1469,6 +1478,9 @@ static GFile *osinfo_install_script_generate_output_common(OsinfoInstallScript * * Creates an install script that is written to the returned file. * * Returns: (transfer full): a file containing the script + * + * If you are generating the script for a specific media, it is recommended + * that you use #osinfo_install_script_generate_output_for_media() instead. */ GFile *osinfo_install_script_generate_output(OsinfoInstallScript *script, OsinfoOs *os, @@ -1566,6 +1578,10 @@ GFile *osinfo_install_script_generate_output_for_media(OsinfoInstallScript *scri * (http://wiki.qemu.org/download/qemu-doc.html#direct_005flinux_005fboot) * the OS in order to pass the needed commandline to it. * + * If you are generating the command line for a specific media, it is + * recommended that you use + * #osinfo_install_script_generate_command_line_for_media() instead. + * * Returns: (transfer full): The generated command line string, NULL otherwise. */ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:32 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:32 +0100 Subject: [Libosinfo] [PATCH 06/10] tests: Pass media to script generator In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-6-git-send-email-zeeshanak@gnome.org> Now that we have an API to pass media to script generation methods, let's test that API instead since its not only the recommended API but also this way we get to test both passing of OS and media information to script template. One of the test cases still uses the existing API on purpose to keep the case of 'no media available' covered as well. --- .../dbdata/install-scripts/test-install-script.xml | 6 ++ test/dbdata/oses/test-os-data.xml | 23 ++++++ test/install-script.xsl | 7 +- test/test-install-script.c | 96 ++++++++++++++++------ 4 files changed, 108 insertions(+), 24 deletions(-) create mode 100644 test/dbdata/oses/test-os-data.xml diff --git a/test/dbdata/install-scripts/test-install-script.xml b/test/dbdata/install-scripts/test-install-script.xml index 48469ef..e3c05b7 100644 --- a/test/dbdata/install-scripts/test-install-script.xml +++ b/test/dbdata/install-scripts/test-install-script.xml @@ -16,6 +16,12 @@ +# OS id= +# + Media id= + Unknown media + +# Profile: keyboard lang timezone --utc diff --git a/test/dbdata/oses/test-os-data.xml b/test/dbdata/oses/test-os-data.xml new file mode 100644 index 0000000..88ef431 --- /dev/null +++ b/test/dbdata/oses/test-os-data.xml @@ -0,0 +1,23 @@ + + + + fedora16 + Fedora 16 + 16 + Fedora Project + linux + fedora + Verne + + + http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/i386/iso/Fedora-16-i386-DVD.iso + + Fedora 16 i386 DVD + LINUX + 3806375936 + + isolinux/vmlinuz + isolinux/initrd.img + + + diff --git a/test/install-script.xsl b/test/install-script.xsl index f52e99f..f355152 100644 --- a/test/install-script.xsl +++ b/test/install-script.xsl @@ -6,7 +6,12 @@ -# OS id= profile +# OS id= +# + Media id= + Unknown media + +# Profile: install text keyboard diff --git a/test/test-install-script.c b/test/test-install-script.c index 4da3bb4..4d994e7 100644 --- a/test/test-install-script.c +++ b/test/test-install-script.c @@ -30,7 +30,9 @@ static GError *error = NULL; static gchar *actualData = NULL; static const gchar *expectData = \ "\n" \ - "# OS id=http://fedoraproject.org/fedora/16 profile jeos\n" \ + "# OS id=http://fedoraproject.org/fedora/16\n" \ + "# Media id=http://fedoraproject.org/fedora/16:0\n" \ + "# Profile: jeos\n" \ "install\n" \ "text\n" \ "keyboard uk\n" \ @@ -58,10 +60,26 @@ static const gchar *expectData = \ static const gchar *expectData2 = \ "\n" \ + "# OS id=http://fedoraproject.org/fedora/16\n" \ + "# Unknown media\n" \ + "# Profile: jeos\n" \ "keyboard FOOBAR\n" \ "lang French\n" \ "timezone --utc Europe/Paris"; +static void test_generate_for_media_finish(GObject *src, + GAsyncResult *res, + gpointer user_data) +{ + GMainLoop *loop = user_data; + + actualData = osinfo_install_script_generate_for_media_finish(OSINFO_INSTALL_SCRIPT(src), + res, + &error); + + g_main_loop_quit(loop); +} + static void test_generate_finish(GObject *src, GAsyncResult *res, gpointer user_data) @@ -96,27 +114,52 @@ static OsinfoInstallConfig *test_get_config(void) return config; } +static OsinfoMedia *create_media(void) +{ + OsinfoMedia *media = osinfo_media_new("http://fedoraproject.org/fedora/16:0", + "i686"); + osinfo_entity_set_param(OSINFO_ENTITY(media), + OSINFO_MEDIA_PROP_VOLUME_ID, + "Fedora 16 i386 DVD"); + osinfo_entity_set_param(OSINFO_ENTITY(media), + OSINFO_MEDIA_PROP_SYSTEM_ID, + "LINUX"); + osinfo_entity_set_param_int64(OSINFO_ENTITY(media), + OSINFO_MEDIA_PROP_VOLUME_SIZE, + 3806375936); + return media; +} + START_TEST(test_script_file) { OsinfoInstallScript *script; OsinfoInstallConfig *config = test_get_config(); - OsinfoOs *os; + OsinfoLoader *loader = osinfo_loader_new(); + OsinfoDb *db; + OsinfoMedia *media; GMainLoop *loop; script = osinfo_install_script_new_uri("http://example.com", "jeos", "file://" SRCDIR "/test/install-script.xsl"); + osinfo_loader_process_path(loader, SRCDIR "/test/dbdata", &error); + fail_unless(error == NULL, error ? error->message : "none"); + db = g_object_ref(osinfo_loader_get_db(loader)); + g_object_unref(loader); + loop = g_main_loop_new(g_main_context_get_thread_default(), TRUE); - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); - osinfo_install_script_generate_async(script, - os, - config, - NULL, - test_generate_finish, - loop); + media = create_media(); + fail_unless(osinfo_db_identify_media(db, media), "Failed to identify media"); + + osinfo_install_script_generate_for_media_async(script, + media, + config, + NULL, + test_generate_for_media_finish, + loop); if (g_main_loop_is_running(loop)) g_main_loop_run(loop); @@ -127,7 +170,8 @@ START_TEST(test_script_file) fail_unless(strcmp(actualData, expectData) == 0, "Actual '%s' match expect '%s'", actualData, expectData); - g_object_unref(os); + g_object_unref(media); + g_object_unref(db); g_object_unref(config); g_object_unref(script); g_main_loop_unref(loop); @@ -140,7 +184,9 @@ START_TEST(test_script_data) { OsinfoInstallScript *script; OsinfoInstallConfig *config = test_get_config(); - OsinfoOs *os; + OsinfoLoader *loader = osinfo_loader_new(); + OsinfoDb *db; + OsinfoMedia *media; GMainLoop *loop; GFile *file = g_file_new_for_uri("file://" SRCDIR "/test/install-script.xsl"); gchar *data; @@ -148,10 +194,14 @@ START_TEST(test_script_data) g_file_load_contents(file, NULL, &data, NULL, NULL, &error); fail_unless(error == NULL, error ? error->message : "none"); - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); - osinfo_entity_set_param(OSINFO_ENTITY(os), - OSINFO_PRODUCT_PROP_SHORT_ID, - "fedora16"); + osinfo_loader_process_path(loader, SRCDIR "/test/dbdata", &error); + fail_unless(error == NULL, error ? error->message : "none"); + db = g_object_ref(osinfo_loader_get_db(loader)); + g_object_unref(loader); + + media = create_media(); + fail_unless(osinfo_db_identify_media(db, media), "Failed to identify media"); + script = osinfo_install_script_new_data("http://example.com", "jeos", data); @@ -159,12 +209,12 @@ START_TEST(test_script_data) loop = g_main_loop_new(g_main_context_get_thread_default(), TRUE); - osinfo_install_script_generate_async(script, - os, - config, - NULL, - test_generate_finish, - loop); + osinfo_install_script_generate_for_media_async(script, + media, + config, + NULL, + test_generate_for_media_finish, + loop); if (g_main_loop_is_running(loop)) g_main_loop_run(loop); @@ -172,7 +222,8 @@ START_TEST(test_script_data) unlink(BUILDDIR "/test/install-script-actual.txt"); fail_unless(error == NULL, error ? error->message : "none"); - g_object_unref(os); + g_object_unref(media); + g_object_unref(db); g_object_unref(config); g_object_unref(script); } @@ -225,7 +276,6 @@ START_TEST(test_script_datamap) osinfo_install_config_set_l10n_language(config, "fr_FR"); osinfo_install_config_set_l10n_timezone(config, "Europe/Paris"); - os = osinfo_os_new("http://fedoraproject.org/fedora/16"); osinfo_entity_set_param(OSINFO_ENTITY(os), OSINFO_PRODUCT_PROP_SHORT_ID, -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:33 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:33 +0100 Subject: [Libosinfo] [PATCH 07/10] tools, install-script: Allow arg to be a media file In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-7-git-send-email-zeeshanak@gnome.org> Now that we have API to generate scripts for specific media and since it is the recommended path to generating scripts, let's allow users of this tool to provide an installer or live media as argument. --- tools/osinfo-install-script.c | 58 +++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c index 5d5f0e2..b924cd9 100644 --- a/tools/osinfo-install-script.c +++ b/tools/osinfo-install-script.c @@ -220,7 +220,7 @@ static gboolean list_script_inj_method(OsinfoOs *os) } -static gboolean generate_script(OsinfoOs *os) +static gboolean generate_script(OsinfoOs *os, OsinfoMedia *media) { OsinfoInstallScriptList *scripts = osinfo_os_get_install_script_list(os); OsinfoInstallScriptList *profile_scripts; @@ -253,12 +253,21 @@ static gboolean generate_script(OsinfoOs *os) if (prefix) osinfo_install_script_set_output_prefix(script, prefix); - osinfo_install_script_generate_output(script, - os, - config, - dir, - NULL, - &error); + if (media != NULL) { + osinfo_install_script_generate_output_for_media(script, + media, + config, + dir, + NULL, + &error); + } else { + osinfo_install_script_generate_output(script, + os, + config, + dir, + NULL, + &error); + } if (error != NULL) { g_printerr(_("Unable to generate install script: %s\n"), error->message ? error->message : "unknown"); @@ -287,6 +296,7 @@ gint main(gint argc, gchar **argv) OsinfoLoader *loader = NULL; OsinfoDb *db = NULL; OsinfoOs *os = NULL; + OsinfoMedia *media = NULL; gint ret = 0; setlocale(LC_ALL, ""); @@ -338,11 +348,24 @@ gint main(gint argc, gchar **argv) } db = osinfo_loader_get_db(loader); - os = find_os(db, argv[1]); - if (!os) { - g_printerr(_("Error finding OS: %s\n"), argv[1]); - ret = -4; - goto EXIT; + + /* First assume it is a path to a media that can be identified */ + media = osinfo_media_create_from_location(argv[1], NULL, NULL); + if (media != NULL) + if (!osinfo_db_identify_media(db, media)) { + g_object_unref(media); + media = NULL; + } + + if (media == NULL) { + os = find_os(db, argv[1]); + if (!os) { + g_printerr(_("Error finding OS: %s\n"), argv[1]); + ret = -4; + goto EXIT; + } + } else { + os = osinfo_media_get_os(media); } if (list_config) { @@ -361,7 +384,7 @@ gint main(gint argc, gchar **argv) goto EXIT; } } else { - if (!generate_script(os)) { + if (!generate_script(os, media)) { ret = -5; goto EXIT; } @@ -370,6 +393,8 @@ gint main(gint argc, gchar **argv) EXIT: if (config) g_object_unref(config); + if (media != NULL) + g_object_unref(media); g_clear_error(&error); g_clear_object(&loader); g_option_context_free(context); @@ -386,13 +411,14 @@ osinfo-install-script - generate a script for automated installation =head1 SYNOPSIS -osinfo-install-script [OPTIONS...] OS-ID +osinfo-install-script [OPTIONS...] MEDIA-FILE|OS-ID =head1 DESCRIPTION Generate a script suitable for performing an automated installation -of C. C should be a URI identifying the operating -system, or its short ID. +of C or C. C should be a path to an +installer or live media (typically an ISO file). C should be +a URI identifying the operating system, or its short ID. By default a script will be generated for a C style install. -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:34 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:34 +0100 Subject: [Libosinfo] [PATCH 08/10] fedora: Separate variant for F21 netiso In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-8-git-send-email-zeeshanak@gnome.org> --- data/oses/fedora.xml.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in index 9eaa691..b41c84d 100644 --- a/data/oses/fedora.xml.in +++ b/data/oses/fedora.xml.in @@ -3907,6 +3907,9 @@ <_name>Fedora 21 Server + + <_name>Fedora 21 + <_name>Fedora 21 Cloud @@ -3971,9 +3974,14 @@ isolinux/initrd.img - + - + http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/i386/iso/Fedora-Server-netinst-i386-21.iso Fedora-S.*21.*-i386 @@ -3984,7 +3992,7 @@ isolinux/initrd.img - + http://download.fedoraproject.org/pub/fedora/linux/releases/21/Server/x86_64/iso/Fedora-Server-netinst-x86_64-21.iso Fedora-S.*-21.*-x86_64 -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:35 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:35 +0100 Subject: [Libosinfo] [PATCH 09/10] fedora,script: Correctly handle netiso In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-9-git-send-email-zeeshanak@gnome.org> The fedora install script was written for and tested against installer DVDs so it does not work for netiso. This patch fixes the issue by removing the install method commands and adding remote repos if the media is detected to be a netiso. https://bugzilla.redhat.com/show_bug.cgi?id=1178787 --- data/install-scripts/fedora.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml index c4264e5..ec37005 100644 --- a/data/install-scripts/fedora.xml +++ b/data/install-scripts/fedora.xml @@ -94,8 +94,10 @@ # Install script for profile + install cdrom + text keyboard '' lang @@ -127,6 +129,12 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow logvol / --fstype --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow reboot + +repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch +repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch + + %packages @@ -250,8 +258,10 @@ reboot # Install script for profile + install cdrom + keyboard '' lang network --onboot yes --bootproto dhcp --noipv6 --hostname= @@ -274,6 +284,12 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow logvol / --fstype --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow reboot + +repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch +repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch + + %packages -- 2.1.0 From zeeshanak at gnome.org Wed May 13 17:48:36 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 13 May 2015 18:48:36 +0100 Subject: [Libosinfo] [PATCH 10/10] fedora: Enable installer scripts for F21 In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <1431539316-18659-10-git-send-email-zeeshanak@gnome.org> Now that these scripts work for at least one of the variants (which was always the case for all Fedora versions we supported the installer scripts for anyway), let's enable them. --- data/oses/fedora.xml.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data/oses/fedora.xml.in b/data/oses/fedora.xml.in index b41c84d..2e4b898 100644 --- a/data/oses/fedora.xml.in +++ b/data/oses/fedora.xml.in @@ -4075,11 +4075,10 @@ - - + -- 2.1.0 From cfergeau at redhat.com Thu May 14 16:14:38 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Thu, 14 May 2015 18:14:38 +0200 Subject: [Libosinfo] [PATCH] win: Add ISO data for 2 more Vista releases Message-ID: <1431620078-16585-1-git-send-email-cfergeau@redhat.com> --- data/oses/windows.xml.in | 6 ++--- ...ows_vista_enterprise_sp2_x64_dvd_342332.iso.txt | 29 ++++++++++++++++++++++ ...ows_vista_enterprise_sp2_x86_dvd_342329.iso.txt | 29 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt create mode 100644 test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in index e60257a..b08fe29 100644 --- a/data/oses/windows.xml.in +++ b/data/oses/windows.xml.in @@ -690,15 +690,15 @@ - (FB1EVOL|LRMCFRE|FRTMBVOL|FRMBVOL|FRMEVOL|FRMCFRE)_ + (FB1EVOL|LRMCFRE|FRTMBVOL|FRTMEVOL|FRMBVOL|FRMEVOL|FRMCFRE)_ MICROSOFT CORPORATION [[:upper:][:digit:]]*_([[:upper:]]*) - (FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRMBXVOL|FRMEXVOL|FRMCXFRE)_ - MICROSOFT CORPORATION + (FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRTMEXVOL|FRMBXVOL|FRMEXVOL)_ + MICROSOFT CORPORATION [[:upper:][:digit:]]*_([[:upper:]]*) diff --git a/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt new file mode 100644 index 0000000..16d2c5e --- /dev/null +++ b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: +Volume id: FRTMEXVOL_EN_DVD +Volume set id: FRTMEXVOL_EN_DVD +Publisher id: MICROSOFT CORPORATION +Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 +Application id: CDIMAGE 2.54 (01/01/2005 TM) +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1565407 +El Torito VD version 1 found, boot catalog is in sector 22 +NO Joliet present +NO Rock Ridge present +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'Microsoft Corporation' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 265 613 diff --git a/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt new file mode 100644 index 0000000..de73c15 --- /dev/null +++ b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: +Volume id: FRTMEVOL_EN_DVD +Volume set id: FRTMEVOL_EN_DVD +Publisher id: MICROSOFT CORPORATION +Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 +Application id: CDIMAGE 2.54 (01/01/2005 TM) +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1182120 +El Torito VD version 1 found, boot catalog is in sector 22 +NO Joliet present +NO Rock Ridge present +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'Microsoft Corporation' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 267 615 -- 2.4.0 From zeeshanak at gnome.org Sat May 16 11:53:13 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Sat, 16 May 2015 12:53:13 +0100 Subject: [Libosinfo] [PATCH] win: Add ISO data for 2 more Vista releases In-Reply-To: <1431620078-16585-1-git-send-email-cfergeau@redhat.com> References: <1431620078-16585-1-git-send-email-cfergeau@redhat.com> Message-ID: ACK On Thu, May 14, 2015 at 5:14 PM, Christophe Fergeau wrote: > --- > data/oses/windows.xml.in | 6 ++--- > ...ows_vista_enterprise_sp2_x64_dvd_342332.iso.txt | 29 ++++++++++++++++++++++ > ...ows_vista_enterprise_sp2_x86_dvd_342329.iso.txt | 29 ++++++++++++++++++++++ > 3 files changed, 61 insertions(+), 3 deletions(-) > create mode 100644 test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt > create mode 100644 test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt > > diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in > index e60257a..b08fe29 100644 > --- a/data/oses/windows.xml.in > +++ b/data/oses/windows.xml.in > @@ -690,15 +690,15 @@ > > > > - (FB1EVOL|LRMCFRE|FRTMBVOL|FRMBVOL|FRMEVOL|FRMCFRE)_ > + (FB1EVOL|LRMCFRE|FRTMBVOL|FRTMEVOL|FRMBVOL|FRMEVOL|FRMCFRE)_ > MICROSOFT CORPORATION > [[:upper:][:digit:]]*_([[:upper:]]*) > > > > > - (FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRMBXVOL|FRMEXVOL|FRMCXFRE)_ > - MICROSOFT CORPORATION > + (FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRTMEXVOL|FRMBXVOL|FRMEXVOL)_ > + MICROSOFT CORPORATION > [[:upper:][:digit:]]*_([[:upper:]]*) > > > diff --git a/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt > new file mode 100644 > index 0000000..16d2c5e > --- /dev/null > +++ b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x64_dvd_342332.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: > +Volume id: FRTMEXVOL_EN_DVD > +Volume set id: FRTMEXVOL_EN_DVD > +Publisher id: MICROSOFT CORPORATION > +Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 > +Application id: CDIMAGE 2.54 (01/01/2005 TM) > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 1565407 > +El Torito VD version 1 found, boot catalog is in sector 22 > +NO Joliet present > +NO Rock Ridge present > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'Microsoft Corporation' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 265 613 > diff --git a/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt > new file mode 100644 > index 0000000..de73c15 > --- /dev/null > +++ b/test/isodata/windows/winvista/en_windows_vista_enterprise_sp2_x86_dvd_342329.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: > +Volume id: FRTMEVOL_EN_DVD > +Volume set id: FRTMEVOL_EN_DVD > +Publisher id: MICROSOFT CORPORATION > +Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 > +Application id: CDIMAGE 2.54 (01/01/2005 TM) > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 1182120 > +El Torito VD version 1 found, boot catalog is in sector 22 > +NO Joliet present > +NO Rock Ridge present > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'Microsoft Corporation' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 267 615 > -- > 2.4.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Mon May 18 09:08:56 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 11:08:56 +0200 Subject: [Libosinfo] [PATCH] win: Add ISO data for 2 more Vista releases In-Reply-To: References: <1431620078-16585-1-git-send-email-cfergeau@redhat.com> Message-ID: <20150518090856.GP19360@edamame.cdg.redhat.com> On Sat, May 16, 2015 at 12:53:13PM +0100, Zeeshan Ali (Khattak) wrote: > ACK Thanks, pushed. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From lma at suse.com Mon May 18 10:50:15 2015 From: lma at suse.com (Lin Ma) Date: Mon, 18 May 2015 18:50:15 +0800 Subject: [Libosinfo] [PATCH] suse: Add sles11 sp1, sp2, sp3 and sp4 Message-ID: <1431946215-3659-1-git-send-email-lma@suse.com> Add entries for SUSE Linux Enterprise Server 11 SP1, SP2, SP3 and SP4. Signed-off-by: Lin Ma --- data/oses/suse.xml.in | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in index a591db5..a7c72b4 100644 --- a/data/oses/suse.xml.in +++ b/data/oses/suse.xml.in @@ -34,6 +34,46 @@ + + sles11sp1 + <_name>SUSE Linux Enterprise Server 11 SP1 + 11.1 + <_vendor>SUSE + linux + sles + + + + + sles11sp2 + <_name>SUSE Linux Enterprise Server 11 SP2 + 11.2 + <_vendor>SUSE + linux + sles + + + + + sles11sp3 + <_name>SUSE Linux Enterprise Server 11 SP3 + 11.3 + <_vendor>SUSE + linux + sles + + + + + sles11sp4 + <_name>SUSE Linux Enterprise Server 11 SP4 + 11.4 + <_vendor>SUSE + linux + sles + + + sles12 <_name>SUSE Linux Enterprise Server 12 @@ -41,8 +81,8 @@ <_vendor>SUSE linux sles - - + + -- 2.1.4 From cfergeau at redhat.com Mon May 18 15:16:33 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 17:16:33 +0200 Subject: [Libosinfo] [PATCH 03/10] Add osinfo_install_script_generate_output_for_media*() In-Reply-To: <1431539316-18659-3-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <1431539316-18659-3-git-send-email-zeeshanak@gnome.org> Message-ID: <20150518151633.GT19360@edamame.cdg.redhat.com> On Wed, May 13, 2015 at 06:48:29PM +0100, Zeeshan Ali (Khattak) wrote: > Add variant of osinfo_install_script_generate_for_media*() that > generates the script into a file. > --- > osinfo/libosinfo.syms | 4 + > osinfo/osinfo_install_script.c | 250 +++++++++++++++++++++++++++++++++-------- > osinfo/osinfo_install_script.h | 17 +++ > 3 files changed, 224 insertions(+), 47 deletions(-) > > diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms > index ba4c020..3906f89 100644 > --- a/osinfo/libosinfo.syms > +++ b/osinfo/libosinfo.syms > @@ -511,6 +511,10 @@ LIBOSINFO_0.2.12 { > osinfo_install_script_generate_for_media_async; > osinfo_install_script_generate_for_media_finish; > > + osinfo_install_script_generate_output_for_media; > + osinfo_install_script_generate_output_for_media_async; > + osinfo_install_script_generate_output_for_media_finish; > + > osinfo_media_get_volume_size; > } LIBOSINFO_0.2.11; > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index 95471b0..009a473 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -1067,6 +1067,25 @@ GFile *osinfo_install_script_generate_output_finish(OsinfoInstallScript *script, > error); > } > > +/** > + * osinfo_install_script_generate_output_for_media_finish: > + * @script: the install script > + * @res: a #GAsyncResult > + * @error: The location where to store any error, or NULL lower case 'The' would be more consistant. > + * > + * Returns: (transfer full): a file containing the script, or NULL on error. > + * > + * Since: 0.2.12 > + */ > +GFile *osinfo_install_script_generate_output_for_media_finish(OsinfoInstallScript *script, > + GAsyncResult *res, > + GError **error) > +{ > + return osinfo_install_script_generate_finish_common(script, > + res, > + error); > +} > + > struct _OsinfoInstallScriptGenerateSyncData { > GMainLoop *loop; > GError *error; > @@ -1087,6 +1106,19 @@ static void osinfo_install_script_generate_output_done(GObject *src, > g_main_loop_quit(data->loop); > } > > +static void osinfo_install_script_generate_output_for_media_done(GObject *src, > + GAsyncResult *res, > + gpointer user_data) > +{ > + OsinfoInstallScriptGenerateSyncData *data = user_data; > + > + data->file = > + osinfo_install_script_generate_output_for_media_finish(OSINFO_INSTALL_SCRIPT(src), > + res, > + &data->error); > + g_main_loop_quit(data->loop); > +} > + > static void osinfo_install_script_generate_output_close_file(GObject *src, > GAsyncResult *res, > gpointer user_data) > @@ -1284,28 +1316,14 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, > } > } > > -/** > - * osinfo_install_script_generate_output_async: > - * @script: the install script > - * @os: the os > - * @config: the install script config > - * @output_dir: the directory where file containing the output script I'd write "... where the file ..." (repeated several times through that file). Looks good otherwise. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon May 18 15:17:45 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 17:17:45 +0200 Subject: [Libosinfo] [PATCH 05/10] Recommend osinfo_install_script_generate_*for_media() In-Reply-To: <1431539316-18659-5-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <1431539316-18659-5-git-send-email-zeeshanak@gnome.org> Message-ID: <20150518151745.GU19360@edamame.cdg.redhat.com> On Wed, May 13, 2015 at 06:48:31PM +0100, Zeeshan Ali (Khattak) wrote: > Recommend the use of the new script generation API that takes an > identified media object as arugment rather than OS, in the docs. s/arugment/argument/ Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon May 18 15:23:50 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 17:23:50 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> Message-ID: <20150518152350.GV19360@edamame.cdg.redhat.com> ACK series (few minor spelling related comments here and there). However, apps will need a way to know whether a fedora ISO they have is going to support unattended install or not. Christophe On Wed, May 13, 2015 at 06:48:27PM +0100, Zeeshan Ali (Khattak) wrote: > --- > osinfo/osinfo_install_script.c | 41 ++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 40 insertions(+), 1 deletion(-) > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index 9304b97..626eea8 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -891,7 +891,19 @@ static void osinfo_install_script_template_loaded(GObject *src, > g_free(uri); > } > > - > +/** > + * osinfo_install_script_generate_async: > + * @script: the install script > + * @os: the os > + * @config: the install script config > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @callback: Function to call when result of this call is ready > + * @user_data: The user data to pass to @callback, or %NULL > + * > + * Asynchronous variant of #osinfo_install_script_generate(). From the callback, > + * call #osinfo_install_script_generate_finish() to conclude this call and get > + * the generated script. > + */ > void osinfo_install_script_generate_async(OsinfoInstallScript *script, > OsinfoOs *os, > OsinfoInstallConfig *config, > @@ -1040,6 +1052,18 @@ static void osinfo_install_script_generate_done(GObject *src, > g_main_loop_quit(data->loop); > } > > +/** > + * osinfo_install_script_generate: > + * @script: the install script > + * @os: the os > + * @config: the install script config > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @error: The location where to store any error, or %NULL > + * > + * Creates an install script. > + * > + * Returns: (transfer full): the script as string. > + */ > gchar *osinfo_install_script_generate(OsinfoInstallScript *script, > OsinfoOs *os, > OsinfoInstallConfig *config, > @@ -1101,6 +1125,21 @@ static void osinfo_install_script_generate_output_write_file(GObject *src, > } > } > > +/** > + * osinfo_install_script_generate_output_async: > + * @script: the install script > + * @os: the os > + * @config: the install script config > + * @output_dir: the directory where file containing the output script > + * will be written > + * @cancellable: (allow-none): a #GCancellable, or %NULL > + * @callback: Function to call when result of this call is ready > + * @user_data: The user data to pass to @callback, or %NULL > + * > + * Asynchronous variant of #osinfo_install_script_generate_output(). From the > + * callback, call #osinfo_install_script_generate_output_finish() to conclude > + * this call and get the generated script. > + */ > void osinfo_install_script_generate_output_async(OsinfoInstallScript *script, > OsinfoOs *os, > OsinfoInstallConfig *config, > -- > 2.1.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon May 18 15:24:18 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 17:24:18 +0200 Subject: [Libosinfo] [PATCH 09/10] fedora, script: Correctly handle netiso In-Reply-To: <1431539316-18659-9-git-send-email-zeeshanak@gnome.org> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <1431539316-18659-9-git-send-email-zeeshanak@gnome.org> Message-ID: <20150518152418.GW19360@edamame.cdg.redhat.com> "Fix netinst auto-install" might be clearer than "Correctly handle netiso" Christophe On Wed, May 13, 2015 at 06:48:35PM +0100, Zeeshan Ali (Khattak) wrote: > The fedora install script was written for and tested against installer > DVDs so it does not work for netiso. This patch fixes the issue by > removing the install method commands and adding remote repos if the > media is detected to be a netiso. > > https://bugzilla.redhat.com/show_bug.cgi?id=1178787 > --- > data/install-scripts/fedora.xml | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml > index c4264e5..ec37005 100644 > --- a/data/install-scripts/fedora.xml > +++ b/data/install-scripts/fedora.xml > @@ -94,8 +94,10 @@ > > > # Install script for profile > + > install > cdrom > + > text > keyboard '' > lang > @@ -127,6 +129,12 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow > logvol / --fstype --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow > reboot > > + > +repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch > +repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch > +url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch > + > + > %packages > > > @@ -250,8 +258,10 @@ reboot > > > # Install script for profile > + > install > cdrom > + > keyboard '' > lang > network --onboot yes --bootproto dhcp --noipv6 --hostname= > @@ -274,6 +284,12 @@ logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow > logvol / --fstype --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow > reboot > > + > +repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch > +repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch > +url --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-$releasever&arch=$basearch > + > + > %packages > > > -- > 2.1.0 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon May 18 15:31:29 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 17:31:29 +0200 Subject: [Libosinfo] [PATCH] suse: Add sles11 sp1, sp2, sp3 and sp4 In-Reply-To: <1431946215-3659-1-git-send-email-lma@suse.com> References: <1431946215-3659-1-git-send-email-lma@suse.com> Message-ID: <20150518153129.GX19360@edamame.cdg.redhat.com> Hey, On Mon, May 18, 2015 at 06:50:15PM +0800, Lin Ma wrote: > Add entries for SUSE Linux Enterprise Server 11 SP1, SP2, SP3 and SP4. If you have access to ISOs for these systems, it would be great if you could add some entries as well together with testcases in libosinfo/test/isodata/ (the test case is the output of isoinfo -d -i $isoname) https://en.wikipedia.org/wiki/SUSE_Linux_Enterprise_Server#Version_history lists some release dates for these SPx versions, can you add some entries? Thanks for this additional data! Christophe > > Signed-off-by: Lin Ma > --- > data/oses/suse.xml.in | 44 ++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 42 insertions(+), 2 deletions(-) > > diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in > index a591db5..a7c72b4 100644 > --- a/data/oses/suse.xml.in > +++ b/data/oses/suse.xml.in > @@ -34,6 +34,46 @@ > > > > + > + sles11sp1 > + <_name>SUSE Linux Enterprise Server 11 SP1 > + 11.1 > + <_vendor>SUSE > + linux > + sles > + > + > + > + > + sles11sp2 > + <_name>SUSE Linux Enterprise Server 11 SP2 > + 11.2 > + <_vendor>SUSE > + linux > + sles > + > + > + > + > + sles11sp3 > + <_name>SUSE Linux Enterprise Server 11 SP3 > + 11.3 > + <_vendor>SUSE > + linux > + sles > + > + > + > + > + sles11sp4 > + <_name>SUSE Linux Enterprise Server 11 SP4 > + 11.4 > + <_vendor>SUSE > + linux > + sles > + > + > + > > sles12 > <_name>SUSE Linux Enterprise Server 12 > @@ -41,8 +81,8 @@ > <_vendor>SUSE > linux > sles > - > - > + > + > > > > -- > 2.1.4 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Mon May 18 15:37:14 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Mon, 18 May 2015 16:37:14 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <20150518152350.GV19360@edamame.cdg.redhat.com> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> Message-ID: On Mon, May 18, 2015 at 4:23 PM, Christophe Fergeau wrote: > ACK series (few minor spelling related comments here and there). Thanks for reviewing. > However, apps will need a way to know whether a fedora ISO they have is > going to support unattended install or not. Yeah, although it's not a new problem. e.g express install has never worked for netiso and Apps have no way of telling that. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Mon May 18 16:07:50 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 18:07:50 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> Message-ID: <20150518160750.GY19360@edamame.cdg.redhat.com> On Mon, May 18, 2015 at 04:37:14PM +0100, Zeeshan Ali (Khattak) wrote: > On Mon, May 18, 2015 at 4:23 PM, Christophe Fergeau wrote: > > However, apps will need a way to know whether a fedora ISO they have is > > going to support unattended install or not. > > Yeah, although it's not a new problem. e.g express install has never > worked for netiso and Apps have no way of telling that. Before, automatic install was working for the most ISOs, and something people were more unlikely to download (netiso) was not working. Now most ISOs will not be working, and we expect people to get the netiso for automatic install to work, so imo the context has changed, and this has become more important. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Mon May 18 16:29:49 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Mon, 18 May 2015 17:29:49 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <20150518160750.GY19360@edamame.cdg.redhat.com> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> Message-ID: On Mon, May 18, 2015 at 5:07 PM, Christophe Fergeau wrote: > On Mon, May 18, 2015 at 04:37:14PM +0100, Zeeshan Ali (Khattak) wrote: >> On Mon, May 18, 2015 at 4:23 PM, Christophe Fergeau wrote: >> > However, apps will need a way to know whether a fedora ISO they have is >> > going to support unattended install or not. >> >> Yeah, although it's not a new problem. e.g express install has never >> worked for netiso and Apps have no way of telling that. > > Before, automatic install was working for the most ISOs, and something > people were more unlikely to download (netiso) was not working. > Now most ISOs will not be working, and we expect people to get the > netiso for automatic install to work, so imo the context has changed, > and this has become more important. Not exactly. It also never worked for live ISO and that is not a major issue since UIs aren't supposed to offer automatic installer against live medias. Also for F21, it didn't work against any ISO AFAIK. With these patches, it will work against the netiso at least. In case of F22, there will be workstation netisos provided and advertised so if user downloads them, they'll be given the opportunity to do automatic installation against them but if they choose live, they won't get such an option. The issue remains for server (and cloud) installers though. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Mon May 18 16:43:15 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 18 May 2015 18:43:15 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> Message-ID: <20150518164315.GB19360@edamame.cdg.redhat.com> On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: > Not exactly. It also never worked for live ISO and that is not a major > issue since UIs aren't supposed to offer automatic installer against > live medias. Is this documented somewhere? To be honest, I see that statement as a workaround for lack of a better API to check whether a media supports automatic install. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Mon May 18 18:12:56 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Mon, 18 May 2015 19:12:56 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <20150518164315.GB19360@edamame.cdg.redhat.com> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> Message-ID: On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: >> Not exactly. It also never worked for live ISO and that is not a major >> issue since UIs aren't supposed to offer automatic installer against >> live medias. > > Is this documented somewhere? This question made me go catch an Anaconda dev: ----IRC chat--- hi what is it you're looking for? so firstly, is kickstart installation supported against f21 live WS iso? no, kickstart installs do not work from live media ok, thanks. that was my understanding jwb: i've been asked to provide proof of the statement "kickstart isn't supported for live media" in review comment of my patches so i'm looking for some kind of statment anywhere from anaconda team about that a bz comment would suffice I'm not sure if we have an official statement. I'm looking now at the history of why it's that way, which would likely point me to a bugzilla otherwise i can just copy & paste this chat as last resort :) give me some miuntes here sure! ok, I've got some info so we do have code that was meant to support live image kickstart installs, but with bug #1027160 the default changed in anaconda to explicitly prevent kickstart installations from the live media this came down more to policy rather than technical capability but that's just the policy for the Fedora Live media meaning you can't initiate a kickstart install using the Live media but we do support kickstart installs of the live image payload the trick is that you need to start your install using the Fedora Server installation media, but then have your kickstart file point at the live image from the Live os tree here's a writeup: https://fedoraproject.org/wiki/Anaconda/Kickstart/KickstartingFedoraLiveInstallation --------------- I guess this is as official as it gets: https://bugzilla.redhat.com/show_bug.cgi?id=1027160#c8 >To be honest, I see that statement as > a workaround for lack of a better API to check whether a media supports > automatic install. The statement is about whether or not these patches introduce a new issue to the best of my knowledge. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Tue May 19 07:59:23 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 19 May 2015 09:59:23 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> Message-ID: <20150519075923.GH19360@edamame.cdg.redhat.com> On Mon, May 18, 2015 at 07:12:56PM +0100, Zeeshan Ali (Khattak) wrote: > On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: > > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: > >> Not exactly. It also never worked for live ISO and that is not a major > >> issue since UIs aren't supposed to offer automatic installer against > >> live medias. > > > > Is this documented somewhere? > > This question made me go catch an Anaconda dev: I was asking if this is documented somewhere in libosinfo API documentation. Also note that your statement is ? UIs aren't supposed to offer automatic installer against live medias. ?, not ? UIs aren't supposed to offer automatic installer against Fedora live medias ?. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From lma at suse.com Tue May 19 09:29:54 2015 From: lma at suse.com (Lin Ma) Date: Tue, 19 May 2015 17:29:54 +0800 Subject: [Libosinfo] [PATCH V1] suse: Add sles11 sp1, sp2, sp3 and sp4 Message-ID: <1432027794-2946-1-git-send-email-lma@suse.com> Add entries for SUSE Linux Enterprise Server 11 SP1, SP2, SP3 and SP4. Changes in V1: Add media and release-date entries, add testcases Signed-off-by: Lin Ma --- data/oses/suse.xml.in | 139 ++++++++++++++++++++- .../sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt | 29 +++++ .../SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ .../sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt | 29 +++++ .../SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ .../sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt | 29 +++++ .../SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ .../SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ 8 files changed, 340 insertions(+), 2 deletions(-) create mode 100644 test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt create mode 100644 test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt create mode 100644 test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt create mode 100644 test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt create mode 100644 test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt create mode 100644 test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt create mode 100644 test/isodata/sles/sles12/SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in index a591db5..822e030 100644 --- a/data/oses/suse.xml.in +++ b/data/oses/suse.xml.in @@ -34,6 +34,128 @@ + + sles11sp1 + <_name>SUSE Linux Enterprise Server 11 SP1 + 11.1 + <_vendor>SUSE + linux + sles + + + 2010-06-02 + + + + + + LINUX + SLES-11-SP1-DVD-i386 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLES-11-SP1-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + + + sles11sp2 + <_name>SUSE Linux Enterprise Server 11 SP2 + 11.2 + <_vendor>SUSE + linux + sles + + + 2012-02-15 + + + + + + LINUX + SLES-11-SP2-DVD-i386 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLES-11-SP2-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + + + sles11sp3 + <_name>SUSE Linux Enterprise Server 11 SP3 + 11.3 + <_vendor>SUSE + linux + sles + + + 2013-07-01 + + + + + + LINUX + SLES-11-SP3-DVD-i386 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLES-11-SP3-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + + + sles11sp4 + <_name>SUSE Linux Enterprise Server 11 SP4 + 11.4 + <_vendor>SUSE + linux + sles + + + + + + + LINUX + SLES-11-SP4-DVD-i386 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLES-11-SP4-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + sles12 <_name>SUSE Linux Enterprise Server 12 @@ -41,8 +163,21 @@ <_vendor>SUSE linux sles - - + + + + 2014-10-28 + + + + + + LINUX + SLE-12-Server-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + diff --git a/test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt new file mode 100644 index 0000000..2c87aa0 --- /dev/null +++ b/test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLES-11-SP1-DVD-i586.0432.1.001 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLES-11-SP1-DVD-i586-Build0432-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1413388 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 190 400 diff --git a/test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..49fe88d --- /dev/null +++ b/test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLES-11-SP1-DVD-x86_64.0432..001 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLES-11-SP1-DVD-x86_64-Build0432-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1482604 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 1C4 452 diff --git a/test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt new file mode 100644 index 0000000..acb1fa7 --- /dev/null +++ b/test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLES-11-SP2-DVD-i58607551 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLES-11-SP2-DVD-i586-Build0755-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1542080 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 1AE 430 diff --git a/test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..24ae056 --- /dev/null +++ b/test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLES-11-SP2-DVD-x86_6407551 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLES-11-SP2-DVD-x86_64-Build0755-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1623275 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 1E7 487 diff --git a/test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt new file mode 100644 index 0000000..281a781 --- /dev/null +++ b/test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLES-11-SP3-DVD-i58607031 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLES-11-SP3-DVD-i586-Build0703-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1572722 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 1A9 425 diff --git a/test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..1c6cc35 --- /dev/null +++ b/test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLES-11-SP3-DVD-x86_6407031 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLES-11-SP3-DVD-x86_64-Build0703-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1641547 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 1EA 490 diff --git a/test/isodata/sles/sles12/SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sles/sles12/SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..b956bf9 --- /dev/null +++ b/test/isodata/sles/sles12/SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLE-12-Server-DVD-x86_6409511 +Volume set id: +Publisher id: SUSE LINUX GmbH +Data preparer id: KIWI - http://opensuse.github.com/kiwi +Application id: SLE-12-Server-DVD-x86_64-Build0951-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1433984 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX GmbH' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 14BC 5308 -- 2.1.4 From cfergeau at redhat.com Tue May 19 10:03:45 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 19 May 2015 12:03:45 +0200 Subject: [Libosinfo] [PATCH V1] suse: Add sles11 sp1, sp2, sp3 and sp4 In-Reply-To: <1432027794-2946-1-git-send-email-lma@suse.com> References: <1432027794-2946-1-git-send-email-lma@suse.com> Message-ID: <20150519100345.GN19360@edamame.cdg.redhat.com> Hey Lin, On Tue, May 19, 2015 at 05:29:54PM +0800, Lin Ma wrote: > Add entries for SUSE Linux Enterprise Server 11 SP1, SP2, SP3 and SP4. > > Changes in V1: Add media and release-date entries, add testcases This looks good, I had to add the changes below to make 'make check' test for the new SUSE data and succeed. ACK from me with these changes squashed in, I'll push your patch+these additional changes. > > Signed-off-by: Lin Ma > --- > data/oses/suse.xml.in | 139 ++++++++++++++++++++- > .../sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt | 29 +++++ > .../SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > .../sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt | 29 +++++ > .../SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > .../sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt | 29 +++++ > .../SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > .../SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > 8 files changed, 340 insertions(+), 2 deletions(-) > create mode 100644 test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt > create mode 100644 test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt > create mode 100644 test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt > create mode 100644 test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt > create mode 100644 test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt > create mode 100644 test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt > create mode 100644 test/isodata/sles/sles12/SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt > > diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in > index a591db5..822e030 100644 > --- a/data/oses/suse.xml.in > +++ b/data/oses/suse.xml.in > @@ -34,6 +34,128 @@ > > > > + > + sles11sp1 > + <_name>SUSE Linux Enterprise Server 11 SP1 > + 11.1 > + <_vendor>SUSE > + linux > + sles > + > + > + 2010-06-02 > + > + Why do you mention "Server" here? Does this mean there are other SUSE isos for desktop or something else? Here is the small diff I had to add: diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in index 822e030..ce23f59 100644 --- a/data/oses/suse.xml.in +++ b/data/oses/suse.xml.in @@ -50,7 +50,7 @@ LINUX - SLES-11-SP1-DVD-i386 + SLES-11-SP1-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -81,7 +81,7 @@ LINUX - SLES-11-SP2-DVD-i386 + SLES-11-SP2-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -112,7 +112,7 @@ LINUX - SLES-11-SP3-DVD-i386 + SLES-11-SP3-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -141,7 +141,7 @@ LINUX - SLES-11-SP4-DVD-i386 + SLES-11-SP4-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd diff --git a/test/test-isodetect.c b/test/test-isodetect.c index b427d54..c100ece 100644 --- a/test/test-isodetect.c +++ b/test/test-isodetect.c @@ -418,6 +418,12 @@ START_TEST(test_mageia) } END_TEST +START_TEST(test_sles) +{ + test_one("sles"); +} +END_TEST + static Suite * list_suite(void) { @@ -436,6 +442,7 @@ list_suite(void) tcase_add_test(tc, test_gnome); tcase_add_test(tc, test_altlinux); tcase_add_test(tc, test_mageia); + tcase_add_test(tc, test_sles); suite_add_tcase(s, tc); return s; } -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Tue May 19 10:15:05 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 19 May 2015 12:15:05 +0200 Subject: [Libosinfo] [PATCH] vista: Readd volume id removed by mistake Message-ID: <1432030505-28283-1-git-send-email-cfergeau@redhat.com> In my recent commit adding 2 new Windows Vista IDs, I mistakenly removed a preexisting one, breaking make distcheck in the process. --- data/oses/windows.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in index b08fe29..3aa912b 100644 --- a/data/oses/windows.xml.in +++ b/data/oses/windows.xml.in @@ -697,7 +697,7 @@ - (FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRTMEXVOL|FRMBXVOL|FRMEXVOL)_ + (FB1EXVOL|LRMCXFRE|FRTMBXVOL|FRMEXVOL|FRTMEXVOL|FRMBXVOL|FRMCXFRE)_ MICROSOFT CORPORATION [[:upper:][:digit:]]*_([[:upper:]]*) -- 2.4.1 From zeeshanak at gnome.org Tue May 19 10:15:21 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 19 May 2015 11:15:21 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <20150519075923.GH19360@edamame.cdg.redhat.com> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> <20150519075923.GH19360@edamame.cdg.redhat.com> Message-ID: On Tue, May 19, 2015 at 8:59 AM, Christophe Fergeau wrote: > On Mon, May 18, 2015 at 07:12:56PM +0100, Zeeshan Ali (Khattak) wrote: >> On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: >> > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: >> >> Not exactly. It also never worked for live ISO and that is not a major >> >> issue since UIs aren't supposed to offer automatic installer against >> >> live medias. >> > >> > Is this documented somewhere? >> >> This question made me go catch an Anaconda dev: > > I was asking if this is documented somewhere in libosinfo API > documentation. Also note that your statement is ? UIs aren't supposed to > offer automatic installer against live medias. ?, not ? UIs aren't > supposed to offer automatic installer against Fedora live medias ?. Oh, I thought the latter sentence would be self-evident to you so I thought you must be asking about the former. We have a 'installer' flag on media and media that do not provider installers are supposed to have it 'false'. AFAIK the idea of that flag was to inform applications that this media does not do installation. However, now that you mentioned it, I see that we don't set those on any of the live Fedora media. I think we should. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From lma at suse.com Tue May 19 11:49:50 2015 From: lma at suse.com (Lin Ma) Date: Tue, 19 May 2015 19:49:50 +0800 Subject: [Libosinfo] [PATCH V1] suse: Add sles11 sp1, sp2, sp3 and sp4 In-Reply-To: <20150519100345.GN19360@edamame.cdg.redhat.com> References: <1432027794-2946-1-git-send-email-lma@suse.com> <20150519100345.GN19360@edamame.cdg.redhat.com> Message-ID: <555B235E.7050003@suse.com> ? 2015?05?19? 18:03, Christophe Fergeau ??: > Hey Lin, > > > On Tue, May 19, 2015 at 05:29:54PM +0800, Lin Ma wrote: >> Add entries for SUSE Linux Enterprise Server 11 SP1, SP2, SP3 and SP4. >> >> Changes in V1: Add media and release-date entries, add testcases > This looks good, I had to add the changes below to make 'make check' > test for the new SUSE data and succeed. ACK from me with these changes > squashed in, I'll push your patch+these additional changes. > > >> Signed-off-by: Lin Ma >> --- >> data/oses/suse.xml.in | 139 ++++++++++++++++++++- >> .../sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt | 29 +++++ >> .../SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ >> .../sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt | 29 +++++ >> .../SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ >> .../sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt | 29 +++++ >> .../SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ >> .../SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ >> 8 files changed, 340 insertions(+), 2 deletions(-) >> create mode 100644 test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-i586-GM-DVD1.iso.txt >> create mode 100644 test/isodata/sles/sles11sp1/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso.txt >> create mode 100644 test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-i586-GM-DVD1.iso.txt >> create mode 100644 test/isodata/sles/sles11sp2/SLES-11-SP2-DVD-x86_64-GM-DVD1.iso.txt >> create mode 100644 test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-i586-GM-DVD1.iso.txt >> create mode 100644 test/isodata/sles/sles11sp3/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso.txt >> create mode 100644 test/isodata/sles/sles12/SLE-12-Server-DVD-x86_64-GM-DVD1.iso.txt >> >> diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in >> index a591db5..822e030 100644 >> --- a/data/oses/suse.xml.in >> +++ b/data/oses/suse.xml.in >> @@ -34,6 +34,128 @@ >> >> >> >> + >> + sles11sp1 >> + <_name>SUSE Linux Enterprise Server 11 SP1 >> + 11.1 >> + <_vendor>SUSE >> + linux >> + sles >> + >> + >> + 2010-06-02 >> + >> + > Why do you mention "Server" here? Does this mean there are other SUSE > isos for desktop or something else? Yes, There are other SUSE isos for desktop, cloud, HA ...... But for those isos, They are not called sles, e.g: sled for desktop, sle-cloud for suse cloud. So perhaps the "Server" is unnecessary. Would you please help me to remove them or I sent patch V2 to include all of these changes? Thanks! > > Here is the small diff I had to add: > > > diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in > index 822e030..ce23f59 100644 > --- a/data/oses/suse.xml.in > +++ b/data/oses/suse.xml.in > @@ -50,7 +50,7 @@ > > > LINUX > - SLES-11-SP1-DVD-i386 > + SLES-11-SP1-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -81,7 +81,7 @@ > > > LINUX > - SLES-11-SP2-DVD-i386 > + SLES-11-SP2-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -112,7 +112,7 @@ > > > LINUX > - SLES-11-SP3-DVD-i386 > + SLES-11-SP3-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -141,7 +141,7 @@ > > > LINUX > - SLES-11-SP4-DVD-i386 > + SLES-11-SP4-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > diff --git a/test/test-isodetect.c b/test/test-isodetect.c > index b427d54..c100ece 100644 > --- a/test/test-isodetect.c > +++ b/test/test-isodetect.c > @@ -418,6 +418,12 @@ START_TEST(test_mageia) > } > END_TEST > > +START_TEST(test_sles) > +{ > + test_one("sles"); > +} > +END_TEST > + > static Suite * > list_suite(void) > { > @@ -436,6 +442,7 @@ list_suite(void) > tcase_add_test(tc, test_gnome); > tcase_add_test(tc, test_altlinux); > tcase_add_test(tc, test_mageia); > + tcase_add_test(tc, test_sles); > suite_add_tcase(s, tc); > return s; > } From zeeshanak at gnome.org Tue May 19 12:19:16 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 19 May 2015 13:19:16 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> <20150519075923.GH19360@edamame.cdg.redhat.com> Message-ID: On Tue, May 19, 2015 at 11:15 AM, Zeeshan Ali (Khattak) wrote: > On Tue, May 19, 2015 at 8:59 AM, Christophe Fergeau wrote: >> On Mon, May 18, 2015 at 07:12:56PM +0100, Zeeshan Ali (Khattak) wrote: >>> On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: >>> > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: >>> >> Not exactly. It also never worked for live ISO and that is not a major >>> >> issue since UIs aren't supposed to offer automatic installer against >>> >> live medias. >>> > >>> > Is this documented somewhere? >>> >>> This question made me go catch an Anaconda dev: >> >> I was asking if this is documented somewhere in libosinfo API >> documentation. Also note that your statement is ? UIs aren't supposed to >> offer automatic installer against live medias. ?, not ? UIs aren't >> supposed to offer automatic installer against Fedora live medias ?. > > Oh, I thought the latter sentence would be self-evident to you so I > thought you must be asking about the former. > > We have a 'installer' flag on media and media that do not provider > installers are supposed to have it 'false'. AFAIK the idea of that > flag was to inform applications that this media does not do > installation. However, now that you mentioned it, I see that we don't > set those on any of the live Fedora media. I think we should. Looking more into the git history, I now remember that "installer" flag indicates if media provides installation or not. Since its possible to do installation from Fedora live medias (just like with kickstart), installer=true (which is default) is correct for them. Having said that, at least Boxes doesn't look at this flag and since i don't really know of any purely live media (GNOME used to produce them but not any more afaik) and I don't see how this distinction of purely live or not would be of any benefit to apps, I wonder if we could simply change of 'installer' flag to whether or not media supports automated installation? -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Tue May 19 12:19:21 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 19 May 2015 14:19:21 +0200 Subject: [Libosinfo] [PATCH V1] suse: Add sles11 sp1, sp2, sp3 and sp4 In-Reply-To: <555B235E.7050003@suse.com> References: <1432027794-2946-1-git-send-email-lma@suse.com> <20150519100345.GN19360@edamame.cdg.redhat.com> <555B235E.7050003@suse.com> Message-ID: <20150519121921.GQ19360@edamame.cdg.redhat.com> On Tue, May 19, 2015 at 07:49:50PM +0800, Lin Ma wrote: > >Why do you mention "Server" here? Does this mean there are other SUSE > >isos for desktop or something else? > Yes, There are other SUSE isos for desktop, cloud, HA ...... > But for those isos, They are not called sles, e.g: sled for desktop, > sle-cloud for suse cloud. > So perhaps the "Server" is unnecessary. Would you please help me to remove > them or I sent patch V2 to include all of these changes? I've added squashed my changes in that commit, removed the "Server" comment and push this, thanks for the patch! Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Wed May 20 07:59:48 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 20 May 2015 09:59:48 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> <20150519075923.GH19360@edamame.cdg.redhat.com> Message-ID: <20150520075948.GA25549@edamame.cdg.redhat.com> On Tue, May 19, 2015 at 01:19:16PM +0100, Zeeshan Ali (Khattak) wrote: > On Tue, May 19, 2015 at 11:15 AM, Zeeshan Ali (Khattak) > wrote: > > On Tue, May 19, 2015 at 8:59 AM, Christophe Fergeau wrote: > >> On Mon, May 18, 2015 at 07:12:56PM +0100, Zeeshan Ali (Khattak) wrote: > >>> On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: > >>> > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: > >>> >> Not exactly. It also never worked for live ISO and that is not a major > >>> >> issue since UIs aren't supposed to offer automatic installer against > >>> >> live medias. > >>> > > >>> > Is this documented somewhere? > >>> > >>> This question made me go catch an Anaconda dev: > >> > >> I was asking if this is documented somewhere in libosinfo API > >> documentation. Also note that your statement is ? UIs aren't supposed to > >> offer automatic installer against live medias. ?, not ? UIs aren't > >> supposed to offer automatic installer against Fedora live medias ?. > > > > Oh, I thought the latter sentence would be self-evident to you so I > > thought you must be asking about the former. > > > > We have a 'installer' flag on media and media that do not provider > > installers are supposed to have it 'false'. AFAIK the idea of that > > flag was to inform applications that this media does not do > > installation. However, now that you mentioned it, I see that we don't > > set those on any of the live Fedora media. I think we should. > > Looking more into the git history, I now remember that "installer" > flag indicates if media provides installation or not. Since its > possible to do installation from Fedora live medias (just like with > kickstart), installer=true (which is default) is correct for them. > > Having said that, at least Boxes doesn't look at this flag and since i > don't really know of any purely live media (GNOME used to produce them > but not any more afaik) and I don't see how this distinction of purely > live or not would be of any benefit to apps, I wonder if we could > simply change of 'installer' flag to whether or not media supports > automated installation? Actually, I think installer=false would make sense for disk 2, 3, 4 in the media entries for older fedoras. You probably can't boot nor start an install from these, you need to use the first disk. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Wed May 20 09:59:37 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 20 May 2015 11:59:37 +0200 Subject: [Libosinfo] [PATCH 0/3] Add newer Ubuntu/Debian releases In-Reply-To: References: <1430395164-31537-1-git-send-email-cfergeau@redhat.com> Message-ID: <20150520095937.GA11838@edamame.cdg.redhat.com> Hey, On Thu, Apr 30, 2015 at 02:17:24PM +0100, Zeeshan Ali (Khattak) wrote: > On Thu, Apr 30, 2015 at 12:59 PM, Christophe Fergeau > wrote: > > Hey, > > > > This patch series adds the latest releases of Debian and Ubuntu. Automatic > > install is commented out as I haven't tested if it works. > > Not objecting but if could you please test that, that would be lovely. > I'm afraid nobody will get around to doing that anytime soon > otherwise. I finally tested that, debian 8.0 autoinstall works, though if I don't specify a password, then I can't log in after installation. I could not find older ISOs to check if this is a new issue or not. Ubuntu (even older versions such as 12.04) can't be autoinstalled in Boxes at the moment as it only has a jeos profile, not a desktop one. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From zeeshanak at gnome.org Wed May 20 11:16:23 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 20 May 2015 12:16:23 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: <20150520075948.GA25549@edamame.cdg.redhat.com> References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> <20150519075923.GH19360@edamame.cdg.redhat.com> <20150520075948.GA25549@edamame.cdg.redhat.com> Message-ID: On Wed, May 20, 2015 at 8:59 AM, Christophe Fergeau wrote: > On Tue, May 19, 2015 at 01:19:16PM +0100, Zeeshan Ali (Khattak) wrote: >> On Tue, May 19, 2015 at 11:15 AM, Zeeshan Ali (Khattak) >> wrote: >> > On Tue, May 19, 2015 at 8:59 AM, Christophe Fergeau wrote: >> >> On Mon, May 18, 2015 at 07:12:56PM +0100, Zeeshan Ali (Khattak) wrote: >> >>> On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: >> >>> > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: >> >>> >> Not exactly. It also never worked for live ISO and that is not a major >> >>> >> issue since UIs aren't supposed to offer automatic installer against >> >>> >> live medias. >> >>> > >> >>> > Is this documented somewhere? >> >>> >> >>> This question made me go catch an Anaconda dev: >> >> >> >> I was asking if this is documented somewhere in libosinfo API >> >> documentation. Also note that your statement is ? UIs aren't supposed to >> >> offer automatic installer against live medias. ?, not ? UIs aren't >> >> supposed to offer automatic installer against Fedora live medias ?. >> > >> > Oh, I thought the latter sentence would be self-evident to you so I >> > thought you must be asking about the former. >> > >> > We have a 'installer' flag on media and media that do not provider >> > installers are supposed to have it 'false'. AFAIK the idea of that >> > flag was to inform applications that this media does not do >> > installation. However, now that you mentioned it, I see that we don't >> > set those on any of the live Fedora media. I think we should. >> >> Looking more into the git history, I now remember that "installer" >> flag indicates if media provides installation or not. Since its >> possible to do installation from Fedora live medias (just like with >> kickstart), installer=true (which is default) is correct for them. >> >> Having said that, at least Boxes doesn't look at this flag and since i >> don't really know of any purely live media (GNOME used to produce them >> but not any more afaik) and I don't see how this distinction of purely >> live or not would be of any benefit to apps, I wonder if we could >> simply change of 'installer' flag to whether or not media supports >> automated installation? > > Actually, I think installer=false would make sense for disk 2, 3, 4 in > the media entries for older fedoras. You probably can't boot nor start > an install from these, you need to use the first disk. Sure, that would be the correct thing to do keeping the current meaning of 'installer' flag but I was trying to make a case for maybe changing the meaning. Even with the changed meaning, installer=false would be correct for these media since you can't do auto-install from them. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 20 11:23:09 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 20 May 2015 12:23:09 +0100 Subject: [Libosinfo] [PATCH 0/3] Add newer Ubuntu/Debian releases In-Reply-To: <20150520095937.GA11838@edamame.cdg.redhat.com> References: <1430395164-31537-1-git-send-email-cfergeau@redhat.com> <20150520095937.GA11838@edamame.cdg.redhat.com> Message-ID: On Wed, May 20, 2015 at 10:59 AM, Christophe Fergeau wrote: > Hey, > > On Thu, Apr 30, 2015 at 02:17:24PM +0100, Zeeshan Ali (Khattak) wrote: >> On Thu, Apr 30, 2015 at 12:59 PM, Christophe Fergeau >> wrote: >> > Hey, >> > >> > This patch series adds the latest releases of Debian and Ubuntu. Automatic >> > install is commented out as I haven't tested if it works. >> >> Not objecting but if could you please test that, that would be lovely. >> I'm afraid nobody will get around to doing that anytime soon >> otherwise. > > I finally tested that, debian 8.0 autoinstall works, though if I don't > specify a password, then I can't log in after installation. I could not > find older ISOs to check if this is a new issue or not. > Ubuntu (even older versions such as 12.04) can't be autoinstalled in > Boxes at the moment as it only has a jeos profile, not a desktop one. Thanks for testing! I'd then say that we should require password in the install script. Don't think its really worth testing the older media if it was required or not then but alternatively you could do that if you like. Even if they didn't require it, the only solution would be to have a separate script for older and new versions and I really don't think that's worth it. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 20 11:30:34 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 20 May 2015 12:30:34 +0100 Subject: [Libosinfo] [PATCH 0/3] Add newer Ubuntu/Debian releases In-Reply-To: References: <1430395164-31537-1-git-send-email-cfergeau@redhat.com> <20150520095937.GA11838@edamame.cdg.redhat.com> Message-ID: On Wed, May 20, 2015 at 12:23 PM, Zeeshan Ali (Khattak) wrote: > On Wed, May 20, 2015 at 10:59 AM, Christophe Fergeau > wrote: >> Hey, >> >> On Thu, Apr 30, 2015 at 02:17:24PM +0100, Zeeshan Ali (Khattak) wrote: >>> On Thu, Apr 30, 2015 at 12:59 PM, Christophe Fergeau >>> wrote: >>> > Hey, >>> > >>> > This patch series adds the latest releases of Debian and Ubuntu. Automatic >>> > install is commented out as I haven't tested if it works. >>> >>> Not objecting but if could you please test that, that would be lovely. >>> I'm afraid nobody will get around to doing that anytime soon >>> otherwise. >> >> I finally tested that, debian 8.0 autoinstall works, though if I don't >> specify a password, then I can't log in after installation. I could not >> find older ISOs to check if this is a new issue or not. >> Ubuntu (even older versions such as 12.04) can't be autoinstalled in >> Boxes at the moment as it only has a jeos profile, not a desktop one. > > Thanks for testing! I'd then say that we should require password in > the install script. Don't think its really worth testing the older > media if it was required or not then but alternatively you could do > that if you like. Even if they didn't require it, the only solution > would be to have a separate script for older and new versions and I > really don't think that's worth it. Looking at the script, it seems Lasse did ensure that no-password case works but only for desktop profile so I think the solution is simply to sync the jeos profile with desktop. -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Wed May 20 11:43:45 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Wed, 20 May 2015 12:43:45 +0100 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <1431539316-18659-1-git-send-email-zeeshanak@gnome.org> <20150518152350.GV19360@edamame.cdg.redhat.com> <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> <20150519075923.GH19360@edamame.cdg.redhat.com> <20150520075948.GA25549@edamame.cdg.redhat.com> Message-ID: On Wed, May 20, 2015 at 12:16 PM, Zeeshan Ali (Khattak) wrote: > On Wed, May 20, 2015 at 8:59 AM, Christophe Fergeau wrote: >> On Tue, May 19, 2015 at 01:19:16PM +0100, Zeeshan Ali (Khattak) wrote: >>> On Tue, May 19, 2015 at 11:15 AM, Zeeshan Ali (Khattak) >>> wrote: >>> > On Tue, May 19, 2015 at 8:59 AM, Christophe Fergeau wrote: >>> >> On Mon, May 18, 2015 at 07:12:56PM +0100, Zeeshan Ali (Khattak) wrote: >>> >>> On Mon, May 18, 2015 at 5:43 PM, Christophe Fergeau wrote: >>> >>> > On Mon, May 18, 2015 at 05:29:49PM +0100, Zeeshan Ali (Khattak) wrote: >>> >>> >> Not exactly. It also never worked for live ISO and that is not a major >>> >>> >> issue since UIs aren't supposed to offer automatic installer against >>> >>> >> live medias. >>> >>> > >>> >>> > Is this documented somewhere? >>> >>> >>> >>> This question made me go catch an Anaconda dev: >>> >> >>> >> I was asking if this is documented somewhere in libosinfo API >>> >> documentation. Also note that your statement is ? UIs aren't supposed to >>> >> offer automatic installer against live medias. ?, not ? UIs aren't >>> >> supposed to offer automatic installer against Fedora live medias ?. >>> > >>> > Oh, I thought the latter sentence would be self-evident to you so I >>> > thought you must be asking about the former. >>> > >>> > We have a 'installer' flag on media and media that do not provider >>> > installers are supposed to have it 'false'. AFAIK the idea of that >>> > flag was to inform applications that this media does not do >>> > installation. However, now that you mentioned it, I see that we don't >>> > set those on any of the live Fedora media. I think we should. >>> >>> Looking more into the git history, I now remember that "installer" >>> flag indicates if media provides installation or not. Since its >>> possible to do installation from Fedora live medias (just like with >>> kickstart), installer=true (which is default) is correct for them. >>> >>> Having said that, at least Boxes doesn't look at this flag and since i >>> don't really know of any purely live media (GNOME used to produce them >>> but not any more afaik) and I don't see how this distinction of purely >>> live or not would be of any benefit to apps, I wonder if we could >>> simply change of 'installer' flag to whether or not media supports >>> automated installation? >> >> Actually, I think installer=false would make sense for disk 2, 3, 4 in >> the media entries for older fedoras. You probably can't boot nor start >> an install from these, you need to use the first disk. > > Sure, that would be the correct thing to do keeping the current > meaning of 'installer' flag but I was trying to make a case for maybe > changing the meaning. Even with the changed meaning, installer=false > would be correct for these media since you can't do auto-install from > them. Hmm.. and actually we don't need to change the meaning of installer flag too much. It could just mean whether or not you can boot into installation from the media. Fedora's live ISO don't provide that option and the ones that do (ubuntu), they also support auto install. Actually this could also enable Boxes to decide whether or not to present autoinstall option for OS that only provides live media (e.g Ubuntu). -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Wed May 20 12:04:46 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 20 May 2015 14:04:46 +0200 Subject: [Libosinfo] [PATCH 01/10] install-script: Add some missing docs In-Reply-To: References: <20150518160750.GY19360@edamame.cdg.redhat.com> <20150518164315.GB19360@edamame.cdg.redhat.com> <20150519075923.GH19360@edamame.cdg.redhat.com> <20150520075948.GA25549@edamame.cdg.redhat.com> Message-ID: <20150520120446.GB11838@edamame.cdg.redhat.com> On Wed, May 20, 2015 at 12:43:45PM +0100, Zeeshan Ali (Khattak) wrote: > Hmm.. and actually we don't need to change the meaning of installer > flag too much. It could just mean whether or not you can boot into > installation from the media. Fedora's live ISO don't provide that > option and the ones that do (ubuntu), they also support auto install. The fact that the ubuntu live can also be booted as an installer, and can also be autoinstalled does not mean this is automatically going to be true for every ubuntu derivative. So I think we need 3 flags here, live/not live, installer/not installer, automatic install/no automatic install. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From lma at suse.com Thu May 21 10:12:34 2015 From: lma at suse.com (Lin Ma) Date: Thu, 21 May 2015 18:12:34 +0800 Subject: [Libosinfo] [PATCH] suse: Add sled11 sp1, sp2, sp3 and sp4 Message-ID: <1432203154-31144-1-git-send-email-lma@suse.com> Add entries for SUSE Linux Enterprise Desktop 11 SP1, SP2, SP3 and SP4. I can't find out the release date information about these SLED distros, will update them when I get figure them out. The patch also corrects the volume-id information for sles 11.x 32bit. Signed-off-by: Lin Ma --- data/oses/suse.xml.in | 129 ++++++++++++++++++++- .../sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt | 29 +++++ .../SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ .../sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt | 29 +++++ .../SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ .../sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt | 29 +++++ .../SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ .../SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ test/test-isodetect.c | 7 ++ 9 files changed, 333 insertions(+), 6 deletions(-) create mode 100644 test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt create mode 100644 test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt create mode 100644 test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt create mode 100644 test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt create mode 100644 test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt create mode 100644 test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt create mode 100644 test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in index 2fc70ae..1d913dc 100644 --- a/data/oses/suse.xml.in +++ b/data/oses/suse.xml.in @@ -48,7 +48,7 @@ LINUX - SLES-11-SP1-DVD-i386 + SLES-11-SP1-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -77,7 +77,7 @@ LINUX - SLES-11-SP2-DVD-i386 + SLES-11-SP2-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -106,7 +106,7 @@ LINUX - SLES-11-SP3-DVD-i386 + SLES-11-SP3-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -133,7 +133,7 @@ LINUX - SLES-11-SP4-DVD-i386 + SLES-11-SP4-DVD-i586 boot/i386/loader/linux boot/i386/loader/initrd @@ -221,6 +221,114 @@ + + sled11sp1 + <_name>SUSE Linux Enterprise Desktop 11 SP1 + 11.1 + <_vendor>SUSE + linux + sled + + + + + LINUX + SLED-11-SP1-DVD-i586 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLED-11-SP1-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + + + sled11sp2 + <_name>SUSE Linux Enterprise Desktop 11 SP2 + 11.2 + <_vendor>SUSE + linux + sled + + + + + LINUX + SLED-11-SP2-DVD-i586 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLED-11-SP2-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + + + sled11sp3 + <_name>SUSE Linux Enterprise Desktop 11 SP3 + 11.3 + <_vendor>SUSE + linux + sled + + + + + LINUX + SLED-11-SP3-DVD-i586 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLED-11-SP3-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + + + sled11sp4 + <_name>SUSE Linux Enterprise Desktop 11 SP4 + 11.4 + <_vendor>SUSE + linux + sled + + + + + LINUX + SLED-11-SP4-DVD-i586 + + boot/i386/loader/linux + boot/i386/loader/initrd + + + + LINUX + SLED-11-SP4-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + + + sled12 <_name>SUSE Linux Enterprise Desktop 12 @@ -228,8 +336,17 @@ <_vendor>SUSE linux sled - - + + + + + + LINUX + SLE-12-Desktop-DVD-x86_64 + + boot/x86_64/loader/linux + boot/x86_64/loader/initrd + diff --git a/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt new file mode 100644 index 0000000..0e1785e --- /dev/null +++ b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLED-11-SP1-DVD-i586.0336.1.001 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLED-11-SP1-DVD-i586-Build0336-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2106690 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 20A 522 diff --git a/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..0ee3753 --- /dev/null +++ b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLED-11-SP1-DVD-x86_64.0336..001 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLED-11-SP1-DVD-x86_64-Build0336-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2178524 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 239 569 diff --git a/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt new file mode 100644 index 0000000..03da31d --- /dev/null +++ b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLED-11-SP2-DVD-i58606261 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLED-11-SP2-DVD-i586-Build0626-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2183881 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 217 535 diff --git a/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..549d221 --- /dev/null +++ b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLED-11-SP2-DVD-x86_6406261 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLED-11-SP2-DVD-x86_64-Build0626-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2264068 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 24C 588 diff --git a/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt new file mode 100644 index 0000000..713428c --- /dev/null +++ b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLED-11-SP3-DVD-i58604841 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLED-11-SP3-DVD-i586-Build0484-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2171398 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 215 533 diff --git a/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..a5c3d08 --- /dev/null +++ b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLED-11-SP3-DVD-x86_6404841 +Volume set id: +Publisher id: SUSE LINUX Products GmbH +Data preparer id: KIWI - http://kiwi.berlios.de +Application id: SLED-11-SP3-DVD-x86_64-Build0484-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2230315 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX Products Gmb' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 252 594 diff --git a/test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt new file mode 100644 index 0000000..ddf7ff0 --- /dev/null +++ b/test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: LINUX +Volume id: SLE-12-Desktop-DVD-x86_6405561 +Volume set id: +Publisher id: SUSE LINUX GmbH +Data preparer id: KIWI - http://opensuse.github.com/kiwi +Application id: SLE-12-Desktop-DVD-x86_64-Build0556-Media1 +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 2140317 +El Torito VD version 1 found, boot catalog is in sector 20 +Joliet with UCS level 3 found +Rock Ridge signatures version 1 found +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'SUSE LINUX GmbH' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 4 + Bootoff 14D4 5332 diff --git a/test/test-isodetect.c b/test/test-isodetect.c index c100ece..9b391b3 100644 --- a/test/test-isodetect.c +++ b/test/test-isodetect.c @@ -424,6 +424,12 @@ START_TEST(test_sles) } END_TEST +START_TEST(test_sled) +{ + test_one("sled"); +} +END_TEST + static Suite * list_suite(void) { @@ -443,6 +449,7 @@ list_suite(void) tcase_add_test(tc, test_altlinux); tcase_add_test(tc, test_mageia); tcase_add_test(tc, test_sles); + tcase_add_test(tc, test_sled); suite_add_tcase(s, tc); return s; } -- 2.1.4 From zeeshanak at gnome.org Tue May 26 12:23:03 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 26 May 2015 13:23:03 +0100 Subject: [Libosinfo] [PATCH] suse: Add sled11 sp1, sp2, sp3 and sp4 In-Reply-To: <1432203154-31144-1-git-send-email-lma@suse.com> References: <1432203154-31144-1-git-send-email-lma@suse.com> Message-ID: On Thu, May 21, 2015 at 11:12 AM, Lin Ma wrote: > Add entries for SUSE Linux Enterprise Desktop 11 SP1, SP2, SP3 and SP4. > I can't find out the release date information about these SLED distros, > will update them when I get figure them out. > > The patch also corrects the volume-id information for sles 11.x 32bit. Separate change, separate patch please! > Signed-off-by: Lin Ma > --- > data/oses/suse.xml.in | 129 ++++++++++++++++++++- > .../sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt | 29 +++++ > .../SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > .../sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt | 29 +++++ > .../SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > .../sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt | 29 +++++ > .../SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > .../SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt | 29 +++++ > test/test-isodetect.c | 7 ++ > 9 files changed, 333 insertions(+), 6 deletions(-) > create mode 100644 test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt > create mode 100644 test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt > create mode 100644 test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt > create mode 100644 test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt > create mode 100644 test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt > create mode 100644 test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt > create mode 100644 test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt > > diff --git a/data/oses/suse.xml.in b/data/oses/suse.xml.in > index 2fc70ae..1d913dc 100644 > --- a/data/oses/suse.xml.in > +++ b/data/oses/suse.xml.in > @@ -48,7 +48,7 @@ > > > LINUX > - SLES-11-SP1-DVD-i386 > + SLES-11-SP1-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -77,7 +77,7 @@ > > > LINUX > - SLES-11-SP2-DVD-i386 > + SLES-11-SP2-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -106,7 +106,7 @@ > > > LINUX > - SLES-11-SP3-DVD-i386 > + SLES-11-SP3-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -133,7 +133,7 @@ > > > LINUX > - SLES-11-SP4-DVD-i386 > + SLES-11-SP4-DVD-i586 > > boot/i386/loader/linux > boot/i386/loader/initrd > @@ -221,6 +221,114 @@ > > > > + > + sled11sp1 > + <_name>SUSE Linux Enterprise Desktop 11 SP1 > + 11.1 > + <_vendor>SUSE > + linux > + sled > + > + > + > + > + LINUX > + SLED-11-SP1-DVD-i586 > + > + boot/i386/loader/linux > + boot/i386/loader/initrd > + > + > + > + LINUX > + SLED-11-SP1-DVD-x86_64 > + > + boot/x86_64/loader/linux > + boot/x86_64/loader/initrd > + > + > + > + > + sled11sp2 > + <_name>SUSE Linux Enterprise Desktop 11 SP2 > + 11.2 > + <_vendor>SUSE > + linux > + sled > + > + > + > + > + LINUX > + SLED-11-SP2-DVD-i586 > + > + boot/i386/loader/linux > + boot/i386/loader/initrd > + > + > + > + LINUX > + SLED-11-SP2-DVD-x86_64 > + > + boot/x86_64/loader/linux > + boot/x86_64/loader/initrd > + > + > + > + > + sled11sp3 > + <_name>SUSE Linux Enterprise Desktop 11 SP3 > + 11.3 > + <_vendor>SUSE > + linux > + sled > + > + > + > + > + LINUX > + SLED-11-SP3-DVD-i586 > + > + boot/i386/loader/linux > + boot/i386/loader/initrd > + > + > + > + LINUX > + SLED-11-SP3-DVD-x86_64 > + > + boot/x86_64/loader/linux > + boot/x86_64/loader/initrd > + > + > + > + > + sled11sp4 > + <_name>SUSE Linux Enterprise Desktop 11 SP4 > + 11.4 > + <_vendor>SUSE > + linux > + sled > + > + > + > + > + LINUX > + SLED-11-SP4-DVD-i586 > + > + boot/i386/loader/linux > + boot/i386/loader/initrd > + > + > + > + LINUX > + SLED-11-SP4-DVD-x86_64 > + > + boot/x86_64/loader/linux > + boot/x86_64/loader/initrd > + > + > + > > sled12 > <_name>SUSE Linux Enterprise Desktop 12 > @@ -228,8 +336,17 @@ > <_vendor>SUSE > linux > sled > - > - > + > + > + > + > + > + LINUX > + SLE-12-Desktop-DVD-x86_64 > + > + boot/x86_64/loader/linux > + boot/x86_64/loader/initrd > + > > > > diff --git a/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..0e1785e > --- /dev/null > +++ b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-i586-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLED-11-SP1-DVD-i586.0336.1.001 > +Volume set id: > +Publisher id: SUSE LINUX Products GmbH > +Data preparer id: KIWI - http://kiwi.berlios.de > +Application id: SLED-11-SP1-DVD-i586-Build0336-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2106690 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX Products Gmb' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 20A 522 > diff --git a/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..0ee3753 > --- /dev/null > +++ b/test/isodata/sled/sled11sp1/SLED-11-SP1-DVD-x86_64-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLED-11-SP1-DVD-x86_64.0336..001 > +Volume set id: > +Publisher id: SUSE LINUX Products GmbH > +Data preparer id: KIWI - http://kiwi.berlios.de > +Application id: SLED-11-SP1-DVD-x86_64-Build0336-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2178524 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX Products Gmb' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 239 569 > diff --git a/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..03da31d > --- /dev/null > +++ b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-i586-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLED-11-SP2-DVD-i58606261 > +Volume set id: > +Publisher id: SUSE LINUX Products GmbH > +Data preparer id: KIWI - http://kiwi.berlios.de > +Application id: SLED-11-SP2-DVD-i586-Build0626-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2183881 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX Products Gmb' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 217 535 > diff --git a/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..549d221 > --- /dev/null > +++ b/test/isodata/sled/sled11sp2/SLED-11-SP2-DVD-x86_64-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLED-11-SP2-DVD-x86_6406261 > +Volume set id: > +Publisher id: SUSE LINUX Products GmbH > +Data preparer id: KIWI - http://kiwi.berlios.de > +Application id: SLED-11-SP2-DVD-x86_64-Build0626-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2264068 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX Products Gmb' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 24C 588 > diff --git a/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..713428c > --- /dev/null > +++ b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-i586-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLED-11-SP3-DVD-i58604841 > +Volume set id: > +Publisher id: SUSE LINUX Products GmbH > +Data preparer id: KIWI - http://kiwi.berlios.de > +Application id: SLED-11-SP3-DVD-i586-Build0484-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2171398 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX Products Gmb' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 215 533 > diff --git a/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..a5c3d08 > --- /dev/null > +++ b/test/isodata/sled/sled11sp3/SLED-11-SP3-DVD-x86_64-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLED-11-SP3-DVD-x86_6404841 > +Volume set id: > +Publisher id: SUSE LINUX Products GmbH > +Data preparer id: KIWI - http://kiwi.berlios.de > +Application id: SLED-11-SP3-DVD-x86_64-Build0484-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2230315 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX Products Gmb' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 252 594 > diff --git a/test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt b/test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt > new file mode 100644 > index 0000000..ddf7ff0 > --- /dev/null > +++ b/test/isodata/sled/sled12/SLE-12-Desktop-DVD-x86_64-GM-DVD1.iso.txt > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: LINUX > +Volume id: SLE-12-Desktop-DVD-x86_6405561 > +Volume set id: > +Publisher id: SUSE LINUX GmbH > +Data preparer id: KIWI - http://opensuse.github.com/kiwi > +Application id: SLE-12-Desktop-DVD-x86_64-Build0556-Media1 > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 2140317 > +El Torito VD version 1 found, boot catalog is in sector 20 > +Joliet with UCS level 3 found > +Rock Ridge signatures version 1 found > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'SUSE LINUX GmbH' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 4 > + Bootoff 14D4 5332 > diff --git a/test/test-isodetect.c b/test/test-isodetect.c > index c100ece..9b391b3 100644 > --- a/test/test-isodetect.c > +++ b/test/test-isodetect.c > @@ -424,6 +424,12 @@ START_TEST(test_sles) > } > END_TEST > > +START_TEST(test_sled) > +{ > + test_one("sled"); > +} > +END_TEST > + > static Suite * > list_suite(void) > { > @@ -443,6 +449,7 @@ list_suite(void) > tcase_add_test(tc, test_altlinux); > tcase_add_test(tc, test_mageia); > tcase_add_test(tc, test_sles); > + tcase_add_test(tc, test_sled); > suite_add_tcase(s, tc); > return s; > } > -- > 2.1.4 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Tue May 26 12:24:14 2015 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Tue, 26 May 2015 13:24:14 +0100 Subject: [Libosinfo] [PATCH] suse: Add sled11 sp1, sp2, sp3 and sp4 In-Reply-To: References: <1432203154-31144-1-git-send-email-lma@suse.com> Message-ID: On Tue, May 26, 2015 at 1:23 PM, Zeeshan Ali (Khattak) wrote: > On Thu, May 21, 2015 at 11:12 AM, Lin Ma wrote: >> Add entries for SUSE Linux Enterprise Desktop 11 SP1, SP2, SP3 and SP4. >> I can't find out the release date information about these SLED distros, >> will update them when I get figure them out. >> >> The patch also corrects the volume-id information for sles 11.x 32bit. > > Separate change, separate patch please! Sorry for the shouting mark (!), typo. :) -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From cfergeau at redhat.com Tue May 26 12:54:50 2015 From: cfergeau at redhat.com (Christophe Fergeau) Date: Tue, 26 May 2015 14:54:50 +0200 Subject: [Libosinfo] [PATCH v2 1/3] Add Debian 8.0 detection Message-ID: <1432644892-1217-1-git-send-email-cfergeau@redhat.com> --- I haven't made any changes wrt the empty password issue I noticed during my testing. I've emailed Lasse to ask if he has some insight on that matter. Christophe data/oses/debian.xml.in | 52 ++++++++++++++++++++++ .../debian/debian8/debian-8.0.0-amd64-CD-1.iso.txt | 29 ++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 test/isodata/debian/debian8/debian-8.0.0-amd64-CD-1.iso.txt diff --git a/data/oses/debian.xml.in b/data/oses/debian.xml.in index 61d4d52..0e14568 100644 --- a/data/oses/debian.xml.in +++ b/data/oses/debian.xml.in @@ -260,4 +260,56 @@ + + debian8 + debianjessie + <_name>Debian Jessie + 8 + <_vendor>Debian Project + linux + debian + + + + + + + + + + 1000000000 + 1 + 1073741824 + 10737418240 + + + 1000000000 + 1073741824 + 21474836480 + + + + + http://cdimage.debian.org/debian-cd/8.0.0/i386/iso-dvd/debian-8.0.0-i386-DVD-1.iso + + Debian 8.\d.\d i386 1 + + install.386/vmlinuz + install.386/initrd.gz + + + http://cdimage.debian.org/debian-cd/8.0.0/amd64/iso-dvd/debian-8.0.0-amd64-DVD-1.iso + + Debian 8.\d.\d amd64 1 + + install.amd/vmlinuz + install.amd/initrd.gz + + + +