Bug 2364322

Summary: Review Request: rust-gbm-sys - Bindgen generated unsafe libgbm wrapper
Product: [Fedora] Fedora Reporter: solomoncyj
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, package-review
Target Milestone: ---Keywords: AutomationTriaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://crates.io/crates/gbm-sys
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2364315    
Attachments:
Description Flags
The .spec file difference from Copr build 9000087 to 9066133 none

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.