Bug 1965823 - Review Request: rust-opml - OPML parser for Rust
Summary: Review Request: rust-opml - OPML parser for Rust
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Staněk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1965822
Blocks: 1938535
TreeView+ depends on / blocked
 
Reported: 2021-05-30 13:45 UTC by Fabio Valentini
Modified: 2021-07-29 01:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-20 17:02:27 UTC
Type: ---
jstanek: fedora-review+


Attachments (Terms of Use)
Script to generate stripped crate (1.58 KB, text/plain)
2021-07-14 14:28 UTC, Jan Staněk
no flags Details

Description Fabio Valentini 2021-05-30 13:45:55 UTC
Spec URL: https://decathorpe.fedorapeople.org/rust-opml.spec
SRPM URL: https://decathorpe.fedorapeople.org/rust-opml-1.1.0-1.fc34.src.rpm

Description:
OPML parser for Rust.

Fedora Account System Username: decathorpe

Comment 1 Robert-André Mauchin 🐧 2021-05-30 16:02:03 UTC
 - Include examples/ in %doc?

  - There is a weird tests/spec_samples/LICENSE file with:

© Copyright 2000 UserLand Software, Inc. All Rights Reserved.
© Copyright 2006-2007 Scripting News, Inc. All Rights Reserved.

UserLand Software, Inc. and Scripting News, Inc. are refererred to in the following as "the Companies."

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and these paragraphs are included on all such copies and derivative works.

This document may not be modified in any way, such as by removing the copyright notice or references to the Companies or other organizations. Further, while these copyright restrictions apply to the written OPML specification, no claim of ownership is made by the Companies to the format it describes. Any party may, for commercial or non-commercial purposes, implement this format without royalty or license fee to the Companies. The limited permissions granted herein are perpetual and will not be revoked by the Companies or their successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE COMPANIES DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

 I don't know what license it is. Seems common on rfc like https://www.w3.org/Protocols/rfc2616/rfc2616-sec21.html

I've sent a mail to legal to weight on this. https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/6HN5VJKQU24ZXNUQ6E4LKZRH4AXNGAK7/


 - Latest version packaged
 - Builds in mock
 - No rpmlint errors
 - Conforms to Packaging Guidelines

Comment 2 Fabio Valentini 2021-05-30 17:09:13 UTC
Good catch! Thanks for submitting the email for the legal list.

Since the files under "tests/spec_samples/" are only used for integration tests, it would be easy to exclude them from built binary packages and only use them for the test suite.

If it turns out it is not a permissible license for that purpose alone either, it should be easy to create a "clean" source tarball without those files, and just don't run the integration tests that need them.

Comment 3 Fabio Valentini 2021-06-28 18:07:09 UTC
Looks like there's no conclusions on the legal list, but most people seemed to think that this license might not be acceptable.

Should I create "clean" source tarballs for this package instead, which don't contain those files?
Or do you think it would be enough to remove them during the build so that they are not shipped?

