Package upgrade fixes and update to 1.5

This commit is contained in:
Daniel Berteaud 2023-06-26 12:24:50 +02:00
parent 0c9049f3a9
commit 3f4d6ef6d2
7 changed files with 60 additions and 98 deletions

BIN
GLPI-Agent-1.4-x64.msi (Stored with Git LFS)

Binary file not shown.

BIN
GLPI-Agent-1.4-x86.msi (Stored with Git LFS)

Binary file not shown.

BIN
GLPI-Agent-1.5-x64.msi (Stored with Git LFS) Normal file

Binary file not shown.

BIN
GLPI-Agent-1.5-x86.msi (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
package : eht-glpi-agent
version : 1.4-6
version : 1.5-3
architecture : all
section : base
priority : optional
@ -29,7 +29,7 @@ editor :
keywords : inventory
licence : GPLv2+
homepage : http://glpi-project.org/
package_uuid : 2a4a9893-325a-4301-8ebe-db2418f89133
package_uuid : fa238a04-45d4-414b-b152-f87487bac3e6
valid_from :
valid_until :
forced_install_on :
@ -39,6 +39,6 @@ max_os_version :
icon_sha256sum : fba3af4f79be43de12a5f9438a98831edc7a08c5761e5f216eb9d9ca5d98b3ff
signer : dbd
signer_fingerprint: e9156ec73f1ea6b50f33e0d9f580e8ae56db147100894bb5d2d4648a46f07ed1
signature : Pflv3b4Y6tEimQYzmqXY1pssMBXTBx5L0GFTm8t/YfK2T8FMK97n+aS/KLmRfQQFHQk8a1dWPbJ9FtMw2xTDIh+Ao+7ne4PD6V82wTlKTCd48DrGnCRHiD1mhEU95d4fDW9v0vHJwNezJWZ3CEee/iG2kRkYizEanjZsHaGs29vIzPDbPdQ27wC4jYe2EKH9C9+0slDMyvrPoq1xUtmkusRgsEGupgQEI1ymUT8C4PSGc96jy8agIkQYXsWHSff0bJ/JcoFUHPffdhozOeAeetzVLRZMlqATG+EZ67CzJtE/Vi+nKiAXFy/dOoCL77sj3LKjo5PQ4oBIp589oL3+sA==
signature_date : 2023-03-27T14:42:55.641309
signature : lCIb1ejBByEDsSKKyusgpSBA3fYkkZPumtRjuS+nxcB0p34/DAz/M+1l6VQfZWhW1+Vj1TSQ5g0CTOUn0N1xnZSs5tF+N+B50VToALvW/hVQjvpQTcm6wgpCWQ6IG0YqlMK2YRctz8NmaBLX2LA4XbxEbHa3qpkwJp/vES8+J2ULiWRcBJZZL6s5wXQppdq5FEIhxNkAPzaBXQ8iYtvdEMWSDqfuO/7z6H/ea2+Ydqw1hOXbfiqdVTl38baN2WOR8ESmjPHDZ2pb0MDOMtJlKSBrtK+dBRziLbXeK3te5DywUAdpxFm6OPgEXjat3kNZVmj8f6NCstUqDPdpLfj//A==
signature_date : 2023-06-26T12:24:03.237760
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

View File

@ -1,5 +1,5 @@
[PyScripter]
Version=3.4.2.0
Version=3.6.4.0
[Project]
ClassName=TProjectRootNode
@ -23,18 +23,34 @@ 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
FileName=C:\Program Files (x86)\wapt\setuphelpers_linux.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node3]
ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.ini
FileName=C:\Program Files (x86)\wapt\setuphelpers_macos.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node4]
ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\setuphelpers_unix.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node5]
ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\setuphelpers_windows.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node6]
ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.ini
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node7]
ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\wapt-get.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes\Node8]
ClassName=TProjectFileNode
FileName=C:\Program Files (x86)\wapt\waptpackage.py
[Project\ChildNodes\Node0\ChildNodes\Node0\ChildNodes]
Count=5
Count=9
[Project\ChildNodes\Node0\ChildNodes\Node1]
ClassName=TProjectFileNode
@ -56,10 +72,11 @@ ClassName=TProjectRunConfiguationsNode
[Project\ChildNodes\Node1\ChildNodes\Node0]
ClassName=TProjectRunConfiguationNode
Name=install
Name=WAPT: install
[Project\ChildNodes\Node1\ChildNodes\Node0\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Launch package installation.
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=install "$[Project-Path].."
@ -77,10 +94,11 @@ WorkingDirectory=$[ActiveScript-Dir]
[Project\ChildNodes\Node1\ChildNodes\Node1]
ClassName=TProjectRunConfiguationNode
Name=remove
Name=WAPT: remove
[Project\ChildNodes\Node1\ChildNodes\Node1\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Launch uninstallation (the uninstallation code found in local wapt database, remember to launch after an installation).
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=remove "$[Project-Path].."
@ -98,13 +116,14 @@ WorkingDirectory=$[ActiveScript-Dir]
[Project\ChildNodes\Node1\ChildNodes\Node2]
ClassName=TProjectRunConfiguationNode
Name=session-setup
Name=WAPT: uninstall
[Project\ChildNodes\Node1\ChildNodes\Node2\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Launch uninstallation code (for debugging purpose, it only runs the code of uninstall function).
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=session-setup "$[Project-Path].."
Parameters=uninstall "$[Project-Path].."
WorkingDir=$[Project-Path]..
WriteOutputToFile=FALSE
OutputFileName=$[ActiveScript-NoExt].log
@ -115,17 +134,18 @@ Caption=External Run
Description=Run script using an external Python Interpreter
ApplicationName=$[PythonExe-Short]
Parameters=$[ActiveScript-Short]
WorkingDirectory=$[ActiveScript-Dir]
WorkingDirectory=$[Project-Path]..
[Project\ChildNodes\Node1\ChildNodes\Node3]
ClassName=TProjectRunConfiguationNode
Name=update
Name=WAPT: session-setup
[Project\ChildNodes\Node1\ChildNodes\Node3\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Launch session-setup (it runs directly as current user).
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=update
Parameters=session-setup "$[Project-Path].."
WorkingDir=$[Project-Path]..
WriteOutputToFile=FALSE
OutputFileName=$[ActiveScript-NoExt].log
@ -140,14 +160,15 @@ WorkingDirectory=$[ActiveScript-Dir]
[Project\ChildNodes\Node1\ChildNodes\Node4]
ClassName=TProjectRunConfiguationNode
Name=upgrade
Name=WAPT: audit
[Project\ChildNodes\Node1\ChildNodes\Node4\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Launch package audit.
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=-f upgrade
WorkingDir=$[ActiveScript-Dir]
Parameters=audit -f "$[Project-Path].."
WorkingDir=$[Project-Path]..
WriteOutputToFile=FALSE
OutputFileName=$[ActiveScript-NoExt].log
AppendToFile=FALSE
@ -161,13 +182,14 @@ WorkingDirectory=$[ActiveScript-Dir]
[Project\ChildNodes\Node1\ChildNodes\Node5]
ClassName=TProjectRunConfiguationNode
Name=-i build-upload
Name=WAPT: update-package
[Project\ChildNodes\Node1\ChildNodes\Node5\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Launch update_package (it usually serve to update binaries of the package).
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=-i build-upload "$[Project-Path].."
Parameters=update-package-sources "$[Project-Path].."
WorkingDir=$[Project-Path]..
WriteOutputToFile=FALSE
OutputFileName=$[ActiveScript-NoExt].log
@ -182,13 +204,14 @@ WorkingDirectory=$[ActiveScript-Dir]
[Project\ChildNodes\Node1\ChildNodes\Node6]
ClassName=TProjectRunConfiguationNode
Name=svn update
Name=WAPT: -i build-upload
[Project\ChildNodes\Node1\ChildNodes\Node6\RunConfig]
ScriptName=C:\Program Files (x86)\wapt\wapt-get.py
Description=Build and upload package to the waptserver.
EngineType=peRemote
ReinitializeBeforeRun=TRUE
Parameters=sources "$[Project-Path].."
Parameters=--use-gui -i build-upload "$[Project-Path].."
WorkingDir=$[Project-Path]..
WriteOutputToFile=FALSE
OutputFileName=$[ActiveScript-NoExt].log
@ -201,71 +224,8 @@ 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
Count=7
[Project\ChildNodes]
Count=2

View File

@ -39,9 +39,9 @@ def install():
print('Installing GLPI Agent')
version = control['version'].split('-',1)[0]
if iswin64():
msi = 'GLPI-Agent-1.4-x64.msi'
msi = 'GLPI-Agent-%s-x64.msi' % version
else:
msi = 'GLPI-Agent-1.4-x86.msi'
msi = 'GLPI-Agent-%s-x86.msi' % version
install_msi_if_needed(msi,min_version=version,properties=props)
@ -49,21 +49,23 @@ def install():
def update_package():
print('Updating GLPI Agent package')
import requests,json
from waptpackage import PackageEntry
latest = json.loads(requests.get('https://api.github.com/repos/glpi-project/glpi-agent/releases/latest').text.encode('utf-8'))
version = latest['tag_name']
print('Last version is %s' % version)
pe = PackageEntry();
control = pe.load_control_from_wapt('.')
bin_found = []
for arch in ['86','64']:
for asset in latest['assets']:
if asset['name'] == 'GLPI-Agent-x%s-%s.msi' % (version, arch) and not isfile('GLPI-Agent-x%s-%s.msi' % (version, arch)):
if asset['name'] == 'GLPI-Agent-%s-x%s.msi' % (version, arch) and not isfile('GLPI-Agent-%s-x%s.msi' % (version, arch)):
url = asset['browser_download_url']
print('Downloading GLPI Agent %s for x%s from %s' % (version, arch ,url))
wget(url,'GLPI-Agent-x%s-%s.msi' % (version, arch))
wget(url,'GLPI-Agent-%s-x%s.msi' % (version, arch))
bin_found.append(arch)
for file in glob.glob('GLPI-Agent-x*-%s.msi' % arch):
if file != 'GLPI-Agent-x%s-%s.msi' % (version, arch):
for file in glob.glob('GLPI-Agent*%s*.msi' % arch):
if file != 'GLPI-Agent-x%s-%s.msi' % (arch, version) and file != 'GLPI-Agent-%s-x%s.msi' % (version, arch):
print('Removing %s' % file)
remove_file(file)
if Version(version) > Version(control['version'].split('-',1)[0]) and '86' in bin_found and '64' in bin_found: