Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1279127 - Review Request: nodejs-each - Chained and parallel async iterator in one elegant function
Summary: Review Request: nodejs-each - Chained and parallel async iterator in one eleg...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: nodejs-reviews Node-RED
TreeView+ depends on / blocked
 
Reported: 2015-11-08 00:31 UTC by Jared Smith
Modified: 2016-10-21 08:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-09 22:08:11 UTC
Type: ---
Embargoed:
tom: fedora-review+


Attachments (Terms of Use)

Description Jared Smith 2015-11-08 00:31:13 UTC
Spec URL: https://jsmith.fedorapeople.org/Packaging/nodejs-each/nodejs-each.spec
SRPM URL: https://jsmith.fedorapeople.org/Packaging/nodejs-each/nodejs-each-0.5.2-1.fc24.src.rpm
Description: Chained and parallel async iterator in one elegant function
Fedora Account System Username: jsmith

Comment 1 Jared Smith 2015-11-08 00:34:24 UTC
Tests are currently failing when trying to require the 'coffee-script/register' module.  I'm pretty sure this is a failing in the way that the coffee-script package is done in Fedora (as it's split between coffee-script and coffee-script-common).  If instead you require 'coffee-script/lib/coffee-script/register', then it would work -- but certainly isn't the Node way of requiring that function.

Thoughts?  Disable the tests?  Try to get some symlinks added to the coffee-script package to make this work as-is?

Comment 2 Tom Hughes 2015-11-08 11:20:31 UTC
If it's just a question of adding a missing symlink then I would say sure we should do that - it's what we normally do when moving files out to /usr/share for FHS compliance.

Do you know what the missing link is?

Also, the BR on coffee-script should be outside the enable_tests conditional as it's used in the build.

Comment 3 Tom Hughes 2015-11-08 11:24:05 UTC
Actually the problem is that our coffee-script is too old - register.js doesn't exist until 1.7.0 and we have 1.6.3 currently.

Comment 4 Upstream Release Monitoring 2015-11-08 12:00:30 UTC
gil's scratch build of async-1.4.1-1.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11750811

Comment 5 Tom Hughes 2015-11-08 12:12:04 UTC
I've requested ACLs on coffee-script so I can update it...

Comment 6 Tom Hughes 2015-11-13 20:51:09 UTC
I've built coffee-script 1.10.0 in rawhide now.

Comment 7 NodeJS Packaging SIG 2015-11-14 11:47:31 UTC
(In reply to Tom Hughes from comment #2)
> Do you know what the missing link is?

Your latest package fixes it, so I think we're good on that front.  I've updated my package a bit as well.

Spec URL: https://jsmith.fedorapeople.org/Packaging/nodejs-each/nodejs-each.spec
SRPM URL: https://jsmith.fedorapeople.org/Packaging/nodejs-each/nodejs-each-0.5.2-4.fc24.src.rpm

Unfortunately, I'm still getting the following error in mock when trying to build this package:

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.1TycgF
+ umask 022
+ cd /home/jsmith/Build/BUILD
+ cd package
+ /usr/lib/rpm/nodejs-symlink-deps /usr/lib/node_modules --check
+ NODE_ENV=test
+ mocha --compilers coffee:coffee-script/register --reporter dot


  ․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․

  84 passing (7s)
  1 failing

  1) files should emit if match a directory:
     Error: done() called multiple times
    at Suite.<anonymous> (test/api.files.coffee:53:3)
    at Object.<anonymous> (test/api.files.coffee:5:1)
    at Object.<anonymous> (test/api.files.coffee:2:1)
    at Object.loadFile (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
    at Module.load (/usr/lib/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Array.forEach (native)
    at node.js:929:3
  

Any ideas?  Again, I could just disable the tests, but I'd like to figure out where that error is coming from.

Comment 8 Tom Hughes 2015-11-14 12:46:39 UTC
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: Checking patched sources after %prep for licenses. Licenses
     found: "BSD (3 clause)", "Unknown or generated". 31 files have unknown
     license. Detailed output of licensecheck in /home/tom/1279127-nodejs-
     each/licensecheck.txt
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 71680 bytes in 11 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]: 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]: 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]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[-]: 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]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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]: Sources can be downloaded from URI in Source: tag
[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]: 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:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[x]: Spec file according to URL is the same as in SRPM.


Installation errors
-------------------
INFO: mock.py version 1.2.13 starting (python version = 3.4.3)...
Start: init plugins
INFO: selinux disabled
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
INFO: enabled ccache
Mock Version: 1.2.13
INFO: Mock Version: 1.2.13
Finish: chroot init
INFO: installing package(s): /home/tom/1279127-nodejs-each/results/nodejs-each-0.5.2-4.fc24.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/compton-rawhide-x86_64/root/ --releasever 24 install /home/tom/1279127-nodejs-each/results/nodejs-each-0.5.2-4.fc24.noarch.rpm


Rpmlint
-------
Checking: nodejs-each-0.5.2-4.fc24.noarch.rpm
          nodejs-each-0.5.2-4.fc24.src.rpm
nodejs-each.noarch: W: spelling-error Summary(en_US) async -> sync, a sync
nodejs-each.noarch: W: spelling-error %description -l en_US async -> sync, a sync
nodejs-each.noarch: W: only-non-binary-in-usr-lib
nodejs-each.noarch: W: dangling-symlink /usr/lib/node_modules/each/node_modules/glob /usr/lib/node_modules/glob
nodejs-each.src: W: spelling-error Summary(en_US) async -> sync, a sync
nodejs-each.src: W: spelling-error %description -l en_US async -> sync, a sync
nodejs-each.src:39: W: macro-in-comment %patch0
nodejs-each.src:60: W: macro-in-comment %{_bindir}
nodejs-each.src: W: patch-not-applied Patch0: fix-tests.patch
2 packages and 0 specfiles checked; 0 errors, 9 warnings.




Requires
--------
nodejs-each (rpmlib, GLIBC filtered):
    nodejs
    nodejs(engine)
    npm(glob)



Provides
--------
nodejs-each:
    nodejs-each
    npm(each)



Source checksums
----------------
https://registry.npmjs.org/each/-/each-0.5.2.tgz :
  CHECKSUM(SHA256) this package     : 4e14e817a148617ec3516facc0c0d438ec47b5b072a876dab12ce3d3a39629da
  CHECKSUM(SHA256) upstream package : 4e14e817a148617ec3516facc0c0d438ec47b5b072a876dab12ce3d3a39629da


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -m compton-rawhide-x86_64 -b 1279127
Buildroot used: compton-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 9 Tom Hughes 2015-11-14 12:50:49 UTC
I suspect that test failure is a timing thing - it seems to fail about 1 time in 4 for me.

Obviously there's some noise in the spec that needs cleaning up - the patch that is no longer needed and some commented out lines in %check.

I think "--compilers coffee:coffee-script/register" is the correct mocha option - the version you used is probably a workaround for a breakage in my first version of the 1.10.0 update but if you have -4 the shorter version should work.

Comment 10 Tom Hughes 2015-11-14 12:57:01 UTC
Also there are five tests in that file following the same pattern and it's not always the same one that fails.

Not sure how it can fail unless the each() iterator emits the end signal more than once sometimes? Maybe ask upstream?

Comment 12 Tom Hughes 2015-11-14 12:59:19 UTC
Doesn't seem to be as I can get it to fail with that applied :-(

Comment 14 Tom Hughes 2016-07-03 14:04:58 UTC
I'm still seeing test failures under mock in rawhide:

  1) times concurrent should run nothing 10 times:
      Uncaught AssertionError: expected 1 to equal 0
      + expected - actual
      +0
      -1
      
    at Assertion.fail (/usr/lib/node_modules/should/lib/assertion.js:92:17)
    at Assertion.Object.defineProperty.value (/usr/lib/node_modules/should/lib/assertion.js:164:19)
    at Timeout._onTimeout (test/options.times.coffee:103:32)
  
  2) times concurrent should run an array 10 times:
      Uncaught AssertionError: expected 1 to equal 0
      + expected - actual
      +0
      -1
      
    at Assertion.fail (/usr/lib/node_modules/should/lib/assertion.js:92:17)
    at Assertion.Object.defineProperty.value (/usr/lib/node_modules/should/lib/assertion.js:164:19)
    at Timeout._onTimeout (test/options.times.coffee:103:32)

Comment 15 Tom Hughes 2016-07-04 10:22:21 UTC
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: Checking patched sources after %prep for licenses. Licenses
     found: "BSD (3 clause)", "Unknown or generated". 10 files have unknown
     license. Detailed output of licensecheck in /home/tom/1279127-nodejs-
     each/licensecheck.txt
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 71680 bytes in 9 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]: 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]: 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]: 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.
[!]: 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.
[-]: 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:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[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.5.1)...
Start: init plugins
INFO: selinux disabled
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/tom/1279127-nodejs-each/results/nodejs-each-0.6.1-1.fc25.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/compton-rawhide-x86_64/root/ --releasever 25 --disableplugin=local --setopt=deltarpm=false install /home/tom/1279127-nodejs-each/results/nodejs-each-0.6.1-1.fc25.noarch.rpm


Rpmlint
-------
Checking: nodejs-each-0.6.1-1.fc25.noarch.rpm
          nodejs-each-0.6.1-1.fc25.src.rpm
nodejs-each.noarch: W: spelling-error Summary(en_US) async -> sync, a sync
nodejs-each.noarch: W: spelling-error %description -l en_US async -> sync, a sync
nodejs-each.noarch: W: only-non-binary-in-usr-lib
nodejs-each.noarch: W: dangling-symlink /usr/lib/node_modules/each/node_modules/glob /usr/lib/node_modules/glob
nodejs-each.src: W: spelling-error Summary(en_US) async -> sync, a sync
nodejs-each.src: W: spelling-error %description -l en_US async -> sync, a sync
2 packages and 0 specfiles checked; 0 errors, 6 warnings.




Requires
--------
nodejs-each (rpmlib, GLIBC filtered):
    nodejs(engine)
    npm(glob)



Provides
--------
nodejs-each:
    nodejs-each
    npm(each)



Source checksums
----------------
https://registry.npmjs.org/each/-/each-0.6.1.tgz :
  CHECKSUM(SHA256) this package     : 90ec508df47fc7d9976e525d729456f52bcf3ed3b380bf114cd96dddaa1995ec
  CHECKSUM(SHA256) upstream package : 90ec508df47fc7d9976e525d729456f52bcf3ed3b380bf114cd96dddaa1995ec


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -m compton-rawhide-x86_64 -b 1279127
Buildroot used: compton-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 16 Tom Hughes 2016-07-04 10:23:16 UTC
So the tests seem to be OK this morning which is odd... Maybe a race condition or something.

Anyway it seems OK except that it needs a fixdep on glob as it wants 7.0.0 and we only have 6 (IIRC there are dependency issues updating to 7).

Comment 17 Jared Smith 2016-07-04 17:46:54 UTC
I've tried and tried to get the build to fail, and I can't get it to fail for me either in mock or in Koji scratch builds.  I've added the fixdep for the glob package.

Spec URL: https://jsmith.fedorapeople.org/Packaging/nodejs-each/nodejs-each.spec
SRPM URL: https://jsmith.fedorapeople.org/Packaging/nodejs-each/nodejs-each-0.6.1-2.fc24.src.rpm

Scratch build in Koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=14762526

Comment 18 Tom Hughes 2016-07-04 17:48:18 UTC
Yes I tried on both F24 and Rawhide both inside and outside mock this morning and couldn't get it to fail - no idea what happened yesterday!

Anyway, it looks fine now.

Comment 19 Gwyn Ciesla 2016-07-08 15:04:31 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/nodejs-each


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