Skip to content

Commit f45fbbf

Browse files
committed
EL9 initial templates
1 parent 79e3dd5 commit f45fbbf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+480
-386
lines changed

config/core/base.pan

Lines changed: 131 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,31 @@ values = true or false
99
default = true
1010
required = no
1111
}
12-
variable OS_BASE_CONFIGURE_NETWORK ?= true;
13-
variable SITE_ADDITIONAL_PACKAGES ?= undef;
12+
final variable OS_BASE_CONFIGURE_NETWORK ?= true;
13+
14+
@{
15+
desc = list of site-specific additional packages
16+
values = list of strings
17+
default = empty list
18+
required = no
19+
}
20+
final variable SITE_ADDITIONAL_PACKAGES ?= undef;
1421

1522
# Default if not properly defined elsewhere, using the standard mechanism
16-
variable OS_VERSION_PARAMS ?= nlist(
23+
final variable OS_VERSION_PARAMS ?= dict(
1724
"distribution", "el",
18-
"family", "el",
19-
"major", "el8",
20-
"majorversion", "8",
21-
"minor", "x",
22-
"flavour", "x",
23-
"version", "el8x",
24-
"arch", "x86_64"
25+
"family", "el",
26+
"major", "el9",
27+
"majorversion", "9",
28+
"minor", "x",
29+
"flavour", "x",
30+
"version", "el9x",
31+
"arch", "x86_64",
2532
);
2633

27-
variable RPM_BASE_FLAVOUR = '8';
28-
variable RPM_BASE_FLAVOUR_VERSIONID = 8;
29-
variable RPM_BASE_FLAVOUR_NAME = format('el%s',RPM_BASE_FLAVOUR_VERSIONID);
34+
final variable RPM_BASE_FLAVOUR = '9';
35+
final variable RPM_BASE_FLAVOUR_VERSIONID = 9;
36+
final variable RPM_BASE_FLAVOUR_NAME = format('el%s', RPM_BASE_FLAVOUR_VERSIONID);
3037

3138

3239
@{
@@ -35,18 +42,43 @@ values = string
3542
default = yumdnf
3643
required = no
3744
}
38-
variable SPMA_BACKEND ?= 'yumdnf';
39-
variable DEBUG = debug(format('%s: SPMA_BACKEND=%s', OBJECT, to_string(SPMA_BACKEND)));
45+
final variable SPMA_BACKEND ?= 'yumdnf';
46+
variable DEBUG = debug('%s: SPMA_BACKEND=%s', OBJECT, to_string(SPMA_BACKEND));
47+
48+
@{
49+
desc = if true remove packages that are no longer part of the profile
50+
values = boolean
51+
default = true
52+
required = no
53+
}
54+
final variable SPMA_REMOVE_OBSOLETE_PACKAGES ?= false;
55+
56+
57+
# Use NetworkManager/nmstate to configure the network
58+
final variable OS_NETWORK_USE_NETWORK_MANAGER ?= true;
59+
# If not using NetworkManager, let tQUATTOR_TYPES_NETWORK_BACKEND undefined to use default
60+
final variable QUATTOR_TYPES_NETWORK_BACKEND ?= if ( OS_NETWORK_USE_NETWORK_MANAGER ) {
61+
'nmstate';
62+
};
63+
64+
65+
@{
66+
desc = variants of glibc langpack to use
67+
values = list of strings matching a RPM variant or null to disable explicit installation of langpack
68+
default = 'langpack-en'
69+
required = no
70+
}
71+
variable OS_GLIBC_LANGPACKS ?= list('langpack-en');
4072

4173

4274
@{
4375
desc = Define the base name used for OS-related YUM repositories.
44-
values = dict of string, each entry being either a host name or a OS major version (e.g. el8). \
76+
values = dict of string, each entry being either a host name or a OS major version (e.g. el9). \
4577
The value is used as the name part of the YUM repository name (before the first '-').
4678
default = none
4779
required = yes
4880
}
49-
variable YUM_OS_DISTRIBUTION ?= dict();
81+
final variable YUM_OS_DISTRIBUTION ?= dict();
5082

5183

5284
@{
@@ -55,14 +87,14 @@ values = string whose value is used as the name part of the YUM repository name
5587
default = based on YUM_OS_DISTRIBUTION contents
5688
required = no
5789
}
58-
variable YUM_OS_DISTRIBUTION_NAME ?= {
59-
if ( is_defined(YUM_OS_DISTRIBUTION[OBJECT]) ) {
60-
YUM_OS_DISTRIBUTION[OBJECT];
61-
} else if ( is_defined(YUM_OS_DISTRIBUTION[OS_VERSION_PARAMS['major']]) ) {
62-
YUM_OS_DISTRIBUTION[OS_VERSION_PARAMS['major']];
63-
} else {
64-
error("YUM_OS_DISTRIBUTION not defined: cannot determine OS distribution (YUM repository) to use");
65-
};
90+
final variable YUM_OS_DISTRIBUTION_NAME ?= {
91+
if ( is_defined(YUM_OS_DISTRIBUTION[OBJECT]) ) {
92+
YUM_OS_DISTRIBUTION[OBJECT];
93+
} else if ( is_defined(YUM_OS_DISTRIBUTION[OS_VERSION_PARAMS['major']]) ) {
94+
YUM_OS_DISTRIBUTION[OS_VERSION_PARAMS['major']];
95+
} else {
96+
error("YUM_OS_DISTRIBUTION not defined: cannot determine OS distribution (YUM repository) to use");
97+
};
6698
};
6799

68100
@{
@@ -71,24 +103,26 @@ value = pan namespace
71103
default = repository/snapshot
72104
required = no
73105
}
74-
variable YUM_SNAPSHOT_NS ?= 'repository/snapshot';
75-
variable YUM_OS_SNAPSHOT_NS ?= YUM_SNAPSHOT_NS;
106+
final variable YUM_SNAPSHOT_NS ?= 'repository/snapshot';
107+
final variable YUM_OS_SNAPSHOT_NS ?= YUM_SNAPSHOT_NS;
76108

77109
@{
78110
desc = name of the template used to configure the base OS repository
79111
value = template name
80112
default = OS_VERSION_PARAMS['major'] + '_baseos'
81113
required = non
82114
}
83-
variable BASE_OS_REPOSITORY_TEMPLATE ?= if ( !is_null(BASE_OS_REPOSITORY_TEMPLATE) ) format('%s_baseos', OS_VERSION_PARAMS['major']);
115+
final variable BASE_OS_REPOSITORY_TEMPLATE ?= if ( !is_null(BASE_OS_REPOSITORY_TEMPLATE) ) {
116+
format('%s_baseos', OS_VERSION_PARAMS['major']);
117+
};
84118

85119
@{
86120
desc = use iptables and ip6tables services instead of firewalld
87121
value = true or false
88-
default = false (EL8 default is to use firewalld)
122+
default = false (EL9 default is to use firewalld)
89123
required = no
90124
}
91-
variable OS_USE_IPTABLES_SERVICES ?= false;
125+
final variable OS_USE_IPTABLES_SERVICES ?= false;
92126

93127

94128
@{
@@ -97,21 +131,54 @@ value = true, false or null to install/configure none of those
97131
default = false if OS_USE_IPTABLES_SERVICES=true, true otherwise
98132
required = no
99133
}
100-
variable OS_ENABLE_FIREWALLD ?= if ( OS_USE_IPTABLES_SERVICES ) {
101-
false;
102-
} else if ( !exists(OS_ENABLE_FIREWALLD) || !is_null(OS_ENABLE_FIREWALLD) ) {
103-
true;
104-
} else {
105-
SELF;
106-
};
134+
final variable OS_ENABLE_FIREWALLD ?= if ( OS_USE_IPTABLES_SERVICES ) {
135+
false;
136+
} else if ( !exists(OS_ENABLE_FIREWALLD) || !is_null(OS_ENABLE_FIREWALLD) ) {
137+
true;
138+
} else {
139+
SELF;
140+
};
107141
variable ERROR = if ( OS_USE_IPTABLES_SERVICES && is_defined(OS_ENABLE_FIREWALLD) && OS_ENABLE_FIREWALLD ) {
108-
error('OS_ENABLE_FIREWALLD should not be set to true when OS_USE_IPTABLES_SERVICES is true');
109-
};
142+
error('OS_ENABLE_FIREWALLD should not be set to true when OS_USE_IPTABLES_SERVICES is true');
143+
};
110144

111145

112-
variable OS_BASE_CONFIG_SITE ?= null;
146+
@{
147+
desc = install iscsi tools and start iscsi daemon if true
148+
values = boolean
149+
default = false
150+
required = no
151+
}
152+
final variable OS_CORE_ISCSI_ENABLED ?= false;
153+
154+
@{
155+
desc = if true, install only the minimal set of RPM
156+
values = boolean
157+
default = false
158+
required = no
159+
}
160+
final variable OS_CORE_ONLY ?= false;
161+
162+
@{
163+
desc = if true, install RDMA package
164+
values = boolean
165+
default = false
166+
required = no
167+
}
168+
final variable OS_CORE_RDMA_ENABLED ?= false;
113169

114-
variable KERNEL_FIRMWARE_ARCH ?= "noarch";
170+
@{
171+
desc = if true, install smartmontools package and start smartd service
172+
values = boolean
173+
default = true
174+
required = no
175+
}
176+
final variable OS_CORE_SMARTD_ENABLED ?= true;
177+
178+
179+
final variable OS_BASE_CONFIG_SITE ?= null;
180+
181+
final variable KERNEL_FIRMWARE_ARCH ?= "noarch";
115182
#
116183
# Kernel version and CPU architecture
117184
#
@@ -121,7 +188,15 @@ include 'os/kernel_version_arch';
121188
# supported for a service.
122189
# This variable can be overriden at a site level or in a profile to
123190
# force a specific architecture (e.g. i386 on 64-bit machine)
124-
variable PKG_ARCH_BASE ?= PKG_ARCH_DEFAULT;
191+
final variable PKG_ARCH_BASE ?= PKG_ARCH_DEFAULT;
192+
193+
# Default should be appropriate: ncm-network initscripts backend unsupported on EL9
194+
final variable OS_NETWORK_USE_INITSCRIPTS ?= false;
195+
196+
# Set to true if some parts of the configuration still depend on ncm-chkconfig
197+
# In 24.10.0, keep true as the default until ncm-named and ncm-systemd no longer require
198+
# chkconfig binary
199+
final variable OS_INSTALL_CHKCONFIG ?= true;
125200

126201
# Minimum list of packages
127202
include 'rpms/base';
@@ -132,15 +207,15 @@ include 'config/core/daemons';
132207
include 'config/core/boot';
133208

134209
# Configure network, except if disabled
135-
variable DEBUG = debug(format('%s: OS_BASE_CONFIGURE_NETWORK=%s',OBJECT,to_string(OS_BASE_CONFIGURE_NETWORK)));
210+
variable DEBUG = debug('%s: OS_BASE_CONFIGURE_NETWORK=%s', OBJECT, to_string(OS_BASE_CONFIGURE_NETWORK));
136211
include if ( OS_BASE_CONFIGURE_NETWORK ) 'os/network/config';
137212

138213
# Install/enable iptables services if needed or enable/disable firewalld according to OS_DISABLE_FIREWALLD
139214
include if ( OS_USE_IPTABLES_SERVICES ) {
140-
'config/core/iptables-services';
141-
} else if ( is_defined(OS_ENABLE_FIREWALLD) ) {
142-
'config/core/firewalld';
143-
};
215+
'config/core/iptables-services';
216+
} else if ( is_defined(OS_ENABLE_FIREWALLD) ) {
217+
'config/core/firewalld';
218+
};
144219

