Merge ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:recovery-from-iso-debsums-fix into ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master

Proposed by Yao Wei
Status: Needs review
Proposed branch: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:recovery-from-iso-debsums-fix
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 53 lines (+24/-4)
1 file modified
recovery-from-iso.sh (+24/-4)
Reviewer Review Type Date Requested Status
Shih-Yuan Lee Needs Fixing
Yuan-Chen Cheng Pending
Review via email: mp+424737@code.launchpad.net

Commit message

recovery-from-iso.sh: remove cert-sru-oobe-pressed and reinstall dell-recovery after installaion

To post a comment you must log in.
Revision history for this message
Yao Wei (medicalwei) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
review: Needs Fixing
Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
autopkgtest-collect-credentials PASS
autopkgtest-oem-scripts-auto PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind FAIL non-zero exit status 1
get-private-ppa FAIL non-zero exit status 1
jq-lp PASS
launchpad-api FAIL non-zero exit status 1
lp-bug FAIL non-zero exit status 4
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
mir-bug FAIL non-zero exit status 1
oem-meta-packages SKIP exit status 77 and marked as skippable
git-url-insteadof-setting PASS
lp-dl-attm PASS
recovery-from-iso.sh PASS

https://oem-share.canonical.com/partners/lyoncore/share/artifacts/oem-scripts/oem-scripts-1.42-4cb8ac6-in-linux-container-jammy

Unmerged commits

4cb8ac6... by Yao Wei

recovery-from-iso.sh: remove cert-sru-oobe-pressed and reinstall dell-recovery after installaion

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/recovery-from-iso.sh b/recovery-from-iso.sh
2index e9812f4..5172637 100755
3--- a/recovery-from-iso.sh
4+++ b/recovery-from-iso.sh
5@@ -16,9 +16,6 @@ enable_sb="no"
6
7 clear_all() {
8 rm -rf "$temp_folder"
9- # remove Ubiquity in the end to match factory and Stock Ubuntu image behavior.
10- # and it also workaround some debsum error from ubiquity.
11- ssh -o StrictHostKeyChecking=no "$user_on_target"@"$target_ip" sudo apt-get -o DPkg::Lock::Timeout=-1 purge -y ubiquity
12 }
13 trap clear_all EXIT
14 # shellcheck disable=SC2046
15@@ -442,6 +439,29 @@ do_recovery() {
16 poll_recovery_status
17 }
18
19+post_install() {
20+ workaround_script="workaround_debsums.sh"
21+ cat <<EOF > "$temp_folder/$workaround_script"
22+#!/bin/bash
23+set -x
24+
25+# Working around known debsums discrepancies:
26+# Purge packages (ubiquity, cert-sru-oobe-preseed) that is not needed
27+sudo apt-get -o DPkg::Lock::Timeout=-1 purge -y ubiquity cert-sru-oobe-preseed
28+
29+# Reinstall dell-recovery
30+sudo umount /cdrom || true
31+recover_p=\$(lsblk -l | grep efi | cut -d ' ' -f 1 | sed 's/.$/2'/)
32+sudo mount /dev/\$recover_p /cdrom
33+dell_recovery_debs=(/cdrom/debs/dell-recovery_*)
34+sudo apt -o DPkg::Lock::Timeout=-1 install --reinstall -y "\${dell_recovery_debs[@]}"
35+sudo umount /cdrom
36+EOF
37+ $SCP "$temp_folder"/"$workaround_script" "$user_on_target"@"$target_ip":~/
38+ $SSH "$user_on_target"@"$target_ip" chmod +x "\$HOME/$workaround_script"
39+ $SSH "$user_on_target"@"$target_ip" "\$HOME/$workaround_script"
40+}
41+
42 main() {
43 while [ $# -gt 0 ]
44 do
45@@ -503,7 +523,7 @@ main() {
46 done
47 prepare
48 do_recovery
49- clear_all
50+ post_install
51 }
52
53 if [ "${BASH_SOURCE[0]}" = "$0" ]; then

Subscribers

People subscribed via source and target branches