Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1278154 - Review Request: nodejs-csrf - Primary logic behind csrf tokens
Summary: Review Request: nodejs-csrf - Primary logic behind csrf tokens
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: 1370839 1278150 1278157 1352321
Blocks: nodejs-reviews Node-RED
TreeView+ depends on / blocked
 
Reported: 2015-11-04 19:23 UTC by Jared Smith
Modified: 2017-10-09 19:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-09 19:48:28 UTC
tom: fedora-review+


Attachments (Terms of Use)

Description Jared Smith 2015-11-04 19:23:53 UTC
Spec URL: https://jsmith.fedorapeople.org/Packaging/nodejs-csrf/nodejs-csrf.spec
SRPM URL: https://jsmith.fedorapeople.org/Packaging/nodejs-csrf/nodejs-csrf-3.0.0-1.fc24.src.rpm
Description: Primary logic behind csrf tokens
Fedora Account System Username: jsmith

Comment 1 Tom Hughes 2016-01-02 12:28:51 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: "MIT/X11 (BSD like)", "Unknown or generated". 5 files have
     unknown license. Detailed output of licensecheck in /home/tom/nodejs-
     csrf/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 10240 bytes in 2 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.
[!]: 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]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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


Installation errors
-------------------
INFO: mock.py version 1.2.14 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.14
INFO: Mock Version: 1.2.14
Finish: chroot init
INFO: installing package(s): /home/tom/nodejs-csrf/results/nodejs-csrf-3.0.0-3.fc24.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/compton-rawhide-x86_64/root/ --releasever 24 --setopt=deltarpm=false install /home/tom/nodejs-csrf/results/nodejs-csrf-3.0.0-3.fc24.noarch.rpm


Rpmlint
-------
Checking: nodejs-csrf-3.0.0-3.fc24.noarch.rpm
          nodejs-csrf-3.0.0-3.fc24.src.rpm
nodejs-csrf.noarch: W: only-non-binary-in-usr-lib
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/uid-safe /usr/lib/node_modules/uid-safe
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/base64-url /usr/lib/node_modules/base64-url
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/rndm /usr/lib/node_modules/rndm
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/scmp /usr/lib/node_modules/scmp
nodejs-csrf.src: W: invalid-url Source1: tests-3.0.0.tar.bz2
2 packages and 0 specfiles checked; 0 errors, 6 warnings.




Requires
--------
nodejs-csrf (rpmlib, GLIBC filtered):
    nodejs
    nodejs(engine)
    npm(base64-url)
    npm(rndm)
    npm(scmp)
    npm(uid-safe)



Provides
--------
nodejs-csrf:
    nodejs-csrf
    npm(csrf)



Source checksums
----------------
https://registry.npmjs.org/csrf/-/csrf-3.0.0.tgz :
  CHECKSUM(SHA256) this package     : 5b143da83a7edbe6e2f4a600b0e021200dbcd840523c454dca9d272402030d27
  CHECKSUM(SHA256) upstream package : 5b143da83a7edbe6e2f4a600b0e021200dbcd840523c454dca9d272402030d27


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -m compton-rawhide-x86_64 -rn /home/tom/rpm/SRPMS/nodejs-csrf-3.0.0-3.fc23.src.rpm
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 2 Tom Hughes 2016-01-02 12:30:21 UTC
Spec file in srpm is missing some BRs.

You should probably also add a BR on base64-url as it is required and I assume things are only working because one of the other BRs is dragging it in.

Needs a fixdep for scmp.

Comment 3 Robert-André Mauchin 2017-09-20 10:28:09 UTC
 - Please bump to 3.0.6.

 - Package now depends on nodejs-tsscmp instead of nodejs-scmp:


BuildRequires:	nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:	mocha
BuildRequires:	npm(bluebird)
BuildRequires:	npm(rndm)
BuildRequires:	npm(tsscmp)
BuildRequires:	npm(uid-safe)
%endif


 - Package requires an update of npm(uid-safe) >= 2.1.4 (bug #1370839)

Comment 5 Robert-André Mauchin 2017-10-05 16:31:03 UTC
All good, except:

mixed-use-of-spaces-and-tabs (spaces: line 30, tab: line 6)

Package accepted.

Comment 6 Tom Hughes 2017-10-05 16:33:31 UTC
Hang on - this was assigned to me!

Comment 7 Tom Hughes 2017-10-05 17:29:15 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: "MIT/X11 (BSD like)", "Unknown or generated". 6 files have
     unknown license. Detailed output of licensecheck in /home/tom/1278154
     -nodejs-csrf/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.
[!]: 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 10240 bytes in 2 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.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[-]: 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.4.6 starting (python version = 3.6.2)...
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
INFO: enabled HW Info plugin
Mock Version: 1.4.6
INFO: Mock Version: 1.4.6
Finish: chroot init
INFO: installing package(s): /home/tom/1278154-nodejs-csrf/results/nodejs-csrf-3.0.6-1.fc28.noarch.rpm
ERROR: Command failed: 
 # /usr/bin/dnf --installroot /var/lib/mock/compton-rawhide-x86_64/root/ --releasever 28 --disableplugin=local --setopt=deltarpm=False install /home/tom/1278154-nodejs-csrf/results/nodejs-csrf-3.0.6-1.fc28.noarch.rpm



Rpmlint
-------
Checking: nodejs-csrf-3.0.6-1.fc28.noarch.rpm
          nodejs-csrf-3.0.6-1.fc28.src.rpm
nodejs-csrf.noarch: W: only-non-binary-in-usr-lib
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/rndm /usr/lib/node_modules/rndm
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/scmp /usr/lib/node_modules/scmp
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/tsscmp /usr/lib/node_modules/tsscmp
nodejs-csrf.noarch: W: dangling-symlink /usr/lib/node_modules/csrf/node_modules/uid-safe /usr/lib/node_modules/uid-safe
nodejs-csrf.src:30: W: mixed-use-of-spaces-and-tabs (spaces: line 30, tab: line 6)
nodejs-csrf.src: W: invalid-url Source1: tests-3.0.6.tar.bz2
2 packages and 0 specfiles checked; 0 errors, 7 warnings.




Requires
--------
nodejs-csrf (rpmlib, GLIBC filtered):
    nodejs(engine)
    npm(rndm)
    npm(scmp)
    npm(tsscmp)
    npm(uid-safe)



Provides
--------
nodejs-csrf:
    nodejs-csrf
    npm(csrf)



Source checksums
----------------
https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz :
  CHECKSUM(SHA256) this package     : 5aa732e8d67d45a91e294cca36c9a470638406545ae6c08aef3b32749bab7c02
  CHECKSUM(SHA256) upstream package : 5aa732e8d67d45a91e294cca36c9a470638406545ae6c08aef3b32749bab7c02


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 1278154
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 8 Tom Hughes 2017-10-05 17:30:49 UTC
In addition to the rpmlint warning previously reported there are two dependency issues.

Firstly it has a dependency on npm(scmp) added by fixdep presumably in response to my previous review, but that is no longer needed in the new version.

Second it has a hard dependency on npm(uid-safe) = 2.1.4 but rawhide has 2.1.5 so that will need relaxing.

Comment 10 Tom Hughes 2017-10-05 18:57:48 UTC
Looks good now.

Comment 11 Jared Smith 2017-10-05 19:22:08 UTC
Requested package in ticket https://pagure.io/releng/fedora-scm-requests/issue/2046

Comment 12 Gwyn Ciesla 2017-10-06 12:15:35 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/nodejs-csrf

Comment 13 Jared Smith 2017-10-09 19:48:28 UTC
In rawhide, closing bug


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