From e08da45e6d20f1f2ac38fff24e697a155ddac3ea Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 11 May 2019 14:22:17 +0200 Subject: T1378: extend version file with Git commit ID The Git commit ID will be crucial for the future when the full VyOS build can be reproduced by the one Git commit ID, thus start recording it in the version file. --- scripts/make-version-file | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/make-version-file b/scripts/make-version-file index 9557472..4df2cb6 100755 --- a/scripts/make-version-file +++ b/scripts/make-version-file @@ -43,7 +43,16 @@ build_timestamp = now.strftime("%Y%m%d%H%M") build_date = now.strftime("%a %d %b %Y %H:%M UTC") # Assign a (hopefully) unique identifier to the build (UUID) -build_id = str(uuid.uuid4()) +build_uuid = str(uuid.uuid4()) + +# Initialize Git object from our repository +repo = git.Repo('.') + +# Retrieve the Git commit ID of the repository, 14 charaters will be sufficient +build_git = repo.head.object.hexsha[:14] +# If somone played around with the source tree and the build is "dirty", mark it +if repo.is_dirty(): + build_git += "-dirty" # Create a build version if build_config['build_type'] == 'development': @@ -52,7 +61,6 @@ if build_config['build_type'] == 'development': with open('data/versions') as f: version_mapping = json.load(f) - repo = git.Repo('.') git_branch = repo.active_branch.name branch_version = version_mapping[git_branch] @@ -68,10 +76,10 @@ version_data = { 'version': version, 'built_by': build_config['build_by'], 'built_on': build_date, - 'build_id': build_id + 'build_uuid': build_uuid, + 'build_git': build_git } - os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos'), exist_ok=True) with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos/version.json'), 'w') as f: json.dump(version_data, f) -- cgit v1.2.3 From 8e8b67020de7c135e3321811388d1cf7bd886290 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 13 May 2019 21:58:10 +0200 Subject: Remove build-kernel helper script Logic is available via scripts/build-package helper. --- scripts/build-kernel | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 scripts/build-kernel (limited to 'scripts') diff --git a/scripts/build-kernel b/scripts/build-kernel deleted file mode 100755 index e58d2d5..0000000 --- a/scripts/build-kernel +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -if [ ! -f "Makefile" ]; then - echo "Makefile missing, This script needs to be executed inside the vyos-kernel package directory" - exit 1 -fi - -if grep -Fxq "KBUILD_OUTPUT" Makefile; then - echo "Wrong Makefile?, This script needs to be executed inside the vyos-kernel package directory" - exit 1 -fi - - -# newer Kernel versions come with a "# SPDX-License-Identifier: GPL-2.0" identifier -# as the first line in the file - use compatible approach with grep rather then sed -VERSION=$(grep "^VERSION" Makefile | grep -Eo '[0-9]{1,4}') -PATCHLEVEL=$(grep "^PATCHLEVEL" Makefile | grep -Eo '[0-9]{1,4}') -SUBLEVEL=$(grep "^SUBLEVEL" Makefile | grep -Eo '[0-9]{1,4}') -ARCH=$(dpkg --print-architecture) - -case "$ARCH" in - amd64) - make x86_64_vyos_defconfig - TARGETS="kernel_headers kernel_image" - # the following targets are not supported for Linux Kernels > 4.14 as - # they have been removed from the Makefile (commits 18afab8c1d3c2 & - # 22cba31bae9dc). - if [ ${PATCHLEVEL} -lt 14 ]; then - TARGETS+=" kernel_manual kernel_doc" - fi - CONCURRENCY_LEVEL=4 LOCALVERSION="" make-kpkg --rootcmd fakeroot --initrd --append_to_version -amd64-vyos --revision=$VERSION.$PATCHLEVEL.$SUBLEVEL-1+vyos1+current1 -j$(cat /proc/cpuinfo | grep processor | wc -l) ${TARGETS} - ;; - - armhf) - make armhf_vyos_defconfig - ;; -esac -- cgit v1.2.3 From 217aa6afaebc021700cb6a4984f35720995f7ec5 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 12 May 2019 20:51:11 +0200 Subject: intel: remove bash debug flag (-x) when building drivers --- scripts/build-intel-drivers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-intel-drivers b/scripts/build-intel-drivers index aafd66a..f47b6c9 100755 --- a/scripts/build-intel-drivers +++ b/scripts/build-intel-drivers @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash basedir=$(pwd) if [ -z "$KSRC" ]; then -- cgit v1.2.3 From d8ee537f1528dfe3e37ad1afe2b9dd3dab81cbd0 Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Tue, 21 May 2019 22:15:55 +0200 Subject: update cloud builds --- Makefile | 48 ++++++++++++++++++++++- scripts/build-oracle-image | 2 +- scripts/template.ovf | 28 +++++++------ tools/cloud-init/99-debug-user.chroot | 17 ++++++++ tools/cloud-init/99-disable-networking.chroot | 3 ++ tools/cloud-init/GCE/99-debug-user.chroot | 17 -------- tools/cloud-init/OCI/config.boot.default | 12 +++++- tools/cloud-init/PACKET/90_dpkg.cfg | 8 ++++ tools/cloud-init/PACKET/config.boot.default | 39 ++++++++++++++++++ tools/cloud-init/PACKET/config.boot.default-debug | 41 +++++++++++++++++++ tools/cloud-init/openstack/90_dpkg.cfg | 8 ++++ tools/cloud-init/openstack/config.boot.default | 40 +++++++++++++++++++ 12 files changed, 230 insertions(+), 33 deletions(-) create mode 100755 tools/cloud-init/99-debug-user.chroot create mode 100755 tools/cloud-init/99-disable-networking.chroot delete mode 100755 tools/cloud-init/GCE/99-debug-user.chroot create mode 100644 tools/cloud-init/PACKET/90_dpkg.cfg create mode 100644 tools/cloud-init/PACKET/config.boot.default create mode 100644 tools/cloud-init/PACKET/config.boot.default-debug create mode 100644 tools/cloud-init/openstack/90_dpkg.cfg create mode 100644 tools/cloud-init/openstack/config.boot.default (limited to 'scripts') diff --git a/Makefile b/Makefile index 3bfa959..c42766a 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ GCE-debug: clean prepare @set -e @echo "It's not like I'm building this specially for you or anything!" mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d - cp tools/cloud-init/GCE/99-debug-user.chroot build/config/hooks/live/ + cp tools/cloud-init/99-debug-user.chroot build/config/hooks/live/ cp tools/cloud-init/GCE/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ cp -f tools/cloud-init/GCE/config.boot.default-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default @@ -133,6 +133,20 @@ AWS: clean prepare cd .. @scripts/copy-image +.PHONY: openstack +.ONESHELL: +openstack: clean prepare + @set -e + @echo "It's not like I'm building this specially for you or anything!" + mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d + cp tools/cloud-init/openstack/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/openstack/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + .PHONY: oracle .ONESHELL: oracle: clean prepare @@ -141,9 +155,41 @@ oracle: clean prepare mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d cp tools/cloud-init/OCI/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/OCI/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ cd $(build_dir) @../scripts/build-oracle-image +.PHONY: PACKET +.ONESHELL: +PACKET: clean prepare + @set -e + @echo "It's not like I'm building this specially for you or anything!" + mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d + cp tools/cloud-init/99-disable-networking.chroot build/config/hooks/live/ + cp tools/cloud-init/PACKET/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/PACKET/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + +.PHONY: PACKET-debug +.ONESHELL: +PACKET-debug: clean prepare + @set -e + @echo "It's not like I'm building this specially for you or anything!" + mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d + cp tools/cloud-init/99-debug-user.chroot build/config/hooks/live/ + cp tools/cloud-init/99-disable-networking.chroot build/config/hooks/live/ + cp tools/cloud-init/PACKET/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/PACKET/config.boot.default-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + .PHONY: clean .ONESHELL: clean: diff --git a/scripts/build-oracle-image b/scripts/build-oracle-image index 61f8dde..e2066fc 100755 --- a/scripts/build-oracle-image +++ b/scripts/build-oracle-image @@ -57,7 +57,7 @@ dateymd=$(date +%Y%m%d) PARTED=/sbin/parted OUTPUT=disk.raw OUTPUTQCOW2=VyOS-"$dateymd".qcow2 -IMAGE_SIZE=2 +IMAGE_SIZE=10 qemu-img create -f raw ${OUTPUT} ${IMAGE_SIZE}G ${PARTED} -s ${OUTPUT} mktable msdos diff --git a/scripts/template.ovf b/scripts/template.ovf index 87237bf..88ea556 100644 --- a/scripts/template.ovf +++ b/scripts/template.ovf @@ -1,5 +1,5 @@ - - + + @@ -39,22 +39,22 @@ VyOS is a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. VyOS - VyOS maintainers and contributors + Sentrium S.L. {{version}} https://www.vyos.io https://sentrium.io/ Appliance user Settings - + - The password for the appliance 'vyos' account. Passwords must be at least 8 characters in length. + The password for the appliance 'vyos' account. Passwords must be at least 8 characters in length. - + - The public ssh key for the appliance 'vyos' account. + The public ssh key for the appliance 'vyos' account. Appliance IPv4 Network Settings - + The host name for this virtual machine. @@ -87,11 +87,11 @@ VyOS - - Guest Operating System - VyOS + + The operating system installed + Debian GNU/Linux 8 (64-bit) - + Virtual Hardware Requirements Virtual Hardware Family @@ -148,7 +148,7 @@ 0 - SCSI Controller 0 + SCSI Controller 0 - VMware Paravirtual SCSI 3 VirtualSCSI 6 @@ -195,6 +195,8 @@ vmxnet3 10 + + diff --git a/tools/cloud-init/99-debug-user.chroot b/tools/cloud-init/99-debug-user.chroot new file mode 100755 index 0000000..7b72f89 --- /dev/null +++ b/tools/cloud-init/99-debug-user.chroot @@ -0,0 +1,17 @@ +#!/bin/bash +# Script to add a user to Linux system +if [ $(id -u) -eq 0 ]; then + egrep "^debuguser" /etc/passwd >/dev/null + if [ $? -eq 0 ]; then + echo "$username exists!" + exit 1 + else + pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) + useradd -m -p $pass debuguser + usermod -aG sudo debuguser + [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" + fi +else + echo "Only root may add a user to the system" + exit 2 +fi diff --git a/tools/cloud-init/99-disable-networking.chroot b/tools/cloud-init/99-disable-networking.chroot new file mode 100755 index 0000000..e576c8a --- /dev/null +++ b/tools/cloud-init/99-disable-networking.chroot @@ -0,0 +1,3 @@ +#!/bin/bash +systemctl disable networking +/usr/sbin/update-rc.d -f networking remove diff --git a/tools/cloud-init/GCE/99-debug-user.chroot b/tools/cloud-init/GCE/99-debug-user.chroot deleted file mode 100755 index 7b72f89..0000000 --- a/tools/cloud-init/GCE/99-debug-user.chroot +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Script to add a user to Linux system -if [ $(id -u) -eq 0 ]; then - egrep "^debuguser" /etc/passwd >/dev/null - if [ $? -eq 0 ]; then - echo "$username exists!" - exit 1 - else - pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) - useradd -m -p $pass debuguser - usermod -aG sudo debuguser - [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" - fi -else - echo "Only root may add a user to the system" - exit 2 -fi diff --git a/tools/cloud-init/OCI/config.boot.default b/tools/cloud-init/OCI/config.boot.default index 296c690..de724f0 100644 --- a/tools/cloud-init/OCI/config.boot.default +++ b/tools/cloud-init/OCI/config.boot.default @@ -1,4 +1,14 @@ system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } syslog { global { facility all { @@ -16,7 +26,7 @@ system { } console { device ttyS0 { - speed 115200 + speed 9600 } } config-management { diff --git a/tools/cloud-init/PACKET/90_dpkg.cfg b/tools/cloud-init/PACKET/90_dpkg.cfg new file mode 100644 index 0000000..4f7bbd8 --- /dev/null +++ b/tools/cloud-init/PACKET/90_dpkg.cfg @@ -0,0 +1,8 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ Ec2 ] +datasource: + Ec2: + metadata_urls: ["https://metadata.packet.net"] + max_wait: 120 + timeout: 50 + strict_id: false diff --git a/tools/cloud-init/PACKET/config.boot.default b/tools/cloud-init/PACKET/config.boot.default new file mode 100644 index 0000000..cca5fcb --- /dev/null +++ b/tools/cloud-init/PACKET/config.boot.default @@ -0,0 +1,39 @@ +system { + host-name vyos + login { + user vyos { + authentication { + plaintext-password "vyos" + } + level admin + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS1 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/PACKET/config.boot.default-debug b/tools/cloud-init/PACKET/config.boot.default-debug new file mode 100644 index 0000000..85e3a89 --- /dev/null +++ b/tools/cloud-init/PACKET/config.boot.default-debug @@ -0,0 +1,41 @@ +interfaces { + ethernet eth0 { + address dhcp + } +} +service { + ssh { + port 8022 + client-keepalive-interval 180 + } +} +system { + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS1 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/openstack/90_dpkg.cfg b/tools/cloud-init/openstack/90_dpkg.cfg new file mode 100644 index 0000000..a740b31 --- /dev/null +++ b/tools/cloud-init/openstack/90_dpkg.cfg @@ -0,0 +1,8 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, AltCloud, MAAS, OpenStack, CloudSigma, SmartOS, None ] +disable_ec2_metadata: true +datasource: + OpenStack: + max_wait: 6 + timeout: 3 + retries: 2 diff --git a/tools/cloud-init/openstack/config.boot.default b/tools/cloud-init/openstack/config.boot.default new file mode 100644 index 0000000..de724f0 --- /dev/null +++ b/tools/cloud-init/openstack/config.boot.default @@ -0,0 +1,40 @@ +system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS0 { + speed 9600 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} -- cgit v1.2.3 From 34e840e4c022033342e39cbc627888f2b4fcef69 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 May 2019 19:55:22 +0200 Subject: Packages: add live-boot package to build procedure --- scripts/build-packages | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/build-packages b/scripts/build-packages index cf7f369..a4516fe 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -192,6 +192,7 @@ vyos_packages = ['vyatta-bash', 'ddclient', 'igmpproxy', 'eventwatchd', + 'live-boot', 'conntrack-tools'] # Special packages mean packages which are located no in the VyOS namespace -- cgit v1.2.3 From 787b4aaac8505fbada61256b40fdb7b5ea150bf4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 26 May 2019 17:18:11 +0200 Subject: Packages/modules: install accel-ppp and wireguard modules into right location ... previously the modules have been installed into /lib/modules/4.14.45 and not 4.14.45-amd64-vyos. --- scripts/build-packages | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/build-packages b/scripts/build-packages index a4516fe..fb577f3 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -259,7 +259,7 @@ pkg_special.append( add_package('vyos-kernel', branch='linux-vyos-4.19.y', custo # # WireGuard Kernel Module # -wireguard_build_cmd = "echo 'src/wireguard.ko /lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\") > debian/wireguard-modules.install && " \ +wireguard_build_cmd = "echo 'src/wireguard.ko /lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")-amd64-vyos/extra > debian/wireguard-modules.install && " \ "KERNELDIR=" + repo_root + "/packages/vyos-kernel dpkg-buildpackage -b -us -uc -tc -j" + str(os.cpu_count()) pkg_special.append( add_package('vyos-wireguard', custombuild_cmd=wireguard_build_cmd) ) @@ -268,8 +268,8 @@ pkg_special.append( add_package('vyos-wireguard', custombuild_cmd=wireguard_buil # # Accell-PPP Package and Kernel Module # -accel_ppp_build_cmd = "echo 'lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")'/extra/*.ko' > debian/vyos-accel-ppp-ipoe-kmod.install && " \ - "sed -i 's#[0-9].[0-9][0-9].[0-9]*-amd64-vyos#'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")'#g' debian/rules && " \ +accel_ppp_build_cmd = "echo 'lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")-amd64-vyos/extra/*.ko > debian/vyos-accel-ppp-ipoe-kmod.install && " \ + "sed -i 's#[0-9].[0-9][0-9].[0-9]*-amd64-vyos#'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")'-amd64-vyos#g' debian/rules && " \ "KERNELDIR=" + repo_root + "/packages/vyos-kernel dpkg-buildpackage -b -us -uc -tc -j" + str(os.cpu_count()) pkg_special.append( add_package('vyos-accel-ppp', custombuild_cmd=accel_ppp_build_cmd) ) -- cgit v1.2.3 From b60f6140ef221d32ce43fb2ebacec41ed58fb00a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:22:32 +0200 Subject: Packages: do not create obsolete 'data/kernel_version' file --- scripts/build-packages | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-packages b/scripts/build-packages index fb577f3..dcc74c0 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -249,7 +249,6 @@ pkg_special.append( add_package('net-snmp', custombuild_cmd=net_snmp_build_cmd) # Linux (VyOS) Kernel # kernel_build_cmd = "make x86_64_vyos_defconfig && " \ - "echo $(make kernelversion)-amd64-vyos > " + repo_root + "/data/kernel_version && " \ "sed -i 's/\"kernel_version\": \"[0-9].[0-9][0-9].[0-9]*\"/\"kernel_version\": \"'$(make kernelversion)'\"/' " + repo_root + "/data/defaults.json && " \ "make bindeb-pkg LOCALVERSION='-amd64-vyos' KDEB_PKGVERSION=$(make kernelversion)-1 -j $(getconf _NPROCESSORS_ONLN)" pkg_special.append( add_package('vyos-kernel', branch='linux-vyos-4.19.y', custombuild_cmd=kernel_build_cmd) ) -- cgit v1.2.3 From 8cec5a37947accd0dbcc3ab58e6557c3ec347377 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:37:31 +0200 Subject: Packages: add '--keep' option to not clean packages By default all git repos are reset using 'git reset --hard' and cleaned using 'git clean -x -d -f'. A developer sometimes would like to keep his changes and thus the --keep option was added. --- scripts/build-packages | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-packages b/scripts/build-packages index dcc74c0..aa73228 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -98,7 +98,10 @@ def clone_package(pkg, log): First cleanup any possible leftovers from previous builds """ - if args.clean: + if args.keep: + log.debug("Keep possibly modified package '{}'".format(pkg['path'])) + return False + elif args.clean: # delete repository from disk if os.path.isdir(pkg['path']): log.debug("Cleaning '{}'".format(pkg['path'])) @@ -281,6 +284,9 @@ pkg_build = [] if __name__ == '__main__': parser = argparse.ArgumentParser() + exclusive = parser.add_mutually_exclusive_group(required=False) + exclusive.add_argument('-k', '--keep', action='store_true', help='Keep modified Git repositories') + parser.add_argument('-v', '--verbose', action='count', default=0, help='Increase logging verbosity for each occurance') parser.add_argument('-c', '--clean', action='store_true', help='Re-clone required Git repositories') parser.add_argument('-l', '--list-packages', action='store_true', help='List all packages to build') -- cgit v1.2.3 From e91ac330b78025f523a60161e9fde43dafae4b7e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:38:32 +0200 Subject: Packages: clean, fetch and keep options are mutually exclusive ... as it makes no sense to keep and clean a package or any other combination. --- scripts/build-packages | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/build-packages b/scripts/build-packages index aa73228..69cef3c 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -285,13 +285,13 @@ pkg_build = [] if __name__ == '__main__': parser = argparse.ArgumentParser() exclusive = parser.add_mutually_exclusive_group(required=False) + exclusive.add_argument('-c', '--clean', action='store_true', help='Re-clone required Git repositories') exclusive.add_argument('-k', '--keep', action='store_true', help='Keep modified Git repositories') + exclusive.add_argument('-f', '--fetch', action='store_true', help='Fetch sources only, no build') parser.add_argument('-v', '--verbose', action='count', default=0, help='Increase logging verbosity for each occurance') - parser.add_argument('-c', '--clean', action='store_true', help='Re-clone required Git repositories') parser.add_argument('-l', '--list-packages', action='store_true', help='List all packages to build') parser.add_argument('-b', '--build', nargs='+', help='Whitespace separated list of packages to build') - parser.add_argument('-f', '--fetch', action='store_true', help='Fetch sources only, no build') parser.add_argument('-p', '--parallel', action='store_true', help='Build on all CPUs') parser.add_argument('--blacklist', nargs='+', help='Do not build/report packages when calling --list') -- cgit v1.2.3 From 14a398d3deafe020a6893731a5dd7581765b38d6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 16 Jun 2019 13:06:43 +0200 Subject: T1327: add serial console (115200,8n1) to ISO kernel command-line --- scripts/live-build-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/live-build-config b/scripts/live-build-config index 9b7c2d6..1b3b454 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -35,7 +35,8 @@ 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" \ + --bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay console=ttyS0,115200 console=tty0" \ + --bootappend-live-failsafe "live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal console=ttyS0,115200 console=tty0" \ --linux-flavours {{kernel_flavor}} \ --linux-packages linux-image-{{kernel_version}} \ --bootloader syslinux,grub-efi \ -- cgit v1.2.3 From 3305dca496d814dfdc8d1b479e8dc1598f01d681 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 25 Jun 2019 22:27:14 +0700 Subject: Typo fix s/security updated/security updates/ --- scripts/build-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-config b/scripts/build-config index a12ecdc..dd74a50 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -67,7 +67,7 @@ options = { 'architecture': ('Image target architecture (amd64 or i386 or armhf)', lambda: build_defaults['architecture'], lambda x: x in ['amd64', 'i386', 'armhf']), 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), 'debian-mirror': ('Debian repository mirror for ISO build', lambda: build_defaults['debian_mirror'], None), - 'debian-security-mirror': ('Debian security updated mirror', lambda: build_defaults['debian_security_mirror'], None), + 'debian-security-mirror': ('Debian security updates mirror', lambda: build_defaults['debian_security_mirror'], None), 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: build_defaults['debian_mirror'], None), 'vyos-mirror': ('VyOS package mirror', lambda: build_defaults["vyos_mirror"], None), 'build-type': ('Build type, release or development', lambda: 'development', lambda x: x in ['release', 'development']), -- cgit v1.2.3