From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox v8 6/6] ebpf: debian: package the crate as a Rust library
Date: Wed, 4 Nov 2026 18:29:18 +0100 [thread overview]
Message-ID: <20261104172918.2643810-7-h.laimer@proxmox.com> (raw)
In-Reply-To: <20261104172918.2643810-1-h.laimer@proxmox.com>
The overlay in debian/ builds it through debcargo, like the other Rust
crates. The BPF programs are compiled by the build script, so building
against the crate pulls in clang-21, the libbpf headers and the
kernel's UAPI headers as well.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
proxmox-ebpf/Cargo.toml | 1 +
proxmox-ebpf/build.rs | 6 ++++
proxmox-ebpf/debian/changelog | 5 ++++
proxmox-ebpf/debian/control | 50 +++++++++++++++++++++++++++++++
proxmox-ebpf/debian/copyright | 18 +++++++++++
proxmox-ebpf/debian/debcargo.toml | 13 ++++++++
6 files changed, 93 insertions(+)
create mode 100644 proxmox-ebpf/debian/changelog
create mode 100644 proxmox-ebpf/debian/control
create mode 100644 proxmox-ebpf/debian/copyright
create mode 100644 proxmox-ebpf/debian/debcargo.toml
diff --git a/proxmox-ebpf/Cargo.toml b/proxmox-ebpf/Cargo.toml
index 4cfd0b3258ed..d4607d83e6ff 100644
--- a/proxmox-ebpf/Cargo.toml
+++ b/proxmox-ebpf/Cargo.toml
@@ -1,5 +1,6 @@
[package]
name = "proxmox-ebpf"
+description = "Proxmox VE eBPF"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
diff --git a/proxmox-ebpf/build.rs b/proxmox-ebpf/build.rs
index e6630ec01d1d..5ac1df60bbcd 100644
--- a/proxmox-ebpf/build.rs
+++ b/proxmox-ebpf/build.rs
@@ -99,6 +99,12 @@ fn main() {
);
println!("cargo:rustc-link-search=native={}", out_dir.display());
println!("cargo:rustc-link-lib=static=bpf_native");
+ // the archive holds code compiled from the crate's C sources, dh-cargo lists that in the
+ // Built-Using of a package linking it
+ println!(
+ "dh-cargo:deb-built-using=bpf_native=1={}",
+ manifest_dir.display()
+ );
}
// native build against the shim headers, so tests call the program as a plain function
diff --git a/proxmox-ebpf/debian/changelog b/proxmox-ebpf/debian/changelog
new file mode 100644
index 000000000000..c816e8ecbfaa
--- /dev/null
+++ b/proxmox-ebpf/debian/changelog
@@ -0,0 +1,5 @@
+rust-proxmox-ebpf (0.1.0-1) trixie; urgency=medium
+
+ * Initial release.
+
+ -- Proxmox Support Team <support@proxmox.com> Wed, 02 Sep 2026 10:00:00 +0200
diff --git a/proxmox-ebpf/debian/control b/proxmox-ebpf/debian/control
new file mode 100644
index 000000000000..d51e260ef386
--- /dev/null
+++ b/proxmox-ebpf/debian/control
@@ -0,0 +1,50 @@
+Source: rust-proxmox-ebpf
+Section: rust
+Priority: optional
+Build-Depends: debhelper-compat (= 13),
+ dh-sequence-cargo
+Build-Depends-Arch: cargo:native <!nocheck>,
+ rustc:native (>= 1.88) <!nocheck>,
+ libstd-rust-dev <!nocheck>,
+ librust-anyhow-1+default-dev <!nocheck>,
+ librust-aya-0.13+default-dev <!nocheck>,
+ librust-log-0.4+default-dev (>= 0.4.17-~~) <!nocheck>,
+ librust-nix-0.29+default-dev <!nocheck>,
+ librust-nix-0.29+fs-dev <!nocheck>,
+ clang-21 <!nocheck>,
+ libbpf-dev <!nocheck>,
+ proxmox-kernel-libc-dev <!nocheck>
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Standards-Version: 4.7.2
+Vcs-Git: git://git.proxmox.com/git/proxmox.git
+Vcs-Browser: https://git.proxmox.com/?p=proxmox.git
+Homepage: https://proxmox.com
+X-Cargo-Crate: proxmox-ebpf
+
+Package: librust-proxmox-ebpf-dev
+Architecture: any
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ librust-anyhow-1+default-dev,
+ librust-aya-0.13+default-dev,
+ librust-log-0.4+default-dev (>= 0.4.17-~~),
+ librust-nix-0.29+default-dev,
+ librust-nix-0.29+fs-dev,
+ clang-21,
+ libbpf-dev,
+ proxmox-kernel-libc-dev
+Provides:
+ librust-proxmox-ebpf+bpf-debug-dev (= ${binary:Version}),
+ librust-proxmox-ebpf+default-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0+bpf-debug-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0+default-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0.1-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0.1+bpf-debug-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0.1+default-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0.1.0-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0.1.0+bpf-debug-dev (= ${binary:Version}),
+ librust-proxmox-ebpf-0.1.0+default-dev (= ${binary:Version})
+Description: Proxmox VE eBPF - Rust source code
+ Source code for Debianized Rust crate "proxmox-ebpf"
diff --git a/proxmox-ebpf/debian/copyright b/proxmox-ebpf/debian/copyright
new file mode 100644
index 000000000000..01138fa0482f
--- /dev/null
+++ b/proxmox-ebpf/debian/copyright
@@ -0,0 +1,18 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
+Files:
+ *
+Copyright: 2026 Proxmox Server Solutions GmbH <support@proxmox.com>
+License: AGPL-3.0-or-later
+ This program is free software: you can redistribute it and/or modify it under
+ the terms of the GNU Affero General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option) any
+ later version.
+ .
+ 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 Affero General Public License for more
+ details.
+ .
+ You should have received a copy of the GNU Affero General Public License along
+ with this program. If not, see <https://www.gnu.org/licenses/>.
diff --git a/proxmox-ebpf/debian/debcargo.toml b/proxmox-ebpf/debian/debcargo.toml
new file mode 100644
index 000000000000..04e8c8f52d4f
--- /dev/null
+++ b/proxmox-ebpf/debian/debcargo.toml
@@ -0,0 +1,13 @@
+overlay = "."
+crate_src_path = ".."
+maintainer = "Proxmox Support Team <support@proxmox.com>"
+
+# the BPF programs and the harness's own are C sources of this crate, not vendored code
+whitelist = ["src/*/bpf/*.c", "tests/bpf/*.c"]
+
+[source]
+vcs_git = "git://git.proxmox.com/git/proxmox.git"
+vcs_browser = "https://git.proxmox.com/?p=proxmox.git"
+
+[packages.lib]
+depends = ["clang-21", "libbpf-dev", "proxmox-kernel-libc-dev"]
--
2.47.3
prev parent reply other threads:[~2026-11-04 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 17:29 [PATCH proxmox v8 0/6] add proxmox-ebpf library Hannes Laimer
2026-11-04 17:29 ` [PATCH proxmox v8 1/6] ebpf: add the crate with its BPF build Hannes Laimer
2026-11-04 17:29 ` [PATCH proxmox v8 2/6] ebpf: tc: add the link plumbing Hannes Laimer
2026-11-04 17:29 ` [PATCH proxmox v8 3/6] ebpf: subsystem: add the shared tc program handling Hannes Laimer
2026-11-05 16:20 ` Wolfgang Bumiller
2026-11-04 17:29 ` [PATCH proxmox v8 4/6] ebpf: subsystem: place subsystem links in a fixed order Hannes Laimer
2026-11-06 13:30 ` Wolfgang Bumiller
2026-11-04 17:29 ` [PATCH proxmox v8 5/6] ebpf: tests: add a native harness for the BPF C programs Hannes Laimer
2026-11-04 17:29 ` Hannes Laimer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261104172918.2643810-7-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox