Skip to content

Commit cf3fdbe

Browse files
Allow migration from Rocky Linux (AlmaLinux#84)
* Add support for migration from Rocky * Add Rocky Linux to README * Update tests to support Rocky Linux * Simplify os_type condition * Fix shellcheck errors
1 parent 7a04343 commit cf3fdbe

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ In order to convert your EL8 operating system to AlmaLinux do the following:
3636
## Roadmap
3737

3838
* [x] CentOS 8 support.
39-
* [ ] Write debug information to a log file for failed migration analysis.
39+
* [x] Write debug information to a log file for failed migration analysis.
4040
* [x] Oracle Linux 8 support.
4141
* [x] RHEL 8 support.
42+
* [x] Rocky Linux 8 support.
4243
* [x] DirectAdmin control panel support.
4344
* [x] cPanel control panel support.
4445
* [x] Plesk control panel support.

almalinux-deploy.sh

+10-6
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ BRANDING_PKGS=("centos-backgrounds" "centos-logos" "centos-indexhtml" \
2626
"oracle-logos-ipa" "oracle-logos-httpd" \
2727
"oracle-epel-release-el8" \
2828
"redhat-backgrounds" "redhat-logos" "redhat-indexhtml" \
29-
"redhat-logos-ipa" "redhat-logos-httpd")
29+
"redhat-logos-ipa" "redhat-logos-httpd" \
30+
"rocky-backgrounds" "rocky-logos" "rocky-indexhtml" \
31+
"rocky-logos-ipa" "rocky-logos-httpd")
3032

3133
REMOVE_PKGS=("centos-linux-release" "centos-gpg-keys" "centos-linux-repos" \
3234
"libreport-plugin-rhtsupport" "libreport-rhel" "insights-client" \
3335
"libreport-rhel-anaconda-bugzilla" "libreport-rhel-bugzilla" \
3436
"oraclelinux-release" "oraclelinux-release-el8" \
35-
"redhat-release" "redhat-release-eula")
37+
"redhat-release" "redhat-release-eula" \
38+
"rocky-release" "rocky-gpg-keys" "rocky-repos" \
39+
"rocky-obsolete-packages")
3640

3741
setup_log_files() {
3842
exec > >(tee /var/log/almalinux-deploy.log)
@@ -213,8 +217,8 @@ assert_supported_system() {
213217
report_step_error "Check EL${os_version} is supported"
214218
exit 1
215219
fi
216-
if [[ ${os_type} != 'centos' && ${os_type} != 'almalinux' && \
217-
${os_type} != 'ol' && ${os_type} != 'rhel' ]]; then
220+
os_types=("centos" "almalinux" "ol" "rhel" "rocky")
221+
if [[ ! " ${os_types[*]} " =~ ${os_type} ]]; then
218222
report_step_error "Check ${os_type} operating system is supported"
219223
exit 1
220224
fi
@@ -452,7 +456,7 @@ replace_brand_packages() {
452456
;;
453457
*)
454458
# shellcheck disable=SC2001
455-
alma_pkg="$(echo "${pkg_name}" | sed 's#centos\|oracle\|redhat#almalinux#')"
459+
alma_pkg="$(echo "${pkg_name}" | sed 's#centos\|oracle\|redhat\|rocky#almalinux#')"
456460
;;
457461
esac
458462
alma_pkgs+=("${alma_pkg}")
@@ -805,7 +809,7 @@ main() {
805809
assert_compatible_os_version "${os_version}" "${release_path}"
806810

807811
case "${os_type}" in
808-
almalinux|centos|ol|rhel)
812+
almalinux|centos|ol|rhel|rocky)
809813
backup_issue
810814
migrate_from_centos "${release_path}"
811815
;;

test_almalinux-deploy.bats

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ teardown() {
126126
}
127127

128128
@test 'assert_supported_system fails on unsupported distributions' {
129-
for os_id in 'fedora' 'rocky' 'virtuozzo'; do
129+
for os_id in 'fedora' 'virtuozzo'; do
130130
run assert_supported_system "${os_id}" '8' 'x86_64'
131131
[[ ${status} -ne 0 ]]
132132
[[ ${output} =~ 'ERROR' ]]

0 commit comments

Comments
 (0)