tis-mongodb-server-community-7 icon

MongoDB Server Community

Paquet d'installation silencieuse pour MongoDB Server Community

7.0.40.0-6
System and network
System and network

package           : tis-mongodb-server-community-7
version           : 7.0.40.0-6
architecture      : x64
section           : base
priority          : optional
name              : MongoDB Server Community
categories        : System and network
maintainer        : Kevin Guerineau
description       : MongoDB is a document-oriented database management system that can be distributed to any number of computers and does not require a predefined data schema.
depends           : 
conflicts         : tis-mongodb-server-community-6,tis-mongodb-server-community-5
maturity          : PROD
locale            : all
target_os         : debian-bookworm
min_wapt_version  : 2.2
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : MongoDB est un système de gestion de base de données orienté documents, répartissable sur un nombre quelconque d'ordinateurs et ne nécessitant pas de schéma prédéfini des données.
description_pl    : MongoDB to zorientowany na dokumenty system zarządzania bazą danych, który może być dystrybuowany do dowolnej liczby komputerów i nie wymaga predefiniowanego schematu danych.
description_de    : MongoDB ist ein dokumentenorientiertes Datenbankverwaltungssystem, das auf beliebig vielen Computern verteilt werden kann und kein vordefiniertes Datenschema benötigt.
description_es    : MongoDB es un sistema de gestión de bases de datos orientado a documentos que puede distribuirse a cualquier número de ordenadores y no requiere un esquema de datos predefinido.
description_pt    : MongoDB é um sistema de gestão de bases de dados orientado para a documentação que pode ser distribuído para qualquer número de computadores e não requer um esquema de dados pré-definido.
description_it    : MongoDB è un sistema di gestione di database orientato ai documenti che può essere distribuito su un numero qualsiasi di computer e non richiede uno schema di dati predefinito.
description_nl    : MongoDB is een documentgeoriënteerd databasebeheersysteem dat op een willekeurig aantal computers kan worden gedistribueerd en geen vooraf gedefinieerd gegevensschema vereist.
description_ru    : MongoDB - это документо-ориентированная система управления базами данных, которая может быть распространена на любом количестве компьютеров и не требует предопределенной схемы данных.
audit_schedule    : 
editor            : MongoDB, Inc
keywords          : 
licence           : AGPL3.0
homepage          : https://www.mongodb.com
package_uuid      : 40da4838-5a14-403e-8f84-1f03b5ca0a0a
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 6c1229fda0b906acc164f55d1c3b9b221a60b7b009b795fcc9d2da85e1f25eb3
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2026-08-17T06:15:50.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         : p/x/BceG/HYUeYp9Q6Htv9f4LCFekr1qfYubnmpkXN3H2eIhgtYhWl7372IENKtaUtxxmSn83xagJXDOF8dHwPLloow5j5NegbcQ+QMZir/u9IHTVsYxuNuhjPbhmkvnxbsJOLStRlaLTa6x9AYALbqOF7nOZtFQnEI0vkS+PZK8AwA4XSkBftV7ca7D1feXC2W5RQQs/UeiGM7Ww1lNRynINAbEG9RNniw3exnaqr4yudW7q1/xJFkP8VK4viV2UXzwTmjLzGnshgDMsyGa8ASP6VdQiEyYYrGDXiirMIX3HRVbToFDikidvHlLGfT1ctfcBkByNWwNq2nwZeSPnw==

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

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

    print('Enable and start mongod service')
    systemd_enable_start_service('mongod')


def uninstall():
    uninstall_apt("mongodb-database-tools mongodb-mongosh mongodb-org-database mongodb-org-database-tools-extra mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools",autoremove=True)



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

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

    if not proxies:
        proxies = get_proxies()

    dict_arch = {"x64": "amd64"}

    urldepot = 'http://repo.mongodb.org/apt/debian'
    dist = control.target_os.split('-')[1]

    arch = dict_arch[control.architecture]
    package_name_list = ["mongodb-org-server","mongodb-org","mongodb-database-tools","mongodb-mongosh","mongodb-org-database","mongodb-org-database-tools-extra","mongodb-org-mongos","mongodb-org-shell","mongodb-org-tools"]

    if len(dist.split(' ')) < 2 :
        dist = dist + "/mongodb-org/7.0" +  ' ' + "main"

    disturl = dist.replace(' ','/')

    with gzip.open(BytesIO(requests.get('%s/dists/%s/binary-%s/Packages.gz' % (urldepot,disturl,arch),proxies=proxies).content)) 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],4)), 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)

        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(str(Version(last_version,4)).split('-')[0])
    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):
    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)

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
149989cf1c65971689fc38e9ae0fe1573726cd023e5e4bcd1deb6751ed7f69bf : WAPT/control
6c1229fda0b906acc164f55d1c3b9b221a60b7b009b795fcc9d2da85e1f25eb3 : WAPT/icon.png
fdb48592791155efd2cb27ee5dabd71078b2c6b1467766702e64335e60e07c22 : luti.json
101eb691713880ad2ece723ce4a655e81c6c026328d8e1cfd84aef687d4681b4 : mongodb-database-tools_100.17.0_amd64.deb
1244a88605d9ffcdcd64e3a78c8e31c2cc4c005a9d52c82f0aad1514e0f885d9 : mongodb-mongosh_2.9.2_amd64.deb
f8c00ef04bd9c651070c07be524d4f79c22387a2fa286fcc1c316d69a29f6b67 : mongodb-org-database-tools-extra_7.0.40_amd64.deb
211bfbe1e508076df476f40c24df1f4421406d2405115f9867aba5e7bd5eb912 : mongodb-org-database_7.0.40_amd64.deb
d8879427ee74ed3803dbe17d4d33af901f57ff70b288b148070550ea4af6eeee : mongodb-org-mongos_7.0.40_amd64.deb
0aae6312e6cc1e5487bc4f2bd2aaaa2d4e5fbd61023d72edd7abbf122541e9b1 : mongodb-org-server_7.0.40_amd64.deb
48c0193d6bf84ff4a48443e89c31feeb7675e42a35cc44ea07e9d6fc01b79e5f : mongodb-org-shell_7.0.40_amd64.deb
250ed7ecbf60a4fc24e9468f444f43174aafe1359405100b597b00bddf665146 : mongodb-org-tools_7.0.40_amd64.deb
e514baaec995ea53f9c7343ffbbe81669192a1353c86b948555bd53e373620ff : mongodb-org_7.0.40_amd64.deb
5325a210892c3ea085026662a958a9d56c1b79ebec29cf6253629ea4ad67a5e4 : setup.py
fa2bc40673cff707e8837e3ef6c29d88a576cd2a5241fc935d548d6b7967ae64 : update_package.py