From bdccd452b92978a0af419e58f900d589d42e2a58 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 16:49:32 +0800 Subject: [PATCH 1/3] Fix the gpg key import problem on SLES --- .../autotest/testcase/migration/sles_migration | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 40475f946..5a1f2d991 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -61,6 +61,12 @@ cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh" +check:rc==0 cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen" check:rc==0 cmd:xdsh $$CN "zypper -n install xCAT" @@ -93,7 +99,7 @@ cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c check:rc==0 # Workaround github issue #5503 cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" -cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n refresh" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 @@ -176,6 +182,12 @@ cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh" check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 +# Workaround github issue #5503 +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" +cmd:xdsh $$CN "zypper refresh" +check:rc==0 cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen" check:rc==0 cmd:xdsh $$CN "zypper -n install xCAT" @@ -208,7 +220,7 @@ cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c check:rc==0 # Workaround github issue #5503 cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" -cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n refresh" +cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" check:rc==0 From 702daf894c86c4ced8bdb4328f44fef8c936e0f2 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 16:58:24 +0800 Subject: [PATCH 2/3] Replace all # character to @. Due to xCAT-test internal limitation --- xCAT-test/autotest/testcase/migration/sles_migration | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 5a1f2d991..8bd4a37be 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -62,7 +62,7 @@ check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh" @@ -98,7 +98,7 @@ check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'" @@ -183,7 +183,7 @@ check:rc==0 cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh" From 10a6dd3535b15cb4408fd70c70d6912c6b4fbd3e Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 22 Nov 2018 17:06:11 +0800 Subject: [PATCH 3/3] Replace all # character to @. Due to xCAT-test internal limitation --- xCAT-test/autotest/testcase/migration/sles_migration | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index 8bd4a37be..76acbd859 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -219,7 +219,7 @@ check:rc==0 cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh" check:rc==0 # Workaround github issue #5503 -cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's#gpgcheck=1#gpgcheck=0#' /etc/zypp/repos.d/xcat-dep.repo )" +cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && ( sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-core.repo; sed -i -e 's@gpgcheck=1@gpgcheck=0@' /etc/zypp/repos.d/xcat-dep.repo )" cmd:xdsh $$CN "zypper --gpg-auto-import-keys -n --no-gpg-checks refresh" cmd:xdsh $$CN "grep -q 11 /etc/SuSE-release && rpm -e --allmatches gpg-pubkey-ca548a47-5b2c830b" cmd:xdsh $$CN "zypper refresh;zypper -n update --force-resolution '*xCAT*'"