Bug 2001682 - Review Request: rubygem-sys-uname - An interface for returning uname (platform) information
Summary: Review Request: rubygem-sys-uname - An interface for returning uname (platfor...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jarek Prokop
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-06 18:17 UTC by Pavel Valena
Modified: 2022-02-17 16:32 UTC (History)
2 users (show)

Fixed In Version: rubygem-sys-uname-1.2.2-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-17 16:32:45 UTC
Type: Bug
Embargoed:
jprokop: fedora-review+


Attachments (Terms of Use)

Description Pavel Valena 2021-09-06 18:17:56 UTC
Spec URL: https://raw.githubusercontent.com/fedora-distgit/rubygem-sys-uname/rawhide/rubygem-sys-uname.spec
SRPM URL: https://github.com/fedora-distgit/rubygem-sys-uname/raw/rawhide/rubygem-sys-uname-1.2.2-1.fc36.src.rpm
Description: 
Fedora Account System Username: pvalena

Koji scratch-build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=75235792

Copr build:
https://copr.fedorainfracloud.org/coprs/build/2683350

Checks:

  - Tests: ok
  - Syntax check: ok
  - Reverse dependencies: ok
  - Smoke test: ok
  - rpmlint: ok

_ _ _ _

Test log: https://git.io/Jus7f


Additional information:

This package is needed for new package rubygem-cucumber-create-meta.

Comment 1 Jarek Prokop 2021-09-10 09:05:24 UTC
Taking for a review.

Comment 2 Jarek Prokop 2021-09-10 09:45:45 UTC
* invalid license: License should be ASL 2.0

* Sources verification: Looks like upstream ships certificate and the gem is signed, so let's verify the sources
  - https://docs.fedoraproject.org/en-US/packaging-guidelines/#_source_file_verification
    - we can verify using gem install https://guides.rubygems.org/security/#using-gems
  - the cert file should probably be moved to `/etc/pki/`, but the guide for that is quite old.
    - https://fedoraproject.org/wiki/Common_Rpmlint_issues#pem-certificate

Otherwise the package LGTM.


Fedora review output:

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

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


Issues:
=======
- Package contains Requires: ruby(release).
  Reviewer note: Final requires are sane, see attachment.


===== 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.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Apache License 2.0". 16
     files have unknown license. Detailed output of licensecheck in
     /home/jprokop/projects/packaging/review/2001682-rubygem-sys-
     uname/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/gems/doc,
     /usr/share/gems
[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.
[-]: 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]: Package requires other packages for directories it uses.
[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

Ruby:
[x]: Platform dependent files must all go under %{gem_extdir_mri}, platform
     independent under %{gem_dir}.
[x]: Gem package must not define a non-gem subpackage
[x]: Macro %{gem_extdir} is deprecated.
[x]: Gem package is named rubygem-%{gem_name}
[x]: Package contains BuildRequires: rubygems-devel.
[x]: Gem package must define %{gem_name} macro.
[x]: Pure Ruby package must be built as noarch
[x]: Package does not contain Requires: ruby(abi).

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

Generic:
[-]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
     Reviewer note: generated rdoc docs contain fonts, there is no fix currently
[-]: 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]: 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.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: Package should compile 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]: Fully versioned dependency in subpackages if applicable.
[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.

Ruby:
[x]: Gem package should exclude cached Gem.
[x]: Gem should use %gem_install macro.
[x]: gems should not require rubygems package
[x]: Specfile should use macros from rubygem-devel package.
[x]: Test suite should not be run by rake.
[x]: Test suite of the library should be run.

===== 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
-------
Cannot parse rpmlint output:


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


Source checksums
----------------
https://rubygems.org/gems/sys-uname-1.2.2.gem :
  CHECKSUM(SHA256) this package     : 4c26d36b66746872a14b050015f4c22ce43f493a205ab1eeb50054976711663e
  CHECKSUM(SHA256) upstream package : 4c26d36b66746872a14b050015f4c22ce43f493a205ab1eeb50054976711663e


Requires
--------
rubygem-sys-uname (rpmlib, GLIBC filtered):
    (rubygem(ffi) >= 1.1 with rubygem(ffi) < 2)
    ruby(rubygems)

rubygem-sys-uname-doc (rpmlib, GLIBC filtered):
    rubygem-sys-uname



Provides
--------
rubygem-sys-uname:
    rubygem(sys-uname)
    rubygem-sys-uname

rubygem-sys-uname-doc:
    rubygem-sys-uname-doc



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

Comment 3 Pavel Valena 2021-09-13 17:38:16 UTC
(In reply to Jarek Prokop from comment #2)
> * invalid license: License should be ASL 2.0

I wonder if gem2rpm should have some hash table...

> 
> * Sources verification: Looks like upstream ships certificate and the gem is
> signed, so let's verify the sources
>   -
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_source_file_verification
>     - we can verify using gem install
> https://guides.rubygems.org/security/#using-gems
>   - the cert file should probably be moved to `/etc/pki/`, but the guide for
> that is quite old.
>     - https://fedoraproject.org/wiki/Common_Rpmlint_issues#pem-certificate

I'll remove it instead. It doesn't make sense to check the .gem file using a cert included in the .gem ... we'd have to add as an additional source.

Thanks for spotting!

> 
> Otherwise the package LGTM.
> 

Thanks!

Changes:
```
--- a/rubygem-sys-uname.spec
+++ b/rubygem-sys-uname.spec
@@ -5,7 +5,7 @@ Name: rubygem-%{gem_name}
 Version: 1.2.2
 Release: 1%{?dist}
 Summary: An interface for returning uname (platform) information
-License: Apache-2.0
+License: ASL 2.0
 URL: http://github.com/djberg96/sys-uname
 Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
 BuildRequires: ruby(release)
@@ -53,7 +53,7 @@ popd
 %{gem_instdir}/CHANGES.md
 %license %{gem_instdir}/LICENSE
 %{gem_instdir}/MANIFEST.md
-%{gem_instdir}/certs
+%exclude %{gem_instdir}/certs
 %{gem_libdir}
 %exclude %{gem_cache}
 %{gem_spec}
```

https://copr.fedorainfracloud.org/coprs/build/2736351

Comment 4 Pavel Valena 2021-09-13 17:38:50 UTC
(I've updated the content of the links in the description.)

Comment 5 Jarek Prokop 2021-09-14 01:06:58 UTC
Thanks, Package approved!

Comment 6 Gwyn Ciesla 2021-09-14 14:23:02 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rubygem-sys-uname


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