tis-olvid icon

Olvid

Silent install package for Olvid

2.6.0-2

  • package: tis-olvid
  • name: Olvid
  • version: 2.6.0-2
  • categories: Messaging
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • licence: opensource_free,cpe:/a:gnu:agpl_v3,wapt_public
  • target_os: linux
  • impacted_process: Olvid
  • architecture: x64
  • signature_date:
  • size: 125.65 Mo
  • installed_size: 240.14 Mo

package           : tis-olvid
version           : 2.6.0-2
architecture      : x64
section           : base
priority          : optional
name              : Olvid
categories        : Messaging
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Olvid est un système de messagerie instantanée chiffrée. La mise en relation se fait entre téléphones et sans intervention du serveur d'adresses de l'opérateur
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : linux
min_wapt_version  : 2.3
sources           : 
installed_size    : 240139322
impacted_process  : Olvid
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,cpe:/a:gnu:agpl_v3,wapt_public
homepage          : 
package_uuid      : e57f15ad-85a4-4fcc-b51c-455885c1c71c
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : dd1ccba811494a7e4cf44af7ba8fe9a8606f8d023820008d240378cbd8d3ec22
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-09-14T18:14:12.000000
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
signature         : UhCaeCKYxRkUFY7vhYojhqyONNyxqD1nq8ntwtCD4LXfH1vq3oeAuwEgLcpXOSOdpGuKKytn5lbihYG/DtvGrCSnBXrrmqvO3TOBEdXaHwlx7ejOmI+1CL5rs0O5xJxRyLbpZ7ITfBSz1CVnh2RsZc8IzAbweiIRcuTdoccg8n8ioAWdDCi4lnAiACpOwHRTzbIPKuPocF/4iPHQTdqu8h9Da2W5FSFPxd1sL8rGl5WVnLXGQUBw/FDPEsg1YirdoCAEJIseM8Mek86UPo4sNwVj4cW8eERxLbfFc3rNBzUuEwG30/X5Jkjf4op8+valnKKXOqyh0MvNdGSRP1EndA==

# -*- coding: utf-8 -*-
from setuphelpers import *
import glob
import tarfile
from typing import List, Optional

def install():

    if type_debian():
        install_apt('xdg-utils')

    if type_redhat():
        install_yum('xdg-utils')

    # décompressez l'archive
##    run('tar xzf %s -C /opt/' % glob.glob('*.tar.gz')[0])

    extract_tar(glob.glob('*.tar.gz')[0],"/opt/")

    # ajoutez olvid au PATH
    run('ln -sf /opt/olvid/bin/olvid /usr/bin/olvid')

    if not isdir('/usr/share/desktop-directories'):
        mkdirs('/usr/share/desktop-directories')

    # configurez xdg pour automatiquement ouvrir Olvid avec certaines url
    run('xdg-desktop-menu install /opt/olvid/share/olvid-olvid.desktop')

    #run('update-desktop-database $HOME/.local/share/applications/')

def remove():
    run('xdg-desktop-menu uninstall /opt/olvid/share/olvid-olvid.desktop')
    remove_tree('/opt/olvid')


def audit():
    if isfile('/opt/olvid/bin/olvid'):
        return "OK"
    else:
        print('/opt/olvid/bin/olvid not found')
        return "ERROR"


def extract_tar(
    tar_path: str,
    extract_path: str = ".",
    exclude_list: Optional[List[str]] = None,
    include_list: Optional[List[str]] = None
) -> None:
    """
    Extracts a tar archive to the given directory, with optional inclusion or exclusion filtering.

    :param tar_path: Path to the .tar (or .tar.gz, .tar.bz2, etc.) archive.
    :param extract_path: Directory where files should be extracted.
    :param exclude_list: List of path prefixes to exclude from extraction.
    :param include_list: List of path prefixes to include exclusively. Overrides exclude_list if provided.
    """
    with tarfile.open(tar_path, 'r:*') as tar:
        all_members = tar.getmembers()

        if include_list:
            include_set = set(include_list)
            members = [
                m for m in all_members
                if any(m.name.startswith(inc) for inc in include_set)
            ]
        elif exclude_list:
            exclude_set = set(exclude_list)
            members = [
                m for m in all_members
                if not any(m.name.startswith(exc) for exc in exclude_set)
            ]
        else:
            members = all_members

        tar.extractall(path=extract_path, members=members)

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


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    url = "https://www.olvid.io/download/fr/"

    # Getting latest version from official sources
    print("URL used is: %s" % url)
    for bs_search in bs_find_all(url, "i", "class", "fa fa-download", proxies=proxies):
        if "tar.gz" in bs_search.parent.get("href", ""):
            download_url = bs_search.parent.get("href", "")
            latest_bin = bs_search.parent.get("href", "").split("/")[-1]
            version = latest_bin.split("-")[-1].split(".tar.gz")[0]
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Deleting outdated binaries
    for f in glob.glob('*.tar.gz'):
        if f != latest_bin:
            remove_file(latest_bin)

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))

    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return package_updated

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
094dbcdf59e3a68bf8356d9137152388735d9ca2eb45b05b4e7d2cb5f04fc779 : WAPT/control
dd1ccba811494a7e4cf44af7ba8fe9a8606f8d023820008d240378cbd8d3ec22 : WAPT/icon.png
ba67057225def480ecd20a421410e12e44d4625d86c9fb2a9781dd3bb73090aa : luti.json
fd061ee8085271e37db41d8e9e56d524a85965810af210d2c92b0c1859e3ee85 : olvid-2.6.0.tar.gz
9bc55cd0bdc8a58290fe7899b6503672262afb901eb38de61e1b3601cff5d620 : setup.py
98002b404f485a340cba9508a58b19c5e4ae6dc35abd5da7f9786550105184e8 : update_package.py