Open3

rustでRHEL系linux向けのRPM bundleを作る

yunayuna

何も考えず cargo add rpm-rsしたところ、エラーが発生。
このモジュールは作者がメンテできておらず、dependency hell(依存エラー地獄)になっている。

error: failed to select a version for `zstd-sys`.
    ... required by package `zstd-safe v4.1.1+zstd.1.5.0`
    ... which satisfies dependency `zstd-safe = "=4.1.1"` of package `zstd v0.9.0+zstd.1.5.0`
    ... which satisfies dependency `zstd = "^0.9.0"` of package `rpm-rs v0.8.1`
    ... which satisfies dependency `rpm-rs = "^0.8.1"` of package `simple-rust-bundler v0.0.1 (/home/masatoyuna/Project/it-asset-agent/simple-rust-bundler)`
    ... which satisfies path dependency `simple-rust-bundler` (locked to 0.0.1) of package `it_agent v0.1.3 (/home/masatoyuna/Project/it-asset-agent)`
versions that meet the requirements `=1.6.1` are: 1.6.1+zstd.1.5.0

the package `zstd-sys` links to the native library `zstd`, but it conflicts with a previous package which links to `zstd` as well:
package `zstd-sys v2.0.1+zstd.1.5.2`
    ... which satisfies dependency `zstd-sys = "=2.0.1"` of package `zstd-safe v5.0.1+zstd.1.5.2`
    ... which satisfies dependency `zstd-safe = "^5.0.1"` of package `zstd v0.11.2+zstd.1.5.2`
    ... which satisfies dependency `zstd = "^0.11.2"` of package `zip v0.6.4`
    ... which satisfies dependency `zip = "^0.6.4"` of package `it_agent v0.1.3 (/home/masatoyuna/Project/it-asset-agent)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='zstd-sys' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `zstd-sys` which could resolve this conflict

状況

https://github.com/Richterrettich/rpm-rs/issues/54
Rust製のrpm-rsモジュールのメンテナンスが滞っている。
いくつかのフォークが作成され、開発者が新しい組織で協力して開発を続けることを検討している。
開発者は新しい組織でプロジェクトを引き継ぐか、現在の所有者から公式RPM組織に移動する許可を得るかを検討している。
開発者は現在の所有者から返答を待っている。

結論

開発者が新しい組織で協力してrpm-rsモジュールの開発を続けることが最も可能性が高い。
現在の所有者からの返答によっては、プロジェクトが公式RPM組織に移動する可能性もある。

このプロジェクトを引き継いだ本流はこちらっぽいので、これを使う。
https://github.com/rpm-rs/rpm

cargo add rpm