diff options
-rw-r--r-- | .github/workflows/add-pr-labels.yml | 6 | ||||
-rw-r--r-- | .github/workflows/auto-author-assign.yml | 3 | ||||
-rw-r--r-- | .github/workflows/chceck-pr-message.yml | 8 | ||||
-rw-r--r-- | .github/workflows/check-pr-conflicts.yml | 2 | ||||
-rw-r--r-- | .github/workflows/check-stale.yml | 2 | ||||
-rw-r--r-- | .github/workflows/check-unused-imports.yml | 6 | ||||
-rw-r--r-- | .github/workflows/codeql.yml | 8 | ||||
-rw-r--r-- | .github/workflows/label-backport.yml | 2 | ||||
-rw-r--r-- | .github/workflows/linit-j2.yml | 19 | ||||
-rw-r--r-- | .github/workflows/repo-sync.yml | 4 | ||||
-rw-r--r-- | data/defaults.toml | 2 | ||||
-rw-r--r-- | data/live-build-config/package-lists/vyos-base.list.chroot | 7 | ||||
-rw-r--r-- | docker-vyos/vyos_install_stage_01.sh | 9 | ||||
-rw-r--r-- | docker-vyos/vyos_install_stage_02.sh | 9 | ||||
-rw-r--r-- | docker/Dockerfile | 6 | ||||
-rw-r--r-- | packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch | 6 | ||||
-rw-r--r-- | packages/waagent/Jenkinsfile | 32 | ||||
-rwxr-xr-x | packages/waagent/build.py | 50 | ||||
-rwxr-xr-x | scripts/check-qemu-install | 2 | ||||
-rwxr-xr-x | scripts/list-build-dependencies | 120 |
20 files changed, 133 insertions, 170 deletions
diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml index ffb04f33..760ddefe 100644 --- a/.github/workflows/add-pr-labels.yml +++ b/.github/workflows/add-pr-labels.yml @@ -4,9 +4,7 @@ name: Add pull request labels on: pull_request_target: branches: - - current - - equuleus - - sagitta + - circinus permissions: pull-requests: write @@ -14,5 +12,5 @@ permissions: jobs: add-pr-label: - uses: vyos/.github/.github/workflows/add-pr-labels.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/add-pr-labels.yml@circinus secrets: inherit diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml index c3696ea4..96d99c67 100644 --- a/.github/workflows/auto-author-assign.yml +++ b/.github/workflows/auto-author-assign.yml @@ -3,12 +3,11 @@ on: pull_request_target: types: [opened, reopened, ready_for_review, locked] - permissions: pull-requests: write contents: read jobs: assign-author: - uses: vyos/.github/.github/workflows/assign-author.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/assign-author.yml@circinus secrets: inherit diff --git a/.github/workflows/chceck-pr-message.yml b/.github/workflows/chceck-pr-message.yml index f4d30b28..cee78fe1 100644 --- a/.github/workflows/chceck-pr-message.yml +++ b/.github/workflows/chceck-pr-message.yml @@ -2,11 +2,9 @@ name: Check pull request message format on: - pull_request: + pull_request_target: branches: - - current - - sagitta - - equuleus + - circinus permissions: pull-requests: write @@ -14,5 +12,5 @@ permissions: jobs: check-pr-title: - uses: vyos/.github/.github/workflows/check-pr-message.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/check-pr-message.yml@circinus secrets: inherit diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml index 0c659e6e..41efc460 100644 --- a/.github/workflows/check-pr-conflicts.yml +++ b/.github/workflows/check-pr-conflicts.yml @@ -10,5 +10,5 @@ permissions: jobs: check-pr-conflict-call: - uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@circinus secrets: inherit diff --git a/.github/workflows/check-stale.yml b/.github/workflows/check-stale.yml index 59d25a11..ddcbb43c 100644 --- a/.github/workflows/check-stale.yml +++ b/.github/workflows/check-stale.yml @@ -10,5 +10,5 @@ permissions: jobs: stale: - uses: vyos/.github/.github/workflows/check-stale.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/check-stale.yml@circinus secrets: inherit diff --git a/.github/workflows/check-unused-imports.yml b/.github/workflows/check-unused-imports.yml index 324a63e9..8bf1e5de 100644 --- a/.github/workflows/check-unused-imports.yml +++ b/.github/workflows/check-unused-imports.yml @@ -2,9 +2,7 @@ name: Check for unused imports using Pylint on: pull_request: branches: - - current - - sagitta - - equuleus + - circinus workflow_dispatch: permissions: @@ -12,5 +10,5 @@ permissions: jobs: check-unused-imports: - uses: vyos/.github/.github/workflows/check-unused-imports.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/check-unused-imports.yml@circinus secrets: inherit diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a4fc39e2..66c580a2 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,10 +2,12 @@ name: "Perform CodeQL Analysis" on: push: - branches: [ "current", "sagitta", "equuleus" ] + branches: + - circinus pull_request: # The branches below must be a subset of the branches above - branches: [ "current" ] + branches: + - circinus schedule: - cron: '22 10 * * 0' workflow_dispatch: @@ -17,7 +19,7 @@ permissions: jobs: codeql-analysis-call: - uses: vyos/.github/.github/workflows/codeql-analysis.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/codeql-analysis.yml@circinus secrets: inherit with: languages: "['python']" diff --git a/.github/workflows/label-backport.yml b/.github/workflows/label-backport.yml index 9192b818..3e93045f 100644 --- a/.github/workflows/label-backport.yml +++ b/.github/workflows/label-backport.yml @@ -8,5 +8,5 @@ permissions: jobs: mergifyio-backport: - uses: vyos/.github/.github/workflows/label-backport.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/label-backport.yml@circinus secrets: inherit diff --git a/.github/workflows/linit-j2.yml b/.github/workflows/linit-j2.yml deleted file mode 100644 index 95bfa61f..00000000 --- a/.github/workflows/linit-j2.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: J2 Lint - -on: - pull_request: - branches: - - current - - sagitta - - equuleus - workflow_dispatch: - -permissions: - pull-requests: write - contents: read - -jobs: - j2lint: - uses: vyos/.github/.github/workflows/lint-j2.yml@feature/T6349-reusable-workflows - secrets: inherit diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 36f323cd..fff0c6e5 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -5,12 +5,12 @@ on: types: - closed branches: - - current + - circinus workflow_dispatch: jobs: trigger-sync: - uses: vyos/.github/.github/workflows/trigger-repo-sync.yml@feature/T6349-reusable-workflows + uses: vyos/.github/.github/workflows/trigger-repo-sync.yml@circinus secrets: REMOTE_REPO: ${{ secrets.REMOTE_REPO }} REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }} diff --git a/data/defaults.toml b/data/defaults.toml index 67154cdc..9ab5d01b 100644 --- a/data/defaults.toml +++ b/data/defaults.toml @@ -14,7 +14,7 @@ vyos_mirror = "https://rolling-packages.vyos.net/current" vyos_branch = "current" release_train = "current" -kernel_version = "6.6.32" +kernel_version = "6.6.34" bootloaders = "syslinux,grub-efi" squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-recovery" diff --git a/data/live-build-config/package-lists/vyos-base.list.chroot b/data/live-build-config/package-lists/vyos-base.list.chroot index 0b7b8e9f..c2129318 100644 --- a/data/live-build-config/package-lists/vyos-base.list.chroot +++ b/data/live-build-config/package-lists/vyos-base.list.chroot @@ -1,6 +1,11 @@ debconf gpgv gnupg -vyos-world +vyatta-cfg-system +vyatta-bash +vyatta-op +vyatta-cfg +vyatta-wanloadbalance +vyos-1x vyos-user-utils zstd diff --git a/docker-vyos/vyos_install_stage_01.sh b/docker-vyos/vyos_install_stage_01.sh index ce9e9b53..10f1210e 100644 --- a/docker-vyos/vyos_install_stage_01.sh +++ b/docker-vyos/vyos_install_stage_01.sh @@ -23,7 +23,14 @@ echo "Configuring APT repositories" prepare_apt # Get list of VyOS packages -vyos_packages=(`apt-cache -i depends vyos-world | awk '/Depends:/ { printf("%s ", $2) }'`) +vyos_packages=( + "vyatta-cfg-system" + "vyatta-bash" + "vyatta-op" + "vyatta-cfg" + "vyatta-wanloadbalance" + "vyos-1x" + ) # Do not analyze packages, which we do not need in Docker vyos_packages_filter=( diff --git a/docker-vyos/vyos_install_stage_02.sh b/docker-vyos/vyos_install_stage_02.sh index 81a0975b..0e3384c4 100644 --- a/docker-vyos/vyos_install_stage_02.sh +++ b/docker-vyos/vyos_install_stage_02.sh @@ -23,7 +23,14 @@ echo "Configuring APT repositories" prepare_apt # Get list of VyOS packages -vyos_packages=(`apt-cache -i depends vyos-world | awk '/Depends:/ { printf("%s ", $2) }'`) +vyos_packages=( + "vyatta-cfg-system" + "vyatta-bash" + "vyatta-op" + "vyatta-cfg" + "vyatta-wanloadbalance" + "vyos-1x" + ) # Do not analyze packages, which we do not need in Docker vyos_packages_filter=( diff --git a/docker/Dockerfile b/docker/Dockerfile index be789fc2..9bcc234f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -247,6 +247,12 @@ RUN pip install --break-system-packages \ python3-stdeb \ python3-all \ python3-coverage \ + python3-hurry.filesize \ + python3-netaddr \ + python3-paramiko \ + python3-passlib \ + python3-tabulate \ + python3-zmq \ pylint \ quilt \ whois diff --git a/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch b/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch index af67ef5c..a4026a24 100644 --- a/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch +++ b/packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch @@ -126,10 +126,10 @@ index 9dfbda164e8c..2786c8ea451a 100644 .procname = "ioam6_id", .data = &ipv6_devconf.ioam6_id, diff --git a/net/ipv6/route.c b/net/ipv6/route.c -index 236a45557ba1..96a8dda0d423 100644 +index c48eaa7c2340..309a93100c34 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -676,6 +676,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh) +@@ -677,6 +677,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh) } #endif @@ -144,7 +144,7 @@ index 236a45557ba1..96a8dda0d423 100644 /* * Default Router Selection (RFC 2461 6.3.6) */ -@@ -717,6 +725,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif, +@@ -718,6 +726,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif, if (!m && (strict & RT6_LOOKUP_F_IFACE)) return RT6_NUD_FAIL_HARD; diff --git a/packages/waagent/Jenkinsfile b/packages/waagent/Jenkinsfile new file mode 100644 index 00000000..79415d71 --- /dev/null +++ b/packages/waagent/Jenkinsfile @@ -0,0 +1,32 @@ +// Copyright (C) 2024 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 = 'waagent' +def pkgList = [ + ['name': "${package_name}", + 'scmCommit': 'debian/2.9.1.1-2', + 'scmUrl': 'https://salsa.debian.org/cloud-team/waagent.git', + 'buildCmd': 'sudo mk-build-deps --install --tool "apt-get --yes --no-install-recommends"; sudo apt-get install --yes --no-install-recommends dpkg-source-gitarchive; ../build.py'], +] + +// Start package build using library function from https://github.com/vyos/vyos-build +buildPackage("${package_name}", pkgList, null, false, "**/packages/waagent/**") diff --git a/packages/waagent/build.py b/packages/waagent/build.py new file mode 100755 index 00000000..04f4791b --- /dev/null +++ b/packages/waagent/build.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 + +from pathlib import Path +from shutil import copy as copy_file +from subprocess import run + + +# copy patches +def apply_deb_patches() -> None: + """Apply patches to sources directory + """ + patches_dir = Path('../patches') + current_dir: str = Path.cwd().as_posix() + if patches_dir.exists(): + patches_list = list(patches_dir.iterdir()) + patches_list.sort() + Path(f'{current_dir}/debian/patches').mkdir(parents=True, exist_ok=True) + series_file = Path(f'{current_dir}/debian/patches/series') + series_data = '' + for patch_file in patches_list: + print(f'Applying patch: {patch_file.name}') + copy_file(patch_file, f'{current_dir}/debian/patches/') + if series_file.exists(): + series_data: str = series_file.read_text() + series_data = f'{series_data}\n{patch_file.name}' + series_file.write_text(series_data) + + +def build_package() -> bool: + """Build a package + + Returns: + bool: build status + """ + build_cmd: list[str] = ['dpkg-buildpackage', '-uc', '-us', '-tc', '-b'] + build_status: int = run(build_cmd).returncode + + if build_status: + return False + return True + + +# build a package +if __name__ == '__main__': + apply_deb_patches() + + if not build_package(): + exit(1) + + exit() diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index b8f3806b..ea3aef63 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -150,7 +150,7 @@ def get_qemu_cmd(name, enable_kvm, enable_uefi, disk_img, raid=None, iso_img=Non -smp {cpucount},sockets=1,cores={cpucount},threads=1 \ -cpu host \ {uefi} \ - -m 3G \ + -m 4G \ -vga none \ -nographic \ -machine accel=kvm \ diff --git a/scripts/list-build-dependencies b/scripts/list-build-dependencies deleted file mode 100755 index e13651f3..00000000 --- a/scripts/list-build-dependencies +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2020 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/>. - -# Parse debian/control like content and extract packages required by the -# Build-Depends statement. Return a string with all required packages. -# -# Code below copied from https://stackoverflow.com/a/47707412 - Thank You! -get_build_depends () { - echo $(awk ' - /^Build-Depends:/ || /^ / && deps { - sub(/^[^ ]+: /, "") - deps = 1 - dep_str = dep_str ", " $0 - next - } - { deps=0 } - END { - split(dep_str, dep_array, /, */) - for (d in dep_array) { - dep = dep_array[d] - gsub(/[^a-z0-9_.-].*$/, "", dep) - if (dep && !seen[dep]++) print dep - } - }' $1) -} - -get_runtime_depends () { - echo $(awk ' - /^Depends:/ || /^ / && deps { - sub(/^[^ ]+: /, "") - deps = 1 - dep_str = dep_str ", " $0 - next - } - { deps=0 } - END { - split(dep_str, dep_array, /, */) - for (d in dep_array) { - dep = dep_array[d] - gsub(/[^a-z0-9_.-].*$/, "", dep) - if (dep && !seen[dep]++) print dep - } - }' $1) -} - -# Some packages are required prior to running this script -BOOTSTRAP_PACKAGES="devscripts curl equivs" -for pkg in $BOOTSTRAP_PACKAGES -do - dpkg -s $pkg >/dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "Required package \"$pkg\" not installed" - exit 1 - fi -done - -echo "" -echo "Below you can find a list of packages that are required as build time" -echo "dependency for the individual package" -echo "" -echo "The generated content can be used to populate a file to provision" -echo "e.g. a native build host or a Docker container" -echo "" -echo "" - -GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - -# First we need to get vyos-world so we know all individual packages for VyOS -curl -L https://github.com/vyos/vyos-world/raw/$GIT_BRANCH/debian/control \ - --output /tmp/vyos-world.control --retry 100 --retry-delay 1 --silent - -VYOS_PACKAGES=$(get_runtime_depends /tmp/vyos-world.control) -rm -f /tmp/vyos-world.control -for pkg in $VYOS_PACKAGES -do - # Check if repo exists - res=$(curl -o /dev/null --silent -Iw '%{http_code}' https://github.com/vyos/$pkg) - if [[ $res -ne 200 ]]; then - continue - fi - - CTRLFILE=/tmp/$pkg.control - curl -L https://github.com/vyos/$pkg/raw/$GIT_BRANCH/debian/control \ - --output $CTRLFILE --retry 100 --retry-delay 1 --silent - - declare -a array - declare -i length cnt - - array=($(get_build_depends $CTRLFILE)) - length=${#array[@]} - cnt=0 - - echo "# Packages needed to build '$pkg' from https://github.com/vyos/$pkg" - echo "apt-get install -y \\" - for name in "${array[@]}"; do - cnt=$((cnt + 1)) - if [[ "$cnt" -eq "$length" ]]; then - echo " $name" - else - echo " $name \\" - fi - done - rm -f $CTRLFILE - echo "" -done - |