-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide migration from SLES 12 SP5 to SLES 15 SP4 in aggregated updates
- Loading branch information
Showing
3 changed files
with
286 additions
and
0 deletions.
There are no files selected for viewing
238 changes: 238 additions & 0 deletions
238
data/yam/autoyast/support_images/sles12sp5_create_hdd_maintenance_migr.xml.ep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE profile> | ||
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> | ||
<suse_register> | ||
<do_registration config:type="boolean">true</do_registration> | ||
<email><%= $get_var->('SCC_EMAIL') %></email> | ||
<reg_code><%= $get_var->('SCC_REGCODE') %></reg_code> | ||
<install_updates config:type="boolean">true</install_updates> | ||
<do_registration config:type="boolean">true</do_registration> | ||
% if (keys %$addons) { | ||
<addons config:type="list"> | ||
% while (my ($key, $addon) = each (%$addons)) { | ||
<addon> | ||
<name><%= $addon->{name} %></name> | ||
<version><%= $addon->{version} %></version> | ||
<arch><%= $addon->{arch} %></arch> | ||
% if ($key eq 'we' and $check_var->('SLE_PRODUCT', 'sles')) { | ||
<reg_code><%= $get_var->('SCC_REGCODE_WE') %></reg_code> | ||
% } | ||
% if ($key eq 'we' and $check_var->('SLE_PRODUCT', 'sled')) { | ||
<reg_code><%= $get_var->('SCC_REGCODE') %></reg_code> | ||
% } | ||
% if ($key eq 'rt') { | ||
<reg_code><%= $get_var->('SCC_REGCODE_RT') %></reg_code> | ||
% } | ||
% if ($key eq 'ltss') { | ||
<reg_code><%= $get_var->('SCC_REGCODE_LTSS') %></reg_code> | ||
% } | ||
</addon> | ||
% } | ||
</addons> | ||
% } | ||
</suse_register> | ||
<add-on> | ||
<add_on_others config:type="list"> | ||
% for my $repo (@$repos) { | ||
% my ($repo_id, $addon) = $repo =~ (/(\d+)\/(.*)\//); | ||
<listentry> | ||
<media_url><%= $repo %></media_url> | ||
<name><%= $addon . "_" . $repo_id %></name> | ||
<alias><%= $addon . "_" . $repo_id %></alias> | ||
</listentry> | ||
%} | ||
</add_on_others> | ||
</add-on> | ||
<bootloader> | ||
<global> | ||
<timeout config:type="integer">45</timeout> | ||
</global> | ||
</bootloader> | ||
<general> | ||
<mode> | ||
<confirm config:type="boolean">false</confirm> | ||
</mode> | ||
<signature-handling> | ||
<accept_unsigned_file config:type="boolean">true</accept_unsigned_file> | ||
<accept_unknown_gpg_key config:type="boolean">true</accept_unknown_gpg_key> | ||
<accept_non_trusted_gpg_key config:type="boolean">true</accept_non_trusted_gpg_key> | ||
<import_gpg_key config:type="boolean">true</import_gpg_key> | ||
</signature-handling> | ||
</general> | ||
<partitioning config:type="list"> | ||
<drive> | ||
<initialize config:type="boolean">true</initialize> | ||
<use>all</use> | ||
</drive> | ||
</partitioning> | ||
<networking> | ||
<interfaces config:type="list"> | ||
<interface> | ||
<bootproto>dhcp</bootproto> | ||
<device>eth0</device> | ||
<dhclient_set_default_route>yes</dhclient_set_default_route> | ||
<startmode>auto</startmode> | ||
</interface> | ||
</interfaces> | ||
</networking> | ||
<firewall> | ||
<enable_firewall config:type="boolean">true</enable_firewall> | ||
<start_firewall config:type="boolean">true</start_firewall> | ||
<zones config:type="list"> | ||
<zone> | ||
<name>public</name> | ||
<interfaces config:type="list"> | ||
<interface>eth0</interface> | ||
</interfaces> | ||
<services config:type="list"> | ||
<service>ssh</service> | ||
</services> | ||
<ports config:type="list"> | ||
<port>22/tcp</port> | ||
<port>30000-50000/tcp</port> | ||
</ports> | ||
</zone> | ||
</zones> | ||
</firewall> | ||
<report> | ||
<errors> | ||
<log config:type="boolean">true</log> | ||
<show config:type="boolean">true</show> | ||
<timeout config:type="integer">0</timeout> | ||
</errors> | ||
<messages> | ||
<log config:type="boolean">true</log> | ||
<show config:type="boolean">true</show> | ||
<timeout config:type="integer">0</timeout> | ||
</messages> | ||
<warnings> | ||
<log config:type="boolean">true</log> | ||
<show config:type="boolean">true</show> | ||
<timeout config:type="integer">0</timeout> | ||
</warnings> | ||
<yesno_messages> | ||
<log config:type="boolean">true</log> | ||
<show config:type="boolean">true</show> | ||
<timeout config:type="integer">0</timeout> | ||
</yesno_messages> | ||
</report> | ||
<keyboard> | ||
<keyboard_values> | ||
<delay/> | ||
<discaps config:type="boolean">false</discaps> | ||
<numlock>bios</numlock> | ||
<rate/> | ||
</keyboard_values> | ||
<keymap>english-us</keymap> | ||
</keyboard> | ||
<language> | ||
<language>en_US</language> | ||
<languages/> | ||
</language> | ||
<ntp-client> | ||
<ntp_policy>auto</ntp_policy> | ||
</ntp-client> | ||
<software> | ||
<products config:type="list"> | ||
<product><%= uc $get_var->('SLE_PRODUCT') %></product> | ||
</products> | ||
<packages config:type="list"> | ||
% if ($check_var->('VERSION', '12-SP5')) { | ||
<!-- Workaround for bsc#1202234: [addon]-release packages are missing after autoyast installation. --> | ||
% foreach (values %$addons) { | ||
<package><%= lc($_->{name}) %>-release</package> | ||
% } | ||
<!-- end of workaround --> | ||
% } | ||
</packages> | ||
<patterns config:type="list"> | ||
% for my $pattern (@$patterns) { | ||
<pattern><%= $pattern %></pattern> | ||
% } | ||
</patterns> | ||
</software> | ||
<services-manager> | ||
% if ($check_var->('DESKTOP', 'gnome')) { | ||
<default_target>graphical</default_target> | ||
% } | ||
% if ($check_var->('DESKTOP', 'textmode')) { | ||
<default_target>multi-user</default_target> | ||
% } | ||
<services> | ||
<disable config:type="list"/> | ||
<enable config:type="list"> | ||
<service>sshd</service> | ||
</enable> | ||
</services> | ||
</services-manager> | ||
<timezone> | ||
<hwclock>UTC</hwclock> | ||
<timezone>Europe/Berlin</timezone> | ||
</timezone> | ||
<users config:type="list"> | ||
<user> | ||
<encrypted config:type="boolean">false</encrypted> | ||
<fullname>Bernhard M. Wiedemann</fullname> | ||
<gid>100</gid> | ||
<home>/home/bernhard</home> | ||
<password_settings> | ||
<expire/> | ||
<flag/> | ||
<inact>-1</inact> | ||
<max>99999</max> | ||
<min>0</min> | ||
<warn>7</warn> | ||
</password_settings> | ||
<shell>/bin/bash</shell> | ||
<uid>1000</uid> | ||
<user_password>nots3cr3t</user_password> | ||
<username>bernhard</username> | ||
</user> | ||
<user> | ||
<encrypted config:type="boolean">false</encrypted> | ||
<fullname>root</fullname> | ||
<gid>0</gid> | ||
<home>/root</home> | ||
<password_settings> | ||
<expire/> | ||
<flag/> | ||
<inact/> | ||
<max/> | ||
<min/> | ||
<warn/> | ||
</password_settings> | ||
<shell>/bin/bash</shell> | ||
<uid>0</uid> | ||
<user_password>nots3cr3t</user_password> | ||
<username>root</username> | ||
</user> | ||
</users> | ||
<scripts> | ||
<post-scripts config:type="list"> | ||
<script> | ||
<filename>post.sh</filename> | ||
<interpreter>shell</interpreter> | ||
<source><![CDATA[ | ||
#!/bin/sh | ||
# zypper process is locked by some ruby process, modify the repo file | ||
cd /etc/zypp/repos.d | ||
sed -i 's/enabled=1/enabled=0/' $(ls|grep -i nvidia) | ||
zypper lr | ||
% if ( $get_var->('VERSION') =~ /15-SP[3-5]/ ) { | ||
# Regarding rpm lock see Q9@ https://documentation.suse.com/de-de/sles/15-SP1/html/SLES-all/app-ay-faq.html | ||
# quote : "during the post-script phase, YaST still has an exclusive lock on the RPM database." | ||
# the package cannot be installed the autoyast way, because of the changing package name (eg libyui-rest-api15) | ||
# only zypper allows to install "by capability". | ||
mv /var/run/zypp.pid /var/run/zypp.sav | ||
zypper -n in libyui-rest-api | ||
mv /var/run/zypp.sav /var/run/zypp.pid | ||
% } | ||
exit 0 | ||
]]></source> | ||
</script> | ||
</post-scripts> | ||
</scripts> | ||
</profile> |
20 changes: 20 additions & 0 deletions
20
schedule/yast/maintenance/autoyast_create_hdd_maintenance_migration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: autoyast_create_hdd_maintenance_migration | ||
schedule: | ||
- autoyast/prepare_profile | ||
- installation/isosize | ||
- installation/bootloader | ||
- autoyast/installation | ||
- autoyast/console | ||
- autoyast/login | ||
- autoyast/wicked | ||
- autoyast/repos | ||
- autoyast/logs | ||
- autoyast/autoyast_reboot | ||
- installation/grub_test | ||
- installation/first_boot | ||
- console/system_prepare | ||
- console/hostname | ||
- qa_automation/patch_and_reboot | ||
- shutdown/grub_set_bootargs | ||
- shutdown/shutdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: schedule/yast/maintenance/offline_migration_15sp4 | ||
description: | | ||
This is for offline migraiton tests with unreleased maintenance updates | ||
ORIGIN_SYSTEM_VERSION: '%HDDVERSION%' | ||
UPGRADE_TARGET_VERSION: '%VERSION%' | ||
schedule: | ||
- autoyast/prepare_profile | ||
- migration/version_switch_origin_system | ||
- installation/bootloader | ||
- boot/boot_to_desktop | ||
- console/check_system_info | ||
- migration/record_disk_info | ||
- migration/reboot_to_upgrade | ||
- migration/version_switch_upgrade_target | ||
- installation/bootloader | ||
- autoyast/installation | ||
- autoyast/console | ||
- autoyast/login | ||
- autoyast/wicked | ||
- autoyast/repos | ||
- autoyast/logs | ||
- autoyast/autoyast_reboot | ||
- installation/grub_test | ||
- installation/first_boot | ||
- console/system_prepare | ||
- console/check_os_release | ||
- console/check_system_info | ||
- console/hostname |