From c92578a86ae4e5824bfac7d286f092e2481ce80d Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Aug 04 2016 14:54:02 +0000 Subject: Updated to 1.1.7.1 --- diff --git a/.gitignore b/.gitignore index b109283..f6f9d69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ system-switch-java-1.1.5.tar.gz /system-switch-java-1.1.6.tar.xz +/system-switch-java-1.1.7.1.tar.xz diff --git a/jdk9Support.patch b/jdk9Support.patch deleted file mode 100644 index 7521649..0000000 --- a/jdk9Support.patch +++ /dev/null @@ -1,107 +0,0 @@ -# HG changeset patch -# User Omair Majid -# Date 1458765800 14400 -# Wed Mar 23 16:43:20 2016 -0400 -# Node ID e4ce6c525f5363fdb42856ba26d49c2132c075d9 -# Parent 0ddda6dcf48b900ece48532c34c7e24719e3241f -Add support for OpenJDK 9 - -JEP 220 (Modular Run-Time Images) completely changes the layout of the -JDK/JRE files and directories. Specifically: - -"The bin directory will contain any command-line launchers defined by -the modules linked into the image." - -And: - -"A JDK image will [...] no longer contain a jre subdirectory." - -This change updates the code to accept a JDK directory without a jre -subdirectory. - -diff -r 0ddda6dcf48b -r e4ce6c525f53 ChangeLog ---- a/ChangeLog Tue Nov 24 14:56:19 2015 +0100 -+++ b/ChangeLog Wed Mar 23 16:43:20 2016 -0400 -@@ -1,3 +1,16 @@ -+2016-03-23 Omair Majid -+ -+ * po/system-switch-java.pot: Regenerated. -+ * switch_java_functions.py (get_java_identifiers) -+ (initialize_alternatives_dictionaries): Accept JDK directories without a -+ 'jre' sub-directory. -+ * tests/test_switch_java_functions.py: -+ (test_get_java_identifiers_finds_jre_in_jdk_without_jre_subdir) -+ (test_initialize_alternative_dictionaries_picks_up_java_with_jre_subdir) -+ (test_initialize_alternative_dictionaries_picks_up_java_without_jre_subdir) -+ (test_initialize_alternative_dictionaries_picks_up_jre_without_jre_subdir): -+ New tests. -+ - 2015-11-23 Jiri Vanek - - Added support for family flag of future alternatives -diff -r 0ddda6dcf48b -r e4ce6c525f53 switch_java_functions.py ---- a/switch_java_functions.py Tue Nov 24 14:56:19 2015 +0100 -+++ b/switch_java_functions.py Wed Mar 23 16:43:20 2016 -0400 -@@ -160,14 +160,17 @@ - def version_sort_wrapper(i, j): - return version_sort(i[0],j[0]) - --def get_java_identifiers(): -+def get_java_identifiers(get_alternatives_func=None): -+ if get_alternatives_func is None: -+ get_alternatives_func = get_alternatives - java_identifiers = [] - # indicates whether each java_identifier is a jdk or jre - jdks = [] - best_identifier = None -- alternatives, best = get_alternatives('java') -+ alternatives, best = get_alternatives_func('java') - jre_expression = re.compile('/usr/lib/jvm/jre-([^/]+)/bin/java') -- jdk_expression = re.compile('/usr/lib/jvm/java-([^/]+)/jre/bin/java') -+ # Since Java 9, there's no separate jre dir -+ jdk_expression = re.compile('/usr/lib/jvm/java-([^/]+)/(jre/)?bin/java') - best_identifier_index = -1 - for i in range(len(alternatives)): - alternative = alternatives[i] -@@ -329,25 +332,37 @@ - raise JavaParseError - return alternatives, best - --def initialize_alternatives_dictionaries(java_identifiers_and_jdks): -+def initialize_alternatives_dictionaries(java_identifiers_and_jdks, path_exists=None): -+ if path_exists is None: -+ path_exists = os.path.exists - plugin_alternatives = get_plugin_alternatives({}, '') - javadocdir_alternatives = get_javadocdir_alternatives() - arch_found = False - for (java, is_jdk) in java_identifiers_and_jdks: - vendor, version, arch = get_java_split(java) - if is_jdk: -- JAVA[java] = '/usr/lib/jvm/java-' + java + '/jre/bin/java' -+ # since Java 9, there's no separate jre subdir -+ candidate = '/usr/lib/jvm/java-' + java + '/jre/bin/java' -+ if path_exists(candidate): -+ JAVA[java] = candidate -+ else: -+ JAVA[java] = '/usr/lib/jvm/java-' + java + '/bin/java' - else: - JAVA[java] = '/usr/lib/jvm/jre-' + java + '/bin/java' - # Command-to-alternative-name map to set default alternative. - ALTERNATIVES[JAVA[java]] = java - if is_jdk: -- JRE[java] = '/usr/lib/jvm/java-' + java + '/jre' -+ # since Java 9, there's no separate jre subdir -+ candidate = '/usr/lib/jvm/java-' + java + '/jre' -+ if path_exists(candidate): -+ JRE[java] = candidate -+ else: -+ JRE[java] = '/usr/lib/jvm/java-' + java - else: - JRE[java] = '/usr/lib/jvm/jre-' + java - jce = '/usr/lib/jvm-private/java-' + java\ - + '/jce/vanilla/local_policy.jar' -- if os.path.exists(jce): -+ if path_exists(jce): - JCE[java] = jce - else: - JCE[java] = None diff --git a/sources b/sources index c42047d..0a513cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -16838adaf49f533ad099a1f0037d7dbb system-switch-java-1.1.6.tar.xz +b8a64c16eccbd5f36569bd890561130d system-switch-java-1.1.7.1.tar.xz diff --git a/system-switch-java.spec b/system-switch-java.spec index 3fdf444..6922060 100644 --- a/system-switch-java.spec +++ b/system-switch-java.spec @@ -1,6 +1,6 @@ Name: system-switch-java -Version: 1.1.6 -Release: 3%{?dist} +Version: 1.1.7.1 +Release: 0%{?dist} Summary: A tool for changing the default Java toolset %define baseurl https://fedorahosted.org @@ -9,7 +9,6 @@ Group: Applications/System License: GPLv2+ and BSD URL: %{baseurl}/%{name} Source0: %{baseurl}/releases/s/y/system-switch-java/%{name}-%{version}.tar.xz -Patch0: jdk9Support.patch BuildArch: noarch @@ -33,7 +32,6 @@ the default Java toolset for the system. %prep %setup -q -%patch0 -p1 %build %configure @@ -65,6 +63,9 @@ desktop-file-install \ %config(noreplace) /etc/security/console.apps/%{name} %changelog +* Thu Aug 04 2016 Jiri Vanek - 1.1.7.1-1 +- updated to latest upstream, removed upstreamed patches + * Tue Apr 26 2016 Jiri Vanek - 1.1.6-3 - added upsteam patch 107 for better jdk9 support