Bug 2364322 - Review Request: rust-gbm-sys - Bindgen generated unsafe libgbm wrapper
Summary: Review Request: rust-gbm-sys - Bindgen generated unsafe libgbm wrapper
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/gbm-sys
Whiteboard:
Depends On:
Blocks: 2364315
TreeView+ depends on / blocked
 
Reported: 2025-05-06 07:35 UTC by solomoncyj
Modified: 2025-05-20 13:32 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
The .spec file difference from Copr build 9000087 to 9066133 (1.98 KB, patch)
2025-05-20 13:32 UTC, Fedora Review Service
no flags Details | Diff

Description solomoncyj 2025-05-06 07:35:00 UTC
Spec URL: https://solomoncyj.fedorapeople.org/reviews/rust-gbm-sys/rust-gbm-sys.spec
SRPM URL: https://solomoncyj.fedorapeople.org/reviews/rust-gbm-sys/rust-gbm-sys-0.4.0-1.fc43.src.rpm

Description:
Bindgen generated unsafe libgbm wrapper.

Fedora Account System Username: solomoncyj

Comment 1 Fedora Review Service 2025-05-06 07:40:36 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9000087
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2364322-rust-gbm-sys/fedora-rawhide-x86_64/09000087-rust-gbm-sys/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Ben Beasley 2025-05-16 16:24:13 UTC
Please try to unbundle gbm by using mesa-libgbm-devel, which comes from the mesa source package. Make sure you use the system /usr/include/gbm.h (removing the bundled one in %prep) and re-generate the bindings unconditionally, i.e. make the bindgen dependency non-optional and do all the things that would normally happen for the use_bindgen feature even when that feature is not requested.

Comment 4 Ben Beasley 2025-05-18 13:49:18 UTC
This doesn’t appear to build.

+ ln -f /usr/include/gbm.h ./include/gbm.h
ln: failed to create hard link './include/gbm.h' => '/usr/include/gbm.h': Operation not permitted

You’re trying to create a hardlink that may cross filesystems, which is not possible. You probably meant "ln -s" to create a symbolic link, instead.

At a glance, gbm-sys-fix-metadata.diff looks like it’s correctly making the bindgen-related dependencies mandatory, but it looks like you still need to patch the conditionals in build.rs make the actual regeneration unconditional, as if use_bindgen and update_bindings were always enabled, so that the bindings are actually re-generated using the system header.

Comment 8 Fedora Review Service 2025-05-20 13:32:56 UTC
Created attachment 2090885 [details]
The .spec file difference from Copr build 9000087 to 9066133

Comment 9 Fedora Review Service 2025-05-20 13:32:59 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9066133
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2364322-rust-gbm-sys/fedora-rawhide-x86_64/09066133-rust-gbm-sys/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.


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