mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 14:40:16 -05:00
nfs-utils in Fedora 30 and later switched its configuration file from /etc/sysconfig/nfs to /etc/nfs.conf, providing a conversion service (nfs-convert.service) for upgrades. However, for new installs the original configuration file is missing. This change: * adds a tuple-based osinfo.version_number method to handle more kinds of OS versioning schemes * detects RHEL and Fedora versions with the the new nfs-utils behavior * avoids backing up the new NFS configuration file as we do not have to modify it. See: https://bugzilla.redhat.com/show_bug.cgi?id=1676981 Fixes: https://pagure.io/freeipa/issue/7868 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
#
|
|
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
|
|
#
|
|
|
|
'''
|
|
This Fedora base platform module exports platform related constants.
|
|
'''
|
|
|
|
# Fallback to default constant definitions
|
|
from __future__ import absolute_import
|
|
|
|
from ipaplatform.redhat.constants import RedHatConstantsNamespace
|
|
from ipaplatform.osinfo import osinfo
|
|
|
|
# Fedora 28 and earlier use /etc/sysconfig/nfs
|
|
# Fedora 30 and later use /etc/nfs.conf
|
|
# Fedora 29 has both
|
|
HAS_NFS_CONF = osinfo.version_number >= (30,)
|
|
|
|
|
|
class FedoraConstantsNamespace(RedHatConstantsNamespace):
|
|
# Fedora allows installation of Python 2 and 3 mod_wsgi, but the modules
|
|
# can't coexist. For Apache to load correct module.
|
|
MOD_WSGI_PYTHON2 = "modules/mod_wsgi.so"
|
|
MOD_WSGI_PYTHON3 = "modules/mod_wsgi_python3.so"
|
|
|
|
# System-wide crypto policy, but without TripleDES, pre-shared key,
|
|
# secure remote password, and DSA cert authentication.
|
|
# see https://fedoraproject.org/wiki/Changes/CryptoPolicy
|
|
TLS_HIGH_CIPHERS = "PROFILE=SYSTEM:!3DES:!PSK:!SRP:!aDSS"
|
|
if HAS_NFS_CONF:
|
|
SECURE_NFS_VAR = None
|
|
|
|
constants = FedoraConstantsNamespace()
|