https://bugzilla.redhat.com/show_bug.cgi?id=2344534
--- Comment #3 from wojnilowicz lukasz.wojnilowicz@gmail.com --- (In reply to Fabio Valentini from comment #2)
Looks mostly OK, with some caveats:
%global commit a0cdef90cf86cd8d2cc89723f5751c1123ae7e2b %global short_commit %(c=%{commit}; echo ${c:0:7})
It would be great if you could make this unambiguous that this refers to the bundled aw-server-rust snapshot, and not awatcher itself.
Done.
# Mozilla Public License 2.0
This is not an SPDX license identifier, it looks like it's from awatcher-0.3.1/Cargo.toml:
license = "Mozilla Public License 2.0"
This is a bug.
I created a PR.
# prefix with aw- in order to be detected as a watcher in aw-qt mv %{buildroot}%{_bindir}/{%{name},%{watcher_name}}
If you rename the binaries anyway, you could just remove the call to `%cargo_install` and install them the way you need from target/rpm/* directly.
Done.
aw-server = { git = "https://github.com/ActivityWatch/aw-server-rust", optional = true, rev = "656f3c9" } aw-datastore = { git = "https://github.com/ActivityWatch/aw-server-rust", optional = true, rev = "656f3c9" }
You're patching watchers/Cargo.toml to replace the git dependency there, but these two git dependencies in the root Cargo.toml remain. How does this even work? Is it because the "bundle" feature is not enabled by default?
Yes. This package can be compiled as bundled with aw-server-rust (for convenience) or as a watcher to aw-server-rust. I just use the second option, so I believe only some interface parts are needed.
In general, it's really unfortunate that this project needs to basically import aw-server-rust code via git. Usually this is not a desirable state for packaging in Fedora. At the very least, you'd need to declare virtual Provides for the bundled aw-server-rust code snapshot. But otherwise it seems to be done correctly.
Done with the virtual Provides.
Ideally the common interfaces would be published as a library on crates.io. Is that something that has been considered upstream? I don't think the git snapshot dependency would be a sustainable solution for them long-term, either.
Not that I know of. The activitywatch app is distributed as a bundle (aw-server included) from https://github.com/ActivityWatch/activitywatch at https://aur.archlinux.org/packages/activitywatch-bin There was an idea at https://github.com/ActivityWatch/activitywatch/issues/92#issuecomment-158393... to merge the watcher into that bundle, but it didn't happen. The development in general slowed down though. I added a comment about that to the SPEC file.
Is the SPEC file OK now?
[fedora-review-service-build]