From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4A78470A87 for ; Fri, 14 May 2021 15:45:13 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 481BC17B8E for ; Fri, 14 May 2021 15:45:13 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id D485317AB6 for ; Fri, 14 May 2021 15:45:07 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id A40304656A for ; Fri, 14 May 2021 15:45:02 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Date: Fri, 14 May 2021 15:44:38 +0200 Message-Id: <20210514134457.1447930-3-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210514134457.1447930-1-f.gruenbichler@proxmox.com> References: <20210514134457.1447930-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.012 Adjusted score from AWL reputation of From: address 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [gnu.org, lib.rs, proxmox.com] Subject: [pbs-devel] [PATCH proxmox 02/13] meta: add empty proxmox-http sub-crate X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 13:45:13 -0000 Signed-off-by: Fabian Grünbichler --- Makefile | 2 +- Cargo.toml | 1 + proxmox-http/Cargo.toml | 20 +++ proxmox-http/debian/changelog | 5 + proxmox-http/debian/control | 230 ++++++++++++++++++++++++++++++ proxmox-http/debian/copyright | 16 +++ proxmox-http/debian/debcargo.toml | 7 + proxmox-http/src/lib.rs | 0 8 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 proxmox-http/Cargo.toml create mode 100644 proxmox-http/debian/changelog create mode 100644 proxmox-http/debian/control create mode 100644 proxmox-http/debian/copyright create mode 100644 proxmox-http/debian/debcargo.toml create mode 100644 proxmox-http/src/lib.rs diff --git a/Makefile b/Makefile index ebaf113..4f74539 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Shortcut for common operations: -CRATES=proxmox proxmox-api-macro proxmox-sortable-macro +CRATES=proxmox proxmox-api-macro proxmox-http proxmox-sortable-macro # By default we just run checks: .PHONY: all diff --git a/Cargo.toml b/Cargo.toml index d6dc7b4..12e832d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "proxmox", "proxmox-api-macro", + "proxmox-http", "proxmox-sortable-macro", ] exclude = [ diff --git a/proxmox-http/Cargo.toml b/proxmox-http/Cargo.toml new file mode 100644 index 0000000..9c2d3c5 --- /dev/null +++ b/proxmox-http/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "proxmox-http" +edition = "2018" +version = "0.1.0" +authors = [ + "Dietmar Maurer ", + "Wolfgang Bumiller ", +] +license = "AGPL-3" +description = "Proxmox HTTP library" + +exclude = [ "debian" ] + +[dependencies] + +[features] +default = [] + +client = [] +websocket = [] diff --git a/proxmox-http/debian/changelog b/proxmox-http/debian/changelog new file mode 100644 index 0000000..2ef333f --- /dev/null +++ b/proxmox-http/debian/changelog @@ -0,0 +1,5 @@ +rust-proxmox-http (0.1.0-1) unstable; urgency=medium + + * refactor code from proxmox-backup and proxmox into own HTTP crate + + -- Proxmox Support Team Tue, 11 May 2021 10:50:29 +0200 diff --git a/proxmox-http/debian/control b/proxmox-http/debian/control new file mode 100644 index 0000000..f010d6e --- /dev/null +++ b/proxmox-http/debian/control @@ -0,0 +1,230 @@ +Source: rust-proxmox-http +Section: rust +Priority: optional +Build-Depends: debhelper (>= 11), + dh-cargo (>= 18), + cargo:native , + rustc:native , + libstd-rust-dev , + librust-anyhow-1+default-dev +Maintainer: Proxmox Support Team +Standards-Version: 4.4.1 +Vcs-Git: git://git.proxmox.com/git/proxmox.git +Vcs-Browser: https://git.proxmox.com/?p=proxmox.git + +Package: librust-proxmox-http-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-anyhow-1+default-dev +Suggests: + librust-proxmox-http+base64-dev (= ${binary:Version}), + librust-proxmox-http+client-dev (= ${binary:Version}), + librust-proxmox-http+futures-dev (= ${binary:Version}), + librust-proxmox-http+http-dev (= ${binary:Version}), + librust-proxmox-http+http-helpers-dev (= ${binary:Version}), + librust-proxmox-http+hyper-dev (= ${binary:Version}), + librust-proxmox-http+openssl-dev (= ${binary:Version}), + librust-proxmox-http+proxmox-dev (= ${binary:Version}), + librust-proxmox-http+tokio-dev (= ${binary:Version}), + librust-proxmox-http+tokio-openssl-dev (= ${binary:Version}), + librust-proxmox-http+websocket-dev (= ${binary:Version}) +Provides: + librust-proxmox-http+default-dev (= ${binary:Version}), + librust-proxmox-http-0-dev (= ${binary:Version}), + librust-proxmox-http-0+default-dev (= ${binary:Version}), + librust-proxmox-http-0.1-dev (= ${binary:Version}), + librust-proxmox-http-0.1+default-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+default-dev (= ${binary:Version}) +Description: Proxmox HTTP library - Rust source code + This package contains the source for the Rust proxmox-http crate, packaged by + debcargo for use with cargo and dh-cargo. + +Package: librust-proxmox-http+base64-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-base64-0.12+default-dev +Provides: + librust-proxmox-http-0+base64-dev (= ${binary:Version}), + librust-proxmox-http-0.1+base64-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+base64-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "base64" + This metapackage enables feature "base64" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+client-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-proxmox-http+http-helpers-dev (= ${binary:Version}), + librust-futures-0.3+default-dev, + librust-openssl-0.10+default-dev +Provides: + librust-proxmox-http-0+client-dev (= ${binary:Version}), + librust-proxmox-http-0.1+client-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+client-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "client" + This metapackage enables feature "client" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+futures-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-futures-0.3+default-dev +Provides: + librust-proxmox-http-0+futures-dev (= ${binary:Version}), + librust-proxmox-http-0.1+futures-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+futures-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "futures" + This metapackage enables feature "futures" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+http-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-http-0.2+default-dev +Provides: + librust-proxmox-http-0+http-dev (= ${binary:Version}), + librust-proxmox-http-0.1+http-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+http-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "http" + This metapackage enables feature "http" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+http-helpers-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-base64-0.12+default-dev, + librust-http-0.2+default-dev, + librust-hyper-0.14+default-dev, + librust-hyper-0.14+full-dev, + librust-proxmox-0.11-dev (>= 0.11.3-~~), + librust-tokio-1+io-util-dev, + librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~) +Provides: + librust-proxmox-http+simple-client-dev (= ${binary:Version}), + librust-proxmox-http-0+http-helpers-dev (= ${binary:Version}), + librust-proxmox-http-0+simple-client-dev (= ${binary:Version}), + librust-proxmox-http-0.1+http-helpers-dev (= ${binary:Version}), + librust-proxmox-http-0.1+simple-client-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+http-helpers-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+simple-client-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "http-helpers" and 1 more + This metapackage enables feature "http-helpers" for the Rust proxmox-http + crate, by pulling in any additional dependencies needed by that feature. + . + Additionally, this package also provides the "simple-client" feature. + +Package: librust-proxmox-http+hyper-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-hyper-0.14+default-dev, + librust-hyper-0.14+full-dev +Provides: + librust-proxmox-http-0+hyper-dev (= ${binary:Version}), + librust-proxmox-http-0.1+hyper-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+hyper-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "hyper" + This metapackage enables feature "hyper" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+openssl-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-openssl-0.10+default-dev +Provides: + librust-proxmox-http-0+openssl-dev (= ${binary:Version}), + librust-proxmox-http-0.1+openssl-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+openssl-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "openssl" + This metapackage enables feature "openssl" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+proxmox-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-proxmox-0.11-dev (>= 0.11.3-~~) +Provides: + librust-proxmox-http-0+proxmox-dev (= ${binary:Version}), + librust-proxmox-http-0.1+proxmox-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+proxmox-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "proxmox" + This metapackage enables feature "proxmox" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+tokio-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-tokio-1+default-dev +Provides: + librust-proxmox-http-0+tokio-dev (= ${binary:Version}), + librust-proxmox-http-0.1+tokio-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+tokio-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "tokio" + This metapackage enables feature "tokio" for the Rust proxmox-http crate, by + pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+tokio-openssl-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~) +Provides: + librust-proxmox-http-0+tokio-openssl-dev (= ${binary:Version}), + librust-proxmox-http-0.1+tokio-openssl-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+tokio-openssl-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "tokio-openssl" + This metapackage enables feature "tokio-openssl" for the Rust proxmox-http + crate, by pulling in any additional dependencies needed by that feature. + +Package: librust-proxmox-http+websocket-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + librust-proxmox-http-dev (= ${binary:Version}), + librust-base64-0.12+default-dev, + librust-futures-0.3+default-dev, + librust-hyper-0.14+default-dev, + librust-hyper-0.14+full-dev, + librust-openssl-0.10+default-dev, + librust-proxmox-0.11+tokio-dev (>= 0.11.3-~~), + librust-tokio-1+io-util-dev, + librust-tokio-1+sync-dev +Provides: + librust-proxmox-http-0+websocket-dev (= ${binary:Version}), + librust-proxmox-http-0.1+websocket-dev (= ${binary:Version}), + librust-proxmox-http-0.1.0+websocket-dev (= ${binary:Version}) +Description: Proxmox HTTP library - feature "websocket" + This metapackage enables feature "websocket" for the Rust proxmox-http crate, + by pulling in any additional dependencies needed by that feature. diff --git a/proxmox-http/debian/copyright b/proxmox-http/debian/copyright new file mode 100644 index 0000000..2c91d38 --- /dev/null +++ b/proxmox-http/debian/copyright @@ -0,0 +1,16 @@ +Copyright (C) 2019,2020 Proxmox Server Solutions GmbH + +This software is written by Proxmox Server Solutions GmbH + +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 . diff --git a/proxmox-http/debian/debcargo.toml b/proxmox-http/debian/debcargo.toml new file mode 100644 index 0000000..b7864cd --- /dev/null +++ b/proxmox-http/debian/debcargo.toml @@ -0,0 +1,7 @@ +overlay = "." +crate_src_path = ".." +maintainer = "Proxmox Support Team " + +[source] +vcs_git = "git://git.proxmox.com/git/proxmox.git" +vcs_browser = "https://git.proxmox.com/?p=proxmox.git" diff --git a/proxmox-http/src/lib.rs b/proxmox-http/src/lib.rs new file mode 100644 index 0000000..e69de29 -- 2.20.1