tis-seadrive icon

SeaDrive

Paquet d’installation silencieuse pour SeaDrive

2.0.28-34

  • package: tis-seadrive
  • name: SeaDrive
  • version: 2.0.28-34
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor: Seafile Ltd.
  • licence: GPLv2
  • locale: all
  • target_os: ubuntu-jammy
  • impacted_process: seadrive,seadrive-gui
  • architecture: x64
  • signature_date:
  • size: 1.04 Mo
  • installed_size: 271.18 Mo
  • homepage : https://www.seafile.com/

package           : tis-seadrive
version           : 2.0.28-34
architecture      : x64
section           : base
priority          : optional
name              : SeaDrive
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : SeaDrive enables you to access files on the server without syncing to local disk. It works like a network drive.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : ubuntu-jammy
min_wapt_version  : 2.0
sources           : https://www.seafile.com/en/download/
installed_size    : 271183872
impacted_process  : seadrive,seadrive-gui
description_fr    : SeaDrive vous permet d'accéder aux fichiers sur le serveur sans synchronisation avec le disque local. Il fonctionne comme un lecteur réseau
description_pl    : SeaDrive umożliwia dostęp do plików na serwerze bez konieczności synchronizacji na dysku lokalnym. Działa jak dysk sieciowy
description_de    : Mit SeaDrive können Sie auf Dateien auf dem Server zugreifen, ohne sie mit der lokalen Festplatte zu synchronisieren. Es funktioniert wie ein Netzlaufwerk
description_es    : SeaDrive permite acceder a los archivos del servidor sin necesidad de sincronizarlos con el disco local. Funciona como una unidad de red
description_pt    : SeaDrive permite o acesso a ficheiros no servidor sem sincronização com o disco local. Funciona como uma unidade de rede
description_it    : SeaDrive consente di accedere ai file sul server senza sincronizzare il disco locale. Funziona come un'unità di rete
description_nl    : Met SeaDrive hebt u toegang tot bestanden op de server zonder ze naar de lokale schijf te synchroniseren. Het werkt als een netwerkschijf
description_ru    : SeaDrive позволяет получить доступ к файлам на сервере без синхронизации с локальным диском. Он работает как сетевой диск
audit_schedule    : 
editor            : Seafile Ltd.
keywords          : sharing,file,seafile,drive,sea
licence           : GPLv2
homepage          : https://www.seafile.com/
package_uuid      : fad50590-c4e6-44be-af7d-3bbafe6babaa
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://manual.seafile.com/changelog/drive-client-changelog/
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 095bf254df112880418ca67754fab61e3d80467a8218bf911530a9a9aeade66b
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-25T00:01:40.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         : Kk5SNTsZChTjs4Enpf6C+pU6cRcKOfK/BXVoGmdZ4MQsQnCfVbEK6adtk4kEs+DkyJ89/Mx24t0FGGDOyePuc1ZAt9W7f8vrQApdL7rHJaV+Ghi/HmruiItOiYvj0E9S3qc/N3yx7bG3BKkNSf31mo1rdyxLNKXfyyZYOWc01ABPFeqV6viuUFIWkcgxg+myiHz4oYWG0WToSILjmCJWNASpxyjDZCXM9Hsyc0HPT3hIWMnJjKjo1W41PEY9TOhr0SI7UaXWO/2i+sChR+w3y4y6JhoMpQpLcnbmCNwSnnVnKFDDjPwwQYxW16Ow7K4Ev6HyGl6wnrfvjI4POA4soA==

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *


def install():
    try:
        run("LANG=C DEBIAN_FRONTEND=noninteractive apt-get install ./seadrive*.deb -y")
    except:
        run("LANG=C DEBIAN_FRONTEND=noninteractive apt-get install ./*.deb -y")


def uninstall():
    for u in installed_softwares('seadrive'):
        if 'seadrive' in u['key'] :
            if not [l for l in installed_softwares() if l['key'] == u['key']]:
                continue
            uninstall_apt(u['key'],autoremove=True)

# -*- coding: utf-8 -*-
from setuphelpers import *
import gzip
from io import BytesIO
from setuphelpers import Version,wgets
from setupdevhelpers import *

