summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-10-08 07:16:46 +0200
committerGitHub <noreply@github.com>2024-10-08 07:16:46 +0200
commitfa25f86558384bc8aac14ccc1d937cc619b00052 (patch)
treef013fba839cde9b5079cf52d2ab82ca5cf4ecd6d
parentdb938f796798b731e702b834c7558b15301884c7 (diff)
parent475e5dd77f0f5d922096eea8b46bb35bc1eb1de8 (diff)
downloadvyos-build-fa25f86558384bc8aac14ccc1d937cc619b00052.tar.gz
vyos-build-fa25f86558384bc8aac14ccc1d937cc619b00052.zip
Merge pull request #798 from vyos/mergify/bp/circinus/pr-797
T3303: fix location of os-release file (backport #797)
-rwxr-xr-xscripts/image-build/build-vyos-image29
1 files changed, 14 insertions, 15 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image
index 56e765f7..6ee1c3e5 100755
--- a/scripts/image-build/build-vyos-image
+++ b/scripts/image-build/build-vyos-image
@@ -433,19 +433,18 @@ if __name__ == "__main__":
# Multi line strings needs to be un-indented to not have leading
# whitespaces in the resulting file
- os_release = f"""
- PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
- NAME="VyOS"
- VERSION_ID="{version}"
- VERSION="{version} ({build_config['release_train']})"
- VERSION_CODENAME={build_defaults['debian_distribution']}
- ID=vyos
- BUILD_ID="{build_git}"
- HOME_URL="{build_defaults['website_url']}"
- SUPPORT_URL="{build_defaults['support_url']}"
- BUG_REPORT_URL="{build_defaults['bugtracker_url']}"
- DOCUMENTATION_URL="{build_config['documentation_url']}"
- """
+ os_release = f"""PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
+NAME="VyOS"
+VERSION_ID="{version}"
+VERSION="{version} ({build_config['release_train']})"
+VERSION_CODENAME={build_defaults['debian_distribution']}
+ID=vyos
+BUILD_ID="{build_git}"
+HOME_URL="{build_defaults['website_url']}"
+SUPPORT_URL="{build_defaults['support_url']}"
+BUG_REPORT_URL="{build_defaults['bugtracker_url']}"
+DOCUMENTATION_URL="{build_config['documentation_url']}"
+"""
# Reminder: all paths relative to the build dir, not to the repository root
chroot_includes_dir = defaults.CHROOT_INCLUDES_DIR
@@ -465,8 +464,8 @@ if __name__ == "__main__":
print("Version: {0}".format(version), file=f)
# Define variables that influence to welcome message on boot
- os.makedirs(os.path.join(chroot_includes_dir, 'usr/lib/'), exist_ok=True)
- with open(os.path.join(chroot_includes_dir, 'usr/lib/os-release'), 'w') as f:
+ os.makedirs(os.path.join(chroot_includes_dir, 'etc/'), exist_ok=True)
+ with open(os.path.join(chroot_includes_dir, 'etc/os-release'), 'w') as f:
print(os_release, file=f)
## Clean up earlier build state and artifacts