Bug 1329668 - Review Request: nodejs-rhea -reactive AMQP 1.0 library.
Summary: Review Request: nodejs-rhea -reactive AMQP 1.0 library.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Irina Boverman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-22 14:22 UTC by Irina Boverman
Modified: 2016-08-23 05:43 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-08-14 16:02:32 UTC
Type: ---
Embargoed:
iboverma: fedora-review+


Attachments (Terms of Use)

Description Irina Boverman 2016-04-22 14:22:30 UTC
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/irina/nodejs-rhea/fedora-rawhide-x86_64/00179937-nodejs-rhea/
Description: A reactive library for the AMQP protocol, for easy development of both clients and servers.
Fedora Account System Username: Irina

Comment 1 Irina Boverman 2016-05-03 15:10:58 UTC
Rebased to 0.1.2.
Added %check section and tests.
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/irina/nodejs-rhea/fedora-rawhide-x86_64/00183010-nodejs-rhea/

Output of rpmlint:

$ rpmlint -i nodejs-rhea-0.1.2-1.fc25.noarch.rpm

nodejs-rhea.noarch: E: devel-dependency nodejs-debug
Your package has a dependency on a devel package but it's not a devel package
itself.

nodejs-rhea.noarch: W: only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.

nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/ca-cert.pem
Shipping a PEM certificate is likely wrong. If used for the default
configuration, this is insecure ( since the certificate is public ). If this
is used for validation, ie a CA certificate store, then this must be kept up
to date due to CA compromise. The only valid reason is for testing purpose, so
ignore this warning if this is the case.

nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/server-cert.pem
Shipping a PEM certificate is likely wrong. If used for the default
configuration, this is insecure ( since the certificate is public ). If this
is used for validation, ie a CA certificate store, then this must be kept up
to date due to CA compromise. The only valid reason is for testing purpose, so
ignore this warning if this is the case.

nodejs-rhea.noarch: W: pem-certificate /usr/lib/node_modules/rhea/test/server-cert.pem
Shipping a PEM certificate is likely wrong. If used for the default
configuration, this is insecure ( since the certificate is public ). If this
is used for validation, ie a CA certificate store, then this must be kept up
to date due to CA compromise. The only valid reason is for testing purpose, so
ignore this warning if this is the case.

nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/client-cert.pem
Shipping a PEM certificate is likely wrong. If used for the default
configuration, this is insecure ( since the certificate is public ). If this
is used for validation, ie a CA certificate store, then this must be kept up
to date due to CA compromise. The only valid reason is for testing purpose, so
ignore this warning if this is the case.

nodejs-rhea.noarch: W: pem-certificate /usr/lib/node_modules/rhea/test/ca-cert.pem
Shipping a PEM certificate is likely wrong. If used for the default
configuration, this is insecure ( since the certificate is public ). If this
is used for validation, ie a CA certificate store, then this must be kept up
to date due to CA compromise. The only valid reason is for testing purpose, so
ignore this warning if this is the case.

nodejs-rhea.noarch: W: pem-certificate /usr/lib/node_modules/rhea/test/client-cert.pem
Shipping a PEM certificate is likely wrong. If used for the default
configuration, this is insecure ( since the certificate is public ). If this
is used for validation, ie a CA certificate store, then this must be kept up
to date due to CA compromise. The only valid reason is for testing purpose, so
ignore this warning if this is the case.

nodejs-rhea.noarch: W: dangling-symlink /usr/lib/node_modules/rhea/node_modules/debug /usr/lib/node_modules/debug
The target of the symbolic link does not exist within this package or its file
based dependencies.  Verify spelling of the link target and that the target is
included in a package in this package's dependency chain.

1 packages and 0 specfiles checked; 1 errors, 8 warnings.

Not sure if I need to do anything about them...

Alan, Gordon, what do you think?

Comment 2 Alan Conway 2016-05-03 18:14:18 UTC
(In reply to Irina Boverman from comment #1)
> nodejs-rhea.noarch: E: devel-dependency nodejs-debug
> Your package has a dependency on a devel package but it's not a devel package
> itself.

Possibly we need a separate devel and runtime package. Examples, developer doc, debugging tools and tests should not be part of a runtime package. However nodejs conventions may override here - Gordon's call.

> nodejs-rhea.noarch: W: only-non-binary-in-usr-lib
> There are only non binary files in /usr/lib so they should be in /usr/share.
> 
> nodejs-rhea.noarch: W: pem-certificate
> /usr/share/doc/nodejs-rhea/examples/tls/ca-cert.pem
> Shipping a PEM certificate is likely wrong. If used for the default
> configuration, this is insecure ( since the certificate is public ). If this
> is used for validation, ie a CA certificate store, then this must be kept up
> to date due to CA compromise. The only valid reason is for testing purpose,
> so
> ignore this warning if this is the case.

example/doc/tests are not normally allowed in runtime packages, so again maybe a seprate -devel package?

> /usr/lib/node_modules/rhea/test/server-cert.pem
> Shipping a PEM certificate is likely wrong. If used for the default
> configuration, this is insecure ( since the certificate is public ). If this
> is used for validation, ie a CA certificate store, then this must be kept up
> to date due to CA compromise. The only valid reason is for testing purpose,
> so
> ignore this warning if this is the case.

Again tests in a runtime package is very strange, but maybe normal in the nodejs world. Suggest digging around a few popular nodejs RPMs to see what is normal.
 
> nodejs-rhea.noarch: W: dangling-symlink
> /usr/lib/node_modules/rhea/node_modules/debug /usr/lib/node_modules/debug

Delete the symlink, that is just an error.

> Alan, Gordon, what do you think?

Comment 5 Irina Boverman 2016-05-06 15:00:09 UTC
Removed tests from RPM:
https://copr.fedorainfracloud.org/coprs/irina/nodejs-rhea/packages/

About *broken* symlink, it is not broken, when dependencies are installed, the symlink resolves correctly:

ls -l /usr/lib/node_modules/rhea/node_modules/debug
lrwxrwxrwx. 1 root root 27 May  6 10:11 /usr/lib/node_modules/rhea/node_modules/debug -> /usr/lib/node_modules/debug

ls -l /usr/lib/node_modules/debug
total 24
-rw-r--r--. 1 root root 3763 May  9  2015 browser.js
-rw-r--r--. 1 root root 4096 Aug 20  2014 debug.js
-rw-r--r--. 1 root root 4758 Mar 13  2015 node.js
drwxr-xr-x. 2 root root 4096 Apr 21 16:46 node_modules
-rw-r--r--. 1 root root  684 May 10  2015 package.json

I checked other nodejs packages, they have the same issue reported by rpmlint.

For example:

# rpmlint nodejs-debug

nodejs-debug.noarch: W: only-non-binary-in-usr-lib
nodejs-debug.noarch: W: dangling-symlink /usr/lib/node_modules/debug/node_modules/ms /usr/lib/node_modules/ms
1 packages and 0 specfiles checked; 0 errors, 4 warnings.

Latest rpmlint result:

# rpmlint nodejs-rhea
nodejs-rhea.noarch: E: devel-dependency nodejs-debug
nodejs-rhea.noarch: W: only-non-binary-in-usr-lib
nodejs-rhea.noarch: W: dangling-symlink /usr/lib/node_modules/rhea/node_modules/debug /usr/lib/node_modules/debug
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/ca-cert.pem
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/client-cert.pem
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/server-cert.pem
1 packages and 0 specfiles checked; 1 errors, 5 warnings.

The spec file has these "requires":

BuildRequires:  nodejs-packaging
BuildRequires:  nodejs-debug
BuildRequires:  mocha
Requires:       nodejs-debug

Comment 13 Alan Conway 2016-05-11 13:54:21 UTC
Agreed, I can't see why it is considered a devel package except maybe over-enthusiastic pattern matching on "debug".

(In reply to Irina Boverman from comment #6)
> If I use nodejs-rhea-devel package name instead of nodejs-rhea, these is no
> longer this error:
> nodejs-rhea.noarch: E: devel-dependency nodejs-debug
> 
> But I think nodejs-rhea is correct, as it provides run time dependencies for
> client applications.

Stick with nodejs-rhea and ignore the devel-dependency error.

Comment 14 Alan Conway 2016-05-19 21:18:33 UTC
Package review below. There is one minor issue: the LICENSE file should be marked %license in the spec file, not %doc.

One other minor thing: I think the requirement for npm 2.0.0 might be needlessly high. I'm on fedora 23 with npm-1.3.6-8.fc23.noarch, things seemed to work. Unless there's a definite reason for putting the dependency so high, it might be worth lowering.

Otherwise I consider this a PASS.

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

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


Issues:
=======
- 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.
  Note: License file LICENSE is not marked as %license
  See:
  http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text


===== 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: "Apache (v2.0)", "Unknown or generated", "*No copyright* Apache
     (v2.0)". 2 files have unknown license. Detailed output of licensecheck
     in /home/aconway/fedora/review/nodejs-rhea/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.
[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.
[-]: 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 133120 bytes in 38 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]: 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]: 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.
[x]: 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:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: nodejs-rhea-0.1.2-2.fc25.noarch.rpm
          nodejs-rhea-0.1.2-2.fc25.src.rpm
nodejs-rhea.noarch: E: devel-dependency nodejs-debug
nodejs-rhea.noarch: W: only-non-binary-in-usr-lib
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/ca-cert.pem
nodejs-rhea.noarch: W: dangling-symlink /usr/lib/node_modules/rhea/node_modules/debug /usr/lib/node_modules/debug
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/server-cert.pem
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/client-cert.pem
2 packages and 0 specfiles checked; 1 errors, 5 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
nodejs-rhea.noarch: E: devel-dependency nodejs-debug
nodejs-rhea.noarch: W: only-non-binary-in-usr-lib
nodejs-rhea.noarch: W: dangling-symlink /usr/lib/node_modules/rhea/node_modules/debug /usr/lib/node_modules/debug
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/server-cert.pem
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/ca-cert.pem
nodejs-rhea.noarch: W: pem-certificate /usr/share/doc/nodejs-rhea/examples/tls/client-cert.pem
1 packages and 0 specfiles checked; 1 errors, 5 warnings.



Requires
--------
nodejs-rhea (rpmlib, GLIBC filtered):
    nodejs(engine)
    nodejs-debug
    npm(debug)



Provides
--------
nodejs-rhea:
    nodejs-rhea
    npm(rhea)



Source checksums
----------------
https://registry.npmjs.org/rhea/-/rhea-0.1.2.tgz :
  CHECKSUM(SHA256) this package     : c4ccc82bddb1b32b49108ab3577baaa373fd93244db5101e0555db209d5df948
  CHECKSUM(SHA256) upstream package : c4ccc82bddb1b32b49108ab3577baaa373fd93244db5101e0555db209d5df948


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review --rpm-spec -n nodejs-rhea-0.1.2-2.fc25.src.rpm
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 17 Gwyn Ciesla 2016-05-26 19:23:45 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/nodejs-rhea


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