def update_package():
    # Declaring local variables
    result = False
    proxies = get_proxies_from_wapt_console()

    if not proxies:
        proxies = get_proxies()

    dict_arch = {"x64": "amd64","x86":"i386","arm":"armhf","arm64":"arm64"}

    urldepot = 'https://linux-clients.seafile.com/seadrive-deb/' + control.target_os.split('-')[1]
    dist = "stable"

    arch = dict_arch[control.architecture]
    package_name_list = ["seadrive-gui"]


    with gzip.open(BytesIO(wgets('%s/dists/%s/main/binary-%s/Packages.gz' % (urldepot,dist,arch),proxies=proxies))) as f:
        data = f.read().decode('utf-8')

    list_package = listcontrol_to_dict_data(data,'\nPackage: ')
    all_dep=[]

    last_version= None
    list_deb = []
    for package_name in package_name_list :

        last_package = sorted([u for u in list_package if u['package'] == package_name], key=lambda p: (Version(p['version'].split(':',1)[-1].split('+')[0])), reverse=True)[0]
        if not last_version:
            last_version = last_package['version'].split(':',1)[-1].split('+')[0]

        all_dep.append(last_package)

        for s in last_package.get('depends','').split(','):
            for p in s.split('|'):
                get_all_dep_version_pacakge(list_package,p.split('(')[0].strip(),all_dep,already_check={})

        for u in all_dep:
            list_deb.append(urldepot + '/' + u['filename'])

    list_all_file = []
    for f in list_deb:
        filename = f.split('/')[-1]
        list_all_file.append(filename)
        if not isfile(filename):
            wget(f,filename,proxies=proxies)

    for f in glob.glob('*.deb'):
        if not f in list_all_file:
            remove_file(f)

    control.set_software_version(last_version)
    control.save_control_to_wapt()



def listcontrol_to_dict_data(data=None, first_entry=None):
    list_package = '\n' + data
    list_control=[]
    for i in list_package.split(first_entry):
        if not i.strip('\n'):
            continue
        list_control.append(first_entry.replace('\n','') + i)

    list_package = []
    for pkg in list_control:
        entry = {}
        gpg = False
        for l in pkg.split('\n'):

            if '-----BEGIN PGP PUBLIC KEY BLOCK-----' in l:
                gpg = True
                continue
            if '-----END PGP PUBLIC KEY BLOCK-----' in l:
                gpg = False
                continue
            if gpg :
                continue

            if not l:
                continue
            if (':' in l) and (not '::' in l) and (not l.startswith(' ')) :
                key = l.split(':',1)[0].strip().lower()
                value = l.split(':',1)[1].strip()
                entry[key] = value.strip('\n')
            else:
                entry[key] =  entry[key].strip('\n') + ' ' if entry[key].strip() else "" + l.strip()

        list_package.append(entry)
    return list_package


def get_all_dep_version_pacakge(list_package,package_name,all_dep,already_check):
    if package_name in already_check:
        return
    already_check[package_name]=None
    last_package = sorted([u for u in list_package if u['package'] == package_name], key=lambda p: (Version(p['version'].split(':',1)[-1].split('+')[0])), reverse=True)
    if last_package:
        last_package = last_package[0]
        all_dep.append(last_package)
    else:
        return
    for k in last_package.get('depends','').split('|'):
        for p in k.split(','):
            get_all_dep_version_pacakge(list_package,p.split('(')[0].strip(),all_dep,already_check)

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
851b9f6668bad5c48cba3d8f1aff38d9b45f49f3af0fb50ea21f6eded89dd61e : WAPT/control
095bf254df112880418ca67754fab61e3d80467a8218bf911530a9a9aeade66b : WAPT/icon.png
e96593d19fa201c0676dc0b152bb605778b1bda42ef9d2a8bd5d3569481d708a : libsearpc1_3.2.0_amd64.deb
7a4f82fa88ff68cb89ad5adf754bf631664ebfa25cb1942609ee0e8d09fcaec0 : luti.json
35bb9100ef8fbde47e4e7985f6c127af721ebb4c2f90fe9003e37eede01ff9ce : seadrive-daemon_2.0.28_amd64.deb
29f63dfb94cb163beb3bc0c2f48c57f9f0023a7a1dda6f8cae4a381e39524899 : seadrive-gui_2.0.28_amd64.deb
1afb8890a77d90585790206c55d5bf648f75b4a07dcc39d483dc6b2b506019ba : setup.py
fd77a2c2873fc2ba0578a318ba39e184b9908d95c929a1af8b5dfcb49e623a7a : update_package.py