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