summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/defaults.toml2
-rw-r--r--docker/Dockerfile3
-rw-r--r--packages/radvd/.gitignore2
-rw-r--r--packages/radvd/Jenkinsfile30
-rwxr-xr-xpackages/radvd/build.sh29
-rwxr-xr-xscripts/build-vyos-image29
-rwxr-xr-xscripts/check-qemu-install6
7 files changed, 86 insertions, 15 deletions
diff --git a/data/defaults.toml b/data/defaults.toml
index be7abe98..9a655c4f 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.21"
+kernel_version = "6.6.22"
bootloaders = "syslinux,grub-efi"
squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-recovery"
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 32cedb70..d3fbdbbb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -101,6 +101,7 @@ RUN apt-get update && apt-get install -y \
python3-pip \
python3-flake8 \
python3-autopep8 \
+ python3-tomli \
yq \
debootstrap \
live-build
@@ -150,7 +151,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \
# Build VyConf which is required to build libvyosconfig
RUN eval $(opam env --root=/opt/opam --set-root) && \
- opam pin add vyos1x-config https://github.com/vyos/vyos1x-config.git#f11f0148 -y
+ opam pin add vyos1x-config https://github.com/vyos/vyos1x-config.git#84720462 -y
# Packages needed for libvyosconfig
RUN apt-get update && apt-get install -y \
diff --git a/packages/radvd/.gitignore b/packages/radvd/.gitignore
new file mode 100644
index 00000000..142acc2d
--- /dev/null
+++ b/packages/radvd/.gitignore
@@ -0,0 +1,2 @@
+radvd/
+*.deb
diff --git a/packages/radvd/Jenkinsfile b/packages/radvd/Jenkinsfile
new file mode 100644
index 00000000..6b4f4a0b
--- /dev/null
+++ b/packages/radvd/Jenkinsfile
@@ -0,0 +1,30 @@
+// 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 pkgList = [
+ ['name': 'radvd',
+ 'scmCommit': 'f2de4764559',
+ 'scmUrl': 'https://github.com/radvd-project/radvd',
+ 'buildCmd': 'cd ..; ./build.sh'],
+]
+
+// Start package build using library function from https://github.com/vyos/vyos-build
+buildPackage('radvd', pkgList, null, true, "**/packages/radvd/**")
diff --git a/packages/radvd/build.sh b/packages/radvd/build.sh
new file mode 100755
index 00000000..36057e27
--- /dev/null
+++ b/packages/radvd/build.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+SRC=radvd
+if [ ! -d $SRC ]; then
+ echo "source directory $SRC does not exist!"
+ echo "$ git clone https://github.com/radvd-project/radvd"
+ exit 1
+fi
+cd $SRC
+
+INSTALL_DIR=debian
+if [ -d $INSTALL_DIR ]; then
+ rm -rf $INSTALL_DIR
+fi
+
+./autogen.sh
+./configure
+make
+
+install --directory debian/lib/systemd/system debian/usr/sbin
+install --mode 0644 radvd.service debian/lib/systemd/system
+install --strip --mode 0755 radvd debian/usr/sbin
+
+# Version' field value 'v0.14-20-g613277f': version number does not start with digit
+# "cut" first character from version string
+fpm --input-type dir --output-type deb --name radvd \
+ --version $(git describe --always | cut -c2- | tr _ -) --deb-compression gz \
+ --maintainer "VyOS Package Maintainers <maintainers@vyos.net>" \
+ --description "RADVD router advertisement daemon" \
+ --license "RADVD" -C $INSTALL_DIR --package ..
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image
index c6d6ca03..fb7eb540 100755
--- a/scripts/build-vyos-image
+++ b/scripts/build-vyos-image
@@ -32,12 +32,12 @@ import functools
import json
try:
- import toml
+ import tomli
import jinja2
import git
except ModuleNotFoundError as e:
print(f"Cannot load a required library: {e}")
- print("Please make sure the following Python3 modules are installed: toml jinja2 git")
+ print("Please make sure the following Python3 modules are installed: tomli jinja2 git")
import vyos_build_utils as utils
import vyos_build_defaults as defaults
@@ -120,8 +120,8 @@ if __name__ == "__main__":
## Load the file with default build configuration options
try:
- with open(defaults.DEFAULTS_FILE, 'r') as f:
- build_defaults = toml.load(f)
+ with open(defaults.DEFAULTS_FILE, 'rb') as f:
+ build_defaults = tomli.load(f)
except Exception as e:
print("Failed to open the defaults file {0}: {1}".format(defaults.DEFAULTS_FILE, e))
sys.exit(1)
@@ -193,8 +193,8 @@ if __name__ == "__main__":
pre_build_config = merge_dicts({}, build_defaults)
flavor_config = {}
- with open(make_toml_path(defaults.BUILD_FLAVORS_DIR, args["build_flavor"]), 'r') as f:
- flavor_config = toml.load(f)
+ with open(make_toml_path(defaults.BUILD_FLAVORS_DIR, args["build_flavor"]), 'rb') as f:
+ flavor_config = tomli.load(f)
pre_build_config = merge_dicts(flavor_config, pre_build_config)
## Combine configs args > flavor > defaults
@@ -226,12 +226,12 @@ if __name__ == "__main__":
build_config = merge_dicts({}, build_defaults)
## Load correct mix-ins
- with open(make_toml_path(defaults.BUILD_TYPES_DIR, pre_build_config["build_type"]), 'r') as f:
- build_type_config = toml.load(f)
+ with open(make_toml_path(defaults.BUILD_TYPES_DIR, pre_build_config["build_type"]), 'rb') as f:
+ build_type_config = tomli.load(f)
build_config = merge_dicts(build_type_config, build_config)
- with open(make_toml_path(defaults.BUILD_ARCHES_DIR, pre_build_config["architecture"]), 'r') as f:
- build_arch_config = toml.load(f)
+ with open(make_toml_path(defaults.BUILD_ARCHES_DIR, pre_build_config["architecture"]), 'rb') as f:
+ build_arch_config = tomli.load(f)
build_config = merge_dicts(build_arch_config, build_config)
## Override with flavor and then CLI arguments
@@ -445,6 +445,15 @@ DOCUMENTATION_URL="{build_config['documentation_url']}"
with open(file_path, 'w') as f:
f.write(i["data"])
+ ## Create the default config
+ ## Technically it's just another includes.chroot entry,
+ ## but it's special enough to warrant making it easier for flavor writers
+ if has_nonempty_key(build_config, "default_config"):
+ file_path = os.path.join(chroot_includes_dir, "opt/vyatta/etc/config.boot.default")
+ os.makedirs(os.path.dirname(file_path), exist_ok=True)
+ with open(file_path, 'w') as f:
+ f.write(build_config["default_config"])
+
## Configure live-build
lb_config_tmpl = jinja2.Template("""
lb config noauto \
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index b77e5023..41c566e6 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -42,7 +42,7 @@ import random
import traceback
import logging
import re
-import toml
+import tomli
from io import BytesIO
from io import StringIO
@@ -82,8 +82,8 @@ parser.add_argument('--qemu-cmd', help='Only generate QEMU launch command',
args = parser.parse_args()
-with open('data/defaults.toml') as f:
- vyos_defaults = toml.load(f)
+with open('data/defaults.toml', 'rb') as f:
+ vyos_defaults = tomli.load(f)
class StreamToLogger(object):
"""