* [pbs-devel] [PATCH proxmox 0/2] Fix build dependencies for s3-client
@ 2025-08-06 9:21 Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 1/2] s3-client: conditionally compile by `api-types` feature Christian Ebner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christian Ebner @ 2025-08-06 9:21 UTC (permalink / raw)
To: pbs-devel
The PBS api types depend on the s3 client, which however pulled in
build dependencies independent from the selected feature set.
Fix this by making the dependencies optional and only pull them in
for the respective feature set. Further, add a dedicated feature
`api-types` and set this as default.
Christian Ebner (2):
s3-client: conditionally compile by `api-types` feature
pbs-api-types: only include api-types for s3 client during build
pbs-api-types/Cargo.toml | 2 +-
pbs-api-types/debian/control | 2 +
proxmox-s3-client/Cargo.toml | 60 +++++++++++++++--------
proxmox-s3-client/debian/control | 84 ++++++++++++++------------------
4 files changed, 79 insertions(+), 69 deletions(-)
--
2.47.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH proxmox 1/2] s3-client: conditionally compile by `api-types` feature
2025-08-06 9:21 [pbs-devel] [PATCH proxmox 0/2] Fix build dependencies for s3-client Christian Ebner
@ 2025-08-06 9:21 ` Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 2/2] pbs-api-types: only include api-types for s3 client during build Christian Ebner
2025-08-06 17:22 ` [pbs-devel] applied: [PATCH proxmox 0/2] Fix build dependencies for s3-client Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Christian Ebner @ 2025-08-06 9:21 UTC (permalink / raw)
To: pbs-devel
Currently, a build of s3 client pulls in all dependencies,
independent of the feature set.
To allow correctly building the pbs api types, as required for
e.g. wasm builds using pbs-api-types, add the `api-types` feature
and make the `impl` feature dependencies optional.
Also, set the `api-types` feature to be the default.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
proxmox-s3-client/Cargo.toml | 60 +++++++++++++++--------
proxmox-s3-client/debian/control | 84 ++++++++++++++------------------
2 files changed, 76 insertions(+), 68 deletions(-)
diff --git a/proxmox-s3-client/Cargo.toml b/proxmox-s3-client/Cargo.toml
index b249010f..20b9b772 100644
--- a/proxmox-s3-client/Cargo.toml
+++ b/proxmox-s3-client/Cargo.toml
@@ -13,35 +13,55 @@ rust-version.workspace = true
[dependencies]
anyhow.workspace = true
-bytes.workspace = true
-futures.workspace = true
+bytes = { workspace = true, optional = true }
+futures = { workspace = true, optional = true }
const_format.workspace = true
-hex = { workspace = true, features = [ "serde" ] }
-http-body-util.workspace = true
-hyper-util = { workspace = true, features = [ "client-legacy", "tokio", "http1" ] }
-hyper.workspace = true
-iso8601.workspace = true
-md5.workspace = true
-openssl.workspace = true
-quick-xml = { workspace = true, features = [ "async-tokio" ] }
+hex = { workspace = true, features = [ "serde" ], optional = true }
+http-body-util = { workspace = true, optional = true }
+hyper-util = { workspace = true, features = [ "client-legacy", "tokio", "http1" ], optional = true }
+hyper = { workspace = true, optional = true }
+iso8601 = { workspace = true, optional = true }
+md5 = { workspace = true, optional = true }
+openssl = { workspace = true, optional = true }
+quick-xml = { workspace = true, features = [ "async-tokio" ], optional = true }
regex.workspace = true
serde.workspace = true
serde_plain.workspace = true
-serde-xml-rs.workspace = true
-tokio.workspace = true
-tokio-util = { workspace = true, features = [ "compat" ] }
-tracing.workspace = true
-url.workspace = true
+serde-xml-rs = { workspace = true, optional = true }
+tokio = { workspace = true, optional = true }
+tokio-util = { workspace = true, features = [ "compat" ], optional = true }
+tracing = { workspace = true, optional = true }
+url = {workspace = true, optional = true }
-proxmox-base64.workspace = true
-proxmox-http = { workspace = true, features = [ "body", "client", "client-trait", "rate-limiter" ] }
+proxmox-base64 = { workspace = true, optional = true }
+proxmox-http = { workspace = true, features = [ "body", "client", "client-trait", "rate-limiter" ], optional = true }
proxmox-schema = { workspace = true, features = [ "api-macro", "api-types" ] }
proxmox-serde.workspace = true
-proxmox-time.workspace = true
+proxmox-time = {workspace = true, optional = true }
[features]
-default = []
-impl = []
+default = [ "api-types" ]
+api-types = []
+impl = [
+ "dep:bytes",
+ "dep:futures",
+ "dep:hex",
+ "dep:http-body-util",
+ "dep:hyper-util",
+ "dep:hyper",
+ "dep:iso8601",
+ "dep:md5",
+ "dep:openssl",
+ "dep:quick-xml",
+ "dep:serde-xml-rs",
+ "dep:tokio",
+ "dep:tokio-util",
+ "dep:tracing",
+ "dep:url",
+ "dep:proxmox-base64",
+ "dep:proxmox-http",
+ "dep:proxmox-time",
+]
[[example]]
name = "s3_client"
diff --git a/proxmox-s3-client/debian/control b/proxmox-s3-client/debian/control
index ba684c17..e6fd64ae 100644
--- a/proxmox-s3-client/debian/control
+++ b/proxmox-s3-client/debian/control
@@ -7,43 +7,15 @@ Build-Depends-Arch: cargo:native <!nocheck>,
rustc:native (>= 1.82) <!nocheck>,
libstd-rust-dev <!nocheck>,
librust-anyhow-1+default-dev <!nocheck>,
- librust-bytes-1+default-dev <!nocheck>,
librust-const-format-0.2+default-dev <!nocheck>,
- librust-futures-0.3+default-dev <!nocheck>,
- librust-hex-0.4+default-dev <!nocheck>,
- librust-hex-0.4+serde-dev <!nocheck>,
- librust-http-body-util-0.1+default-dev <!nocheck>,
- librust-hyper-1+default-dev <!nocheck>,
- librust-hyper-util-0.1+client-legacy-dev (>= 0.1.12-~~) <!nocheck>,
- librust-hyper-util-0.1+default-dev (>= 0.1.12-~~) <!nocheck>,
- librust-hyper-util-0.1+http1-dev (>= 0.1.12-~~) <!nocheck>,
- librust-hyper-util-0.1+tokio-dev (>= 0.1.12-~~) <!nocheck>,
- librust-iso8601-0.6+default-dev (>= 0.6.1-~~) <!nocheck>,
- librust-md5-0.7+default-dev <!nocheck>,
- librust-openssl-0.10+default-dev <!nocheck>,
- librust-proxmox-base64-1+default-dev <!nocheck>,
- librust-proxmox-http-1+body-dev (>= 1.0.2-~~) <!nocheck>,
- librust-proxmox-http-1+client-dev (>= 1.0.2-~~) <!nocheck>,
- librust-proxmox-http-1+client-trait-dev (>= 1.0.2-~~) <!nocheck>,
- librust-proxmox-http-1+default-dev (>= 1.0.2-~~) <!nocheck>,
- librust-proxmox-http-1+rate-limiter-dev (>= 1.0.2-~~) <!nocheck>,
librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~) <!nocheck>,
librust-proxmox-schema-4+api-types-dev (>= 4.1.0-~~) <!nocheck>,
librust-proxmox-schema-4+default-dev (>= 4.1.0-~~) <!nocheck>,
librust-proxmox-serde-1+default-dev <!nocheck>,
librust-proxmox-serde-1+serde-json-dev <!nocheck>,
- librust-proxmox-time-2+default-dev (>= 2.1.0-~~) <!nocheck>,
- librust-quick-xml-0.36+async-tokio-dev (>= 0.36.1-~~) <!nocheck>,
- librust-quick-xml-0.36+default-dev (>= 0.36.1-~~) <!nocheck>,
librust-regex-1+default-dev (>= 1.5-~~) <!nocheck>,
librust-serde-1+default-dev <!nocheck>,
- librust-serde-plain-1+default-dev <!nocheck>,
- librust-serde-xml-rs-0.5+default-dev <!nocheck>,
- librust-tokio-1+default-dev (>= 1.6-~~) <!nocheck>,
- librust-tokio-util-0.7+compat-dev <!nocheck>,
- librust-tokio-util-0.7+default-dev <!nocheck>,
- librust-tracing-0.1+default-dev <!nocheck>,
- librust-url-2+default-dev (>= 2.2-~~) <!nocheck>
+ librust-serde-plain-1+default-dev <!nocheck>
Maintainer: Proxmox Support Team <support@proxmox.com>
Standards-Version: 4.7.0
Vcs-Git: git://git.proxmox.com/git/proxmox.git
@@ -58,8 +30,39 @@ Multi-Arch: same
Depends:
${misc:Depends},
librust-anyhow-1+default-dev,
- librust-bytes-1+default-dev,
librust-const-format-0.2+default-dev,
+ librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~),
+ librust-proxmox-schema-4+api-types-dev (>= 4.1.0-~~),
+ librust-proxmox-schema-4+default-dev (>= 4.1.0-~~),
+ librust-proxmox-serde-1+default-dev,
+ librust-proxmox-serde-1+serde-json-dev,
+ librust-regex-1+default-dev (>= 1.5-~~),
+ librust-serde-1+default-dev,
+ librust-serde-plain-1+default-dev
+Suggests:
+ librust-proxmox-s3-client+impl-dev (= ${binary:Version})
+Provides:
+ librust-proxmox-s3-client+api-types-dev (= ${binary:Version}),
+ librust-proxmox-s3-client+default-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1+api-types-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1+default-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1.0-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1.0+api-types-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1.0+default-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1.0.7-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1.0.7+api-types-dev (= ${binary:Version}),
+ librust-proxmox-s3-client-1.0.7+default-dev (= ${binary:Version})
+Description: Low level REST API client for AWS S3 compatible object stores - Rust source code
+ Source code for Debianized Rust crate "proxmox-s3-client"
+
+Package: librust-proxmox-s3-client+impl-dev
+Architecture: any
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ librust-proxmox-s3-client-dev (= ${binary:Version}),
+ librust-bytes-1+default-dev,
librust-futures-0.3+default-dev,
librust-hex-0.4+default-dev,
librust-hex-0.4+serde-dev,
@@ -78,17 +81,9 @@ Depends:
librust-proxmox-http-1+client-trait-dev (>= 1.0.2-~~),
librust-proxmox-http-1+default-dev (>= 1.0.2-~~),
librust-proxmox-http-1+rate-limiter-dev (>= 1.0.2-~~),
- librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~),
- librust-proxmox-schema-4+api-types-dev (>= 4.1.0-~~),
- librust-proxmox-schema-4+default-dev (>= 4.1.0-~~),
- librust-proxmox-serde-1+default-dev,
- librust-proxmox-serde-1+serde-json-dev,
librust-proxmox-time-2+default-dev (>= 2.1.0-~~),
librust-quick-xml-0.36+async-tokio-dev (>= 0.36.1-~~),
librust-quick-xml-0.36+default-dev (>= 0.36.1-~~),
- librust-regex-1+default-dev (>= 1.5-~~),
- librust-serde-1+default-dev,
- librust-serde-plain-1+default-dev,
librust-serde-xml-rs-0.5+default-dev,
librust-tokio-1+default-dev (>= 1.6-~~),
librust-tokio-util-0.7+compat-dev,
@@ -96,16 +91,9 @@ Depends:
librust-tracing-0.1+default-dev,
librust-url-2+default-dev (>= 2.2-~~)
Provides:
- librust-proxmox-s3-client+default-dev (= ${binary:Version}),
- librust-proxmox-s3-client+impl-dev (= ${binary:Version}),
- librust-proxmox-s3-client-1-dev (= ${binary:Version}),
- librust-proxmox-s3-client-1+default-dev (= ${binary:Version}),
librust-proxmox-s3-client-1+impl-dev (= ${binary:Version}),
- librust-proxmox-s3-client-1.0-dev (= ${binary:Version}),
- librust-proxmox-s3-client-1.0+default-dev (= ${binary:Version}),
librust-proxmox-s3-client-1.0+impl-dev (= ${binary:Version}),
- librust-proxmox-s3-client-1.0.7-dev (= ${binary:Version}),
- librust-proxmox-s3-client-1.0.7+default-dev (= ${binary:Version}),
librust-proxmox-s3-client-1.0.7+impl-dev (= ${binary:Version})
-Description: Low level REST API client for AWS S3 compatible object stores - Rust source code
- Source code for Debianized Rust crate "proxmox-s3-client"
+Description: Low level REST API client for AWS S3 compatible object stores - feature "impl"
+ This metapackage enables feature "impl" for the Rust proxmox-s3-client crate,
+ by pulling in any additional dependencies needed by that feature.
--
2.47.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] [PATCH proxmox 2/2] pbs-api-types: only include api-types for s3 client during build
2025-08-06 9:21 [pbs-devel] [PATCH proxmox 0/2] Fix build dependencies for s3-client Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 1/2] s3-client: conditionally compile by `api-types` feature Christian Ebner
@ 2025-08-06 9:21 ` Christian Ebner
2025-08-06 17:22 ` [pbs-devel] applied: [PATCH proxmox 0/2] Fix build dependencies for s3-client Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Christian Ebner @ 2025-08-06 9:21 UTC (permalink / raw)
To: pbs-devel
Avoids pulling in all the `impl` dependencies for s3-client, which
previously have been included unconditionally.
These are not required and will lead to build fails for WASM target.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
pbs-api-types/Cargo.toml | 2 +-
pbs-api-types/debian/control | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/pbs-api-types/Cargo.toml b/pbs-api-types/Cargo.toml
index e9473742..3d8643bb 100644
--- a/pbs-api-types/Cargo.toml
+++ b/pbs-api-types/Cargo.toml
@@ -20,7 +20,7 @@ proxmox-auth-api = { workspace = true, features = [ "api-types" ] }
proxmox-apt-api-types.workspace = true
proxmox-human-byte.workspace = true
proxmox-lang.workspace=true
-proxmox-s3-client.workspace = true
+proxmox-s3-client = { workspace = true, features = [ "api-types" ] }
proxmox-schema = { workspace = true, features = [ "api-macro" ] }
proxmox-serde.workspace = true
proxmox-time.workspace = true
diff --git a/pbs-api-types/debian/control b/pbs-api-types/debian/control
index da6f7427..eb6fb228 100644
--- a/pbs-api-types/debian/control
+++ b/pbs-api-types/debian/control
@@ -15,6 +15,7 @@ Build-Depends-Arch: cargo:native <!nocheck>,
librust-proxmox-auth-api-1+default-dev <!nocheck>,
librust-proxmox-human-byte-1+default-dev <!nocheck>,
librust-proxmox-lang-1+default-dev (>= 1.5-~~) <!nocheck>,
+ librust-proxmox-s3-client-1+api-types-dev <!nocheck>,
librust-proxmox-s3-client-1+default-dev <!nocheck>,
librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~) <!nocheck>,
librust-proxmox-schema-4+default-dev (>= 4.1.0-~~) <!nocheck>,
@@ -47,6 +48,7 @@ Depends:
librust-proxmox-auth-api-1+default-dev,
librust-proxmox-human-byte-1+default-dev,
librust-proxmox-lang-1+default-dev (>= 1.5-~~),
+ librust-proxmox-s3-client-1+api-types-dev,
librust-proxmox-s3-client-1+default-dev,
librust-proxmox-schema-4+api-macro-dev (>= 4.1.0-~~),
librust-proxmox-schema-4+default-dev (>= 4.1.0-~~),
--
2.47.2
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] applied: [PATCH proxmox 0/2] Fix build dependencies for s3-client
2025-08-06 9:21 [pbs-devel] [PATCH proxmox 0/2] Fix build dependencies for s3-client Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 1/2] s3-client: conditionally compile by `api-types` feature Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 2/2] pbs-api-types: only include api-types for s3 client during build Christian Ebner
@ 2025-08-06 17:22 ` Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-08-06 17:22 UTC (permalink / raw)
To: pbs-devel, Christian Ebner
On Wed, 06 Aug 2025 11:21:20 +0200, Christian Ebner wrote:
> The PBS api types depend on the s3 client, which however pulled in
> build dependencies independent from the selected feature set.
>
> Fix this by making the dependencies optional and only pull them in
> for the respective feature set. Further, add a dedicated feature
> `api-types` and set this as default.
>
> [...]
Applied, thanks!
[1/2] s3-client: conditionally compile by `api-types` feature
commit: 56e15504fcd1e0a1987d3828e40563086ebd8e4e
[2/2] pbs-api-types: only include api-types for s3 client during build
commit: 0d904cbd4bfcb65c8fc62280c0f01107a7b0cd57
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-06 17:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06 9:21 [pbs-devel] [PATCH proxmox 0/2] Fix build dependencies for s3-client Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 1/2] s3-client: conditionally compile by `api-types` feature Christian Ebner
2025-08-06 9:21 ` [pbs-devel] [PATCH proxmox 2/2] pbs-api-types: only include api-types for s3 client during build Christian Ebner
2025-08-06 17:22 ` [pbs-devel] applied: [PATCH proxmox 0/2] Fix build dependencies for s3-client Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox