Bug 1850523 - F33FailsToInstall: uglify-js
Summary: F33FailsToInstall: uglify-js
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: uglify-js
Version: rawhide
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Ben Rosser
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F33FailsToInstall
TreeView+ depends on / blocked
 
Reported: 2020-06-24 12:37 UTC by Igor Raits
Modified: 2020-07-23 05:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-23 05:39:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Igor Raits 2020-06-24 12:37:29 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (ignatenkobrain).

Your package (uglify-js) Fails To Install in Fedora 33:

can't install uglify-js:
  - nothing provides (npm(source-map) >= 0.5.1 with npm(source-map) < 0.6) needed by uglify-js-2.8.22-9.fc32.noarch
  
If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.


If you don't react accordingly to the policy for FTBFS/FTI bugs (https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/), your package may be orphaned in 8+ weeks.

P.S. The data was generated solely from koji buildroot, so it might be newer than the latest compose or the content on mirrors.

P.P.S. If this bug has been reported in the middle of upgrading multiple dependent packages, please consider using side tags: https://docs.fedoraproject.org/en-US/rawhide-gating/multi-builds/

Thanks!

Comment 1 Igor Raits 2020-07-02 06:51:02 UTC
Hello,

This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 2 Troy Dawson 2020-07-02 15:56:20 UTC
Currently uglify-js and js-uglify fail to install because nodejs-source-map updated to 0.7.3.
We also cannot rebuild uglify-js because nodejs-optimist was orphaned.

What if we bundled, at least the build dependencies.  Possibly the installation dependencies as well.

Comment 3 Ben Rosser 2020-07-02 16:34:52 UTC
So... what actually uses uglify-js in Fedora? I took it because something in the mocha dependency stack needed it. I didn't look into it, but my suspicion is that this is because some nodejs package in that dependency stack is uglifying its sources-- which is probably not something we need to do.

I looked at uglify-js upstream and noticed that there is now a (not-backwards-compatible, apparently) uglify-js 3.x that seems to have no nodejs dependencies at all.

https://github.com/mishoo/UglifyJS
https://github.com/mishoo/UglifyJS/blob/master/package.json

So depending on what's using it in Fedora... maybe we could just update the package?

Or we could bundle the dependencies if we need to keep uglify-js 2.x.

Comment 4 Ben Rosser 2020-07-02 16:47:33 UTC
Okay, so answering my own question-- actual packages depending on uglify-js are:

$ dnf repoquery --whatrequires uglify-js
nodejs-constantinople-0:2.0.0-15.fc32.noarch
nodejs-grunt-contrib-uglify-0:0.11.1-12.fc32.noarch
nodejs-handlebars-0:4.0.13-3.fc32.noarch
nodejs-lodash-cli-0:4.17.5-4.17.5.3.fc32.noarch
nodejs-lodash-cli-0:4.17.5-4.17.5.4.fc32.noarch
nodejs-transformers-0:3.1.0-8.fc32.noarch
nodejs-with-0:3.0.0-15.fc32.noarch

constantinople and with have uglify-js dependencies that seem to be removed in their latest upstream versions.

