https://bugzilla.redhat.com/show_bug.cgi?id=2463848



--- Comment #12 from [email protected] ---
> > The remaining full build failure seems to come from Fedora’s packaged 
> > compact_str 0.9.0 crate, which references ../README.md but does not ship 
> > that file.
> > Would you prefer a temporary downstream workaround, or should this be 
> > treated as a dependency-side issue first?
>
> Sorry, I don't understand. The package builds successfully. What do you mean 
> to say here?

Sorry, that wording was misleading.

I was referring to Fedora's packaged `compact_str` crate, not to `hwatch`
itself.
For context, this came from a local Fedora package build test during the
`%build` phase of `rpmbuild -bb`, where Fedora's packaged `compact_str` 0.9.0
failed to compile because `../README.md` was missing from
`/usr/share/cargo/registry/compact_str-0.9.0/`.


```
error: couldn't read
`/usr/share/cargo/registry/compact_str-0.9.0/src/../README.md`: No such file or
directory (os error 2)
 --> /usr/share/cargo/registry/compact_str-0.9.0/src/lib.rs:1:10
  |
1 | #![doc = include_str!("../README.md")]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: attribute value must be a literal
 --> /usr/share/cargo/registry/compact_str-0.9.0/src/lib.rs:1:10
  |
1 | #![doc = include_str!("../README.md")]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `compact_str` (lib) due to 2 previous errors
```

I've been making various modifications to the specs to circumvent this issue,
but what should I do this time?


> > I updated the spec to follow the current Rust packaging guidelines more 
> > closely:
>
> This improves some things, but you're still doing some things that are either 
> out of date or not following "SHOULD" rules, and some of your changes made 
> things *worse*.
>
> 1. BuildRequires: gcc
>
> What is this for? This is a Rust package built with cargo.
>
> 2. BuildRequires: rust-packaging
>
> This MUST be "cargo-rpm-macros". rust-packaging is an old alias that is only 
> present for backwards compatibility.
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_mandatory_buildrequires

> 4. You're using "%cargo_install".
>
> The template for packages like this uses plain "install" command, that is 
> simpler in this case.
>
> 5. The way you're skipping specific tests is broken.
>
> The newline escaping interferes with RPM macro argument handling. It causes a 
> ' ' argument to get passed, filtering out all tests that don't contain a " " 
> character (which is all of them).
>
> test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 100 filtered out; 
> finished in 0.00s

Thank you, you were right on all of these points.
I changed them.
The main causes were forgetting to delete something or a lack of understanding.
I have corrected it.

- removed `BuildRequires: gcc`
- replaced `BuildRequires: rust-packaging` with `BuildRequires:
cargo-rpm-macros`
- replaced `%cargo_install` with plain `install`
- fixed the `%cargo_test` invocation so the skipped test names are passed
correctly on a single line

> 3. You're not handling licenses of statically linked dependencies at all.
>
> I would recommend to look at the template again, and / or at existing similar 
> packages (for example, nushell).

Thank you.
I changed now updated the `License:` field to reflect the statically linked
Rust dependencies and kept the bundled dependency license output in
`LICENSE.dependencies`.

The above corrections have been applied to the following files.

-
https://github.com/blacknon/hwatch/releases/download/0.4.2/hwatch-0.4.2-4.spec
-
https://github.com/blacknon/hwatch/releases/download/0.4.2/hwatch-0.4.2-4.src.rpm


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2463848

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202463848%23c12

-- 
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to