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