Bug 1919295 - Review Request: npm-name-cli - Check whether a package or organization name is available on npm
Summary: Review Request: npm-name-cli - Check whether a package or organization name i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-22 14:31 UTC by Ben Beasley
Modified: 2021-03-25 00:17 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-03-25 00:17:55 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Ben Beasley 2021-01-22 14:31:33 UTC
Spec URL: https://gitlab.com/musicinmybrain/npm-name-cli-rpm/-/raw/8fafe02f29a35217780f16897129a570113bf32b/npm-name-cli.spec
SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/9933/60219933/npm-name-cli-3.0.0-1.fc34.src.rpm
Description: 

The npm-name command-line tool checks whether a package or organization name is
available on npm.

Why would I use npm-name rather than npm’s built-in search?

1. Nicer & simpler output
2. Squatter detection (https://github.com/sholladay/squatter)
3. Supports checking the availability of organization names
4. Performance

Fedora Account System Username: music

Note that this package is for Fedora 34+ only, and is under the brand-new Node.js packaging guidelines at https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js. If you are not familiar with the recent significant changes (most notably, bundling of all dependencies), then please read through the guidelines carefully before reviewing. Thanks!

Koji build for F34: https://koji.fedoraproject.org/koji/taskinfo?taskID=60219916

Comment 1 Ben Beasley 2021-01-22 14:32:12 UTC
Comments on rpmlint messages:

npm-name-cli.noarch: E: useless-provides bundled(nodejs-ansi-styles)
[… many similar messages …]

I do not know why rpmlint thinks this is useless, but these are the required virtual Provides for the bundled node dependencies. All node-based RPMs under the new guidelines will have them.

npm-name-cli.noarch: W: only-non-binary-in-usr-lib

All node-based RPMs will have this as well, based on the location of /usr/lib/node_modules/ (%node_sitelib).

npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules/.bin
[… many similar messages …]

Dotfiles under node_modules are normal.

npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/@types/normalize-package-data/package.json
[… many similar messages …]

My view is that blindly attempting to correct the many extra or missing executable bits in bundled node module dependencies is a fool’s errand, more likely to accidentally break something than accomplish anything useful. (I would be willing to chmod a-x all .json files if a reviewer felt strongly about it.)

npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/package-json/node_modules/@sindresorhus/is/dist/example.d.ts

Again, there is no reason to go mucking around inside the bundled dependencies.

npm-name-cli.src: W: no-%build-section

Normal for a node-based RPM; there is nothing to do.

npm-name-cli.src: W: invalid-url Source1: npm-name-cli-3.0.0-nm-prod.tgz

This is the usual bundled dependencies tarball.

Comment 3 Ben Beasley 2021-03-05 23:30:02 UTC
It appears gitlab is serving a 403 error to the fedora-review tool even though the spec URL is otherwise good, perhaps by blocking user-agents not on a whitelist. This is obnoxious. The following URL should work for everyone: https://music.fedorapeople.org/npm-name-cli.spec

Comment 4 Robert-André Mauchin 🐧 2021-03-16 08:53:29 UTC
 - Please don't use Koji to link to SRPM packages as they have a limited duration. Current SRPM is 404. Please reupload it.

Comment 5 Ben Beasley 2021-03-16 14:41:36 UTC
Thanks, updated.

Same spec URL: https://music.fedorapeople.org/npm-name-cli.spec
New SRPM URL:  https://music.fedorapeople.org/npm-name-cli-3.0.0-2.fc33.src.rpm

Comment 6 Robert-André Mauchin 🐧 2021-03-16 16:08:52 UTC
 - Why are node_modules symbolic links to node_modules_prod? Why not put them directly at node_modules?

 - useless-provides:
This package provides 2 times the same capacity. It should only provide it
once.

Apparently the bundled Provides are specified 2 times?

 - Dotfiles under node_modules are normal.

No the various .travis.yml .eslintrc .npmignore .eslintignore etc. should not be shipped

Use "find %{buildroot} -type f  -name '.*' -delete" to find them and delete them

 - npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/org-regex/package.json
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/squatter/node_modules/@szmarczak/http-timer/package.jso
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/node_modules/@szmarczak/http-timer/package.json
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/@types/normalize-package-data/package.json
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/cacheable-lookup/package.json

Use "find %{buildroot} -name "package.json" -executable -type f -exec chmod 0644 '{}' \;" to search for them and remove the exec bits.

 - Remove various empty files shipped.
See https://fedoraproject.org/wiki/Packaging_tricks#Zero_length_files

find %{buildroot} -size 0 -delete



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

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


===== 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: "Unknown or generated", "Expat License", "BSD 3-clause "New" or
     "Revised" License", "*No copyright* Expat License", "ISC License",
     "BSD 2-clause "Simplified" License", "Expat License [generated file]",
     "Apache License 2.0", "*No copyright* Apache License 2.0", "*No
     copyright* [generated file]". 1486 files have unknown license.
     Detailed output of licensecheck in /home/bob/packaging/review/npm-
     name-cli/review-npm-name-cli/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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 1 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 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

===== 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.
[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.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: %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).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: npm-name-cli-3.0.0-2.fc35.noarch.rpm
          npm-name-cli-3.0.0-2.fc35.src.rpm
npm-name-cli.noarch: E: useless-provides bundled(nodejs-ansi-styles)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-cacheable-request)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-chalk)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-color-convert)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-color-name)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-decompress-response)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-defer-to-connect)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-get-stream)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-got)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-has-flag)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-http-cache-semantics)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-json-buffer)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-keyv)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-lowercase-keys)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-map-obj)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-mimic-response)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-normalize-url)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-p-cancelable)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-p-map)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-p-timeout)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-registry-auth-token)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-registry-url)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-responselike)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-safe-buffer)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-supports-color)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-to-readable-stream)
npm-name-cli.noarch: E: useless-provides bundled(nodejs-type-fest)
npm-name-cli.noarch: W: only-non-binary-in-usr-lib
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules/.bin
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/.bin
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/.bin
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/@babel/highlight/node_modules/color-name/.eslintrc.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/@babel/highlight/node_modules/color-name/.npmignore
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/@types/normalize-package-data/package.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/builtins/.travis.yml
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/cacheable-lookup/package.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/.editorconfig
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/.eslintrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/.travis.yml
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/node_modules/@szmarczak/http-timer/package.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/node_modules/json-buffer/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/check-npm-dependents/node_modules/json-buffer/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/clone/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/defaults/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/from2/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/function-bind/.editorconfig
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/function-bind/.eslintrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/function-bind/.jscs.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/function-bind/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/function-bind/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/function-bind/test/.eslintrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-symbol-support-x/.editorconfig
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-symbol-support-x/.eslintignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-symbol-support-x/.eslintrc.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-symbol-support-x/.nvmrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-symbol-support-x/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-symbol-support-x/.uglifyjsrc.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-to-string-tag-x/.editorconfig
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-to-string-tag-x/.eslintignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-to-string-tag-x/.eslintrc.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-to-string-tag-x/.nvmrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-to-string-tag-x/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/has-to-string-tag-x/.uglifyjsrc.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-arrayish/.editorconfig
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-arrayish/.istanbul.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-arrayish/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-arrayish/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-core-module/.eslintignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-core-module/.eslintrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-core-module/.github
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-core-module/.github
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-core-module/.nycrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-object/.eslintignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-object/.eslintrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-object/.nycrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/is-object/.testem.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/isarray/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/isarray/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/json-buffer/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/log-symbols/node_modules/color-name/.eslintrc.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/log-symbols/node_modules/color-name/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/minimist/.travis.yml
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/org-regex/package.json
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/package-json/node_modules/@sindresorhus/is/dist/example.d.ts
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/package-json/node_modules/@sindresorhus/is/dist/source/tests/test.d.ts
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/package-json/node_modules/json-buffer/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/package-json/node_modules/json-buffer/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/package-json/node_modules/registry-auth-token/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/path-parse/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/pump/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/readable-stream/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/.editorconfig
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/.eslintignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/.eslintrc
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/.github
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/.github
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/.eslintrc
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/pathfilter/deep_ref/main.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/baz/doom.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/browser_field/a.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/browser_field/b.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/mug.coffee
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/mug.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/multirepo/packages/package-b/index.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/other_path/lib/other-lib.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/other_path/root.js
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/symlinked/_/node_modules/foo.js
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
npm-name-cli.noarch: E: zero-length /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/shadowed_core/node_modules/util/index.js
npm-name-cli.noarch: E: script-without-shebang /usr/lib/node_modules/npm-name-cli/node_modules_prod/squatter/node_modules/@szmarczak/http-timer/package.json
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/squatter/node_modules/json-buffer/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/squatter/node_modules/json-buffer/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/string_decoder/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/validate-npm-package-name/.npmignore
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/validate-npm-package-name/.nyc_output
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/validate-npm-package-name/.nyc_output
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/validate-npm-package-name/.travis.yml
npm-name-cli.noarch: W: hidden-file-or-dir /usr/lib/node_modules/npm-name-cli/node_modules_prod/wcwidth/.npmignore
npm-name-cli.src: W: strange-permission check-null-licenses 755
npm-name-cli.src: W: no-%build-section
npm-name-cli.src: W: invalid-url Source1: npm-name-cli-3.0.0-nm-prod.tgz
2 packages and 0 specfiles checked; 46 errors, 76 warnings.

