From 43f4d5c3cd8838ae87660813abc999f85612a33f Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 7 Jul 2021 05:03:38 -0500 Subject: T3664: Eliminate obsolete build flavours --- Makefile | 122 --------------------------------------------------------------- 1 file changed, 122 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 59f5fb34..0b672364 100644 --- a/Makefile +++ b/Makefile @@ -44,13 +44,6 @@ prepare-package-env: @scripts/pbuilder-config @scripts/pbuilder-setup -.PHONY: qemu -.ONESHELL: -qemu: - @set -e - @scripts/check-vm-build-env - @scripts/build-qemu-image - .PHONY: vagrant-libvirt .ONESHELL: vagrant-libvirt: @@ -58,18 +51,6 @@ vagrant-libvirt: @scripts/check-vm-build-env @scripts/build-vagrant-libvirt-box -.PHONY: vmware -.ONESHELL: -vmware: 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/vmware/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/vmware/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ - cd $(build_dir) - @../scripts/build-vmware-image - .PHONY: hyperv .ONESHELL: hyperv: @@ -77,51 +58,6 @@ hyperv: @scripts/check-vm-build-env @scripts/build-hyperv-image -.PHONY: clearfog -.ONESHELL: -clearfog: clean prepare - @set -e - @echo "It's not like I'm building this specially for you or anything!" - cd $(build_dir) - @../scripts/build-clearfog-image - -.PHONY: azure -.ONESHELL: -azure: clean prepare - @set -e - @echo "It's not like I'm building this specially for you or anything!" - cp tools/cloud-init/azure/99-walinuxagent.chroot build/config/hooks/live/ - cp tools/cloud-init/azure/vyos-azure.list.chroot build/config/package-lists/ - cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ - cp -f tools/cloud-init/azure/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ - cd $(build_dir) - @../scripts/build-azure-image - -.PHONY: GCE -.ONESHELL: -GCE: 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/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 build/config/includes.chroot/opt/vyatta/etc/ - cd $(build_dir) - @../scripts/build-GCE-image - -.PHONY: GCE-debug -.ONESHELL: -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/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 - cd $(build_dir) - @../scripts/build-GCE-image - .PHONY: AWS .ONESHELL: AWS: clean prepare @@ -136,63 +72,6 @@ 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 - @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/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: vep4600 .ONESHELL: vep4600: check_build_config clean prepare @@ -269,7 +148,6 @@ clean: rm -f *.mf rm -f *.ovf rm -f *.ova - rm -f *.vmdk .PHONY: purge purge: -- cgit v1.2.3 From 7afee1ae93a9055bb7af168d731ab8666f81ca93 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 7 Jul 2021 05:22:28 -0500 Subject: T3664: remove vagrant build --- Makefile | 14 ---- scripts/Vagrantfile | 12 --- scripts/build-clearfog-image | 158 -------------------------------------- scripts/build-vagrant-libvirt-box | 74 ------------------ scripts/check-vm-build-env | 51 ------------ 5 files changed, 309 deletions(-) delete mode 100644 scripts/Vagrantfile delete mode 100755 scripts/build-clearfog-image delete mode 100755 scripts/build-vagrant-libvirt-box delete mode 100755 scripts/check-vm-build-env (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0b672364..3defd020 100644 --- a/Makefile +++ b/Makefile @@ -44,20 +44,6 @@ prepare-package-env: @scripts/pbuilder-config @scripts/pbuilder-setup -.PHONY: vagrant-libvirt -.ONESHELL: -vagrant-libvirt: - @set -e - @scripts/check-vm-build-env - @scripts/build-vagrant-libvirt-box - -.PHONY: hyperv -.ONESHELL: -hyperv: - @set -e - @scripts/check-vm-build-env - @scripts/build-hyperv-image - .PHONY: AWS .ONESHELL: AWS: clean prepare diff --git a/scripts/Vagrantfile b/scripts/Vagrantfile deleted file mode 100644 index 7c89422d..00000000 --- a/scripts/Vagrantfile +++ /dev/null @@ -1,12 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.synced_folder './', '/vagrant', - type: "rsync", - owner: 'vyos', - group: 'users', - mount_options: ['dmode=775,fmode=775'] - config.ssh.username = "vyos" - config.ssh.password = "vyos" - config.vm.provider :libvirt do |libvirt| - libvirt.driver = "kvm" - end -end diff --git a/scripts/build-clearfog-image b/scripts/build-clearfog-image deleted file mode 100755 index 0ef6d323..00000000 --- a/scripts/build-clearfog-image +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2016 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 . -# -# File: build-clearfog-image -# Purpose: -# Build VyOS image for for Solidrun clearfog. - -lb bootstrap -lb chroot -lb installer -lb binary_chroot -lb chroot_devpts install -lb chroot_proc install -lb chroot_selinuxfs install -lb chroot_sysfs install -lb chroot_hosts install -lb chroot_resolv install -lb chroot_hostname install -lb chroot_sysv-rc install -lb chroot_upstart install -lb chroot_apt install-binary -lb chroot_archives chroot install -lb binary_rootfs -lb binary_manifest -lb binary_package-lists -lb binary_linux-image -lb binary_memtest -lb binary_grub -lb binary_grub2 -lb binary_syslinux -lb binary_disk -lb binary_loadlin -lb binary_win32-loader -lb binary_includes -lb binary_hooks -lb binary_checksums - -# get vyos build version -version=$(cat version) -dateymd=$(date +%Y%m%d) - -# create sd-card image and partition it -qemu-img create -f raw sr-a38x-cf-vyos-"$dateymd"-testing.img 1.8G -parted --script sr-a38x-cf-vyos-"$dateymd"-testing.img mklabel msdos -parted --script sr-a38x-cf-vyos-"$dateymd"-testing.img mkpart primary fat16 8192s 60 -parted --script sr-a38x-cf-vyos-"$dateymd"-testing.img mkpart primary ext2 60 1900 -parted --script sr-a38x-cf-vyos-"$dateymd"-testing.img set 1 boot on - -# mount image and create filesystems -losetup /dev/loop0 sr-a38x-cf-vyos-"$dateymd"-testing.img -partprobe /dev/loop0 -mkfs.vfat -n EFI -F 16 -I /dev/loop0p1 -mkfs.ext2 -L persistence /dev/loop0p2 - -# mount image partitions -mkdir -p /boot/efi -mount /dev/loop0p1 /boot/efi -mkdir -p /mnt -mount /dev/loop0p2 /mnt - -# setup files on image -mkdir -p /mnt/boot/grub -mkdir -p /mnt/boot/"$version"/rw -echo "/ union" > /mnt/persistence.conf -cp binary/live/filesystem.squashfs /mnt/boot/"$version"/"$version.squashfs" -cp binary/live/initrd.img-* /mnt/boot/"$version"/initrd.img -cp binary/live/vmlinuz-* /mnt/boot/"$version"/vmlinuz -cp ../tools/armada-388-clearfog.dtb /boot/efi/armada-388-clearfog.dtb - -# create boot script -cat > /boot/efi/boot.script << EOF -# load DTB -echo "Loading armada-388-clearfog.dtb" -load mmc 0:1 \$fdt_addr_r armada-388-clearfog.dtb -fdt addr \$fdt_addr_r 20000 - -# load efi -echo "Loading EFI image ..." -load mmc 0:1 \$loadaddr EFI/debian/grubarm.efi - -# Sleep a while so the MMC driver can settle down -echo "Sleeping 5 seconds ..." -sleep 5 - -# boot -echo "Booting ..." -bootefi \$loadaddr -EOF - -# compile boot script for u-boot -mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d /boot/efi/boot.script /boot/efi/boot.scr - -# create grub config file to include -cat > load.cfg << EOF -set root=(hd0,msdos2) -set prefix=(hd0,msdos2)/boot/grub -devicetree (hd0,msdos1)/armada-388-clearfog.dtb -insmod normal -normal -EOF - -# create grub menu -cat > /mnt/boot/grub/grub.cfg << EOF -set default=0 -set timeout=5 - -echo -n Press ESC to enter the Grub menu... -if sleep --verbose --interruptible 5 ; then - terminal_input console serial -fi - - -menuentry "VyOS $version (Serial console)" { - linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=ttyS0,115200n8 - initrd /boot/"$version"/initrd.img -} - -menuentry "Lost password change $version (Serial console)" { - linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=ttyS0,115200n8 init=/opt/vyatta/sbin/standalone_root_pw_reset - initrd /boot/"$version"/initrd.img -} -EOF - -# install efi grub to image -grub-install --efi-directory /boot/efi --boot-directory /mnt/boot -d /usr/lib/grub/arm-efi /dev/loop0 - -# create grub efi executable -grub-mkimage -O arm-efi -p /boot/grub -d /usr/lib/grub/arm-efi -c load.cfg \ -ext2 iso9660 linux echo configfile \ -search_label search_fs_file search \ -search_fs_uuid ls normal gzio \ -png fat gettext font minicmd \ -gfxterm gfxmenu video video_fb \ -part_msdos part_gpt > /boot/efi/EFI/debian/grubarm.efi - -# unmount image partitions -umount /mnt -umount /boot/efi - -# write u-boot to image -dd if=../tools/u-boot-spl.kwb of=/dev/loop0 bs=512 seek=1 - -# unmount image -sudo losetup -D - -# compress image -xz -v sr-a38x-cf-vyos-"$dateymd"-testing.img diff --git a/scripts/build-vagrant-libvirt-box b/scripts/build-vagrant-libvirt-box deleted file mode 100755 index 6db77c2a..00000000 --- a/scripts/build-vagrant-libvirt-box +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2016 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 . -# -# File: build-vagrant-libvirt-box -# Purpose: -# Build VyOS Vagrant libvirt box. - -export PACKER_BUILD_DIR=packer_build - -DST_DIR=${PACKER_BUILD_DIR}/vagrant-libvirt -BOX_DIR=${DST_DIR}/box -mkdir -p ${BOX_DIR} - -# Copy qcow2 image -cp -p packer_build/qemu/vyos_qemu_image.img ${BOX_DIR}/box.img - -# Put metadata.json and Vagrantfile -echo '{"format":"qcow2","provider":"libvirt","virtual_size":4}' > ${BOX_DIR}/metadata.json -cat < ${BOX_DIR}/Vagrantfile -Vagrant.configure("2") do |config| - config.vm.synced_folder './', '/vagrant', - type: "rsync", - owner: 'vyos', - group: 'users', - mount_options: ['dmode=775,fmode=775'] - config.ssh.username = "vyos" - config.ssh.password = "vyos" - config.vm.provider :libvirt do |libvirt| - libvirt.driver = "kvm" - end -end -EOF - -# Create box -box=${DST_DIR}/vyos_vagrant_libvirt.box -tar -C ${BOX_DIR} -czvf ${box} metadata.json Vagrantfile box.img -if [ "$?" = "0" ]; then - echo "Vagrant libvirt box successfully created to ./${box}" -fi - -PROVIDER=libvirt - -# Create version -major=$(cat build/version | cut -d'+' -f2 | cut -d'-' -f1 | rev | cut -c 5- | rev) -sub=$(cat build/version | cut -d'+' -f2 | cut -d'-' -f1 | rev | cut -c 3-4 | rev) -minor=$(cat build/version | cut -d'+' -f2 | cut -d'-' -f1 | rev | cut -c 1-2 | rev) -version=$(echo "$major.$sub.$minor") -curl -XPOST -d "version[version]=${version}" \ - https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/versions?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN} -echo - -# Create provider -urlencoded_version=$(cat build/version | sed 's/+/%2B/') -curl -XPOST -d "provider[name]=${PROVIDER}" -d "provider[url]=${VAGRANT_BOX_BASE_URL}/vyos-${urlencoded_version}-vagrant-${PROVIDER}.box" \ - https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/version/${version}/providers?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN} -echo - -# Release version -curl -XPUT \ - https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/version/${version}/release?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN} -echo diff --git a/scripts/check-vm-build-env b/scripts/check-vm-build-env deleted file mode 100755 index 8efab848..00000000 --- a/scripts/check-vm-build-env +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (C) 2016 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 . -# -# File: check-vm-build-env -# Purpose: -# Checks if packages required for VM image build are installed. - - -import os -import sys - -import util - -deps = { - 'packages': [ - 'jq', - 'qemu-system-x86', - 'qemu-utils' - ], - 'binaries': ['packer'] -} - -print("Checking if packages required for VyOS image build are installed") - -checker = util.DependencyChecker(deps) - -missing = checker.get_missing_dependencies() -if not missing: - print("All dependencies are installed") - sys.exit(0) -else: - checker.print_missing_deps() - if 'packer' in missing['binaries']: - print("Your system does not have Packer.") - print("Please install Packer from https://www.packer.io/downloads.html.") - sys.exit(1) - -sys.exit(0) -- cgit v1.2.3