Bug 2119240 - Review Request: rust-exr - Read and write OpenEXR files without any unsafe code
Summary: Review Request: rust-exr - Read and write OpenEXR files without any unsafe code
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2119245
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-18 03:27 UTC by Orion Poplawski
Modified: 2023-03-22 22:44 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-03-22 22:44:01 UTC
Type: Bug
Embargoed:
ppisar: fedora-review?


Attachments (Terms of Use)

Description Orion Poplawski 2022-08-18 03:27:59 UTC
Spec URL: https://orion.fedorapeople.org/rust-exr.spec
SRPM URL: https://orion.fedorapeople.org/
Description:

Fedora Account System Username: orion

error: Failed build dependencies:
        (crate(deflate/default) >= 1.0.0 with crate(deflate/default) < 2.0.0~) is needed by rust-exr-1.4.2-1.fc37.x86_64
        (crate(flume/default) >= 0.10.9 with crate(flume/default) < 0.11.0~) is needed by rust-exr-1.4.2-1.fc37.x86_64

Comment 1 Orion Poplawski 2022-08-18 03:55:27 UTC
deflate has been updated.

Comment 2 Fabio Valentini 2022-08-21 11:41:07 UTC
FYI, It looks like this crate does not support big-endian architectures (according to its README):
https://crates.io/crates/exr

It's also explicitly only a dependency of "image" on little-endian architectures:
https://github.com/image-rs/image/blob/master/Cargo.toml#L47-L50

As such, I'm inclined to just disable the OpenEXR functionality in "image" until this is resolved.

Comment 3 Fabio Valentini 2022-11-13 17:58:29 UTC
Are you still interested in packaging this crate?

It would allow us to enable "exr" functionality of the "image" crate.
Not sure if that's something you want (or need), but it would at least make our deviations from upstream in the package for "image" unnecessary.

To resolve the problem with the missing support for big-endian architectures, I would just wrap the %cargo_build and %cargo_test macros in %ifnarch s390x conditionals, similar to what we do here:

https://src.fedoraproject.org/rpms/rust-cpufeatures/blob/rawhide/f/rust-cpufeatures.spec#_67-80

Comment 4 Orion Poplawski 2022-11-14 02:26:43 UTC
Only partially at this point, but happy to help out.  But looking a the latest version (1.5.2) I get:

DEBUG util.py:443:   Problem 1: nothing provides requested (crate(half/default) >= 2.1.0 with crate(half/default) < 3.0.0~)
DEBUG util.py:443:   Problem 2: nothing provides requested (crate(miniz_oxide/default) >= 0.6.2 with crate(miniz_oxide/default) < 0.7.0~)

Comment 5 Fabio Valentini 2022-11-14 15:46:21 UTC
If the latest version fails due to missing dependencies, then it would be OK to package a slightly older one, and I'll update it later, once I have updated the dependencies.

Comment 6 Orion Poplawski 2022-11-19 02:20:27 UTC
It looks like we have an issue where the crate doesn't ship various image files needed by the tests (tests/images).  What's the best way forward here?  Is it expected that they would be shipped in the crate?  Can we shift to the github source?

Comment 7 Fabio Valentini 2022-11-22 15:38:40 UTC
(In reply to Orion Poplawski from comment #6)
> It looks like we have an issue where the crate doesn't ship various image
> files needed by the tests (tests/images).  What's the best way forward here?

Skip the tests which attempt to open files that aren't included in published crates ("%cargo_test -- -- --skip name_of_test").

If that doesn't work (for example, because the tests embed the contents of these files at build-time instead of opening them at run-time, i.e. with something like the "include_bytes!()" macro), then "rm tests/path_to_test.rs" the affected files in %prep.

> Is it expected that they would be shipped in the crate?  Can we shift to the
> github source?

No, that's not a good idea. We mandate using .crate files from crates.io for a reason. Mostly because it ensures that the crates successfully built before they were uploaded, and that the Cargo.toml metadata is normalized and has some extraneous stuff removed which could interfere with Fedora packaging tools.

Comment 8 Fabio Valentini 2023-03-22 22:44:01 UTC
Looks like we're fine without this crate, for now.
I'll re-submit a review request for it if we ever start needing it.


Note You need to log in before you can comment on or make changes to this bug.