Bug 1370096 - Review Request: rubygem-celluloid-essentials - Internally used tools, and superstructural dependencies of Celluloid
Summary: Review Request: rubygem-celluloid-essentials - Internally used tools, and sup...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jun Aruga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1253999
Blocks: 1348005
TreeView+ depends on / blocked
 
Reported: 2016-08-25 10:21 UTC by Germano Massullo
Modified: 2017-02-20 10:38 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-02-20 10:38:55 UTC
Type: Bug
Embargoed:
jaruga: fedora-review?


Attachments (Terms of Use)

Description Germano Massullo 2016-08-25 10:21:42 UTC
Description:
Notifications, Internals, Logging, Probe, and essential Celluloid pieces
demanding Supervision.

spec file: https://germano.fedorapeople.org/package_reviews/rubygem-celluloid-essentials/rubygem-celluloid-essentials.spec

srpm file: https://germano.fedorapeople.org/package_reviews/rubygem-celluloid-essentials/rubygem-celluloid-essentials-0.20.5-1.fc24.src.rpm

FAS name: germano

Comment 1 Germano Massullo 2016-08-25 10:46:45 UTC
I have first packaged rubygem-essentials without having enforced the BuildRequires rubygem-timers version. The build went fine, then I found out that I have missed to add the rubygem-timers version enforcement.
I am waiting for rubygem-timers maintainers to release the 4.1.1 version

Comment 2 Jun Aruga 2016-09-21 15:58:04 UTC
Hi I reviewed it!

# Summary

- Dot files.
  You can do following way to prevenet rpmlint warnings "hidden-file-or-dir",
  removing the lines %{gem_instdir}/.gitmodules, and etc.
  I would recommend you use rpmlint tool by yourself.

```
%files
...
%exclude %{gem_instdir}/.*
...
```

- Group tag 
  Personally I have never added Group in the spec file.
  So, could you tell me why it is needed?

- I think that you can remove the comment out lines "# BuildRequires: *" to simplify
  though it is generated from gem2rpm template.

- Add test logic in %check section.
  Upstream has test logic.
  So, you can add the test logic.
  See https://fedoraproject.org/wiki/Packaging:Ruby#Running_test_suites
  See .travis.yml, spec/, and https://travis-ci.org/celluloid/celluloid-essentials

  I think first step to run the test, is run the upstream test on your local,
  Because of this error.

```
$ git clone git:celluloid/celluloid-essentials.git
$ cd celluloid-essentials/
$ bundle install --path vendor/bundle
[!] There was an error parsing `Gemfile`: cannot load such file -- /home/jaruga/git/celluloid-essentials/culture/sync. Bundler cannot continue.

 #  from /home/jaruga/git/celluloid-essentials/Gemfile:1 
 #  -------------------------------------------
 >  require File.expand_path("../culture/sync", __FILE__)
 #  Celluloid::Sync::Gemfile[self]
 #  -------------------------------------------

```

- %files section
  I want to suggest the way
  - %files: only License document, and minimam files to run the library.
  - %files doc: other documents.

  - %{gem_instdir}/CHANGES.md
    Move to %files doc section with
      %doc %{gem_instdir}/CHANGES.md
  - %{gem_instdir}/tasks
    Move to %files doc





# The result of Fedora review

$ fedora-review -b 1370096





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

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines


===== 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: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[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,
     /usr/share/gems/doc
[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.
[?]: 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]: 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]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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]: 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]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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 rubygem-
     celluloid-essentials-doc
[X]: 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.
[-]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %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:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[!]: When checking ruby code, install the ruby plugin.
[x]: Spec file according to URL is the same as in SRPM.


Installation errors
-------------------
INFO: mock.py version 1.2.18 starting (python version = 3.4.3)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
Mock Version: 1.2.18
INFO: Mock Version: 1.2.18
Finish: chroot init
INFO: installing package(s): /home/jaruga/git/fedora-packages/review/1370096-rubygem-celluloid-essentials/results/rubygem-celluloid-essentials-doc-0.20.5-1.fc26.noarch.rpm /home/jaruga/git/fedora-packages/review/1370096-rubygem-celluloid-essentials/results/rubygem-celluloid-essentials-0.20.5-1.fc26.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 25 --disableplugin=local --setopt=deltarpm=false install /home/jaruga/git/fedora-packages/review/1370096-rubygem-celluloid-essentials/results/rubygem-celluloid-essentials-doc-0.20.5-1.fc26.noarch.rpm /home/jaruga/git/fedora-packages/review/1370096-rubygem-celluloid-essentials/results/rubygem-celluloid-essentials-0.20.5-1.fc26.noarch.rpm --setopt=tsflags=nocontexts


Rpmlint
-------
Checking: rubygem-celluloid-essentials-0.20.5-1.fc26.noarch.rpm
          rubygem-celluloid-essentials-doc-0.20.5-1.fc26.noarch.rpm
          rubygem-celluloid-essentials-0.20.5-1.fc26.src.rpm
rubygem-celluloid-essentials.noarch: W: spelling-error Summary(en_US) superstructural -> super structural, super-structural, superstructure
rubygem-celluloid-essentials.noarch: W: no-documentation
rubygem-celluloid-essentials.noarch: W: hidden-file-or-dir /usr/share/gems/gems/celluloid-essentials-0.20.5/.env-dev
rubygem-celluloid-essentials.noarch: W: hidden-file-or-dir /usr/share/gems/gems/celluloid-essentials-0.20.5/.rspec
rubygem-celluloid-essentials.noarch: W: hidden-file-or-dir /usr/share/gems/gems/celluloid-essentials-0.20.5/.gitmodules
rubygem-celluloid-essentials.noarch: W: hidden-file-or-dir /usr/share/gems/gems/celluloid-essentials-0.20.5/.env-ci
rubygem-celluloid-essentials.src: W: spelling-error Summary(en_US) superstructural -> super structural, super-structural, superstructure
3 packages and 0 specfiles checked; 0 errors, 7 warnings.




Requires
--------
rubygem-celluloid-essentials-doc (rpmlib, GLIBC filtered):
    rubygem-celluloid-essentials

rubygem-celluloid-essentials (rpmlib, GLIBC filtered):
    ruby(rubygems)
    rubygem(timers)



Provides
--------
rubygem-celluloid-essentials-doc:
    rubygem-celluloid-essentials-doc

rubygem-celluloid-essentials:
    rubygem(celluloid-essentials)
    rubygem-celluloid-essentials



Source checksums
----------------
https://rubygems.org/gems/celluloid-essentials-0.20.5.gem :
  CHECKSUM(SHA256) this package     : 3388206d134eaf2ec262f537bbdefb9e855956039888c0f901b2493ece1d97d0
  CHECKSUM(SHA256) upstream package : 3388206d134eaf2ec262f537bbdefb9e855956039888c0f901b2493ece1d97d0


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

Comment 3 Germano Massullo 2016-09-21 16:47:47 UTC
Let's talk first about tests, because I think it is the biggest part to deal with.
If I am right, enabling tests will require all "development dependencies" you can see at [1]. Many of them are not available in Fedora repositories

[1]: https://rubygems.org/gems/celluloid-essentials/versions/0.20.5

Comment 4 Vít Ondruch 2016-09-22 05:49:41 UTC
(In reply to Germano Massullo from comment #3)
> If I am right, enabling tests will require all "development dependencies"
> you can see at [1]. Many of them are not available in Fedora repositories

Well, you probably want to be more precise about what steps you have taken to enable the tests and what issues you were facing.

You will definitely need some of the dependencies, but you won't need most of them. It is also possible, the you will need to do some boostrapping round before you'll be able to enable the tests, but I think it is worth of the effort.

Comment 5 Vít Ondruch 2016-09-22 05:52:32 UTC
BTW from the list of dependencies, I guess that it would be possible to avoid following packages:

benchmark_suite >= 0
bundler >= 0
coveralls >= 0
guard-rspec >= 0
pry >= 0
rake >= 0
rubocop >= 0
transpec >= 0

Not sure about these:

dotenv >= 0
nenv >= 0

The remaining packages might be just circular dependencies with culluloid* packages and RSpec. Not bad IMO.

Comment 6 Jun Aruga 2016-09-22 09:16:00 UTC
(In reply to Germano Massullo from comment #3)
> Let's talk first about tests, because I think it is the biggest part to deal
> with.
> If I am right, enabling tests will require all "development dependencies"
> you can see at [1]. Many of them are not available in Fedora repositories
> 
> [1]: https://rubygems.org/gems/celluloid-essentials/versions/0.20.5

I think enabling tests will not require all "development dependencies", as Vit said.
We do not test about benchmark, coverage, static code analysis (rubocop and etc). We also do not use Bundler for our test in check section.

We want to test the logic, because there is often our environment specified issue.

We sometimes comment out a test case in the test suite with "sed" command, and etc, when it needs a development dependency that is not available in Fedora.

There are some tricky but typical techniques to package RPM.

For reference, you can see "sed" command lines in check section.
http://pkgs.fedoraproject.org/cgit/rpms/rubygem-sprockets.git/tree/rubygem-sprockets.spec
http://pkgs.fedoraproject.org/cgit/rpms/rubygem-puma.git/tree/rubygem-puma.spec


If you want to see more sample spec files about rubygem-*, for example you can search by below search query on Google, to find those.

```
"rubygem-*.git" sed site:pkgs.fedoraproject.org filetype:spec
```

I think the adding test logic in check section may be a hard process for you, especially if you are first time to do it. But after you have experienced several packages, you may be accustomed to do it.

Comment 7 Germano Massullo 2016-09-22 09:27:45 UTC
Ok I will study how to implement tests in celluloid-essentials

Comment 8 Jun Aruga 2017-01-26 12:42:35 UTC
How is the status?

Comment 9 Germano Massullo 2017-01-26 13:59:39 UTC
(In reply to Jun Aruga from comment #8)
> How is the status?

Until the end of the week I should send an email to upstream asking them suggestions on how to proceed because at the moment I could not manage to package a software with those git submodules

Comment 10 Jun Aruga 2017-01-26 16:01:46 UTC
Okay!

Comment 11 Germano Massullo 2017-02-19 09:59:07 UTC
I have just wrote to celluloid developers. I am waiting for a reply

Comment 12 Germano Massullo 2017-02-19 18:30:45 UTC
At
https://groups.google.com/d/msg/celluloid-ruby/q-zj1H34e4A/U2b3uCTXDQAJ
Donovan Keme said "We are expecting to refactor to avoid submodules, but not sure when."

I replied that I will wait for a refactor before trying again to package celluloid.
I think that for the moment we could close the bugreport as "Won't fix" and then in future re-open it to proceed with the packaging.

Comment 13 Jun Aruga 2017-02-20 10:29:39 UTC
Germano,
As you are reporter of this ticket, you can do close the bugreport by yourself.
It's up to you.

Comment 14 Germano Massullo 2017-02-20 10:38:55 UTC
Comment #12


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