diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/signing.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/signing.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py index a28c7eb19a..4df45ba032 100644 --- a/meta/lib/oeqa/selftest/cases/signing.py +++ b/meta/lib/oeqa/selftest/cases/signing.py | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
2 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
3 | # | 5 | # |
4 | 6 | ||
@@ -81,6 +83,8 @@ class Signing(OESelftestTestCase): | |||
81 | feature += 'RPM_GPG_PASSPHRASE = "test123"\n' | 83 | feature += 'RPM_GPG_PASSPHRASE = "test123"\n' |
82 | feature += 'RPM_GPG_NAME = "testuser"\n' | 84 | feature += 'RPM_GPG_NAME = "testuser"\n' |
83 | feature += 'GPG_PATH = "%s"\n' % self.gpg_dir | 85 | feature += 'GPG_PATH = "%s"\n' % self.gpg_dir |
86 | feature += 'PACKAGECONFIG:append:pn-rpm-native = " sequoia"\n' | ||
87 | feature += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n' | ||
84 | 88 | ||
85 | self.write_config(feature) | 89 | self.write_config(feature) |
86 | 90 | ||
@@ -145,7 +149,7 @@ class Signing(OESelftestTestCase): | |||
145 | feature += 'GPG_PATH = "%s"\n' % self.gpg_dir | 149 | feature += 'GPG_PATH = "%s"\n' % self.gpg_dir |
146 | feature += 'SSTATE_DIR = "%s"\n' % sstatedir | 150 | feature += 'SSTATE_DIR = "%s"\n' % sstatedir |
147 | # Any mirror might have partial sstate without .sig files, triggering failures | 151 | # Any mirror might have partial sstate without .sig files, triggering failures |
148 | feature += 'SSTATE_MIRRORS_forcevariable = ""\n' | 152 | feature += 'SSTATE_MIRRORS:forcevariable = ""\n' |
149 | 153 | ||
150 | self.write_config(feature) | 154 | self.write_config(feature) |
151 | 155 | ||
@@ -159,13 +163,13 @@ class Signing(OESelftestTestCase): | |||
159 | bitbake('-c clean %s' % test_recipe) | 163 | bitbake('-c clean %s' % test_recipe) |
160 | bitbake('-c populate_lic %s' % test_recipe) | 164 | bitbake('-c populate_lic %s' % test_recipe) |
161 | 165 | ||
162 | recipe_sig = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tgz.sig') | 166 | recipe_sig = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tar.zst.sig') |
163 | recipe_tgz = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tgz') | 167 | recipe_archive = glob.glob(sstatedir + '/*/*/*:ed:*_populate_lic.tar.zst') |
164 | 168 | ||
165 | self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.') | 169 | self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.') |
166 | self.assertEqual(len(recipe_tgz), 1, 'Failed to find .tgz file.') | 170 | self.assertEqual(len(recipe_archive), 1, 'Failed to find .tar.zst file.') |
167 | 171 | ||
168 | ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_tgz[0])) | 172 | ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_archive[0])) |
169 | # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30 | 173 | # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30 |
170 | # gpg: Good signature from "testuser (nocomment) <testuser@email.com>" | 174 | # gpg: Good signature from "testuser (nocomment) <testuser@email.com>" |
171 | self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.') | 175 | self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.') |
@@ -189,7 +193,7 @@ class LockedSignatures(OESelftestTestCase): | |||
189 | 193 | ||
190 | bitbake(test_recipe) | 194 | bitbake(test_recipe) |
191 | # Generate locked sigs include file | 195 | # Generate locked sigs include file |
192 | bitbake('-S none %s' % test_recipe) | 196 | bitbake('-S lockedsigs %s' % test_recipe) |
193 | 197 | ||
194 | feature = 'require %s\n' % locked_sigs_file | 198 | feature = 'require %s\n' % locked_sigs_file |
195 | feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n' | 199 | feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n' |
@@ -206,7 +210,7 @@ class LockedSignatures(OESelftestTestCase): | |||
206 | # Use uuid so hash equivalance server isn't triggered | 210 | # Use uuid so hash equivalance server isn't triggered |
207 | recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend' | 211 | recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend' |
208 | recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file) | 212 | recipe_append_path = os.path.join(templayerdir, 'recipes-test', test_recipe, recipe_append_file) |
209 | feature = 'SUMMARY_${PN} = "test locked signature%s"\n' % uuid.uuid4() | 213 | feature = 'SUMMARY:${PN} = "test locked signature%s"\n' % uuid.uuid4() |
210 | 214 | ||
211 | os.mkdir(os.path.join(templayerdir, 'recipes-test')) | 215 | os.mkdir(os.path.join(templayerdir, 'recipes-test')) |
212 | os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe)) | 216 | os.mkdir(os.path.join(templayerdir, 'recipes-test', test_recipe)) |