From mprivozn at redhat.com Fri Feb 1 14:19:59 2013
From: mprivozn at redhat.com (Michal Privoznik)
Date: Fri, 01 Feb 2013 15:19:59 +0100
Subject: [Libosinfo] [libosinfo] Use gnulib's ignore-value.h to silence
gcc
In-Reply-To: <1359636202-25516-1-git-send-email-cfergeau@redhat.com>
References: <1359636202-25516-1-git-send-email-cfergeau@redhat.com>
Message-ID: <510BCF0F.2040907@redhat.com>
On 31.01.2013 13:43, Christophe Fergeau wrote:
> osinfo_loader.c contains a few local hacks to avoid gcc warnings
> about set-but-not-read variables. While they are good to silence
> gcc, they also cause warnings from the Coverity checker.
> Use the ignore_value() macro from gnulib to avoid these warnings
> as they don't cause Coverity warnings.
> ---
> osinfo/ignore-value.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> osinfo/osinfo_loader.c | 19 ++++++-------------
> 2 files changed, 53 insertions(+), 13 deletions(-)
> create mode 100644 osinfo/ignore-value.h
>
> diff --git a/osinfo/ignore-value.h b/osinfo/ignore-value.h
> new file mode 100644
> index 0000000..6bab971
> --- /dev/null
> +++ b/osinfo/ignore-value.h
> @@ -0,0 +1,47 @@
> +/* ignore a function return without a compiler warning
> +
> + Copyright (C) 2008-2013 Free Software Foundation, Inc.
> +
> + This program is free software: you can redistribute it and/or modify
> + it under the terms of the GNU Lesser General Public License as published by
> + the Free Software Foundation; either version 2.1 of the License, or
> + (at your option) any later version.
> +
> + This program is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + GNU Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public License
> + along with this program. If not, see . */
> +
> +/* Written by Jim Meyering, Eric Blake and P?draig Brady. */
> +
> +/* Use "ignore_value" to avoid a warning when using a function declared with
> + gcc's warn_unused_result attribute, but for which you really do want to
> + ignore the result. Traditionally, people have used a "(void)" cast to
> + indicate that a function's return value is deliberately unused. However,
> + if the function is declared with __attribute__((warn_unused_result)),
> + gcc issues a warning even with the cast.
> +
> + Caution: most of the time, you really should heed gcc's warning, and
> + check the return value. However, in those exceptional cases in which
> + you're sure you know what you're doing, use this function.
> +
> + For the record, here's one of the ignorable warnings:
> + "copy.c:233: warning: ignoring return value of 'fchown',
> + declared with attribute warn_unused_result". */
> +
> +#ifndef _GL_IGNORE_VALUE_H
> +# define _GL_IGNORE_VALUE_H
> +
> +/* The __attribute__((__warn_unused_result__)) feature
> + is available in gcc versions 3.4 and newer,
> + while the typeof feature has been available since 2.7 at least. */
> +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
> +# define ignore_value(x) ((void) (x))
> +# else
> +# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; }))
> +# endif
> +
> +#endif
> diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
> index d713767..76e9bc2 100644
> --- a/osinfo/osinfo_loader.c
> +++ b/osinfo/osinfo_loader.c
> @@ -34,6 +34,7 @@
> #include
> #include
> #include
> +#include "ignore-value.h"
> #include "osinfo_install_script_private.h"
> #include "osinfo_device_driver_private.h"
>
> @@ -1486,20 +1487,15 @@ osinfo_loader_process_file_reg_ids(OsinfoLoader *loader,
> WANT_ID(subvendor_id);
> WANT_ID(subdevice_id);
> WANT_REST(subsystem);
> -
> - /* Pretend we 'use' these variables to get around
> - * 'gcc' warnings about set-but-not-read vars */
> - if (subvendor_id || subdevice_id || subsystem)
> - subsystem = subsystem;
> + ignore_value(subvendor_id);
> + ignore_value(subdevice_id);
> + ignore_value(subsystem);
The code looks okay, but why do we have these variable if they are not
used anywhere?
Michal
From zeeshanak at gnome.org Fri Feb 1 15:54:42 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 1 Feb 2013 16:54:42 +0100
Subject: [Libosinfo] [PATCH 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <20130129091905.GO22845@teriyaki.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-8-git-send-email-zeeshanak@gnome.org>
<20130128110122.GG2332@teriyaki.redhat.com>
<20130128172506.GE22845@teriyaki.redhat.com>
<20130129091905.GO22845@teriyaki.redhat.com>
Message-ID:
On Tue, Jan 29, 2013 at 10:19 AM, Christophe Fergeau
wrote:
> On Mon, Jan 28, 2013 at 11:11:56PM +0200, Zeeshan Ali (Khattak) wrote:
>> I value not breaking unattended installation.
>
> Once again, I'm not pushing for any of this to be the default, I just don't
> want we close that (API/ABI) door if people (even us!) need to do that in
> the future.
Thanks for clarification and I agree, as long as it doesn't involve a
lot of work.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Fri Feb 1 15:57:37 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 1 Feb 2013 16:57:37 +0100
Subject: [Libosinfo] [PATCH 4/8] installer: API to query supported
device driver formats
In-Reply-To: <20130129093114.GP22845@teriyaki.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-5-git-send-email-zeeshanak@gnome.org>
<20130128102735.GD2332@teriyaki.redhat.com>
<20130128172830.GF22845@teriyaki.redhat.com>
<20130129093114.GP22845@teriyaki.redhat.com>
Message-ID:
On Tue, Jan 29, 2013 at 10:31 AM, Christophe Fergeau
wrote:
> On Mon, Jan 28, 2013 at 11:24:55PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Mon, Jan 28, 2013 at 7:28 PM, Christophe Fergeau wrote:
>> > On Mon, Jan 28, 2013 at 04:40:06PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Mon, Jan 28, 2013 at 12:27 PM, Christophe Fergeau
>> >> wrote:
>> >> > On Mon, Jan 28, 2013 at 05:18:43AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> From: "Zeeshan Ali (Khattak)"
>> >> >> diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h
>> >> >> index d91751e..82486ef 100644
>> >> >> --- a/osinfo/osinfo_install_script.h
>> >> >> +++ b/osinfo/osinfo_install_script.h
>> >> >> @@ -163,6 +165,9 @@ OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *scri
>> >> >> gboolean osinfo_install_script_get_can_pre_install_drivers(OsinfoInstallScript *script);
>> >> >> gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript *script);
>> >> >>
>> >> >> +OsinfoDeviceDriverFormat osinfo_install_script_get_pre_install_driver_format(OsinfoInstallScript *script);
>> >> >> +OsinfoDeviceDriverFormat osinfo_install_script_get_post_install_driver_format(OsinfoInstallScript *script);
>> >> >
>> >> > I don't think assuming that a given installer will support only one driver
>> >> > format is expressive enough. For Windows post-install drivers, supporting
>> >> > unpacked Windows drivers in addition to running a .exe shouldn't be very
>> >> > hard, and this API would not work there.
>> >>
>> >> I see you point. I can make it a list. Would that be good?
>> >
>> > I think so. Though concretely why do we need to expose this information? In
>> > all cases user of this information will need to drop it to a disk image
>> > which will be passed to the VM, no?
>>
>> Without this information, apps not only have to copy unnecessary
>> driver files but most probably (as is the case with spice-guest-tools
>> binary in Boxes) also need to create a redundant disk image to copy
>> the files to when drivers are incompatible with scripts. Also same
>> drivers can be available in multiple formats so Apps should be able to
>> pick one in compatible (with script) format.
>
> At this point, this is all theoritical, isn't it? We support one
> post-install format, which must be a .exe supporting the /S switch, and
> which has to be copied to an ISO image. Wouldn't it be better to postpone
> this API until there's a need for it?
No, apps need to know this to already put the right checks/filters in
place. Things will break for them when we actually have
incompatibility between driver format and what scripts support.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Fri Feb 1 16:03:31 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 1 Feb 2013 17:03:31 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130130092619.GJ22845@teriyaki.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-3-git-send-email-zeeshanak@gnome.org>
<20130128101953.GC2332@teriyaki.redhat.com>
<20130128154157.GB22845@teriyaki.redhat.com>
<20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
Message-ID:
On Wed, Jan 30, 2013 at 10:26 AM, Christophe Fergeau
wrote:
> On Tue, Jan 29, 2013 at 04:49:05PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Tue, Jan 29, 2013 at 11:15 AM, Christophe Fergeau
>> wrote:
>> > On Mon, Jan 28, 2013 at 10:54:52PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Mon, Jan 28, 2013 at 6:13 PM, Christophe Fergeau wrote:
>> >> > On Mon, Jan 28, 2013 at 06:05:53PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> whats the difference between copyleft and free, as in Free Software?
>> >> >> Reading this, I don't see any:
>> >> >>
>> >> >> http://en.wikipedia.org/wiki/Copyleft
>> >> >
>> >> > http://en.wikipedia.org/wiki/Copyleft#Types_of_copyleft_and_relation_to_other_licenses
>> >>
>> >> OK, I stand corrected about the exact definition of copyleft. :)
>> >>
>> >> Since you are stressing on this distinction, I imagine you know some
>> >> free drivers out there that are signed?
>> >
>> > Nope, but that does not mean they do not exist.
>>
>> Well then I'm just not being very precise in my commit log. With the
>> API I'm proposing, Apps can easily decide to not use unsigned drivers
>> even if script supports it. So I don't see the need for Apps to have
>> to use a configuration parameter to disable this manually.
>
> https://www.redhat.com/archives/libosinfo/2013-January/msg00108.html
I already replied to that:
"The problem is that having it configurable would mean that we can't
have a static info on the script about the signature requirement (see
"installer: API to query signed device driver requirement" patch).
I don't really see this a real security feature of windows but more a
control feature of Microsoft as they have made it impossible for free
drivers to be signed. So not very much motivated to do a lot of rework
to accommodate configurability here."
I'm not going to make it configurable unless you can suggest a
solution for the problem mentioned in the first para.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Mon Feb 4 08:01:11 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 4 Feb 2013 09:01:11 +0100
Subject: [Libosinfo] [libosinfo] Use gnulib's ignore-value.h to silence
gcc
In-Reply-To: <510BCF0F.2040907@redhat.com>
References: <1359636202-25516-1-git-send-email-cfergeau@redhat.com>
<510BCF0F.2040907@redhat.com>
Message-ID: <20130204080110.GD17128@teriyaki.ams2.redhat.com>
On Fri, Feb 01, 2013 at 03:19:59PM +0100, Michal Privoznik wrote:
> The code looks okay, but why do we have these variable if they are not
> used anywhere?
I must say that I initially chose not to look at why in details as I worked
on the assumption that the warnings had been worked around for a good
reason.
Looking at this a bit more, they happen in the code parsing the
pciids/usbids files, and we need to skip these values in the file during
parsing, having a name for them makes the code more readable, and easier
to extend later if we need these, so I'd be in favour of keeping them.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Wed Feb 6 12:42:24 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 6 Feb 2013 13:42:24 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <20130128101953.GC2332@teriyaki.redhat.com>
<20130128154157.GB22845@teriyaki.redhat.com>
<20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
Message-ID: <20130206124224.GD22064@teriyaki.redhat.com>
On Fri, Feb 01, 2013 at 05:03:31PM +0100, Zeeshan Ali (Khattak) wrote:
> On Wed, Jan 30, 2013 at 10:26 AM, Christophe Fergeau
> wrote:
> > On Tue, Jan 29, 2013 at 04:49:05PM +0200, Zeeshan Ali (Khattak) wrote:
> >> On Tue, Jan 29, 2013 at 11:15 AM, Christophe Fergeau
> >> wrote:
> >> > On Mon, Jan 28, 2013 at 10:54:52PM +0200, Zeeshan Ali (Khattak) wrote:
> >> >> On Mon, Jan 28, 2013 at 6:13 PM, Christophe Fergeau wrote:
> >> >> > On Mon, Jan 28, 2013 at 06:05:53PM +0200, Zeeshan Ali (Khattak) wrote:
> >> >> >> whats the difference between copyleft and free, as in Free Software?
> >> >> >> Reading this, I don't see any:
> >> >> >>
> >> >> >> http://en.wikipedia.org/wiki/Copyleft
> >> >> >
> >> >> > http://en.wikipedia.org/wiki/Copyleft#Types_of_copyleft_and_relation_to_other_licenses
> >> >>
> >> >> OK, I stand corrected about the exact definition of copyleft. :)
> >> >>
> >> >> Since you are stressing on this distinction, I imagine you know some
> >> >> free drivers out there that are signed?
> >> >
> >> > Nope, but that does not mean they do not exist.
> >>
> >> Well then I'm just not being very precise in my commit log. With the
> >> API I'm proposing, Apps can easily decide to not use unsigned drivers
> >> even if script supports it. So I don't see the need for Apps to have
> >> to use a configuration parameter to disable this manually.
> >
> > https://www.redhat.com/archives/libosinfo/2013-January/msg00108.html
>
> I already replied to that:
You tried to reply, then we had a discussion about the wrong assumption on
which you based the 2nd paragraph. With that 2nd paragraph removed, this
does not leave a lot of compelling reasons for always disabling, even when
not needed, something that improves the security of the system.
> I'm not going to make it configurable unless you can suggest a
> solution for the problem mentioned in the first para.
You are the one who wants to be able to install unsigned drivers, one would
think it's up to you to try to suggest good ways of achieving that. I'm
personnally fine with not being to install unsigned drivers without getting
warnings (which solves your 'not configurable' requirement).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Wed Feb 6 12:57:52 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 6 Feb 2013 13:57:52 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-3-git-send-email-zeeshanak@gnome.org>
<20130128101953.GC2332@teriyaki.redhat.com>
Message-ID: <20130206125751.GE22064@teriyaki.redhat.com>
On Mon, Jan 28, 2013 at 05:05:28PM +0200, Zeeshan Ali (Khattak) wrote:
> The problem is that having it configurable would mean that we can't
> have a static info on the script about the signature requirement (see
> "installer: API to query signed device driver requirement" patch).
Why is it not possible? The query API would return
REQ_STRICT/REQ_WARN/REQ_NONE as it currently does.
If you get REQ_STRICT/REQ_WARN, then the user can try to call
osinfo_install_script_disable_driver_signature_checks() (with a
better naming, this name is just for the purpose of this discussion) if
they wants to install drivers fully unattended. This setter can fail
in case libosinfo does not know how to do it.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Wed Feb 6 13:17:00 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Wed, 6 Feb 2013 15:17:00 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130206124224.GD22064@teriyaki.redhat.com>
References: <20130128101953.GC2332@teriyaki.redhat.com>
<20130128154157.GB22845@teriyaki.redhat.com>
<20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
Message-ID:
On Wed, Feb 6, 2013 at 2:42 PM, Christophe Fergeau wrote:
> On Fri, Feb 01, 2013 at 05:03:31PM +0100, Zeeshan Ali (Khattak) wrote:
>> On Wed, Jan 30, 2013 at 10:26 AM, Christophe Fergeau
>> wrote:
>> > On Tue, Jan 29, 2013 at 04:49:05PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Tue, Jan 29, 2013 at 11:15 AM, Christophe Fergeau
>> >> wrote:
>> >> > On Mon, Jan 28, 2013 at 10:54:52PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> On Mon, Jan 28, 2013 at 6:13 PM, Christophe Fergeau wrote:
>> >> >> > On Mon, Jan 28, 2013 at 06:05:53PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> >> whats the difference between copyleft and free, as in Free Software?
>> >> >> >> Reading this, I don't see any:
>> >> >> >>
>> >> >> >> http://en.wikipedia.org/wiki/Copyleft
>> >> >> >
>> >> >> > http://en.wikipedia.org/wiki/Copyleft#Types_of_copyleft_and_relation_to_other_licenses
>> >> >>
>> >> >> OK, I stand corrected about the exact definition of copyleft. :)
>> >> >>
>> >> >> Since you are stressing on this distinction, I imagine you know some
>> >> >> free drivers out there that are signed?
>> >> >
>> >> > Nope, but that does not mean they do not exist.
>> >>
>> >> Well then I'm just not being very precise in my commit log. With the
>> >> API I'm proposing, Apps can easily decide to not use unsigned drivers
>> >> even if script supports it. So I don't see the need for Apps to have
>> >> to use a configuration parameter to disable this manually.
>> >
>> > https://www.redhat.com/archives/libosinfo/2013-January/msg00108.html
>>
>> I already replied to that:
>
> You tried to reply, then we had a discussion about the wrong assumption on
> which you based the 2nd paragraph. With that 2nd paragraph removed, this
> does not leave a lot of compelling reasons for always disabling, even when
> not needed, something that improves the security of the system.
Why not let apps decide that? We are giving them info on the signed
status of drivers and they can make an informed decision. If this
"security" was so black-and-white, MS wouldn't have made it so easily
to disable it.
>> I'm not going to make it configurable unless you can suggest a
>> solution for the problem mentioned in the first para.
>
> You are the one who wants to be able to install unsigned drivers, one would
> think it's up to you to try to suggest good ways of achieving that. I'm
> personnally fine with not being to install unsigned drivers without getting
> warnings (which solves your 'not configurable' requirement).
That would break unattended installation and I don't understand how
can you even think about breaking that for the user, even if it adds
any "security" (that apps will have the API to make an informed
decision about).
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Wed Feb 6 13:23:54 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 6 Feb 2013 14:23:54 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <20130128154157.GB22845@teriyaki.redhat.com>
<20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
Message-ID: <20130206132354.GF22064@teriyaki.redhat.com>
On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
> Why not let apps decide that? We are giving them info on the signed
> status of drivers and they can make an informed decision.
This is exactly my point, applications cannot say "I'm only using signed
drivers, don't disable signature checking" with the current series as far
as I understand it.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Wed Feb 6 13:25:55 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Wed, 6 Feb 2013 15:25:55 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130206125751.GE22064@teriyaki.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-3-git-send-email-zeeshanak@gnome.org>
<20130128101953.GC2332@teriyaki.redhat.com>
<20130206125751.GE22064@teriyaki.redhat.com>
Message-ID:
On Wed, Feb 6, 2013 at 2:57 PM, Christophe Fergeau wrote:
> On Mon, Jan 28, 2013 at 05:05:28PM +0200, Zeeshan Ali (Khattak) wrote:
>> The problem is that having it configurable would mean that we can't
>> have a static info on the script about the signature requirement (see
>> "installer: API to query signed device driver requirement" patch).
>
> Why is it not possible? The query API would return
> REQ_STRICT/REQ_WARN/REQ_NONE as it currently does.
> If you get REQ_STRICT/REQ_WARN,
Actually I got mixed up in these discussions so I wrongly remembered
that we agreed on that API for drivers, not the scripts. Sorry for
that.
> then the user can try to call
> osinfo_install_script_disable_driver_signature_checks() (with a
> better naming, this name is just for the purpose of this discussion) if
> they wants to install drivers fully unattended. This setter can fail
> in case libosinfo does not know how to do it.
Yeah, now that I remember correctly this shouldn't be a problem. I'll
make it configurable then if I must. I still don't think there is any
need for it (at least yet).
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Thu Feb 7 00:04:57 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 02:04:57 +0200
Subject: [Libosinfo] [PATCH] install-script tool: Display names of generated
files
Message-ID: <1360195497-4974-1-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Also add a commandline option (-q/--quiet) to disable this behavior.
---
tools/osinfo-install-script.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index ac71cc0..73f1d3d 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -34,6 +34,7 @@ static const gchar *prefix;
static gboolean list_config = FALSE;
static gboolean list_profile = FALSE;
+static gboolean quiet = FALSE;
static OsinfoInstallConfig *config;
@@ -78,6 +79,8 @@ static GOptionEntry entries[] =
N_("List configuration parameters"), NULL },
{ "list-profiles", '\0', 0, G_OPTION_ARG_NONE, (void*)&list_profile,
N_("List install script profiles"), NULL },
+ { "quiet", 'q', 0, G_OPTION_ARG_NONE, (void*)&quiet,
+ N_("Do not display output filenames"), NULL },
{ NULL }
};
@@ -229,6 +232,8 @@ static gboolean generate_script(OsinfoOs *os)
error->message ? error->message : "unknown");
goto cleanup;
}
+ if (!quiet)
+ g_print ("%s\n", osinfo_install_script_get_output_filename(script));
}
ret = TRUE;
--
1.8.1
From zeeshanak at gnome.org Thu Feb 7 00:16:52 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 02:16:52 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130206132354.GF22064@teriyaki.redhat.com>
References: <20130128154157.GB22845@teriyaki.redhat.com>
<20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
Message-ID:
On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
> On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
>> Why not let apps decide that? We are giving them info on the signed
>> status of drivers and they can make an informed decision.
>
> This is exactly my point, applications cannot say "I'm only using signed
> drivers, don't disable signature checking" with the current series as far
> as I understand it.
If applications are only going to use signed drivers, they don't need
to disable anything. So really there is no app that is going to need
this API but to get this very important work in, I'll live with a bit
of redundant API.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Thu Feb 7 03:11:19 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 05:11:19 +0200
Subject: [Libosinfo] =?utf-8?q?=5BPATCH=5D_Add_Marc-Andr=C3=A9_to_AUTHORS?=
Message-ID: <1360206679-23761-1-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Fixes `make syntax-check`
Pushed under trivial rule.
---
AUTHORS | 1 +
1 file changed, 1 insertion(+)
diff --git a/AUTHORS b/AUTHORS
index 65fc04a..626c17b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -21,6 +21,7 @@ Patches contributed by:
David Zeuthen
Eric Blake
Yuri Chornoivan
+ Marc-Andr? Lureau
...send patches to get your name here...
-- End
--
1.8.1
From zeeshanak at gnome.org Thu Feb 7 03:43:06 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 05:43:06 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-3-git-send-email-zeeshanak@gnome.org>
<20130128101953.GC2332@teriyaki.redhat.com>
<20130206125751.GE22064@teriyaki.redhat.com>
Message-ID:
On Wed, Feb 6, 2013 at 3:25 PM, Zeeshan Ali (Khattak)
wrote:
> On Wed, Feb 6, 2013 at 2:57 PM, Christophe Fergeau wrote:
>> On Mon, Jan 28, 2013 at 05:05:28PM +0200, Zeeshan Ali (Khattak) wrote:
>>> The problem is that having it configurable would mean that we can't
>>> have a static info on the script about the signature requirement (see
>>> "installer: API to query signed device driver requirement" patch).
>>
>> Why is it not possible? The query API would return
>> REQ_STRICT/REQ_WARN/REQ_NONE as it currently does.
>> If you get REQ_STRICT/REQ_WARN,
>
> Actually I got mixed up in these discussions so I wrongly remembered
> that we agreed on that API for drivers, not the scripts. Sorry for
> that.
While implementing DeviceDriverSigningReq etc, I realized one issue
here: The post installation drivers are being used/setup by
windows-cmd.xml while the setting to ignore unsigned drivers is in
windows-sif.xml. So app sees that drivers can be utilized by a script
and get info on whats the requirement of that script about driver
signature, whereas it needs to disable the driver checking in another
script. That seems like a very confusing API to me.
So I don't think DeviceDriverSigningReq API helps here. However, you
could still argue that apps can decide to simply enable/disable the
signing requirement globally (on every script) but then whats the
relationship of this signing configuration API to
DeviceDriverSigningReq? Again, I see confusing API.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Thu Feb 7 08:56:06 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 7 Feb 2013 09:56:06 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
Message-ID: <20130207085605.GA2368@teriyaki.redhat.com>
On Thu, Feb 07, 2013 at 02:16:52AM +0200, Zeeshan Ali (Khattak) wrote:
> On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
> > On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
> >> Why not let apps decide that? We are giving them info on the signed
> >> status of drivers and they can make an informed decision.
> >
> > This is exactly my point, applications cannot say "I'm only using signed
> > drivers, don't disable signature checking" with the current series as far
> > as I understand it.
>
> If applications are only going to use signed drivers, they don't need
> to disable anything. So really there is no app that is going to need
> this API but to get this very important work in, I'll live with a bit
> of redundant API.
Yes, applications using signed drivers will not need to disable anything.
However, my understanding is that you want to use *unsigned* drivers in
your application, in that case you need to disable signature verification.
You are designing the whole thing with the nominal case being unsigned
drivers being case, which makes sense for your use case.
The fact that you are using unsigned drivers in the first place is a 'bug'
imo, and the right way of handling that is doing whatever it takes to get
signed drivers instead the unsigned ones. Hence, the unsigned driver code
in libosinfo is just a workaround for that, and since this workaround
involves disabling some built-in OS checks, then we need an API to
explicitly disable these if that's what we want. I even remember you
telling me that MS says signature checks on Win7 should only be disabled
in test setups, not on production machines, which seems consistent with not
doing this by default in libosinfo..
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 7 11:01:12 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 7 Feb 2013 12:01:12 +0100
Subject: [Libosinfo] [libosinfo] spec: Switch URL to libosinfo.org
Message-ID: <1360234872-9609-1-git-send-email-cfergeau@redhat.com>
Now that libosinfo has an official website, let's point the .spec
at it.
---
libosinfo.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index 9aa9d13..0c49950 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -18,7 +18,7 @@ License: LGPLv2+
Group: Development/Libraries
Source: https://fedorahosted.org/releases/l/i/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-URL: https://fedorahosted.org/libosinfo/
+URL: http://libosinfo.org/
BuildRequires: intltool
BuildRequires: glib2-devel
BuildRequires: check-devel
--
1.8.1
From berrange at redhat.com Thu Feb 7 12:33:32 2013
From: berrange at redhat.com (Daniel P. Berrange)
Date: Thu, 7 Feb 2013 12:33:32 +0000
Subject: [Libosinfo] [PATCH] install-script tool: Display names of
generated files
In-Reply-To: <1360195497-4974-1-git-send-email-zeeshanak@gnome.org>
References: <1360195497-4974-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130207123332.GD2244@redhat.com>
On Thu, Feb 07, 2013 at 02:04:57AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Also add a commandline option (-q/--quiet) to disable this behavior.
> ---
> tools/osinfo-install-script.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
> index ac71cc0..73f1d3d 100644
> --- a/tools/osinfo-install-script.c
> +++ b/tools/osinfo-install-script.c
> @@ -34,6 +34,7 @@ static const gchar *prefix;
>
> static gboolean list_config = FALSE;
> static gboolean list_profile = FALSE;
> +static gboolean quiet = FALSE;
>
> static OsinfoInstallConfig *config;
>
> @@ -78,6 +79,8 @@ static GOptionEntry entries[] =
> N_("List configuration parameters"), NULL },
> { "list-profiles", '\0', 0, G_OPTION_ARG_NONE, (void*)&list_profile,
> N_("List install script profiles"), NULL },
> + { "quiet", 'q', 0, G_OPTION_ARG_NONE, (void*)&quiet,
> + N_("Do not display output filenames"), NULL },
> { NULL }
> };
>
> @@ -229,6 +232,8 @@ static gboolean generate_script(OsinfoOs *os)
> error->message ? error->message : "unknown");
> goto cleanup;
> }
> + if (!quiet)
> + g_print ("%s\n", osinfo_install_script_get_output_filename(script));
> }
> ret = TRUE;
ACK
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
From berrange at redhat.com Thu Feb 7 12:35:44 2013
From: berrange at redhat.com (Daniel P. Berrange)
Date: Thu, 7 Feb 2013 12:35:44 +0000
Subject: [Libosinfo] [libosinfo] spec: Switch URL to libosinfo.org
In-Reply-To: <1360234872-9609-1-git-send-email-cfergeau@redhat.com>
References: <1360234872-9609-1-git-send-email-cfergeau@redhat.com>
Message-ID: <20130207123544.GF2244@redhat.com>
On Thu, Feb 07, 2013 at 12:01:12PM +0100, Christophe Fergeau wrote:
> Now that libosinfo has an official website, let's point the .spec
> at it.
> ---
> libosinfo.spec.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libosinfo.spec.in b/libosinfo.spec.in
> index 9aa9d13..0c49950 100644
> --- a/libosinfo.spec.in
> +++ b/libosinfo.spec.in
> @@ -18,7 +18,7 @@ License: LGPLv2+
> Group: Development/Libraries
> Source: https://fedorahosted.org/releases/l/i/%{name}/%{name}-%{version}.tar.gz
> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> -URL: https://fedorahosted.org/libosinfo/
> +URL: http://libosinfo.org/
> BuildRequires: intltool
> BuildRequires: glib2-devel
> BuildRequires: check-devel
ACK
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
From zeeshanak at gnome.org Thu Feb 7 14:49:43 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 16:49:43 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130207085605.GA2368@teriyaki.redhat.com>
References: <20130128161327.GC22845@teriyaki.redhat.com>
<20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
<20130207085605.GA2368@teriyaki.redhat.com>
Message-ID:
On Thu, Feb 7, 2013 at 10:56 AM, Christophe Fergeau wrote:
> On Thu, Feb 07, 2013 at 02:16:52AM +0200, Zeeshan Ali (Khattak) wrote:
>> On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
>> > On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> Why not let apps decide that? We are giving them info on the signed
>> >> status of drivers and they can make an informed decision.
>> >
>> > This is exactly my point, applications cannot say "I'm only using signed
>> > drivers, don't disable signature checking" with the current series as far
>> > as I understand it.
>>
>> If applications are only going to use signed drivers, they don't need
>> to disable anything. So really there is no app that is going to need
>> this API but to get this very important work in, I'll live with a bit
>> of redundant API.
>
> Yes, applications using signed drivers will not need to disable anything.
> However, my understanding is that you want to use *unsigned* drivers in
> your application, in that case you need to disable signature verification.
> You are designing the whole thing with the nominal case being unsigned
> drivers being case, which makes sense for your use case.
Not at all. I'm providing application with information that drivers
are signed or not. Based on that they can make a decision. If they
decide to use unsigned drivers, there is absolutely no reason any app
would want to disable some checks as well. Unless you could specify a
(not hypothetical) usecase or example of an app that would want such a
thing, I don't think there is any need for what you are asking for.
Especially since I told you the problems with making this configurable
in the last mail.
> The fact that you are using unsigned drivers in the first place is a 'bug'
> imo,
IMO the bug is that Microsoft requires these signatures. Its obvious
that not everyone can get their drivers signed no matter how "secure"
or good they are so requiring this signature is just wrong of them.
Moreover, even as security measure, its doubtful that MS thought of an
application being invovled in the process. The common use case
involves only the user and MS' software (mainly the installer). Its a
very usual thing to not trust users to know exactly what they are
doing. They can get malicious drivers from anywhere and try to install
them. In case of libosinfo, there is going to be an app involved,
making the decision for the user.
> and the right way of handling that is doing whatever it takes to get
> signed drivers instead the unsigned ones. Hence, the unsigned driver code
> in libosinfo is just a workaround for that, and since this workaround
> involves disabling some built-in OS checks, then we need an API to
> explicitly disable these if that's what we want.
Unless you can point out any usecase, I'm not going to add confusing
API just to satisfy some particular proprietary vendor.
> I even remember you
> telling me that MS says signature checks on Win7 should only be disabled
> in test setups, not on production machines, which seems consistent with not
> doing this by default in libosinfo..
Yes? I don't live to serve MS. :)
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Thu Feb 7 15:02:53 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 17:02:53 +0200
Subject: [Libosinfo] [PATCH 8/8] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <20130129091331.GL22845@teriyaki.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-9-git-send-email-zeeshanak@gnome.org>
<20130128131453.GN2332@teriyaki.redhat.com>
<20130128171943.GD22845@teriyaki.redhat.com>
<20130129091331.GL22845@teriyaki.redhat.com>
Message-ID:
On Tue, Jan 29, 2013 at 11:13 AM, Christophe Fergeau
wrote:
> On Mon, Jan 28, 2013 at 11:06:53PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Mon, Jan 28, 2013 at 7:19 PM, Christophe Fergeau wrote:
>> > On Mon, Jan 28, 2013 at 05:45:25PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Mon, Jan 28, 2013 at 3:14 PM, Christophe Fergeau wrote:
>> >> > You can't expect every possible Windows exe file to honour the /S switch.
>> >>
>> >> If a binary doesn't support '/S' switch, it will ignore it?
>> >
>> > Or fail saying it's an unknown parameter?
>>
>> According to Vmware docs, this is a standard MSI option:
>>
>> http://pubs.vmware.com/view-50/index.jsp?topic=/com.vmware.view.installation.doc/GUID-F19EBDF6-20A3-4A8B-95AE-786CC74F26AF.html
>>
>> If that is the case, its supposed to be guaranteed on every windows
>> installer setup app?
>
> I doubt it's guaranteed...
Shall I believe those docs or you then? :) Since drivers and scripts
could be changed to use .cmd without breaking API, why don't we fix
this when/if we need to. Right now we only have one driver and what we
are 100% sure is that this driver setup accepts '/S' switch and
ignores unknown switches. There is also the indication (docs I
mentioned) that we might not need this fix for any setup app at all.
>And the way the code currently is, MSIs can't be
> installed either.
Sorry I didn't understand this part?
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Thu Feb 7 15:14:27 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 7 Feb 2013 16:14:27 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
<20130207085605.GA2368@teriyaki.redhat.com>
Message-ID: <20130207151427.GE2368@teriyaki.redhat.com>
On Thu, Feb 07, 2013 at 04:49:43PM +0200, Zeeshan Ali (Khattak) wrote:
> On Thu, Feb 7, 2013 at 10:56 AM, Christophe Fergeau wrote:
> > On Thu, Feb 07, 2013 at 02:16:52AM +0200, Zeeshan Ali (Khattak) wrote:
> >> On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
> >> > On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
> >> >> Why not let apps decide that? We are giving them info on the signed
> >> >> status of drivers and they can make an informed decision.
> >> >
> >> > This is exactly my point, applications cannot say "I'm only using signed
> >> > drivers, don't disable signature checking" with the current series as far
> >> > as I understand it.
> >>
> >> If applications are only going to use signed drivers, they don't need
> >> to disable anything. So really there is no app that is going to need
> >> this API but to get this very important work in, I'll live with a bit
> >> of redundant API.
> >
> > Yes, applications using signed drivers will not need to disable anything.
> > However, my understanding is that you want to use *unsigned* drivers in
> > your application, in that case you need to disable signature verification.
> > You are designing the whole thing with the nominal case being unsigned
> > drivers being case, which makes sense for your use case.
>
> Not at all. I'm providing application with information that drivers
> are signed or not.
Yes
> Based on that they can make a decision. If they
> decide to use unsigned drivers, there is absolutely no reason any app
> would want to disable some checks as well.
I think applications should be able to control whether the OS they
install will have
DriverSigningPolicy=Ignore
set or not. And this should default to not be 'Ignore'. So if you want to be
able to install unsigned drivers, you need to be able disable signature
checking (ie tell the install script to add this line).
> Unless you could specify a
> (not hypothetical) usecase or example of an app that would want such a
> thing, I don't think there is any need for what you are asking for.
Once again, this is a security feature. You keep pretending it's not,
waving it away, but this doesn't change the fact that this improves the
system security, and you are going to disable this without letting any
control to the library user on this.
> Especially since I told you the problems with making this configurable
> in the last mail.
'this is complicated' is not necessarily a good reason for not doing
something. But let's first focus on what we do about this signature
checking stuff, I haven't really looked at the mail where you describe the
problems you have yet.
> Moreover, even as security measure, its doubtful that MS thought of an
> application being invovled in the process. The common use case
> involves only the user and MS' software (mainly the installer). Its a
> very usual thing to not trust users to know exactly what they are
> doing. They can get malicious drivers from anywhere and try to install
> them. In case of libosinfo, there is going to be an app involved,
> making the decision for the user.
But once the system is installed, the user will be in control of the OS,
and signature checking will still be disabled! And this patch is disabling
this even when no unsigned drivers are involved at all.
> Unless you can point out any usecase, I'm not going to add confusing
> API just to satisfy some particular proprietary vendor.
Ok, then we should not do all this work to support unsigned drivers, or to
postinstall windows drivers, and we can drop this patch series (in other
words, not a useful argument at all).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 7 15:17:59 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 7 Feb 2013 16:17:59 +0100
Subject: [Libosinfo] [PATCH 8/8] winxp,
installer: Make use of post-installation drivers
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1359343127-27272-9-git-send-email-zeeshanak@gnome.org>
<20130128131453.GN2332@teriyaki.redhat.com>
<20130128171943.GD22845@teriyaki.redhat.com>
<20130129091331.GL22845@teriyaki.redhat.com>
Message-ID: <20130207151759.GF2368@teriyaki.redhat.com>
On Thu, Feb 07, 2013 at 05:02:53PM +0200, Zeeshan Ali (Khattak) wrote:
> On Tue, Jan 29, 2013 at 11:13 AM, Christophe Fergeau
> wrote:
> > On Mon, Jan 28, 2013 at 11:06:53PM +0200, Zeeshan Ali (Khattak) wrote:
> >> On Mon, Jan 28, 2013 at 7:19 PM, Christophe Fergeau wrote:
> >> > On Mon, Jan 28, 2013 at 05:45:25PM +0200, Zeeshan Ali (Khattak) wrote:
> >> >> On Mon, Jan 28, 2013 at 3:14 PM, Christophe Fergeau wrote:
> >> >> > You can't expect every possible Windows exe file to honour the /S switch.
> >> >>
> >> >> If a binary doesn't support '/S' switch, it will ignore it?
> >> >
> >> > Or fail saying it's an unknown parameter?
> >>
> >> According to Vmware docs, this is a standard MSI option:
> >>
> >> http://pubs.vmware.com/view-50/index.jsp?topic=/com.vmware.view.installation.doc/GUID-F19EBDF6-20A3-4A8B-95AE-786CC74F26AF.html
> >>
> >> If that is the case, its supposed to be guaranteed on every windows
> >> installer setup app?
> >
> > I doubt it's guaranteed...
>
> Shall I believe those docs or you then? :)
Something that is true for MSI installers != something that is true for
all installers in the world.
> Since drivers and scripts
> could be changed to use .cmd without breaking API, why don't we fix
> this when/if we need to. Right now we only have one driver and what we
> are 100% sure is that this driver setup accepts '/S' switch and
> ignores unknown switches. There is also the indication (docs I
> mentioned) that we might not need this fix for any setup app at all.
>
> >And the way the code currently is, MSIs can't be
> > installed either.
>
> Sorry I didn't understand this part?
If you have an installer with a .msi extension, *.exe will not catch it...
I don't know with what extension they are usually shipped.
This *.exe can also be suboptimal for more reasons, one could also imagine
situations where a .exe will be there that shall not be run (eg with
unpacked drivers).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 7 15:40:56 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 7 Feb 2013 16:40:56 +0100
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130207151427.GE2368@teriyaki.redhat.com>
References:
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
<20130207085605.GA2368@teriyaki.redhat.com>
<20130207151427.GE2368@teriyaki.redhat.com>
Message-ID: <20130207154056.GG2368@teriyaki.redhat.com>
On Thu, Feb 07, 2013 at 04:14:27PM +0100, Christophe Fergeau wrote:
> On Thu, Feb 07, 2013 at 04:49:43PM +0200, Zeeshan Ali (Khattak) wrote:
> > Moreover, even as security measure, its doubtful that MS thought of an
> > application being invovled in the process. The common use case
> > involves only the user and MS' software (mainly the installer). Its a
> > very usual thing to not trust users to know exactly what they are
> > doing. They can get malicious drivers from anywhere and try to install
> > them. In case of libosinfo, there is going to be an app involved,
> > making the decision for the user.
>
> But once the system is installed, the user will be in control of the OS,
> and signature checking will still be disabled! And this patch is disabling
> this even when no unsigned drivers are involved at all.
NB: If you make sure unsigned drivers cannot be installed after the
automatic installation is done (either using some postinstall scripting
magic, or either because I'm mistaken and these changes are only
valid during the installation process but are thrown away at the end of the
install), then I'm all fine with always disabling signature checking as
long as it only happens during installation, and the installed OS checks
driver signatures.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Thu Feb 7 19:19:35 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 7 Feb 2013 21:19:35 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To: <20130207151427.GE2368@teriyaki.redhat.com>
References: <20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
<20130207085605.GA2368@teriyaki.redhat.com>
<20130207151427.GE2368@teriyaki.redhat.com>
Message-ID:
On Thu, Feb 7, 2013 at 5:14 PM, Christophe Fergeau wrote:
> On Thu, Feb 07, 2013 at 04:49:43PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Thu, Feb 7, 2013 at 10:56 AM, Christophe Fergeau wrote:
>> > On Thu, Feb 07, 2013 at 02:16:52AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
>> >> > On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> Why not let apps decide that? We are giving them info on the signed
>> >> >> status of drivers and they can make an informed decision.
>> >> >
>> >> > This is exactly my point, applications cannot say "I'm only using signed
>> >> > drivers, don't disable signature checking" with the current series as far
>> >> > as I understand it.
>> >>
>> >> If applications are only going to use signed drivers, they don't need
>> >> to disable anything. So really there is no app that is going to need
>> >> this API but to get this very important work in, I'll live with a bit
>> >> of redundant API.
>> >
>> > Yes, applications using signed drivers will not need to disable anything.
>> > However, my understanding is that you want to use *unsigned* drivers in
>> > your application, in that case you need to disable signature verification.
>> > You are designing the whole thing with the nominal case being unsigned
>> > drivers being case, which makes sense for your use case.
>>
>> Not at all. I'm providing application with information that drivers
>> are signed or not.
>
> Yes
>
>> Based on that they can make a decision. If they
>> decide to use unsigned drivers, there is absolutely no reason any app
>> would want to disable some checks as well.
>
> I think applications should be able to control whether the OS they
> install will have
> DriverSigningPolicy=Ignore
> set or not. And this should default to not be 'Ignore'. So if you want to be
> able to install unsigned drivers, you need to be able disable signature
> checking (ie tell the install script to add this line).
>
>
>> Unless you could specify a
>> (not hypothetical) usecase or example of an app that would want such a
>> thing, I don't think there is any need for what you are asking for.
>
> Once again, this is a security feature. You keep pretending it's not,
> waving it away, but this doesn't change the fact that this improves the
> system security, and you are going to disable this without letting any
> control to the library user on this.
>
>> Especially since I told you the problems with making this configurable
>> in the last mail.
>
> 'this is complicated' is not necessarily a good reason for not doing
> something. But let's first focus on what we do about this signature
> checking stuff, I haven't really looked at the mail where you describe the
> problems you have yet.
>
>> Moreover, even as security measure, its doubtful that MS thought of an
>> application being invovled in the process. The common use case
>> involves only the user and MS' software (mainly the installer). Its a
>> very usual thing to not trust users to know exactly what they are
>> doing. They can get malicious drivers from anywhere and try to install
>> them. In case of libosinfo, there is going to be an app involved,
>> making the decision for the user.
>
> But once the system is installed, the user will be in control of the OS,
> and signature checking will still be disabled!
Now you are talking. :) This is a very good point. I didn't think of
the fact that driver checking could be 'permanently' disabled by this.
I'll check it out.
Based on your following email, I think now we have an agreement on how
to proceed.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Fri Feb 8 00:07:32 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 8 Feb 2013 02:07:32 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
<20130207085605.GA2368@teriyaki.redhat.com>
<20130207151427.GE2368@teriyaki.redhat.com>
Message-ID:
On Thu, Feb 7, 2013 at 9:19 PM, Zeeshan Ali (Khattak)
wrote:
> On Thu, Feb 7, 2013 at 5:14 PM, Christophe Fergeau wrote:
>> On Thu, Feb 07, 2013 at 04:49:43PM +0200, Zeeshan Ali (Khattak) wrote:
>>> On Thu, Feb 7, 2013 at 10:56 AM, Christophe Fergeau wrote:
>>> > On Thu, Feb 07, 2013 at 02:16:52AM +0200, Zeeshan Ali (Khattak) wrote:
>>> >> On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
>>> >> > On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
>>> >> >> Why not let apps decide that? We are giving them info on the signed
>>> >> >> status of drivers and they can make an informed decision.
>>> >> >
>>> >> > This is exactly my point, applications cannot say "I'm only using signed
>>> >> > drivers, don't disable signature checking" with the current series as far
>>> >> > as I understand it.
>>> >>
>>> >> If applications are only going to use signed drivers, they don't need
>>> >> to disable anything. So really there is no app that is going to need
>>> >> this API but to get this very important work in, I'll live with a bit
>>> >> of redundant API.
>>> >
>>> > Yes, applications using signed drivers will not need to disable anything.
>>> > However, my understanding is that you want to use *unsigned* drivers in
>>> > your application, in that case you need to disable signature verification.
>>> > You are designing the whole thing with the nominal case being unsigned
>>> > drivers being case, which makes sense for your use case.
>>>
>>> Not at all. I'm providing application with information that drivers
>>> are signed or not.
>>
>> Yes
>>
>>> Based on that they can make a decision. If they
>>> decide to use unsigned drivers, there is absolutely no reason any app
>>> would want to disable some checks as well.
>>
>> I think applications should be able to control whether the OS they
>> install will have
>> DriverSigningPolicy=Ignore
>> set or not. And this should default to not be 'Ignore'. So if you want to be
>> able to install unsigned drivers, you need to be able disable signature
>> checking (ie tell the install script to add this line).
>>
>>
>>> Unless you could specify a
>>> (not hypothetical) usecase or example of an app that would want such a
>>> thing, I don't think there is any need for what you are asking for.
>>
>> Once again, this is a security feature. You keep pretending it's not,
>> waving it away, but this doesn't change the fact that this improves the
>> system security, and you are going to disable this without letting any
>> control to the library user on this.
>>
>>> Especially since I told you the problems with making this configurable
>>> in the last mail.
>>
>> 'this is complicated' is not necessarily a good reason for not doing
>> something. But let's first focus on what we do about this signature
>> checking stuff, I haven't really looked at the mail where you describe the
>> problems you have yet.
>>
>>> Moreover, even as security measure, its doubtful that MS thought of an
>>> application being invovled in the process. The common use case
>>> involves only the user and MS' software (mainly the installer). Its a
>>> very usual thing to not trust users to know exactly what they are
>>> doing. They can get malicious drivers from anywhere and try to install
>>> them. In case of libosinfo, there is going to be an app involved,
>>> making the decision for the user.
>>
>> But once the system is installed, the user will be in control of the OS,
>> and signature checking will still be disabled!
>
> Now you are talking. :) This is a very good point. I didn't think of
> the fact that driver checking could be 'permanently' disabled by this.
> I'll check it out.
So checked it out and your fears are very justified: setting this
means setting it permanently. I looked around for enabling the
signature check after installation but the only working solution I
find was this:
http://www.remkoweijnen.nl/blog/2010/11/11/programmatically-changing-the-driver-signing-options/
But seems the binary is non-free so we can't just ship that. :( I
really don't want to permanently disable driver signature checks, not
even in Boxes. So I'd rather we don't do this all together. If any
apps need this in future, we can add it (probably as configuration
param) later.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Sat Feb 9 02:09:03 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sat, 9 Feb 2013 04:09:03 +0200
Subject: [Libosinfo] [PATCH 2/8] winxp,
installer: Ignore unsigned drivers
In-Reply-To:
References: <20130129091507.GM22845@teriyaki.redhat.com>
<20130130092619.GJ22845@teriyaki.redhat.com>
<20130206124224.GD22064@teriyaki.redhat.com>
<20130206132354.GF22064@teriyaki.redhat.com>
<20130207085605.GA2368@teriyaki.redhat.com>
<20130207151427.GE2368@teriyaki.redhat.com>
Message-ID:
On Fri, Feb 8, 2013 at 2:07 AM, Zeeshan Ali (Khattak)
wrote:
> On Thu, Feb 7, 2013 at 9:19 PM, Zeeshan Ali (Khattak)
> wrote:
>> On Thu, Feb 7, 2013 at 5:14 PM, Christophe Fergeau wrote:
>>> On Thu, Feb 07, 2013 at 04:49:43PM +0200, Zeeshan Ali (Khattak) wrote:
>>>> On Thu, Feb 7, 2013 at 10:56 AM, Christophe Fergeau wrote:
>>>> > On Thu, Feb 07, 2013 at 02:16:52AM +0200, Zeeshan Ali (Khattak) wrote:
>>>> >> On Wed, Feb 6, 2013 at 3:23 PM, Christophe Fergeau wrote:
>>>> >> > On Wed, Feb 06, 2013 at 03:17:00PM +0200, Zeeshan Ali (Khattak) wrote:
>>>> >> >> Why not let apps decide that? We are giving them info on the signed
>>>> >> >> status of drivers and they can make an informed decision.
>>>> >> >
>>>> >> > This is exactly my point, applications cannot say "I'm only using signed
>>>> >> > drivers, don't disable signature checking" with the current series as far
>>>> >> > as I understand it.
>>>> >>
>>>> >> If applications are only going to use signed drivers, they don't need
>>>> >> to disable anything. So really there is no app that is going to need
>>>> >> this API but to get this very important work in, I'll live with a bit
>>>> >> of redundant API.
>>>> >
>>>> > Yes, applications using signed drivers will not need to disable anything.
>>>> > However, my understanding is that you want to use *unsigned* drivers in
>>>> > your application, in that case you need to disable signature verification.
>>>> > You are designing the whole thing with the nominal case being unsigned
>>>> > drivers being case, which makes sense for your use case.
>>>>
>>>> Not at all. I'm providing application with information that drivers
>>>> are signed or not.
>>>
>>> Yes
>>>
>>>> Based on that they can make a decision. If they
>>>> decide to use unsigned drivers, there is absolutely no reason any app
>>>> would want to disable some checks as well.
>>>
>>> I think applications should be able to control whether the OS they
>>> install will have
>>> DriverSigningPolicy=Ignore
>>> set or not. And this should default to not be 'Ignore'. So if you want to be
>>> able to install unsigned drivers, you need to be able disable signature
>>> checking (ie tell the install script to add this line).
>>>
>>>
>>>> Unless you could specify a
>>>> (not hypothetical) usecase or example of an app that would want such a
>>>> thing, I don't think there is any need for what you are asking for.
>>>
>>> Once again, this is a security feature. You keep pretending it's not,
>>> waving it away, but this doesn't change the fact that this improves the
>>> system security, and you are going to disable this without letting any
>>> control to the library user on this.
>>>
>>>> Especially since I told you the problems with making this configurable
>>>> in the last mail.
>>>
>>> 'this is complicated' is not necessarily a good reason for not doing
>>> something. But let's first focus on what we do about this signature
>>> checking stuff, I haven't really looked at the mail where you describe the
>>> problems you have yet.
>>>
>>>> Moreover, even as security measure, its doubtful that MS thought of an
>>>> application being invovled in the process. The common use case
>>>> involves only the user and MS' software (mainly the installer). Its a
>>>> very usual thing to not trust users to know exactly what they are
>>>> doing. They can get malicious drivers from anywhere and try to install
>>>> them. In case of libosinfo, there is going to be an app involved,
>>>> making the decision for the user.
>>>
>>> But once the system is installed, the user will be in control of the OS,
>>> and signature checking will still be disabled!
>>
>> Now you are talking. :) This is a very good point. I didn't think of
>> the fact that driver checking could be 'permanently' disabled by this.
>> I'll check it out.
>
> So checked it out and your fears are very justified: setting this
> means setting it permanently. I looked around for enabling the
> signature check after installation but the only working solution I
> find was this:
>
> http://www.remkoweijnen.nl/blog/2010/11/11/programmatically-changing-the-driver-signing-options/
>
> But seems the binary is non-free so we can't just ship that. :( I
> really don't want to permanently disable driver signature checks, not
> even in Boxes. So I'd rather we don't do this all together. If any
> apps need this in future, we can add it (probably as configuration
> param) later.
Would someone kill me if i change my mind on this yet again. :) I just
saw the huge difference in guest with and without QXL drivers and I
really would hate to see this not working out of the box, upstream. So
unless you have any objections, I'll go with your original suggestion
to make this configurable and Boxes disabling driver signature checks.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Sun Feb 10 16:41:01 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:01 +0200
Subject: [Libosinfo] More device drivers v2
In-Reply-To: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Just like v1, these patches add information about virtio and QXL device drivers, make it possible for apps to automatically install them as part of Windows XP installation and improve drivers-related API. I'll look into getting virtio/QXL driver installation to work for Windows 7 soon but first I'd want to get these changes in so that we can add this feature in Boxes before the feature- and API/ABI-freeze of GNOME 3.7.x[1].
Changes since v1:
* Since disabling drivers signature checks permanently is a security issue, Apps now must explicity disable it.
* Driver signing requirement of scripts is not a simple boolean now but rather an enum.
* Drivers in executable format must provide script (.cmd in case of windows) files that calls the actual setup
binary with the appropriate arguments for us.
* Scripts can (at least theoretically) support multiple driver formats now.
Issues:
* I get a blue screen of death[2] on Windows XP professional at the end of installation. Christophe tells me that this probably will be fixed with the next spice-guest-tools binary with up2date vioser drivers. That is hopefully available before these patches are merged but for now the work around is to simply reboot the VM (virsh reboot VM_NAME).
[1] https://live.gnome.org/ThreePointSeven#Schedule
[2] http://static.fi/~zeenix/tmp/blue-screen-of-death.png
From zeeshanak at gnome.org Sun Feb 10 16:41:03 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:03 +0200
Subject: [Libosinfo] [v2 2/8] Add enum list param getter
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-3-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
osinfo/libosinfo.syms | 1 +
osinfo/osinfo_entity.c | 71 ++++++++++++++++++++++++++++++++++++++++----------
osinfo/osinfo_entity.h | 4 +++
3 files changed, 62 insertions(+), 14 deletions(-)
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 41d3756..1ad4d82 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -403,6 +403,7 @@ LIBOSINFO_0.2.4 {
global:
osinfo_device_driver_format_get_type;
osinfo_device_driver_get_format;
+ osinfo_entity_get_param_value_enum_list;
} LIBOSINFO_0.2.3;
/* Symbols in next release...
diff --git a/osinfo/osinfo_entity.c b/osinfo/osinfo_entity.c
index 543c710..8b9286e 100644
--- a/osinfo/osinfo_entity.c
+++ b/osinfo/osinfo_entity.c
@@ -382,24 +382,19 @@ gint osinfo_entity_get_param_value_enum(OsinfoEntity *entity,
GType enum_type,
gint default_value)
{
- const gchar *nick;
- GEnumClass *enum_class;
- GEnumValue *enum_value;
+ GList *value_list;
+ gint ret;
g_return_val_if_fail(G_TYPE_IS_ENUM(enum_type), default_value);
- nick = osinfo_entity_get_param_value(entity, key);
- if (nick == NULL)
- return default_value;
-
- enum_class = g_type_class_ref(enum_type);
- enum_value = g_enum_get_value_by_nick(enum_class, nick);
- g_type_class_unref(enum_class);
-
- if (enum_value != NULL)
- return enum_value->value;
+ value_list = osinfo_entity_get_param_value_enum_list(entity,
+ key,
+ enum_type,
+ default_value);
+ ret = GPOINTER_TO_INT(value_list->data);
+ g_list_free (value_list);
- g_return_val_if_reached(default_value);
+ return ret;
}
/**
@@ -425,6 +420,54 @@ GList *osinfo_entity_get_param_value_list(OsinfoEntity *entity, const gchar *key
return g_list_copy(values);
}
+/**
+ * osinfo_entity_get_param_value_enum_list:
+ * @entity: an #OsinfoEntity containing the parameters
+ * @key: the name of the key
+ *
+ * Retrieve all the parameter values associated with a named key as enums. If
+ * no values are associated, a list with only @default_value is returned.
+ *
+ * Returns: (transfer container) (element-type gint): the values associated with the key
+ */
+GList *osinfo_entity_get_param_value_enum_list(OsinfoEntity *entity,
+ const char *key,
+ GType enum_type,
+ gint default_value)
+{
+ GList *value_list;
+ GList *iter;
+ GList *ret = NULL;
+ GList *default_list;
+
+ default_list = g_list_append (NULL, GINT_TO_POINTER(default_value));
+
+ g_return_val_if_fail(G_TYPE_IS_ENUM(enum_type), NULL);
+
+ value_list = osinfo_entity_get_param_value_list(entity, key);
+ if (value_list == NULL)
+ return default_list;
+
+ for (iter = value_list; iter; iter = iter->next) {
+ GEnumClass *enum_class;
+ GEnumValue *enum_value;
+ const gchar *nick = (const gchar *) iter->data;
+
+ enum_class = g_type_class_ref(enum_type);
+ enum_value = g_enum_get_value_by_nick(enum_class, nick);
+ g_type_class_unref(enum_class);
+
+ if (enum_value != NULL)
+ ret = g_list_append(ret, GINT_TO_POINTER(enum_value->value));
+ }
+
+ if (ret == NULL)
+ return default_list;
+
+ g_list_free(default_list);
+
+ return ret;
+}
/*
* Local variables:
diff --git a/osinfo/osinfo_entity.h b/osinfo/osinfo_entity.h
index 4c6dc45..64f31d2 100644
--- a/osinfo/osinfo_entity.h
+++ b/osinfo/osinfo_entity.h
@@ -84,6 +84,10 @@ gint64 osinfo_entity_get_param_value_int64_with_default(OsinfoEntity *entity,
const gchar *key,
gint64 default_value);
GList *osinfo_entity_get_param_value_list(OsinfoEntity *entity, const gchar *key);
+GList *osinfo_entity_get_param_value_enum_list(OsinfoEntity *entity,
+ const char *key,
+ GType enum_type,
+ gint default_value);
void osinfo_entity_set_param(OsinfoEntity *entity, const gchar *key, const gchar *value);
void osinfo_entity_set_param_boolean(OsinfoEntity *entity, const gchar *key, gboolean value);
void osinfo_entity_set_param_int64(OsinfoEntity *entity, const gchar *key, gint64 value);
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:02 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:02 +0200
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
data/oses/windows.xml.in | 8 ++++----
data/schemas/libosinfo.rng | 11 +++++++++++
osinfo/libosinfo.syms | 6 ++++++
osinfo/osinfo_device_driver.c | 9 +++++++++
osinfo/osinfo_device_driver.h | 20 ++++++++++++++++++++
osinfo/osinfo_loader.c | 8 ++++++++
6 files changed, 58 insertions(+), 4 deletions(-)
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index 310de62..1b762f8 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -383,7 +383,7 @@
-
+
viostor.cat
viostor.inf
viostor.sys
@@ -392,7 +392,7 @@
-
+
viostor.cat
viostor.inf
viostor.sys
@@ -754,14 +754,14 @@
-
+
viostor.cat
viostor.inf
viostor.sys
-
+
viostor.cat
viostor.inf
viostor.sys
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 90b0dfb..74fc9ce 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -451,6 +451,11 @@
+
+
+
+
+
@@ -677,4 +682,10 @@
dos|unix
+
+
+
+ windows|script|package
+
+
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 4615829..41d3756 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -399,6 +399,12 @@ LIBOSINFO_0.2.3 {
} LIBOSINFO_0.2.2;
+LIBOSINFO_0.2.4 {
+ global:
+ osinfo_device_driver_format_get_type;
+ osinfo_device_driver_get_format;
+} LIBOSINFO_0.2.3;
+
/* Symbols in next release...
LIBOSINFO_0.0.2 {
diff --git a/osinfo/osinfo_device_driver.c b/osinfo/osinfo_device_driver.c
index 23731bf..da525cf 100644
--- a/osinfo/osinfo_device_driver.c
+++ b/osinfo/osinfo_device_driver.c
@@ -160,6 +160,15 @@ OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver)
return driver->priv->devices;
}
+OsinfoDeviceDriverFormat osinfo_device_driver_get_format(OsinfoDeviceDriver *driver)
+{
+ return osinfo_entity_get_param_value_enum
+ (OSINFO_ENTITY(driver),
+ OSINFO_DEVICE_DRIVER_PROP_FORMAT,
+ OSINFO_TYPE_DEVICE_DRIVER_FORMAT,
+ OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
+}
+
void osinfo_device_driver_add_device(OsinfoDeviceDriver *driver,
OsinfoDevice *device)
{
diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h
index c894fe8..dae3f97 100644
--- a/osinfo/osinfo_device_driver.h
+++ b/osinfo/osinfo_device_driver.h
@@ -55,6 +55,7 @@ typedef struct _OsinfoDeviceDriverPrivate OsinfoDeviceDriverPrivate;
#define OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE "pre-installable"
#define OSINFO_DEVICE_DRIVER_PROP_FILE "file"
#define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device"
+#define OSINFO_DEVICE_DRIVER_PROP_FORMAT "format"
/* object */
struct _OsinfoDeviceDriver
@@ -76,6 +77,24 @@ struct _OsinfoDeviceDriverClass
/* class members */
};
+/**
+ * OsinfoDeviceDriverFormat:
+ * @OSINFO_DEVICE_DRIVER_FORMAT_WINDOWS: Windows specific driver in the form of
+ * .cat, .inf, .sys and (optionally) .dll
+ * files.
+ * @OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT: OS-specific installer script. For
+ * Unix/Linux, this means files with '.sh'
+ * extension with executable permission
+ * bits set. For Windows, this would mean
+ * files with '.cmd' extension.
+ * @OSINFO_DEVICE_DRIVER_FORMAT_PACKAGE: OS-specific installer package (e.g RPM or DEB etc).
+ */
+typedef enum {
+ OSINFO_DEVICE_DRIVER_FORMAT_WINDOWS,
+ OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT,
+ OSINFO_DEVICE_DRIVER_FORMAT_PACKAGE
+} OsinfoDeviceDriverFormat;
+
GType osinfo_device_driver_get_type(void);
const gchar *osinfo_device_driver_get_architecture(OsinfoDeviceDriver *driver);
@@ -83,6 +102,7 @@ const gchar *osinfo_device_driver_get_location(OsinfoDeviceDriver *driver);
gboolean osinfo_device_driver_get_pre_installable(OsinfoDeviceDriver *driver);
GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver);
OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver);
+OsinfoDeviceDriverFormat osinfo_device_driver_get_format(OsinfoDeviceDriver *driver);
#endif /* __OSINFO_DEVICE_DRIVER_H__ */
/*
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index d713767..a190018 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -1016,6 +1016,7 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
xmlChar *arch = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_ARCHITECTURE);
xmlChar *location = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_LOCATION);
xmlChar *preinst = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE);
+ xmlChar *format = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_FORMAT);
OsinfoDeviceDriver *driver = osinfo_device_driver_new(id);
@@ -1040,6 +1041,13 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
xmlFree(preinst);
}
+ if (format) {
+ osinfo_entity_set_param(OSINFO_ENTITY(driver),
+ OSINFO_DEVICE_DRIVER_PROP_FORMAT,
+ (gchar *)format);
+ xmlFree(format);
+ }
+
gint nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
if (error_is_set(err)) {
g_object_unref(G_OBJECT(driver));
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:04 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:04 +0200
Subject: [Libosinfo] [v2 3/8] installer: API to query supported device
driver formats
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-4-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
data/install-scripts/windows-sif.xml | 2 ++
data/install-scripts/windows-unattend.xml | 2 ++
data/schemas/libosinfo.rng | 10 ++++++++++
osinfo/libosinfo.syms | 2 ++
osinfo/osinfo_install_script.c | 28 ++++++++++++++++++++++++++++
osinfo/osinfo_install_script.h | 5 +++++
osinfo/osinfo_loader.c | 20 ++++++++++++++++++++
7 files changed, 69 insertions(+)
diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index c072f4b..262e6ec 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -6,6 +6,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
winnt.sif
true
+ windows
@@ -72,6 +73,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
winnt.sif
true
+ windows
diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
index e140617..e306ec4 100644
--- a/data/install-scripts/windows-unattend.xml
+++ b/data/install-scripts/windows-unattend.xml
@@ -5,6 +5,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
autounattend.xml
true
+ windows
@@ -220,6 +221,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
autounattend.xml
true
+ windows
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 74fc9ce..042ba53 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -579,11 +579,21 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 1ad4d82..5a61e93 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -404,6 +404,8 @@ LIBOSINFO_0.2.4 {
osinfo_device_driver_format_get_type;
osinfo_device_driver_get_format;
osinfo_entity_get_param_value_enum_list;
+ osinfo_install_script_get_pre_install_driver_formats;
+ osinfo_install_script_get_post_install_driver_formats;
} LIBOSINFO_0.2.3;
/* Symbols in next release...
diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
index 276c756..8b70365 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -1230,6 +1230,34 @@ gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript
OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS);
}
+/**
+ * osinfo_install_script_get_pre_install_driver_formats:
+ *
+ * Returns: (transfer container) (element-type OsinfoDeviceDriverFormat):
+ */
+GList *osinfo_install_script_get_pre_install_driver_formats(OsinfoInstallScript *script)
+{
+ return osinfo_entity_get_param_value_enum_list
+ (OSINFO_ENTITY(script),
+ OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT,
+ OSINFO_TYPE_DEVICE_DRIVER_FORMAT,
+ OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
+}
+
+/**
+ * osinfo_install_script_get_post_install_driver_formats:
+ *
+ * Returns: (transfer container) (element-type OsinfoDeviceDriverFormat):
+ */
+GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript *script)
+{
+ return osinfo_entity_get_param_value_enum_list
+ (OSINFO_ENTITY(script),
+ OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT,
+ OSINFO_TYPE_DEVICE_DRIVER_FORMAT,
+ OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h
index d91751e..f9c0aaf 100644
--- a/osinfo/osinfo_install_script.h
+++ b/osinfo/osinfo_install_script.h
@@ -55,6 +55,8 @@ typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate;
#define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT "path-format"
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers"
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"
+#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT "pre-install-driver-format"
+#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT "post-install-driver-format"
/* object */
struct _OsinfoInstallScript
@@ -163,6 +165,9 @@ OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *scri
gboolean osinfo_install_script_get_can_pre_install_drivers(OsinfoInstallScript *script);
gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript *script);
+GList *osinfo_install_script_get_pre_install_driver_formats(OsinfoInstallScript *script);
+GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript *script);
+
#endif /* __OSINFO_INSTALL_SCRIPT_H__ */
/*
* Local variables:
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index a190018..0c9cc0b 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -705,6 +705,7 @@ static void osinfo_loader_install_script(OsinfoLoader *loader,
gchar *value = NULL;
xmlNodePtr *nodes = NULL;
int nnodes;
+ int i;
if (!id) {
OSINFO_ERROR(err, _("Missing install script id property"));
@@ -762,6 +763,25 @@ static void osinfo_loader_install_script(OsinfoLoader *loader,
}
g_free(nodes);
+ nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
+ if (error_is_set(err))
+ goto error;
+
+ for (i = 0 ; i < nnodes ; i++) {
+ if (!nodes[i]->children ||
+ nodes[i]->children->type != XML_TEXT_NODE ||
+ (strcmp((const gchar *)nodes[i]->name,
+ OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT) != 0 &&
+ strcmp((const gchar *)nodes[i]->name,
+ OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT)))
+ continue;
+
+ osinfo_entity_set_param(OSINFO_ENTITY(installScript),
+ (const gchar *)nodes[i]->name,
+ (const gchar *)nodes[i]->children->content);
+ }
+ g_free(nodes);
+
osinfo_db_add_install_script(loader->priv->db, installScript);
return;
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:06 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:06 +0200
Subject: [Libosinfo] [v2 5/8] install-config: API to enable/disable driver
signing
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-6-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Currently only used by Windows XP.
---
data/install-scripts/windows-sif.xml | 8 ++++++++
osinfo/libosinfo.syms | 2 ++
osinfo/osinfo_install_config.c | 25 +++++++++++++++++++++++++
osinfo/osinfo_install_config.h | 6 ++++++
4 files changed, 41 insertions(+)
diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index 262e6ec..3bb79c8 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -11,6 +11,7 @@
+
+ DriverSigningPolicy=Ignore
+
TargetPath=\WINDOWS
Repartition=Yes
WaitForReboot=No
@@ -80,6 +84,7 @@
+
+ DriverSigningPolicy=Ignore
+
TargetPath=\WINDOWS
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 70202f5..17083ea 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -401,6 +401,8 @@ LIBOSINFO_0.2.3 {
LIBOSINFO_0.2.4 {
global:
+ osinfo_install_config_get_driver_signing;
+ osinfo_install_config_set_driver_signing;
osinfo_device_driver_format_get_type;
osinfo_device_driver_get_format;
osinfo_device_driver_get_signed;
diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
index 1712be5..f6d2561 100644
--- a/osinfo/osinfo_install_config.c
+++ b/osinfo/osinfo_install_config.c
@@ -641,6 +641,31 @@ const gchar *osinfo_install_config_get_post_install_drivers_location(OsinfoInsta
OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION);
}
+/**
+ * osinfo_install_config_set_driver_signing:
+ * @config: the install config
+ * @signing: boolean value
+ *
+ * If a script requires drivers to be signed, this function can be used to
+ * disable that security feature. WARNING: Disable driver signing may very well
+ * mean disabling it permanently.
+ */
+void osinfo_install_config_set_driver_signing(OsinfoInstallConfig *config,
+ gboolean signing)
+{
+ osinfo_entity_set_param_boolean(OSINFO_ENTITY(config),
+ OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING,
+ signing);
+}
+
+gboolean osinfo_install_config_get_driver_signing(OsinfoInstallConfig *config)
+{
+ return osinfo_entity_get_param_value_boolean_with_default
+ (OSINFO_ENTITY(config),
+ OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING,
+ TRUE);
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff --git a/osinfo/osinfo_install_config.h b/osinfo/osinfo_install_config.h
index d650a0a..b3cfa7e 100644
--- a/osinfo/osinfo_install_config.h
+++ b/osinfo/osinfo_install_config.h
@@ -67,6 +67,8 @@
#define OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_DISK "post-install-drivers-disk"
#define OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION "post-install-drivers-location"
+#define OSINFO_INSTALL_CONFIG_PROP_DRIVER_SIGNING "driver-signing"
+
typedef struct _OsinfoInstallConfig OsinfoInstallConfig;
typedef struct _OsinfoInstallConfigClass OsinfoInstallConfigClass;
typedef struct _OsinfoInstallConfigPrivate OsinfoInstallConfigPrivate;
@@ -193,6 +195,10 @@ void osinfo_install_config_set_post_install_drivers_location(OsinfoInstallConfig
const gchar *location);
const gchar *osinfo_install_config_get_post_install_drivers_location(OsinfoInstallConfig *config);
+void osinfo_install_config_set_driver_signing(OsinfoInstallConfig *config,
+ gboolean signing);
+gboolean osinfo_install_config_get_driver_signing(OsinfoInstallConfig *config);
+
#endif /* __OSINFO_INSTALL_CONFIG_H__ */
/*
* Local variables:
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:05 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:05 +0200
Subject: [Libosinfo] [v2 4/8] API to query signed status of device drivers
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-5-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Some OS vendors recommend or require device drivers to be signed by them
before these device drivers could be installed on their OS.
---
data/oses/windows.xml.in | 8 ++++----
data/schemas/libosinfo.rng | 5 +++++
osinfo/libosinfo.syms | 1 +
osinfo/osinfo_device_driver.c | 16 ++++++++++++++++
osinfo/osinfo_device_driver.h | 2 ++
osinfo/osinfo_loader.c | 8 ++++++++
6 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index 1b762f8..f60786c 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -383,7 +383,7 @@
-
+
viostor.cat
viostor.inf
viostor.sys
@@ -392,7 +392,7 @@
-
+
viostor.cat
viostor.inf
viostor.sys
@@ -754,14 +754,14 @@
-
+
viostor.cat
viostor.inf
viostor.sys
-
+
viostor.cat
viostor.inf
viostor.sys
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 042ba53..96b31a7 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -452,6 +452,11 @@
+
+
+
+
+
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 5a61e93..70202f5 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -403,6 +403,7 @@ LIBOSINFO_0.2.4 {
global:
osinfo_device_driver_format_get_type;
osinfo_device_driver_get_format;
+ osinfo_device_driver_get_signed;
osinfo_entity_get_param_value_enum_list;
osinfo_install_script_get_pre_install_driver_formats;
osinfo_install_script_get_post_install_driver_formats;
diff --git a/osinfo/osinfo_device_driver.c b/osinfo/osinfo_device_driver.c
index da525cf..5c31300 100644
--- a/osinfo/osinfo_device_driver.c
+++ b/osinfo/osinfo_device_driver.c
@@ -179,6 +179,22 @@ void osinfo_device_driver_add_device(OsinfoDeviceDriver *driver,
OSINFO_ENTITY(device));
}
+/**
+ * osinfo_device_driver_get_signed:
+ * @driver: an #OsinfoDeviceDriver instance
+ *
+ * Some OS vendors recommend or require device drivers to be signed by them
+ * before these device drivers could be installed on their OS.
+ *
+ * Returns: TRUE if @driver is signed, FALSE otherwise.
+ */
+gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver)
+{
+ return osinfo_entity_get_param_value_boolean
+ (OSINFO_ENTITY(driver),
+ OSINFO_DEVICE_DRIVER_PROP_SIGNED);
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h
index dae3f97..8c2553b 100644
--- a/osinfo/osinfo_device_driver.h
+++ b/osinfo/osinfo_device_driver.h
@@ -56,6 +56,7 @@ typedef struct _OsinfoDeviceDriverPrivate OsinfoDeviceDriverPrivate;
#define OSINFO_DEVICE_DRIVER_PROP_FILE "file"
#define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device"
#define OSINFO_DEVICE_DRIVER_PROP_FORMAT "format"
+#define OSINFO_DEVICE_DRIVER_PROP_SIGNED "signed"
/* object */
struct _OsinfoDeviceDriver
@@ -103,6 +104,7 @@ gboolean osinfo_device_driver_get_pre_installable(OsinfoDeviceDriver *driver);
GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver);
OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver);
OsinfoDeviceDriverFormat osinfo_device_driver_get_format(OsinfoDeviceDriver *driver);
+gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver);
#endif /* __OSINFO_DEVICE_DRIVER_H__ */
/*
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index 0c9cc0b..e467099 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -1037,6 +1037,7 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
xmlChar *location = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_LOCATION);
xmlChar *preinst = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE);
xmlChar *format = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_FORMAT);
+ xmlChar *is_signed = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_SIGNED);
OsinfoDeviceDriver *driver = osinfo_device_driver_new(id);
@@ -1068,6 +1069,13 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
xmlFree(format);
}
+ if (is_signed) {
+ osinfo_entity_set_param(OSINFO_ENTITY(driver),
+ OSINFO_DEVICE_DRIVER_PROP_SIGNED,
+ (gchar *)is_signed);
+ xmlFree(is_signed);
+ }
+
gint nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
if (error_is_set(err)) {
g_object_unref(G_OBJECT(driver));
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:07 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:07 +0200
Subject: [Libosinfo] [v2 6/8] installer: API to query device driver signing
requirement
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-7-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
data/install-scripts/windows-sif.xml | 2 ++
data/install-scripts/windows-unattend.xml | 2 ++
data/schemas/libosinfo.rng | 16 ++++++++++++++++
osinfo/libosinfo.syms | 3 +++
osinfo/osinfo_install_script.c | 32 +++++++++++++++++++++++++++++++
osinfo/osinfo_install_script.h | 31 ++++++++++++++++++++++++++++++
osinfo/osinfo_loader.c | 2 ++
7 files changed, 88 insertions(+)
diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index 3bb79c8..9d56e0e 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -6,6 +6,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
winnt.sif
true
+ none
windows
@@ -77,6 +78,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
winnt.sif
true
+ none
windows
diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
index e306ec4..03ffb84 100644
--- a/data/install-scripts/windows-unattend.xml
+++ b/data/install-scripts/windows-unattend.xml
@@ -5,6 +5,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
autounattend.xml
true
+ none
windows
@@ -221,6 +222,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
autounattend.xml
true
+ none
windows
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 96b31a7..4d64f8d 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -590,6 +590,11 @@
+
+
+
+
+
@@ -599,6 +604,11 @@
+
+
+
+
+
@@ -703,4 +713,10 @@
windows|script|package
+
+
+
+ strict|strict-mutable|warn|warn-mutable|none
+
+
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 17083ea..adba92a 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -404,11 +404,14 @@ LIBOSINFO_0.2.4 {
osinfo_install_config_get_driver_signing;
osinfo_install_config_set_driver_signing;
osinfo_device_driver_format_get_type;
+ osinfo_device_driver_signing_req_get_type;
osinfo_device_driver_get_format;
osinfo_device_driver_get_signed;
osinfo_entity_get_param_value_enum_list;
osinfo_install_script_get_pre_install_driver_formats;
+ osinfo_install_script_get_pre_install_drivers_signing_req;
osinfo_install_script_get_post_install_driver_formats;
+ osinfo_install_script_get_post_install_drivers_signing_req;
} LIBOSINFO_0.2.3;
/* Symbols in next release...
diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
index 8b70365..71eab19 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -1258,6 +1258,38 @@ GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript
OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
}
+/**
+ * osinfo_install_script_get_pre_install_drivers_signing_req:
+ * @script: the install script
+ *
+ * If install script can install drivers at the very beginning of installation,
+ * this function retrieves the requirement about signed status of drivers.
+ */
+OsinfoDeviceDriverSigningReq osinfo_install_script_get_pre_install_drivers_signing_req(OsinfoInstallScript *script)
+{
+ return osinfo_entity_get_param_value_enum
+ (OSINFO_ENTITY(script),
+ OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ,
+ OSINFO_TYPE_DEVICE_DRIVER_SIGNING_REQ,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE);
+}
+
+/**
+ * osinfo_install_script_get_post_install_drivers_signing_req:
+ * @script: the install script
+ *
+ * If install script can install drivers at the end of installation, this
+ * function retrieves the requirement about signed status of drivers.
+ */
+OsinfoDeviceDriverSigningReq osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScript *script)
+{
+ return osinfo_entity_get_param_value_enum
+ (OSINFO_ENTITY(script),
+ OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ,
+ OSINFO_TYPE_DEVICE_DRIVER_SIGNING_REQ,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE);
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h
index f9c0aaf..a80174e 100644
--- a/osinfo/osinfo_install_script.h
+++ b/osinfo/osinfo_install_script.h
@@ -57,6 +57,8 @@ typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate;
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"
#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT "pre-install-driver-format"
#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT "post-install-driver-format"
+#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req"
+#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req"
/* object */
struct _OsinfoInstallScript
@@ -88,6 +90,32 @@ typedef enum {
OSINFO_PATH_FORMAT_DOS
} OsinfoPathFormat;
+/**
+ * OsinfoDeviceDriverSigningReq;
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE: Script do not require device drivers
+ * to be signed.
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT: Script must only be given signed
+ * device drivers.
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT_MUTABLE: Same as last one but driver
+ * signature checking policy can be modified using
+ * #osinfo_install_config_set_driver_signing.
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN: A warning will be issued by OS
+ * installer if device drivers are not
+ * signed and most probably require user
+ * input (and thus breaking unattended
+ * installation).
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN_MUTABLE: Same as last one but driver
+ * signature checking policy can be modified using
+ * #osinfo_install_config_set_driver_signing.
+ */
+typedef enum {
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT_MUTABLE,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN_MUTABLE,
+} OsinfoDeviceDriverSigningReq;
+
GType osinfo_install_script_get_type(void);
OsinfoInstallScript *osinfo_install_script_new(const gchar *id);
@@ -168,6 +196,9 @@ gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript
GList *osinfo_install_script_get_pre_install_driver_formats(OsinfoInstallScript *script);
GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript *script);
+OsinfoDeviceDriverSigningReq osinfo_install_script_get_pre_install_drivers_signing_req(OsinfoInstallScript *script);
+OsinfoDeviceDriverSigningReq osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScript *script);
+
#endif /* __OSINFO_INSTALL_SCRIPT_H__ */
/*
* Local variables:
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index e467099..e823d47 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -700,6 +700,8 @@ static void osinfo_loader_install_script(OsinfoLoader *loader,
OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME,
OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS,
OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS,
+ OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ,
+ OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ,
NULL
};
gchar *value = NULL;
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:08 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:08 +0200
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Add an all-in-one virtio and QXL device driver setup binary to Windows
XP and 7. This needs to be listed separately from virtio block driver as
not all of these are pre-installable.
As bonus, the same binary also installs spice-vdagent for us.
---
data/oses/windows.xml.in | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index f60786c..3b050a3 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -400,6 +400,27 @@
txtsetup.oem
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
+
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
+
+
@@ -765,7 +786,29 @@
viostor.cat
viostor.inf
viostor.sys
+
+
+
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
+
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
--
1.8.1.2
From zeeshanak at gnome.org Sun Feb 10 16:41:09 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sun, 10 Feb 2013 18:41:09 +0200
Subject: [Libosinfo] [v2 8/8] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360514469-25259-9-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
data/install-scripts/windows-cmd.xml | 18 ++++++++++++++++++
data/install-scripts/windows-sif.xml | 2 ++
2 files changed, 20 insertions(+)
diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
index 85aae12..1a9cd47 100644
--- a/data/install-scripts/windows-cmd.xml
+++ b/data/install-scripts/windows-cmd.xml
@@ -4,6 +4,9 @@
desktop
dos
windows.cmd
+ true
+ strict-mutable
+ script
@@ -11,6 +14,8 @@
+
+
image/bmp
@@ -46,6 +51,17 @@
+
+
+
+
+
+
+ A
+
+
+
+
sc config TlntSvr start= auto
net user /add /passwordreq:no
@@ -53,6 +69,8 @@ net localgroup administrators /add
net accounts /maxpwage:unlimited
if not ""=="" copy ":" ":\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\.bmp"
REGEDIT /S :\windows.reg
+:
+for %%i in (":\*.cmd") do %%i
EXIT
diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index 9d56e0e..03a66e2 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -8,6 +8,7 @@
true
none
windows
+ strict-mutable
@@ -80,6 +81,7 @@
true
none
windows
+ strict-mutable
--
1.8.1.2
From crobinso at redhat.com Fri Feb 8 18:37:51 2013
From: crobinso at redhat.com (Cole Robinson)
Date: Fri, 8 Feb 2013 13:37:51 -0500
Subject: [Libosinfo] [PATCH 1/3] install-script tool: Fix compiler warning
Message-ID: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
osinfo-install-script.c: In function 'main':
osinfo-install-script.c:245:19: error: 'dir' may be used uninitialized in this function [-Werror=maybe-uninitialized]
osinfo-install-script.c:196:12: note: 'dir' was declared here
And add me to AUTHORS to appease syntax-check
---
AUTHORS | 1 +
tools/osinfo-install-script.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 626c17b..79bc980 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -22,6 +22,7 @@ Patches contributed by:
Eric Blake
Yuri Chornoivan
Marc-Andr? Lureau
+ Cole Robinson
...send patches to get your name here...
-- End
diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index 73f1d3d..866a545 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -193,7 +193,7 @@ static gboolean generate_script(OsinfoOs *os)
OsinfoInstallScriptList *scripts = osinfo_os_get_install_script_list(os);
OsinfoInstallScriptList *profile_scripts;
OsinfoFilter *filter;
- GFile *dir;
+ GFile *dir = NULL;
GList *l, *tmp;
gboolean ret = FALSE;
GError *error = NULL;
@@ -242,7 +242,8 @@ static gboolean generate_script(OsinfoOs *os)
g_object_unref(scripts);
g_object_unref(filter);
g_object_unref(profile_scripts);
- g_object_unref(dir);
+ if (dir)
+ g_object_unref(dir);
return ret;
}
--
1.8.1
From crobinso at redhat.com Fri Feb 8 18:37:52 2013
From: crobinso at redhat.com (Cole Robinson)
Date: Fri, 8 Feb 2013 13:37:52 -0500
Subject: [Libosinfo] [PATCH 2/3] .gitignore: Add latest hypervisors and oses
In-Reply-To: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
References: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
Message-ID: <25f1d15438bf0075175b03ec78a231753e7075a4.1360348671.git.crobinso@redhat.com>
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index aff64ce..71d959c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,6 +67,8 @@ data/devices/qemu-ps2.xml
data/devices/qemu-usb.xml
data/devices/virtio-pci.xml
data/devices/xen.xml
+data/hypervisors/kvm.xml
+data/hypervisors/qemu.xml
data/hypervisors/rhel-xen.xml
data/hypervisors/xen.xml
data/pci.ids
@@ -78,6 +80,7 @@ data/oses/freebsd.xml
data/oses/gnome.xml
data/oses/mandrake.xml
data/oses/mandriva.xml
+data/oses/macos.xml
data/oses/netbsd.xml
data/oses/netware.xml
data/oses/openbsd.xml
--
1.8.1
From crobinso at redhat.com Fri Feb 8 18:37:53 2013
From: crobinso at redhat.com (Cole Robinson)
Date: Fri, 8 Feb 2013 13:37:53 -0500
Subject: [Libosinfo] [PATCH 3/3] osinfo-detect: Fix segfault with non
bootable media
In-Reply-To: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
References: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
Message-ID: <5d48f328c5b398dc12a2d11f7490692c23dbb285.1360348671.git.crobinso@redhat.com>
With a movie DVD in my drive:
$ osinfo-detect -f env /dev/cdrom
OSINFO_BOOTABLE=0
** (osinfo-detect:24211): CRITICAL **: osinfo_db_identify_media: assertion `OSINFO_IS_MEDIA(media)' failed
(osinfo-detect:24211): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)
We weren't exiting after detecting the media as non bootable.
https://bugzilla.redhat.com/show_bug.cgi?id=901910
---
tools/osinfo-detect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c
index 1262783..0f837de 100644
--- a/tools/osinfo-detect.c
+++ b/tools/osinfo-detect.c
@@ -238,10 +238,10 @@ gint main(gint argc, gchar **argv)
g_printerr(_("Error parsing media: %s\n"), error->message);
ret = -3;
- goto EXIT;
} else {
print_bootable(FALSE);
}
+ goto EXIT;
} else {
print_bootable(TRUE);
}
--
1.8.1
From cfergeau at redhat.com Mon Feb 11 08:56:47 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 11 Feb 2013 09:56:47 +0100
Subject: [Libosinfo] [PATCH 1/3] install-script tool: Fix compiler
warning
In-Reply-To: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
References: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
Message-ID: <20130211085647.GN2368@teriyaki.redhat.com>
ACK series, thanks a lot for catching this osinfo-detect segfault!
Do you have commit access to the git repository?
Christophe
On Fri, Feb 08, 2013 at 01:37:51PM -0500, Cole Robinson wrote:
> osinfo-install-script.c: In function 'main':
> osinfo-install-script.c:245:19: error: 'dir' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> osinfo-install-script.c:196:12: note: 'dir' was declared here
>
> And add me to AUTHORS to appease syntax-check
> ---
> AUTHORS | 1 +
> tools/osinfo-install-script.c | 5 +++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/AUTHORS b/AUTHORS
> index 626c17b..79bc980 100644
> --- a/AUTHORS
> +++ b/AUTHORS
> @@ -22,6 +22,7 @@ Patches contributed by:
> Eric Blake
> Yuri Chornoivan
> Marc-Andr? Lureau
> + Cole Robinson
> ...send patches to get your name here...
>
> -- End
> diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
> index 73f1d3d..866a545 100644
> --- a/tools/osinfo-install-script.c
> +++ b/tools/osinfo-install-script.c
> @@ -193,7 +193,7 @@ static gboolean generate_script(OsinfoOs *os)
> OsinfoInstallScriptList *scripts = osinfo_os_get_install_script_list(os);
> OsinfoInstallScriptList *profile_scripts;
> OsinfoFilter *filter;
> - GFile *dir;
> + GFile *dir = NULL;
> GList *l, *tmp;
> gboolean ret = FALSE;
> GError *error = NULL;
> @@ -242,7 +242,8 @@ static gboolean generate_script(OsinfoOs *os)
> g_object_unref(scripts);
> g_object_unref(filter);
> g_object_unref(profile_scripts);
> - g_object_unref(dir);
> + if (dir)
> + g_object_unref(dir);
> return ret;
> }
>
> --
> 1.8.1
>
> _______________________________________________
> 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: 198 bytes
Desc: not available
URL:
From crobinso at redhat.com Mon Feb 11 14:35:51 2013
From: crobinso at redhat.com (Cole Robinson)
Date: Mon, 11 Feb 2013 09:35:51 -0500
Subject: [Libosinfo] [PATCH 1/3] install-script tool: Fix compiler
warning
In-Reply-To: <20130211085647.GN2368@teriyaki.redhat.com>
References: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
<20130211085647.GN2368@teriyaki.redhat.com>
Message-ID: <511901C7.9090600@redhat.com>
On 02/11/2013 03:56 AM, Christophe Fergeau wrote:
> ACK series, thanks a lot for catching this osinfo-detect segfault!
> Do you have commit access to the git repository?
>
> Christophe
>
Thanks for the review. No commit access, I need someone else to push.
- Cole
From cfergeau at redhat.com Mon Feb 11 15:30:03 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 11 Feb 2013 16:30:03 +0100
Subject: [Libosinfo] [PATCH 1/3] install-script tool: Fix compiler
warning
In-Reply-To: <511901C7.9090600@redhat.com>
References: <6e0d502895e76d921487a0af396f6f6bd41d34bc.1360348671.git.crobinso@redhat.com>
<20130211085647.GN2368@teriyaki.redhat.com>
<511901C7.9090600@redhat.com>
Message-ID: <20130211153003.GU2368@teriyaki.redhat.com>
On Mon, Feb 11, 2013 at 09:35:51AM -0500, Cole Robinson wrote:
> On 02/11/2013 03:56 AM, Christophe Fergeau wrote:
> > ACK series, thanks a lot for catching this osinfo-detect segfault!
> > Do you have commit access to the git repository?
>
> Thanks for the review. No commit access, I need someone else to push.
I've pushed all 3 patches, thanks for sending them!
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Tue Feb 12 17:38:34 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Tue, 12 Feb 2013 18:38:34 +0100
Subject: [Libosinfo] [libosinfo] Use gnulib's ignore-value.h to silence
gcc
In-Reply-To: <20130204080110.GD17128@teriyaki.ams2.redhat.com>
References: <1359636202-25516-1-git-send-email-cfergeau@redhat.com>
<510BCF0F.2040907@redhat.com>
<20130204080110.GD17128@teriyaki.ams2.redhat.com>
Message-ID: <20130212173834.GY2368@teriyaki.redhat.com>
Hey Michal,
On Mon, Feb 04, 2013 at 09:01:11AM +0100, Christophe Fergeau wrote:
> On Fri, Feb 01, 2013 at 03:19:59PM +0100, Michal Privoznik wrote:
> > The code looks okay, but why do we have these variable if they are not
> > used anywhere?
>
> I must say that I initially chose not to look at why in details as I worked
> on the assumption that the warnings had been worked around for a good
> reason.
> Looking at this a bit more, they happen in the code parsing the
> pciids/usbids files, and we need to skip these values in the file during
> parsing, having a name for them makes the code more readable, and easier
> to extend later if we need these, so I'd be in favour of keeping them.
Did that address your concerns? Or was your previous email to be considered
as an ACK?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From mprivozn at redhat.com Wed Feb 13 08:20:42 2013
From: mprivozn at redhat.com (Michal Privoznik)
Date: Wed, 13 Feb 2013 09:20:42 +0100
Subject: [Libosinfo] [libosinfo] Use gnulib's ignore-value.h to silence
gcc
In-Reply-To: <20130212173834.GY2368@teriyaki.redhat.com>
References: <1359636202-25516-1-git-send-email-cfergeau@redhat.com>
<510BCF0F.2040907@redhat.com>
<20130204080110.GD17128@teriyaki.ams2.redhat.com>
<20130212173834.GY2368@teriyaki.redhat.com>
Message-ID: <511B4CDA.40201@redhat.com>
On 12.02.2013 18:38, Christophe Fergeau wrote:
> Hey Michal,
>
> On Mon, Feb 04, 2013 at 09:01:11AM +0100, Christophe Fergeau wrote:
>> On Fri, Feb 01, 2013 at 03:19:59PM +0100, Michal Privoznik wrote:
>>> The code looks okay, but why do we have these variable if they are not
>>> used anywhere?
>>
>> I must say that I initially chose not to look at why in details as I worked
>> on the assumption that the warnings had been worked around for a good
>> reason.
>> Looking at this a bit more, they happen in the code parsing the
>> pciids/usbids files, and we need to skip these values in the file during
>> parsing, having a name for them makes the code more readable, and easier
>> to extend later if we need these, so I'd be in favour of keeping them.
>
> Did that address your concerns? Or was your previous email to be considered
> as an ACK?
>
> Christophe
>
Oh. I forgot to send an explicit ACK afterwards. Yeah, you've answered
my concern so ACK.
Michal
From cfergeau at redhat.com Wed Feb 13 16:54:47 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 13 Feb 2013 17:54:47 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130213165447.GK2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:02PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
NB: most commit logs in this series consist of just the short log, slightly
longer commit messages wouldn't hurt imo. In this case you can detail why
this API is needed/why people will want to use it for example.
I'm still not fully convinced that we really need all this 'format' API in
the first place, pre/post install drivers and install scripts are all
listed in an node, if an install script for a given OS does not
support a driver format, why is it listed in the first place in the
node?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Wed Feb 13 17:04:01 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 13 Feb 2013 18:04:01 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130213170401.GL2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:02PM +0200, Zeeshan Ali (Khattak) wrote:
> diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h
> index c894fe8..dae3f97 100644
> --- a/osinfo/osinfo_device_driver.h
> +++ b/osinfo/osinfo_device_driver.h
> @@ -55,6 +55,7 @@ typedef struct _OsinfoDeviceDriverPrivate OsinfoDeviceDriverPrivate;
> #define OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE "pre-installable"
> #define OSINFO_DEVICE_DRIVER_PROP_FILE "file"
> #define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device"
> +#define OSINFO_DEVICE_DRIVER_PROP_FORMAT "format"
>
> /* object */
> struct _OsinfoDeviceDriver
> @@ -76,6 +77,24 @@ struct _OsinfoDeviceDriverClass
> /* class members */
> };
>
> +/**
> + * OsinfoDeviceDriverFormat:
> + * @OSINFO_DEVICE_DRIVER_FORMAT_WINDOWS: Windows specific driver in the form of
> + * .cat, .inf, .sys and (optionally) .dll
> + * files.
> + * @OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT: OS-specific installer script. For
> + * Unix/Linux, this means files with '.sh'
> + * extension with executable permission
> + * bits set. For Windows, this would mean
> + * files with '.cmd' extension.
> + * @OSINFO_DEVICE_DRIVER_FORMAT_PACKAGE: OS-specific installer package (e.g RPM or DEB etc).
> + */
> +typedef enum {
> + OSINFO_DEVICE_DRIVER_FORMAT_WINDOWS,
> + OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT,
> + OSINFO_DEVICE_DRIVER_FORMAT_PACKAGE
> +} OsinfoDeviceDriverFormat;
> +
> GType osinfo_device_driver_get_type(void);
>
> const gchar *osinfo_device_driver_get_architecture(OsinfoDeviceDriver *driver);
> @@ -83,6 +102,7 @@ const gchar *osinfo_device_driver_get_location(OsinfoDeviceDriver *driver);
> gboolean osinfo_device_driver_get_pre_installable(OsinfoDeviceDriver *driver);
> GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver);
> OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver);
> +OsinfoDeviceDriverFormat osinfo_device_driver_get_format(OsinfoDeviceDriver *driver);
int is preferrable to OsinfoDeviceDriverFormat here from an ABI stability
point of view. Patch looks good apart from this, and the concerns I
mentioned in another email.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Wed Feb 13 17:16:59 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Wed, 13 Feb 2013 19:16:59 +0200
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <20130213165447.GK2516@teriyaki.ams2.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
Message-ID:
On Wed, Feb 13, 2013 at 6:54 PM, Christophe Fergeau wrote:
> On Sun, Feb 10, 2013 at 06:41:02PM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>
> NB: most commit logs in this series consist of just the short log, slightly
> longer commit messages wouldn't hurt imo. In this case you can detail why
> this API is needed/why people will want to use it for example.
OK, i'll modify if this commit is not dropped. For the rest, I'll have
another look and see what I can do.
> I'm still not fully convinced that we really need all this 'format' API in
> the first place, pre/post install drivers and install scripts are all
> listed in an node, if an install script for a given OS does not
> support a driver format, why is it listed in the first place in the
> node?
I just wanted to support the case of providing information about
drivers even if our autoinstallation script does not support them.
Having said that I'm not sure such information would be of any use to
the apps. No strong opinions so I'll let you decide if its needed or
not.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Wed Feb 13 17:17:07 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 13 Feb 2013 18:17:07 +0100
Subject: [Libosinfo] [v2 2/8] Add enum list param getter
In-Reply-To: <1360514469-25259-3-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-3-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130213171706.GM2516@teriyaki.ams2.redhat.com>
Same nit about the commit log, I couldn't even try to guess what this patch
would be about just by reading the log (no mention of 'entity' there for
example).
On Sun, Feb 10, 2013 at 06:41:03PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> ---
> osinfo/libosinfo.syms | 1 +
> osinfo/osinfo_entity.c | 71 ++++++++++++++++++++++++++++++++++++++++----------
> osinfo/osinfo_entity.h | 4 +++
> 3 files changed, 62 insertions(+), 14 deletions(-)
>
> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
> index 41d3756..1ad4d82 100644
> --- a/osinfo/libosinfo.syms
> +++ b/osinfo/libosinfo.syms
> @@ -403,6 +403,7 @@ LIBOSINFO_0.2.4 {
> global:
> osinfo_device_driver_format_get_type;
> osinfo_device_driver_get_format;
> + osinfo_entity_get_param_value_enum_list;
> } LIBOSINFO_0.2.3;
>
> /* Symbols in next release...
> diff --git a/osinfo/osinfo_entity.c b/osinfo/osinfo_entity.c
> index 543c710..8b9286e 100644
> --- a/osinfo/osinfo_entity.c
> +++ b/osinfo/osinfo_entity.c
> @@ -382,24 +382,19 @@ gint osinfo_entity_get_param_value_enum(OsinfoEntity *entity,
> GType enum_type,
> gint default_value)
> {
> - const gchar *nick;
> - GEnumClass *enum_class;
> - GEnumValue *enum_value;
> + GList *value_list;
> + gint ret;
>
> g_return_val_if_fail(G_TYPE_IS_ENUM(enum_type), default_value);
>
> - nick = osinfo_entity_get_param_value(entity, key);
> - if (nick == NULL)
> - return default_value;
> -
> - enum_class = g_type_class_ref(enum_type);
> - enum_value = g_enum_get_value_by_nick(enum_class, nick);
> - g_type_class_unref(enum_class);
> -
> - if (enum_value != NULL)
> - return enum_value->value;
> + value_list = osinfo_entity_get_param_value_enum_list(entity,
> + key,
> + enum_type,
> + default_value);
> + ret = GPOINTER_TO_INT(value_list->data);
> + g_list_free (value_list);
>
> - g_return_val_if_reached(default_value);
> + return ret;
This is awkward, the code would be nicer if there was an internal
'enum_str_to_int' helper that was shared by this function and
get_param_value_enum_list (though I'm about to contradict myself down this
mail ;)
> }
>
> /**
> @@ -425,6 +420,54 @@ GList *osinfo_entity_get_param_value_list(OsinfoEntity *entity, const gchar *key
> return g_list_copy(values);
> }
>
> +/**
> + * osinfo_entity_get_param_value_enum_list:
> + * @entity: an #OsinfoEntity containing the parameters
> + * @key: the name of the key
> + *
> + * Retrieve all the parameter values associated with a named key as enums. If
> + * no values are associated, a list with only @default_value is returned.
> + *
> + * Returns: (transfer container) (element-type gint): the values associated with the key
> + */
> +GList *osinfo_entity_get_param_value_enum_list(OsinfoEntity *entity,
> + const char *key,
> + GType enum_type,
> + gint default_value)
> +{
> + GList *value_list;
> + GList *iter;
> + GList *ret = NULL;
> + GList *default_list;
> +
> + default_list = g_list_append (NULL, GINT_TO_POINTER(default_value));
I'd tend to do return g_list_append (NULL, GINT_TO_POINTER(default_value));
where needed to avoid creating and destroying an unneeded list when
everything works fine. This could alternatively be wrapped in a
#define DEFAULT_LIST g_list_append (NULL, GINT_TO_POINTER(default_value))
if you prefer.
> +
> + g_return_val_if_fail(G_TYPE_IS_ENUM(enum_type), NULL);
We should return 'default_list' rather than NULL here.
> +
> + value_list = osinfo_entity_get_param_value_list(entity, key);
> + if (value_list == NULL)
> + return default_list;
> +
> + for (iter = value_list; iter; iter = iter->next) {
> + GEnumClass *enum_class;
> + GEnumValue *enum_value;
> + const gchar *nick = (const gchar *) iter->data;
> +
> + enum_class = g_type_class_ref(enum_type);
> + enum_value = g_enum_get_value_by_nick(enum_class, nick);
> + g_type_class_unref(enum_class);
> +
> + if (enum_value != NULL)
> + ret = g_list_append(ret, GINT_TO_POINTER(enum_value->value));
> + }
This could be:
GEnumClass *enum_class;
GEnumValue *enum_value;
enum_class = g_type_class_ref(enum_type);
for (iter = value_list; iter; iter = iter->next) {
const gchar *nick = (const gchar *) iter->data;
enum_value = g_enum_get_value_by_nick(enum_class, nick);
if (enum_value != NULL)
ret = g_list_append(ret, GINT_TO_POINTER(enum_value->value));
}
g_type_class_unref(enum_class);
(which does not go well with my helper suggestion above).
Also, when enum_value is NULL, we should warn that an unexpected value was
found, and print the value. We could also add the default_value to the list
when this happens, but I don't think this is right.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Wed Feb 13 17:24:36 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 13 Feb 2013 18:24:36 +0100
Subject: [Libosinfo] [v2 3/8] installer: API to query supported device
driver formats
In-Reply-To: <1360514469-25259-4-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-4-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130213172435.GN2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:04PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> ---
> data/install-scripts/windows-sif.xml | 2 ++
> data/install-scripts/windows-unattend.xml | 2 ++
> data/schemas/libosinfo.rng | 10 ++++++++++
> osinfo/libosinfo.syms | 2 ++
> osinfo/osinfo_install_script.c | 28 ++++++++++++++++++++++++++++
> osinfo/osinfo_install_script.h | 5 +++++
> osinfo/osinfo_loader.c | 20 ++++++++++++++++++++
> 7 files changed, 69 insertions(+)
>
> diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
> index c072f4b..262e6ec 100644
> --- a/data/install-scripts/windows-sif.xml
> +++ b/data/install-scripts/windows-sif.xml
> @@ -6,6 +6,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> winnt.sif
> true
> + windows
>
>
>
> @@ -72,6 +73,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> winnt.sif
> true
> + windows
>
>
>
> diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
> index e140617..e306ec4 100644
> --- a/data/install-scripts/windows-unattend.xml
> +++ b/data/install-scripts/windows-unattend.xml
> @@ -5,6 +5,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> autounattend.xml
> true
> + windows
>
>
>
> @@ -220,6 +221,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> autounattend.xml
> true
> + windows
>
>
>
> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> index 74fc9ce..042ba53 100644
> --- a/data/schemas/libosinfo.rng
> +++ b/data/schemas/libosinfo.rng
> @@ -579,11 +579,21 @@
>
>
>
> +
> +
> +
> +
> +
>
>
>
>
>
> +
> +
> +
> +
> +
>
>
>
> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
> index 1ad4d82..5a61e93 100644
> --- a/osinfo/libosinfo.syms
> +++ b/osinfo/libosinfo.syms
> @@ -404,6 +404,8 @@ LIBOSINFO_0.2.4 {
> osinfo_device_driver_format_get_type;
> osinfo_device_driver_get_format;
> osinfo_entity_get_param_value_enum_list;
> + osinfo_install_script_get_pre_install_driver_formats;
> + osinfo_install_script_get_post_install_driver_formats;
I tend to add blank lines between methods pertaining to different classes:
osinfo_device_driver_format_get_type;
osinfo_device_driver_get_format;
osinfo_entity_get_param_value_enum_list;
osinfo_install_script_get_pre_install_driver_formats;
osinfo_install_script_get_post_install_driver_formats;
> } LIBOSINFO_0.2.3;
>
> /* Symbols in next release...
> diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
> index 276c756..8b70365 100644
> --- a/osinfo/osinfo_install_script.c
> +++ b/osinfo/osinfo_install_script.c
> @@ -1230,6 +1230,34 @@ gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript
> OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS);
> }
>
> +/**
> + * osinfo_install_script_get_pre_install_driver_formats:
> + *
> + * Returns: (transfer container) (element-type OsinfoDeviceDriverFormat):
> + */
> +GList *osinfo_install_script_get_pre_install_driver_formats(OsinfoInstallScript *script)
> +{
> + return osinfo_entity_get_param_value_enum_list
> + (OSINFO_ENTITY(script),
> + OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT,
> + OSINFO_TYPE_DEVICE_DRIVER_FORMAT,
> + OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
> +}
> +
> +/**
> + * osinfo_install_script_get_post_install_driver_formats:
> + *
> + * Returns: (transfer container) (element-type OsinfoDeviceDriverFormat):
> + */
> +GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript *script)
> +{
> + return osinfo_entity_get_param_value_enum_list
> + (OSINFO_ENTITY(script),
> + OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT,
> + OSINFO_TYPE_DEVICE_DRIVER_FORMAT,
> + OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
> +}
> +
> /*
> * Local variables:
> * indent-tabs-mode: nil
> diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h
> index d91751e..f9c0aaf 100644
> --- a/osinfo/osinfo_install_script.h
> +++ b/osinfo/osinfo_install_script.h
> @@ -55,6 +55,8 @@ typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate;
> #define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT "path-format"
> #define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers"
> #define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"
> +#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT "pre-install-driver-format"
> +#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT "post-install-driver-format"
>
> /* object */
> struct _OsinfoInstallScript
> @@ -163,6 +165,9 @@ OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *scri
> gboolean osinfo_install_script_get_can_pre_install_drivers(OsinfoInstallScript *script);
> gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript *script);
>
> +GList *osinfo_install_script_get_pre_install_driver_formats(OsinfoInstallScript *script);
> +GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript *script);
> +
> #endif /* __OSINFO_INSTALL_SCRIPT_H__ */
> /*
> * Local variables:
> diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
> index a190018..0c9cc0b 100644
> --- a/osinfo/osinfo_loader.c
> +++ b/osinfo/osinfo_loader.c
> @@ -705,6 +705,7 @@ static void osinfo_loader_install_script(OsinfoLoader *loader,
> gchar *value = NULL;
> xmlNodePtr *nodes = NULL;
> int nnodes;
> + int i;
>
> if (!id) {
> OSINFO_ERROR(err, _("Missing install script id property"));
> @@ -762,6 +763,25 @@ static void osinfo_loader_install_script(OsinfoLoader *loader,
> }
> g_free(nodes);
>
> + nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
> + if (error_is_set(err))
> + goto error;
> +
> + for (i = 0 ; i < nnodes ; i++) {
> + if (!nodes[i]->children ||
> + nodes[i]->children->type != XML_TEXT_NODE ||
> + (strcmp((const gchar *)nodes[i]->name,
> + OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT) != 0 &&
> + strcmp((const gchar *)nodes[i]->name,
> + OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT)))
The last strcmp is missing a != 0
Looks good otherwise, though this is dependant on what we decide for the
first patch in this series.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Wed Feb 13 17:25:43 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 13 Feb 2013 18:25:43 +0100
Subject: [Libosinfo] [v2 4/8] API to query signed status of device
drivers
In-Reply-To: <1360514469-25259-5-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-5-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130213172543.GO2516@teriyaki.ams2.redhat.com>
Looks good, ACK (though I don't think this matters for preinst drivers)
Christophe
On Sun, Feb 10, 2013 at 06:41:05PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Some OS vendors recommend or require device drivers to be signed by them
> before these device drivers could be installed on their OS.
> ---
> data/oses/windows.xml.in | 8 ++++----
> data/schemas/libosinfo.rng | 5 +++++
> osinfo/libosinfo.syms | 1 +
> osinfo/osinfo_device_driver.c | 16 ++++++++++++++++
> osinfo/osinfo_device_driver.h | 2 ++
> osinfo/osinfo_loader.c | 8 ++++++++
> 6 files changed, 36 insertions(+), 4 deletions(-)
>
> diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
> index 1b762f8..f60786c 100644
> --- a/data/oses/windows.xml.in
> +++ b/data/oses/windows.xml.in
> @@ -383,7 +383,7 @@
>
>
>
> -
> +
> viostor.cat
> viostor.inf
> viostor.sys
> @@ -392,7 +392,7 @@
>
>
>
> -
> +
> viostor.cat
> viostor.inf
> viostor.sys
> @@ -754,14 +754,14 @@
>
>
>
> -
> +
> viostor.cat
> viostor.inf
> viostor.sys
>
>
>
> -
> +
> viostor.cat
> viostor.inf
> viostor.sys
> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> index 042ba53..96b31a7 100644
> --- a/data/schemas/libosinfo.rng
> +++ b/data/schemas/libosinfo.rng
> @@ -452,6 +452,11 @@
>
>
>
> +
> +
> +
> +
> +
>
>
>
> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
> index 5a61e93..70202f5 100644
> --- a/osinfo/libosinfo.syms
> +++ b/osinfo/libosinfo.syms
> @@ -403,6 +403,7 @@ LIBOSINFO_0.2.4 {
> global:
> osinfo_device_driver_format_get_type;
> osinfo_device_driver_get_format;
> + osinfo_device_driver_get_signed;
> osinfo_entity_get_param_value_enum_list;
> osinfo_install_script_get_pre_install_driver_formats;
> osinfo_install_script_get_post_install_driver_formats;
> diff --git a/osinfo/osinfo_device_driver.c b/osinfo/osinfo_device_driver.c
> index da525cf..5c31300 100644
> --- a/osinfo/osinfo_device_driver.c
> +++ b/osinfo/osinfo_device_driver.c
> @@ -179,6 +179,22 @@ void osinfo_device_driver_add_device(OsinfoDeviceDriver *driver,
> OSINFO_ENTITY(device));
> }
>
> +/**
> + * osinfo_device_driver_get_signed:
> + * @driver: an #OsinfoDeviceDriver instance
> + *
> + * Some OS vendors recommend or require device drivers to be signed by them
> + * before these device drivers could be installed on their OS.
> + *
> + * Returns: TRUE if @driver is signed, FALSE otherwise.
> + */
> +gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver)
> +{
> + return osinfo_entity_get_param_value_boolean
> + (OSINFO_ENTITY(driver),
> + OSINFO_DEVICE_DRIVER_PROP_SIGNED);
> +}
> +
> /*
> * Local variables:
> * indent-tabs-mode: nil
> diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h
> index dae3f97..8c2553b 100644
> --- a/osinfo/osinfo_device_driver.h
> +++ b/osinfo/osinfo_device_driver.h
> @@ -56,6 +56,7 @@ typedef struct _OsinfoDeviceDriverPrivate OsinfoDeviceDriverPrivate;
> #define OSINFO_DEVICE_DRIVER_PROP_FILE "file"
> #define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device"
> #define OSINFO_DEVICE_DRIVER_PROP_FORMAT "format"
> +#define OSINFO_DEVICE_DRIVER_PROP_SIGNED "signed"
>
> /* object */
> struct _OsinfoDeviceDriver
> @@ -103,6 +104,7 @@ gboolean osinfo_device_driver_get_pre_installable(OsinfoDeviceDriver *driver);
> GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver);
> OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver);
> OsinfoDeviceDriverFormat osinfo_device_driver_get_format(OsinfoDeviceDriver *driver);
> +gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver);
>
> #endif /* __OSINFO_DEVICE_DRIVER_H__ */
> /*
> diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
> index 0c9cc0b..e467099 100644
> --- a/osinfo/osinfo_loader.c
> +++ b/osinfo/osinfo_loader.c
> @@ -1037,6 +1037,7 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
> xmlChar *location = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_LOCATION);
> xmlChar *preinst = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE);
> xmlChar *format = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_FORMAT);
> + xmlChar *is_signed = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_SIGNED);
>
> OsinfoDeviceDriver *driver = osinfo_device_driver_new(id);
>
> @@ -1068,6 +1069,13 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
> xmlFree(format);
> }
>
> + if (is_signed) {
> + osinfo_entity_set_param(OSINFO_ENTITY(driver),
> + OSINFO_DEVICE_DRIVER_PROP_SIGNED,
> + (gchar *)is_signed);
> + xmlFree(is_signed);
> + }
> +
> gint nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
> if (error_is_set(err)) {
> g_object_unref(G_OBJECT(driver));
> --
> 1.8.1.2
>
> _______________________________________________
> 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: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Wed Feb 13 17:31:38 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Wed, 13 Feb 2013 18:31:38 +0100
Subject: [Libosinfo] [v2 5/8] install-config: API to enable/disable
driver signing
In-Reply-To: <1360514469-25259-6-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-6-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130213173137.GP2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:06PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Currently only used by Windows XP.
As we more or less agreed in the previous thread, I'd much prefer if we
could do this automatically (disable signature checks during install if the
user picked unsigned drivers, reenable signature checks after driver
installation). However, since figuring out if this is doable or not may
take some time, I suggest we get the rest of the series in first, and then
add this patch on top if there is no other choice (adding API is always ok,
removing API is not possible).
> ---
> data/install-scripts/windows-sif.xml | 8 ++++++++
> osinfo/libosinfo.syms | 2 ++
> osinfo/osinfo_install_config.c | 25 +++++++++++++++++++++++++
> osinfo/osinfo_install_config.h | 6 ++++++
> 4 files changed, 41 insertions(+)
>
> diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
> index 262e6ec..3bb79c8 100644
> --- a/data/install-scripts/windows-sif.xml
> +++ b/data/install-scripts/windows-sif.xml
> @@ -11,6 +11,7 @@
>
>
>
> +
>
>
> @@ -30,6 +31,9 @@
> UnattendMode=FullUnattended
> OemSkipEula=Yes
> OemPreinstall=No
> +
> + DriverSigningPolicy=Ignore
> +
> TargetPath=\WINDOWS
> Repartition=Yes
> WaitForReboot=No
> @@ -80,6 +84,7 @@
>
>
>
> +
>
>
> @@ -136,6 +141,9 @@
> UnattendMode=FullUnattended
> OemSkipEula=Yes
> OemPreinstall=No
> +
> + DriverSigningPolicy=Ignore
> +
>
>
> TargetPath=\WINDOWS
> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
> index 70202f5..17083ea 100644
> --- a/osinfo/libosinfo.syms
> +++ b/osinfo/libosinfo.syms
> @@ -401,6 +401,8 @@ LIBOSINFO_0.2.3 {
>
> LIBOSINFO_0.2.4 {
> global:
> + osinfo_install_config_get_driver_signing;
> + osinfo_install_config_set_driver_signing;
> osinfo_device_driver_format_get_type;
> osinfo_device_driver_get_format;
> osinfo_device_driver_get_signed;
> diff --git a/osinfo/osinfo_install_config.c b/osinfo/osinfo_install_config.c
> index 1712be5..f6d2561 100644
> --- a/osinfo/osinfo_install_config.c
> +++ b/osinfo/osinfo_install_config.c
> @@ -641,6 +641,31 @@ const gchar *osinfo_install_config_get_post_install_drivers_location(OsinfoInsta
> OSINFO_INSTALL_CONFIG_PROP_POST_INSTALL_DRIVERS_LOCATION);
> }
>
> +/**
> + * osinfo_install_config_set_driver_signing:
> + * @config: the install config
> + * @signing: boolean value
> + *
> + * If a script requires drivers to be signed, this function can be used to
> + * disable that security feature. WARNING: Disable driver signing may very well
> + * mean disabling it permanently.
I'd write the "WARNING" as "Disabling driver signing can disable driver
signature checks permanently, even after installation"
Looks good otherwise.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 14 10:40:25 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 14 Feb 2013 11:40:25 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
Message-ID: <20130214104024.GT2516@teriyaki.ams2.redhat.com>
On Wed, Feb 13, 2013 at 07:16:59PM +0200, Zeeshan Ali (Khattak) wrote:
> On Wed, Feb 13, 2013 at 6:54 PM, Christophe Fergeau wrote:
> > I'm still not fully convinced that we really need all this 'format' API in
> > the first place, pre/post install drivers and install scripts are all
> > listed in an node, if an install script for a given OS does not
> > support a driver format, why is it listed in the first place in the
> > node?
>
> I just wanted to support the case of providing information about
> drivers even if our autoinstallation script does not support them.
> Having said that I'm not sure such information would be of any use to
> the apps. No strong opinions so I'll let you decide if its needed or
> not.
At worse (ie if in the future we add an install script that does not
support one driver we list), applications will try to use the driver, but
this will fail, right? I guess when we get to such a situation, we can look
into adding this API, but that for now having it is not required. Correct
me if I'm missing something :)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 14 10:47:41 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 14 Feb 2013 11:47:41 +0100
Subject: [Libosinfo] [v2 6/8] installer: API to query device driver
signing requirement
In-Reply-To: <1360514469-25259-7-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-7-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130214104741.GU2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:07PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> ---
> data/install-scripts/windows-sif.xml | 2 ++
> data/install-scripts/windows-unattend.xml | 2 ++
> data/schemas/libosinfo.rng | 16 ++++++++++++++++
> osinfo/libosinfo.syms | 3 +++
> osinfo/osinfo_install_script.c | 32 +++++++++++++++++++++++++++++++
> osinfo/osinfo_install_script.h | 31 ++++++++++++++++++++++++++++++
> osinfo/osinfo_loader.c | 2 ++
> 7 files changed, 88 insertions(+)
>
> diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
> index 3bb79c8..9d56e0e 100644
> --- a/data/install-scripts/windows-sif.xml
> +++ b/data/install-scripts/windows-sif.xml
> @@ -6,6 +6,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> winnt.sif
> true
> + none
> windows
>
>
> @@ -77,6 +78,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> winnt.sif
> true
> + none
> windows
>
>
> diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
> index e306ec4..03ffb84 100644
> --- a/data/install-scripts/windows-unattend.xml
> +++ b/data/install-scripts/windows-unattend.xml
> @@ -5,6 +5,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> autounattend.xml
> true
> + none
> windows
>
>
> @@ -221,6 +222,7 @@
> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
> autounattend.xml
> true
> + none
> windows
>
>
> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> index 96b31a7..4d64f8d 100644
> --- a/data/schemas/libosinfo.rng
> +++ b/data/schemas/libosinfo.rng
> @@ -590,6 +590,11 @@
>
>
>
> +
> +
> +
> +
> +
>
>
>
> @@ -599,6 +604,11 @@
>
>
>
> +
> +
> +
> +
> +
>
>
>
> @@ -703,4 +713,10 @@
> windows|script|package
>
>
> +
> +
> +
> + strict|strict-mutable|warn|warn-mutable|none
Really not a big fan of these -mutable things, but they should not be
needed if there's a way to reenable driver signing after disabling it
during install.
> +
> +
>
> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
> index 17083ea..adba92a 100644
> --- a/osinfo/libosinfo.syms
> +++ b/osinfo/libosinfo.syms
> @@ -404,11 +404,14 @@ LIBOSINFO_0.2.4 {
> osinfo_install_config_get_driver_signing;
> osinfo_install_config_set_driver_signing;
> osinfo_device_driver_format_get_type;
> + osinfo_device_driver_signing_req_get_type;
> osinfo_device_driver_get_format;
> osinfo_device_driver_get_signed;
> osinfo_entity_get_param_value_enum_list;
> osinfo_install_script_get_pre_install_driver_formats;
> + osinfo_install_script_get_pre_install_drivers_signing_req;
> osinfo_install_script_get_post_install_driver_formats;
> + osinfo_install_script_get_post_install_drivers_signing_req;
> } LIBOSINFO_0.2.3;
>
> /* Symbols in next release...
> diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
> index 8b70365..71eab19 100644
> --- a/osinfo/osinfo_install_script.c
> +++ b/osinfo/osinfo_install_script.c
> @@ -1258,6 +1258,38 @@ GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript
> OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT);
> }
>
> +/**
> + * osinfo_install_script_get_pre_install_drivers_signing_req:
> + * @script: the install script
> + *
> + * If install script can install drivers at the very beginning of installation,
> + * this function retrieves the requirement about signed status of drivers.
> + */
> +OsinfoDeviceDriverSigningReq osinfo_install_script_get_pre_install_drivers_signing_req(OsinfoInstallScript *script)
> +{
> + return osinfo_entity_get_param_value_enum
> + (OSINFO_ENTITY(script),
> + OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ,
> + OSINFO_TYPE_DEVICE_DRIVER_SIGNING_REQ,
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE);
> +}
> +
> +/**
> + * osinfo_install_script_get_post_install_drivers_signing_req:
> + * @script: the install script
> + *
> + * If install script can install drivers at the end of installation, this
> + * function retrieves the requirement about signed status of drivers.
> + */
> +OsinfoDeviceDriverSigningReq osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScript *script)
> +{
> + return osinfo_entity_get_param_value_enum
> + (OSINFO_ENTITY(script),
> + OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ,
> + OSINFO_TYPE_DEVICE_DRIVER_SIGNING_REQ,
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE);
> +}
> +
> /*
> * Local variables:
> * indent-tabs-mode: nil
> diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h
> index f9c0aaf..a80174e 100644
> --- a/osinfo/osinfo_install_script.h
> +++ b/osinfo/osinfo_install_script.h
> @@ -57,6 +57,8 @@ typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate;
> #define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"
> #define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DEVICE_DRIVER_FORMAT "pre-install-driver-format"
> #define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DEVICE_DRIVER_FORMAT "post-install-driver-format"
> +#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req"
> +#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req"
>
> /* object */
> struct _OsinfoInstallScript
> @@ -88,6 +90,32 @@ typedef enum {
> OSINFO_PATH_FORMAT_DOS
> } OsinfoPathFormat;
>
> +/**
> + * OsinfoDeviceDriverSigningReq;
> + * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE: Script do not require device drivers
> + * to be signed.
> + * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT: Script must only be given signed
> + * device drivers.
> + * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT_MUTABLE: Same as last one but driver
> + * signature checking policy can be modified using
> + * #osinfo_install_config_set_driver_signing.
> + * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN: A warning will be issued by OS
> + * installer if device drivers are not
> + * signed and most probably require user
> + * input (and thus breaking unattended
> + * installation).
> + * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN_MUTABLE: Same as last one but driver
> + * signature checking policy can be modified using
> + * #osinfo_install_config_set_driver_signing.
> + */
> +typedef enum {
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE,
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT,
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT_MUTABLE,
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN,
> + OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN_MUTABLE,
> +} OsinfoDeviceDriverSigningReq;
> +
> GType osinfo_install_script_get_type(void);
>
> OsinfoInstallScript *osinfo_install_script_new(const gchar *id);
> @@ -168,6 +196,9 @@ gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript
> GList *osinfo_install_script_get_pre_install_driver_formats(OsinfoInstallScript *script);
> GList *osinfo_install_script_get_post_install_driver_formats(OsinfoInstallScript *script);
>
> +OsinfoDeviceDriverSigningReq osinfo_install_script_get_pre_install_drivers_signing_req(OsinfoInstallScript *script);
> +OsinfoDeviceDriverSigningReq osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScript *script);
Same comment as in one of the earlier patch about using enum in exported function signatures.
Patch looks ok otherwise.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 14 10:57:53 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 14 Feb 2013 11:57:53 +0100
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130214105752.GV2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:08PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Add an all-in-one virtio and QXL device driver setup binary to Windows
> XP and 7. This needs to be listed separately from virtio block driver as
> not all of these are pre-installable.
>
> As bonus, the same binary also installs spice-vdagent for us.
> ---
> data/oses/windows.xml.in | 43 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
> index f60786c..3b050a3 100644
> --- a/data/oses/windows.xml.in
> +++ b/data/oses/windows.xml.in
> @@ -400,6 +400,27 @@
> txtsetup.oem
>
>
> +
> +
> +
> + spice-guest-tools-0.3.exe
> + spice-guest-tools-0.3.cmd
> +
> +
> +
> +
> +
> +
I think we could go with a finer grained approach here, and use the rundll
command described in
http://msdn.microsoft.com/en-us/library/aa376957%28v=vs.85%29.aspx to
install individual unpacked drivers, but it's fine to go with the
all-in-one installer as a first step.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 14 11:11:46 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 14 Feb 2013 12:11:46 +0100
Subject: [Libosinfo] [v2 8/8] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <1360514469-25259-9-git-send-email-zeeshanak@gnome.org>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-9-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130214111146.GW2516@teriyaki.ams2.redhat.com>
On Sun, Feb 10, 2013 at 06:41:09PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> ---
> data/install-scripts/windows-cmd.xml | 18 ++++++++++++++++++
> data/install-scripts/windows-sif.xml | 2 ++
> 2 files changed, 20 insertions(+)
>
> diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
> index 85aae12..1a9cd47 100644
> --- a/data/install-scripts/windows-cmd.xml
> +++ b/data/install-scripts/windows-cmd.xml
> @@ -4,6 +4,9 @@
> desktop
> dos
> windows.cmd
> + true
> + strict-mutable
> + script
>
>
>
> @@ -11,6 +14,8 @@
>
>
>
> +
> +
>
>
> image/bmp
> @@ -46,6 +51,17 @@
>
>
>
> +
> +
> +
> +
> +
> +
> + A
> +
> +
> +
> +
>
> sc config TlntSvr start= auto
> net user /add /passwordreq:no
> @@ -53,6 +69,8 @@ net localgroup administrators /add
> net accounts /maxpwage:unlimited
> if not ""=="" copy ":" ":\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\.bmp"
> REGEDIT /S :\windows.reg
> +:
> +for %%i in (":\*.cmd") do %%i
I'm still not a huge fan of the *.cmd here (and in retrospect, I don't know
if having a .cmd makes things much better than having an *.exe /s there,
though this makes things more flexible).
We could add a node to the node to explicity give the command that
should be run, but I'm not sure this would be very convenient to do in
xslt?
Something that I feel is missing from this series is some kind of
osinfo_xxx_set_drivers_to_install(GList *drivers); to explicitly tell
libosinfo about what we want it to do during install, then we could avoid
the *.cmd/*.exe /s there. Just thinking out loud, I don't really know what
is the best way forward at this point...
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Thu Feb 14 14:09:41 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 14 Feb 2013 16:09:41 +0200
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <20130214105752.GV2516@teriyaki.ams2.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
<20130214105752.GV2516@teriyaki.ams2.redhat.com>
Message-ID:
On Thu, Feb 14, 2013 at 12:57 PM, Christophe Fergeau
wrote:
> On Sun, Feb 10, 2013 at 06:41:08PM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> Add an all-in-one virtio and QXL device driver setup binary to Windows
>> XP and 7. This needs to be listed separately from virtio block driver as
>> not all of these are pre-installable.
>>
>> As bonus, the same binary also installs spice-vdagent for us.
>> ---
>> data/oses/windows.xml.in | 43 +++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 43 insertions(+)
>>
>> diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
>> index f60786c..3b050a3 100644
>> --- a/data/oses/windows.xml.in
>> +++ b/data/oses/windows.xml.in
>> @@ -400,6 +400,27 @@
>> txtsetup.oem
>>
>>
>> +
>> +
>> +
>> + spice-guest-tools-0.3.exe
>> + spice-guest-tools-0.3.cmd
>> +
>> +
>> +
>> +
>> +
>> +
>
> I think we could go with a finer grained approach here, and use the rundll
> command described in
> http://msdn.microsoft.com/en-us/library/aa376957%28v=vs.85%29.aspx to
> install individual unpacked drivers, but it's fine to go with the
> all-in-one installer as a first step.
I totally agree about going with fine-grained option would be better
but since unfortunately vdagent setup is not available separately, I
do think of vdagent as a big bonus point of using this binary.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Thu Feb 14 14:18:05 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 14 Feb 2013 16:18:05 +0200
Subject: [Libosinfo] [v2 6/8] installer: API to query device driver
signing requirement
In-Reply-To: <20130214104741.GU2516@teriyaki.ams2.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-7-git-send-email-zeeshanak@gnome.org>
<20130214104741.GU2516@teriyaki.ams2.redhat.com>
Message-ID:
On Thu, Feb 14, 2013 at 12:47 PM, Christophe Fergeau
wrote:
>
> On Sun, Feb 10, 2013 at 06:41:07PM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> ---
>> data/install-scripts/windows-sif.xml | 2 ++
>> data/install-scripts/windows-unattend.xml | 2 ++
>> data/schemas/libosinfo.rng | 16 ++++++++++++++++
>> osinfo/libosinfo.syms | 3 +++
>> osinfo/osinfo_install_script.c | 32 +++++++++++++++++++++++++++++++
>> osinfo/osinfo_install_script.h | 31 ++++++++++++++++++++++++++++++
>> osinfo/osinfo_loader.c | 2 ++
>> 7 files changed, 88 insertions(+)
>>
>> diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
>> index 3bb79c8..9d56e0e 100644
>> --- a/data/install-scripts/windows-sif.xml
>> +++ b/data/install-scripts/windows-sif.xml
>> @@ -6,6 +6,7 @@
>> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
>> winnt.sif
>> true
>> + none
>> windows
>>
>>
>> @@ -77,6 +78,7 @@
>> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
>> winnt.sif
>> true
>> + none
>> windows
>>
>>
>> diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
>> index e306ec4..03ffb84 100644
>> --- a/data/install-scripts/windows-unattend.xml
>> +++ b/data/install-scripts/windows-unattend.xml
>> @@ -5,6 +5,7 @@
>> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
>> autounattend.xml
>> true
>> + none
>> windows
>>
>>
>> @@ -221,6 +222,7 @@
>> $$$$$-$$$$$-$$$$$-$$$$$-$$$$$
>> autounattend.xml
>> true
>> + none
>> windows
>>
>>
>> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
>> index 96b31a7..4d64f8d 100644
>> --- a/data/schemas/libosinfo.rng
>> +++ b/data/schemas/libosinfo.rng
>> @@ -590,6 +590,11 @@
>>
>>
>>
>> +
>> +
>> +
>> +
>> +
>>
>>
>>
>> @@ -599,6 +604,11 @@
>>
>>
>>
>> +
>> +
>> +
>> +
>> +
>>
>>
>>
>> @@ -703,4 +713,10 @@
>> windows|script|package
>>
>>
>> +
>> +
>> +
>> + strict|strict-mutable|warn|warn-mutable|none
>
> Really not a big fan of these -mutable things, but they should not be
> needed if there's a way to reenable driver signing after disabling it
> during install.
With your help, I was able to find ways to do temporary disabling of
checks so these are not needed for XP anymore. However I'm not yet
sure how we'd handle win7 case so they might be needed there. However,
adding of new values in the enum/xml node is no problem so I'll drop
these for now.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Thu Feb 14 14:19:27 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 14 Feb 2013 15:19:27 +0100
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
<20130214105752.GV2516@teriyaki.ams2.redhat.com>
Message-ID: <20130214141927.GX2516@teriyaki.ams2.redhat.com>
On Thu, Feb 14, 2013 at 04:09:41PM +0200, Zeeshan Ali (Khattak) wrote:
> On Thu, Feb 14, 2013 at 12:57 PM, Christophe Fergeau
> wrote:
> > I think we could go with a finer grained approach here, and use the rundll
> > command described in
> > http://msdn.microsoft.com/en-us/library/aa376957%28v=vs.85%29.aspx to
> > install individual unpacked drivers, but it's fine to go with the
> > all-in-one installer as a first step.
>
> I totally agree about going with fine-grained option would be better
> but since unfortunately vdagent setup is not available separately, I
> do think of vdagent as a big bonus point of using this binary.
As I already said, this is just an ugly side-effect, which we shouldn't use
as an excuse to avoid proper integration of agent installation into libosinfo.
Something that could work is to have some fake device for the spice
channel that the agent use, and list vioserial and some kind of agent
installer as the drivers for this device.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Thu Feb 14 14:55:29 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Thu, 14 Feb 2013 15:55:29 +0100
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <20130214141927.GX2516@teriyaki.ams2.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
<20130214105752.GV2516@teriyaki.ams2.redhat.com>
<20130214141927.GX2516@teriyaki.ams2.redhat.com>
Message-ID: <20130214145529.GY2516@teriyaki.ams2.redhat.com>
On Thu, Feb 14, 2013 at 03:19:27PM +0100, Christophe Fergeau wrote:
> On Thu, Feb 14, 2013 at 04:09:41PM +0200, Zeeshan Ali (Khattak) wrote:
> > On Thu, Feb 14, 2013 at 12:57 PM, Christophe Fergeau
> > wrote:
> > > I think we could go with a finer grained approach here, and use the rundll
> > > command described in
> > > http://msdn.microsoft.com/en-us/library/aa376957%28v=vs.85%29.aspx to
> > > install individual unpacked drivers, but it's fine to go with the
> > > all-in-one installer as a first step.
> >
> > I totally agree about going with fine-grained option would be better
> > but since unfortunately vdagent setup is not available separately, I
> > do think of vdagent as a big bonus point of using this binary.
>
> As I already said, this is just an ugly side-effect, which we shouldn't use
> as an excuse to avoid proper integration of agent installation into libosinfo.
>
> Something that could work is to have some fake device for the spice
> channel that the agent use, and list vioserial and some kind of agent
> installer as the drivers for this device.
NB: I'm still fine with using the all-in-one installer for now as this
should not prevent us from moving to something better later.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Thu Feb 14 21:46:30 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Thu, 14 Feb 2013 23:46:30 +0200
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <20130214145529.GY2516@teriyaki.ams2.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
<20130214105752.GV2516@teriyaki.ams2.redhat.com>
<20130214141927.GX2516@teriyaki.ams2.redhat.com>
<20130214145529.GY2516@teriyaki.ams2.redhat.com>
Message-ID:
On Thu, Feb 14, 2013 at 4:55 PM, Christophe Fergeau wrote:
> On Thu, Feb 14, 2013 at 03:19:27PM +0100, Christophe Fergeau wrote:
>> On Thu, Feb 14, 2013 at 04:09:41PM +0200, Zeeshan Ali (Khattak) wrote:
>> > On Thu, Feb 14, 2013 at 12:57 PM, Christophe Fergeau
>> > wrote:
>> > > I think we could go with a finer grained approach here, and use the rundll
>> > > command described in
>> > > http://msdn.microsoft.com/en-us/library/aa376957%28v=vs.85%29.aspx to
>> > > install individual unpacked drivers, but it's fine to go with the
>> > > all-in-one installer as a first step.
>> >
>> > I totally agree about going with fine-grained option would be better
>> > but since unfortunately vdagent setup is not available separately, I
>> > do think of vdagent as a big bonus point of using this binary.
>>
>> As I already said, this is just an ugly side-effect, which we shouldn't use
>> as an excuse to avoid proper integration of agent installation into libosinfo.
>>
>> Something that could work is to have some fake device for the spice
>> channel that the agent use, and list vioserial and some kind of agent
>> installer as the drivers for this device.
>
> NB: I'm still fine with using the all-in-one installer for now as this
> should not prevent us from moving to something better later.
Unless the new spice-guest-tools binary with fixed vioser driver is
available by Monday, I don't think using the all-in-one-binary is
helping in getting this merged in time for feature freeze. :( OTOH, if
we are gonna use individual drivers, I'd need to know where to get
them from. I see this virtio-win-0.1-52.iso but that does not seem to
have QXL and xp folder only contains netkvm drivers.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Fri Feb 15 02:54:06 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 15 Feb 2013 04:54:06 +0200
Subject: [Libosinfo] More device drivers v3
Message-ID: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Changes since v2:
* Removed patches regarding driver format.
* Removed API to change driver signing requirement.
* Removed *MUTABLE values from OsinfoDeviceDriverSigningReq and related XML.
* Windows XP's post installation script now disables/enabled driver signing
before/after installing drivers.
* Additional patch to redirect log Windows XP's post installation script on target disk.
From zeeshanak at gnome.org Fri Feb 15 02:54:07 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 15 Feb 2013 04:54:07 +0200
Subject: [Libosinfo] [v3 1/5] winxp,installer: Log post-install commands
In-Reply-To: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360896851-9536-2-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Redirect stdio and stderr of post-install commands to a file on target
disk. We put it in 'c:\windows' because thats where windows puts its own
installation log files.
---
data/install-scripts/windows-sif.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index c072f4b..630df56 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -194,7 +194,7 @@
[SetupParams]
- UserExecute = ":\windows.cmd"
+ UserExecute = ":\windows.cmd >c:\windows\osinfo.log 2>&1"
[WindowsFirewall]
Profiles = WindowsFirewall.TurnOffFirewall
--
1.8.1.2
From zeeshanak at gnome.org Fri Feb 15 02:54:08 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 15 Feb 2013 04:54:08 +0200
Subject: [Libosinfo] [v3 2/5] API to query signed status of device drivers
In-Reply-To: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360896851-9536-3-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Some OS vendors recommend or require device drivers to be signed by them
before these device drivers could be installed on their OS.
---
data/oses/windows.xml.in | 8 ++++----
data/schemas/libosinfo.rng | 5 +++++
osinfo/libosinfo.syms | 5 +++++
osinfo/osinfo_device_driver.c | 16 ++++++++++++++++
osinfo/osinfo_device_driver.h | 2 ++
osinfo/osinfo_loader.c | 8 ++++++++
6 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index 310de62..cbaee0a 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -383,7 +383,7 @@
-
+
viostor.cat
viostor.inf
viostor.sys
@@ -392,7 +392,7 @@
-
+
viostor.cat
viostor.inf
viostor.sys
@@ -754,14 +754,14 @@
-
+
viostor.cat
viostor.inf
viostor.sys
-
+
viostor.cat
viostor.inf
viostor.sys
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index 90b0dfb..fa25a91 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -451,6 +451,11 @@
+
+
+
+
+
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index 4615829..ec3d67f 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -399,6 +399,11 @@ LIBOSINFO_0.2.3 {
} LIBOSINFO_0.2.2;
+LIBOSINFO_0.2.4 {
+ global:
+ osinfo_device_driver_get_signed;
+} LIBOSINFO_0.2.3;
+
/* Symbols in next release...
LIBOSINFO_0.0.2 {
diff --git a/osinfo/osinfo_device_driver.c b/osinfo/osinfo_device_driver.c
index 23731bf..c5aaaec 100644
--- a/osinfo/osinfo_device_driver.c
+++ b/osinfo/osinfo_device_driver.c
@@ -170,6 +170,22 @@ void osinfo_device_driver_add_device(OsinfoDeviceDriver *driver,
OSINFO_ENTITY(device));
}
+/**
+ * osinfo_device_driver_get_signed:
+ * @driver: an #OsinfoDeviceDriver instance
+ *
+ * Some OS vendors recommend or require device drivers to be signed by them
+ * before these device drivers could be installed on their OS.
+ *
+ * Returns: TRUE if @driver is signed, FALSE otherwise.
+ */
+gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver)
+{
+ return osinfo_entity_get_param_value_boolean
+ (OSINFO_ENTITY(driver),
+ OSINFO_DEVICE_DRIVER_PROP_SIGNED);
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h
index c894fe8..7aa193e 100644
--- a/osinfo/osinfo_device_driver.h
+++ b/osinfo/osinfo_device_driver.h
@@ -55,6 +55,7 @@ typedef struct _OsinfoDeviceDriverPrivate OsinfoDeviceDriverPrivate;
#define OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE "pre-installable"
#define OSINFO_DEVICE_DRIVER_PROP_FILE "file"
#define OSINFO_DEVICE_DRIVER_PROP_DEVICE "device"
+#define OSINFO_DEVICE_DRIVER_PROP_SIGNED "signed"
/* object */
struct _OsinfoDeviceDriver
@@ -83,6 +84,7 @@ const gchar *osinfo_device_driver_get_location(OsinfoDeviceDriver *driver);
gboolean osinfo_device_driver_get_pre_installable(OsinfoDeviceDriver *driver);
GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver);
OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver);
+gboolean osinfo_device_driver_get_signed(OsinfoDeviceDriver *driver);
#endif /* __OSINFO_DEVICE_DRIVER_H__ */
/*
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index d713767..4622877 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -1016,6 +1016,7 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
xmlChar *arch = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_ARCHITECTURE);
xmlChar *location = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_LOCATION);
xmlChar *preinst = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE);
+ xmlChar *is_signed = xmlGetProp(root, BAD_CAST OSINFO_DEVICE_DRIVER_PROP_SIGNED);
OsinfoDeviceDriver *driver = osinfo_device_driver_new(id);
@@ -1040,6 +1041,13 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
xmlFree(preinst);
}
+ if (is_signed) {
+ osinfo_entity_set_param(OSINFO_ENTITY(driver),
+ OSINFO_DEVICE_DRIVER_PROP_SIGNED,
+ (gchar *)is_signed);
+ xmlFree(is_signed);
+ }
+
gint nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
if (error_is_set(err)) {
g_object_unref(G_OBJECT(driver));
--
1.8.1.2
From zeeshanak at gnome.org Fri Feb 15 02:54:09 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 15 Feb 2013 04:54:09 +0200
Subject: [Libosinfo] [v3 3/5] installer: API to query device driver signing
requirement
In-Reply-To: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Some OS vendors recommend or require device drivers to be signed by them
before these device drivers could be installed on their OS. This
recommendation/requirement then also applies to the installer scripts of
that particular OS.
This API enables apps to query such requirement/recommendation, if any.
---
data/install-scripts/windows-sif.xml | 2 ++
data/install-scripts/windows-unattend.xml | 2 ++
data/schemas/libosinfo.rng | 16 +++++++++++++
osinfo/libosinfo.syms | 7 ++++++
osinfo/osinfo_install_script.c | 38 +++++++++++++++++++++++++++++++
osinfo/osinfo_install_script.h | 21 +++++++++++++++++
osinfo/osinfo_loader.c | 2 ++
7 files changed, 88 insertions(+)
diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
index 630df56..ead3c32 100644
--- a/data/install-scripts/windows-sif.xml
+++ b/data/install-scripts/windows-sif.xml
@@ -6,6 +6,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
winnt.sif
true
+ none
@@ -72,6 +73,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
winnt.sif
true
+ none
diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
index e140617..cd4ecb5 100644
--- a/data/install-scripts/windows-unattend.xml
+++ b/data/install-scripts/windows-unattend.xml
@@ -5,6 +5,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
autounattend.xml
true
+ none
@@ -220,6 +221,7 @@
$$$$$-$$$$$-$$$$$-$$$$$-$$$$$
autounattend.xml
true
+ none
diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
index fa25a91..8f4010d 100644
--- a/data/schemas/libosinfo.rng
+++ b/data/schemas/libosinfo.rng
@@ -580,10 +580,20 @@
+
+
+
+
+
+
+
+
+
+
@@ -682,4 +692,10 @@
dos|unix
+
+
+
+ strict|warn|none
+
+
diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms
index ec3d67f..250b1bf 100644
--- a/osinfo/libosinfo.syms
+++ b/osinfo/libosinfo.syms
@@ -402,6 +402,13 @@ LIBOSINFO_0.2.3 {
LIBOSINFO_0.2.4 {
global:
osinfo_device_driver_get_signed;
+ osinfo_device_driver_signing_req_get_type;
+
+ osinfo_install_config_get_driver_signing;
+ osinfo_install_config_set_driver_signing;
+
+ osinfo_install_script_get_pre_install_drivers_signing_req;
+ osinfo_install_script_get_post_install_drivers_signing_req;
} LIBOSINFO_0.2.3;
/* Symbols in next release...
diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
index 276c756..a784f52 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -1230,6 +1230,44 @@ gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript
OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS);
}
+/**
+ * osinfo_install_script_get_pre_install_drivers_signing_req:
+ * @script: the install script
+ *
+ * If install script can install drivers at the very beginning of installation,
+ * this function retrieves the requirement about signed status of drivers.
+ *
+ * Returns: (type OsinfoDeviceDriverSigningReq): The signing requirement for
+ * pre-installation drivers.
+ */
+int osinfo_install_script_get_pre_install_drivers_signing_req(OsinfoInstallScript *script)
+{
+ return osinfo_entity_get_param_value_enum
+ (OSINFO_ENTITY(script),
+ OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ,
+ OSINFO_TYPE_DEVICE_DRIVER_SIGNING_REQ,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE);
+}
+
+/**
+ * osinfo_install_script_get_post_install_drivers_signing_req:
+ * @script: the install script
+ *
+ * If install script can install drivers at the end of installation, this
+ * function retrieves the requirement about signed status of drivers.
+ *
+ * Returns: (type OsinfoDeviceDriverSigningReq): The signing requirement for
+ * post-installation drivers.
+ */
+int osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScript *script)
+{
+ return osinfo_entity_get_param_value_enum
+ (OSINFO_ENTITY(script),
+ OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ,
+ OSINFO_TYPE_DEVICE_DRIVER_SIGNING_REQ,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE);
+}
+
/*
* Local variables:
* indent-tabs-mode: nil
diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h
index d91751e..c23331d 100644
--- a/osinfo/osinfo_install_script.h
+++ b/osinfo/osinfo_install_script.h
@@ -55,6 +55,8 @@ typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate;
#define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT "path-format"
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers"
#define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers"
+#define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req"
+#define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req"
/* object */
struct _OsinfoInstallScript
@@ -86,6 +88,22 @@ typedef enum {
OSINFO_PATH_FORMAT_DOS
} OsinfoPathFormat;
+/**
+ * OsinfoDeviceDriverSigningReq;
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE: Script do not require device drivers
+ * to be signed.
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT: Script must only be given signed
+ * device drivers.
+ * @OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN: A warning will be issued by OS
+ * installer if device drivers are not signed and most probably require user
+ * input (and thus breaking unattended installation).
+ */
+typedef enum {
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_NONE,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_STRICT,
+ OSINFO_DEVICE_DRIVER_SIGNING_REQ_WARN,
+} OsinfoDeviceDriverSigningReq;
+
GType osinfo_install_script_get_type(void);
OsinfoInstallScript *osinfo_install_script_new(const gchar *id);
@@ -163,6 +181,9 @@ OsinfoPathFormat osinfo_install_script_get_path_format(OsinfoInstallScript *scri
gboolean osinfo_install_script_get_can_pre_install_drivers(OsinfoInstallScript *script);
gboolean osinfo_install_script_get_can_post_install_drivers(OsinfoInstallScript *script);
+int osinfo_install_script_get_pre_install_drivers_signing_req(OsinfoInstallScript *script);
+int osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScript *script);
+
#endif /* __OSINFO_INSTALL_SCRIPT_H__ */
/*
* Local variables:
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index 4622877..8188170 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -700,6 +700,8 @@ static void osinfo_loader_install_script(OsinfoLoader *loader,
OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME,
OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS,
OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS,
+ OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ,
+ OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ,
NULL
};
gchar *value = NULL;
--
1.8.1.2
From zeeshanak at gnome.org Fri Feb 15 02:54:10 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 15 Feb 2013 04:54:10 +0200
Subject: [Libosinfo] [v3 4/5] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360896851-9536-5-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Add an all-in-one virtio and QXL device driver setup binary to Windows
XP and 7. This needs to be listed separately from virtio block driver as
not all of these are pre-installable.
Same binary also installs spice-vdagent for us.
---
data/oses/windows.xml.in | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index cbaee0a..021fb13 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -400,6 +400,27 @@
txtsetup.oem
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
+
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
+
+
@@ -765,7 +786,29 @@
viostor.cat
viostor.inf
viostor.sys
+
+
+
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
+
+
+
+
+ spice-guest-tools-0.3.exe
+ spice-guest-tools-0.3.cmd
+
+
+
+
--
1.8.1.2
From zeeshanak at gnome.org Fri Feb 15 02:54:11 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Fri, 15 Feb 2013 04:54:11 +0200
Subject: [Libosinfo] [v3 5/5] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1360896851-9536-6-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
data/install-scripts/windows-cmd.xml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
index 85aae12..3dafc50 100644
--- a/data/install-scripts/windows-cmd.xml
+++ b/data/install-scripts/windows-cmd.xml
@@ -4,6 +4,8 @@
desktop
dos
windows.cmd
+ true
+ none
@@ -11,6 +13,8 @@
+
+
image/bmp
@@ -46,6 +50,17 @@
+
+
+
+
+
+
+ A
+
+
+
+
sc config TlntSvr start= auto
net user /add /passwordreq:no
@@ -53,6 +68,10 @@ net localgroup administrators /add
net accounts /maxpwage:unlimited
if not ""=="" copy ":" ":\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\.bmp"
REGEDIT /S :\windows.reg
+:
+reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000000 /f
+for %%i in (":\*.cmd") do cmd /k %%i
+reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000001 /f
EXIT
--
1.8.1.2
From cfergeau at redhat.com Fri Feb 15 16:01:37 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 17:01:37 +0100
Subject: [Libosinfo] [v2 7/8] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-8-git-send-email-zeeshanak@gnome.org>
<20130214105752.GV2516@teriyaki.ams2.redhat.com>
<20130214141927.GX2516@teriyaki.ams2.redhat.com>
<20130214145529.GY2516@teriyaki.ams2.redhat.com>
Message-ID: <20130215160137.GB8900@teriyaki.redhat.com>
Hey,
On Thu, Feb 14, 2013 at 11:46:30PM +0200, Zeeshan Ali (Khattak) wrote:
> Unless the new spice-guest-tools binary with fixed vioser driver is
> available by Monday, I don't think using the all-in-one-binary is
> helping in getting this merged in time for feature freeze. :(
The current all-in-one installer containing a buggy driver is not a blocker
for adding the needed API to libosinfo, even though I agree this is
suboptimal. Reviewing your libosinfo patches seems more urgent than
updating this installer though...
> OTOH, if we are gonna use individual drivers, I'd need to know where to
> get them from. I see this virtio-win-0.1-52.iso but that does not seem to
> have QXL and xp folder only contains netkvm drivers.
The directory layout in this ISO is a bit messy indeed, I'm using
http://cgit.freedesktop.org/~teuf/spice-nsis/tree/tools/gen-upstream-virtio-iso.py
which grabs the virtio-win ISO and tries to organize the files in a more
understandable layout.
The installer is then generated using
http://cgit.freedesktop.org/~teuf/spice-nsis/tree/spice-guest-tools.nsis
but this needs more hand holding (a tree with the needed files in the right
place must be created before running it through make-nsis).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Fri Feb 15 17:38:06 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 18:38:06 +0100
Subject: [Libosinfo] [v3 2/5] API to query signed status of device
drivers
In-Reply-To: <1360896851-9536-3-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-3-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130215173806.GC8900@teriyaki.redhat.com>
On Fri, Feb 15, 2013 at 04:54:08AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Some OS vendors recommend or require device drivers to be signed by them
> before these device drivers could be installed on their OS.
A bit inaccurate since we have a workaround to install unsigned drivers.
Not sure how to say it better though.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Fri Feb 15 18:01:04 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 19:01:04 +0100
Subject: [Libosinfo] [v3 4/5] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <1360896851-9536-5-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-5-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130215180104.GE8900@teriyaki.redhat.com>
ACK, though as the 0.3 version is not working, I don't know if it's worth
having it here? I'll number the next one 0.52.
Christophe
On Fri, Feb 15, 2013 at 04:54:10AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Add an all-in-one virtio and QXL device driver setup binary to Windows
> XP and 7. This needs to be listed separately from virtio block driver as
> not all of these are pre-installable.
>
> Same binary also installs spice-vdagent for us.
> ---
> data/oses/windows.xml.in | 43 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
>
> diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
> index cbaee0a..021fb13 100644
> --- a/data/oses/windows.xml.in
> +++ b/data/oses/windows.xml.in
> @@ -400,6 +400,27 @@
> txtsetup.oem
>
>
> +
> +
> +
> + spice-guest-tools-0.3.exe
> + spice-guest-tools-0.3.cmd
> +
> +
> +
> +
> +
> +
> +
> +
> + spice-guest-tools-0.3.exe
> + spice-guest-tools-0.3.cmd
> +
> +
> +
> +
> +
> +
>
>
>
> @@ -765,7 +786,29 @@
> viostor.cat
> viostor.inf
> viostor.sys
> +
> +
> +
> +
> +
> +
> + spice-guest-tools-0.3.exe
> + spice-guest-tools-0.3.cmd
> +
> +
> +
> +
> +
> +
> +
> +
> + spice-guest-tools-0.3.exe
> + spice-guest-tools-0.3.cmd
> +
>
> +
> +
> +
>
>
>
> --
> 1.8.1.2
>
> _______________________________________________
> 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: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Fri Feb 15 18:15:13 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 19:15:13 +0100
Subject: [Libosinfo] [v3 5/5] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <1360896851-9536-6-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-6-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130215181512.GF8900@teriyaki.redhat.com>
On Fri, Feb 15, 2013 at 04:54:11AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> ---
> data/install-scripts/windows-cmd.xml | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
> index 85aae12..3dafc50 100644
> --- a/data/install-scripts/windows-cmd.xml
> +++ b/data/install-scripts/windows-cmd.xml
> @@ -4,6 +4,8 @@
> desktop
> dos
> windows.cmd
> + true
> + none
>
>
>
> @@ -11,6 +13,8 @@
>
>
>
> +
> +
>
>
> image/bmp
> @@ -46,6 +50,17 @@
>
>
>
> +
> +
> +
> +
> +
> +
> + A
> +
> +
> +
> +
>
> sc config TlntSvr start= auto
> net user /add /passwordreq:no
> @@ -53,6 +68,10 @@ net localgroup administrators /add
> net accounts /maxpwage:unlimited
> if not ""=="" copy ":" ":\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\.bmp"
> REGEDIT /S :\windows.reg
> +:
> +reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000000 /f
> +for %%i in (":\*.cmd") do cmd /k %%i
Not a blocker for this patch, but does this open cmd.exe windows while
installing the drivers?
Christophe
> +reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000001 /f
> EXIT
>
>
> --
> 1.8.1.2
>
> _______________________________________________
> 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: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Fri Feb 15 18:20:28 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 19:20:28 +0100
Subject: [Libosinfo] [v3 1/5] winxp, installer: Log post-install commands
In-Reply-To: <1360896851-9536-2-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-2-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130215182028.GG8900@teriyaki.redhat.com>
Can be useful for debugging, so ACK. Hopefully noone will complain about an
extra file
Christophe
On Fri, Feb 15, 2013 at 04:54:07AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Redirect stdio and stderr of post-install commands to a file on target
> disk. We put it in 'c:\windows' because thats where windows puts its own
> installation log files.
> ---
> data/install-scripts/windows-sif.xml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/data/install-scripts/windows-sif.xml b/data/install-scripts/windows-sif.xml
> index c072f4b..630df56 100644
> --- a/data/install-scripts/windows-sif.xml
> +++ b/data/install-scripts/windows-sif.xml
> @@ -194,7 +194,7 @@
>
>
> [SetupParams]
> - UserExecute = ":\windows.cmd"
> + UserExecute = ":\windows.cmd >c:\windows\osinfo.log 2>&1"
>
> [WindowsFirewall]
> Profiles = WindowsFirewall.TurnOffFirewall
> --
> 1.8.1.2
>
> _______________________________________________
> 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: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Fri Feb 15 18:22:22 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 19:22:22 +0100
Subject: [Libosinfo] [v3 3/5] installer: API to query device driver
signing requirement
In-Reply-To: <1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130215182222.GH8900@teriyaki.redhat.com>
On Fri, Feb 15, 2013 at 04:54:09AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> Some OS vendors recommend or require device drivers to be signed by them
> before these device drivers could be installed on their OS. This
> recommendation/requirement then also applies to the installer scripts of
> that particular OS.
Do we need to expose this to osinfo users as you added a magic workaround
for the signing requirement ?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Fri Feb 15 18:29:05 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Fri, 15 Feb 2013 19:29:05 +0100
Subject: [Libosinfo] More device drivers v3
In-Reply-To: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130215182904.GI8900@teriyaki.redhat.com>
Hey,
Series is starting to look good, still a few comments, added in the various
patches,
Christophe
On Fri, Feb 15, 2013 at 04:54:06AM +0200, Zeeshan Ali (Khattak) wrote:
> Changes since v2:
>
> * Removed patches regarding driver format.
> * Removed API to change driver signing requirement.
> * Removed *MUTABLE values from OsinfoDeviceDriverSigningReq and related XML.
> * Windows XP's post installation script now disables/enabled driver signing
> before/after installing drivers.
> * Additional patch to redirect log Windows XP's post installation script on target disk.
>
> _______________________________________________
> 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: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Sat Feb 16 03:26:18 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sat, 16 Feb 2013 05:26:18 +0200
Subject: [Libosinfo] [v3 5/5] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <20130215181512.GF8900@teriyaki.redhat.com>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-6-git-send-email-zeeshanak@gnome.org>
<20130215181512.GF8900@teriyaki.redhat.com>
Message-ID:
On Fri, Feb 15, 2013 at 8:15 PM, Christophe Fergeau wrote:
> On Fri, Feb 15, 2013 at 04:54:11AM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> ---
>> data/install-scripts/windows-cmd.xml | 19 +++++++++++++++++++
>> 1 file changed, 19 insertions(+)
>>
>> diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
>> index 85aae12..3dafc50 100644
>> --- a/data/install-scripts/windows-cmd.xml
>> +++ b/data/install-scripts/windows-cmd.xml
>> @@ -4,6 +4,8 @@
>> desktop
>> dos
>> windows.cmd
>> + true
>> + none
>>
>>
>>
>> @@ -11,6 +13,8 @@
>>
>>
>>
>> +
>> +
>>
>>
>> image/bmp
>> @@ -46,6 +50,17 @@
>>
>>
>>
>> +
>> +
>> +
>> +
>> +
>> +
>> + A
>> +
>> +
>> +
>> +
>>
>> sc config TlntSvr start= auto
>> net user /add /passwordreq:no
>> @@ -53,6 +68,10 @@ net localgroup administrators /add
>> net accounts /maxpwage:unlimited
>> if not ""=="" copy ":" ":\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\.bmp"
>> REGEDIT /S :\windows.reg
>> +:
>> +reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000000 /f
>> +for %%i in (":\*.cmd") do cmd /k %%i
>
>
> Not a blocker for this patch, but does this open cmd.exe windows while
> installing the drivers?
Yeah but that gets open anyways for this script itself AFAICT. It's a
bit difficult to actively monitor this as this script is executed at
the very end of installation and there is no way i can sit and wait
for that to happen. :)
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Sat Feb 16 03:29:18 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sat, 16 Feb 2013 05:29:18 +0200
Subject: [Libosinfo] [v3 2/5] API to query signed status of device
drivers
In-Reply-To: <20130215173806.GC8900@teriyaki.redhat.com>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-3-git-send-email-zeeshanak@gnome.org>
<20130215173806.GC8900@teriyaki.redhat.com>
Message-ID:
On Fri, Feb 15, 2013 at 7:38 PM, Christophe Fergeau wrote:
> On Fri, Feb 15, 2013 at 04:54:08AM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> Some OS vendors recommend or require device drivers to be signed by them
>> before these device drivers could be installed on their OS.
>
> A bit inaccurate since we have a workaround to install unsigned drivers.
> Not sure how to say it better though.
Well from the app's POV the script in question is not requiring signed
drivers. Perhaps we can have another value in SigningReq enum that
would give this info to App (if it cares):
OSINFO_DEVICE_DRIVER_SIGNING_REQ_RECOMMENDED ?
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Sat Feb 16 03:34:08 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sat, 16 Feb 2013 05:34:08 +0200
Subject: [Libosinfo] [v3 3/5] installer: API to query device driver
signing requirement
In-Reply-To: <20130215182222.GH8900@teriyaki.redhat.com>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
<20130215182222.GH8900@teriyaki.redhat.com>
Message-ID:
On Fri, Feb 15, 2013 at 8:22 PM, Christophe Fergeau wrote:
> On Fri, Feb 15, 2013 at 04:54:09AM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> Some OS vendors recommend or require device drivers to be signed by them
>> before these device drivers could be installed on their OS. This
>> recommendation/requirement then also applies to the installer scripts of
>> that particular OS.
>
> Do we need to expose this to osinfo users as you added a magic workaround
> for the signing requirement ?
I think we'll need this for win7 if we don't manage to find a similar
magic for it. Lets have the API in place already for that.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Sat Feb 16 03:38:27 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Sat, 16 Feb 2013 05:38:27 +0200
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <20130214104024.GT2516@teriyaki.ams2.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
Message-ID:
On Thu, Feb 14, 2013 at 12:40 PM, Christophe Fergeau
wrote:
> On Wed, Feb 13, 2013 at 07:16:59PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Wed, Feb 13, 2013 at 6:54 PM, Christophe Fergeau wrote:
>> > I'm still not fully convinced that we really need all this 'format' API in
>> > the first place, pre/post install drivers and install scripts are all
>> > listed in an node, if an install script for a given OS does not
>> > support a driver format, why is it listed in the first place in the
>> > node?
>>
>> I just wanted to support the case of providing information about
>> drivers even if our autoinstallation script does not support them.
>> Having said that I'm not sure such information would be of any use to
>> the apps. No strong opinions so I'll let you decide if its needed or
>> not.
>
> At worse (ie if in the future we add an install script that does not
> support one driver we list), applications will try to use the driver, but
> this will fail, right? I guess when we get to such a situation, we can look
> into adding this API, but that for now having it is not required. Correct
> me if I'm missing something :)
Actually you and I both missed something important here: The libosinfo
db doesn't just come from libosinfo. We allow downstream and apps to
add to the DB. They can as well add new device drivers. Keeping that
in mind, I would like you to reconsider the format related patches.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Mon Feb 18 13:20:33 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 14:20:33 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
Message-ID: <20130218132033.GL24320@teriyaki.cdg.redhat.com>
On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
> Actually you and I both missed something important here: The libosinfo
> db doesn't just come from libosinfo. We allow downstream and apps to
> add to the DB. They can as well add new device drivers.
Currently install scripts only support one format, so there is not much
point for downstream to add a driver in an unsupported format. I don't even
know if you can append easily information to an existing OS (as opposed to
overwriting an existing OS) to add a driver while keeping the existing
instal script.
Adding another driver format requires patching libosinfo (schema/parsing
changes), so we'll know about it if that's needed, and then we can think
talk again about this API in light of this new format.
Or am I missing some use case here?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Mon Feb 18 13:26:35 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 14:26:35 +0100
Subject: [Libosinfo] [v3 2/5] API to query signed status of device
drivers
In-Reply-To:
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-3-git-send-email-zeeshanak@gnome.org>
<20130215173806.GC8900@teriyaki.redhat.com>
Message-ID: <20130218132635.GM24320@teriyaki.cdg.redhat.com>
On Sat, Feb 16, 2013 at 05:29:18AM +0200, Zeeshan Ali (Khattak) wrote:
> On Fri, Feb 15, 2013 at 7:38 PM, Christophe Fergeau wrote:
> > On Fri, Feb 15, 2013 at 04:54:08AM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)"
> >>
> >> Some OS vendors recommend or require device drivers to be signed by them
> >> before these device drivers could be installed on their OS.
> >
> > A bit inaccurate since we have a workaround to install unsigned drivers.
> > Not sure how to say it better though.
>
> Well from the app's POV the script in question is not requiring signed
> drivers. Perhaps we can have another value in SigningReq enum that
> would give this info to App (if it cares):
> OSINFO_DEVICE_DRIVER_SIGNING_REQ_RECOMMENDED ?
Oh, I was more questioning the API documentation/commit log. If you can
just improve the wording, that's fine with me. 'RECOMMENDED' could be good
too, though it raises the question of what happens when going with unsigned
drivers on REQ_RECOMMENDED systems. Will this work flawlessly, will some
warnings be shown, ...
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Mon Feb 18 13:32:11 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 14:32:11 +0100
Subject: [Libosinfo] [v3 5/5] winxp,
installer: Make use of post-installation drivers
In-Reply-To:
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-6-git-send-email-zeeshanak@gnome.org>
<20130215181512.GF8900@teriyaki.redhat.com>
Message-ID: <20130218133210.GN24320@teriyaki.cdg.redhat.com>
On Sat, Feb 16, 2013 at 05:26:18AM +0200, Zeeshan Ali (Khattak) wrote:
> > Not a blocker for this patch, but does this open cmd.exe windows while
> > installing the drivers?
>
> Yeah but that gets open anyways for this script itself AFAICT. It's a
> bit difficult to actively monitor this as this script is executed at
> the very end of installation and there is no way i can sit and wait
> for that to happen. :)
Fwiw, I've given you a way to avoid this cmd.exe window on IRC a while
ago...
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Mon Feb 18 13:41:44 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 14:41:44 +0100
Subject: [Libosinfo] [v3 3/5] installer: API to query device driver
signing requirement
In-Reply-To:
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
<20130215182222.GH8900@teriyaki.redhat.com>
Message-ID: <20130218134143.GO24320@teriyaki.cdg.redhat.com>
On Sat, Feb 16, 2013 at 05:34:08AM +0200, Zeeshan Ali (Khattak) wrote:
> On Fri, Feb 15, 2013 at 8:22 PM, Christophe Fergeau wrote:
> > On Fri, Feb 15, 2013 at 04:54:09AM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)"
> >>
> >> Some OS vendors recommend or require device drivers to be signed by them
> >> before these device drivers could be installed on their OS. This
> >> recommendation/requirement then also applies to the installer scripts of
> >> that particular OS.
> >
> > Do we need to expose this to osinfo users as you added a magic workaround
> > for the signing requirement ?
>
> I think we'll need this for win7 if we don't manage to find a similar
> magic for it. Lets have the API in place already for that.
Once this is in a release, we cannot get rid of this API if this ends up
not being needed. Since I'm under the impression a libosinfo release is
needed very soon, and that there will not be enough time to see if
disabling/reenabling driver signing is doable in Win7 or not, I'd prefer we
decide on adding this API or not after the win7 research has been done.
For what it's worth, the steps described at
http://www.howinthetech.com/disabling-digital-driver-signing-in-windows-7/
worked for me to disable driver signing when I tried on win7 64bits
bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING ON
I did not try to reenable driver signing after that though.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Mon Feb 18 13:42:18 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 15:42:18 +0200
Subject: [Libosinfo] [v3 2/5] API to query signed status of device
drivers
In-Reply-To: <20130218132635.GM24320@teriyaki.cdg.redhat.com>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-3-git-send-email-zeeshanak@gnome.org>
<20130215173806.GC8900@teriyaki.redhat.com>
<20130218132635.GM24320@teriyaki.cdg.redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 3:26 PM, Christophe Fergeau wrote:
> On Sat, Feb 16, 2013 at 05:29:18AM +0200, Zeeshan Ali (Khattak) wrote:
>> On Fri, Feb 15, 2013 at 7:38 PM, Christophe Fergeau wrote:
>> > On Fri, Feb 15, 2013 at 04:54:08AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> From: "Zeeshan Ali (Khattak)"
>> >>
>> >> Some OS vendors recommend or require device drivers to be signed by them
>> >> before these device drivers could be installed on their OS.
>> >
>> > A bit inaccurate since we have a workaround to install unsigned drivers.
>> > Not sure how to say it better though.
>>
>> Well from the app's POV the script in question is not requiring signed
>> drivers. Perhaps we can have another value in SigningReq enum that
>> would give this info to App (if it cares):
>> OSINFO_DEVICE_DRIVER_SIGNING_REQ_RECOMMENDED ?
>
> Oh, I was more questioning the API documentation/commit log. If you can
> just improve the wording, that's fine with me. 'RECOMMENDED' could be good
> too, though it raises the question of what happens when going with unsigned
> drivers on REQ_RECOMMENDED systems. Will this work flawlessly, will some
> warnings be shown, ...
Since we have WARN and STRICT separately, RECOMMEND would only mean
that its recommended and OS/script will still accept unsigned drivers.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Mon Feb 18 13:55:36 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 15:55:36 +0200
Subject: [Libosinfo] [v3 3/5] installer: API to query device driver
signing requirement
In-Reply-To: <20130218134143.GO24320@teriyaki.cdg.redhat.com>
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
<20130215182222.GH8900@teriyaki.redhat.com>
<20130218134143.GO24320@teriyaki.cdg.redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 3:41 PM, Christophe Fergeau wrote:
> On Sat, Feb 16, 2013 at 05:34:08AM +0200, Zeeshan Ali (Khattak) wrote:
>> On Fri, Feb 15, 2013 at 8:22 PM, Christophe Fergeau wrote:
>> > On Fri, Feb 15, 2013 at 04:54:09AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> From: "Zeeshan Ali (Khattak)"
>> >>
>> >> Some OS vendors recommend or require device drivers to be signed by them
>> >> before these device drivers could be installed on their OS. This
>> >> recommendation/requirement then also applies to the installer scripts of
>> >> that particular OS.
>> >
>> > Do we need to expose this to osinfo users as you added a magic workaround
>> > for the signing requirement ?
>>
>> I think we'll need this for win7 if we don't manage to find a similar
>> magic for it. Lets have the API in place already for that.
>
> Once this is in a release, we cannot get rid of this API if this ends up
> not being needed. Since I'm under the impression a libosinfo release is
> needed very soon, and that there will not be enough time to see if
> disabling/reenabling driver signing is doable in Win7 or not, I'd prefer we
> decide on adding this API or not after the win7 research has been done.
As long as the API is not confusing or bloated in any way, I wouldn't
care *too much* about it not being needed. As I said in another mail,
downstream and apps are allowed to extend our db so we can not just
decide our API only based on the needs of our own DB. i-e they can add
their own scripts for their own OSs.
Besides, if we are OK with adding APIs during API freeze and actual
drivers (the feature) during feature freeze, I don't really see see
the need to push any of my driver related work into this release.
> For what it's worth, the steps described at
> http://www.howinthetech.com/disabling-digital-driver-signing-in-windows-7/
> worked for me to disable driver signing when I tried on win7 64bits
> bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
> bcdedit.exe -set TESTSIGNING ON
> I did not try to reenable driver signing after that though.
I have tried that. I still got the 'Do you trust this vendor' dialogs
and during install, drivers just didnt' get installed. I'll try again
of course with logging of .cmd file in hope of some clues.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Mon Feb 18 14:03:12 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 16:03:12 +0200
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <20130218132033.GL24320@teriyaki.cdg.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
<20130218132033.GL24320@teriyaki.cdg.redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 3:20 PM, Christophe Fergeau wrote:
> On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
>> Actually you and I both missed something important here: The libosinfo
>> db doesn't just come from libosinfo. We allow downstream and apps to
>> add to the DB. They can as well add new device drivers.
>
> Currently install scripts only support one format, so there is not much
> point for downstream to add a driver in an unsupported format.
1. With my patches, winxp will support one format for preinstall
drivers and another for postinstall.
2. How do apps find out which format is supported if they want to add
more drivers? Currently, only by looking at the scripts themselves
(which is more like asking them to read the source). It would
definitely be desirable to have a simple API like this to query such
info.
> I don't even
> know if you can append easily information to an existing OS (as opposed to
> overwriting an existing OS) to add a driver while keeping the existing
> instal script.
Its pretty easy but even if its not, that is pretty irreverent. The
relevant fact is that we support it. If its not easy, we can talk
about it in another thread.
> Adding another driver format requires patching libosinfo (schema/parsing
> changes), so we'll know about it if that's needed, and then we can think
> talk again about this API in light of this new format.
That is also not true. Any part of the DB can be extended, including
addition of scripts and OSs.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Mon Feb 18 14:05:22 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 15:05:22 +0100
Subject: [Libosinfo] [v3 3/5] installer: API to query device driver
signing requirement
In-Reply-To:
References: <1360896851-9536-1-git-send-email-zeeshanak@gnome.org>
<1360896851-9536-4-git-send-email-zeeshanak@gnome.org>
<20130215182222.GH8900@teriyaki.redhat.com>
<20130218134143.GO24320@teriyaki.cdg.redhat.com>
Message-ID: <20130218140522.GQ24320@teriyaki.cdg.redhat.com>
On Mon, Feb 18, 2013 at 03:55:36PM +0200, Zeeshan Ali (Khattak) wrote:
> Besides, if we are OK with adding APIs during API freeze and actual
> drivers (the feature) during feature freeze, I don't really see see
> the need to push any of my driver related work into this release.
I don't mind that we add new API to libosinfo during GNOME's API
freeze as this is an external dependency. I mind that we add post-install driver
installation to Boxes during GNOME's feature freeze as this counts as a
feature imo. That's why it sounds better to me that we get most of it
working before GNOME's big freeze. Then we can refine things, potentially
adding new libosinfo API if this proves needed, after the freeze as this
would be bugfixing existing code, not adding new features.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Mon Feb 18 15:22:23 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 17:22:23 +0200
Subject: [Libosinfo] [PATCH] Ditch udev rule
Message-ID: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
New udev/blkid expose more ISO9660 properties that apps can grab and
set on install media for detection to work. As a result our udev rule
becomes redundant.
This improves system bootup time conciderably if there is an ISO9660
media inserted during bootup as our udev rule needed to parse the XML
etc and is therefore pretty slow (keeping in mind that a few seconds are
a long time in the land of modern udev/systemd).
---
configure.ac | 20 --------------------
data/Makefile.am | 14 +-------------
libosinfo.spec.in | 4 +---
3 files changed, 2 insertions(+), 36 deletions(-)
diff --git a/configure.ac b/configure.ac
index cf46f4d..5dedddd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,26 +137,6 @@ if test "x$enable_introspection" = "xyes" ; then
fi
AM_CONDITIONAL([WITH_VALA], [test "x$enable_vala" = "xyes"])
-AC_ARG_ENABLE([udev],
- AS_HELP_STRING([--enable-udev], [enable Udev support]),
- [], [enable_udev=no])
-AM_CONDITIONAL([WITH_UDEV], [test "x$enable_udev" = "xyes"])
-
-AC_ARG_WITH([udev-rulesdir],
- [AS_HELP_STRING([--with-udev-rulesdir],[UDev rules directory])],
- [], [])
-
-if test "x$with_udev_rulesdir" = "x"; then
- if test "x$prefix" = "x/usr" ; then
- with_udev_rulesdir=/lib/udev/rules.d
- else
- with_udev_rulesdir=$prefix/lib/udev/rules.d
- fi
-fi
-
-UDEV_RULESDIR="$with_udev_rulesdir"
-AC_SUBST(UDEV_RULESDIR)
-
AC_ARG_ENABLE([coverage],
AS_HELP_STRING([--enable-coverage], [enable GCC code coverage]),
[], [enable_coverage=no])
diff --git a/data/Makefile.am b/data/Makefile.am
index 747f0e9..848eeff 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,23 +1,11 @@
SUBDIRS = datamaps devices oses hypervisors install-scripts schemas
-EXTRA_DIST = usb.ids pci.ids 95-osinfo.rules.in
+EXTRA_DIST = usb.ids pci.ids
databasedir = $(pkgdatadir)/db/
database_DATA = usb.ids pci.ids
-if WITH_UDEV
-BUILT_SOURCES = 95-osinfo.rules
-
-95-osinfo.rules: 95-osinfo.rules.in
- sed 's,\@bindir\@,$(exec_prefix)/bin,' $< > $@
-
-install-data-hook: 95-osinfo.rules
- mkdir -p $(DESTDIR)$(UDEV_RULESDIR)
- $(INSTALL) -m 0644 95-osinfo.rules $(DESTDIR)$(UDEV_RULESDIR)
-
-endif
-
CLEANFILES = usb.ids pci.ids
usb.ids:
diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index 9aa9d13..42984ed 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -30,7 +30,6 @@ BuildRequires: libsoup-devel
%if %{with_gir}
BuildRequires: gobject-introspection-devel
%endif
-Requires: udev
%description
libosinfo is a library that allows virtualization provisioning tools to
@@ -73,7 +72,7 @@ This package provides the Vala bindings for libosinfo library.
%define gir_arg --enable-introspection=no
%endif
-%configure %{gir_arg} --enable-vala=yes --enable-udev=yes
+%configure %{gir_arg} --enable-vala=yes
%__make %{?_smp_mflags} V=1
chmod a-x examples/*.js examples/*.py
@@ -119,7 +118,6 @@ rm -fr %{buildroot}
%{_mandir}/man1/osinfo-query.1*
%{_mandir}/man1/osinfo-install-script.1*
%{_libdir}/%{name}-1.0.so.*
-/lib/udev/rules.d/95-osinfo.rules
%if %{with_gir}
%{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
%endif
--
1.8.1.2
From zeeshanak at gnome.org Mon Feb 18 15:56:59 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 17:56:59 +0200
Subject: [Libosinfo] [v4 2/2] winxp,
installer: Make use of post-installation drivers
In-Reply-To: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
References: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1361203019-17988-3-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
---
data/install-scripts/windows-cmd.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
index 85aae12..b3121dc 100644
--- a/data/install-scripts/windows-cmd.xml
+++ b/data/install-scripts/windows-cmd.xml
@@ -4,6 +4,7 @@
desktop
dos
windows.cmd
+ true
@@ -11,6 +12,8 @@
+
+
image/bmp
@@ -46,6 +49,17 @@
+
+
+
+
+
+
+ A
+
+
+
+
sc config TlntSvr start= auto
net user /add /passwordreq:no
@@ -53,6 +67,10 @@ net localgroup administrators /add
net accounts /maxpwage:unlimited
if not ""=="" copy ":" ":\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\.bmp"
REGEDIT /S :\windows.reg
+:
+reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000000 /f
+for %%i in (":\*.cmd") do cmd /k %%i
+reg add "HKCU\Software\Policies\Microsoft\Windows NT\Driver Signing" /v BehaviorOnFailedVerify /t reg_dword /d 00000001 /f
EXIT
--
1.8.1.2
From zeeshanak at gnome.org Mon Feb 18 15:56:58 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 17:56:58 +0200
Subject: [Libosinfo] [v4 1/2] winxp,
win7: Add virtio & QXL device drivers info
In-Reply-To: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
References: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <1361203019-17988-2-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Add an all-in-one virtio and QXL device driver setup binary to Windows
XP and 7. This needs to be listed separately from virtio block driver as
not all of these are pre-installable.
Same binary also installs spice-vdagent for us.
---
data/oses/windows.xml.in | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in
index 310de62..93b8556 100644
--- a/data/oses/windows.xml.in
+++ b/data/oses/windows.xml.in
@@ -400,6 +400,27 @@
txtsetup.oem
+
+
+
+ spice-guest-tools-0.52.exe
+ spice-guest-tools-0.52.cmd
+
+
+
+
+
+
+
+
+ spice-guest-tools-0.52.exe
+ spice-guest-tools-0.52.cmd
+
+
+
+
+
+
@@ -765,7 +786,29 @@
viostor.cat
viostor.inf
viostor.sys
+
+
+
+
+
+
+ spice-guest-tools-0.52.exe
+ spice-guest-tools-0.52.cmd
+
+
+
+
+
+
+
+
+ spice-guest-tools-0.52.exe
+ spice-guest-tools-0.52.cmd
+
+
+
+
--
1.8.1.2
From zeeshanak at gnome.org Mon Feb 18 15:56:57 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 17:56:57 +0200
Subject: [Libosinfo] More device drivers v4
Message-ID: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
Just reducing to two essential patchs for now, i-e no new API is being added for now.
From berrange at redhat.com Mon Feb 18 16:20:08 2013
From: berrange at redhat.com (Daniel P. Berrange)
Date: Mon, 18 Feb 2013 16:20:08 +0000
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130218162008.GM3658@redhat.com>
On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> New udev/blkid expose more ISO9660 properties that apps can grab and
> set on install media for detection to work. As a result our udev rule
> becomes redundant.
>
> This improves system bootup time conciderably if there is an ISO9660
> media inserted during bootup as our udev rule needed to parse the XML
> etc and is therefore pretty slow (keeping in mind that a few seconds are
> a long time in the land of modern udev/systemd).
ACK, I never liked this rule existing in libosinfo in the first
place.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
From cfergeau at redhat.com Mon Feb 18 16:31:17 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 17:31:17 +0100
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130218163117.GT24320@teriyaki.cdg.redhat.com>
On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)"
>
> New udev/blkid expose more ISO9660 properties
I think by 'new' here, you mean unreleased versions of these. Given that
libosinfo releases end up as stable updates in released distros (this is
the case in fedora at least), I think it's premature to remove the rule
altogether. It seems to already be disabled be default unless --with-udev
is used. Maybe we can add a warning that this is deprecated when using
util-linux vXX and systemd vYY and keep the rule for now? We could also
potentially add another switch --with-deprecated-udev rule switch to make
sure distros notice this is going away. Another way would be a udev version
check, and error out with new udev and --with-udev.
All in all, I think just removing it is very premature, especially as there
are users of this rule (boxes). I'm all for documented it's deprecated one
way or another.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Mon Feb 18 16:33:08 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 18:33:08 +0200
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To: <20130218162008.GM3658@redhat.com>
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
<20130218162008.GM3658@redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 6:20 PM, Daniel P. Berrange wrote:
> On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> New udev/blkid expose more ISO9660 properties that apps can grab and
>> set on install media for detection to work. As a result our udev rule
>> becomes redundant.
>>
>> This improves system bootup time conciderably if there is an ISO9660
>> media inserted during bootup as our udev rule needed to parse the XML
>> etc and is therefore pretty slow (keeping in mind that a few seconds are
>> a long time in the land of modern udev/systemd).
>
> ACK, I never liked this rule existing in libosinfo in the first
> place.
Cool. Since merging this before systemd release would mean breaking
unattended installations in Boxes (and a few other things), lets merge
this after systemd release (expected in a week).
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From berrange at redhat.com Mon Feb 18 16:47:27 2013
From: berrange at redhat.com (Daniel P. Berrange)
Date: Mon, 18 Feb 2013 16:47:27 +0000
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To:
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
<20130218162008.GM3658@redhat.com>
Message-ID: <20130218164727.GN3658@redhat.com>
On Mon, Feb 18, 2013 at 06:33:08PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Feb 18, 2013 at 6:20 PM, Daniel P. Berrange wrote:
> > On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)"
> >>
> >> New udev/blkid expose more ISO9660 properties that apps can grab and
> >> set on install media for detection to work. As a result our udev rule
> >> becomes redundant.
> >>
> >> This improves system bootup time conciderably if there is an ISO9660
> >> media inserted during bootup as our udev rule needed to parse the XML
> >> etc and is therefore pretty slow (keeping in mind that a few seconds are
> >> a long time in the land of modern udev/systemd).
> >
> > ACK, I never liked this rule existing in libosinfo in the first
> > place.
>
> Cool. Since merging this before systemd release would mean breaking
> unattended installations in Boxes (and a few other things), lets merge
> this after systemd release (expected in a week).
Well that's assuming people are installing these in lockstep which
is not required. This dependancy is merely a distro packager or
documentation issue. There's no need to hold off putting this in
libosinfo
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
From cfergeau at redhat.com Mon Feb 18 16:52:08 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 17:52:08 +0100
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To:
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
<20130218163117.GT24320@teriyaki.cdg.redhat.com>
Message-ID: <20130218165207.GU24320@teriyaki.cdg.redhat.com>
On Mon, Feb 18, 2013 at 06:40:44PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Feb 18, 2013 at 6:31 PM, Christophe Fergeau wrote:
> > On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
> >> From: "Zeeshan Ali (Khattak)"
> >>
> >> New udev/blkid expose more ISO9660 properties
> >
> > I think by 'new' here, you mean unreleased versions of these. Given that
> > libosinfo releases end up as stable updates in released distros (this is
> > the case in fedora at least), I think it's premature to remove the rule
> > altogether. It seems to already be disabled be default unless --with-udev
> > is used. Maybe we can add a warning that this is deprecated when using
> > util-linux vXX and systemd vYY and keep the rule for now? We could also
> > potentially add another switch --with-deprecated-udev rule switch to make
> > sure distros notice this is going away. Another way would be a udev version
> > check, and error out with new udev and --with-udev.
> >
> > All in all, I think just removing it is very premature, especially as there
> > are users of this rule (boxes). I'm all for documented it's deprecated one
> > way or another.
>
> As I said in the other mail, I share your concern but not as deeply.
> Once systemd/util-linux are released, we can merge this.
And break Boxes through stable updates in released distros that choose to
update lo latest libosinfo?
> There will be
> a week or two in between systemd release and libosinfo release.
> Knowing that some distros missed the 'enable-udev' option (at least in
> the beginning), I don't think renaming the option would grab attention
> from disto packagers.
It really depends, not installing a file that is listed in a .spec %files
section will cause a package build failure on distros using RPM, which is a
sure way of grabbing the packager attention.
Anyway, I've made other suggestions in my email,
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Mon Feb 18 17:05:58 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 18:05:58 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To:
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
<20130218132033.GL24320@teriyaki.cdg.redhat.com>
Message-ID: <20130218170558.GV24320@teriyaki.cdg.redhat.com>
On Mon, Feb 18, 2013 at 04:03:12PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Feb 18, 2013 at 3:20 PM, Christophe Fergeau wrote:
> > On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
> >> Actually you and I both missed something important here: The libosinfo
> >> db doesn't just come from libosinfo. We allow downstream and apps to
> >> add to the DB. They can as well add new device drivers.
> >
> > Currently install scripts only support one format, so there is not much
> > point for downstream to add a driver in an unsupported format.
>
> 1. With my patches, winxp will support one format for preinstall
> drivers and another for postinstall.
Hmm true, but both formats are of the type 'copy all listed files to the
installation disk, and libosinfo will know to make use of it'
> 2. How do apps find out which format is supported if they want to add
> more drivers? Currently, only by looking at the scripts themselves
> (which is more like asking them to read the source). It would
> definitely be desirable to have a simple API like this to query such
> info.
See my answer to your point 1.
> > I don't even
> > know if you can append easily information to an existing OS (as opposed to
> > overwriting an existing OS) to add a driver while keeping the existing
> > instal script.
>
> Its pretty easy but even if its not, that is pretty irreverent. The
> relevant fact is that we support it. If its not easy, we can talk
> about it in another thread.
I'd s/we support it/we want to support it
I agree this is something that should be working, however this has seen so
little use that there are probably various issues with doing that. If such
a format thing is needed, that would just be another rough edge ;) But
until we add a driver format that is not of the type 'copy all files to
destination disk', I don't think we should try to provide an API for driver
formats.
>
> > Adding another driver format requires patching libosinfo (schema/parsing
> > changes), so we'll know about it if that's needed, and then we can think
> > talk again about this API in light of this new format.
>
> That is also not true. Any part of the DB can be extended, including
> addition of scripts and OSs.
Emphasis on the "format" part of "Adding another driver format", you seem
to have read "Adding another driver" here.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From cfergeau at redhat.com Mon Feb 18 17:11:48 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 18:11:48 +0100
Subject: [Libosinfo] More device drivers v4
In-Reply-To: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
References: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
Message-ID: <20130218171148.GW24320@teriyaki.cdg.redhat.com>
On Mon, Feb 18, 2013 at 05:56:57PM +0200, Zeeshan Ali (Khattak) wrote:
> Just reducing to two essential patchs for now, i-e no new API is being added for now.
Still not a big fan of the *.cmd in 2/2, and we need to make sure we don't
show an ugly cmd.exe window, but should be good enough for now, ACK series.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Mon Feb 18 17:23:08 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 19:23:08 +0200
Subject: [Libosinfo] More device drivers v4
In-Reply-To: <20130218171148.GW24320@teriyaki.cdg.redhat.com>
References: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
<20130218171148.GW24320@teriyaki.cdg.redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 7:11 PM, Christophe Fergeau wrote:
> On Mon, Feb 18, 2013 at 05:56:57PM +0200, Zeeshan Ali (Khattak) wrote:
>> Just reducing to two essential patchs for now, i-e no new API is being added for now.
>
> Still not a big fan of the *.cmd in 2/2, and we need to make sure we don't
> show an ugly cmd.exe window,
But we do that already so nothing new in these patches?
> but should be good enough for now, ACK series.
Yeah.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Mon Feb 18 16:40:44 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 18:40:44 +0200
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To: <20130218163117.GT24320@teriyaki.cdg.redhat.com>
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
<20130218163117.GT24320@teriyaki.cdg.redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 6:31 PM, Christophe Fergeau wrote:
> On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)"
>>
>> New udev/blkid expose more ISO9660 properties
>
> I think by 'new' here, you mean unreleased versions of these. Given that
> libosinfo releases end up as stable updates in released distros (this is
> the case in fedora at least), I think it's premature to remove the rule
> altogether. It seems to already be disabled be default unless --with-udev
> is used. Maybe we can add a warning that this is deprecated when using
> util-linux vXX and systemd vYY and keep the rule for now? We could also
> potentially add another switch --with-deprecated-udev rule switch to make
> sure distros notice this is going away. Another way would be a udev version
> check, and error out with new udev and --with-udev.
>
> All in all, I think just removing it is very premature, especially as there
> are users of this rule (boxes). I'm all for documented it's deprecated one
> way or another.
As I said in the other mail, I share your concern but not as deeply.
Once systemd/util-linux are released, we can merge this. There will be
a week or two in between systemd release and libosinfo release.
Knowing that some distros missed the 'enable-udev' option (at least in
the beginning), I don't think renaming the option would grab attention
from disto packagers.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Mon Feb 18 17:25:31 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Mon, 18 Feb 2013 18:25:31 +0100
Subject: [Libosinfo] More device drivers v4
In-Reply-To:
References: <1361203019-17988-1-git-send-email-zeeshanak@gnome.org>
<20130218171148.GW24320@teriyaki.cdg.redhat.com>
Message-ID: <20130218172531.GX24320@teriyaki.cdg.redhat.com>
On Mon, Feb 18, 2013 at 07:23:08PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Feb 18, 2013 at 7:11 PM, Christophe Fergeau wrote:
> > On Mon, Feb 18, 2013 at 05:56:57PM +0200, Zeeshan Ali (Khattak) wrote:
> >> Just reducing to two essential patchs for now, i-e no new API is being added for now.
> >
> > Still not a big fan of the *.cmd in 2/2, and we need to make sure we don't
> > show an ugly cmd.exe window,
>
> But we do that already so nothing new in these patches?
No, not new in these patches, just things that have been mentioned and
which are things that will need to be polished sooner or later.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Mon Feb 18 17:45:09 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Mon, 18 Feb 2013 19:45:09 +0200
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <20130218170558.GV24320@teriyaki.cdg.redhat.com>
References: <1359343127-27272-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
<20130218132033.GL24320@teriyaki.cdg.redhat.com>
<20130218170558.GV24320@teriyaki.cdg.redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 7:05 PM, Christophe Fergeau wrote:
> On Mon, Feb 18, 2013 at 04:03:12PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Mon, Feb 18, 2013 at 3:20 PM, Christophe Fergeau wrote:
>> > On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> Actually you and I both missed something important here: The libosinfo
>> >> db doesn't just come from libosinfo. We allow downstream and apps to
>> >> add to the DB. They can as well add new device drivers.
>> >
>> > Currently install scripts only support one format, so there is not much
>> > point for downstream to add a driver in an unsupported format.
>>
>> 1. With my patches, winxp will support one format for preinstall
>> drivers and another for postinstall.
>
> Hmm true, but both formats are of the type 'copy all listed files to the
> installation disk, and libosinfo will know to make use of it'
? If you add a postinstall driver to winxp that does not provide .cmd
file, you can be sure that your driver will not be used. Similarly, if
you add a pre-installable driver, a executable/cmd file isn't what the
script is expecting.
>> 2. How do apps find out which format is supported if they want to add
>> more drivers? Currently, only by looking at the scripts themselves
>> (which is more like asking them to read the source). It would
>> definitely be desirable to have a simple API like this to query such
>> info.
>
> See my answer to your point 1.
Yes and I answered. If anyone adds driver(s) to DB, they really do
need to know which format it must be in. Without APIs, they'll have to
read the script template to figure it out.
>> > I don't even
>> > know if you can append easily information to an existing OS (as opposed to
>> > overwriting an existing OS) to add a driver while keeping the existing
>> > instal script.
>>
>> Its pretty easy but even if its not, that is pretty irreverent. The
>> relevant fact is that we support it. If its not easy, we can talk
>> about it in another thread.
>
> I'd s/we support it/we want to support it
> I agree this is something that should be working, however this has seen so
> little use that there are probably various issues with doing that.
We use it in Boxes for logos and I find it very likely that we'll need
to use this downstream in RHEL (actually for drivers in fact).
>If such
> a format thing is needed, that would just be another rough edge ;) But
> until we add a driver format that is not of the type 'copy all files to
> destination disk', I don't think we should try to provide an API for driver
> formats.
We already have the case of preinstallable and postinstallable drivers
for the same OS in two different formats so that already shows the
need for such an API.
>> > Adding another driver format requires patching libosinfo (schema/parsing
>> > changes), so we'll know about it if that's needed, and then we can think
>> > talk again about this API in light of this new format.
>>
>> That is also not true. Any part of the DB can be extended, including
>> addition of scripts and OSs.
>
> Emphasis on the "format" part of "Adding another driver format", you seem
> to have read "Adding another driver" here.
True. My appologies.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Tue Feb 19 02:13:06 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Tue, 19 Feb 2013 04:13:06 +0200
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To: <20130218164727.GN3658@redhat.com>
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
<20130218162008.GM3658@redhat.com>
<20130218164727.GN3658@redhat.com>
Message-ID:
On Mon, Feb 18, 2013 at 6:47 PM, Daniel P. Berrange wrote:
> On Mon, Feb 18, 2013 at 06:33:08PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Mon, Feb 18, 2013 at 6:20 PM, Daniel P. Berrange wrote:
>> > On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> From: "Zeeshan Ali (Khattak)"
>> >>
>> >> New udev/blkid expose more ISO9660 properties that apps can grab and
>> >> set on install media for detection to work. As a result our udev rule
>> >> becomes redundant.
>> >>
>> >> This improves system bootup time conciderably if there is an ISO9660
>> >> media inserted during bootup as our udev rule needed to parse the XML
>> >> etc and is therefore pretty slow (keeping in mind that a few seconds are
>> >> a long time in the land of modern udev/systemd).
>> >
>> > ACK, I never liked this rule existing in libosinfo in the first
>> > place.
>>
>> Cool. Since merging this before systemd release would mean breaking
>> unattended installations in Boxes (and a few other things), lets merge
>> this after systemd release (expected in a week).
>
> Well that's assuming people are installing these in lockstep which
> is not required. This dependancy is merely a distro packager or
> documentation issue. There's no need to hold off putting this in
> libosinfo
I'm fine with both keeping the rules for now and ditching it already.
I'll let you and Christophe convince each other.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Tue Feb 19 09:55:20 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Tue, 19 Feb 2013 10:55:20 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To:
References: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
<20130218132033.GL24320@teriyaki.cdg.redhat.com>
<20130218170558.GV24320@teriyaki.cdg.redhat.com>
Message-ID: <20130219095520.GB10627@teriyaki.redhat.com>
On Mon, Feb 18, 2013 at 07:45:09PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Feb 18, 2013 at 7:05 PM, Christophe Fergeau wrote:
> > On Mon, Feb 18, 2013 at 04:03:12PM +0200, Zeeshan Ali (Khattak) wrote:
> >> On Mon, Feb 18, 2013 at 3:20 PM, Christophe Fergeau wrote:
> >> > On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
> >> >> Actually you and I both missed something important here: The libosinfo
> >> >> db doesn't just come from libosinfo. We allow downstream and apps to
> >> >> add to the DB. They can as well add new device drivers.
> >> >
> >> > Currently install scripts only support one format, so there is not much
> >> > point for downstream to add a driver in an unsupported format.
> >>
> >> 1. With my patches, winxp will support one format for preinstall
> >> drivers and another for postinstall.
> >
> > Hmm true, but both formats are of the type 'copy all listed files to the
> > installation disk, and libosinfo will know to make use of it'
>
> ? If you add a postinstall driver to winxp that does not provide .cmd
> file, you can be sure that your driver will not be used. Similarly, if
> you add a pre-installable driver, a executable/cmd file isn't what the
> script is expecting.
>
> >> 2. How do apps find out which format is supported if they want to add
> >> more drivers? Currently, only by looking at the scripts themselves
> >> (which is more like asking them to read the source). It would
> >> definitely be desirable to have a simple API like this to query such
> >> info.
> >
> > See my answer to your point 1.
>
> Yes and I answered. If anyone adds driver(s) to DB, they really do
> need to know which format it must be in. Without APIs, they'll have to
> read the script template to figure it out.
Ok, I was initially very confused about your answer as what I understood
from this part of the email was "people writing xml to extend libosinfo DB
needs the osinfo_device_driver_get_format C API because they need
documentation about the formats we expect the drivers to be in", which did
not make a lot of sense to me.
From what you told me on IRC, it seems you are now indeed talking about
people who write XML snippets to extend libosinfo DB and you want to make
it more obvious to them what driver formats libosinfo expects. Please note
that so far I was only talking about the addition of
osinfo_device_driver_get_format in the public API and of nothing else.
Imo there are 2 different questions here
1.do we add extra driver format information to the XML? This is nice to
at least people writing extensions to the libosinfo database
2.do we expose this information in libosinfo public C API?
So far, what I've said is that 2. is not useful and that I'm against it. 1.
however sounds ok to me.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From berrange at redhat.com Tue Feb 19 10:11:55 2013
From: berrange at redhat.com (Daniel P. Berrange)
Date: Tue, 19 Feb 2013 10:11:55 +0000
Subject: [Libosinfo] [PATCH] Ditch udev rule
In-Reply-To:
References: <1361200943-3675-1-git-send-email-zeeshanak@gnome.org>
<20130218162008.GM3658@redhat.com>
<20130218164727.GN3658@redhat.com>
Message-ID: <20130219101154.GB15847@redhat.com>
On Tue, Feb 19, 2013 at 04:13:06AM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Feb 18, 2013 at 6:47 PM, Daniel P. Berrange wrote:
> > On Mon, Feb 18, 2013 at 06:33:08PM +0200, Zeeshan Ali (Khattak) wrote:
> >> On Mon, Feb 18, 2013 at 6:20 PM, Daniel P. Berrange wrote:
> >> > On Mon, Feb 18, 2013 at 05:22:23PM +0200, Zeeshan Ali (Khattak) wrote:
> >> >> From: "Zeeshan Ali (Khattak)"
> >> >>
> >> >> New udev/blkid expose more ISO9660 properties that apps can grab and
> >> >> set on install media for detection to work. As a result our udev rule
> >> >> becomes redundant.
> >> >>
> >> >> This improves system bootup time conciderably if there is an ISO9660
> >> >> media inserted during bootup as our udev rule needed to parse the XML
> >> >> etc and is therefore pretty slow (keeping in mind that a few seconds are
> >> >> a long time in the land of modern udev/systemd).
> >> >
> >> > ACK, I never liked this rule existing in libosinfo in the first
> >> > place.
> >>
> >> Cool. Since merging this before systemd release would mean breaking
> >> unattended installations in Boxes (and a few other things), lets merge
> >> this after systemd release (expected in a week).
> >
> > Well that's assuming people are installing these in lockstep which
> > is not required. This dependancy is merely a distro packager or
> > documentation issue. There's no need to hold off putting this in
> > libosinfo
>
> I'm fine with both keeping the rules for now and ditching it already.
> I'll let you and Christophe convince each other.
Keep it for now, but update the RPM specfile so that if built for
Fedora 19, it is not installed.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
From cfergeau at redhat.com Tue Feb 19 11:19:25 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Tue, 19 Feb 2013 12:19:25 +0100
Subject: [Libosinfo] [libosinfo] spec: Disable udev rule on newer Fedoras
Message-ID: <1361272765-30715-1-git-send-email-cfergeau@redhat.com>
Changes in udev > 197 and libblkid > 2.22.2 have made this rule obsolete.
---
libosinfo.spec.in | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index 0c49950..4e59504 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -10,6 +10,11 @@
%define with_gir 1
%endif
+%define with_udev 1
+%if 0%{?fedora} >= 19
+%define with_udev 0
+%endif
+
Summary: A library for managing OS information for virtualization
Name: libosinfo
Version: @VERSION@
@@ -73,7 +78,13 @@ This package provides the Vala bindings for libosinfo library.
%define gir_arg --enable-introspection=no
%endif
-%configure %{gir_arg} --enable-vala=yes --enable-udev=yes
+%if %{with_udev}
+%define udev_arg --enable-udev=yes
+%else
+%define udev_arg --enable-udev=no
+%endif
+
+%configure %{gir_arg} %{udev_arg} --enable-vala=yes
%__make %{?_smp_mflags} V=1
chmod a-x examples/*.js examples/*.py
@@ -119,7 +130,9 @@ rm -fr %{buildroot}
%{_mandir}/man1/osinfo-query.1*
%{_mandir}/man1/osinfo-install-script.1*
%{_libdir}/%{name}-1.0.so.*
+%if %{with_udev}
/lib/udev/rules.d/95-osinfo.rules
+%endif
%if %{with_gir}
%{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
%endif
--
1.8.1.2
From zeeshanak at gnome.org Tue Feb 19 13:41:18 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Tue, 19 Feb 2013 15:41:18 +0200
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To: <20130219095520.GB10627@teriyaki.redhat.com>
References: <1360514469-25259-1-git-send-email-zeeshanak@gnome.org>
<1360514469-25259-2-git-send-email-zeeshanak@gnome.org>
<20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
<20130218132033.GL24320@teriyaki.cdg.redhat.com>
<20130218170558.GV24320@teriyaki.cdg.redhat.com>
<20130219095520.GB10627@teriyaki.redhat.com>
Message-ID:
On Tue, Feb 19, 2013 at 11:55 AM, Christophe Fergeau
wrote:
> On Mon, Feb 18, 2013 at 07:45:09PM +0200, Zeeshan Ali (Khattak) wrote:
>> On Mon, Feb 18, 2013 at 7:05 PM, Christophe Fergeau wrote:
>> > On Mon, Feb 18, 2013 at 04:03:12PM +0200, Zeeshan Ali (Khattak) wrote:
>> >> On Mon, Feb 18, 2013 at 3:20 PM, Christophe Fergeau wrote:
>> >> > On Sat, Feb 16, 2013 at 05:38:27AM +0200, Zeeshan Ali (Khattak) wrote:
>> >> >> Actually you and I both missed something important here: The libosinfo
>> >> >> db doesn't just come from libosinfo. We allow downstream and apps to
>> >> >> add to the DB. They can as well add new device drivers.
>> >> >
>> >> > Currently install scripts only support one format, so there is not much
>> >> > point for downstream to add a driver in an unsupported format.
>> >>
>> >> 1. With my patches, winxp will support one format for preinstall
>> >> drivers and another for postinstall.
>> >
>> > Hmm true, but both formats are of the type 'copy all listed files to the
>> > installation disk, and libosinfo will know to make use of it'
>>
>> ? If you add a postinstall driver to winxp that does not provide .cmd
>> file, you can be sure that your driver will not be used. Similarly, if
>> you add a pre-installable driver, a executable/cmd file isn't what the
>> script is expecting.
>>
>> >> 2. How do apps find out which format is supported if they want to add
>> >> more drivers? Currently, only by looking at the scripts themselves
>> >> (which is more like asking them to read the source). It would
>> >> definitely be desirable to have a simple API like this to query such
>> >> info.
>> >
>> > See my answer to your point 1.
>>
>> Yes and I answered. If anyone adds driver(s) to DB, they really do
>> need to know which format it must be in. Without APIs, they'll have to
>> read the script template to figure it out.
>
> Ok, I was initially very confused about your answer as what I understood
> from this part of the email was "people writing xml to extend libosinfo DB
> needs the osinfo_device_driver_get_format C API because they need
> documentation about the formats we expect the drivers to be in", which did
> not make a lot of sense to me.
>
> From what you told me on IRC, it seems you are now indeed talking about
> people who write XML snippets to extend libosinfo DB and you want to make
> it more obvious to them what driver formats libosinfo expects. Please note
> that so far I was only talking about the addition of
> osinfo_device_driver_get_format in the public API and of nothing else.
This API alone is not very useful. The most interesting API is the one
to query supported format(s) from script.
osinfo_device_driver_get_format makes sense with that API in place (so
apps can check driver compatibility).
> Imo there are 2 different questions here
> 1.do we add extra driver format information to the XML? This is nice to
> at least people writing extensions to the libosinfo database
> 2.do we expose this information in libosinfo public C API?
>
> So far, what I've said is that 2. is not useful and that I'm against it. 1.
> however sounds ok to me.
Another important point that I neglected to mention is that drivers
can come directly from app (without them adding/editing an XML). In
which case these APIs would be nice to have so they can decide whether
an arbitrary driver they want to install is compatible with our
script(s) or not. Also, if the driver installation does not work, they
can have some trace of what went wrong.
BTW, if we decide to add these API then the driver signature API makes
as much sense to add.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Tue Feb 19 13:58:43 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Tue, 19 Feb 2013 15:58:43 +0200
Subject: [Libosinfo] [libosinfo] spec: Disable udev rule on newer Fedoras
In-Reply-To: <1361272765-30715-1-git-send-email-cfergeau@redhat.com>
References: <1361272765-30715-1-git-send-email-cfergeau@redhat.com>
Message-ID:
On Tue, Feb 19, 2013 at 1:19 PM, Christophe Fergeau wrote:
> Changes in udev > 197 and libblkid > 2.22.2 have made this rule obsolete.
> ---
ACK
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From cfergeau at redhat.com Tue Feb 19 16:41:22 2013
From: cfergeau at redhat.com (Christophe Fergeau)
Date: Tue, 19 Feb 2013 17:41:22 +0100
Subject: [Libosinfo] [v2 1/8] API to query format of device driver
In-Reply-To:
References: <20130213165447.GK2516@teriyaki.ams2.redhat.com>
<20130214104024.GT2516@teriyaki.ams2.redhat.com>
<20130218132033.GL24320@teriyaki.cdg.redhat.com>
<20130218170558.GV24320@teriyaki.cdg.redhat.com>
<20130219095520.GB10627@teriyaki.redhat.com>
Message-ID: <20130219164122.GE10627@teriyaki.redhat.com>
On Tue, Feb 19, 2013 at 03:41:18PM +0200, Zeeshan Ali (Khattak) wrote:
> Another important point that I neglected to mention is that drivers
> can come directly from app (without them adding/editing an XML). In
> which case these APIs would be nice to have so they can decide whether
> an arbitrary driver they want to install is compatible with our
> script(s) or not. Also, if the driver installation does not work, they
> can have some trace of what went wrong.
This also means that apps will have to check that the driver they are about
to install is in a known format before trying to use it, and fail if it's
not. But this unknown driver format could be similar to the existing ones
that copying all files is enough and things will just work. By adding this
API; apps would need a change to accomodate it.
Maybe we'll also add an API where the library user explicitly lists the
drivers they want to install (this would probably helps to get rid of this
*.cmd thing). This function could do the format checks and
error out if they are not compatible.
We really don't know what will be needed/not needed in the future, so let's
not add APIs that may or may not be needed, that may be helpful or that may
be harmful, but that apps have to use. If it proves needed in a while, it
will still be time to add it, if it's not needed, we'll be happy not to
have added it, and this will be less code in applications.
> BTW, if we decide to add these API then the driver signature API makes
> as much sense to add.
Actually I was surprised that you dropped the osinfo_driver_is_signed()
patch; this one seems good to me.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
From zeeshanak at gnome.org Tue Feb 19 20:40:30 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Tue, 19 Feb 2013 22:40:30 +0200
Subject: [Libosinfo] [PATCH] Add forgotten ignore-value.h to build
Message-ID: <1361306430-26176-1-git-send-email-zeeshanak@gnome.org>
From: "Zeeshan Ali (Khattak)"
Fixes `make distcheck`
Pushed under trivial rule.
---
osinfo/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index 0419030..5e9a761 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -137,6 +137,7 @@ libosinfo_1_0_la_SOURCES = \
osinfo_treelist.c \
osinfo_db.c \
osinfo_loader.c \
+ ignore-value.h \
$(NULL)
osinfo_enum_types.h: $(OSINFO_HEADER_FILES) osinfo_enum_types.h.template
--
1.8.1.2
From zeeshanak at gnome.org Tue Feb 19 21:44:41 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Tue, 19 Feb 2013 23:44:41 +0200
Subject: [Libosinfo] [libosinfo] spec: Disable udev rule on newer Fedoras
In-Reply-To:
References: <1361272765-30715-1-git-send-email-cfergeau@redhat.com>
Message-ID:
On Tue, Feb 19, 2013 at 3:58 PM, Zeeshan Ali (Khattak)
wrote:
> On Tue, Feb 19, 2013 at 1:19 PM, Christophe Fergeau wrote:
>> Changes in udev > 197 and libblkid > 2.22.2 have made this rule obsolete.
>> ---
>
> ACK
Pushed on your behalf to get it into the release that I'm about to roll out.
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Wed Feb 20 00:54:31 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Wed, 20 Feb 2013 02:54:31 +0200
Subject: [Libosinfo] Libosinfo 0.2.4
Message-ID:
Libosinfo 0.2.4 is out!
Changes since 0.2.3:
- Fix crash in osinfo-detect against non-bootable media.
- osinfo-install-script now displays names of generated files.
- Add an all-in-one virtio and QXL device driver setup binary to Windows XP
and 7. Same binary also installs spice-vdagent for us.
- Make use of post-installation drivers in Windows XP installer scripts.
- Log post-install commands of Windows XP to target disk.
- Add/improve/fix data on:
- QEMU/QEMU-KVM hypervisor
- GNOME
- openSUSE
- RPM spec file changes:
- Include datamaps and locale files.
- Pointto libosinfo official website.
- Disable udev rule on Fedora >= 19. Changes in udev > 197 and
libblkid > 2.22.2 have made this rule obsolete.
- Adapt to glib 2.36.
- Fix some build warnings.
- Some other fixes and improvements.
What is libosinfo?
=============
libosinfo is a GObject based library API for managing information about
operating systems, hypervisors and the (virtual) hardware devices they can
support. It includes a database containing device metadata and provides APIs
to match/identify optimal devices for deploying an operating system on a
hypervisor. Via the magic of GObject Introspection, the API is available in all
common programming languages with demos for javascript (GJS/Seed) and python
(PyGObject). Also provided are Vala bindings.
libosinfo is Free Software and licenced under LGPLv2+.
The latest official releases can be found at:
https://fedorahosted.org/released/libosinfo/
Dependencies
============
- Required:
- gobject-2.0
- gio-2.0
- libxml-2.0
- Optional:
- gobject-introspection
- Vala (build-time only)
For further information about libosinfo please consult the project homepage
https://fedorahosted.org/libosinfo/
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
From zeeshanak at gnome.org Wed Feb 20 00:56:21 2013
From: zeeshanak at gnome.org (Zeeshan Ali (Khattak))
Date: Wed, 20 Feb 2013 02:56:21 +0200
Subject: [Libosinfo] Libosinfo 0.2.4
In-Reply-To:
References: