tis-firefox 60.0-23

  • package : tis-firefox
  • version : 60.0-23
  • description : Firefox Web Browser French
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-05-11 09:17:19

setup.py

# -*- coding: UTF-8 -*-
from setuphelpers import *
import time

uninstallkey = []

def install():

    softname ='Mozilla Firefox'

    diskfreespacebefore = get_disk_free_space(programfiles)

    for uninstall in installed_softwares(softname):
        if 'x86' in uninstall['name']:
            if uninstall_key_exists(uninstall['key']):
                killalltasks('firefox.exe')
                cmd = WAPT.uninstall_cmd(uninstall['key'])
                run(cmd)
                time.sleep (5)

    for uninstall in installed_softwares(softname):
        if 'ESR' in uninstall['name']:
            if uninstall_key_exists(uninstall['key']):
                killalltasks('firefox.exe')
                cmd = WAPT.uninstall_cmd(uninstall['key'])
                run(cmd)
                time.sleep (5)

    version = control.version.split('-',1)[0]
    ukey = 'Mozilla Firefox %s (x86 fr)'%version
    exe = 'Firefox Setup %s.exe'%version
    install_exe_if_needed(exe,'-ms',key=ukey,min_version=version,killbefore='firefox.exe')

    diskfreespaceafter = get_disk_free_space(programfiles)

    difffreespace = diskfreespacebefore - diskfreespaceafter
    print (ur"Espace disque occupé :" + str(difffreespace))



def update_package():
    """updates the package / control version with the latest stable firefox version"""
    import re,requests,urlparse,glob

    # get index of all dowloads
    """
    #url_base = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/fr/'
    url_base = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win32/fr/'
    index = wgets(url_base)

    # get list of lastest french versions
    re_setup = re.compile(r'<a href=".*/(Firefox%20Setup%20[0-9.]*.exe)">Firefox Setup .*</a>')
    filename = urlparse.unquote(re_setup.findall(index)[0])
    url = url_base+filename
    """
    url = requests.head('https://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=fr').headers['Location']
    filename = urlparse.unquote(url.rsplit('/',1)[1])

    if not isfile(filename):
        print('Downloading %s from %s'%(filename,url))
        wget(url,filename)

    # removes old exe
    if isfile(filename):
        exes = glob.glob('Firefox*.exe')
        for fn in exes:
            if fn != filename:
                remove_file(fn)

        # updates control version from filename, increment package version.
        control = PackageEntry().load_control_from_wapt ('.')
        control.version = '%s-%s'%(re.findall('Firefox Setup (.*)\.exe',filename)[0],int(control.version.split('-',1)[1])+1)
        control.save_control_to_wapt('.')


if __name__ == '__main__':
    update_package()

    

Changelog

No changelog
    

manifest.sha256

[["Firefox Setup 60.0.exe", "7aef18646962b9e367cf291489625e3a6b20739013130e2194731ee8aaa83260"], ["WAPT/icon.png", "948e4bf2f1c1595091315354eb9fd9fb8f77d6675a2dd24337e35d9b7a4966a1"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"], ["setup.py", "55087a1cf84c50277e154a1e59569d61fc7869813e90ab213c55513fe2ce86eb"], ["WAPT/control", "7635724960bd8555759e5c477bfb5964faa7f9aed142ae4c0a7b178b6feca6f8"]]
    

Forum feed

WAPT Packages / Paquets WAPT • Re: chiffrer ses pass wapt
Dans ce cas Il faut faire un script python à coté qui tourne en tâche planifiée.

Ne pas le faire dans un paquet. Sinon on est justement obligé de mettre les mots de passe dans le paquet.

Algo du script:

- Parcours de la base de donnée
- Pour chaque poste, analyser l'inventaire pour savoir ce qu'il faut ajouter en dépendance.

CODE :

data = json.loads(wgets('https://%s:%s@%s/api/v1/hosts?columns=host_certificate&limit=10000' % (user,password,urlserver)))for value in data['result']:blabalba
- Editer le paquet machine.
- ajouter les dépendances
- uploader le paquet machine.

CODE :

    myWapt = Wapt(config_filename=makepath(r'C:\Users\Administrateur\AppData\Local\waptconsole\waptconsole.ini'))    tmpdir = 'c:/dummy'    myWapt.edit_host(machine,target_directory=tmpdir,append_depends='tis-firefox')    myWapt.build_upload(r'c:\waptdev\test',private_key_passwd=ur'passwordkey',wapt_server_user='admin',wapt_server_passwd=ur'passwordserver')

Statistiques: Posté par sfonteneau — 19 juillet 2018, 16:34


WAPT Packages / Paquets WAPT • Re: [OK] Impossible d'éditer un paquet host à travers un script

CODE :

    myWapt = Wapt(config_filename=makepath(r'C:\Users\Administrateur\AppData\Local\waptconsole\waptconsole.ini'))    tmpdir = 'c:/dummy'    myWapt.edit_host('dummy.tranquilit.local',target_directory=tmpdir,append_depends='tis-firefox')    myWapt.build_upload(r'c:\waptdev\test',private_key_passwd=ur'passwordkey',wapt_server_user='admin',wapt_server_passwd=ur'passwordserver')

Statistiques: Posté par sfonteneau — 18 juillet 2018, 23:49