vyos-build/scripts/live-build-config
Christian Poessinger 44e24298ad VyOS Kernel Update v4.4.95
* packages/vyos-kernel efe6504...0a84c7e (18):
  > Merge tag 'v4.4.95' into current
  > add virtio scsi to kernel as loadable module
  > remove Automatically generated lines
  > Enable intel QuickAssist Technology modules
  > dccp: fix freeing skb too early for IPV6_RECVPKTINFO
  > virtio_net: validate ethtool port setting and explain the user validation
  > ethtool: make validate_speed accept all speeds between 0 and INT_MAX
  > virtio_net: add ethtool support for set and get of settings
  > ethtool: add speed/duplex validation functions
  > add vyos x86_64 defconfig
  > Merge tag 'v4.4.47' into current
2017-10-29 18:54:18 +01:00

70 lines
2.2 KiB
Python
Executable File

#!/usr/bin/env python3
#
# Copyright (C) 2015 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
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: live-build-config
# Purpose:
# Creates a live-build config command from template using the build config
# and executes it, to prepare the system for building the installation ISO.
import sys
import os
import json
import pystache
import defaults
import util
util.check_build_config()
lb_config_tmpl = """
lb config noauto \
--architectures {{architecture}} \
--bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay" \
--linux-flavours {{architecture}}-vyos \
--linux-packages linux-image-4.4.95 \
--bootloader syslinux \
--binary-images iso-hybrid \
--debian-installer false \
--distribution jessie \
--iso-application "VyOS" \
--iso-publisher "{{build_by}}" \
--iso-volume "VyOS" \
--debootstrap-options "--variant=minbase --exclude=isc-dhcp-client,isc-dhcp-common,ifupdown" \
--mirror-bootstrap {{debian_mirror}} \
--mirror-chroot {{debian_mirror}} \
--mirror-chroot-security {{debian_security_mirror}} \
--mirror-binary {{debian_mirror}} \
--mirror-binary-security {{debian_security_mirror}} \
--archive-areas "main contrib non-free" \
--firmware-chroot true
"${@}"
"""
with open(defaults.BUILD_CONFIG, 'r') as f:
build_config = json.load(f)
lb_config_command = pystache.render(lb_config_tmpl, build_config)
print("Configuring live-build")
os.chdir(defaults.BUILD_DIR)
result = os.system(lb_config_command)
if result > 0:
print("live-build config failed")
sys.exit(1)