Skip to content

Commit 746d002

Browse files
authored
Merge pull request #13491 from comps/centos_stream_10_stab
[stabilization] enable `centos-stream-10` in Packit and on Testing Farm
2 parents 0ddf125 + 9c61c9c commit 746d002

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

.packit.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- fedora-all-x86_64
1818
- centos-stream-8-x86_64
1919
- centos-stream-9-x86_64
20+
- centos-stream-10-x86_64
2021

2122
- <<: *build
2223
trigger: commit
@@ -31,6 +32,7 @@ jobs:
3132
targets:
3233
centos-stream-8: {}
3334
centos-stream-9: {}
35+
centos-stream-10: {}
3436

3537
# when modifying this, modify also tests/tmt-plans/
3638

@@ -62,6 +64,9 @@ jobs:
6264
- <<: *test-static-checks
6365
identifier: /hardening/host-os/ansible/cui
6466
tmt_plan: /hardening/host-os/ansible/cui$
67+
targets:
68+
centos-stream-8: {}
69+
centos-stream-9: {}
6570
- <<: *test-static-checks
6671
identifier: /hardening/host-os/ansible/e8
6772
tmt_plan: /hardening/host-os/ansible/e8$
@@ -104,6 +109,9 @@ jobs:
104109
- <<: *test-static-checks
105110
identifier: /hardening/host-os/oscap/cui
106111
tmt_plan: /hardening/host-os/oscap/cui$
112+
targets:
113+
centos-stream-8: {}
114+
centos-stream-9: {}
107115
- <<: *test-static-checks
108116
identifier: /hardening/host-os/oscap/e8
109117
tmt_plan: /hardening/host-os/oscap/e8$
Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
# platform = multi_platform_all
22

3-
{{% if 'sle' in product or 'ubuntu' in product %}}
4-
pof="/bin/pidof"
5-
{{% else %}}
6-
pof="/usr/sbin/pidof"
7-
{{% endif %}}
3+
config_files=(/etc/ntp.conf)
4+
config_files+=("{{{ chrony_conf_path }}}")
85

9-
CONFIG_FILES="/etc/ntp.conf"
10-
$pof ntpd || {
11-
CHRONY_D_PATH={{{ chrony_d_path }}}
12-
mapfile -t CONFIG_FILES < <(find ${CHRONY_D_PATH}.* -type f -name '*.conf')
13-
CONFIG_FILES+=({{{ chrony_conf_path }}})
14-
}
6+
chrony_d_path={{{ chrony_d_path }}}
7+
if [[ -d $chrony_d_path ]]; then
8+
while IFS= read -r filename; do
9+
config_files+=("$filename")
10+
done < <(find "$chrony_d_path" -type f -name '*.conf')
11+
fi
1512

16-
# get list of ntp files
17-
18-
for config_file in "${CONFIG_FILES[@]}" ; do
19-
# Add maxpoll to server, pool or peer entries without maxpoll
20-
grep "^\(server\|pool\|peer\)" "$config_file" | grep -v maxpoll | while read -r line ; do
21-
sed -i "s/$line/& nts/" "$config_file"
22-
done
13+
for config_file in "${config_files[@]}"; do
14+
[[ -e $config_file ]] || continue
15+
# if the line doesn't start with 'server/pool/peer ', just print it
16+
# if the line does contain ' nts' already, skip it
17+
# else append ' nts' to it
18+
sed "/^\(server\|pool\|peer\) /! b; / nts/ b; s/$/ nts/" -i "$config_file"
2319
done

scap-security-guide.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md
9797

9898
%files
9999
%{_datadir}/xml/scap/ssg/content
100-
# No kickstarts for Fedora
101-
%if 0%{?_rhel_like}
100+
# No kickstarts for Fedora or CentOS Stream 10+
101+
%if 0%{?_rhel_like} && 0%{?_rhel_like} < 10
102102
%{_datadir}/%{name}/kickstart
103103
%endif
104104
%{_datadir}/%{name}/ansible/*.yml

0 commit comments

Comments
 (0)