145220

146221
@{
@@ -149,7 +224,7 @@ value = string
149224
default = python3
150225
required = no
151226
}
152-
variable PYTHON_RPM_DEFAULT_PREFIX ?= 'python3';
227+
final variable PYTHON_RPM_DEFAULT_PREFIX ?= 'python3';
153228

154229

155230
@{
@@ -158,11 +233,16 @@ value = boolean
158233
default = false
159234
required = no
160235
}
161-
variable OS_USE_MICROCODE_CTL ?= false;
236+
final variable OS_USE_MICROCODE_CTL ?= false;
162237

163238

164239
# Use ncm-systemd instead of ncm-chkconfig to process ncm-chkconfig configuration
165-
include 'components/systemd/legacy/chkconfig';
240+
# chconfig is requried if ncm-chkconfig is enabled, even with the legacy configuration
241+
include if ( OS_INSTALL_CHKCONFIG ) 'components/systemd/legacy/chkconfig';
242+
243+
# Configure ncm-spma process_obsoletes
244+
include 'components/spma/config';
245+
'/software/components/spma/process_obsoletes' = SPMA_REMOVE_OBSOLETE_PACKAGES;
166246

167247
# Install microcode_ctl package if needed
168248
'/software/packages' = {
@@ -191,5 +271,5 @@ prefix '/software/components/accounts';
191271
'kept_groups/wireshark' = '';
192272

193273
# Local site OS configuration
194-
variable DEBUG = debug(format('%s: OS_BASE_CONFIG_SITE=%s',OBJECT,to_string(OS_BASE_CONFIG_SITE)));
274+
variable DEBUG = debug('%s: OS_BASE_CONFIG_SITE=%s', OBJECT, to_string(OS_BASE_CONFIG_SITE));
195275
include OS_BASE_CONFIG_SITE;

config/core/boot.pan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
Template listing boot options for all EL8 hosts.
2+
Template listing boot options for all EL9 hosts.
33
}
44

