Bug 891240

Summary: nodejs-which - A JavaScript implementation of the 'which' command
Product: [Fedora] Fedora Reporter: T.C. Hollingsworth <tchollingsworth>
Component: Package ReviewAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mhroncok, notting, package-review
Target Milestone: ---Flags: mhroncok: fedora‑review+
limburgher: fedora‑cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-17 02:41:10 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 891171, 891175    

Description T.C. Hollingsworth 2013-01-02 04:26:38 EST
Spec: http://patches.fedorapeople.org/npm/nodejs-which.spec
SRPM: http://patches.fedorapeople.org/npm/nodejs-which-1.0.5-2.fc17.src.rpm
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4831124
FAS username: patches

A JavaScript implementation of the 'which' command.

This package is part of the npm stack and a future F19 Feature for Node.js.

This package may depend on other packages in the npm stack that aren't explicitly
listed as dependencies of this bug.  For more information, see bug 891171.

Please use nodejs-0.6.5-3 or later when building or using this package.
Comment 1 T.C. Hollingsworth 2013-01-10 02:55:53 EST
Updated with empty %build sections and other issues found in various reviews.

Spec: http://patches.fedorapeople.org/npm/nodejs-which.spec
SRPM: http://patches.fedorapeople.org/npm/nodejs-which-1.0.5-3.fc17.src.rpm
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4854399
Comment 2 Miro Hrončok 2013-01-10 15:05:08 EST
Summary OK.

TODO: Description might be longer. Consider something as: "This Node.JS module is a JavaScript implementation of the standard Unix 'which' command. It tells you which XXX will be run when you do MAGIC" (I am not familiar with the MAGIC, you might be :P)

MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review.

$ rpmlint ../SRPMS/nodejs-which-1.0.5-3.fc18.src.rpm ../RPMS/noarch/nodejs-which-1.0.5-3.fc18.noarch.rpm
nodejs-which.noarch: W: only-non-binary-in-usr-lib
nodejs-which.noarch: W: dangling-relative-symlink /usr/bin/which.nodejs ../node_modules/bin/which
nodejs-which.noarch: W: no-manual-page-for-binary which.nodejs
2 packages and 0 specfiles checked; 0 errors, 3 warnings.

FIX: Bad symlink: /usr/bin/which.nodejs ../node_modules/bin/which
Should link to ../lib/node_modules/...
I suppose ../lib/node_modules/which/bin/which

TODO: Consider working with upstream to add a manpage.
All others are false positive.

MUST: The package must be named according to the Package Naming Guidelines. OK
MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption. OK
MUST: The package must meet the Packaging Guidelines. OK
MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines. OK
MUST: The License field in the package spec file must match the actual license.

Checked in LICENSE: MIT. OK

MUST: 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 must be included in %doc. OK
MUST: The spec file must be written in American English. OK
MUST: The spec file for the package MUST be legible. OK
MUST: The sources used to build the package must match the upstream source, as provided in the spec URL.

$ sha256sum ../SOURCES/which-1.0.5.tgz 
e26f39d7b152c700636472ab4da57bfb9af17972c49a9e2a06f9ff347d8fad42  ../SOURCES/which-1.0.5.tgz
$ spectool -g nodejs-which.spec 
Getting http://registry.npmjs.org/which/-/which-1.0.5.tgz to ./which-1.0.5.tgz
$ sha256sum which-1.0.5.tgz 
e26f39d7b152c700636472ab4da57bfb9af17972c49a9e2a06f9ff347d8fad42  which-1.0.5.tgz

OK

MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture. OK
MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. OK, builds in mock
MUST: Packages must NOT bundle copies of system libraries. OK
MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory. OK
MUST: A Fedora package must not list a file more than once in the spec file's %files listings. OK
MUST: Permissions on files must be set properly.

