Comments (7)
@gilescope you said "Just bump toml_edit " but bumping cargo_toml seems to be correct. In addition to bumping it, some modification is necessary because there is incompatibility between cargo_toml 0.11 and 0.13.
from cargo-generate-rpm.
This please. Just bump toml_edit to lastest version will do it.
from cargo-generate-rpm.
@cat-in-136 Thanks for updating and releasing a new version. Unfortunately trying it out on my project fails with the following error:
$ cargo generate-rpm --payload-compress none -p bin
/usr/local/cargo/bin/cargo-generate-rpm: Cargo.toml: value from workspace hasn't been set
Project layout looks like:
\
\bin
\src
Cargo.toml
<Some other projects in workspace>
Cargo.toml
The workspace toml has the version, edition, license set. And in project project has the matching workspace = true
. The cargo command is executed from the workspace dir.
from cargo-generate-rpm.
@Christiaan676 It's up to your cargo.toml
I've confirmed it with following tiny workspace.
/foo/Cargo.toml
[workspace]
members = ["bar"]
[workspace.package]
version = "1.2.3"
authors = ["Nice Folks"]
license = "MIT"
description = "A short description of my package"
documentation = "https://example.com/bar"
/foo/bar/Cargo.toml
[package]
name = "bar"
version.workspace = true
authors.workspace = true
license.workspace = true
description.workspace = true
documentation.workspace = true
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/bar", dest = "/usr/bin/bar", mode = "0755" }
]
/foo/bar/src/main.rs
fn main() {
println!("Hello, world!");
}
I hope this will be of help to you.
Execute under workspace directory (/foo)
$ cargo build ---release
$ cargo-generate-rpm -p bar
from cargo-generate-rpm.
@cat-in-136 Did some testing. When I use the workspace for the version / license it works fine. But adding the edition, will result in the above error. First gut feeling is that somethings is going wrong in the toml_edit lib, as the generate-rpm code is not using the edition field. That would suggest things go wrong on line 73: manifest.inherit_workspace(&workspace_manifest, p.as_ref())?;
, some context to the errors would help.
I'll see if I can make an example.
from cargo-generate-rpm.
@cat-in-136 Appertly a know issue in cargo_tml https://gitlab.com/crates.rs/cargo_toml/-/issues/20
from cargo-generate-rpm.
@Christiaan676 I've confirmed this issue and reproduced in my environment. I filed new another issue #47 for the package.edition
issue related to https://gitlab.com/crates.rs/cargo_toml/-/issues/20 .
from cargo-generate-rpm.
Related Issues (20)
- Add --separate-debug-symbols option similar to cargo deb HOT 1
- Out of date documentation on --auto-req options in readme HOT 1
- rpmlib(PayloadIsZstd) = 5.4.18-1 is needed HOT 2
- End of RPMv3 (e.g., centos7) support
- Unexpected behavior from --auto-req /path/to/find-requires
- Different metadata overwrite behavior than the document
- Can't run as cargo subcommand HOT 2
- Versions above 0.14.0 i.e. 0.14.1 and 0.15.0 dont work at all HOT 1
- using RPM macro scriptlets / BuildRequires
- The `--set-metadata` option does not overwrite/set metadata anymore HOT 4
- Adding empty directories via %dir
- %files %dir and sections of rpm spec files HOT 1
- error: unpacking of archive failed on file /lib/systemd/system/xxx.service;6496c577: cpio: Digest mismatch HOT 3
- Feature Request: allow not replacing config files HOT 5
- RPM is not readable by rpmlint HOT 4
- Could not generate generate-rpm in case of --target specified HOT 2
- Failed dependencies: libc.so.6(GLIBC_2.29)(64bit) is needed when install generated .rpm package HOT 1
- Issue with generate RPM not matching the PowerPC64 LE architecture HOT 3
- [Feature-Request] Add `%pretrans %posttrans`? HOT 1
- Building rpm for `foo-bar` package means `foo-bar/Cargo.toml` must exists? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-generate-rpm.