From 947961fcc7f8d920d81ce23c70f380d335ea7fc3 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 7 Apr 2023 13:39:35 +0200 Subject: [PATCH] First version --- .gitattributes | 1 + .gitignore | 99 +++++++++++ WAPT/control | 44 +++++ WAPT/wapt.psproj | 275 +++++++++++++++++++++++++++++ setup.py | 48 +++++ virtio-win-guest-tools-0.1.229.exe | 3 + 6 files changed, 470 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 WAPT/control create mode 100644 WAPT/wapt.psproj create mode 100644 setup.py create mode 100644 virtio-win-guest-tools-0.1.229.exe diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f87e2c1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.exe filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99049c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,99 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject + +WAPT/certificate.crt +WAPT/manifest.sha256 +WAPT/signature.sha256 \ No newline at end of file diff --git a/WAPT/control b/WAPT/control new file mode 100644 index 0000000..1e51e2b --- /dev/null +++ b/WAPT/control @@ -0,0 +1,44 @@ +package : eht-virtio-guest-tools +version : 0.1.229-4 +architecture : x64 +section : base +priority : optional +name : VirtIO Guest Tools +categories : +maintainer : Daniel Berteaud +description : Guest tools +depends : +conflicts : +maturity : PROD +locale : all +target_os : windows +min_wapt_version : 2.3 +sources : +installed_size : +impacted_process : +description_fr : +description_pl : +description_de : +description_es : +description_pt : +description_it : +description_nl : +description_ru : +audit_schedule : 2d +editor : +keywords : driver +licence : GNU GPL +homepage : https://github.com/virtio-win/kvm-guest-drivers-windows +package_uuid : 8eb54668-df3a-4dac-886c-b4e3050e7cd5 +valid_from : +valid_until : +forced_install_on : +changelog : +min_os_version : 10 +max_os_version : +icon_sha256sum : +signer : dbd +signer_fingerprint: e9156ec73f1ea6b50f33e0d9f580e8ae56db147100894bb5d2d4648a46f07ed1 +signature : W7i7sKtJZ7DHFkp8NldjqADGsTACYhnM5ceDHk/4/oLmW4g7o8oCOqBYs2g5wRRhJIqoRfqpq/YsEMF1bvT3+muARd0Czn1tnzvzr5ZSKrwQFZ0hN5/qZjvL5h8EGxWNpKMDDq3HB8ny+WrMfd3cA32a9PaXRutUUAtn2swKQ7DUYiYboCjZjy7pqyIU5Nu5GJEaWjfAv3+03lBgGpRiNAavhQXyC1K0nCYCvysfiUQweGsjAivSjHYvxeeMZ/OKeqBYVxwFbwJsr7ygG5ThsGrNzgVtS7l8pUutDeEzSrqVAT1JWT3MYYJKqFpimqTvIJHx5Zpqti4PCzDM6P+0aQ== +signature_date : 2023-04-07T12:48:12.205326 +signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes \ No newline at end of file diff --git a/WAPT/wapt.psproj b/WAPT/wapt.psproj new file mode 100644 index 0000000..42a4af8 --- /dev/null +++ b/WAPT/wapt.psproj @@ -0,0 +1,275 @@ +[PyScripter] +Version=3.4.2.0 + +[Project] +ClassName=TProjectRootNode +StoreRelativePaths=TRUE +ShowFileExtensions=FALSE + +[Project\ChildNodes\Node0] +ClassName=TProjectFilesNode + +[Project\ChildNodes\Node0\ChildNodes\Node0] +ClassName=TProjectFolderNode +Name=wapt + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node0] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\common.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node1] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\setuphelpers.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node2] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\wapt-get.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\wapt-get.ini + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4] +ClassName=TProjectFileNode +FileName=C:\Program Files (x86)\wapt\waptpackage.py + +[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes] +Count=5 + +[Project\ChildNodes\Node0\ChildNodes\Node1] +ClassName=TProjectFileNode +FileName=$[Project-Path]changelog.txt + +[Project\ChildNodes\Node0\ChildNodes\Node2] +ClassName=TProjectFileNode +FileName=$[Project-Path]control + +[Project\ChildNodes\Node0\ChildNodes\Node3] +ClassName=TProjectFileNode +FileName=$[Project-Path]..\setup.py + +[Project\ChildNodes\Node0\ChildNodes] +Count=4 + +[Project\ChildNodes\Node1] +ClassName=TProjectRunConfiguationsNode + +[Project\ChildNodes\Node1\ChildNodes\Node0] +ClassName=TProjectRunConfiguationNode +Name=install + +[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=install "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node1] +ClassName=TProjectRunConfiguationNode +Name=remove + +[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=remove "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node2] +ClassName=TProjectRunConfiguationNode +Name=session-setup + +[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=session-setup "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node3] +ClassName=TProjectRunConfiguationNode +Name=update + +[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=update +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node4] +ClassName=TProjectRunConfiguationNode +Name=upgrade + +[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=-f upgrade +WorkingDir=$[ActiveScript-Dir] +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node5] +ClassName=TProjectRunConfiguationNode +Name=-i build-upload + +[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=-i build-upload "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node6] +ClassName=TProjectRunConfiguationNode +Name=svn update + +[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=sources "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node7] +ClassName=TProjectRunConfiguationNode +Name=uninstall + +[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=uninstall "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node7\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[Project-Path].. + +[Project\ChildNodes\Node1\ChildNodes\Node8] +ClassName=TProjectRunConfiguationNode +Name=update-package-sources + +[Project\ChildNodes\Node1\ChildNodes\Node8\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=update-package-sources "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node8\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes\Node9] +ClassName=TProjectRunConfiguationNode +Name=audit + +[Project\ChildNodes\Node1\ChildNodes\Node9\RunConfig] +ScriptName=C:\Program Files (x86)\wapt\wapt-get.py +EngineType=peRemote +ReinitializeBeforeRun=TRUE +Parameters=audit -f "$[Project-Path].." +WorkingDir=$[Project-Path].. +WriteOutputToFile=FALSE +OutputFileName=$[ActiveScript-NoExt].log +AppendToFile=FALSE + +[Project\ChildNodes\Node1\ChildNodes\Node9\RunConfig\ExternalRun] +Caption=External Run +Description=Run script using an external Python Interpreter +ApplicationName=$[PythonExe-Short] +Parameters=$[ActiveScript-Short] +WorkingDirectory=$[ActiveScript-Dir] + +[Project\ChildNodes\Node1\ChildNodes] +Count=10 + +[Project\ChildNodes] +Count=2 + +[Project\ExtraPythonPath] +Count=0 + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c594454 --- /dev/null +++ b/setup.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +from setuphelpers import * + +uninstallkey = [] + +def install(): + + print('Installing VirtIO Win guest tools') + version = control['version'].split('-',1)[0] + + parameters = '/install /quiet /norestart' + + install_exe_if_needed('virtio-win-guest-tools-%s.exe' % version, parameters, key='{2d5884d7-57f9-424b-8aff-48d91e68731f}', min_version=version) + + +def update_package(): + print('Updating Virtio Guest tools package') + import requests,re + + download = requests.get('https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/') + try: + results = re.search('virtio-win-(\d+(\.\d+)*)-(\d+)', download.url) + except: + error('Version not found') + + version = results.group(1) + release = results.group(3) + + print('Latest version is %s-%s' % (version, release)) + pe = PackageEntry(); + control = pe.load_control_from_wapt('.') + + filename = 'virtio-win-guest-tools-%s.exe' % version + url = 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-%s-%s/virtio-win-guest-tools.exe' % (version, release) + + if not isfile(filename): + print('Downloading VirtIO Win guest tools %s-%s from %s' % (version, release, url)) + wget(url, filename) + + if Version(version) > Version(control['version'].split('-',1)[0]): + print('Updating control file with new version %s' % version) + pe.version = version + '-0' + pe.maturity = 'PREPROD' + pe.save_control_to_wapt('.') + +if __name__ == '__main__': + update_package() + diff --git a/virtio-win-guest-tools-0.1.229.exe b/virtio-win-guest-tools-0.1.229.exe new file mode 100644 index 0000000..c05e3a7 --- /dev/null +++ b/virtio-win-guest-tools-0.1.229.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10083f2f47cf8135de58cd56c256b54e872791e074f7858e81f0631f6b74b8ef +size 32171027