chore: prevent installing recommended packages (e.g. installing cron leads to installing exim without it).

This commit is contained in:
holger krekel
2026-03-08 23:27:04 +01:00
parent ed9b4092a8
commit ff541b81ea

View File

@@ -6,7 +6,7 @@ import os
import shutil
import subprocess
import sys
from io import StringIO
from io import BytesIO, StringIO
from pathlib import Path
from chatmaild.config import read_config
@@ -478,6 +478,14 @@ class ChatmailDeployer(Deployer):
self.mail_domain = mail_domain
def install(self):
files.put(
name="Disable installing recommended packages globally",
src=BytesIO(b'APT::Install-Recommends "false";\n'),
dest="/etc/apt/apt.conf.d/00InstallRecommends",
user="root",
group="root",
mode="644",
)
apt.update(name="apt update", cache_time=24 * 3600)
apt.upgrade(name="upgrade apt packages", auto_remove=True)