$ rpm -q -lv -p ../RPMS/noarch/nodejs-which-1.0.5-3.fc18.noarch.rpm 
lrwxrwxrwx    1 root    root                       25 led 10 20:41 /usr/bin/which.nodejs -> ../node_modules/bin/which
drwxr-xr-x    2 root    root                        0 led 10 20:41 /usr/lib/node_modules/which
drwxr-xr-x    2 root    root                        0 led 10 20:41 /usr/lib/node_modules/which/node_modules
-rw-r--r--    1 root    root                      435 bře  2  2012 /usr/lib/node_modules/which/package.json
-rw-r--r--    1 root    root                     3002 bře  2  2012 /usr/lib/node_modules/which/which.js
drwxr-xr-x    2 root    root                        0 led 10 20:41 /usr/share/doc/nodejs-which-1.0.5
-rw-r--r--    1 root    root                     1092 zář 23  2011 /usr/share/doc/nodejs-which-1.0.5/LICENSE
-rw-r--r--    1 root    root                      199 srp  7  2011 /usr/share/doc/nodejs-which-1.0.5/README.md

Perms OK

FIX: There is no /usr/lib/node_modules/which/bin/which !

MUST: Each package must consistently use macros. OK
MUST: The package must contain code, or permissable content. OK
MUST: If a package includes something as %doc, it must not affect the runtime of the application. OK
MUST: Packages must not own files or directories already owned by other packages. OK
MUST: All filenames in rpm packages must be valid UTF-8. OK

SHOULD: The reviewer should test that the package builds in mock. OK
SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself. OK

Please, solve FIXes and consider solving TODOs.

Package NEEDSWORK.

Additional question:

Is the which.nodejs filename somehow documented, or you've made it up? Wouldn't which-nodejs or nodejs-which be better?
Comment 3 T.C. Hollingsworth 2013-01-15 06:13:58 EST
Ugh, brown paper bag bugs everywhere. :-/

Everything should be fixed now:
Spec: http://patches.fedorapeople.org/npm/nodejs-which.spec
SRPM: http://patches.fedorapeople.org/npm/nodejs-which-1.0.5-3.fc17.src.rpm
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4869846
Comment 4 Miro Hrončok 2013-01-15 14:52:54 EST
> SRPM: http://patches.fedorapeople.org/npm/nodejs-which-1.0.5-3.fc17.src.rpm
You've provided the old link.

Using http://patches.fedorapeople.org/npm/nodejs-which-1.0.5-4.fc17.src.rpm

$ rpmlint ../SRPMS/nodejs-which-1.0.5-4.fc18.src.rpm ../RPMS/noarch/nodejs-which-1.0.5-4.fc18.noarch.rpm
nodejs-which.noarch: W: only-non-binary-in-usr-lib
nodejs-which.noarch: W: dangling-relative-symlink /usr/bin/which-nodejs ../lib/node_modules/bin/which
nodejs-which.noarch: W: no-manual-page-for-binary which-nodejs
2 packages and 0 specfiles checked; 0 errors, 3 warnings.

> FIX: Bad symlink: /usr/bin/which.nodejs ../node_modules/bin/which
Corrected.

$ rpm -q -lv -p ../RPMS/noarch/nodejs-which-1.0.5-4.fc18.noarch.rpm 
lrwxrwxrwx    1 root    root                       29 led 15 20:48 /usr/bin/which-nodejs -> ../lib/node_modules/bin/which
drwxr-xr-x    2 root    root                        0 led 15 20:48 /usr/lib/node_modules/which
drwxr-xr-x    2 root    root                        0 bře  2  2012 /usr/lib/node_modules/which/bin
-rwxr-xr-x    1 root    root                      289 srp  7  2011 /usr/lib/node_modules/which/bin/which
drwxr-xr-x    2 root    root                        0 led 15 20:48 /usr/lib/node_modules/which/node_modules
-rw-r--r--    1 root    root                      435 bře  2  2012 /usr/lib/node_modules/which/package.json
-rw-r--r--    1 root    root                     3002 bře  2  2012 /usr/lib/node_modules/which/which.js
drwxr-xr-x    2 root    root                        0 led 15 20:48 /usr/share/doc/nodejs-which-1.0.5
-rw-r--r--    1 root    root                     1092 zář 23  2011 /usr/share/doc/nodejs-which-1.0.5/LICENSE
-rw-r--r--    1 root    root                      199 srp  7  2011 /usr/share/doc/nodejs-which-1.0.5/README.md

