tis-bitwarden

1.28.3-6
Bitwarden is a freemium and open source password manager under the AGPL license, which allows you to generate and store passwords in a secure manner. These elements are protected by a single password called "master password"
9269 downloads
Download

  Description 

  • package : tis-bitwarden
  • version : 1.28.3-6
  • architecture : x64
  • categories : Security,Utilities
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Simon Fonteneau
  • description : Bitwarden is a freemium and open source password manager under the AGPL license, which allows you to generate and store passwords in a secure manner. These elements are protected by a single password called "master password"
  • locale : all
  • target_os : linux
  • min_wapt_version : 1.8
  • sources : https://github.com/bitwarden/desktop/releases
  • installed_size :
  • impacted_process : Bitwarden
  • description_fr : Bitwarden est un gestionnaire de mots de passe freemium et open source sous licence AGPL, qui permet de générer et de conserver des mots de passe de manière sécurisée. Ces éléments sont protégés par un seul et unique mot de passe appelé « mot de passe maître »
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : 8bit Solutions LLC
  • licence : AGPL-3.0 (d) and GPL-3.0
  • signature_date : 2021-10-21T11:45:34.606358
  • Homepage : https://bitwarden.com

  Setup.py 

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

uninstallkey = []

# Defining variables
bin_name_deb_string = 'Bitwarden-%s-amd64.deb'
bin_name_rpm_string = 'Bitwarden-%s-x86_64.rpm'
package_name = 'bitwarden'


def install():
    # Initializing variables
    package_version = control.version.split('-')[0]
    bin_name_deb = bin_name_deb_string % package_version
    bin_name_rpm = bin_name_rpm_string  % package_version

    # Installing the package
    if platform.linux_distribution()[0].lower() in ['debian', 'ubuntu', 'mint']:
        print('Installing: %s' % bin_name_deb)
        install_deb(bin_name_deb)

    if platform.linux_distribution()[0].lower() in ['centos linux', 'centos', 'suse', 'fedora', 'redhat']:
        print('Installing: %s' % bin_name_rpm)
        install_yum(bin_name_rpm)


def uninstall():
    # Uninstalling the package
    if platform.linux_distribution()[0].lower() in ['debian', 'ubuntu','mint']:
        print('Uninstalling: %s' % package_name)
        uninstall_apt(package_name)

    if platform.linux_distribution()[0].lower() in ['centos linux', 'centos', 'suse', 'fedora', 'redhat']:
        print('Uninstalling: %s' % package_name)
        uninstall_yum(package_name)


def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name
    git_repo = 'bitwarden/desktop'
    url_api = 'https://api.github.com/repos/%s/releases/latest' % git_repo
    bin_deb_end = bin_name_deb_string.split('%s')[-1]
    bin_rpm_end = bin_name_rpm_string.split('%s')[-1]

    # Getting latest version from GitHub
    print('API used is: ' + url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))
    version = json_load['tag_name'].replace('v','')
    latest_bin_deb = bin_name_deb_string % version
    latest_bin_rpm = bin_name_rpm_string % version

    for download in json_load['assets']:
        if download['browser_download_url'].endswith(bin_deb_end) and not 'Portable' in download['browser_download_url']:
            url_dl_deb = download['browser_download_url']
            break
    for download in json_load['assets']:
        if download['browser_download_url'].endswith(bin_rpm_end) and not 'Portable' in download['browser_download_url']:
            url_dl_rpm = download['browser_download_url']
            break

    print("Latest %s version is: %s" % (app_name, version))
    print('Download url for APT-based systems is: %s' % url_dl_deb)
    print('Download url for YUM-based systems is: %s' % url_dl_rpm)

    # Downloading latest binaries
    if not isfile(latest_bin_deb):
        print('Downloading: ' + latest_bin_deb)
        wget(url_dl_deb, latest_bin_deb, proxies=proxies)

    if not isfile(latest_bin_rpm):
        print('Downloading: ' + latest_bin_rpm)
        wget(url_dl_rpm, latest_bin_rpm, proxies=proxies)

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        result = True
    control.version = '%s-%s' % (Version(version), control.version.split('-', 1)[-1])
    #control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating update-package-sources
    return result



def get_proxies():
    import platform
    if platform.python_version_tuple()[0] == '3':
        from urllib.request import getproxies
    else:
        from urllib import getproxies
    return getproxies()


def remove_outdated_binary(version,list_extensions=('exe','msi','deb','rpm','dmg','pkg')):
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*.%s' % file_ext):
            if not version in bin_in_dir:
                print('Outdated binary: %s Removed' % bin_in_dir)
                remove_file(bin_in_dir)


def rename_filename_version(filename,old_version,new_version):
    old_filename = filename
    new_filename = filename.replace(old_version,new_version)
    if isfile(new_filename):
        remove_file(new_filename)
    os.rename(old_filename,new_filename)


def remove_outdated_binaries(version, list_extensions=['exe','msi','deb','rpm','dmg','pkg'], list_filename_contain=None):
    if type(list_extensions) != list:
        list_extensions = [list_extensions]
    if list_filename_contain:
        if type(list_filename_contain) != list:
            list_filename_contain = [list_filename_contain]
    list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
    for file_ext in list_extensions:
        for bin_in_dir in glob.glob('*%s' % file_ext):
            if not version in bin_in_dir:
                remove_file(bin_in_dir)
            if list_filename_contain:
                for filename_contain in list_filename_contain:
                    if not filename_contain in bin_in_dir:
                        remove_file(bin_in_dir)




										

  Changelog 



Changelog software url : https://github.com/bitwarden/desktop/releases



No changelog.txt.
									
  manifest.sha256