Bug 1840224 - Review Request: rust-expat-sys - XML parser library written in C
Summary: Review Request: rust-expat-sys - XML parser library written in C
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1839330
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-26 15:10 UTC by Stefano Figura
Modified: 2023-09-14 06:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-20 15:10:11 UTC
Type: Bug
Embargoed:
michel: fedora-review+


Attachments (Terms of Use)

Description Stefano Figura 2020-05-26 15:10:28 UTC
Spec URL: https://git.sr.ht/~returntrip/expat-sys/blob/master/rust-expat-sys.spec
SRPM URL: https://git.sr.ht/~returntrip/expat-sys/blob/master/rust-expat-sys-2.1.6-1.fc33.src.rpm
Koji Scratch Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=45020640
Description: XML parser library written in C.
Fedora Account System Username: returntrip

Comment 1 Michel Lind 2020-05-27 22:42:13 UTC
Could you file an issue against upstream for the broken symlink for README.md too, and add the link to the spec? I suspect it used to share a git repo with another project and someone forgot to update the README after the split.

Also -- `rm -vr expat` is commented out so you're not stripping out the bundled expat. If I uncomment it, build fails:

```
--- stdout
running: "cmake" "/builddir/build/BUILD/expat-sys-2.1.6/expat" "-DBUILD_shared=OFF" "-DBUILD_tools=OFF" "-DBUILD_examples=OFF" "-DBUILD_tests=OFF" "-DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/expat-sys-2.1.6/target/release/build/expat-sys-23aa5946dcba096c/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

--- stderr
CMake Error: The source directory "/builddir/build/BUILD/expat-sys-2.1.6/expat" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

```

I encountered this too with bzip2-sys; even if upstream supports looking up the system library via pkgconfig, it will not find it if you don't add this as a BuildRequires.

Add this below the existing BuildRequires on rust-packaging:

BuildRequires:  pkgconfig(expat)                                                                                                                                                           

This should allow the build to succeed against the system expat instead of the bundled one.

Comment 2 Stefano Figura 2020-05-28 12:16:38 UTC
(In reply to Michel Alexandre Salim from comment #1)
> Could you file an issue against upstream for the broken symlink for
> README.md too, and add the link to the spec? I suspect it used to share a
> git repo with another project and someone forgot to update the README after
> the split.
> 
> Also -- `rm -vr expat` is commented out so you're not stripping out the
> bundled expat. If I uncomment it, build fails:
> 
> ```
> --- stdout
> running: "cmake" "/builddir/build/BUILD/expat-sys-2.1.6/expat"
> "-DBUILD_shared=OFF" "-DBUILD_tools=OFF" "-DBUILD_examples=OFF"
> "-DBUILD_tests=OFF"
> "-DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/expat-sys-2.1.6/target/release/
> build/expat-sys-23aa5946dcba096c/out" "-DCMAKE_C_FLAGS= -ffunction-sections
> -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc"
> "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64"
> "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections
> -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc"
> "-DCMAKE_BUILD_TYPE=Release"
> 
> --- stderr
> CMake Error: The source directory
> "/builddir/build/BUILD/expat-sys-2.1.6/expat" does not exist.
> Specify --help for usage, or press the help button on the CMake GUI.
> thread 'main' panicked at '
> command did not execute successfully, got: exit code: 1
> 
> ```
> 
> I encountered this too with bzip2-sys; even if upstream supports looking up
> the system library via pkgconfig, it will not find it if you don't add this
> as a BuildRequires.
> 
> Add this below the existing BuildRequires on rust-packaging:
> 
> BuildRequires:  pkgconfig(expat)                                            
> 
> 
> This should allow the build to succeed against the system expat instead of
> the bundled one.

Thanks for the review! Will fix the README.md issue.
One confusing thing about `rm -vr expat`. I see that both spec on sr.ht and on my machine do not even it commented out. Am I missing something?

```
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
rm -vr expat
%cargo_prep
```

Comment 3 Stefano Figura 2020-05-28 20:42:28 UTC
Applied changed as requested and updated the spec file found in the description.
New koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=45112839

Comment 5 Michel Lind 2020-06-03 04:19:45 UTC
Looks fine, APPROVED. One question -- we should check with Igor -- the build script, build.rs is MPL-licensed. Since it does not actually end up in the binary I think it's fine, but better check first. If the license of the build script matters then the license becomes MIT and MPLv2.0 per https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses


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

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



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

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.
[-]: 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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Mozilla Public License
     2.0". 17 files have unknown license. Detailed output of licensecheck
     in /home/michel/src/fedora/reviews/1840224-rust-expat-
     sys/licensecheck.txt
[-]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[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]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: Package does not contain duplicates in %files.
[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:
[x]: 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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in rust-
     expat-sys-devel , rust-expat-sys+default-devel
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[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]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: rust-expat-sys-devel-2.1.6-1.fc33.noarch.rpm
          rust-expat-sys+default-devel-2.1.6-1.fc33.noarch.rpm
          rust-expat-sys-2.1.6-1.fc33.src.rpm
rust-expat-sys-devel.noarch: W: invalid-url URL: https://crates.io/crates/expat-sys HTTP Error 404: Not Found
rust-expat-sys-devel.noarch: W: no-documentation
rust-expat-sys-devel.noarch: W: hidden-file-or-dir /usr/share/cargo/registry/expat-sys-2.1.6/.cargo-checksum.json
rust-expat-sys+default-devel.noarch: W: spelling-error %description -l en_US sys -> says, sis, syn
rust-expat-sys+default-devel.noarch: W: invalid-url URL: https://crates.io/crates/expat-sys HTTP Error 404: Not Found
rust-expat-sys+default-devel.noarch: W: no-documentation
rust-expat-sys.src: W: invalid-url URL: https://crates.io/crates/expat-sys HTTP Error 404: Not Found
3 packages and 0 specfiles checked; 0 errors, 7 warnings.




Rpmlint (installed packages)
----------------------------
(none): E: no installed packages by name rust-expat-sys-devel
(none): E: no installed packages by name rust-expat-sys+default-devel
0 packages and 0 specfiles checked; 0 errors, 0 warnings.



Source checksums
----------------
https://crates.io/api/v1/crates/expat-sys/2.1.6/download#/expat-sys-2.1.6.crate :
  CHECKSUM(SHA256) this package     : 658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa
  CHECKSUM(SHA256) upstream package : 658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa


Requires
--------
rust-expat-sys-devel (rpmlib, GLIBC filtered):
    (crate(cmake/default) >= 0.1.0 with crate(cmake/default) < 0.2.0)
    (crate(pkg-config/default) >= 0.3.0 with crate(pkg-config/default) < 0.4.0)
    cargo

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



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

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



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -b 1840224
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: SugarActivity, C/C++, Ocaml, PHP, Python, R, Haskell, Perl, fonts, Java
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 6 Red Hat Bugzilla 2023-09-14 06:01:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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