summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-09-26 19:27:02 +0200
committerChristian Breunig <christian@breunig.cc>2023-09-26 19:27:39 +0200
commit4cc2bbddb703f724c14c5953e684c288fc4918a7 (patch)
treec68f84168069afb474f06edd141fd170a955fd80
parenta8ba4d8be9853193aa8a5cd408e74af98f2b40e0 (diff)
downloadvyos-build-4cc2bbddb703f724c14c5953e684c288fc4918a7.tar.gz
vyos-build-4cc2bbddb703f724c14c5953e684c288fc4918a7.zip
vpp: T1797: rmeove build instructions - moved to addon package
-rw-r--r--packages/vpp/.gitignore1
-rw-r--r--packages/vpp/Jenkinsfile33
-rwxr-xr-xpackages/vpp/build.py104
-rw-r--r--packages/vpp/build_vpp.json14
-rw-r--r--packages/vpp/patches/vpp/0001-Debian-12-compatible-build.patch54
5 files changed, 0 insertions, 206 deletions
diff --git a/packages/vpp/.gitignore b/packages/vpp/.gitignore
deleted file mode 100644
index 436a7f2d..00000000
--- a/packages/vpp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-vpp/
diff --git a/packages/vpp/Jenkinsfile b/packages/vpp/Jenkinsfile
deleted file mode 100644
index 93c6c031..00000000
--- a/packages/vpp/Jenkinsfile
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2023 VyOS maintainers and contributors
-//
-// This program is free software; you can redistribute it and/or modify
-// in order to easy exprort images built to "external" world
-// 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/>.
-
-@NonCPS
-
-// Using a version specifier library, use 'current' branch. The underscore (_)
-// is not a typo! You need this underscore if the line immediately after the
-// @Library annotation is not an import statement!
-@Library('vyos-build@current')_
-
-def package_name = 'vpp'
-
-def pkgList = [
- ['name': 'vpp',
- 'scmCommit': 'stable/2306',
- 'scmUrl': 'https://gerrit.fd.io/r/vpp',
- 'buildCmd': '../build.py --package vpp'],
-]
-
-// Start package build using library function from https://github.com/vyos/vyos-build
-buildPackage("${package_name}", pkgList, null, false, "**/packages/${package_name}/**")
diff --git a/packages/vpp/build.py b/packages/vpp/build.py
deleted file mode 100755
index d1dd54b1..00000000
--- a/packages/vpp/build.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2023 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/>.
-
-from argparse import ArgumentParser
-from pathlib import Path
-from subprocess import run
-from sys import exit
-from json import load as json_load
-
-
-def check_args(args) -> bool:
- """Check command arguments
-
- Args:
- args (Namespace): Namespace with arguments
-
- Returns:
- bool: check result
- """
- sources_dir = Path(f'../{args.package}')
- if not sources_dir.exists():
- print(f'Sourced directory {sources_dir.as_posix()} does not exist')
- return False
- return True
-
-
-# apply patches
-def apply_patches(package_name: str) -> bool:
- """Apply patches to sources directory
-
- Args:
- package_name (str): package name (the same as sources directory)
- """
- patches_dir = Path(f'../patches/{package_name}')
- if patches_dir.exists():
- for patch_file in patches_dir.iterdir():
- patch_cmd: list[str] = [
- 'git', '-c', 'user.email=support@vyos.io', '-c',
- 'user.name=vyos', 'am',
- patch_file.as_posix()
- ]
- print(f'Applying patch: {patch_file.name}')
- if run(patch_cmd).returncode != 0:
- return False
- return True
-
-
-def build_package(package_name: str) -> bool:
- """Build a package using commands from external file
-
- Args:
- package_name (str): package name
-
- Returns:
- bool: build status
- """
- build_config_path: str = f'../build_{package_name}.json'
- with open(build_config_path, 'r') as openfile:
- try:
- build_params = json_load(openfile)
- except Exception as err:
- print(f'Error parsing config file {build_config_path}: {err}')
- return False
-
- for cmd in build_params.get('build_commands', []):
- print(f'Building: {cmd}')
- if run(cmd).returncode != 0:
- return False
-
- return True
-
-
-# build a package
-if __name__ == '__main__':
- # prepare argument parser
- arg_parser = ArgumentParser()
- arg_parser.add_argument('--package',
- required=True,
- help='Package name to build')
- args = arg_parser.parse_args()
-
- if not check_args(args):
- exit(1)
-
- if not apply_patches(args.package):
- exit(1)
-
- if not build_package(args.package):
- exit(1)
-
- exit()
diff --git a/packages/vpp/build_vpp.json b/packages/vpp/build_vpp.json
deleted file mode 100644
index 8e0fde5b..00000000
--- a/packages/vpp/build_vpp.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "build_commands": [
- [
- "sudo",
- "make",
- "UNATTENDED=yes",
- "install-dep"
- ],
- [
- "make",
- "pkg-deb"
- ]
- ]
-} \ No newline at end of file
diff --git a/packages/vpp/patches/vpp/0001-Debian-12-compatible-build.patch b/packages/vpp/patches/vpp/0001-Debian-12-compatible-build.patch
deleted file mode 100644
index 786e4556..00000000
--- a/packages/vpp/patches/vpp/0001-Debian-12-compatible-build.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 3a4e62ad4844e84e93367a19cf1fae0191e677c6 Mon Sep 17 00:00:00 2001
-From: zsdc <taras@vyos.io>
-Date: Mon, 19 Jun 2023 16:39:04 +0300
-Subject: [PATCH] Debian 12 compatible build
-
----
- Makefile | 4 ++++
- build/external/Makefile | 3 +--
- src/plugins/af_xdp/{CMakeLists.txt => CMakeLists.txt.disable} | 0
- 3 files changed, 5 insertions(+), 2 deletions(-)
- rename src/plugins/af_xdp/{CMakeLists.txt => CMakeLists.txt.disable} (100%)
-
-diff --git a/Makefile b/Makefile
-index 88d42dfe4..9c10b62c6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -103,6 +103,10 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-11)
- DEB_DEPENDS += virtualenv
- DEB_DEPENDS += clang clang-format-11
- LIBFFI=libffi7
-+else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-12)
-+ DEB_DEPENDS += virtualenv
-+ DEB_DEPENDS += clang clang-format
-+ LIBFFI=libffi8
- else
- DEB_DEPENDS += clang-11 clang-format-11
- LIBFFI=libffi7
-diff --git a/build/external/Makefile b/build/external/Makefile
-index d648f4fa1..8a4d8e115 100644
---- a/build/external/Makefile
-+++ b/build/external/Makefile
-@@ -40,14 +40,13 @@ include packages/ipsec-mb.mk
- include packages/quicly.mk
- include packages/rdma-core.mk
- include packages/dpdk.mk
--include packages/xdp-tools.mk
-
- .PHONY: clean
- clean:
- @rm -rf $(B) $(I)
-
- .PHONY: install
--install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install
-+install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install
-
- .PHONY: config
- config: $(if $(ARCH_X86_64), ipsec-mb-config) dpdk-config rdma-core-config quicly-build
-diff --git a/src/plugins/af_xdp/CMakeLists.txt b/src/plugins/af_xdp/CMakeLists.txt.disable
-similarity index 100%
-rename from src/plugins/af_xdp/CMakeLists.txt
-rename to src/plugins/af_xdp/CMakeLists.txt.disable
---
-2.34.1
-