-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build of cryptoki v0.6.1 failing on Fedora 39+ #198
Comments
Thanks for reporting the issue @nullr0ute |
@nullr0ute I cannot reproduce: $ cargo --version
cargo 1.77.0-nightly (ac6bbb332 2023-12-26)
cat /etc/os-release
NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora
VERSION_ID=39
git describe --always --dirty --tags
cryptoki-0.6.1 Is it just my cargo version perhaps? |
The full build logs for building in the build system are here: https://koji.fedoraproject.org/koji/taskinfo?taskID=112631130 |
@nullr0ute I just grabbed rawhide and built with the packaged cargo command it builds. However, it looks like you have a patch applied, is their a way to see that patch? |
I pushed my local changes to rawhide repo, no patches, should be able to repo from there with a "fedpkg scratch-build" |
The cause of the failure is due to an update in the Cargo.lock file. I see in the build steps, The issue has been fixed by this commit on main. @nullr0ute, just checking, are you specifically removing the |
I cherry picked that patch back to 0.6.1, Their is still some build issues, apply this @nullr0ute and you should be good: diff --git a/cryptoki/src/mechanism/mod.rs b/cryptoki/src/mechanism/mod.rs
index e968434..e7de375 100644
--- a/cryptoki/src/mechanism/mod.rs
+++ b/cryptoki/src/mechanism/mod.rs
@@ -18,7 +18,7 @@ use std::ops::Deref;
use std::ptr::null_mut;
pub use mechanism_info::MechanismInfo;
-use crate::mechanism::rsa::{PkcsOaepParams, PkcsOaepSource};
+use crate::mechanism::rsa::PkcsOaepParams;
#[derive(Copy, Debug, Clone, PartialEq, Eq)]
// transparent so that a vector of MechanismType should have the same layout than a vector of
@@ -997,6 +997,7 @@ impl TryFrom<psa_crypto::types::algorithm::Algorithm> for Mechanism<'_> {
use psa_crypto::types::algorithm::{
Algorithm, AsymmetricEncryption, AsymmetricSignature, Hash, SignHash,
};
+ use crate::mechanism::rsa::PkcsOaepSource;
match alg {
Algorithm::Hash(Hash::Sha1) => Ok(Mechanism::Sha1), |
The Cargo.lock file isn't shipped in the crates from crates.io so I don't believe it's anything to do with the rpm process. |
Sorry, late to the party. IIUC, which is always suspect, Cargo.lock is only used in direct "development" builds of the crate for reproducible builds, ie it's intended to represent a state of a known successful build. Cargo.toml is used for resolution of supported dependencies for the package manager per the semver conventions. If the Cargo.toml says versions 1.0 up to 2.0 work for dependency X and the user has the crate X version 1.2 and the Cargo.lock is locked at 1.2.2, the dependency on X will be resolved with 1.2. However, if the package contains binaries, they include the Cargo.lock file AFAIK, because of:
|
There was a change in Guidance on Lockfiles: "For years, the Cargo team has encouraged Rust developers to commit their Cargo.lock file for packages with binaries but not libraries. We now recommend people do what is best for their project." |
Thanks for confirming what I said :-p. That document is speaking for the dev tree, the language is around committing it into version control not wether cargo itself packages it into the crate. These are separate things. The crate may have the Cargo.lock included under the specific condition that the package contains binaries and then Generally speaking Cargo.lock is for developers, Cargo.toml is for downstream consumers with the exception of crates containing binaries. |
@nullr0ute will a new release from main (v0.7.0) suffice or do you need a (v0.6.2) with just the fix patch? |
Will the 0.7 release be compatible with the 0.6 series, or will things that depend on it need changes and releases too, if the later a 0.6.2 would be great as it will allow just building all the current parsec pieces against without major bumps :) |
I vote for a 0.6.2, just because we already know the pain required to package it downstream. |
There will be a breaking API change with 0.7.0 |
Just to understand things. Since Parsec is a binary crate and has a lock file, it will continue to use |
So Fedora builds parsec itself, when we build we deal with the dependencies itself and it will use anything in the 0.6.x from what we specify so when we build it if we have a build for 0.6.2 it will consume that in the Fedora build system. Upstream would need a bump separately but with a API change a 0.6.2 would allow them to have the fix if necessary without bumping to 0.7 with an API change |
Thanks for the explanation :) |
What's the status of the release? Do we have an ETA. |
I've created a PR for the required changes here |
@nullr0ute |
Awesome, thanks! Testing now. |
Builds, looks good thanks! |
I'm seeing the following error when building cryptoki v0.6.1 on Fedora, nothing in the commits since 0.6.1 appear to address this but I'm not sure.
The text was updated successfully, but these errors were encountered: