Bug 732216 - Review Request: coffee-script - A programming language that transcompiles to JavaScript
Summary: Review Request: coffee-script - A programming language that transcompiles to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 732552 894725
Blocks: 891461
TreeView+ depends on / blocked
 
Reported: 2011-08-20 22:41 UTC by T.C. Hollingsworth
Modified: 2013-07-08 20:08 UTC (History)
4 users (show)

Fixed In Version: coffee-script-1.6.3-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-05 23:04:55 UTC
dcallagh: fedora-review+
kevin: fedora-cvs+


Attachments (Terms of Use)

Description T.C. Hollingsworth 2011-08-20 22:41:37 UTC
Spec URL: http://www.u.arizona.edu/~tchol/fedora/coffeescript.spec
SRPM URL: http://www.u.arizona.edu/~tchol/fedora/coffeescript-1.1.2-1.fc15.src.rpm
Description:
CoffeeScript is a little language that compiles into JavaScript. Underneath all
of those embarrassing braces and semicolons, JavaScript has always had a
gorgeous object model at its heart. CoffeeScript is an attempt to expose the
good parts of JavaScript in a simple way.

The golden rule of CoffeeScript is: "It's just JavaScript". The code compiles
one-to-one into the equivalent JS, and there is no interpretation at runtime.
You can use any existing JavaScript library seamlessly (and vice-versa). The
compiled output is readable and pretty-printed, passes through JavaScript Lint
without warnings, will work in every JavaScript implementation, and tends to run
as fast or faster than the equivalent handwritten JavaScript.

Comment 1 T.C. Hollingsworth 2011-08-20 23:10:54 UTC
$ rpmlint SPECS/coffeescript.spec 
SPECS/coffeescript.spec:64: W: libdir-macro-in-noarch-package (main package) %{_libdir}/../coffee-script
SPECS/coffeescript.spec:65: W: libdir-macro-in-noarch-package (main package) %{_libdir}/../lib/nodejs/coffee-script
SPECS/coffeescript.spec: W: invalid-url Source0: jashkenas-coffee-script-1.1.2-0-g1a652a9.tar.gz
0 packages and 1 specfiles checked; 0 errors, 3 warnings.


$ rpmlint RPMS/noarch/coffeescript-1.1.2-1.fc15.noarch.rpm 
coffeescript.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
coffeescript.noarch: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
coffeescript.noarch: W: spelling-error %description -l en_US versa -> avers, verse, verso
coffeescript.noarch: W: only-non-binary-in-usr-lib
coffeescript.noarch: W: no-manual-page-for-binary cake
coffeescript.noarch: W: no-manual-page-for-binary coffee
1 packages and 0 specfiles checked; 0 errors, 6 warnings.

Comment 2 T.C. Hollingsworth 2011-10-24 23:00:13 UTC
Closing all Node.js-related reviews per bug 732552.

Comment 3 Dan Callaghan 2013-01-09 22:13:10 UTC
TC, would you consider reviving this review request given that node is now going to land in Fedora?

Comment 5 Dan Callaghan 2013-01-23 07:08:08 UTC
Great, thanks!

I can take this review. At first glance everything looks good. I will brush up on Node packaging guidelines tomorrow and then do a proper review.

Comment 6 Dan Callaghan 2013-01-23 07:12:10 UTC
One question... could you consider shipping the "browser" version of coffee-script.js (with all modules included) as well? I think you can just add:

MINIFY=false bin/cake build:browser

in %build and then install extras/coffee-script.js to somewhere suitable. It would really help with my efforts to package PhantomJS.

