ec5dc4
From 2f8e87ce9ccaab51b32a395c6cf6c764434ed0e2 Mon Sep 17 00:00:00 2001
ec5dc4
From: Thomas Woerner <twoerner@redhat.com>
ec5dc4
Date: Thu, 11 Jun 2020 10:40:57 +0200
ec5dc4
Subject: [PATCH] Revert "WebUI: use python3-rjsmin to minify JavaScript files"
ec5dc4
ec5dc4
This reverts commit d986e844bbd37ccc7a532175631a55acd315cda3.
ec5dc4
---
ec5dc4
 .lgtm.yml                            | 4 ++--
ec5dc4
 freeipa.spec.in                      | 2 +-
ec5dc4
 install/ui/build/freeipa/Makefile.am | 2 +-
ec5dc4
 install/ui/src/webui.profile.js      | 4 ++--
ec5dc4
 install/ui/util/build/README         | 4 ++--
ec5dc4
 install/ui/util/compile.sh           | 8 ++++----
ec5dc4
 6 files changed, 12 insertions(+), 12 deletions(-)
ec5dc4
ec5dc4
#diff --git a/.lgtm.yml b/.lgtm.yml
ec5dc4
#index b3898116e..e63615918 100644
ec5dc4
#--- a/.lgtm.yml
ec5dc4
#+++ b/.lgtm.yml
ec5dc4
#@@ -39,7 +39,7 @@ extraction:
ec5dc4
#         - python3-setuptools
ec5dc4
#         - python3-wheel
ec5dc4
#         - nodejs
ec5dc4
#-        - python3-rjsmin
ec5dc4
#+        - uglifyjs
ec5dc4
#         - systemd
ec5dc4
#         - 389-ds-base-dev
ec5dc4
#         - libssl-dev
ec5dc4
#@@ -79,7 +79,7 @@ extraction:
ec5dc4
#         - python3-setuptools
ec5dc4
#         - python3-wheel
ec5dc4
#         - nodejs
ec5dc4
#-        - python3-rjsmin
ec5dc4
#+        - uglifyjs
ec5dc4
#         - systemd
ec5dc4
#         - 389-ds-base-dev
ec5dc4
#         - libssl-dev
ec5dc4
diff --git a/freeipa.spec.in b/freeipa.spec.in
ec5dc4
index b6eb79593..a4682497a 100755
ec5dc4
--- a/freeipa.spec.in
ec5dc4
+++ b/freeipa.spec.in
ec5dc4
@@ -191,7 +191,7 @@ BuildRequires:  libsss_idmap-devel
ec5dc4
 BuildRequires:  libsss_certmap-devel
ec5dc4
 BuildRequires:  libsss_nss_idmap-devel >= %{sssd_version}
ec5dc4
 BuildRequires:  nodejs(abi)
ec5dc4
-BuildRequires:  python3-rjsmin
ec5dc4
+BuildRequires:  uglify-js
ec5dc4
 BuildRequires:  libverto-devel
ec5dc4
 BuildRequires:  libunistring-devel
ec5dc4
 # 0.13.0: https://bugzilla.redhat.com/show_bug.cgi?id=1584773
ec5dc4
diff --git a/install/ui/build/freeipa/Makefile.am b/install/ui/build/freeipa/Makefile.am
ec5dc4
index f4d97819e..05e82f4da 100644
ec5dc4
--- a/install/ui/build/freeipa/Makefile.am
ec5dc4
+++ b/install/ui/build/freeipa/Makefile.am
ec5dc4
@@ -18,6 +18,6 @@ widgets := $(wildcard ../../src/freeipa/widgets/*.js)
ec5dc4
 nav := $(wildcard ../../src/freeipa/navigation/*.js)
ec5dc4
 
ec5dc4
 app.js: $(core) $(base) $(widgets) $(nav)
ec5dc4
-	PYTHON=$(PYTHON) $(srcdir)/../../util/make-ui.sh
ec5dc4
+	$(srcdir)/../../util/make-ui.sh
ec5dc4
 
ec5dc4
 core.js: app.js
ec5dc4
diff --git a/install/ui/src/webui.profile.js b/install/ui/src/webui.profile.js
ec5dc4
index 2d4d691dc..1d7a6cc84 100644
ec5dc4
--- a/install/ui/src/webui.profile.js
ec5dc4
+++ b/install/ui/src/webui.profile.js
ec5dc4
@@ -9,7 +9,7 @@ var profile = (function(){
ec5dc4
         releaseName: "lib",
ec5dc4
         action: "release",
ec5dc4
 
ec5dc4
-        // optimization done separately by python3-rjsmin
ec5dc4
+        // optimization done separately by uglify.js
ec5dc4
         layerOptimize: false,
ec5dc4
         optimize: false,
ec5dc4
         cssOptimize: false,
ec5dc4
@@ -123,4 +123,4 @@ var profile = (function(){
ec5dc4
             }
ec5dc4
         }
ec5dc4
     };
ec5dc4
-})();
ec5dc4
+})();
ec5dc4
\ No newline at end of file
ec5dc4
diff --git a/install/ui/util/build/README b/install/ui/util/build/README
ec5dc4
index 2c4e0ecac..0772532d4 100644
ec5dc4
--- a/install/ui/util/build/README
ec5dc4
+++ b/install/ui/util/build/README
ec5dc4
@@ -1,5 +1,5 @@
ec5dc4
 build.js is builded dojo builder, with applied patches from 'patches' folder, by
ec5dc4
-itself and compiled using python3-rjsmin
ec5dc4
+itself and compiled using uglify.js
ec5dc4
 
ec5dc4
 _base/configRhino.js is unmodifed file from dojo/dojo. Required for a build to work.
ec5dc4
 
ec5dc4
@@ -9,4 +9,4 @@ Available via Academic Free License >= 2.1 OR the modified BSD license.
ec5dc4
 see: http://dojotoolkit.org/license for details
ec5dc4
 
ec5dc4
 = License =
ec5dc4
-Full Dojo license is in LICENSE file.
ec5dc4
+Full Dojo license is in LICENSE file.
ec5dc4
\ No newline at end of file
ec5dc4
diff --git a/install/ui/util/compile.sh b/install/ui/util/compile.sh
ec5dc4
index 1516b815f..d14f90ab0 100755
ec5dc4
--- a/install/ui/util/compile.sh
ec5dc4
+++ b/install/ui/util/compile.sh
ec5dc4
@@ -26,14 +26,14 @@ RDIR=$DIR/../release
ec5dc4
 usage() {
ec5dc4
 cat <<-__EOF__;
ec5dc4
 NAME
ec5dc4
-     compile.sh - Compiles layer file of Dojo build using Python rjsmin.
ec5dc4
+     compile.sh - Compiles layer file of Dojo build using uglify.js.
ec5dc4
                   Deletes all other files.
ec5dc4
 
ec5dc4
 SYNOPSIS
ec5dc4
      path/to/compile.sh [--help] --release RELEASE --layer NAME/NAME
ec5dc4
 
ec5dc4
 DESCRIPTION
ec5dc4
-     Compiles layer file of Dojo build output using Python rjsmin.
ec5dc4
+     Compiles layer file of Dojo build output using uglify.js.
ec5dc4
      Deletes all other files.
ec5dc4
 
ec5dc4
 OPTIONS
ec5dc4
@@ -105,7 +105,7 @@ if [[ ! $OUTPUT_FILE ]] ; then
ec5dc4
     OUTPUT_FILE=$RDIR/$RELEASE/$LAYER.js
ec5dc4
 fi
ec5dc4
 
ec5dc4
-# compile using python rjsmin
ec5dc4
+# compile using uglifyjs
ec5dc4
 echo "Minimizing: $RDIR/$RELEASE/$LAYER.js"
ec5dc4
 echo "Target file: $OUTPUT_FILE"
ec5dc4
-${PYTHON:-python3} -m rjsmin < $RDIR/$RELEASE/$LAYER.js > $OUTPUT_FILE
ec5dc4
+uglifyjs $RDIR/$RELEASE/$LAYER.js > $OUTPUT_FILE
ec5dc4
-- 
ec5dc4
2.26.2
ec5dc4