diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-11-03 17:14:58 +0000 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-05-05 14:51:44 +0200 |
commit | 125aab4b7e2eabf5ecf67271c71199f501fa11a6 (patch) | |
tree | dcba602d78b78b459535188e43ac9649ece6d6d1 /scripts | |
parent | 2da9d989d17e90d12a6d22222270729531721a5e (diff) | |
download | vyos-build-125aab4b7e2eabf5ecf67271c71199f501fa11a6.tar.gz vyos-build-125aab4b7e2eabf5ecf67271c71199f501fa11a6.zip |
build script: T5711: copy version.json to the ISO image in addition to the SquashFS image
(cherry picked from commit f31701f1b48b696ed4176b8ae413aa956ff15c5c)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-vyos-image | 12 | ||||
-rw-r--r-- | scripts/vyos_build_defaults.py | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image index 141da5e2..5ee0b3ed 100755 --- a/scripts/build-vyos-image +++ b/scripts/build-vyos-image @@ -348,18 +348,14 @@ BUG_REPORT_URL="{build_defaults['bugtracker_url']}" DOCUMENTATION_URL="{build_config['documentation_url']}" """ - # 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 + 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) 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: json.dump(version_data, f) + with open(os.path.join(binary_includes_dir, 'version.json'), 'w') as f: + json.dump(version_data, f) # For backwards compatibility with 'add system image' script from older versions # we need a file in the old format so that script can find out the version of the image diff --git a/scripts/vyos_build_defaults.py b/scripts/vyos_build_defaults.py index 975fcb71..1e153f4b 100644 --- a/scripts/vyos_build_defaults.py +++ b/scripts/vyos_build_defaults.py @@ -37,6 +37,7 @@ PBUILDER_DIR = 'pbuilder' LB_CONFIG_DIR = 'config' CHROOT_INCLUDES_DIR = 'config/includes.chroot' +BINARY_INCLUDES_DIR = 'config/includes.binary' ARCHIVES_DIR = 'config/archives/' VYOS_REPO_FILE = 'config/archives/vyos.list.chroot' |