Bug 2292554 - Review Request: rust-vte4-sys - FFI bindings to vte-2.91-gtk4
Summary: Review Request: rust-vte4-sys - FFI bindings to vte-2.91-gtk4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/vte4-sys
Whiteboard:
Depends On:
Blocks: 2292555
TreeView+ depends on / blocked
 
Reported: 2024-06-15 23:22 UTC by Jonathan Steffan
Modified: 2024-08-12 11:43 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-08-02 23:09:24 UTC
Type: ---
Embargoed:
lemenkov: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 7617825 to 7738878 (1.29 KB, patch)
2024-07-16 16:51 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 7738878 to 7794721 (1.00 KB, patch)
2024-07-26 19:16 UTC, Fedora Review Service
no flags Details | Diff
fedora-review log (41.25 KB, text/plain)
2024-08-01 12:31 UTC, Peter Lemenkov
no flags Details

Description Jonathan Steffan 2024-06-15 23:22:58 UTC
Spec URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys.spec
SRPM URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys-0.7.0-1.fc39/rust-vte4-sys-0.7.0-1.fc40.src.rpm
Description: FFI bindings to vte-2.91-gtk4
Fedora Account System Username: jsteffan

Comment 1 Fedora Review Service 2024-06-15 23:34:38 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7617825
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2292554-rust-vte4-sys/fedora-rawhide-x86_64/07617825-rust-vte4-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 Fabio Valentini 2024-07-13 18:37:16 UTC
> # FIXME: no license files detected

License files are present in upstream, please temporarily include them manually.

Comment 3 Jonathan Steffan 2024-07-13 19:14:07 UTC
Spec URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys.spec
SRPM URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys-0.7.0-1.fc39/rust-vte4-sys-0.7.0-1.fc40.src.rpm

Staying with 0.7 series as the 0.8 upgrade requires a bunch of updates to existing package. That can be done in rawhide after getting these batch through.

Comment 4 Jonathan Steffan 2024-07-13 19:50:07 UTC
As a note to self, I need to add a rust2rpm.toml with the following content:

[requires]
build = ["pkgconfig(vte-2.91-gtk40)"]
lib = ["pkgconfig(vte-2.91-gtk4)"]

Comment 5 Jonathan Steffan 2024-07-13 19:51:24 UTC
[requires]
build = ["pkgconfig(vte-2.91-gtk4)"]
lib = ["pkgconfig(vte-2.91-gtk4)"]

Comment 6 Fabio Valentini 2024-07-15 15:12:08 UTC
Looks like the license file you added doesn't match the one behind the download URL you provided:

Source checksums
----------------
https://gitlab.gnome.org/World/Rust/vte4-rs/-/raw/main/LICENSE :
  CHECKSUM(SHA256) this package     : 39fa265207450e77c62e90c5594a06c085b655d8374c7ced4bf7894b6bd95dd2
  CHECKSUM(SHA256) upstream package : f9c4c77baa3828004ee54b8a4f2db2e88ed44a6237a493965bf551fac0fcb62d
https://crates.io/api/v1/crates/vte4-sys/0.7.0/download#/vte4-sys-0.7.0.crate :
  CHECKSUM(SHA256) this package     : d893a06a0907d5b843f34400ff0a7990332011e53faa7435635f0b12aacc3f88
  CHECKSUM(SHA256) upstream package : d893a06a0907d5b843f34400ff0a7990332011e53faa7435635f0b12aacc3f88
diff -r also reports differences

Comment 7 Jonathan Steffan 2024-07-15 16:55:07 UTC
Fun. This is caused by multiple sources with the same filename and using spectool -g.

Spec URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys.spec
SRPM URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys-0.7.0-1.fc39/rust-vte4-sys-0.7.0-1.fc40.src.rpm

Comment 8 Fedora Review Service 2024-07-16 16:51:22 UTC
Created attachment 2039748 [details]
The .spec file difference from Copr build 7617825 to 7738878

Comment 9 Fedora Review Service 2024-07-16 16:51:24 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7738878
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2292554-rust-vte4-sys/fedora-rawhide-x86_64/07738878-rust-vte4-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 10 Jonathan Steffan 2024-07-16 19:01:54 UTC
Fixed any source issues. I now build the srpms in an isolated _sourcedir. Sigh.

Spec URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys.spec
SRPM URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys-0.7.0-1.fc39/rust-vte4-sys-0.7.0-1.fc40.src.rpm

[fedora-review-service-build]

Comment 12 Jonathan Steffan 2024-07-23 17:58:45 UTC
Is there anything else I need to do for this to be re-reviewed?

Comment 13 Jonathan Steffan 2024-07-26 18:51:44 UTC
Spec URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys.spec
SRPM URL: https://jsteffan.fedorapeople.org/envision/rust-vte4-sys-0.7.0-1.fc39/rust-vte4-sys-0.7.0-1.fc40.src.rpm

Updated to explicitly disable the failing tests but still run %check.

[requires]
build = ["pkgconfig(vte-2.91-gtk4)"]
lib = ["pkgconfig(vte-2.91-gtk4)"]

[tests]
comments = [
  "Skipped tests due to differences in GIR",
]
skip-exact = true
skip = [
  "cross_validate_constants_with_c",
  "cross_validate_layout_with_c"
]

Comment 14 Fedora Review Service 2024-07-26 19:16:36 UTC
Created attachment 2040594 [details]
The .spec file difference from Copr build 7738878 to 7794721

Comment 15 Fedora Review Service 2024-07-26 19:16:38 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7794721
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2292554-rust-vte4-sys/fedora-rawhide-x86_64/07794721-rust-vte4-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 16 Peter Lemenkov 2024-08-01 12:31:32 UTC
Created attachment 2043225 [details]
fedora-review log

FTBFS with fedora-review.

Comment 17 Jonathan Steffan 2024-08-02 02:30:56 UTC
That is actually a bug in fedora-review. You need to be running fedora-review-0.10.0-9 or later that has patches for that issue.

