Import Upstream version 4.12.4

This commit is contained in:
geos_one
2025-08-12 22:28:56 +02:00
parent 03a8170b15
commit 9181ee2487
1629 changed files with 874094 additions and 554378 deletions

View File

@@ -0,0 +1,10 @@
#
# Copyright (C) 2024 FreeIPA Contributors see COPYING for license
#
"""
This module contains TencentOS specific platform files.
"""
NAME = "tencentos"

View File

@@ -0,0 +1,23 @@
#
# Copyright (C) 2024 FreeIPA Contributors see COPYING for license
#
"""
This TencentOS base platform module exports platform related constants.
"""
# Fallback to default path definitions
from __future__ import absolute_import
from ipaplatform.redhat.constants import RedHatConstantsNamespace, User, Group
__all__ = ("constants", "User", "Group")
class TencentOSConstantsNamespace(RedHatConstantsNamespace):
SECURE_NFS_VAR = None
NAMED_OPENSSL_ENGINE = "pkcs11"
constants = TencentOSConstantsNamespace()

View File

@@ -0,0 +1,20 @@
#
# Copyright (C) 2024 FreeIPA Contributors see COPYING for license
#
"""
This TencentOS base platform module exports default filesystem paths
as common in TencentOS-based systems.
"""
from __future__ import absolute_import
from ipaplatform.redhat.paths import RedHatPathNamespace
class TencentOSPathNamespace(RedHatPathNamespace):
NAMED_CRYPTO_POLICY_FILE = "/etc/crypto-policies/back-ends/bind.config"
SYSCONFIG_NFS = "/etc/nfs.conf"
paths = TencentOSPathNamespace()

View File

@@ -0,0 +1,51 @@
#
# Copyright (C) 2024 FreeIPA Contributors see COPYING for license
#
"""
Contains TencentOS specific service class implementations.
"""
from __future__ import absolute_import
from ipaplatform.redhat import services as redhat_services
# Mappings from service names as FreeIPA code references to these services
# to their actual systemd service names
tencentos_system_units = redhat_services.redhat_system_units.copy()
tencentos_system_units["named"] = tencentos_system_units["named-regular"]
tencentos_system_units["named-conflict"] = \
tencentos_system_units["named-pkcs11"]
# Service classes that implement TencentOS-specific behaviour
class TencentOSService(redhat_services.RedHatService):
system_units = tencentos_system_units
# Function that constructs proper TencentOS-specific server classes for
# services of specified name
def tencentos_service_class_factory(name, api=None):
if name in ["named", "named-conflict"]:
return TencentOSService(name, api)
return redhat_services.redhat_service_class_factory(name, api)
# Magicdict containing TencentOSService instances.
class TencentOSServices(redhat_services.RedHatServices):
def service_class_factory(self, name, api=None):
return tencentos_service_class_factory(name, api)
# Objects below are expected to be exported by platform module
timedate_services = redhat_services.timedate_services
service = tencentos_service_class_factory
knownservices = TencentOSServices()

View File

@@ -0,0 +1,18 @@
#
# Copyright (C) 2024 FreeIPA Contributors see COPYING for license
#
"""
This module contains default TencentOS-specific implementations of system tasks.
"""
from __future__ import absolute_import
from ipaplatform.redhat.tasks import RedHatTaskNamespace
class TencentOSTaskNamespace(RedHatTaskNamespace):
pass
tasks = TencentOSTaskNamespace()