summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/defaults.toml4
-rw-r--r--data/live-build-config/includes.chroot/usr/share/vyos/default_motd9
-rw-r--r--docker-vyos/Dockerfile13
-rw-r--r--docker/Dockerfile11
-rw-r--r--packages/ethtool/.gitignore1
-rw-r--r--packages/ethtool/Jenkinsfile31
-rw-r--r--packages/frr/Jenkinsfile2
-rw-r--r--packages/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch10
-rwxr-xr-xscripts/build-vyos-image40
-rwxr-xr-xscripts/make-version-file138
10 files changed, 85 insertions, 174 deletions
diff --git a/data/defaults.toml b/data/defaults.toml
index 5229dd98..be7abe98 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.17"
+kernel_version = "6.6.21"
bootloaders = "syslinux,grub-efi"
squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-recovery"
@@ -22,3 +22,5 @@ squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-reco
website_url = "https://vyos.io"
support_url = "https://support.vyos.io"
bugtracker_url = "https://vyos.dev"
+documentation_url = "https://docs.vyos.io/en/latest"
+project_news_url = "https://blog.vyos.io"
diff --git a/data/live-build-config/includes.chroot/usr/share/vyos/default_motd b/data/live-build-config/includes.chroot/usr/share/vyos/default_motd
deleted file mode 100644
index d0c59992..00000000
--- a/data/live-build-config/includes.chroot/usr/share/vyos/default_motd
+++ /dev/null
@@ -1,9 +0,0 @@
-Welcome to VyOS!
-
-Check out project news at https://blog.vyos.io
-and feel free to report bugs at https://vyos.dev
-
-You can change this banner using "set system login banner post-login" command.
-
-VyOS is a free software distribution that includes multiple components,
-you can check individual component licenses under /usr/share/doc/*/copyright
diff --git a/docker-vyos/Dockerfile b/docker-vyos/Dockerfile
index ef7621c6..95fe6ee3 100644
--- a/docker-vyos/Dockerfile
+++ b/docker-vyos/Dockerfile
@@ -84,4 +84,15 @@ LABEL maintainer="support@vyos.io" \
description="VyOS for Docker" \
vendor="Sentrium S.L." \
version=${VYOS_VERSION} \
- io.vyos.build-date=${BUILD_DATE}
+ io.vyos.build-date=${BUILD_DATE} \
+ org.opencontainers.image.authors="support@vyos.io" \
+ org.opencontainers.image.created=${BUILD_DATE} \
+ org.opencontainers.image.version=${VYOS_VERSION} \
+ org.opencontainers.image.url="https://github.com/vyos/vyos-build" \
+ org.opencontainers.image.documentation="https://docs.vyos.io/en/latest/contributing/build-vyos.html" \
+ org.opencontainers.image.source="https://github.com/vyos/vyos-build" \
+ org.opencontainers.image.vendor="Sentrium S.L." \
+ org.opencontainers.image.licenses="GNU" \
+ org.opencontainers.image.title="vyos-build" \
+ org.opencontainers.image.description="VyOS for Docker" \
+ org.opencontainers.image.base.name="docker.io/debian/debian:${DEBIAN_VERSION}-slim"
diff --git a/docker/Dockerfile b/docker/Dockerfile
index acbfd9a7..32cedb70 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -40,7 +40,16 @@ RUN grep "VERSION_ID" /etc/os-release || (echo 'VERSION_ID="12"' >> /etc/os-rele
# On some versions of docker the emulation framework is not installed by default and
# you need to install qemu, qemu-user-static and register qemu inside docker manually using:
# `docker run --rm --privileged multiarch/qemu-user-static:register --reset`
-LABEL authors="VyOS Maintainers <maintainers@vyos.io>"
+LABEL authors="VyOS Maintainers <maintainers@vyos.io>" \
+ org.opencontainers.image.authors="VyOS Maintainers <maintainers@vyos.io>" \
+ org.opencontainers.image.url="https://github.com/vyos/vyos-build" \
+ org.opencontainers.image.documentation="https://docs.vyos.io/en/latest/contributing/build-vyos.html" \
+ org.opencontainers.image.source="https://github.com/vyos/vyos-build" \
+ org.opencontainers.image.vendor="Sentrium S.L." \
+ org.opencontainers.image.licenses="GNU" \
+ org.opencontainers.image.title="vyos-build" \
+ org.opencontainers.image.description="Container to build VyOS ISO" \
+ org.opencontainers.image.base.name="docker.io/debian/debian:bookworm"
ENV DEBIAN_FRONTEND noninteractive
RUN /bin/echo -e 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01norecommends
diff --git a/packages/ethtool/.gitignore b/packages/ethtool/.gitignore
new file mode 100644
index 00000000..5967d5de
--- /dev/null
+++ b/packages/ethtool/.gitignore
@@ -0,0 +1 @@
+ethtool/
diff --git a/packages/ethtool/Jenkinsfile b/packages/ethtool/Jenkinsfile
new file mode 100644
index 00000000..bddd3b63
--- /dev/null
+++ b/packages/ethtool/Jenkinsfile
@@ -0,0 +1,31 @@
+// 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': 'ethtool',
+ 'scmCommit': 'debian/1%6.6-1',
+ 'scmUrl': 'https://salsa.debian.org/kernel-team/ethtool',
+ 'buildCmd': 'sudo mk-build-deps --install --tool "apt-get --yes --no-install-recommends"; dpkg-buildpackage -uc -us -tc -b'],
+]
+
+// Start package build using library function from https://github.com/vyos/vyos-build
+buildPackage('ethtool', pkgList, null, true, "**/packages/ethtool/**")
diff --git a/packages/frr/Jenkinsfile b/packages/frr/Jenkinsfile
index 9c647495..2c309443 100644
--- a/packages/frr/Jenkinsfile
+++ b/packages/frr/Jenkinsfile
@@ -22,7 +22,7 @@
def pkgList = [
['name': 'libyang',
- 'scmCommit': 'v2.1.128',
+ 'scmCommit': 'v2.1.148',
'scmUrl': 'https://github.com/CESNET/libyang.git',
'buildCmd': 'pipx run apkg build -i && find pkg/pkgs -type f -name *.deb -exec mv -t .. {} +'],
['name': 'rtrlib',
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 9c79e4f5..e678a63e 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
@@ -88,10 +88,10 @@ index cf592d7b630f..e8915701aa73 100644
};
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
-index ca0ff15dc8fa..67a55fec5b29 100644
+index bc74f131fe4d..9cdd5b50f9b2 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
-@@ -2582,6 +2582,7 @@ static struct devinet_sysctl_table {
+@@ -2595,6 +2595,7 @@ static struct devinet_sysctl_table {
"route_localnet"),
DEVINET_SYSCTL_FLUSHING_ENTRY(DROP_UNICAST_IN_L2_MULTICAST,
"drop_unicast_in_l2_multicast"),
@@ -100,10 +100,10 @@ index ca0ff15dc8fa..67a55fec5b29 100644
};
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index b007d098ffe2..865d7be4fd29 100644
+index 6f57cbddeee6..6ea474d2c170 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
-@@ -5639,6 +5639,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
+@@ -5655,6 +5655,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
array[DEVCONF_NDISC_EVICT_NOCARRIER] = cnf->ndisc_evict_nocarrier;
array[DEVCONF_ACCEPT_UNTRACKED_NA] = cnf->accept_untracked_na;
array[DEVCONF_ACCEPT_RA_MIN_LFT] = cnf->accept_ra_min_lft;
@@ -111,7 +111,7 @@ index b007d098ffe2..865d7be4fd29 100644
}
static inline size_t inet6_ifla6_size(void)
-@@ -7067,6 +7068,13 @@ static const struct ctl_table addrconf_sysctl[] = {
+@@ -7083,6 +7084,13 @@ static const struct ctl_table addrconf_sysctl[] = {
.extra1 = (void *)SYSCTL_ZERO,
.extra2 = (void *)SYSCTL_ONE,
},
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image
index 6b47fca7..8b91de57 100755
--- a/scripts/build-vyos-image
+++ b/scripts/build-vyos-image
@@ -31,13 +31,12 @@ import functools
import json
-
try:
import toml
import jinja2
import git
except ModuleNotFoundError as e:
- print("Cannot load a required library: {}".format(e))
+ print(f"Cannot load a required library: {e}")
print("Please make sure the following Python3 modules are installed: toml jinja2 git")
import vyos_build_utils as utils
@@ -290,10 +289,9 @@ if __name__ == "__main__":
# Retrieve git branch name
git_branch = repo.active_branch.name
except Exception as e:
- print("Could not retrieve information from git: {0}".format(str(e)))
+ exit(f'Could not retrieve information from git: {e}')
build_git = ""
git_branch = ""
- git_commit = ""
# Create the build version string
if build_config['build_type'] == 'development':
@@ -329,19 +327,26 @@ if __name__ == "__main__":
'build_branch': git_branch,
'release_train': build_config['release_train'],
'lts_build': lts_build,
- 'build_comment': build_config['build_comment']
+ 'build_comment': build_config['build_comment'],
+ 'bugtracker_url': build_config['bugtracker_url'],
+ 'documentation_url': build_config['documentation_url'],
+ 'project_news_url': build_config['project_news_url'],
}
+ # Multi line strings needs to be un-indented to not have leading
+ # whitespaces in the resulting file
os_release = f"""
- PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
- NAME="VyOS"
- VERSION_ID="{version}"
- VERSION="{version} ({build_config['release_train']})"
- VERSION_CODENAME={build_defaults['debian_distribution']}
- ID=vyos
- HOME_URL="{build_defaults['website_url']}"
- SUPPORT_URL="{build_defaults['support_url']}"
- BUG_REPORT_URL="{build_defaults['bugtracker_url']}"
+PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
+NAME="VyOS"
+VERSION_ID="{version}"
+VERSION="{version} ({build_config['release_train']})"
+VERSION_CODENAME={build_defaults['debian_distribution']}
+ID=vyos
+BUILD_ID="{build_git}"
+HOME_URL="{build_defaults['website_url']}"
+SUPPORT_URL="{build_defaults['support_url']}"
+BUG_REPORT_URL="{build_defaults['bugtracker_url']}"
+DOCUMENTATION_URL="{build_config['documentation_url']}"
"""
# Switch to the build directory, this is crucial for the live-build work
@@ -370,7 +375,7 @@ if __name__ == "__main__":
# Define variables that influence to welcome message on boot
os.makedirs(os.path.join(chroot_includes_dir, 'usr/lib/'), exist_ok=True)
- with open(os.path.join(chroot_includes_dir, 'usr/lib//os-release'), 'w') as f:
+ with open(os.path.join(chroot_includes_dir, 'usr/lib/os-release'), 'w') as f:
print(os_release, file=f)
## Clean up earlier build state and artifacts
@@ -387,12 +392,12 @@ if __name__ == "__main__":
# Add the additional repositories to package lists
print("I: Setting up additional APT entries")
- vyos_repo_entry = "deb {0} {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch'])
+ vyos_repo_entry = "deb {vyos_mirror} {vyos_branch} main\n".format(**build_config)
apt_file = defaults.VYOS_REPO_FILE
if debug:
- print("D: Adding these entries to {0}:".format(apt_file))
+ print(f"D: Adding these entries to {apt_file}:")
print("\t", vyos_repo_entry)
with open(apt_file, 'w') as f:
@@ -515,4 +520,3 @@ Pin-Priority: 600
# Copy the image
shutil.copy("live-image-{0}.hybrid.iso".format(build_config["architecture"]),
"vyos-{0}-{1}.iso".format(version_data["version"], build_config["architecture"]))
-
diff --git a/scripts/make-version-file b/scripts/make-version-file
deleted file mode 100755
index a5d94a65..00000000
--- a/scripts/make-version-file
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/python3
-#
-# Copyright (C) 2018 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/>.
-#
-# File: make-version-file
-# Purpose:
-# Creates version file in live-build chroot includes dir
-# that is included in the image and used by 'show version' command
-# and install/upgrade scripts.
-
-import os
-import datetime
-import json
-import uuid
-
-import git
-
-import defaults
-import util
-
-# Load the build config
-util.check_build_config()
-with open(defaults.BUILD_CONFIG, 'r') as f:
- build_config = json.load(f)
-
-# Create a build timestamp
-now = datetime.datetime.today()
-build_timestamp = now.strftime("%Y%m%d%H%M")
-
-# FIXME: use aware rather than naive object
-build_date = now.strftime("%a %d %b %Y %H:%M UTC")
-
-# Assign a (hopefully) unique identifier to the build (UUID)
-build_uuid = str(uuid.uuid4())
-
-# Initialize Git object from our repository
-try:
- repo = git.Repo('.')
-
- # Retrieve the Git commit ID of the repository, 14 charaters will be sufficient
- build_git = repo.head.object.hexsha[:14]
- # If someone played around with the source tree and the build is "dirty", mark it.
- # Release builds can be "ditry by design" (e.g. modified default config) though,
- # so the dirtiness check is only applied to development builds.
- if build_config["build_type"] == "development":
- if repo.is_dirty():
- build_git += "-dirty"
-
- # Retrieve git branch name
- git_branch = repo.active_branch.name
-except Exception as e:
- print("Could not retrieve information from git: {0}".format(str(e)))
- build_git = ""
- git_branch = ""
- git_commit = ""
-
-# Create a build version
-if build_config['build_type'] == 'development':
- try:
- if not git_branch:
- raise ValueError("git branch could not be determined")
-
- # Load the branch to version mapping file
- with open('data/versions') as f:
- version_mapping = json.load(f)
-
- branch_version = version_mapping[git_branch]
-
- version = "{0}-rolling-{1}".format(branch_version, build_timestamp)
- except Exception as e:
- print("Could not build a version string specific to git branch, falling back to default: {0}".format(str(e)))
- version = "999.{0}".format(build_timestamp)
-else:
- # Release build, use the version from ./configure arguments
- version = build_config['version']
-
-if build_config['build_type'] == 'development':
- lts_build = False
-else:
- lts_build = True
-
-version_data = {
- 'version': version,
- 'built_by': build_config['build_by'],
- 'built_on': build_date,
- 'build_uuid': build_uuid,
- 'build_git': build_git,
- 'build_branch': git_branch,
- 'release_train': build_config['release_train'],
- 'lts_build': lts_build,
- 'build_comment': build_config['build_comment']
-}
-
-os_release = f"""
-PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
-NAME="VyOS"
-VERSION_ID="{version}"
-VERSION="{version} ({build_config['release_train']})"
-VERSION_CODENAME=bookworm
-ID=vyos
-HOME_URL="https://vyos.io"
-SUPPORT_URL="https://support.vyos.io"
-BUG_REPORT_URL="https://vyos.dev"
-"""
-
-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)
-
-# For backwards compatibility with 'add system image' script from older versions
-# we need a file in the old format so that script can find out the version of the image
-# for upgrade
-os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'opt/vyatta/etc/'), exist_ok=True)
-with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'opt/vyatta/etc/version'), 'w') as f:
- print("Version: {0}".format(version), file=f)
-
-# Leaky abstraction: we want ISO file name include version number,
-# but we probably don't want to have a separate build step just for this,
-# neither we want to use lengthy paths in makefiles
-with open(os.path.join(defaults.BUILD_DIR, 'version'), 'w') as f:
- print(version, file=f)
-
-# Define variables that influence to welcome message on boot
-os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/lib/'), exist_ok=True)
-with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/lib//os-release'), 'w') as f:
- print(os_release, file=f)