diff options
7 files changed, 52 insertions, 34 deletions
diff --git a/data/defaults.toml b/data/defaults.toml index 6d535369..45579808 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.30" +kernel_version = "6.6.31" bootloaders = "syslinux,grub-efi" squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-recovery" diff --git a/data/live-build-config/archives/trixie.list.chroot b/data/live-build-config/archives/trixie.list.chroot index a806ca4b..1e6803c3 100644 --- a/data/live-build-config/archives/trixie.list.chroot +++ b/data/live-build-config/archives/trixie.list.chroot @@ -1,2 +1,2 @@ -deb http://deb.debian.org/debian/ trixie main non-free -deb http://deb.debian.org/debian/ trixie-updates main non-free +deb http://deb.debian.org/debian/ trixie main +deb http://deb.debian.org/debian/ trixie-updates main diff --git a/data/live-build-config/hooks/live/20-systemd_target.chroot b/data/live-build-config/hooks/live/20-systemd_target.chroot new file mode 100755 index 00000000..a8d9fef2 --- /dev/null +++ b/data/live-build-config/hooks/live/20-systemd_target.chroot @@ -0,0 +1,4 @@ +#!/bin/sh + +echo I: Choose systemd multi-user.target over graphical.target +systemctl set-default -f multi-user.target diff --git a/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default b/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default index c3ff6c79..d31892ba 100644 --- a/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default +++ b/data/live-build-config/includes.chroot/opt/vyatta/etc/config.boot.default @@ -29,9 +29,12 @@ system { address fe80::/10 address fc00::/7 } - server "time1.vyos.net" - server "time2.vyos.net" - server "time3.vyos.net" + server time1.vyos.net { + } + server time2.vyos.net { + } + server time3.vyos.net { + } } console { device ttyS0 { diff --git a/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch b/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch index 2e9b4dd6..af67ef5c 100644 --- a/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch +++ b/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch @@ -100,7 +100,7 @@ index bc74f131fe4d..9cdd5b50f9b2 100644 }; diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c -index d1806eee1687..b4893d713b8c 100644 +index 9dfbda164e8c..2786c8ea451a 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -5656,6 +5656,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf, @@ -111,7 +111,7 @@ index d1806eee1687..b4893d713b8c 100644 } static inline size_t inet6_ifla6_size(void) -@@ -7084,6 +7085,13 @@ static const struct ctl_table addrconf_sysctl[] = { +@@ -7085,6 +7086,13 @@ static const struct ctl_table addrconf_sysctl[] = { .extra1 = (void *)SYSCTL_ZERO, .extra2 = (void *)SYSCTL_ONE, }, diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index 80339308..58e2dce5 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -26,8 +26,6 @@ import uuid import glob import json import shutil -import getpass -import platform import argparse import datetime import functools @@ -130,12 +128,9 @@ except OSError as e: def field_to_option(s): return re.sub(r'_', '-', s) -def get_default_build_by(): - return "{user}@{host}".format(user= getpass.getuser(), host=platform.node()) - def get_validator(optdict, name): try: - return optdict[name][2] + return optdict[name][1] except KeyError: return None @@ -190,38 +185,35 @@ if __name__ == "__main__": # Options dict format: # '$option_name_without_leading_dashes': { ('$help_string', $default_value_generator_thunk, $value_checker_thunk) } options = { - 'architecture': ('Image target architecture (amd64 or arm64)', None, lambda x: x in ['amd64', 'arm64', None]), - 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), - 'debian-mirror': ('Debian repository mirror', None, None), - 'debian-security-mirror': ('Debian security updates mirror', None, None), - 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', None, None), - 'vyos-mirror': ('VyOS package mirror', None, None), - 'build-type': ('Build type, release or development', None, lambda x: x in ['release', 'development']), - 'version': ('Version number (release builds only)', None, None), - 'build-comment': ('Optional build comment', lambda: '', None) + 'architecture': ('Image target architecture (amd64 or arm64)', lambda x: x in ['amd64', 'arm64', None]), + 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', None), + 'debian-mirror': ('Debian repository mirror', None), + 'debian-security-mirror': ('Debian security updates mirror', None), + 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', None), + 'vyos-mirror': ('VyOS package mirror', None), + 'build-type': ('Build type, release or development', lambda x: x in ['release', 'development']), + 'version': ('Version number (release builds only)', None), + 'build-comment': ('Optional build comment', None) } # Create the option parser parser = argparse.ArgumentParser() for k, v in options.items(): - help_string, default_value_thunk = v[0], v[1] - if default_value_thunk is None: - parser.add_argument('--' + k, type=str, help=help_string) - else: - parser.add_argument('--' + k, type=str, help=help_string, default=default_value_thunk()) + help_string = v[0] + parser.add_argument('--' + k, type=str, help=help_string) # Debug options parser.add_argument('--debug', help='Enable debug output', action='store_true') parser.add_argument('--dry-run', help='Check build configuration and exit', action='store_true') # Custom APT entry and APT key options can be used multiple times - parser.add_argument('--custom-apt-entry', help="Custom APT entry", action='append', default=[]) - parser.add_argument('--custom-apt-key', help="Custom APT key file", action='append', default=[]) - parser.add_argument('--custom-package', help="Custom package to install from repositories", action='append', default=[]) + parser.add_argument('--custom-apt-entry', help="Custom APT entry", action='append') + parser.add_argument('--custom-apt-key', help="Custom APT key file", action='append') + parser.add_argument('--custom-package', help="Custom package to install from repositories", action='append') # Options relevant for non-ISO format flavors - parser.add_argument('--reuse-iso', help='Use an existing ISO file to build additional image formats', type=str, action='store', default=None) - parser.add_argument('--disk-size', help='Disk size for non-ISO image formats', type=int, action='store', default=10) + parser.add_argument('--reuse-iso', help='Use an existing ISO file to build additional image formats', type=str, action='store') + parser.add_argument('--disk-size', help='Disk size for non-ISO image formats', type=int, action='store') # Build flavor is a positional argument parser.add_argument('build_flavor', help='Build flavor', nargs='?', action='store') @@ -295,8 +287,11 @@ if __name__ == "__main__": args['build_dir'] = defaults.BUILD_DIR args['pbuilder_config'] = os.path.join(defaults.BUILD_DIR, defaults.PBUILDER_CONFIG) + ## Add hardcoded defaults + build_config = merge_defaults(defaults.HARDCODED_BUILD, defaults={}) + ## Combine the arguments with non-configurable defaults - build_config = copy.deepcopy(build_defaults) + build_config = merge_defaults(build_defaults, defaults=build_config) ## Load correct mix-ins with open(make_toml_path(defaults.BUILD_TYPES_DIR, pre_build_config["build_type"]), 'rb') as f: diff --git a/scripts/image-build/defaults.py b/scripts/image-build/defaults.py index 9fd5eeed..a0c5c8bf 100644 --- a/scripts/image-build/defaults.py +++ b/scripts/image-build/defaults.py @@ -17,6 +17,11 @@ import os +import getpass +import platform + +def get_default_build_by(): + return "{user}@{host}".format(user= getpass.getuser(), host=platform.node()) # Default boot settings boot_settings: dict[str, str] = { @@ -27,6 +32,17 @@ boot_settings: dict[str, str] = { 'bootmode': 'normal' } +# Hardcoded default values +HARDCODED_BUILD = { + 'custom_apt_entry': [], + 'custom_apt_key': [], + 'custom_package': [], + 'reuse_iso': None, + 'disk_size': 10, + 'build_by': get_default_build_by(), + 'build_comment': '', +} + # Relative to the repository directory BUILD_DIR = 'build' |