From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 8CC361FF164 for <inbox@lore.proxmox.com>; Fri, 28 Mar 2025 18:13:55 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8CE26804F; Fri, 28 Mar 2025 18:13:48 +0100 (CET) From: Gabriel Goller <g.goller@proxmox.com> To: pve-devel@lists.proxmox.com Date: Fri, 28 Mar 2025 18:12:50 +0100 Message-Id: <20250328171340.885413-3-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250328171340.885413-1-g.goller@proxmox.com> References: <20250328171340.885413-1-g.goller@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.176 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_SHORT 0.001 Use of a URL Shortener for very short URL POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH proxmox-ve-rs 01/17] add proxmox-network-types crate X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> This is a common crate that is gonna be reused between proxmox-ve-config, proxmox-frr and proxmox-perl-rs. It holds different networking primitives, such as Ipv4/Ipv6-Cidr, NET and e.g. HelloInterval (openfabric attribute) types. The decision for creating this crate is two-fold: - we didn't want to import Ipv4Cidr (& Co) from proxmox-ve-config/firewall - having proxmox-frr rely on proxmox-ve-config would be weird and wouldn't make proxmox-frr a 'real' standalone FRR-types crate. By moving the Ipv4Cidr (& Co) types here, we also need to update the proxmox-firewall crate. Signed-off-by: Gabriel Goller <g.goller@proxmox.com> --- .gitignore | 1 + Cargo.toml | 6 ++++ proxmox-network-types/Cargo.toml | 15 ++++++++ proxmox-network-types/debian/changelog | 5 +++ proxmox-network-types/debian/control | 41 ++++++++++++++++++++++ proxmox-network-types/debian/copyright | 18 ++++++++++ proxmox-network-types/debian/debcargo.toml | 7 ++++ proxmox-network-types/src/lib.rs | 0 8 files changed, 93 insertions(+) create mode 100644 proxmox-network-types/Cargo.toml create mode 100644 proxmox-network-types/debian/changelog create mode 100644 proxmox-network-types/debian/control create mode 100644 proxmox-network-types/debian/copyright create mode 100644 proxmox-network-types/debian/debcargo.toml create mode 100644 proxmox-network-types/src/lib.rs diff --git a/.gitignore b/.gitignore index d72b68bc67ef..7a1742e28c7c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ Cargo.lock /*.changes /build /*-deb +rust-analyzer.toml diff --git a/Cargo.toml b/Cargo.toml index dc7f312fb8a9..82f7fe257615 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "proxmox-ve-config", + "proxmox-network-types", ] exclude = [ "build", @@ -15,3 +16,8 @@ homepage = "https://proxmox.com" exclude = [ "debian" ] rust-version = "1.82" +[workspace.dependencies] +proxmox-section-config = "2.1.1" +serde = "1" +serde_with = "3.8.1" +thiserror = "2" diff --git a/proxmox-network-types/Cargo.toml b/proxmox-network-types/Cargo.toml new file mode 100644 index 000000000000..93f4df87a59f --- /dev/null +++ b/proxmox-network-types/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "proxmox-network-types" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +homepage.workspace = true +exclude.workspace = true +rust-version.workspace = true + +[dependencies] +thiserror = { workspace = true } +anyhow = "1" +serde = { workspace = true, features = [ "derive" ] } +serde_with = { workspace = true } diff --git a/proxmox-network-types/debian/changelog b/proxmox-network-types/debian/changelog new file mode 100644 index 000000000000..5390793cfa07 --- /dev/null +++ b/proxmox-network-types/debian/changelog @@ -0,0 +1,5 @@ +rust-proxmox-network-types (0.1.0) unstable; urgency=medium + + * Initial release. + + -- Proxmox Support Team <support@proxmox.com> Mon, 03 Jun 2024 10:51:11 +0200 diff --git a/proxmox-network-types/debian/control b/proxmox-network-types/debian/control new file mode 100644 index 000000000000..f0727ec1d7cf --- /dev/null +++ b/proxmox-network-types/debian/control @@ -0,0 +1,41 @@ +Source: rust-proxmox-network-types +Section: rust +Priority: optional +Build-Depends: debhelper-compat (= 13), + dh-sequence-cargo +Build-Depends-Arch: cargo:native <!nocheck>, + rustc:native (>= 1.82) <!nocheck>, + libstd-rust-dev <!nocheck>, + librust-anyhow-1+default-dev <!nocheck>, + librust-serde-1+default-dev <!nocheck>, + librust-serde-1+derive-dev <!nocheck>, + librust-serde-with-3+default-dev (>= 3.8.1-~~) <!nocheck>, + librust-thiserror-2+default-dev <!nocheck> +Maintainer: Proxmox Support Team <support@proxmox.com> +Standards-Version: 4.7.0 +Vcs-Git: git://git.proxmox.com/git/proxmox-ve-rs.git +Vcs-Browser: https://git.proxmox.com/?p=proxmox-ve-rs.git +Homepage: https://proxmox.com +X-Cargo-Crate: proxmox-network-types +Rules-Requires-Root: no + +Package: librust-proxmox-network-types-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-anyhow-1+default-dev, + librust-serde-1+default-dev, + librust-serde-1+derive-dev, + librust-serde-with-3+default-dev (>= 3.8.1-~~), + librust-thiserror-2+default-dev +Provides: + librust-proxmox-network-types+default-dev (= ${binary:Version}), + librust-proxmox-network-types-0-dev (= ${binary:Version}), + librust-proxmox-network-types-0+default-dev (= ${binary:Version}), + librust-proxmox-network-types-0.1-dev (= ${binary:Version}), + librust-proxmox-network-types-0.1+default-dev (= ${binary:Version}), + librust-proxmox-network-types-0.1.0-dev (= ${binary:Version}), + librust-proxmox-network-types-0.1.0+default-dev (= ${binary:Version}) +Description: Rust crate "proxmox-network-types" - Rust source code + Source code for Debianized Rust crate "proxmox-network-types" diff --git a/proxmox-network-types/debian/copyright b/proxmox-network-types/debian/copyright new file mode 100644 index 000000000000..1ea8a56b4f58 --- /dev/null +++ b/proxmox-network-types/debian/copyright @@ -0,0 +1,18 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: + * +Copyright: 2019 - 2025 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-network-types/debian/debcargo.toml b/proxmox-network-types/debian/debcargo.toml new file mode 100644 index 000000000000..87a787e6d03e --- /dev/null +++ b/proxmox-network-types/debian/debcargo.toml @@ -0,0 +1,7 @@ +overlay = "." +crate_src_path = ".." +maintainer = "Proxmox Support Team <support@proxmox.com>" + +[source] +vcs_git = "git://git.proxmox.com/git/proxmox-ve-rs.git" +vcs_browser = "https://git.proxmox.com/?p=proxmox-ve-rs.git" diff --git a/proxmox-network-types/src/lib.rs b/proxmox-network-types/src/lib.rs new file mode 100644 index 000000000000..e69de29bb2d1 -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel