From aa91197422cee8dda2e79cd307cfaf0194044eb4 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 26 Jun 2018 14:21:32 +0200 Subject: T712: add configure options to simplify building images with custom packages. --- scripts/build-config | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts/build-config') 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: -- cgit v1.2.3