summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-04-30 14:00:49 +0200
committerGitHub <noreply@github.com>2018-04-30 14:00:49 +0200
commite246bdc1617acc4667cc0f4dd5baf4ef0d738e45 (patch)
tree4638d4473c1bdfbabef719505ec2d90fbfccd36e
parent0d154d7a4652380aca197b0fcb9ed41ef644c0df (diff)
parent8e77dc5a9adacbca5a4b6e80534972370c000bfa (diff)
downloadmeta-updater-e246bdc1617acc4667cc0f4dd5baf4ef0d738e45.tar.gz
Merge pull request #305 from advancedtelematic/fix/var-sota-perms
Fix /var/sota perms
-rw-r--r--classes/image_types_ota.bbclass2
-rw-r--r--lib/oeqa/selftest/cases/updater.py14
2 files changed, 10 insertions, 6 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index d21441d..36e7059 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -105,6 +105,8 @@ IMAGE_CMD_otaimg () {
105 mv ${HOME_TMP}/var/local ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true 105 mv ${HOME_TMP}/var/local ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
106 # Create /var/sota if it doesn't exist yet 106 # Create /var/sota if it doesn't exist yet
107 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true 107 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true
108 # Ensure the permissions are correctly set
109 chmod 700 ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
108 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true 110 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true
109 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) 111 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
110 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local 112 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py
index e459ffb..2ef5a3b 100644
--- a/lib/oeqa/selftest/cases/updater.py
+++ b/lib/oeqa/selftest/cases/updater.py
@@ -174,12 +174,12 @@ class AutoProvTests(OESelftestTestCase):
174 print(value) 174 print(value)
175 print('Checking output of aktualizr-info:') 175 print('Checking output of aktualizr-info:')
176 ran_ok = False 176 ran_ok = False
177 for delay in [0, 1, 2, 5, 10, 15]: 177 for delay in [1, 2, 5, 10, 15]:
178 sleep(delay)
179 stdout, stderr, retcode = self.qemu_command('aktualizr-info') 178 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
180 if retcode == 0 and stderr == b'': 179 if retcode == 0 and stderr == b'':
181 ran_ok = True 180 ran_ok = True
182 break 181 break
182 sleep(delay)
183 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) 183 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
184 184
185 verifyProvisioned(self, machine) 185 verifyProvisioned(self, machine)
@@ -312,12 +312,12 @@ class GrubTests(OESelftestTestCase):
312 print(value) 312 print(value)
313 print('Checking output of aktualizr-info:') 313 print('Checking output of aktualizr-info:')
314 ran_ok = False 314 ran_ok = False
315 for delay in [0, 1, 2, 5, 10, 15]: 315 for delay in [1, 2, 5, 10, 15]:
316 sleep(delay)
317 stdout, stderr, retcode = self.qemu_command('aktualizr-info') 316 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
318 if retcode == 0 and stderr == b'': 317 if retcode == 0 and stderr == b'':
319 ran_ok = True 318 ran_ok = True
320 break 319 break
320 sleep(delay)
321 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) 321 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
322 322
323 verifyProvisioned(self, machine) 323 verifyProvisioned(self, machine)
@@ -364,11 +364,12 @@ class ImplProvTests(OESelftestTestCase):
364 print(value) 364 print(value)
365 print('Checking output of aktualizr-info:') 365 print('Checking output of aktualizr-info:')
366 ran_ok = False 366 ran_ok = False
367 for delay in [0, 1, 2, 5, 10, 15]: 367 for delay in [1, 2, 5, 10, 15]:
368 stdout, stderr, retcode = self.qemu_command('aktualizr-info') 368 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
369 if retcode == 0 and stderr == b'': 369 if retcode == 0 and stderr == b'':
370 ran_ok = True 370 ran_ok = True
371 break 371 break
372 sleep(delay)
372 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) 373 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
373 # Verify that device has NOT yet provisioned. 374 # Verify that device has NOT yet provisioned.
374 self.assertIn(b'Couldn\'t load device ID', stdout, 375 self.assertIn(b'Couldn\'t load device ID', stdout,
@@ -435,11 +436,12 @@ class HsmTests(OESelftestTestCase):
435 print(value) 436 print(value)
436 print('Checking output of aktualizr-info:') 437 print('Checking output of aktualizr-info:')
437 ran_ok = False 438 ran_ok = False
438 for delay in [0, 1, 2, 5, 10, 15]: 439 for delay in [1, 2, 5, 10, 15]:
439 stdout, stderr, retcode = self.qemu_command('aktualizr-info') 440 stdout, stderr, retcode = self.qemu_command('aktualizr-info')
440 if retcode == 0 and stderr == b'': 441 if retcode == 0 and stderr == b'':
441 ran_ok = True 442 ran_ok = True
442 break 443 break
444 sleep(delay)
443 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) 445 self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode())
444 # Verify that device has NOT yet provisioned. 446 # Verify that device has NOT yet provisioned.
445 self.assertIn(b'Couldn\'t load device ID', stdout, 447 self.assertIn(b'Couldn\'t load device ID', stdout,