> FIX: There is no /usr/lib/node_modules/which/bin/which !
Corrected.

> Is the which.nodejs filename somehow documented, or you've made it up? Wouldn't which-nodejs or nodejs-which be better?
Changed to which-nodejs.

Package APPROVED.
Comment 5 T.C. Hollingsworth 2013-01-15 18:31:47 EST
New Package SCM Request
=======================
Package Name: nodejs-which
Short Description: A JavaScript implementation of the 'which' command
Owners: patches
Branches: f18 el6
InitialCC:
Comment 6 Jon Ciesla 2013-01-16 07:00:42 EST
Git done (by process-git-requests).
Comment 7 T.C. Hollingsworth 2013-01-17 02:41:10 EST
Built for rawhide:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4876474
Comment 8 Fedora Update System 2013-01-17 03:41:03 EST
nodejs-abbrev-1.0.4-2.fc18, nodejs-ansi-0.1.2-4.fc18, nodejs-async-0.1.22-3.fc18, nodejs-glob-3.1.14-2.fc18, nodejs-inherits-1.0.0-6.fc18, nodejs-graceful-fs-1.1.14-2.fc18, nodejs-minimatch-0.2.9-2.fc18, nodejs-mkdirp-0.3.4-2.fc18, nodejs-mute-stream-0.0.3-3.fc18, nodejs-read-1.0.4-4.fc18, nodejs-read-installed-0.0.4-2.fc18, nodejs-read-package-json-0.1.12-2.fc18, nodejs-retry-0.6.0-2.fc18, nodejs-rimraf-2.1.1-2.fc18, nodejs-slide-1.1.3-4.fc18, nodejs-uid-number-0.0.3-4.fc18, nodejs-sigmund-1.0.0-2.fc18, nodejs-osenv-0.0.3-2.fc18, nodejs-nopt-2.0.0-3.fc18, nodejs-lru-cache-2.2.1-2.fc18, nodejs-mime-1.2.7-2.fc18, nodejs-init-package-json-0.0.7-3.fc18, nodejs-fstream-0.1.21-3.fc18, nodejs-delayed-stream-0.0.5-2.fc18, nodejs-proto-list-1.2.2-2.fc18, nodejs-npm-registry-client-0.2.11-2.fc18, nodejs-form-data-0.0.6-2.fc18, nodejs-which-1.0.5-4.fc18, nodejs-chownr-0.0.1-6.fc18, nodejs-opts-1.2.2-2.fc18, nodejs-yamlish-0.0.5-1.fc18, nodejs-once-1.1.1-2.fc18, nodejs-lockfile-0.2.1-2.fc18, nodejs-ini-1.0.5-2.fc18, nodejs-couch-login-0.1.15-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2013-0775/nodejs-abbrev-1.0.4-2.fc18,nodejs-ansi-0.1.2-4.fc18,nodejs-async-0.1.22-3.fc18,nodejs-glob-3.1.14-2.fc18,nodejs-inherits-1.0.0-6.fc18,nodejs-graceful-fs-1.1.14-2.fc18,nodejs-minimatch-0.2.9-2.fc18,nodejs-mkdirp-0.3.4-2.fc18,nodejs-mute-stream-0.0.3-3.fc18,nodejs-read-1.0.4-4.fc18,nodejs-read-installed-0.0.4-2.fc18,nodejs-read-package-json-0.1.12-2.fc18,nodejs-retry-0.6.0-2.fc18,nodejs-rimraf-2.1.1-2.fc18,nodejs-slide-1.1.3-4.fc18,nodejs-uid-number-0.0.3-4.fc18,nodejs-sigmund-1.0.0-2.fc18,nodejs-osenv-0.0.3-2.fc18,nodejs-nopt-2.0.0-3.fc18,nodejs-lru-cache-2.2.1-2.fc18,nodejs-mime-1.2.7-2.fc18,nodejs-init-package-json-0.0.7-3.fc18,nodejs-fstream-0.1.21-3.fc18,nodejs-delayed-stream-0.0.5-2.fc18,nodejs-proto-list-1.2.2-2.fc18,nodejs-npm-registry-client-0.2.11-2.fc18,nodejs-form-data-0.0.6-2.fc18,nodejs-which-1.0.5-4.fc18,nodejs-chownr-0.0.1-6.fc18,nodejs-opts-1.2.2-2.fc18,nodejs-yamlish-0.0.5-1.fc18,nodejs-once-1.1.1-2.fc18,nodejs-lockfile-0.2.1-2.fc18,nodejs-ini-1.0.5-2.fc18,nodejs-couch-login-0.1.15-2.fc18
Comment 9 Fedora Update System 2013-04-05 19:12:45 EDT
node-gyp-0.9.1-2.fc18, nodejs-async-0.2.6-1.fc18, nodejs-chmodr-0.1.0-2.fc18, nodejs-fstream-npm-0.1.4-1.fc18, nodejs-glob-3.1.21-1.fc18, nodejs-minimatch-0.2.11-1.fc18, nodejs-mkdirp-0.3.5-1.fc18, nodejs-npm-registry-client-0.2.18-2.fc18, nodejs-read-package-json-0.2.2-1.fc18, nodejs-request-2.14.0-1.fc18, nodejs-semver-1.1.4-1.fc18, npm-1.2.14-2.fc18, nodejs-abbrev-1.0.4-2.fc18, nodejs-ansi-0.1.2-4.fc18, nodejs-inherits-1.0.0-6.fc18, nodejs-mute-stream-0.0.3-3.fc18, nodejs-read-1.0.4-4.fc18, nodejs-retry-0.6.0-2.fc18, nodejs-slide-1.1.3-4.fc18, nodejs-uid-number-0.0.3-4.fc18, nodejs-sigmund-1.0.0-2.fc18, nodejs-osenv-0.0.3-2.fc18, nodejs-init-package-json-0.0.7-3.fc18, nodejs-delayed-stream-0.0.5-2.fc18, nodejs-proto-list-1.2.2-2.fc18, nodejs-which-1.0.5-4.fc18, nodejs-chownr-0.0.1-6.fc18, nodejs-opts-1.2.2-2.fc18, nodejs-once-1.1.1-2.fc18, nodejs-couch-login-0.1.15-2.fc18, nodejs-archy-0.0.2-5.fc18, nodejs-block-stream-0.0.6-4.fc18, nodejs-npmlog-0.0.2-2.fc18, nodejs-opener-1.3.0-4.fc18, nodejs-tobi-cookie-0.3.2-2.fc18, nodejs-promzard-0.2.0-3.fc18, nodejs-combined-stream-0.0.4-1.fc18, nodejs-config-chain-1.1.5-1.fc18, nodejs-fstream-0.1.22-1.fc18, nodejs-fstream-ignore-0.0.6-1.fc18, nodejs-graceful-fs-1.2.0-1.fc18, nodejs-ini-1.1.0-1.fc18, nodejs-lockfile-0.3.0-1.fc18, nodejs-lru-cache-2.2.2-1.fc18, nodejs-mime-1.2.9-1.fc18, nodejs-nopt-2.1.1-1.fc18, nodejs-npmconf-0.0.23-1.fc18, nodejs-read-installed-0.1.1-1.fc18, nodejs-rimraf-2.1.4-1.fc18, nodejs-tar-0.1.16-1.fc18, nodejs-form-data-0.0.7-1.fc18 has been pushed to the Fedora 18 stable repository.