https://bugzilla.redhat.com/show_bug.cgi?id=2327650
--- Comment #8 from wojnilowicz lukasz.wojnilowicz@gmail.com --- (In reply to Fabio Valentini from comment #6)
I would prefer if you did not use sed to patch Cargo.toml.
It makes it really hard to debug ("did this sed actually do anything?") and makes it hard for other people to contribute to the package. Though I think there is a mode for sed that makes it fail if the expression doesn't match any line in the file? Using this would make this at least a bit better.
This is not a package for a "crate" so you don't necessarily need to re-generate the spec file with rust2rpm for every version, and most Cargo.toml patches won't affect the generated spec file. So if you make sed calls that don't make any changes fail, I think that would be "ok" (though I would still prefer using a patchset, similar to what we do in ruff, uv, or maturin).
I went with the patches approach, except the sed line that changes the version string. Alas "sed -ri s/source/target/;t;q1" didn't work for me in my SPEC file, so no robustness on this approach. I hope, you'll be fine with this though, as this is a visual change only.
(In reply to Fabio Valentini from comment #7)
On the contrary, I see that it's easier for me to maintain sed lines in this case, than have to unpack the source, deal with merge conflicts and generate a new patch at each new commit of this package.
Side note: You really *should* unpack the sources and do at least a quick check that new versions didn't add any objectionable content (non-redistributable files, etc.) anyway :)
Right :) I follow the project, and do so by monitoring the commits a bit. Nothing too exciting so far.
Anyway, I updated the SPEC file under the same link. Please review again.
[fedora-review-service-build]