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