Spec: http://patches.fedorapeople.org/npm/uglify-js.spec SRPM: http://patches.fedorapeople.org/npm/uglify-js-2.2.3-1.fc17.src.rpm Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4864566 FAS username: patches JavaScript parser, mangler/compressor and beautifier toolkit This package is part of the tap stack used to test many Node.js modules. Please use nodejs-0.6.5-9 or later when building or using this package.
+ /usr/bin/node test/run-tests.js module.js:340 throw err; ^ Error: Cannot find module 'source-map' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (/home/churchyard/rpmbuild/BUILD/package/tools/node.js:9:21) at Module._compile (module.js:454:26) at Object.Module._extensions..js (module.js:472:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17)
Thanks for yet another review! Sorry, I missed some dependencies. They're also needed as BuildRequires for the tests to run, so they're added in this version. Spec: http://patches.fedorapeople.org/npm/uglify-js.spec SRPM: http://patches.fedorapeople.org/npm/uglify-js-2.2.3-2.fc17.src.rpm
So I am letting this be, until deps are ready. When they are, anyone is free to take this, me again or anyone else.
Same issues as for coffee-script package. Please provide this javasript without dependency on Node.js. We need to use in rubygem-uglifier and execute by various other JavaScript engines.
(In reply to comment #4) > Same issues as for coffee-script package. Please provide this javasript > without dependency on Node.js. We need to use in rubygem-uglifier and > execute by various other JavaScript engines. Fixed. Spec: http://patches.fedorapeople.org/npm/uglify-js.spec SRPM: http://patches.fedorapeople.org/npm/uglify-js-2.2.3-3.fc17.src.rpm
How are you going to bootstrap the uglify-js? There is no preparation in any its build time dependencies. I installed manually all its dependencies using rpm --nodpes, but that is not an option for Koji build.
Btw the build fails for me in %install section: + cp -pr bin lib package.json uglify-js.js /builddir/build/BUILDROOT/uglify-js-2.2.3-3.fc19.x86_64/usr/share/uglify-js/ cp: cannot stat 'uglify-js.js': No such file or directory
(In reply to comment #6) > How are you going to bootstrap the uglify-js? There is no preparation in any > its build time dependencies. I installed manually all its dependencies using > rpm --nodpes, but that is not an option for Koji build. Its BuildRequires need to go into Fedora first. nodejs-source-map is the only thing that needs any bootstrapping logic, and that just prevents the browser version from being built until uglify-js in in the distribution. You can drop the BuildRequires and %check if you want it to just build without the deps, but we need the deps at runtime anyway so they need to get done no matter what we do, so I didn't bother leaving them out. (In reply to comment #7) > Btw the build fails for me in %install section: > > + cp -pr bin lib package.json uglify-js.js > /builddir/build/BUILDROOT/uglify-js-2.2.3-3.fc19.x86_64/usr/share/uglify-js/ > cp: cannot stat 'uglify-js.js': No such file or directory Oops, sorry I broke it in the updated version. Fixed. Spec: http://patches.fedorapeople.org/npm/uglify-js.spec SRPM: http://patches.fedorapeople.org/npm/uglify-js-2.2.3-4.fc17.src.rpm
(In reply to comment #8) > (In reply to comment #6) > > How are you going to bootstrap the uglify-js? There is no preparation in any > > its build time dependencies. I installed manually all its dependencies using > > rpm --nodpes, but that is not an option for Koji build. > > Its BuildRequires need to go into Fedora first. nodejs-source-map is the > only thing that needs any bootstrapping logic, and that just prevents the > browser version from being built until uglify-js in in the distribution. I know they need to get into fedora, therefore some bootstrap logic would help me when I am trying to build them in mock myself. > Oops, sorry I broke it in the updated version. Fixed. + ln -sf /usr/share/uglify-js /builddir/build/BUILDROOT/uglify-js-2.2.3-4.fc19.x86_64/usr/lib/node_modules/uglify-js ln: failed to create symbolic link '/builddir/build/BUILDROOT/uglify-js-2.2.3-4.fc19.x86_64/usr/lib/node_modules/uglify-js': No such file or directory
Sorry, I was getting tired when I was working on this yesterday. This now builds fine for sure and the %check stuff is conditionalized. Spec: http://patches.fedorapeople.org/npm/uglify-js.spec SRPM: http://patches.fedorapeople.org/npm/uglify-js-2.2.3-5.fc17.src.rpm
I am afraid, that you forgot to upload the updated spec and SRPM. can't find neither on your fp.o :/
It's there now. Here's a scratch build too, now that it can build in koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=4921134
Hm, that is weird. Reading the packaging guidelines "The nodejs package includes an automatic Requires and Provides generator that automatically adds versioned dependencies based on the information provided in a module's package.json file.", I thought that there will be some dependency on node, but there is non: $ rpm -q --requires -p uglify-js-2.2.3-5.fc19.noarch.rpm /usr/bin/env rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 uglify-js-common = 2.2.3-5.fc19 rpmlib(PayloadIsXz) <= 5.2-1 $ rpm -q --requires -p uglify-js-common-2.2.3-5.fc19.noarch.rpm rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsXz) <= 5.2-1 So it actually can't be executed, if I am not mistaken.
And trying to build nodejs-dryice, there should be some provides I guess: $ mock -r fedora-rawhide-x86_64 --install /var/lib/mock/fedora-rawhide-x86_64/result/nodejs-dryice-0.4.10-1.fc19.noarch.rpm INFO: mock.py version 1.1.28 starting... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run Mock Version: 1.1.28 INFO: Mock Version: 1.1.28 Start: lock buildroot INFO: installing package(s): /var/lib/mock/fedora-rawhide-x86_64/result/nodejs-dryice-0.4.10-1.fc19.noarch.rpm ERROR: Command failed: # ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-rawhide-x86_64/root/', 'install', '/var/lib/mock/fedora-rawhide-x86_64/result/nodejs-dryice-0.4.10-1.fc19.noarch.rpm', '--setopt=tsflags=nocontexts'] Error: Package: nodejs-dryice-0.4.10-1.fc19.noarch (/nodejs-dryice-0.4.10-1.fc19.noarch) Requires: npm(uglify-js) >= 1.3.4 Error: Package: nodejs-dryice-0.4.10-1.fc19.noarch (/nodejs-dryice-0.4.10-1.fc19.noarch) Requires: npm(uglify-js) < 1.4 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
(In reply to comment #13) > Hm, that is weird. Reading the packaging guidelines "The nodejs package > includes an automatic Requires and Provides generator that automatically > adds versioned dependencies based on the information provided in a module's > package.json file.", I thought that there will be some dependency on node, > but there is non: Okay, the problem here is that the RPM dependency generation magic counts on a file /usr/lib/node_modules/<module_name>/package.json to exist. Unfortunately, we need to use absolute symlinks since users can potentially `npm link` RPM-installed modules anywhere on the system, so the symlink in node_modules is unresolvable at build time, so RPM can't find the package.json. I fixed this by changing the way symlinks are done so that /usr/lib/node_modules/uglify-js/package.json is a real file, and the dependency generator now works. I'll fix coffee-script too, which undoubtedly faces the same issue. Spec: http://patches.fedorapeople.org/npm/uglify-js.spec SRPM: http://patches.fedorapeople.org/npm/uglify-js-2.2.3-6.fc17.src.rpm Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=4922842 Thanks for catching this!
I am afraid that the -common package does not contain the uglifyjs executable, so it is worthless for rubygem-uglifier purposes. Moreover, the uglifier gem contains just single uglify.js file, which probably contains all the uglifyjs files. Not sure how to cope with that. If linking will be enough.
(In reply to comment #16) > I am afraid that the -common package does not contain the uglifyjs > executable, so it is worthless for rubygem-uglifier purposes. I can probably accommodate this, but I can't figure out where rubygem-uglifier actually uses it. It doesn't appear to bundle it. If you can point me to Ruby code that calls it in, that would be helpful. > Moreover, the uglifier gem contains just single uglify.js file, which > probably contains all the uglifyjs files. Not sure how to cope with that. If > linking will be enough. Looking at the Rakefile [1], it seems that it bundles source-map and uglify-js by compiling them both into one .js file. There is no bundled libraries exception for JavaScript not in the browser, so I don't think this is permissible in Fedora. rubygem-uglifier will have to be patched to bring in source-map and uglify-js separately. I can, however, ship a minified version of uglify-js like rubygem-uglifier wants, though I'm not sure why it's necessary. The whole point of minification is to reduce JS loading time in the browser; it's completely unnecessary server-side. [1] https://github.com/lautis/uglifier/blob/master/Rakefile
(In reply to comment #17) > (In reply to comment #16) > > I am afraid that the -common package does not contain the uglifyjs > > executable, so it is worthless for rubygem-uglifier purposes. > > I can probably accommodate this, but I can't figure out where > rubygem-uglifier actually uses it. It doesn't appear to bundle it. You might be right, the executable might be excluded. I have never dug into it in detail. Not sure what is ouptut of `./vendor/uglifyjs/bin/uglifyjs --self --comments /Copyright/` since this is what is embedded in uglifier. > If you can point me to Ruby code that calls it in, that would be helpful. This is the exec script [1], which probably substitutes the binary and this [2] is how options are passed in, i.e. they are substituted for %s in the script. > > Moreover, the uglifier gem contains just single uglify.js file, which > > probably contains all the uglifyjs files. Not sure how to cope with that. If > > linking will be enough. > > Looking at the Rakefile [1], it seems that it bundles source-map and > uglify-js by compiling them both into one .js file. Right. > There is no bundled > libraries exception for JavaScript not in the browser, so I don't think this > is permissible in Fedora. rubygem-uglifier will have to be patched to bring > in source-map and uglify-js separately. Oh my, this will again bring in dependency on Node or everything will have to have some -common package and then it has to be somehow put together. > I can, however, ship a minified version of uglify-js like rubygem-uglifier > wants, though I'm not sure why it's necessary. I agree, the minification solves nothing and is useless. [1] https://github.com/lautis/uglifier/blob/master/lib/uglifier.rb#L114 [2] https://github.com/lautis/uglifier/blob/master/lib/uglifier.rb#L165
BTW, the bootstrap code is uglifier is not enough I am afraid, since the uglify-js is not installable due to its autogenerated dependencies, so you cannot use it to build nodejs-dryice and nodejs-dryice is not installable for similar reason.
Package Review ============== Key: [x] = Pass [!] = Fail [-] = Not applicable [?] = Not evaluated [ ] = Manual review needed Issues: ======= [x]: 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 ===== 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 successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: %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. [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Sources contain only permissible code or content. [x]: Each %files section contains %defattr if rpm < 4.4 Note: %defattr present but not needed [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. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in %package common [x]: Package complies to the Packaging Guidelines [x]: Spec file lacks Packager, Vendor, PreReq tags. [-]: 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. Note: Checking patched sources after %prep for licenses. No licenses found. Please check the source files for licenses manually. [-]: 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. Note: Package contains no Conflicts: tag(s) [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. [-]: Large documentation must go in a -doc subpackage. Note: Documentation size is 30720 bytes in 1 files. [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 Note: Buildroot: present but not needed [x]: 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). [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [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. [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. [ ]: 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]: Large data in /usr/share should live in a noarch subpackage if package is arched. Rpmlint ------- Checking: uglify-js-2.2.3-6.fc18.noarch.rpm uglify-js-common-2.2.3-6.fc18.noarch.rpm uglify-js-2.2.3-6.fc18.src.rpm uglify-js.noarch: W: only-non-binary-in-usr-lib uglify-js.noarch: W: no-documentation uglify-js.noarch: W: dangling-symlink /usr/lib/node_modules/uglify-js/lib /usr/share/uglify-js uglify-js.noarch: W: no-manual-page-for-binary uglifyjs uglify-js-common.noarch: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment uglify-js.src: W: spelling-error %description -l en_US uglifyjs -> ugliness 3 packages and 0 specfiles checked; 0 errors, 6 warnings. Rpmlint (installed packages) ---------------------------- # rpmlint uglify-js-common uglify-js uglify-js-common.noarch: W: spelling-error %description -l en_US runtime -> run time, run-time, rudiment uglify-js.noarch: W: only-non-binary-in-usr-lib uglify-js.noarch: W: no-documentation uglify-js.noarch: W: dangling-symlink /usr/lib/node_modules/uglify-js/lib /usr/share/uglify-js uglify-js.noarch: W: no-manual-page-for-binary uglifyjs 2 packages and 0 specfiles checked; 0 errors, 5 warnings. # echo 'rpmlint-done:' Requires -------- uglify-js-2.2.3-6.fc18.noarch.rpm (rpmlib, GLIBC filtered): /usr/bin/env nodejs(engine) >= 0.4.0 npm(optimist) < 0.4 npm(optimist) >= 0.3.5 npm(source-map) < 0.2 npm(source-map) >= 0.1.7 uglify-js-common = 2.2.3-6.fc18 uglify-js-common-2.2.3-6.fc18.noarch.rpm (rpmlib, GLIBC filtered): Provides -------- uglify-js-2.2.3-6.fc18.noarch.rpm: npm(uglify-js) = 2.2.3 uglify-js = 2.2.3-6.fc18 uglify-js-common-2.2.3-6.fc18.noarch.rpm: uglify-js-common = 2.2.3-6.fc18 MD5-sum check ------------- http://registry.npmjs.org/uglify-js/-/uglify-js-2.2.3.tgz : CHECKSUM(SHA256) this package : bb9e4f1ef6a9090ab0f5ea6866e98e78fc04b452d9cf0692eb51976f68108746 CHECKSUM(SHA256) upstream package : bb9e4f1ef6a9090ab0f5ea6866e98e78fc04b452d9cf0692eb51976f68108746 Generated by fedora-review 0.3.1 (b71abc1) last change: 2012-10-16 Buildroot used: fedora-18-x86_64 Command line :/bin/fedora-review --rpm-spec -n uglify-js-2.2.3-6.fc17.src.rpm
Review approved!
New Package SCM Request ======================= Package Name: uglify-js Short Description: JavaScript parser, mangler/compressor, and beautifier toolkit Owners: patches Branches: f18 el6 InitialCC:
Git done (by process-git-requests).
nodejs-amdefine-0.0.4-1.fc18,nodejs-buffer-equal-0.0.0-1.fc18,nodejs-charm-0.1.0-1.fc18,nodejs-deep-equal-0.0.0-2.fc18,nodejs-optimist-0.3.5-1.fc18,nodejs-source-map-0.1.8-3.fc18,nodejs-traverse-0.6.3-2.fc18,nodejs-wordwrap-0.0.2-2.fc18,nodejs-yamlish-0.0.5-1.fc18,uglify-js-2.2.4-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/nodejs-amdefine-0.0.4-1.fc18,nodejs-buffer-equal-0.0.0-1.fc18,nodejs-charm-0.1.0-1.fc18,nodejs-deep-equal-0.0.0-2.fc18,nodejs-optimist-0.3.5-1.fc18,nodejs-source-map-0.1.8-3.fc18,nodejs-traverse-0.6.3-2.fc18,nodejs-wordwrap-0.0.2-2.fc18,nodejs-yamlish-0.0.5-1.fc18,uglify-js-2.2.4-1.fc18
nodejs-amdefine-0.0.4-1.fc18, nodejs-buffer-equal-0.0.0-1.fc18, nodejs-charm-0.1.0-1.fc18, nodejs-deep-equal-0.0.0-2.fc18, nodejs-optimist-0.3.5-1.fc18, nodejs-source-map-0.1.8-3.fc18, nodejs-traverse-0.6.3-2.fc18, nodejs-wordwrap-0.0.2-2.fc18, nodejs-yamlish-0.0.5-1.fc18, nodejs-difflet-0.2.3-2.fc18, uglify-js1-1.3.4-1.fc18 has been pushed to the Fedora 18 testing repository.
nodejs-amdefine-0.0.4-1.fc18, nodejs-buffer-equal-0.0.0-1.fc18, nodejs-charm-0.1.0-1.fc18, nodejs-deep-equal-0.0.0-2.fc18, nodejs-optimist-0.3.5-1.fc18, nodejs-source-map-0.1.8-3.fc18, nodejs-traverse-0.6.3-2.fc18, nodejs-wordwrap-0.0.2-2.fc18, nodejs-yamlish-0.0.5-1.fc18, nodejs-difflet-0.2.3-2.fc18, uglify-js1-1.3.4-1.fc18 has been pushed to the Fedora 18 stable repository.
*** Bug 951360 has been marked as a duplicate of this bug. ***