Add MariaDB repo for debian 12

This commit is contained in:
VirtuBox
2023-12-01 16:52:33 +01:00
parent da4d6eaee7
commit 89c34e021f

View File

@@ -29,8 +29,7 @@ def pre_pref(self, apt_packages):
if ("mariadb-server" in apt_packages or "mariadb-client" in apt_packages): if ("mariadb-server" in apt_packages or "mariadb-client" in apt_packages):
# add mariadb repository excepted on raspbian and ubuntu 19.04 # add mariadb repository excepted on raspbian and ubuntu 19.04
if not (WOVar.wo_distro == 'raspbian' or if not (WOVar.wo_distro == 'raspbian'):
WOVar.wo_platform_codename == 'bookworm'):
Log.info(self, "Adding repository for MySQL, please wait...") Log.info(self, "Adding repository for MySQL, please wait...")
mysql_pref = ( mysql_pref = (
"Package: *\nPin: origin mariadb.mirrors.ovh.net" "Package: *\nPin: origin mariadb.mirrors.ovh.net"
@@ -134,20 +133,15 @@ def pre_pref(self, apt_packages):
# nano # nano
if 'nano' in apt_packages: if 'nano' in apt_packages:
if WOVar.wo_distro == 'ubuntu': if WOVar.wo_platform_codename == 'buster':
if WOVar.wo_platform_codename == 'bionic': if (not WOFileUtils.grepcheck(
Log.debug(self, 'Adding ppa for nano') self, '/etc/apt/sources.list/wo-repo.list',
WORepo.add(self, ppa=WOVar.wo_ubuntu_backports) 'WordOps')):
else: Log.info(self,
if WOVar.wo_platform_codename == 'buster': "Adding repository for Nano, please wait...")
if (not WOFileUtils.grepcheck( Log.debug(self, 'Adding repository for Nano')
self, '/etc/apt/sources.list/wo-repo.list', WORepo.add_key(self, WOVar.wo_nginx_key)
'WordOps')): WORepo.add(self, repo_url=WOVar.wo_nginx_repo)
Log.info(self,
"Adding repository for Nano, please wait...")
Log.debug(self, 'Adding repository for Nano')
WORepo.add_key(self, WOVar.wo_nginx_key)
WORepo.add(self, repo_url=WOVar.wo_nginx_repo)
def post_pref(self, apt_packages, packages, upgrade=False): def post_pref(self, apt_packages, packages, upgrade=False):
@@ -1366,11 +1360,11 @@ def pre_stack(self):
self, '/etc/sysctl.d/60-wo-tweaks.conf', self, '/etc/sysctl.d/60-wo-tweaks.conf',
'sysctl.mustache', data, True) 'sysctl.mustache', data, True)
# use tcp_bbr congestion algorithm only on new kernels # use tcp_bbr congestion algorithm only on new kernels
if (WOVar.wo_platform_codename == 'bionic' or if (WOVar.wo_platform_codename == 'focal' or
WOVar.wo_platform_codename == 'focal' or
WOVar.wo_platform_codename == 'buster' or WOVar.wo_platform_codename == 'buster' or
WOVar.wo_platform_codename == 'jammy' or WOVar.wo_platform_codename == 'jammy' or
WOVar.wo_platform_codename == 'bullseye'): WOVar.wo_platform_codename == 'bullseye' or
WOVar.wo_platform_codename == 'bookworm'):
try: try:
WOShellExec.cmd_exec( WOShellExec.cmd_exec(
self, 'modprobe tcp_bbr') self, 'modprobe tcp_bbr')