Bug 891194

Summary: nodejs-graceful-fs - 'fs' module with incremental back-off on EMFILE
Product: [Fedora] Fedora Reporter: T.C. Hollingsworth <tchollingsworth>
Component: Package ReviewAssignee: Michael Scherer <misc>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: misc, notting, package-review
Target Milestone: ---Keywords: Reopened
Target Release: ---Flags: misc: fedora‑review+
limburgher: fedora‑cvs+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-13 06:45:58 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 891171, 891175, 891190, 891193, 891215    

Description T.C. Hollingsworth 2013-01-02 03:21:25 EST
Spec: http://patches.fedorapeople.org/npm/nodejs-graceful-fs.spec
SRPM: http://patches.fedorapeople.org/npm/nodejs-graceful-fs-1.1.14-1.fc17.src.rpm
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4830983
FAS username: patches

Just like node.js' fs module, but it does an incremental back-off when EMFILE is
encountered.  Useful in asynchronous situations where one needs to try to open
lots and lots of files.

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 Michael Scherer 2013-01-06 13:13:55 EST
Package Review
==============

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


Issues:
=======
- non regression tests should be run

- no need for BuildRoot, %clean, etc

===== 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]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[!]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
     Note: rm -rf %{buildroot} present but not required
[x]: Sources contain only permissible code or content.
[!]: Each %files section contains %defattr if rpm < 4.4
     Note: %defattr present but not needed
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package requires other packages for directories it uses.
[x]: Package uses nothing in %doc for runtime.
[x]: Package is not known to require ExcludeArch.
[x]: Package complies to the Packaging Guidelines
[x]: Package consistently uses macro is (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]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[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]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 10240 bytes in 2 files.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: Spec file lacks Packager, Vendor, PreReq tags.
[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 %doc.
[x]: Package is named using only allowed ASCII characters.
[x]: Package do not use a name that already exist
[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
[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).

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

Generic:
[!]: Buildroot is not present
     Note: Buildroot: present but not needed
[!]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
     Note: %clean present but not required
[-]: 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]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define.

===== EXTRA items =====

Generic:
[x]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.
[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: nodejs-graceful-fs-1.1.14-1.fc19.noarch.rpm
nodejs-graceful-fs.noarch: W: spelling-error %description -l en_US js -> dis, ks, j
nodejs-graceful-fs.noarch: W: only-non-binary-in-usr-lib
1 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint nodejs-graceful-fs
nodejs-graceful-fs.noarch: W: spelling-error %description -l en_US js -> dis, ks, j
nodejs-graceful-fs.noarch: W: only-non-binary-in-usr-lib
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
# echo 'rpmlint-done:'



Requires
--------
nodejs-graceful-fs (rpmlib, GLIBC filtered):
    nodejs(engine)



Provides
--------
nodejs-graceful-fs:
    nodejs-graceful-fs
    npm(graceful-fs)



MD5-sum check
-------------
http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz :
  CHECKSUM(SHA256) this package     : fbed47bb2087293335411bf558244d1a5ccad62417f075216c05fc499d8bf126
  CHECKSUM(SHA256) upstream package : fbed47bb2087293335411bf558244d1a5ccad62417f075216c05fc499d8bf126


Generated by fedora-review 0.2.0 (Unknown) last change: Unknown
Buildroot used: fedora-rawhide-x86_64
Command line :./try-fedora-review -m fedora-rawhide-x86_64 -b 891194
Comment 2 T.C. Hollingsworth 2013-01-06 17:51:31 EST
(In reply to comment #1)
> Package Review

Thanks for taking this!

> Issues:
> =======
> - non regression tests should be run

Tests aren't currently run due on most Node.js modules to the lack of the TAP testing framework being packaged for Fedora.  (That's next on my to-do list.)  If you want this to be a review blocker we'd have to get that and its dep chain into Fedora first.  Otherwise I intend to enable %check for all the modules I can as soon as its in, and some specs already have commented out sections ready to go.

> - no need for BuildRoot, %clean, etc

Do we really have to kill off the EL5isms just yet?  I haven't entirely discounted supporting EL5 and I traditionally supported it when I was maintaining my own repo.

I might add that I used the 'minimal' spec template from rpmdev-newspec as a starting point for the spec template for my npm2rpm tool, and that still includes these constructs.

Also, I don't get why fedora-review makes this a MUST item, as the Fedora Packaging Guidelines still specifically *permit* these constructs in modern Fedora packages for those of us who want to maintain spec compatibility with EL5.

> 
> Rpmlint
> -------
> Checking: nodejs-graceful-fs-1.1.14-1.fc19.noarch.rpm
> nodejs-graceful-fs.noarch: W: spelling-error %description -l en_US js ->
> dis, ks, j

False positive, used in "Node.js".

> nodejs-graceful-fs.noarch: W: only-non-binary-in-usr-lib

Pure-JavaScript Node modules are installed in /usr/lib, consistent with both upstream and other interpreted languages in the distribution (such as Python and Ruby).

> 1 packages and 0 specfiles checked; 0 errors, 2 warnings.
Comment 3 Michael Scherer 2013-01-06 19:09:40 EST
> Tests aren't currently run due on most Node.js modules to the lack of the TAP > testing framework being packaged for Fedora.

I didn't found nodejs-tap, but I thought this was because it was in bundle of nodejs-devel. I do not want to block on it, but given the number of packages, it is IMHO easier to do it right now, than go back later and enable it on every packages.

> Do we really have to kill off the EL5isms just yet?

For EL5ism, I am in the camp of those thinking that we should start to clean now if we want to get ride of them in 2020, rather than starting to get ride once EL5 is really dead in 2020.

I will not fight for this ( especially since packagers can perfectly add them back later after the review ), but I would really prefer to have people submitting packages for rawhide to be as warning free as possible on fedora-review, based on the current rawhide. Each time spent cleaning the report of f-r is time not spend on others packages review. And each subtlity added is adding to the work of review, and I think we should simplify and enforce the best practice.

> Pure-JavaScript Node modules are installed in /usr/lib, consistent with both 
> upstream and other interpreted languages in the distribution (such as Python > and Ruby).

Ruby place gems in /usr/share/, and python should permit to use /usr/share for python 3.3 ( IIRC what a upstream told me a few months ago ). In fact, we have here a conflict between "follow the FHS" and "follow upstream", but I do not think this is the place or time to solve it, so for now, let's follow upstream. I think however that suggesting to upstream to support the FHS would be nice ( ie, support /usr/lib and /usr/share ). I guess once a node-sig is created, that would be a nice starter for discussion :)
Comment 4 T.C. Hollingsworth 2013-01-07 00:38:51 EST
(In reply to comment #3)
> > Tests aren't currently run due on most Node.js modules to the lack of the TAP > testing framework being packaged for Fedora.
> 
> I didn't found nodejs-tap, but I thought this was because it was in bundle
> of nodejs-devel. I do not want to block on it, but given the number of
> packages, it is IMHO easier to do it right now, than go back later and
> enable it on every packages.

My primary motivation for waiting on TAP/%check is so that Koji/mock can continue to build these packages.  If I were to package TAP and add the necessary BuildRequires, mock/Koji won't be able to build most packages until the necessary packages are included in the distribution.

If that's fine by everyone, I'll gladly do the packaging work and add %check sections to all my specs.

> > Do we really have to kill off the EL5isms just yet?
> 
> For EL5ism, I am in the camp of those thinking that we should start to clean
> now if we want to get ride of them in 2020, rather than starting to get ride
> once EL5 is really dead in 2020.

I wouldn't be the slightest bit surprised if some provenpackager already has a script ready to strip these project-wide as soon as they can. ;-)

> I will not fight for this ( especially since packagers can perfectly add
> them back later after the review ), but I would really prefer to have people
> submitting packages for rawhide to be as warning free as possible on
> fedora-review, based on the current rawhide. Each time spent cleaning the
> report of f-r is time not spend on others packages review. And each subtlity
> added is adding to the work of review, and I think we should simplify and
> enforce the best practice.

I appreciate this, but several members of the Node.js community have expressed strong interest in EL5 support, so I'd like to continue to make it as easy as possible to support them for the time being.  (And believe me, *nobody* wants to see EL5 die more than the sysadmins still stuck supporting it.  ;-)

> > Pure-JavaScript Node modules are installed in /usr/lib, consistent with both 
> > upstream and other interpreted languages in the distribution (such as Python > and Ruby).
> 
> Ruby place gems in /usr/share/, and python should permit to use /usr/share
> for python 3.3 ( IIRC what a upstream told me a few months ago ). In fact,
> we have here a conflict between "follow the FHS" and "follow upstream", but
> I do not think this is the place or time to solve it, so for now, let's
> follow upstream. I think however that suggesting to upstream to support the
> FHS would be nice ( ie, support /usr/lib and /usr/share ). I guess once a
> node-sig is created, that would be a nice starter for discussion :)

I don't understand how using /usr/lib for this violates the FHS.  It says "/usr/lib includes object files, libraries, and internal binaries that are not intended to be executed directly by users or shell scripts" and these are clearly libraries, even though they aren't binary.

I see the utility in a binary-only /usr/lib, but I also really don't see that happening, considering there's a strong movement to move non-binary default system configuration (such as systemd units) to /usr/lib, and they seem to be making more progress than those trying to move interpreted language code out of /usr/lib thus far.

So, I won',t be joining the fight to move stuff to /usr/share, but I won't stand in the way either.  :-)
Comment 5 Michael Scherer 2013-01-07 06:39:08 EST
Ok so since the 2 items have been cleared, I guess i can approve the package and come back haunt people later for the test and EL5isms.

For /usr/share vs /usr/lib, that's also for 32/64 bits support, or various multiarch stuff ( see what debian has done, which is quite good ), and so forcing noarch stuff in /usr/share permit to keep space usage low. Adding also various exception to a simple rule make things more complex.
Comment 6 T.C. Hollingsworth 2013-01-07 19:37:59 EST
At least the tests are on my todo list as soon as TAP is in Fedora, so you shouldn't have to come back and haunt me for it.  :-)

Thanks for the prompt review!
Comment 7 T.C. Hollingsworth 2013-01-07 19:39:30 EST
New Package SCM Request
=======================
Package Name: nodejs-graceful-fs
Short Description: 'fs' module with incremental back-off on EMFILE
Owners: patches
Branches: f18 el6
InitialCC:
Comment 8 Gwyn Ciesla 2013-01-08 08:42:06 EST
Git done (by process-git-requests).
Comment 9 T.C. Hollingsworth 2013-01-10 03:19:05 EST
Built for rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=4854434
Comment 10 T.C. Hollingsworth 2013-01-10 03:27:03 EST
Builds are failing due to a missing epoch in a nodejs update I pushed earlier.  I'll retry tomorrow.
Comment 11 T.C. Hollingsworth 2013-01-13 06:45:58 EST
Built for rawhide:
http://koji.fedoraproject.org/koji/taskinfo?taskID=4864299
Comment 12 Fedora Update System 2013-01-13 07:50:43 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 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/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
Comment 13 Fedora Update System 2013-01-17 03:52: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 14 Fedora Update System 2013-04-05 19:14:39 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.