tis-rocketchat-server
Paquet d’installation silencieuse pour tis-rocketchat-server
8.4.0-12
Les paquets PREPROD sont des paquets construits via LUTI.
Ils restent généralement 5 jours en PREPROD, après quoi un deuxième scan VirusTotal est effectué pour vérifier que le status n'a pas changé.
Si le paquet réussit ce dernier contrôle, il est promu en PROD et publié sur le store.
- package: tis-rocketchat-server
- version: 8.4.0-12
- maintainer: Kevin Guerineau
- licence: MIT
- locale: all
- target_os: debian
- impacted_process: node
- architecture: x64
- signature_date:
- size: 268.16 Mo
- homepage : https://rocket.chat
- depends:
package : tis-rocketchat-server
version : 8.4.0-12
architecture : x64
section : base
priority : optional
name :
categories :
maintainer : Kevin Guerineau
description : Rocket.Chat permit to communicate and collaborate with your team, share files, chat in real time or switch to video/audio conferencing
depends : tis-nodejs22,tis-mongodb-server-community-7
conflicts :
maturity : PREPROD
locale : all
target_os : debian
min_wapt_version : 2.2
sources :
installed_size :
impacted_process : node
description_fr : Rocket.Chat permet de communiquer et de collaborer avec votre équipe, de partager des fichiers, de discuter en temps réel ou de passer à une conférence vidéo/audio.
description_pl : Rocket.Chat pozwala na komunikację i współpracę z zespołem, udostępnianie plików, czat w czasie rzeczywistym lub przełączenie się na wideokonferencję/audio konferencję
description_de : Rocket.Chat ermöglicht es, mit Ihrem Team zu kommunizieren und zusammenzuarbeiten, Dateien auszutauschen, in Echtzeit zu chatten oder zu Video-/Audiokonferenzen zu wechseln
description_es : Rocket.Chat permite comunicarse y colaborar con su equipo, compartir archivos, chatear en tiempo real o cambiar a videoconferencia/audioconferencia.
description_pt : Rocket.Chat permite comunicar e colaborar com a sua equipa, partilhar ficheiros, conversar em tempo real ou mudar para videoconferência/áudio
description_it : Rocket.Chat permette di comunicare e collaborare con il team, condividere file, chattare in tempo reale o passare a videoconferenze/audioconferenze.
description_nl : Rocket.Chat staat toe te communiceren en samen te werken met uw team, bestanden te delen, in real time te chatten of over te schakelen naar video/audio-conferencing
description_ru : Rocket.Chat позволяет общаться и сотрудничать с вашей командой, обмениваться файлами, общаться в режиме реального времени или переключаться на видео/аудиоконференции
audit_schedule :
editor :
keywords :
licence : MIT
homepage : https://rocket.chat
package_uuid : 5c182afc-0f26-4f7a-9f07-b4c068c5084a
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version : 11
max_os_version : 12
icon_sha256sum : b8127266889154a1af4f52b3add4e58cbb948d26621a60a81a5ce52243b4ed21
signer : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date : 2026-04-30T21:58:20.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 : g1geWr1mUOcE267uWGLUcCq6ZAMBM0rPs68hVxL4vOQbete0MEUvpDnqISlkm0GkERu4FlfPrb+LVZdaZ+VDcpndSnnDp3c+PSuYIkE0szs5JFqYvfzubEVPMyiSvBYWADUfZ1R2lkD/UtbJelMo7AcbjDOGnQ5fprS76tL5L2igh4mrP7mtCZC1ZFSQzeNMhklTRYdROEX4tvCf01igm9zL56DR7+DVMBFpMnk4YFICxj8F07awUZHdbPdKKn8gSukahFFeJQwUPLJ+1io4JY4B9t3is1mtbx9HJ484hOUGIt6bw5gPeJllp1Rkjk0lN8HqvIdCaEH4rsTpXmpmmQ==
# -*- coding: utf-8 -*-
from setuphelpers import *
import jinja2
from waptcrypto import SSLCertificate, SSLPrivateKey
import time
front_web = 'nginx' # nginx,none
rocketchat_url = 'https://rocketchat.yourdomain.com'
generate_ssl_cert = True # Values : True / False. Use False if you use commercial, Let's Encrypt or your PKI certificate.
# In this case, please configure "ssl_certificate_path" and "ssl_key_path" around line 220.
ssl_certificate_path = None # Set None if generate_ssl_cert = True
ssl_key_path = None # Set None if generate_ssl_cert = True
def systemd_enable_start_service(servicename):
return run('LANG=C systemctl enable --now %s' % (servicename))
def install():
print('Install dependances')
install_apt('curl')
install_apt('build-essential')
install_apt('graphicsmagick')
install_apt('sudo')
print('If upgrade, stop Rocket.Chat')
try:
systemd_stop_service('rocketchat')
first_install = False
except:
print("It's the first install")
first_install = True
print('Stop MongoDB Server')
systemd_stop_service('mongod')
print('Extact archive')
run('tar xzf rocket.chat.tgz -C /tmp')
print('Install node dependancies')
print(run('(cd /tmp/bundle/programs/server; npm i)'))
if not first_install:
print('Remove old files')
remove_tree('/opt/Rocket.Chat')
print('Move files')
copytree2('/tmp/bundle','/opt/Rocket.Chat')
if first_install:
print('Create rocketchat user')
run('sudo useradd -M rocketchat && sudo usermod -L rocketchat')
print('Set user rights')
run('sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat')
node_path = run('which node').split('\n')[0]
if first_install:
print('Create service file')
service = f"""[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service
[Service]
Environment=ROOT_URL=http://localhost:3000
Environment=PORT=3000
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
Environment=MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
ExecStart={node_path} /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat
[Install]
WantedBy=multi-user.target
"""
with open('/lib/systemd/system/rocketchat.service','w') as service_file:
service_file.write(service)
run('systemctl daemon-reload')
#if first_install:
print('Configure MongoDB Server for Rocket.Chat')
filecopyto('files/mongod.conf','/etc/mongod.conf')
print('Start MongoDB Server')
systemd_start_service('mongod')
if first_install:
time.sleep(10)
print('Create the replicaset')
run('mongosh --eval "printjson(rs.initiate())"')
systemd_enable_start_service('rocketchat')
if first_install:
if front_web == 'nginx':
print('Install Nginx')
install_apt('nginx')
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader('templates'))
template = jinja_env.get_template('nginx.conf.j2')
print('Generate dhparam')
run('openssl dhparam -out /etc/nginx/dhparam 2048')
if generate_ssl_cert:
print('Generate SSL key and certificate')
ap_ssl_dir = makepath('/etc','ssl')
mkdirs(ap_ssl_dir)
key_fn = os.path.join(ap_ssl_dir,'private','rocketchat_key.pem')
key = SSLPrivateKey(key_fn)
if not os.path.isfile(key_fn):
print('Create SSL RSA Key %s' % key_fn)
key.create()
key.save_as_pem()
cert_fn = os.path.join(ap_ssl_dir,'certs','rocketchat_cert.pem')
if os.path.isfile(cert_fn):
crt = SSLCertificate(cert_fn)
if os.path.isfile(cert_fn):
crt = SSLCertificate(cert_fn)
if crt.cn != get_fqdn():
os.rename(cert_fn,"%s-%s.old" % (cert_fn,'{:%Y%m%d-%Hh%Mm%Ss}'.format(datetime.datetime.now())))
crt = key.build_sign_certificate(cn=get_fqdn(),is_code_signing=False)
print('Create X509 cert %s' % cert_fn)
crt.save_as_pem(cert_fn)
else:
crt = key.build_sign_certificate(cn=get_fqdn(),is_code_signing=False)
print('Create X509 cert %s' % cert_fn)
crt.save_as_pem(cert_fn)
template_variables = {
'rocketchat_url': rocketchat_url.replace('https://','').replace('http://',''),
'ssl_certificate_path': cert_fn.replace('\\','/'),
'ssl_key_path': key_fn.replace('\\','/')
}
else:
template_variables = {
'rocketchat_url': rocketchat_url.replace('https://','').replace('http://',''),
'ssl_certificate_path': makepath('/etc','ssl','certs','rocketchat_cert.pem'),
'ssl_key_path': makepath('/etc','ssl','private','rocketchat_key.pem')
}
config_string = template.render(template_variables)
print('Create Nginx configuration file %s' % makepath('/etc','nginx','sites-avalables','rocketchat.conf'))
with open(makepath('/etc','nginx','sites-available','rocketchat.conf'), 'wt') as dst_file:
dst_file.write(config_string)
print('Create symlink to activate rocketchat site')
if not os.path.exists('/etc/nginx/sites-enabled/rocketchat.conf'):
print(run('ln -s /etc/nginx/sites-available/rocketchat.conf /etc/nginx/sites-enabled/rocketchat.conf'))
print('Test Nginx configuration and start nginx')
print(run('nginx -t'))
print(run('systemctl restart nginx'))
print(run('systemctl enable nginx'))
else:
print('No front web selected.')
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
import json
# Declaring specific app values (TO CHANGE)
package_name = "rocketchat-server"
def update_package():
print("Download/Update package content from upstream binary sources")
# Getting proxy informations from WAPT settings
proxy = {}
if platform.system() == "Windows" and isfile(makepath(user_local_appdata(), "waptconsole", "waptconsole.ini")):
proxywapt = inifile_readstring(makepath(user_local_appdata(), "waptconsole", "waptconsole.ini"), "global", "http_proxy")
if proxywapt:
proxy = {"http": proxywapt, "https": proxywapt}
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0"
# Specific app values
app_name = control.name
git_repo = "RocketChat/Rocket.Chat"
url_api = "https://api.github.com/repos/%s/releases" % git_repo
version = sorted(json.loads(wgets(url_api, proxies=proxy, user_agent=user_agent)), key=lambda p: (Version(p['tag_name'] if not 'rc' in p['tag_name'].lower() else '0')), reverse=True)[0]['tag_name']
url_dl_deb = f'https://releases.rocket.chat/{version}/download'
latest_bin_deb = "rocket.chat.tgz"
print("Latest " + app_name + " version is: " + version)
print("Download url for APT-based systems is: " + url_dl_deb)
# Downloading latest binaries
if not isfile(latest_bin_deb):
print("Downloading: " + latest_bin_deb)
wget(url_dl_deb, latest_bin_deb, proxies=proxy)
# Changing version of the package
control.version = "%s-%s" % (version, int(control.version.split("-", 1)[1]) + 1)
control.save_control_to_wapt()
print("Changing version to " + control.version + " in WAPT\\control")
else:
print("This package is already up-to-date")
# Deleting outdated binaries
for bin_in_dir in glob.glob("*.deb"):
if bin_in_dir != latest_bin_deb:
print("Outdated binary: " + bin_in_dir + " Deleted")
remove_file(bin_in_dir)
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
6aa9e6282ee87f95198087a07ce5628a37b400a23f94cd9e5dda782881fa1a43 : WAPT/control
b8127266889154a1af4f52b3add4e58cbb948d26621a60a81a5ce52243b4ed21 : WAPT/icon.png
0a5e172371303f7055b31e81aa342338f48812f652de307b3e57747d4584880e : files/mongod.conf
18b68fab3e2b3eaced3f4ffb62832d4b7af2c1f52cb3c1ba12170cfe25ea08f4 : luti.json
c5b419e44b64c9a102c351aaa1ad9bc79d01dcfb9250a7deb166196feb5cc4aa : rocket.chat.tgz
30c22adc9a736ca9242874fd195bbf405e18d64e566a4a5164a2f1e0dce8393c : setup.py
b756e700ac759d47470452f0956806bccb9176bd7eca87b35745f0b268b62422 : templates/nginx.conf.j2
cbe96b8d14f5e4dda204423e8ad94de94c672e4b6f416ad28b1d357c915b03aa : update_package.py