diff options
-rw-r--r-- | data/defaults.toml | 2 | ||||
-rwxr-xr-x | scripts/build-vyos-image | 24 |
2 files changed, 14 insertions, 12 deletions
diff --git a/data/defaults.toml b/data/defaults.toml index 5229dd98..f4104364 100644 --- a/data/defaults.toml +++ b/data/defaults.toml @@ -14,7 +14,7 @@ vyos_mirror = "https://rolling-packages.vyos.net/current" vyos_branch = "current" release_train = "current" -kernel_version = "6.6.17" +kernel_version = "6.6.18" bootloaders = "syslinux,grub-efi" squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-recovery" diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image index 71001f2d..ed00175d 100755 --- a/scripts/build-vyos-image +++ b/scripts/build-vyos-image @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2022 VyOS maintainers and contributors +# Copyright (C) 2022-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -290,10 +290,9 @@ if __name__ == "__main__": # Retrieve git branch name git_branch = repo.active_branch.name except Exception as e: - print("Could not retrieve information from git: {0}".format(str(e))) + exit(f'Could not retrieve information from git: {e}') build_git = "" git_branch = "" - git_commit = "" # Create the build version string if build_config['build_type'] == 'development': @@ -344,8 +343,15 @@ if __name__ == "__main__": BUG_REPORT_URL="{build_defaults['bugtracker_url']}" """ - chroot_includes_dir = os.path.join(defaults.BUILD_DIR, defaults.CHROOT_INCLUDES_DIR) - binary_includes_dir = os.path.join(defaults.BUILD_DIR, defaults.BINARY_INCLUDES_DIR) + # Switch to the build directory, this is crucial for the live-build work + # because the efective build config files etc. are there. + # + # All directory paths from this point must be relative to BUILD_DIR, + # not to the vyos-build repository root. + os.chdir(defaults.BUILD_DIR) + + chroot_includes_dir = defaults.CHROOT_INCLUDES_DIR + binary_includes_dir = defaults.BINARY_INCLUDES_DIR vyos_data_dir = os.path.join(chroot_includes_dir, "usr/share/vyos") os.makedirs(vyos_data_dir, exist_ok=True) with open(os.path.join(vyos_data_dir, 'version.json'), 'w') as f: @@ -366,11 +372,6 @@ if __name__ == "__main__": with open(os.path.join(chroot_includes_dir, 'usr/lib//os-release'), 'w') as f: print(os_release, file=f) - - ## Switch to the build directory, this is crucial for the live-build work work - ## because the efective build config files etc. are there - os.chdir(defaults.BUILD_DIR) - ## Clean up earlier build state and artifacts print("I: Cleaning the build workspace") os.system("lb clean") @@ -428,11 +429,12 @@ if __name__ == "__main__": if has_nonempty_key(build_config, "includes_chroot"): for i in build_config["includes_chroot"]: file_path = os.path.join(chroot_includes_dir, i["path"]) + if debug: + print(f"D: Creating chroot 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"]) - ## Configure live-build lb_config_tmpl = jinja2.Template(""" lb config noauto \ |