The latest handlebars seems to require uglify-js 3.x (and it's an optionalDependency-- now a peerDependency-- according to package.json).

However, the last releases of transformers (which is actually deprecated upstream now) and lodash-cli both want uglify-js 2.x. So maybe we're stuck with 2.x for those two.

Comment 5 Mattias Ellert 2020-07-15 07:11:47 UTC
Your list of dependent packages is incomplete. Since uglify-js is a build tool, it is more likely to be a BuildRequire than a Require. Querying the source repositories I get:

$ dnf repoquery --disablerepo=* --enablerepo fedora-source --enablerepo updates-source --whatrequires uglify-js
Fedora 32 - Updates Source                       14 kB/s | 2.5 MB     03:00    
Fedora 32 - Source                              5.6 MB/s | 6.4 MB     00:01    
Senaste kontroll av utgång av metadata: för 0:00:01 sedan den ons 15 jul 2020 08:58:11.
dnsdist-0:1.4.0-4.fc32.src
freeipa-0:4.8.6-1.fc32.src
js-jquery-datetimepicker-0:2.5.20-5.fc32.src
js-jquery-jstree-0:3.3.8-3.fc32.src
js-jquery-mousewheel-0:3.1.13-7.fc32.src
js-jquery-noty-0:2.4.1-6.fc31.src
js-jquery-ui-touch-punch-0:0.2.3-0.6.20141219git4bc0091.fc32.src
js-jsroot-0:5.8.0-1.fc32.src
js-web-socket-js-0:1.0.2-12.fc32.src
marked-0:0.3.2-12.fc32.src
marked-0:1.1.0-3.fc32.src
nodejs-backbone-0:1.3.3-8.fc32.src
nodejs-constantinople-0:2.0.0-15.fc32.src
nodejs-fast-levenshtein-0:1.1.3-9.fc32.src
nodejs-highlight-js-0:8.0.0-12.fc31.src
nodejs-hooker-0:0.2.3-15.fc32.src
nodejs-imurmurhash-0:0.1.4-9.fc32.src
nodejs-jsonselect-0:0.4.0-14.fc32.src
nodejs-tweetnacl-0:1.0.1-3.fc32.src
nodejs-tweetnacl-util-0:0.15.0-4.fc32.src
nodejs-underscore-0:1.9.1-5.fc32.src
nodejs-with-0:3.0.0-15.fc32.src
rubygem-uglifier-0:3.2.0-7.fc32.src
xpra-0:3.0.7-2.fc32.src

$ dnf repoquery --disablerepo=* --enablerepo fedora-source --enablerepo updates-source --whatrequires 'npm(uglify-js)'
Senaste kontroll av utgång av metadata: för 0:07:23 sedan den ons 15 jul 2020 08:58:11.
coffee-script-0:1.10.0-13.fc32.src
lodash-0:4.17.15-3.fc32.src
lodash-0:4.17.15-4.fc32.src
nodejs-es5-shim-0:4.1.0-10.fc32.src
nodejs-handlebars-0:4.0.13-3.fc32.src
nodejs-leaflet-0:1.0.3-8.fc32.src
nodejs-snockets-0:1.3.8-15.fc31.src
nodejs-transformers-0:3.1.0-8.fc32.src

The packaging guidelines say:

https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/#_compilationminification

"If a JavaScript library typically is shipped as minified or compiled code, it MUST be compiled or minified as part of the RPM build process. Shipping pre-minified or pre-compiled code is unacceptable in Fedora."

So not having an installable minifier in Fedora makes it difficult to comply with the packaging guidelines.

Comment 6 Mattias Ellert 2020-07-22 04:04:31 UTC
Dear maintainers,

please consider fixing this before the Fedora 33 mass rebuild starts. Not having an installable uglify-js will cause FTBFS in the mass rebuild for many packages.

I managed to build an installable package with the following changes:

diff --git a/uglify-js.spec b/uglify-js.spec
index 1d3e4f4..d15e732 100644
--- a/uglify-js.spec
+++ b/uglify-js.spec
@@ -1,7 +1,7 @@
 %{?nodejs_find_provides_and_requires}
 
 #enable/disable tests in case the deps aren't there
-%bcond_without tests
+%bcond_with tests
 
 Name:           uglify-js
 Version:        2.8.22
@@ -19,13 +19,11 @@ Provides:       nodejs-uglify-js = %{version}-%{release}
 
 BuildRequires:  nodejs-packaging
 BuildRequires:  web-assets-devel
+BuildRequires:  npm(source-map)
 
 %if %{with tests}
 BuildRequires:  npm(acorn)
-BuildRequires:  npm(async)
 BuildRequires:  npm(mocha)
-BuildRequires:  npm(optimist)
-BuildRequires:  npm(source-map)
 %endif
 
 Requires: js-uglify = %{version}-%{release}
@@ -57,6 +55,7 @@ runtime.
 
 %nodejs_fixdep async "^1.5.0"
 %nodejs_fixdep yargs "^3.2.1"
+%nodejs_fixdep source-map ">=0.5.1"
 
 
 %build

The npm(source-map) is a proper build dep needed also with tests disabled or the build will fail.

The tests need to be disabled becsaue mocha's recursive dependencies eventually require uglify-js and therefore is not installable.

The tests can not be immediately turned on again after a successful build, because nodejs-css-stringify (in mocha's dependency chain) must be rebuilt with less strict dependency on source-map:

nothing provides (npm(source-map) >= 0.5.2 with npm(source-map) < 0.6) needed by nodejs-css-stringify-1.4.1-12.fc32.noarch

Comment 7 Ben Rosser 2020-07-22 13:16:30 UTC
Aha. My bad for not realizing that this was not a "real" version incompatiblity and instead one that could be easily patched with a fixdep...

I've applied your changes and have just started a build in Rawhide.

https://koji.fedoraproject.org/koji/taskinfo?taskID=47627826

Comment 8 Igor Raits 2020-07-23 05:39:01 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (ignatenkobrain).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 33.

Thanks for taking care of it!


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