/hg/icedtea-web: 2 new changesets
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Tue Dec 12 14:10:49 UTC 2017
changeset 64ed9b72cfa0 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=64ed9b72cfa0
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Dec 12 14:58:51 2017 +0100
Added possibility to turn off https preference via deployment properties
* netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: if deployment.https.noenforce is true, then https variants are not smuggled into urlslist
* netx/net/sourceforge/jnlp/config/Defaults.java: deployment.https.noenforce declared as false by default
* netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: added field of KEY_HTTPS_DONT_ENFORCE = "deployment.https.noenforce"
changeset 48c20674b2e4 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=48c20674b2e4
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Dec 12 15:09:45 2017 +0100
built-time variables propaagted to rust lunchers
* Makefile.am: preprocessing hardoced_paths.rs.in for each binary and creating libs
* rust-launcher/launchers.rs: now uses new, future lib
* rust-launcher/hardoced_paths.rs.in: source for all hardcoded libs we currently use
diffstat:
ChangeLog | 16 +++++
Makefile.am | 35 ++++++++--
netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java | 21 ++++--
netx/net/sourceforge/jnlp/config/Defaults.java | 7 +-
netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java | 3 +
rust-launcher/hardoced_paths.rs.in | 13 ++++
rust-launcher/launchers.rs | 8 ++-
7 files changed, 84 insertions(+), 19 deletions(-)
diffs (176 lines):
diff -r 8fc0a95eb645 -r 48c20674b2e4 ChangeLog
--- a/ChangeLog Thu Nov 23 18:53:25 2017 +0100
+++ b/ChangeLog Tue Dec 12 15:09:45 2017 +0100
@@ -1,3 +1,19 @@
+2017-12-11 Jiri Vanek <jvanek at redhat.com>
+
+ * Makefile.am: preprocessing hardoced_paths.rs.in for each binary and creating libs
+ * rust-launcher/launchers.rs: now uses new, future lib
+ * rust-launcher/hardoced_paths.rs.in: source for all hardcoded libs we currently use
+
+2017-12-08 Jiri Vanek <jvanek at redhat.com>
+
+ Added possibility to turn off https preference via deployment properties
+ * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java:
+ if deployment.https.noenforce is true, then https variants are not smuggled into urlslist
+ * netx/net/sourceforge/jnlp/config/Defaults.java:
+ deployment.https.noenforce declared as false by default
+ * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java:
+ added field of KEY_HTTPS_DONT_ENFORCE = "deployment.https.noenforce"
+
2017-11-02 Jiri Vanek <jvanek at redhat.com>
Added linux binary dist target
diff -r 8fc0a95eb645 -r 48c20674b2e4 Makefile.am
--- a/Makefile.am Thu Nov 23 18:53:25 2017 +0100
+++ b/Makefile.am Tue Dec 12 15:09:45 2017 +0100
@@ -874,17 +874,33 @@
if ENABLE_NATIVE_LAUNCHERS
-launcher.build/$(javaws): rust-launcher/launchers.rs
- mkdir -p launcher.build
- $(RUSTC) -o $@ $<
+launcher.in/libhardoced_paths_$(javaws).rs: rust-launcher/hardoced_paths.rs.in
+ mkdir -p launcher.in
+ MAIN_CLASS=net.sourceforge.jnlp.runtime.Boot ;\
+ BIN_LOCATION=$(bindir)/$(javaws).sh ;\
+ PROGRAM_NAME=$(javaws) ;\
+ $(edit_launcher_script) < $< > $@
-launcher.build/$(itweb_settings): rust-launcher/launchers.rs
+launcher.in/libhardoced_paths_$(itweb_settings).rs: rust-launcher/hardoced_paths.rs.in
+ mkdir -p launcher.in
+ MAIN_CLASS=net.sourceforge.jnlp.controlpanel.CommandLine ;\
+ BIN_LOCATION=$(bindir)/$(itweb_settings).sh ;\
+ PROGRAM_NAME=$(itweb_settings) ;\
+ $(edit_launcher_script) < $< > $@
+
+launcher.in/libhardoced_paths_$(policyeditor).rs: rust-launcher/hardoced_paths.rs.in
+ mkdir -p launcher.in
+ MAIN_CLASS=net.sourceforge.jnlp.security.policyeditor.PolicyEditor ;\
+ BIN_LOCATION=$(bindir)/$(policyeditor).sh ;\
+ PROGRAM_NAME=$(policyeditor) ;\
+ $(edit_launcher_script) < $< > $@
+
+launcher.in/libhardoced_paths_$(javaws).rlib launcher.in/libhardoced_paths_$(itweb_settings).rlib launcher.in/libhardoced_paths_$(policyeditor).rlib: %.rlib: %.rs
+ $(RUSTC) --crate-type=lib -o $@ $<
+
+launcher.build/$(javaws) launcher.build/$(itweb_settings) launcher.build/$(policyeditor): launcher.build/%: launcher.in/libhardoced_paths_%.rlib rust-launcher/launchers.rs
mkdir -p launcher.build
- $(RUSTC) -o $@ $<
-
-launcher.build/$(policyeditor): rust-launcher/launchers.rs
- mkdir -p launcher.build
- $(RUSTC) -o $@ $<
+ $(RUSTC) --extern hardcoded_paths=$< -o $@ rust-launcher/launchers.rs
endif
if ENABLE_SHELL_LAUNCHERS
@@ -942,6 +958,7 @@
rm -f launcher.build/$(javaws)
rm -f launcher.build/$(itweb_settings)
rm -f launcher.build/$(policyeditor)
+ rm -f launcher.in
endif
if ENABLE_SHELL_LAUNCHERS
rm -f launcher.build/$(javaws).sh
diff -r 8fc0a95eb645 -r 48c20674b2e4 netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java
--- a/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Thu Nov 23 18:53:25 2017 +0100
+++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Tue Dec 12 15:09:45 2017 +0100
@@ -42,6 +42,8 @@
import java.util.List;
import net.sourceforge.jnlp.DownloadOptions;
+import net.sourceforge.jnlp.config.DeploymentConfiguration;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.util.logging.OutputController;
public class ResourceUrlCreator {
@@ -95,14 +97,17 @@
urls.add(resource.getLocation());
- //preffering https and owerriding case, when applciation was moved to https, but the jnlp stayed intacted
- List<URL> urlsCopy = new LinkedList<>(urls);
- for (URL u : urlsCopy) {
- if (u.getProtocol().equals("http")) {
- try {
- urls.add(0, copyUrltoHttps(u));
- } catch (Exception ex) {
- OutputController.getLogger().log(ex);
+ boolean noHttpsPreffered = Boolean.valueOf(JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_HTTPS_DONT_ENFORCE));
+ if (!noHttpsPreffered) {
+ //preffering https and owerriding case, when applciation was moved to https, but the jnlp stayed intacted
+ List<URL> urlsCopy = new LinkedList<>(urls);
+ for (URL u : urlsCopy) {
+ if (u.getProtocol().equals("http")) {
+ try {
+ urls.add(0, copyUrltoHttps(u));
+ } catch (Exception ex) {
+ OutputController.getLogger().log(ex);
+ }
}
}
}
diff -r 8fc0a95eb645 -r 48c20674b2e4 netx/net/sourceforge/jnlp/config/Defaults.java
--- a/netx/net/sourceforge/jnlp/config/Defaults.java Thu Nov 23 18:53:25 2017 +0100
+++ b/netx/net/sourceforge/jnlp/config/Defaults.java Tue Dec 12 15:09:45 2017 +0100
@@ -220,7 +220,12 @@
BasicValueValidators.getBooleanValidator(),
String.valueOf(true)
},
- {
+ {
+ DeploymentConfiguration.KEY_HTTPS_DONT_ENFORCE,
+ BasicValueValidators.getBooleanValidator(),
+ String.valueOf(false)
+ },
+ {
DeploymentConfiguration.KEY_SECURITY_PROMPT_USER_FOR_JNLP,
BasicValueValidators.getBooleanValidator(),
String.valueOf(true)
diff -r 8fc0a95eb645 -r 48c20674b2e4 netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java
--- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Thu Nov 23 18:53:25 2017 +0100
+++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Tue Dec 12 15:09:45 2017 +0100
@@ -151,6 +151,9 @@
public static final String KEY_SECURITY_INSTALL_AUTHENTICATOR = "deployment.security.authenticator";
public static final String KEY_STRICT_JNLP_CLASSLOADER = "deployment.jnlpclassloader.strict";
+
+ /** Boolean. Do not prefere https over http */
+ public static final String KEY_HTTPS_DONT_ENFORCE = "deployment.https.noenforce";
/*
* Networking
*/
diff -r 8fc0a95eb645 -r 48c20674b2e4 rust-launcher/hardoced_paths.rs.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rust-launcher/hardoced_paths.rs.in Tue Dec 12 15:09:45 2017 +0100
@@ -0,0 +1,13 @@
+/*legacy variables*/
+pub static PROGRAM_NAME: &'static str = "@PROGRAM_NAME@";
+pub static LAUNCHER_BOOTCLASSPATH: &'static str = "@LAUNCHER_BOOTCLASSPATH@";
+pub static JAVAWS_SPLASH_LOCATION: &'static str = "@JAVAWS_SPLASH_LOCATION@";
+pub static JAVA: &'static str = "@JAVA@";
+pub static JRE: &'static str = "@JRE@";
+pub static MAIN_CLASS: &'static str = "@MAIN_CLASS@";
+pub static BIN_LOCATION: &'static str = "@BIN_LOCATION@";
+pub static NETX_JAR: &'static str = "@NETX_JAR@";
+pub static PLUGIN_JAR: &'static str = "@PLUGIN_JAR@";
+pub static JSOBJECT_JAR: &'static str = "@JSOBJECT_JAR@";
+
+/*new variables*/
diff -r 8fc0a95eb645 -r 48c20674b2e4 rust-launcher/launchers.rs
--- a/rust-launcher/launchers.rs Thu Nov 23 18:53:25 2017 +0100
+++ b/rust-launcher/launchers.rs Tue Dec 12 15:09:45 2017 +0100
@@ -1,3 +1,9 @@
+/*extern crate hardcoded_paths;*/
+extern crate hardcoded_paths;
+
fn main() {
- println!("Hello, world!");
+ println!("{}",hardcoded_paths::PROGRAM_NAME);
+ println!("{}",hardcoded_paths::MAIN_CLASS);
+ println!("{}",hardcoded_paths::JAVA);
+ println!("{}",hardcoded_paths::JRE);
}
More information about the distro-pkg-dev
mailing list