tis-seafile icon

Seafile

Paquet d’installation silencieuse pour Seafile

9.0.6-2

  • package: tis-seafile
  • name: Seafile
  • version: 9.0.6-2
  • categories: Office
  • maintainer: WAPT Team,Tranquil IT,Jimmy PELÉ,Hubert TOUVET,Amelie LE JEUNE
  • editor: HaiWenHuZhi ltd.
  • licence: opensource_free,wapt_public,cpe:/a:gnu:gpl_v2
  • locale: all
  • target_os: ubuntu-noble
  • impacted_process: seafile-applet,seaf-daemon
  • architecture: x64
  • signature_date:
  • size: 1.96 Mo
  • installed_size: 282.63 Mo
  • homepage : https://www.seafile.com/

package           : tis-seafile
version           : 9.0.6-2
architecture      : x64
section           : base
priority          : optional
name              : Seafile
categories        : Office
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Hubert TOUVET,Amelie LE JEUNE
description       : Seafile is an open source file storage and sharing solution
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : ubuntu-noble
min_wapt_version  : 2.3
sources           : https://www.seafile.com/en/download/
installed_size    : 282629518
impacted_process  : seafile-applet,seaf-daemon
description_fr    : Seafile est une solution de stockage et de partage de fichiers open source
description_pl    : Seafile to rozwiązanie open source do przechowywania i udostępniania plików
description_de    : Seafile ist eine Open-Source-Lösung zur Speicherung und gemeinsamen Nutzung von Dateien
description_es    : Seafile es una solución de código abierto para almacenar y compartir archivos
description_pt    : O Seafile é uma solução de armazenamento e partilha de ficheiros de código aberto
description_it    : Seafile è una soluzione open source per l'archiviazione e la condivisione di file
description_nl    : Seafile is een open source oplossing voor het opslaan en delen van bestanden
description_ru    : Seafile - это решение для хранения и обмена файлами с открытым исходным кодом
audit_schedule    : 
editor            : HaiWenHuZhi ltd.
keywords          : seafile,cloud,file,storage,sharing,solution,client
licence           : opensource_free,wapt_public,cpe:/a:gnu:gpl_v2
homepage          : https://www.seafile.com/
package_uuid      : c95b88d0-459a-48d0-afc6-b7330c242c11
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://download.seafile.com/published/seafile-manual/changelog/client-changelog.md
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 2fa8a089ab65b8b5746bf57908d847606256cde5d7da32929a132f18fb7df741
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-08-17T22:05:30.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         : C2jm0OlxqMjlTJHOI9u6EIIl0gCFZgn828oDQm2MHpWTwSk9lSnMhY6nAZ5qYkk61+UVj+rjpdji1E5pBC6VhmkYfAbEPLQjokrGmRGWeBJP7F/un+4EFwrtvI3MyVkNlgzoR+yCe5CwMeueJlzKtn20BkfW/5hVhgwbT9DlD52CeqRDUqwGQpaF8UgYfQ6z/rWiD9Nu0x8RvPuFHbwc+nv4niWzBmCy9+kJf0tOw4OjojQ2awKet32uGtEC0bdftvF2gK0jKpNf8jc4FvWCBuPcgU9LQIHD+b4YQfnk8UHCZl/P1xHvWKTtjGAFw9N6JprQCfdh6V2PdEXut7vOcw==

# -*- 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 ./seafile*.deb -y")
    except:
        run("LANG=C DEBIAN_FRONTEND=noninteractive apt-get install ./*.deb -y")

def uninstall():
    for u in installed_softwares('seafile'):
        if 'seafile' 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/seafile-deb/' + control.target_os.split('-')[1]
    dist = "stable"

    arch = dict_arch[control.architecture]
    package_name_list = ["seafile-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
150a52532ce1b766f2dec9fc71c310c97644c332c124f2b76c4f7ab2d4550dae : WAPT/control
2fa8a089ab65b8b5746bf57908d847606256cde5d7da32929a132f18fb7df741 : WAPT/icon.png
a6848d2709013c73a0274d17b573eeae6c2bd37b88fb6684531d7406241a1574 : libseafile0_9.0.6_amd64.deb
f132c43eb4cf9054e37ca3af456d942a194335753502fd8344357ce75d035ead : libsearpc1_3.2.0_amd64.deb
28e0e08c48e6c20194a4e3ad2af97c59d146580e5eb3020cd9da15aea085112d : luti.json
3adc71faa8e9c1c6f191064e58ca0df2ab7d0868cf45720e7ad78e11cffe1103 : seafile-daemon_9.0.6_amd64.deb
512570a66784918a860084e0c279ff3955662afbaee13d126ddcad3be9c09088 : seafile-gui_9.0.6_amd64.deb
334cab5ed7ac7d540e8f0410e1a54b051f1f60138a302dba304977a5286caaa1 : setup.py
7dad28e5745375a92b65249b65c36e4ba064ccf69d241616bbb7e7f1c90d05a7 : update_package.py