summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-05-15 20:59:55 +0300
committerGitHub <noreply@github.com>2025-05-15 20:59:55 +0300
commitfcbd8d6cb4a005a10e5e23cd66f9303f85d89ae5 (patch)
tree460e6cf68fe564d81629655015b17fa0082133a0
parent1cf889b0585daafee03149a128937f3bfa20665f (diff)
parentffcf9b46ae15ae82472f6172ece36823e38d8c09 (diff)
downloadvyos-build-fcbd8d6cb4a005a10e5e23cd66f9303f85d89ae5.tar.gz
vyos-build-fcbd8d6cb4a005a10e5e23cd66f9303f85d89ae5.zip
Merge pull request #961 from c-po/kernel-perf-T7253
Kernel: T7253: build linux-perf-$version package
-rw-r--r--.gitignore2
-rw-r--r--data/defaults.toml2
-rw-r--r--docker/Dockerfile56
-rwxr-xr-xscripts/package-build/linux-kernel/build.py9
-rw-r--r--scripts/package-build/linux-kernel/package.toml42
-rw-r--r--scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch11
-rw-r--r--scripts/package-build/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch9
-rw-r--r--scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch62
-rw-r--r--scripts/package-build/openvpn-otp/package.toml8
9 files changed, 135 insertions, 66 deletions
diff --git a/.gitignore b/.gitignore
index 6de027c6..6ef765d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,5 @@ packages/*
/testinstall*.efivars
/*.qcow2
/*.tar
+.DS_Store
+._.DS_Store
diff --git a/data/defaults.toml b/data/defaults.toml
index 662e864f..9386743f 100644
--- a/data/defaults.toml
+++ b/data/defaults.toml
@@ -14,7 +14,7 @@ vyos_mirror = "https://packages.vyos.net/repositories/current"
vyos_branch = "current"
release_train = "current"
-kernel_version = "6.6.89"
+kernel_version = "6.6.90"
kernel_flavor = "vyos"
bootloaders = "syslinux,grub-efi"
diff --git a/docker/Dockerfile b/docker/Dockerfile
index bf160f9d..72c0af55 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -88,7 +88,8 @@ RUN apt-get update && apt-get install -y \
po4a \
openssh-client \
jq \
- socat
+ socat \
+ python-is-python3
# Packages needed for vyos-build
RUN apt-get update && apt-get install -y \
@@ -191,34 +192,7 @@ RUN wget https://salsa.debian.org/klausenbusk-guest/debootstrap/commit/a9a603b17
dpkg-buildpackage -us -uc && \
sudo dpkg -i ../debootstrap*.deb
-# Packages needed for Linux Kernel
-# cmake required by accel-ppp
-RUN apt-get update && apt-get install -y \
- cmake \
- gnupg2 \
- rsync \
- libelf-dev \
- libncurses5-dev \
- flex \
- bison \
- bc \
- kmod \
- cpio \
- python-is-python3 \
- dwarves \
- nasm \
- rdfind
-
-# Packages needed for Intel QAT out-of-tree drivers
# FPM is used when generation Debian pckages for e.g. Intel QAT drivers
-RUN apt-get update && apt-get install -y \
- pciutils \
- yasm \
- ruby \
- libudev-dev \
- ruby-dev \
- rubygems \
- build-essential
RUN gem install --no-document fpm
# Packages needed for vyos-1x
@@ -226,6 +200,7 @@ RUN pip install --break-system-packages \
git+https://github.com/aristanetworks/j2lint.git@341b5d5db86 \
pyhumps==3.8.0; \
apt-get update && apt-get install -y \
+ build-essential \
dh-python \
fakeroot \
iproute2 \
@@ -315,12 +290,6 @@ RUN if dpkg-architecture -iarm64; then \
grub-efi-arm; \
fi
-# Packages needed for openvpn-otp
-RUN apt-get update && apt-get install -y \
- debhelper \
- libssl-dev \
- openvpn
-
# Packages needed for OWAMP/TWAMP (service sla)
RUN git clone -b 4.4.6 https://github.com/perfsonar/i2util.git /tmp/i2util && \
cd /tmp/i2util && \
@@ -333,30 +302,11 @@ RUN apt-get update && apt-get install -y \
udev \
zip
-# Packages needed for Accel-PPP
-# XXX: please note that this must be installed after nftable dependencies - otherwise
-# APT will remove liblua5.3-dev which breaks the Accel-PPP build
-# With bookworm, updated to libssl3 (Note: https://github.com/accel-ppp/accel-ppp/issues/68)
-RUN apt-get update && apt-get install -y \
- liblua5.3-dev \
- libssl3 \
- libssl-dev \
- libpcre3-dev
-
# debmake: a native Debian tool for preparing sources for packaging
RUN apt-get update && apt-get install -y \
debmake \
python3-debian
-# Packages for jool
-RUN apt-get update && apt-get install -y \
- libnl-genl-3-dev \
- libxtables-dev
-
-# Packages needed for nftables
-RUN apt-get update && apt-get install -y \
- asciidoc-base
-
# Allow password-less 'sudo' for all users in group 'sudo'
RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \
echo "vyos_bld\tALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
diff --git a/scripts/package-build/linux-kernel/build.py b/scripts/package-build/linux-kernel/build.py
index af610079..6fa6af35 100755
--- a/scripts/package-build/linux-kernel/build.py
+++ b/scripts/package-build/linux-kernel/build.py
@@ -37,6 +37,7 @@ def ensure_dependencies(dependencies: list) -> None:
return
print("I: Ensure Debian build dependencies are met")
+ run(['sudo', 'apt-get', 'update'], check=True)
run(['sudo', 'apt-get', 'install', '-y'] + dependencies, check=True)
@@ -112,9 +113,6 @@ def build_package(package: dict, dependencies: list) -> None:
# Clone or update the repository
#clone_or_update_repo(repo_dir, package['scm_url'], package['commit_id'])
- # Ensure dependencies
- #ensure_dependencies(dependencies)
-
# Prepare the package if required
#if package.get('prepare_package', False):
# prepare_package(repo_dir, package.get('install_data', ''))
@@ -275,6 +273,11 @@ if __name__ == '__main__':
with open(defaults_path, 'r') as file:
defaults = toml.load(file)
+ # Load global dependencies
+ global_dependencies = config.get('dependencies', {}).get('packages', [])
+ if global_dependencies:
+ ensure_dependencies(global_dependencies)
+
packages = config['packages']
# Filter packages if specific packages are specified in the arguments
diff --git a/scripts/package-build/linux-kernel/package.toml b/scripts/package-build/linux-kernel/package.toml
index 0bbd6785..b98bcd2f 100644
--- a/scripts/package-build/linux-kernel/package.toml
+++ b/scripts/package-build/linux-kernel/package.toml
@@ -81,3 +81,45 @@ name = "ipt-netflow"
commit_id = "0eb2092e93"
scm_url = "https://github.com/aabc/ipt-netflow"
build_cmd = "build_ipt_netflow"
+
+[dependencies]
+packages = [
+ "cmake",
+ "gnupg2",
+ "rsync",
+ "libelf-dev",
+ "libncurses5-dev",
+ "flex",
+ "bison",
+ "bc",
+ "kmod",
+ "cpio",
+ "dwarves",
+ "nasm",
+ "rdfind",
+ "pciutils",
+ "yasm",
+ "libudev-dev",
+ "ruby",
+ "ruby-dev",
+ "rubygems",
+ "build-essential",
+ "libdw-dev",
+ "libunwind-dev",
+ "systemtap-sdt-dev",
+ "libslang2-dev",
+ "python-dev-is-python3",
+ "libzstd-dev",
+ "libcap-dev",
+ "libnuma-dev",
+ "libbabeltrace-ctf-dev",
+ "libpfm4-dev",
+ "libtraceevent-dev",
+ "liblua5.3-dev",
+ "libssl3",
+ "libssl-dev",
+ "libpcre3-dev",
+ "libnl-genl-3-dev",
+ "libxtables-dev",
+ "asciidoc-base"
+]
diff --git a/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch b/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch
index 7bd0b04b..107fdc67 100644
--- a/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch
+++ b/scripts/package-build/linux-kernel/patches/kernel/0001-linkstate-ip-device-attribute.patch
@@ -6,6 +6,7 @@ Subject: [PATCH] VyOS: Add linkstate IP device attribute
Backport of earlier Vyatta patch.
(cherry picked from commit 7c5a851086686be14ae937c80d6cee34814dbefc)
+
---
Documentation/networking/ip-sysctl.rst | 11 +++++++++++
include/linux/inetdevice.h | 1 +
@@ -100,7 +101,7 @@ index c33b1ecc591e..7576d51cd16d 100644
};
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index 8360939acf85..b13832a08d28 100644
+index bb9add46e382..20346b1dd103 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -5674,6 +5674,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
@@ -111,7 +112,7 @@ index 8360939acf85..b13832a08d28 100644
}
static inline size_t inet6_ifla6_size(void)
-@@ -7103,6 +7104,13 @@ static const struct ctl_table addrconf_sysctl[] = {
+@@ -7116,6 +7117,13 @@ static const struct ctl_table addrconf_sysctl[] = {
.extra1 = (void *)SYSCTL_ZERO,
.extra2 = (void *)SYSCTL_ONE,
},
@@ -126,10 +127,10 @@ index 8360939acf85..b13832a08d28 100644
.procname = "ioam6_id",
.data = &ipv6_devconf.ioam6_id,
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
-index 5715d54f3d0b..e88971b512ba 100644
+index 53197087353a..4fed0253cf83 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
-@@ -682,6 +682,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh)
+@@ -716,6 +716,14 @@ static inline void rt6_probe(struct fib6_nh *fib6_nh)
}
#endif
@@ -144,7 +145,7 @@ index 5715d54f3d0b..e88971b512ba 100644
/*
* Default Router Selection (RFC 2461 6.3.6)
*/
-@@ -723,6 +731,8 @@ static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif,
+@@ -757,6 +765,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/scripts/package-build/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch b/scripts/package-build/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch
index b19a8d25..115f6831 100644
--- a/scripts/package-build/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch
+++ b/scripts/package-build/linux-kernel/patches/kernel/0002-inotify-support-for-stackable-filesystems.patch
@@ -19,6 +19,7 @@ for bug #303, and will allow that commit to be reverted.
Bug #425 http://bugzilla.vyos.net/show_bug.cgi?id=425
(cherry picked from commit a93f1128bc83b5a6628da242e71c18ef05e81ea2)
+
---
fs/notify/inotify/Kconfig | 9 +++
fs/notify/inotify/inotify_user.c | 114 ++++++++++++++++++++++++++++++-
@@ -190,7 +191,7 @@ index 1c4bfdab008d..cf567cc33679 100644
struct inotify_inode_mark *i_mark)
{
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-index 2c056d737c27..2cb1f0024e70 100644
+index 93ee57bc82ad..5f4f886d011e 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -15,6 +15,7 @@
@@ -201,7 +202,7 @@ index 2c056d737c27..2cb1f0024e70 100644
#include <linux/file.h>
#include <linux/fs_context.h>
#include <linux/fs_parser.h>
-@@ -1528,6 +1529,18 @@ static void ovl_inode_init_once(void *foo)
+@@ -1533,6 +1534,18 @@ static void ovl_inode_init_once(void *foo)
inode_init_once(&oi->vfs_inode);
}
@@ -220,7 +221,7 @@ index 2c056d737c27..2cb1f0024e70 100644
static int __init ovl_init(void)
{
int err;
-@@ -1543,18 +1556,24 @@ static int __init ovl_init(void)
+@@ -1548,18 +1561,24 @@ static int __init ovl_init(void)
err = ovl_aio_request_cache_init();
if (!err) {
err = register_filesystem(&ovl_fs_type);
@@ -294,5 +295,5 @@ index 8d20caa1b268..c126e2f93a73 100644
+
#endif /* _LINUX_INOTIFY_H */
--
-2.39.2
+2.39.5
diff --git a/scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch b/scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch
new file mode 100644
index 00000000..082ad589
--- /dev/null
+++ b/scripts/package-build/linux-kernel/patches/kernel/build-linux-perf-package.patch
@@ -0,0 +1,62 @@
+diff --git c/scripts/package/builddeb i/scripts/package/builddeb
+index d7dd0d04c70c..6f4a9a7c2c62 100755
+--- c/scripts/package/builddeb
++++ i/scripts/package/builddeb
+@@ -182,6 +182,16 @@ install_libc_headers () {
+ mv $pdir/usr/include/asm $pdir/usr/include/$host_arch/
+ }
+
++install_perf () {
++ pdir=$1
++
++ rm -rf $pdir
++
++ $MAKE -C tools/ perf_install prefix=$pdir/usr
++ mv tools/perf/$pdir/usr $srctree/$pdir
++
++}
++
+ rm -f debian/files
+
+ packages_enabled=$(dh_listpackages)
+@@ -199,6 +209,8 @@ do
+ install_libc_headers debian/linux-libc-dev;;
+ linux-headers-*)
+ install_kernel_headers debian/linux-headers ${package#linux-headers-};;
++ linux-perf-*)
++ install_perf debian/linux-perf ${package};;
+ esac
+ done
+
+@@ -213,6 +225,8 @@ do
+ create_package ${package} debian/linux-libc-dev;;
+ linux-headers-*)
+ create_package ${package} debian/linux-headers;;
++ linux-perf-*)
++ create_package ${package} debian/linux-perf;;
+ esac
+ done
+
+diff --git c/scripts/package/mkdebian i/scripts/package/mkdebian
+index 5044224cf671..21f98ae50be0 100755
+--- c/scripts/package/mkdebian
++++ i/scripts/package/mkdebian
+@@ -238,6 +238,18 @@ Description: Linux support headers for userspace development
+ Multi-Arch: same
+ EOF
+
++cat <<EOF >> debian/control
++
++Package: linux-perf-$version
++Section: devel
++Architecture: $debarch
++Depends: \${shlibs:Depends}
++Description: Performance analysis tools for Linux $version
++ This package contains the 'perf' performance analysis tools for Linux
++ kernel version $version .
++Multi-Arch: same
++EOF
++
+ if is_enabled CONFIG_MODULES; then
+ cat <<EOF >> debian/control
+
diff --git a/scripts/package-build/openvpn-otp/package.toml b/scripts/package-build/openvpn-otp/package.toml
index bdbc6d9d..51430864 100644
--- a/scripts/package-build/openvpn-otp/package.toml
+++ b/scripts/package-build/openvpn-otp/package.toml
@@ -17,3 +17,11 @@ fpm --input-type dir --output-type deb --name openvpn-otp \
--depends openvpn --architecture $(dpkg --print-architecture) \
--version $(git describe --tags --always | cut -c2-) --deb-compression gz usr
"""
+
+
+[dependencies]
+packages = [
+ "debhelper",
+ "libssl-dev",
+ "openvpn"
+]