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

Cole Robinson crobinso at redhat.com
Sat Feb 6 23:20:42 UTC 2016


On 01/25/2016 02:57 PM, 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 the
>   .inf or in the .cat or not.
> 
> The virtio-win driver packages I could get my hands on all matched the
> above assumptions.
> 
> Besides, as there occasionally are multiple packages that match a
> particular flavor / arch, the one with the most recent timestamp (taken
> as the signing time if present or the catalog creation time otherwise)
> takes over.
> 
> [ Integration with the rest of the system is still pending ]
> 
> Roman Kagan (2):
>   add parser for driver catalog files
>   add script to lay out drivers based on their catalog files
> 
> ---
> changes since v2:
>  - add extracting of catalog timestamp and signing time
>  - compare the timestamps to decide if the package is to replace the
>    already copied one (the most recent wins)
>  - minor refactoring for better readability
> 
> changes since v1:
>  - fix pep8 warnings except for the OS table alignment
>  - add debugging print of what driver package is being processed
>  - switch to argparse
>  - facilitate using as a module
> 
>  util/cpdrivers.py | 238 ++++++++++++++++++++++++++++++++++++++++++++
>  util/parsecat.py  | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 528 insertions(+)
>  create mode 100644 util/cpdrivers.py
>  create mode 100644 util/parsecat.py
> 

Sorry for the delay, been caught up in other stuff. I'll be focusing on
virtio-win stuff this coming week though

I've committed these patches now. I added a few commits on top to make my
pylint[1] setup happy. No functional changes.

I'm realizing now that the input bits to make-driver-dir.py
(virtio-win/qxl/qemu-ga windows builders from RH's internal build system)
aren't published anywhere so there isn't any way for you to reproduce the full
workflow for the public RPM. I'll work on getting those mirrored on
fedorapeople.org

Thanks,
Cole

[1] https://github.com/crobinso/check-pylint




More information about the virt-tools-list mailing list