diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-06-26 14:21:32 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-06-26 14:21:32 +0200 |
commit | aa91197422cee8dda2e79cd307cfaf0194044eb4 (patch) | |
tree | 6bc1ff7ecde1c1b9d3c615aa9680ce2512ad176a /scripts/build-config | |
parent | 7f14d89db276262884dbb6b291fcbd396b007850 (diff) | |
download | vyos-build-aa91197422cee8dda2e79cd307cfaf0194044eb4.tar.gz vyos-build-aa91197422cee8dda2e79cd307cfaf0194044eb4.zip |
T712: add configure options to simplify building images with custom packages.
Diffstat (limited to 'scripts/build-config')
-rwxr-xr-x | scripts/build-config | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/build-config b/scripts/build-config index 27a6c7ba..008311ad 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -59,6 +59,7 @@ options = { 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: defaults.DEBIAN_MIRROR, None), 'vyos-mirror': ('VyOS package mirror', lambda: defaults.VYOS_MIRROR, None), 'build-type': ('Build type, release or development', lambda: 'development', lambda x: x in ['release', 'development']), + 'custom-packages': ('Custom packages to install from repositories', lambda: '', None), 'version': ('Version number (release builds only)', None, None) } @@ -74,6 +75,10 @@ for k, v in options.items(): # The debug option is a bit special since it's different type parser.add_argument('--debug', help="Enable debug output", 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') +parser.add_argument('--custom-apt-key', help="Custom APT key file", action='append') + args = vars(parser.parse_args()) # Validate options @@ -107,6 +112,13 @@ args['build_dir'] = os.path.join(os.getcwd(), defaults.BUILD_DIR) args['pbuilder_config'] = defaults.PBUILDER_CONFIG args['vyos_branch'] = defaults.VYOS_BRANCH +# Convert a whitespace-separated string of custom packages to a list +if args['custom_packages']: + args['custom_packages'] = re.split(r'\s+', args['custom_packages']) +else: + args['custom_packages'] = [] + + # Check the build environment and dependencies env_check_retval = os.system("scripts/check-build-env") if env_check_retval > 0: |