diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/check-qemu-install | 21 | ||||
| -rwxr-xr-x | scripts/image-build/build-vyos-image | 9 |
2 files changed, 22 insertions, 8 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 5a59f13c..f29c5f3d 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -105,11 +105,13 @@ with open('data/defaults.toml', 'rb') as f: vyos_defaults = tomli.load(f) # This is what we got from the build -with open('build/manifest.json', 'rb') as f: - manifest = json.load(f) +manifest_file = 'build/manifest.json' +if os.path.isfile(manifest_file): + with open('build/manifest.json', 'rb') as f: + manifest = json.load(f) -vyos_version = manifest['build_config']['version'] -vyos_codename = manifest['build_config']['release_train'] + vyos_version = manifest['build_config']['version'] + vyos_codename = manifest['build_config']['release_train'] class StreamToLogger(object): """ @@ -552,16 +554,19 @@ try: c.expect(op_mode_prompt) c.sendline('show system memory') c.expect(op_mode_prompt) + c.sendline('show version all | match "vpp|vyos-1x"') + c.expect(op_mode_prompt) ################################################# # Verify /etc/os-release via lsb_release ################################################# c.sendline('lsb_release --short --id 2>/dev/null') c.expect('VyOS') - c.sendline('lsb_release --short --release 2>/dev/null') - c.expect(vyos_version) - c.sendline('lsb_release --short --codename 2>/dev/null') - c.expect(vyos_codename) + if os.path.isfile(manifest_file): + c.sendline('lsb_release --short --release 2>/dev/null') + c.expect(vyos_version) + c.sendline('lsb_release --short --codename 2>/dev/null') + c.expect(vyos_codename) # Ensure ephemeral key is loaded vyos_kernel_key = 'VyOS build time autogenerated kernel key' diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index 0614f214..d969c157 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -590,6 +590,15 @@ DOCUMENTATION_URL="{build_config['documentation_url']}" with open(file_path, 'w') as f: f.write(i["data"]) + if has_nonempty_key(build_config, "includes_binary"): + for i in build_config["includes_binary"]: + file_path = os.path.join(binary_includes_dir, i["path"]) + if debug: + print(f"D: Creating binary image include file: {file_path}") + os.makedirs(os.path.dirname(file_path), exist_ok=True) + with open(file_path, 'w') as f: + f.write(i["data"]) + ## Create the default config ## Technically it's just another includes.chroot entry, ## but it's special enough to warrant making it easier for flavor writers |