Comment 4 Jan Staněk 2021-07-14 13:56:52 UTC
(In reply to Fabio Valentini from comment #3)
> Should I create "clean" source tarballs for this package instead, which
> don't contain those files?
> Or do you think it would be enough to remove them during the build so that
> they are not shipped?

IANAL, but given that we ship the source RPMs as well (in *-sources repos), removing during build might not be enough for the "not shipping" part. Cleaning the tarballs is the safe option.

Comment 5 Jan Staněk 2021-07-14 14:28:34 UTC
Created attachment 1801536 [details]
Script to generate stripped crate

I threw together a quick shell script to fetch and clean the opml crate from crates.io.

It queries the specfile for current version, then fetches the crate from the CDN and removes the relevant files. At the end, it outputs `opml-%{version}-stripped.crate`, which should be suitable for inclusion as Source0.

Feel free to add this to the spec as additional Source file.

Comment 6 Fabio Valentini 2021-07-14 16:01:46 UTC
(In reply to Jan Staněk from comment #4)
> IANAL, but given that we ship the source RPMs as well (in *-sources repos),
> removing during build might not be enough for the "not shipping" part.
> Cleaning the tarballs is the safe option.

That is a good argument.
I have created a similar script that uses cargo to repackage the crate properly, which should also make sure no "vital" files are removed accidentally.

I also updated the package to use the latest version 1.1.1, which fixes the missing license files compared to version 1.1.0.

Spec URL: https://decathorpe.fedorapeople.org/packages/rust-opml.spec
SRPM URL: https://decathorpe.fedorapeople.org/packages/rust-opml-1.1.1-1.fc34.src.rpm

Comment 7 Jan Staněk 2021-07-15 09:07:43 UTC
(In reply to Fabio Valentini from comment #6)

> I have created a similar script that uses cargo to repackage the crate
> properly, which should also make sure no "vital" files are removed
> accidentally.

Fair enough, although I have one problem with it's current behaviour – after the script is run, it produces the file of the same name as the original crate. Two problems with that:

1. If you forget to run the gen_clean_tarball.sh, no-one will notice unless you explicitly check the content; then we are back to accidentally shipping the (arguably) non-free stuff.

2. When you do run the script, the hash of the original and the modified file will differ, and fedora-review (and I suspect that other diligent enough linters) will complain about it. Nothing that couldn't be waived, but still.

I would strongly prefer if you could rename the re-packaged crate in the cleaning script (`opml-%{version}-stripped.crate` or something like that), and use `Source: %{name}-%{version}-stripped.crate` in the specfile (no `%{crates_source}`).
That way you have to go through the script to get a new release tarball, and you are explicit in stating that we do not ship the crate directly from the upstream, but deliberately making changes to it.

Comment 8 Fabio Valentini 2021-07-15 10:07:52 UTC
> I would strongly prefer if you could rename the re-packaged crate in the cleaning script.

Good point, done. Same links.

Comment 9 Jan Staněk 2021-07-20 08:15:54 UTC
Package Review
==============

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



===== 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.
[x]: License field in the package spec file matches the actual license.
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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.
[x]: 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.
[-]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 2 files.
[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]: 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]: 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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in rust-
     opml-devel , rust-opml+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]: 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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: rust-opml-devel-1.1.1-1.fc35.noarch.rpm
          rust-opml+default-devel-1.1.1-1.fc35.noarch.rpm
          rust-opml-1.1.1-1.fc35.src.rpm
rust-opml-devel.noarch: W: invalid-url URL: https://crates.io/crates/opml HTTP Error 404: Not Found
rust-opml-devel.noarch: W: hidden-file-or-dir /usr/share/cargo/registry/opml-1.1.1/.cargo-checksum.json
rust-opml+default-devel.noarch: W: spelling-error %description -l en_US opml -> opal, op ml, op-ml
rust-opml+default-devel.noarch: W: invalid-url URL: https://crates.io/crates/opml HTTP Error 404: Not Found
rust-opml+default-devel.noarch: W: no-documentation
rust-opml.src: W: invalid-url URL: https://crates.io/crates/opml HTTP Error 404: Not Found
rust-opml.src: W: strange-permission gen_clean_tarball.sh 755
3 packages and 0 specfiles checked; 0 errors, 7 warnings.




Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Requires
--------
rust-opml-devel (rpmlib, GLIBC filtered):
    (crate(regex/default) >= 1.3.0 with crate(regex/default) < 2.0.0~)
    (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0~)
    (crate(serde/derive) >= 1.0.0 with crate(serde/derive) < 2.0.0~)
    (crate(strong-xml/default) >= 0.6.2 with crate(strong-xml/default) < 0.7.0~)
    (crate(thiserror/default) >= 1.0.24 with crate(thiserror/default) < 2.0.0~)
    cargo

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



Provides
--------
rust-opml-devel:
    crate(opml)
    rust-opml-devel

rust-opml+default-devel:
    crate(opml/default)
    rust-opml+default-devel



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

Comment 11 Gwyn Ciesla 2021-07-20 13:49:48 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-opml

Comment 12 Fedora Update System 2021-07-20 17:00:45 UTC
FEDORA-2021-62501907b8 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-62501907b8

Comment 13 Fedora Update System 2021-07-20 17:02:27 UTC
FEDORA-2021-0399e40aa0 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2021-07-21 01:55:06 UTC
FEDORA-2021-62501907b8 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-62501907b8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-62501907b8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2021-07-29 01:07:10 UTC
FEDORA-2021-62501907b8 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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