mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
fix(cmdeploy): pin dovecot packages to prevent apt upgrades
As our .deb packages use Debian's version naming scheme, deploy an apt preferences file that sets Pin-Priority: -1 for all dovecot-* packages for every version of dovecot-* from every origin.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import io
|
||||||
import os
|
import os
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
@@ -53,6 +54,15 @@ class DovecotDeployer(Deployer):
|
|||||||
f"dpkg --force-confdef --force-confold -i {deb_list}",
|
f"dpkg --force-confdef --force-confold -i {deb_list}",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
files.put(
|
||||||
|
name="Pin dovecot packages to block Debian dist-upgrades",
|
||||||
|
src=io.StringIO(
|
||||||
|
"Package: dovecot-*\n"
|
||||||
|
"Pin: version *\n"
|
||||||
|
"Pin-Priority: -1\n"
|
||||||
|
),
|
||||||
|
dest="/etc/apt/preferences.d/pin-dovecot",
|
||||||
|
)
|
||||||
|
|
||||||
def configure(self):
|
def configure(self):
|
||||||
configure_remote_units(self.config.mail_domain, self.units)
|
configure_remote_units(self.config.mail_domain, self.units)
|
||||||
|
|||||||
Reference in New Issue
Block a user