mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
T519: make VyOS package mirror configurable.
This commit is contained in:
parent
81cacb0a31
commit
522ebc6250
@ -1 +0,0 @@
|
||||
deb http://dev.packages.vyos.net/vyos current main
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 VyOS maintainers and contributors
|
||||
# Copyright (C) 2018, VyOS maintainers and contributors
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 or later as
|
||||
@ -52,6 +52,7 @@ options = {
|
||||
'debian-mirror': ('Debian repository mirror for ISO build', lambda: defaults.DEBIAN_MIRROR, None),
|
||||
'debian-security-mirror': ('Debian security updated mirror', lambda: defaults.DEBIAN_SECURITY_MIRROR, None),
|
||||
'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']),
|
||||
'version': ('Version number (release builds only)', None, None)
|
||||
}
|
||||
@ -96,6 +97,7 @@ if args['build_type'] == 'development':
|
||||
args['distribution'] = defaults.DEBIAN_DISTRIBUTION
|
||||
args['build_dir'] = os.path.join(os.getcwd(), defaults.BUILD_DIR)
|
||||
args['pbuilder_config'] = defaults.PBUILDER_CONFIG
|
||||
args['vyos_branch'] = defaults.VYOS_BRANCH
|
||||
|
||||
# Check the build environment and dependencies
|
||||
env_check_retval = os.system("scripts/check-build-env")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2015 VyOS maintainers and contributors
|
||||
# Copyright (C) 2018 VyOS maintainers and contributors
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 or later as
|
||||
@ -32,3 +32,9 @@ PBUILDER_DIR = os.path.join(BUILD_DIR, 'pbuilder')
|
||||
|
||||
LB_CONFIG_DIR = os.path.join(BUILD_DIR, 'config')
|
||||
CHROOT_INCLUDES_DIR = os.path.join(LB_CONFIG_DIR, 'includes.chroot')
|
||||
|
||||
VYOS_MIRROR = 'http://dev.packages.vyos.net/repositories/current/vyos'
|
||||
|
||||
VYOS_BRANCH = 'current'
|
||||
|
||||
VYOS_REPO_FILE = 'config/archives/vyos.list.chroot'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2015 VyOS maintainers and contributors
|
||||
# Copyright (C) 2018 VyOS maintainers and contributors
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 or later as
|
||||
@ -60,6 +60,15 @@ lb config noauto \
|
||||
with open(defaults.BUILD_CONFIG, 'r') as f:
|
||||
build_config = json.load(f)
|
||||
|
||||
# Add the additional repositories to package lists
|
||||
print("Setting up additional APT entries")
|
||||
vyos_repo_entry = "deb {0} {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch'])
|
||||
|
||||
with open(os.path.join(defaults.BUILD_DIR, defaults.VYOS_REPO_FILE), 'w') as f:
|
||||
f.write(vyos_repo_entry)
|
||||
|
||||
# Configure live-build
|
||||
|
||||
lb_config_command = pystache.render(lb_config_tmpl, build_config)
|
||||
|
||||
print("Configuring live-build")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user