Comment 18 Peter Lemenkov 2024-08-02 10:02:55 UTC
(In reply to Jonathan Steffan from comment #17)
> That is actually a bug in fedora-review. You need to be running
> fedora-review-0.10.0-9 or later that has patches for that issue.

Thank, it does works now.

Comment 19 Peter Lemenkov 2024-08-02 10:03:23 UTC
I am going to review it.

Comment 20 Peter Lemenkov 2024-08-02 10:23:39 UTC
The only thing I see is that you packaged not the last version. I guess it's the same story as with other GNOME-related Rust-bindings.
 Here is my formal

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license (MIT).
[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format (%autochangelog).
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in rust-
     vte4-sys-devel , rust-vte4-sys+default-devel , rust-
     vte4-sys+v0_66-devel , rust-vte4-sys+v0_70-devel , rust-
     vte4-sys+v0_72-devel , rust-vte4-sys+v0_74-devel
[?]: i did not test if the package functions as described.
[!]: Not the latest version is packaged. See my comment above. I do not consider it as a blocker.
[x]: Package does not include license text files separate from upstream.
[-]: Sources weren't verified with gpgverify since upstream doesn't provide GPG signatures.
[?]: I did not test if the package could be compiled and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: rust-vte4-sys-devel-0.7.0-1.fc41.noarch.rpm
          rust-vte4-sys+default-devel-0.7.0-1.fc41.noarch.rpm
          rust-vte4-sys+v0_66-devel-0.7.0-1.fc41.noarch.rpm
          rust-vte4-sys+v0_70-devel-0.7.0-1.fc41.noarch.rpm
          rust-vte4-sys+v0_72-devel-0.7.0-1.fc41.noarch.rpm
          rust-vte4-sys+v0_74-devel-0.7.0-1.fc41.noarch.rpm
          rust-vte4-sys-0.7.0-1.fc41.src.rpm
=========================================================================================================================================== rpmlint session starts ==========================================================================================================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmp2e8fved0')]
checks: 32, packages: 7

rust-vte4-sys+default-devel.noarch: W: no-documentation
rust-vte4-sys+v0_66-devel.noarch: W: no-documentation
rust-vte4-sys+v0_70-devel.noarch: W: no-documentation
rust-vte4-sys+v0_72-devel.noarch: W: no-documentation
rust-vte4-sys+v0_74-devel.noarch: W: no-documentation
rust-vte4-sys-devel.noarch: W: no-documentation
===================================================================================================== 7 packages and 0 specfiles checked; 0 errors, 6 warnings, 32 filtered, 0 badness; has taken 1.6 s =====================================================================================================




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 6

rust-vte4-sys-devel.noarch: W: no-documentation
rust-vte4-sys+v0_66-devel.noarch: W: no-documentation
rust-vte4-sys+v0_70-devel.noarch: W: no-documentation
rust-vte4-sys+v0_72-devel.noarch: W: no-documentation
rust-vte4-sys+v0_74-devel.noarch: W: no-documentation
rust-vte4-sys+default-devel.noarch: W: no-documentation
 6 packages and 0 specfiles checked; 0 errors, 6 warnings, 28 filtered, 0 badness; has taken 0.9 s 



Source checksums
----------------
https://gitlab.gnome.org/World/Rust/vte4-rs/-/raw/f7202463afeea70b6005abc5511be5f778c1bca6/LICENSE :
  CHECKSUM(SHA256) this package     : f9c4c77baa3828004ee54b8a4f2db2e88ed44a6237a493965bf551fac0fcb62d
  CHECKSUM(SHA256) upstream package : f9c4c77baa3828004ee54b8a4f2db2e88ed44a6237a493965bf551fac0fcb62d
https://crates.io/api/v1/crates/vte4-sys/0.7.0/download#/vte4-sys-0.7.0.crate :
  CHECKSUM(SHA256) this package     : d893a06a0907d5b843f34400ff0a7990332011e53faa7435635f0b12aacc3f88
  CHECKSUM(SHA256) upstream package : d893a06a0907d5b843f34400ff0a7990332011e53faa7435635f0b12aacc3f88


Requires
--------
rust-vte4-sys-devel (rpmlib, GLIBC filtered):
    (crate(cairo-sys-rs/default) >= 0.19.0 with crate(cairo-sys-rs/default) < 0.20.0~)
    (crate(gdk4-sys/default) >= 0.8.0 with crate(gdk4-sys/default) < 0.9.0~)
    (crate(gio-sys/default) >= 0.19.0 with crate(gio-sys/default) < 0.20.0~)
    (crate(glib-sys/default) >= 0.19.0 with crate(glib-sys/default) < 0.20.0~)
    (crate(gtk4-sys/default) >= 0.8.0 with crate(gtk4-sys/default) < 0.9.0~)
    (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0~)
    (crate(pango-sys/default) >= 0.19.0 with crate(pango-sys/default) < 0.20.0~)
    (crate(system-deps/default) >= 6.0.0 with crate(system-deps/default) < 7.0.0~)
    cargo
    pkgconfig(vte-2.91-gtk4)

rust-vte4-sys+default-devel (rpmlib, GLIBC filtered):
    cargo
    crate(vte4-sys)

rust-vte4-sys+v0_66-devel (rpmlib, GLIBC filtered):
    cargo
    crate(vte4-sys)

rust-vte4-sys+v0_70-devel (rpmlib, GLIBC filtered):
    cargo
    crate(vte4-sys)

rust-vte4-sys+v0_72-devel (rpmlib, GLIBC filtered):
    cargo
    crate(vte4-sys)
    crate(vte4-sys/v0_70)

rust-vte4-sys+v0_74-devel (rpmlib, GLIBC filtered):
    cargo
    crate(vte4-sys)
    crate(vte4-sys/v0_72)



Provides
--------
rust-vte4-sys-devel:
    crate(vte4-sys)
    rust-vte4-sys-devel

rust-vte4-sys+default-devel:
    crate(vte4-sys/default)
    rust-vte4-sys+default-devel

rust-vte4-sys+v0_66-devel:
    crate(vte4-sys/v0_66)
    rust-vte4-sys+v0_66-devel

rust-vte4-sys+v0_70-devel:
    crate(vte4-sys/v0_70)
    rust-vte4-sys+v0_70-devel

rust-vte4-sys+v0_72-devel:
    crate(vte4-sys/v0_72)
    rust-vte4-sys+v0_72-devel

rust-vte4-sys+v0_74-devel:
    crate(vte4-sys/v0_74)
    rust-vte4-sys+v0_74-devel



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2292554
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, C/C++, Generic
Disabled plugins: Haskell, fonts, Perl, PHP, Ocaml, Python, SugarActivity, R, Java
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH


I don't se any issues so this package is

================
=== APPROVED ===
================

Comment 21 Fabio Valentini 2024-08-02 17:23:19 UTC
Looks good to me too, just a suggestion for better metadata / integration with RPM dependencies:

You might want to add Requires for the specific vte library versions for the features that depend on them.

Something like this in rust2rpm.toml should work:

```
[requires]
build = ["pkgconfig(vte-2.91-gtk4)"]
lib = ["pkgconfig(vte-2.91-gtk4)"]
features.v0_66 = ["pkgconfig(vte-2.91-gtk4) >= 0.66"]
features.v0_70 = ["pkgconfig(vte-2.91-gtk4) >= 0.70"]
features.v0_72 = ["pkgconfig(vte-2.91-gtk4) >= 0.72"]
features.v0_74 = ["pkgconfig(vte-2.91-gtk4) >= 0.74"]
```

This happens often for GNOME-related library bindings.
You can take a look at gtk4-sys for an example:

https://src.fedoraproject.org/rpms/rust-gtk4-sys/blob/rawhide/f/rust2rpm.toml

Adding these Requires explicitly should prevent some weird and / or hard to diagnose compiler failures when the vte library on the host is older than the one expected by the feature flags passed to the crate.

Comment 22 Fedora Admin user for bugzilla script actions 2024-08-02 22:50:06 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-vte4-sys

Comment 23 Jonathan Steffan 2024-08-02 22:58:47 UTC
Thanks. Good to know about what to do for the optional features.

Comment 24 Fedora Update System 2024-08-02 23:05:00 UTC
FEDORA-2024-6cd58d3ed7 (rust-vte4-sys-0.7.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-6cd58d3ed7

Comment 25 Fedora Update System 2024-08-02 23:09:24 UTC
FEDORA-2024-6cd58d3ed7 (rust-vte4-sys-0.7.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Jonathan Steffan 2024-08-02 23:43:05 UTC
(In reply to Fabio Valentini from comment #21)
> Adding these Requires explicitly should prevent some weird and / or hard to
> diagnose compiler failures when the vte library on the host is older than
> the one expected by the feature flags passed to the crate.

To generate this list I would just look at https://gitlab.gnome.org/World/Rust/vte4-rs/-/blob/main/vte4/Cargo.toml?ref_type=heads#L54-61 and do the mapping by hand? On update, adding the new minimums?

Thanks for all of the guidance.

Comment 27 Fabio Valentini 2024-08-12 11:43:29 UTC
Yes, exactly. This is how it's handled for most other Rust bindings for C libraries - i.e. provide features that "unlock" APIs that are only added in newer versions of the C library than the "base" version that's supported. Mapping this to RPM metadata avoids very weird build issues when the version "expected" by the bindings is newer than the version of the library in the build environment.


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