Comment 7 T.C. Hollingsworth 2013-01-23 07:34:13 UTC
(In reply to comment #5)
> Great, thanks!
> 
> I can take this review. At first glance everything looks good. I will brush
> up on Node packaging guidelines tomorrow and then do a proper review.

There's a draft here:
https://fedoraproject.org/wiki/PackagingDrafts:Node.js

I wrote them, so I'd hope this package is compliant.  ;-)

Please note that FESCo has asked that I hold off on pushing stable any Node.js packages until FPC has approved those guidelines.  Toshio Kuratomi of the FPC is already okay with them, so we hope to have that done soon.

In the meantime, we can still get this into Rawhide and F18 updates-testing.


(In reply to comment #6)
> One question... could you consider shipping the "browser" version of
> coffee-script.js (with all modules included) as well?

Sure.  I'll even subpackage it so it won't drag in Node unnecessarily.

Comment 8 Vít Ondruch 2013-01-23 08:18:24 UTC
Guys, could you please drop the runtime dependency on Node.js? It seems [1] that I'll be forced to depend on coffee-script package in rubygem-coffee-script-source package. I would really hate to have Node.js on my system just because of it. Thank you for considering.


http://lists.fedoraproject.org/pipermail/packaging/2013-January/008866.html

Comment 9 T.C. Hollingsworth 2013-01-24 20:16:58 UTC
I can definitely provide a coffee-script-common package that provides what rubygem-coffee-script needs without depending on node.  The main coffee-script package should ship /usr/bin/coffee and /usr/bin/cake and thus will need to still to depend on node, though.

Does rubygem-coffee-script-source really need to exist?  Can't rubygem-coffee-source just be told to look in /usr/share/coffee-script (yeah it's lib now, but this is a case where it should definitely go to share)?

If it's really necessary, I think it should be built from this SRPM.  It'll be easier to maintain that way, since it will always bumps version along with the rest of coffee-script.

Comment 10 Vít Ondruch 2013-01-28 08:21:28 UTC
(In reply to comment #9)
> I can definitely provide a coffee-script-common package that provides what rubygem-coffee-script needs without depending on node.

That works for me, if that will be standardized.

> Does rubygem-coffee-script-source really need to exist?  Can't
> rubygem-coffee-source just be told to look in /usr/share/coffee-script (yeah
> it's lib now, but this is a case where it should definitely go to share)?

I am afraid that rubygem-coffee-script and rubygem-coffee-script-source, both has to stay in Fedora. The problem is that coffee-script depends on coffee-script-source and this dependency will be reflected in Gemfile used by Bundler. If I attempt to drop the dependency, we will differ from other platforms. 

On the other hand, I should definitely check with upstream, if they could drop the dependency, since it is there just for convenience.

Comment 11 Vít Ondruch 2013-01-28 08:25:51 UTC
(In reply to comment #10)
> On the other hand, I should definitely check with upstream, if they could
> drop the dependency, since it is there just for convenience.

https://github.com/josh/ruby-coffee-script/issues/17

Comment 12 T.C. Hollingsworth 2013-01-31 08:22:22 UTC
This version should address all the issues mentioned above.

Spec: http://patches.fedorapeople.org/node_modules/coffee-script.spec
SRPM: http://patches.fedorapeople.org/node_modules/coffee-script-1.4.0-2.fc17.src.rpm
Koji scratch build: skipped due to missing BuildRequires

To build the minified browser version, uglify-js is required.  It's already packaged and awaiting review.

Note that Node.js Packaging Guidelines have been approved by FPC, and can be found in their new home among the rest of the official guidelines:
https://fedoraproject.org/wiki/Packaging:Node.js

Comment 13 Vít Ondruch 2013-01-31 08:49:43 UTC
Ah, ok ... so I expect the uglify-js suffers the same issues as this package, since there is already rubygem-uglifier, which carries its copy of uglify.js :/ Going to comment there and question the node.js packaging guidelines.

Comment 14 T.C. Hollingsworth 2013-02-01 21:09:29 UTC
This fixes coffee-script for the dependency generator issue Vit discovered in bug 894725 and also conditionalizes building the minified version so this builds without uglify-js for the time being.

Spec: http://patches.fedorapeople.org/node_modules/coffee-script.spec
SRPM: http://patches.fedorapeople.org/node_modules/coffee-script-1.4.0-3.fc17.src.rpm
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4922854

Comment 15 Vít Ondruch 2013-02-03 11:05:41 UTC
Could you please upload updated .spec file as well? Thank you.

Comment 16 Dan Callaghan 2013-02-10 05:04:17 UTC
(In reply to comment #14)
> Spec: http://patches.fedorapeople.org/node_modules/coffee-script.spec
> SRPM:
> http://patches.fedorapeople.org/node_modules/coffee-script-1.4.0-3.fc17.src.
> rpm

Looks like you forgot to upload these. Once they are uploaded I will proceed with the review.

Comment 18 Dan Callaghan 2013-02-10 23:10:43 UTC
You should remove the %clean section, and rm -rf %buildroot at the top of %install, and %defattr, and BuildRoot tag, as they are not needed. You can also remove the Group tags.

It might be more conventional to call the docs subpackage -doc (instead of -docs) but in the guidelines that's given as a recommendation, not a requirement, so I'll leave it up to you.

Complete review checklist is pasted below, there are only two blocking issues:
* /usr/share/coffee-script/lib/coffee-script/parser.js should not be executable
* LICENSE needs to be moved from -docs to -common (maybe README as well), so that it is always installed


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

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


Issues:
=======
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses
     found. Please check the source files for licenses manually.
See: http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#ValidLicenseShortNames
[!]: Large documentation must go in a -doc subpackage.
     Note: Documentation size is 1433600 bytes in 107 files.
See: http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation


===== MUST items =====

Generic:
[ ]: 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 successfully compiles and builds into binary rpms on at least one
     supported primary architecture.
[-]: %build honors applicable compiler flags or justifies otherwise.
[x]: All build dependencies are listed in BuildRequires, except for any that
     are listed in the exceptions section of Packaging Guidelines.
[x]: Package contains no bundled libraries.
[x]: Changelog in prescribed format.
[!]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Sources contain only permissible code or content.
[-]: Each %files section contains %defattr if rpm < 4.4
[x]: Macros in Summary, %description expandable at SRPM build time.
[-]: 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 does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Fully versioned dependency in subpackages, if present.
[x]: Package complies to the Packaging Guidelines
[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]: License field in the package spec file matches the actual license.
[!]: License file installed when any subpackage combination is installed.
[x]: Package consistently uses macro is (instead of hard-coded directory
     names).
[x]: Package is named using only allowed ASCII characters.
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package do not use a name that already exist
[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]: Package installs properly.
[x]: Package is not relocatable.
[x]: Requires correct, justified where necessary.
[x]: CheckResultdir
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Sources used to build the package match the upstream source, as provided
     in the spec URL.
[x]: Spec file is legible and written in American English.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[-]: Package contains systemd file(s) if in need.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[x]: Reviewer should test that the package builds in mock.
[!]: Buildroot is not present
[!]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[-]: 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]: Dist tag is present.
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Final provides and requires are sane (rpm -q --provides and rpm -q
     --requires).
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise justified.
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: SourceX tarball generation or download is documented.
[x]: SourceX / PatchY prefixed with %{name}.
[x]: SourceX is a working URL.
[-]: 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.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed files.
[x]: Spec use %global instead of %define.

===== 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.
[-]: Large data in /usr/share should live in a noarch subpackage if package is
     arched.


Rpmlint
-------
Checking: coffee-script-1.4.0-3.fc19.noarch.rpm
          coffee-script-1.4.0-3.fc19.src.rpm
          coffee-script-common-1.4.0-3.fc19.noarch.rpm
          coffee-script-docs-1.4.0-3.fc19.noarch.rpm
coffee-script.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
coffee-script.noarch: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
coffee-script.noarch: W: spelling-error %description -l en_US versa -> avers, verse, verso
coffee-script.noarch: W: only-non-binary-in-usr-lib
coffee-script.noarch: W: no-documentation
coffee-script.noarch: W: dangling-symlink /usr/lib/node_modules/coffee-script/extras /usr/share/coffee-script/extras
coffee-script.noarch: W: dangling-symlink /usr/lib/node_modules/coffee-script/lib /usr/share/coffee-script/lib
coffee-script.noarch: W: no-manual-page-for-binary cake
coffee-script.noarch: W: no-manual-page-for-binary coffee
coffee-script.src: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
coffee-script.src: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
coffee-script.src: W: spelling-error %description -l en_US versa -> avers, verse, verso
coffee-script-common.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
coffee-script-common.noarch: W: spelling-error %description -l en_US js -> dis, ks, j
coffee-script-common.noarch: W: no-documentation
coffee-script-common.noarch: E: script-without-shebang /usr/share/coffee-script/lib/coffee-script/parser.js
coffee-script-docs.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
4 packages and 0 specfiles checked; 1 errors, 16 warnings.




Rpmlint (installed packages)
----------------------------
# rpmlint coffee-script coffee-script-common coffee-script-docs
coffee-script.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
coffee-script.noarch: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment
coffee-script.noarch: W: spelling-error %description -l en_US versa -> avers, verse, verso
coffee-script.noarch: W: only-non-binary-in-usr-lib
coffee-script.noarch: W: no-documentation
coffee-script.noarch: W: dangling-symlink /usr/lib/node_modules/coffee-script/extras /usr/share/coffee-script/extras
coffee-script.noarch: W: dangling-symlink /usr/lib/node_modules/coffee-script/lib /usr/share/coffee-script/lib
coffee-script.noarch: W: no-manual-page-for-binary cake
coffee-script.noarch: W: no-manual-page-for-binary coffee
coffee-script-common.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
coffee-script-common.noarch: W: spelling-error %description -l en_US js -> dis, ks, j
coffee-script-common.noarch: W: no-documentation
coffee-script-common.noarch: E: script-without-shebang /usr/share/coffee-script/lib/coffee-script/parser.js
coffee-script-docs.noarch: W: spelling-error Summary(en_US) transcompiles -> trans compiles, trans-compiles, transcontinental
3 packages and 0 specfiles checked; 1 errors, 13 warnings.
# echo 'rpmlint-done:'



Requires
--------
coffee-script-1.4.0-3.fc19.noarch.rpm (rpmlib, GLIBC filtered):
    
    /usr/bin/env  
    coffee-script-common = 1.4.0-3.fc19
    nodejs(engine) >= 0.4.0

coffee-script-common-1.4.0-3.fc19.noarch.rpm (rpmlib, GLIBC filtered):
    

coffee-script-docs-1.4.0-3.fc19.noarch.rpm (rpmlib, GLIBC filtered):
    



Provides
--------
coffee-script-1.4.0-3.fc19.noarch.rpm:
    
    coffee-script = 1.4.0-3.fc19
    npm(coffee-script) = 1.4.0

coffee-script-common-1.4.0-3.fc19.noarch.rpm:
    
    coffee-script-common = 1.4.0-3.fc19

coffee-script-docs-1.4.0-3.fc19.noarch.rpm:
    
    coffee-script-docs = 1.4.0-3.fc19



MD5-sum check
-------------
https://github.com/jashkenas/coffee-script/archive/158d37215a963c67e002b953041d7d499b6fcbeb/coffee-script-1.4.0-158d372.tar.gz :
  CHECKSUM(SHA256) this package     : 28ed3cd1639ee9aac8da5f32e0314f0a54cc5908d2ec2032eb5e1e0804b2b855
  CHECKSUM(SHA256) upstream package : 28ed3cd1639ee9aac8da5f32e0314f0a54cc5908d2ec2032eb5e1e0804b2b855


Generated by fedora-review 0.3.1 (b71abc1) last change: 2012-10-16
Buildroot used: fedora-rawhide-x86_64
Command line :/bin/fedora-review -b 732216 -m fedora-rawhide-x86_64

Comment 19 T.C. Hollingsworth 2013-02-10 23:48:01 UTC
(In reply to comment #18)
> You should remove the %clean section, and rm -rf %buildroot at the top of
> %install, and %defattr, and BuildRoot tag, as they are not needed. You can
> also remove the Group tags.

We may support EPEL 5 in the future, and my RPMs are rebuilt on EL5 in the wild, so I've made a habit of maintaining RHEL5 spec compatibility in all nodejs RPMs for now.

This was also discussed with another reviewer in bug 891194.

> It might be more conventional to call the docs subpackage -doc (instead of
> -docs) but in the guidelines that's given as a recommendation, not a
> requirement, so I'll leave it up to you.
>
> Complete review checklist is pasted below, there are only two blocking
> issues:
> * /usr/share/coffee-script/lib/coffee-script/parser.js should not be
> executable
> * LICENSE needs to be moved from -docs to -common (maybe README as well), so
> that it is always installed

All fixed.

Spec: http://patches.fedorapeople.org/node_modules/coffee-script.spec
SRPM: http://patches.fedorapeople.org/node_modules/coffee-script-1.4.0-4.fc18.src.rpm
Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4948144

Comment 20 Dan Callaghan 2013-02-11 00:23:39 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > You should remove the %clean section, and rm -rf %buildroot at the top of
> > %install, and %defattr, and BuildRoot tag, as they are not needed. You can
> > also remove the Group tags.
> 
> We may support EPEL 5 in the future, and my RPMs are rebuilt on EL5 in the
> wild, so I've made a habit of maintaining RHEL5 spec compatibility in all
> nodejs RPMs for now.
> 
> This was also discussed with another reviewer in bug 891194.

No worries.

> > It might be more conventional to call the docs subpackage -doc (instead of
> > -docs) but in the guidelines that's given as a recommendation, not a
> > requirement, so I'll leave it up to you.
> >
> > Complete review checklist is pasted below, there are only two blocking
> > issues:
> > * /usr/share/coffee-script/lib/coffee-script/parser.js should not be
> > executable
> > * LICENSE needs to be moved from -docs to -common (maybe README as well), so
> > that it is always installed
> 
> All fixed.
> 
> Spec: http://patches.fedorapeople.org/node_modules/coffee-script.spec
> SRPM:
> http://patches.fedorapeople.org/node_modules/coffee-script-1.4.0-4.fc18.src.
> rpm
> Koji scratch build:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4948144

Nice work! Approved.

Comment 21 T.C. Hollingsworth 2013-02-11 02:44:23 UTC
New Package SCM Request
=======================
Package Name: coffee-script
Short Description: A programming language that transcompiles to JavaScript
Owners: patches
Branches: f18 el6
InitialCC:

Comment 22 Kevin Fenzi 2013-02-11 04:47:00 UTC
Git done (by process-git-requests).

Comment 23 Fedora Update System 2013-02-11 23:44:01 UTC
coffee-script-1.4.0-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/coffee-script-1.4.0-4.fc18

Comment 24 Fedora Update System 2013-02-13 04:27:52 UTC
coffee-script-1.4.0-4.fc18 has been pushed to the Fedora 18 testing repository.

Comment 25 Fedora Update System 2013-04-05 23:04:58 UTC
coffee-script-1.4.0-4.fc18 has been pushed to the Fedora 18 stable repository.

Comment 26 Fedora Update System 2013-06-19 14:04:36 UTC
coffee-script-1.6.3-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/coffee-script-1.6.3-1.el6

Comment 27 Fedora Update System 2013-07-08 20:08:37 UTC
coffee-script-1.6.3-1.el6 has been pushed to the Fedora EPEL 6 stable repository.


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