I'm not so sure that the problem is with the way Fedora packages uglifyjs.
I think the problem is that RB uses https://www.npmjs.com/package/uglifyjs
which seems to be version 2.4.10 of https://github.com/mishoo/UglifyJS2
while Fedora packages the latest version of
https://github.com/mishoo/UglifyJS2 which is available from
https://www.npmjs.com/package/uglify-js.
Something like the attached (untested) patches could perhaps be applied?
// Erik
On 29 March 2017 at 16:02, Stephen Gallagher <[email protected]>
wrote:
> Would you please file a bug at https://bugzilla.redhat.
> com/enter_bug.cgi?product=Fedora%20EPEL against the "python-djblets"
> package with the exact commands you are running?
>
> I suspect it's a minor glitch with the way that Fedora packages uglifyjs
> vs. the upstream NPM. I can probably have a patch fairly quickly once you
> tell me how to reproduce it.
>
>
> On Wed, Mar 29, 2017 at 9:34 AM Erik Johansson <[email protected]> wrote:
>
>> The EPEL package.
>>
>> // Erik
>>
>>
>> On Mar 29, 2017 15:10, "Stephen Gallagher" <[email protected]>
>> wrote:
>>
>> Did you install ReviewBoard using pip or did you use the EPEL package for
>> ReviewBoard and Djblets?
>>
>> On Wed, Mar 29, 2017 at 8:12 AM Erik Johansson <[email protected]>
>> wrote:
>>
>> Hi,
>>
>> We are having problems running the collectstatic manage command on our
>> CentOS installation (RB 2.5.9). The problem is that we have the uglify-js
>> RPM installed which installs to /usr/lib/node_modules/uglify-js while
>> reviewboard/settings.py configures the path to be os.path.join(NODE_PATH,
>> 'uglifyjs', 'bin', 'uglifyjs') (i.e. uglifyjs instead of uglify-js).
>>
>> This seems to be caused by RB (actually djblets) having a dependency on
>> the uglifyjs NPM instead of uglify-js, even though both seems to use the
>> same source, but the latter seems to be more active. Any reason for this?
>>
>> // Erik
>>
>> --
>> Erik Johansson
>> Home Page: http://ejohansson.se/
>> PGP Key: http://ejohansson.se/erik.asc
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
Erik Johansson
Home Page: http://ejohansson.se/
PGP Key: http://ejohansson.se/erik.asc
--
Supercharge your Review Board with Power Pack:
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons:
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/reviewboard/settings.py b/reviewboard/settings.py
index d74cbcc..7ac220e 100644
--- a/reviewboard/settings.py
+++ b/reviewboard/settings.py
@@ -455,7 +455,7 @@ PIPELINE = {
# happens on the back-end instead of in the browser.
'--global-var=STATIC_ROOT=""',
],
- 'UGLIFYJS_BINARY': os.path.join(NODE_PATH, 'uglifyjs', 'bin', 'uglifyjs'),
+ 'UGLIFYJS_BINARY': os.path.join(NODE_PATH, 'uglify-js', 'bin', 'uglifyjs'),
}
diff --git a/djblets/dependencies.py b/djblets/dependencies.py
index 067a597..a33bf67 100644
--- a/djblets/dependencies.py
+++ b/djblets/dependencies.py
@@ -27,7 +27,7 @@ lesscss_npm_dependencies = {
#: Dependencies required for UglifyJS JavaScript compression.
uglifyjs_npm_dependencies = {
- 'uglifyjs': '2.4.10',
+ 'uglify-js': '2.8.18',
}
#: Dependencies required for Babel for JavaScript.