Comment 7 Robert-André Mauchin 🐧 2021-03-16 16:52:13 UTC
 - Install the main package's license with %license in %files

Comment 8 Robert-André Mauchin 🐧 2021-03-16 17:10:08 UTC
(In reply to Robert-André Mauchin 🐧 from comment #7)
>  - Install the main package's license with %license in %files

Disregard this.

Comment 9 Ben Beasley 2021-03-16 19:18:10 UTC
>  - Why are node_modules symbolic links to node_modules_prod? Why not put them directly at node_modules?

This is taken directly from the template at https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_using_tarballs_for_bundling. I do not know the original rationale.

-----

>  - useless-provides:
> This package provides 2 times the same capacity. It should only provide it
> once.
> 
> Apparently the bundled Provides are specified 2 times?

See:

> # find node_modules_prod/ -name 'ansi-styles'
> node_modules_prod/log-symbols/node_modules/ansi-styles
> node_modules_prod/ansi-styles
> node_modules_prod/@babel/highlight/node_modules/ansi-styles

> # rpm -q --provides -p /var/lib/mock/fedora-rawhide-x86_64/result/npm-name-cli-3.0.0-2.fc35.noarch.rpm  | grep ansi-styles
> bundled(nodejs-ansi-styles) = 3.2.1
> bundled(nodejs-ansi-styles) = 4.3.0

So some of the bundled dependencies are present in multiple places within the node_modules tree. It’s common for indirect dependencies to be present more than once in node_modules, and even for there to be no single version that would satisfy all of the packages that require a particular dependency.

The bundled dependency gets listed once for each version that is bundled; rpmlint flags this because it did not anticipate anyone wanting to Provide two different versions of the same thing. I’m not sure how version information could be properly recorded without this repetition, but if you think this is not the correct behavior, I think the only recourse would be to raise an issue on https://src.fedoraproject.org/rpms/nodejs-packaging/.

-----

> No the various .travis.yml .eslintrc .npmignore .eslintignore etc. should not be shipped

>  - npm-name-cli.noarch: E: script-without-shebang

>  - Remove various empty files shipped.

I think these are reasonable requests, and I will follow up with a new spec and SRPM implementing them.

I do think there is some question of how much packagers should meddle in the bundled dependencies, and some danger in doing so blindly. For example, the file

> /usr/lib/node_modules/npm-name-cli/node_modules_prod/resolve/test/shadowed_core/node_modules/util/index.js

is part of the tests for resolve, and removing it will break the tests. Now, nobody is going to run the tests on a bundled dependency, so it doesn’t matter if we break them; but I could imagine cases where zero-byte or hidden files really are needed at runtime. It doesn’t look like that is the case for anything here, and I don’t mind combing through the actual files to be sure of it.

Comment 10 Ben Beasley 2021-03-16 19:19:53 UTC
Your feedback on this batch of NodeJS CLI packages as a very experienced reviewer is particularly welcome, by the way. I think these are some of the first submissions under the new NodeJS guidelines, and I am consciously using them to test the guidelines, processes and tooling with some low- to moderate-complexity packages.

Comment 11 Robert-André Mauchin 🐧 2021-03-16 19:25:43 UTC
(In reply to Robert-André Mauchin 🐧 from comment #6)
>  - Why are node_modules symbolic links to node_modules_prod? Why not put
> them directly at node_modules?
> 
OK

>  - useless-provides:
> This package provides 2 times the same capacity. It should only provide it
> once.
> 
> Apparently the bundled Provides are specified 2 times?
> 
Some node modules are bundled with different versions:

rpm -q --provides -p npm-name-cli-3.0.0-2.fc35.noarch.rpm| sort -f
bundled(nodejs-ansi-styles) = 3.2.1
bundled(nodejs-ansi-styles) = 4.3.0

bundled(nodejs-cacheable-request) = 2.1.4
bundled(nodejs-cacheable-request) = 6.1.0
bundled(nodejs-cacheable-request) = 7.0.1

[…]

Comment 12 Ben Beasley 2021-03-16 19:58:02 UTC
Removed zero-length and hidden files from bundled dependencies.

Unset executable bit on non-script files.

Removed hidden directories from prod dependency bundle, except those known to be useful (just .bin, currently).

New spec URL: https://music.fedorapeople.org/npm-name-cli-3.0.0-3/npm-name-cli.spec
New SRPM URL: https://music.fedorapeople.org/npm-name-cli-3.0.0-3/npm-name-cli-3.0.0-3.fc33.src.rpm

Comment 13 Robert-André Mauchin 🐧 2021-03-17 07:08:01 UTC
Excellent, package approved.

Comment 14 Ben Beasley 2021-03-17 10:12:22 UTC
Thanks for the review.

Repository requested: https://pagure.io/releng/fedora-scm-requests/issue/32948

Comment 15 Tomas Hrcka 2021-03-17 10:44:57 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/npm-name-cli

Comment 16 Fedora Update System 2021-03-17 20:19:12 UTC
FEDORA-2021-1a99c26042 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-1a99c26042

Comment 17 Fedora Update System 2021-03-18 21:47:16 UTC
FEDORA-2021-1a99c26042 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-1a99c26042 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-1a99c26042

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 18 Fedora Update System 2021-03-21 02:05:51 UTC
FEDORA-2021-b5fac39aa8 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b5fac39aa8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b5fac39aa8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2021-03-25 00:17:55 UTC
FEDORA-2021-b5fac39aa8 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


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