Bug 1463253 - rubygem-lru_redux: An efficient implementation of an lru cache
Summary: rubygem-lru_redux: An efficient implementation of an lru cache
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: hguemar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-20 12:46 UTC by Juan Badia Payno
Modified: 2018-04-04 06:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-27 20:08:12 UTC
Type: Bug
Embargoed:
mrunge: fedora-review+


Attachments (Terms of Use)

Comment 1 Matthias Runge 2017-07-20 09:14:11 UTC
same comment here as for other test requirements. I'd prefer them to be included via %if 0%{?with_test} (or so)
you should be adding the the check command as well, guarded by %if 0%{?with_test}
(to have a complete spec and you just need to flip the switch, once all deps are included.

Since this is useful in Fedora, would you mind to switch the product to Fedora?

Comment 2 Vít Ondruch 2017-07-27 10:59:58 UTC
Speaking about tests, they are not executed at all and it would be nice to fix this. BTW what is the reason to disable the tests? Is there some circular dependency? Wouldn't it be better to use the boostrap macro [1]?



[1] https://fedoraproject.org/wiki/Packaging:Guidelines#Bootstrapping

Comment 3 Juan Badia Payno 2017-08-14 10:24:23 UTC
Tests added on the spec file.
The with_test argument is still present but set to 1, to enable the requirements and execute the tests.

Comment 4 Matthias Runge 2017-08-14 11:51:35 UTC
Package Review
==============

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


Issues:
=======
- Package contains Requires: ruby(release).


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

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages

koji scratchbuild: https://koji.fedoraproject.org/koji/taskinfo?taskID=21223848

[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]: 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]: License field in the package spec file matches the actual license.
     Note: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
     Note: Using prebuilt rpms.
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 40960 bytes in 4 files.
[x]: Package complies to the Packaging Guidelines

Note: for the fedora package, please remove the provides: line. I would recommend to add a %if 0%{?fedora} .. %endif around that provides line.

[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 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

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:
[x]: Reviewer should test that the package builds in mock.
https://koji.fedoraproject.org/koji/taskinfo?taskID=21223848

[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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: 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]: 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:
[!]: Gem should use %gem_install macro.
[x]: Specfile should use macros from rubygem-devel package.
     Note: The specfile doesn't use these macros: %doc
     /usr/share/gems/doc/lru_redux-1.1.0,
     /usr/share/gems/specifications/lru_redux-1.1.0.gemspec, %exclude
     /usr/share/gems/cache/lru_redux-1.1.0.gem,
     /usr/share/gems/gems/lru_redux-1.1.0/lib
[x]: Gem package should exclude cached Gem.
[x]: gems should not require rubygems package
[x]: Test suite should not be run by rake.
[x]: Test suite of the library should be run.

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

Generic:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: rubygem-lru_redux-1.1.0-1.el7.src.rpm
rubygem-lru_redux.src: W: spelling-error Summary(en_US) lru -> URL
rubygem-lru_redux.src: W: spelling-error %description -l en_US lru -> URL
rubygem-lru_redux.src: W: non-coherent-filename rubygem-lru_redux-1.1.0-1.el7.src.rpm rubygem-lru_redux-1.1.0-1.el7.centos.src.rpm
1 packages and 0 specfiles checked; 0 errors, 3 warnings.




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


Diff spec file in url and in SRPM
---------------------------------
--- /home/mrunge/review/rubygem-lru_redux.spec	2017-08-14 12:36:12.309952178 +0200
+++ /home/mrunge/review/review-rubygem-lru_redux/srpm-unpacked/rubygem-lru_redux.spec	2017-07-25 09:07:21.000000000 +0200
@@ -5,5 +5,5 @@
 # This will enable test on the future
 # and also added it depdendencies
-%global with_test 1 
+%global with_test 0
 
 Name: rubygem-%{gem_name}
@@ -20,4 +20,7 @@
 %if 0%{?with_test}
 BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(guard-minitest)
+BuildRequires: rubygem(guard)
+BuildRequires: rubygem(rb-inotify)
 BuildRequires: rubygem(timecop) >= 0.7
 BuildRequires: rubygem(timecop) < 1
@@ -70,10 +73,5 @@
 %check
 pushd .%{gem_instdir}
-%if 0%{?with_test}
-ruby -Ilib:test test/cache_test.rb
-ruby -Ilib:test -e "load 'test/cache_test.rb'" -e "load 'test/thread_safe_cache_test.rb'"
-ruby -Ilib:test  -e "load 'test/cache_test.rb'" -e "load 'test/ttl/cache_test.rb'"
-ruby -Ilib:test  -e "load 'test/cache_test.rb'" -e "load 'test/ttl/cache_test.rb'" -e "load 'test/ttl/thread_safe_cache_test.rb'"
-%endif
+
 popd
 


Requires
--------


Provides
--------


Source checksums
----------------
https://rubygems.org/gems/lru_redux-1.1.0.gem :
  CHECKSUM(SHA256) this package     : ee71d0ccab164c51de146c27b480a68b3631d5b4297b8ffe8eda1c72de87affb
  CHECKSUM(SHA256) upstream package : ee71d0ccab164c51de146c27b480a68b3631d5b4297b8ffe8eda1c72de87affb


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -n rubygem-lru_redux -p -D DISTTAG=fc26
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Ruby, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, EPEL5, BATCH, EPEL6




I was looking at the spec file at https://raw.githubusercontent.com/jbadiapa/packages/master/rubygem-lru_redux/rubygem-lru_redux.spec

Package approved.

You can go now and request a new package to be created according to [1]. Please also add the package to RDO; for an example, see here[2]

[1] https://fedoraproject.org/wiki/Infrastructure/WhatHappenedToPkgdb#How_do_I_request_a_new_package_or_a_new_branch
[2] https://review.rdoproject.org/r/#/c/8379/

Comment 5 Matthias Runge 2018-02-05 11:07:13 UTC
Can we close this bug?


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