55
unique template config/core/boot;

config/core/daemons.pan

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
Template listing daemons that must be enabled or disabled in all SL6-based installations
33
44
}
5-
65
unique template config/core/daemons;
76

87
variable OS_CORE_POSTFIX ?= false;
8+
variable OS_CORE_ONLY ?= false;
9+
variable OS_CORE_ISCSI_ENABLED ?= false;
910

1011
variable OS_WANTED_DEFAULT_DAEMONS ?= {
1112
append('sshd');
@@ -17,7 +18,6 @@ variable OS_WANTED_DEFAULT_DAEMONS ?= {
1718
};
1819

1920
variable OS_UNWANTED_DEFAULT_DAEMONS ?= {
20-
append('abrt');
2121
append('avahi-daemon');
2222
append('bluetooth');
2323
append('cups');
@@ -38,22 +38,21 @@ variable OS_UNWANTED_DEFAULT_DAEMONS ?= {
3838
append('stap-server');
3939
append('tog-pegasus');
4040
append('wpa_supplicant');
41-
append('yum');
42-
append('yum-cron');
43-
append('yum-updatesd');
4441
if ( OS_CORE_ONLY || ! OS_CORE_ISCSI_ENABLED ) {
4542
append('iscsi');
4643
append('iscsid');
4744
};
4845
SELF;
4946
};
5047

51-
'/software/components/systemd/unit/' = {
48+
include 'components/systemd/config';
49+
50+
'/software/components/systemd/unit' = {
5251
foreach(k; v; OS_WANTED_DEFAULT_DAEMONS) {
5352
SELF[v]['state'] = 'enabled';
54-
SELF[v]['startstop'] = true;
53+
SELF[v]['startstop'] = true;
5554
};
56-
foreach(k;v;OS_UNWANTED_DEFAULT_DAEMONS) {
55+
foreach(k; v; OS_UNWANTED_DEFAULT_DAEMONS) {
5756
SELF[v]['state'] = 'disabled';
5857
SELF[v]['startstop'] = true;
5958
};

config/core/firewalld.pan

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
unique template config/core/firewalld;
22

3+
include 'components/systemd/config';
4+
35
# Add firewalld RPM
46
'/software/packages' = {
57
pkg_repl('firewalld');
6-
# iptables is a dependency for firewalld but sometimes fails to be properly installed
7-
pkg_repl('iptables');
88
SELF;
99
};
1010

11-
1211
# Enable or disable firewalld according to OS_ENABLE_FIREWALLD and update its active state
1312
'/software/components/systemd/skip/service' = false;
1413
prefix '/software/components/systemd/unit/firewalld';

config/core/iptables-services.pan

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
unique template config/core/iptables-services;
22

3+
include 'components/systemd/config';
4+
35
# Install package providing iptables and ip6tables services
46
'/software/packages' = {
5-
pkg_repl('iptables-services');
7+
pkg_repl('iptables-nft-services');
68
SELF;
79
};
810

0 commit comments

Comments
 (0)