[virt-tools-list] [PATCH RFC virtio-win-pkg-scripts 0/2] helpers to standardize driver directory layout

Richard W.M. Jones rjones at redhat.com
Mon Jan 18 14:35:04 UTC 2016


On Mon, Jan 18, 2016 at 05:15:19PM +0300, Roman Kagan wrote:
> As was discussed some time ago on libguestfs ML
> (http://thread.gmane.org/gmane.comp.emulators.guestfs/8341/focus=8576)
> there is a need in a tool that would lay out the Windows guest drivers
> on a filesystem by Windows flavor and architecture in a way that is
> 
> - easy to consume by both humans and programs
> - dependable in the long term
> 
> This patch series brings in the scripts to do this.
> 
> The scripts are based on the idea that the most actual information about
> the suitability of a driver for a particular flavor / architecture is
> contained in the driver's catalog file (in particular, the process of
> ISV or WHQL siging may affect it).
> 
> Since the catalog files are DER-encoded ASN.1 structures the first patch
> introduces a module to extract relevant information from a .cat file
> using PyASN1 library.
> 
> The second patch introduces a script that lays out the drivers by
> arch/flavor.
> It assumes that
> 
> - every driver for a particular arch/flavor is contained in a separate
>   directory
> 
> - the directory contains a single .inf file; the basename of the file is
>   taken as the name of the package
> 
> - the .cat file for the package is in the same directory and has the
>   same basename as the .inf
> 
> - all the files contained in that directory are associated with the
>   driver and go together with it no matter if they are listed in .inf or
>   .cat or not.
> 
> The virtio-win driver packages I could get my hands on all matched the
> above assumptions.

The approach of reading the .cat file seems reasonable, and IIUC it
would let us get rid of the massive DRIVER_OS_MAP table.

> [ There's no integration with the rest of the system yet as I'd like to
> receive some comments on these two first. ]

Right - obviously needs to be integrated into ./make-driver-dir.py
which appears to be the "controlling script".

Rich.

> Roman Kagan (2):
>   add parser for driver catalog files
>   add script to lay out drivers based on their catalog files
> 
>  util/cpdrivers.py | 191 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  util/parsecat.py  | 166 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 357 insertions(+)
>  create mode 100644 util/cpdrivers.py
>  create mode 100644 util/parsecat.py
> 
> -- 
> 2.5.0

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the virt-tools-list mailing list