tis-virtio

0.1.189-3
VirtIO Drivers
823 downloads
Download

  Description 

  • package : tis-virtio
  • version : 0.1.189-3
  • architecture : x86
  • categories : Drivers
  • maintainer : WAPT Team,Jimmy PELÉ
  • description : VirtIO Drivers
  • locale :
  • target_os : windows
  • min_os_version :
  • max_os_version :
  • min_wapt_version : 1.5
  • sources :
  • installed_size :
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Red Hat, Inc.
  • licence :
  • signature_date : 2020-11-12T09:18:36.888108

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import platform

uninstallkey = []

# Declaring specific app values (TO CHANGE)
real_bin_name = 'virtio-win-gt-x86.msi'
bin_name_string = 'virtio-win-gt-x86-%s.msi'


def install():
    # Specific app values
    package_version = control.version.split('-')[0]
    bin_name = bin_name_string % package_version

    # Add "Red Hat, Inc." to Trusted Publishers
    with disable_file_system_redirection():
        run('"%s" -addstore TrustedPublisher "%s"' % (makepath(system32,'certutil.exe'),makepath(basedir,'redhat-drivers.cer')))

    # Installing the package
    install_msi_if_needed(bin_name)


def update_package():
    print('Download/Update package content from upstream binary sources')

    # Getting proxy informations from WAPT settings
    proxy = {}
    if platform.system()=='Windows' and isfile(makepath(user_local_appdata(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxy = {'http':proxywapt,'https':proxywapt}

    # Specific app values
    url_dl = 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/%s' % real_bin_name

    # Downloading latest binaries
    if isfile(real_bin_name):
        remove_file(real_bin_name)
    if not isfile(real_bin_name):
        print('Downloading: ' + real_bin_name)
        wget(url_dl,real_bin_name,proxies=proxy)

        # Get version from file
        version = get_msi_properties(real_bin_name)['ProductVersion']
        os.rename(real_bin_name,bin_name_string % version)
		# Change version of the package
        pe = PackageEntry().load_control_from_wapt('.')
        pe.version = '%s-%s'%(version,int(pe.version.split('-',1)[1])+1)
        pe.save_control_to_wapt('.')
        print('Changing version to ' + pe.version + ' in WAPT\\control')
        print('Update package done. You can now build-upload your package')
    else:
        print('This package is already up-to-date')    


										

  Changelog 


No changelog
  manifest.sha256 
[["redhat-drivers.cer","051ad353a3fdc12faa3b2500401cb543aa273c36dd356aac558e263a6b68b0ba"],["setup.py","c2c9bc88442af0e8b9044f66c9e5c1d9765fcee0aae191187fa7e6961ba0bfc3"],["virtio-win-gt-x86-0.1.189.msi","2da34600e998da046264a7d4e31b5506b22f20aef3f4df92dd1c73461092cd5c"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","0b8699967cb69132f388d15238b5cf5ce396cdf41c22919ad6ebd9528dd7c820"]]