diff --git a/.gitignore b/.gitignore index 03eb10f..58d9512 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/icedtea-web-1.5.2.tar.gz +SOURCES/icedtea-web-1.6.1.tar.gz diff --git a/.icedtea-web.metadata b/.icedtea-web.metadata index cab85e8..7be042f 100644 --- a/.icedtea-web.metadata +++ b/.icedtea-web.metadata @@ -1 +1 @@ -45eb9ef057cc5239cd85d7fdfc6394de86ee7e6b SOURCES/icedtea-web-1.5.2.tar.gz +1e7d8f9a57ba94b4db1a3d6a5b46b69ba77994e0 SOURCES/icedtea-web-1.6.1.tar.gz diff --git a/SOURCES/donLogToFileBeforeFileLogsInitiate.patch b/SOURCES/donLogToFileBeforeFileLogsInitiate.patch new file mode 100644 index 0000000..1ffb1ee --- /dev/null +++ b/SOURCES/donLogToFileBeforeFileLogsInitiate.patch @@ -0,0 +1,51 @@ +diff -r b02ae452f99f plugin/icedteanp/IcedTeaNPPlugin.cc +--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Sep 24 16:32:30 2015 +0200 ++++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Sep 29 13:15:10 2015 +0200 +@@ -241,6 +241,7 @@ + static guint appletviewer_watch_id = -1; + + bool debug_initiated = false; ++bool file_logs_initiated = false; + int plugin_debug = getenv ("ICEDTEAPLUGIN_DEBUG") != NULL; + bool plugin_debug_headers = false; + bool plugin_debug_to_file = false ; +diff -r b02ae452f99f plugin/icedteanp/IcedTeaNPPlugin.h +--- a/plugin/icedteanp/IcedTeaNPPlugin.h Thu Sep 24 16:32:30 2015 +0200 ++++ b/plugin/icedteanp/IcedTeaNPPlugin.h Tue Sep 29 13:15:10 2015 +0200 +@@ -117,6 +117,7 @@ + + // debug switches + extern bool debug_initiated; ++extern bool file_logs_initiated; + extern int plugin_debug; + extern bool plugin_debug_headers; + extern bool plugin_debug_to_file; +diff -r b02ae452f99f plugin/icedteanp/IcedTeaPluginUtils.h +--- a/plugin/icedteanp/IcedTeaPluginUtils.h Thu Sep 24 16:32:30 2015 +0200 ++++ b/plugin/icedteanp/IcedTeaPluginUtils.h Tue Sep 29 13:15:10 2015 +0200 +@@ -86,6 +86,7 @@ + plugin_debug_to_console = is_java_console_enabled(); \ + if (plugin_debug_to_file) { \ + IcedTeaPluginUtilities::initFileLog(); \ ++ file_logs_initiated = true; \ + } \ + if (plugin_debug_to_console) { \ + /*initialisation done during jvm startup*/ \ +@@ -134,7 +135,7 @@ + snprintf(ldebug_message, MESSAGE_SIZE, "%s%s", ldebug_header, ldebug_body); \ + fprintf (stdout, "%s", ldebug_message);\ + } \ +- if (plugin_debug_to_file) { \ ++ if (plugin_debug_to_file && file_logs_initiated) { \ + snprintf(ldebug_message, MESSAGE_SIZE, "%s%s", ldebug_header, ldebug_body); \ + fprintf (plugin_file_log, "%s", ldebug_message); \ + fflush(plugin_file_log); \ +@@ -180,7 +181,7 @@ + snprintf(ldebug_message, MESSAGE_SIZE, "%s%s", ldebug_header, ldebug_body); \ + fprintf (stderr, "%s", ldebug_message); \ + } \ +- if (plugin_debug_to_file) { \ ++ if (plugin_debug_to_file && file_logs_initiated) { \ + snprintf(ldebug_message, MESSAGE_SIZE, "%s%s", ldebug_header, ldebug_body); \ + fprintf (plugin_file_log, "%s", ldebug_message); \ + fflush(plugin_file_log); \ diff --git a/SOURCES/fileLogInitializationError-1.6.patch b/SOURCES/fileLogInitializationError-1.6.patch new file mode 100644 index 0000000..003e313 --- /dev/null +++ b/SOURCES/fileLogInitializationError-1.6.patch @@ -0,0 +1,158 @@ +diff -r 2b1af623e3a8 NEWS +--- a/NEWS Thu Oct 08 12:11:49 2015 +0200 ++++ b/NEWS Wed Oct 14 10:37:54 2015 +0200 +@@ -23,6 +23,7 @@ + * RH1231441 Unable to read the text of the buttons of the security dialogue + * Fixed RH1233697 icedtea-web: applet origin spoofing + * Fixed RH1233667 icedtea-web: unexpected permanent authorization of unsigned applets ++* fixed fatal impact of initialization error of FileLog + * MissingALACAdialog made available also for unsigned applications (but ignoring actual manifest value) and fixed + * NetX + - fixed issues with -html shortcuts +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/FileLog.java +--- a/netx/net/sourceforge/jnlp/util/logging/FileLog.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/FileLog.java Wed Oct 14 10:37:54 2015 +0200 +@@ -60,21 +60,46 @@ + private final FileHandler fh; + private static final String defaultloggerName = "IcedTea-Web file-logger"; + +- public FileLog() { ++ ++ public static SingleStreamLogger createFileLog() { ++ SingleStreamLogger s; ++ try { ++ s = new FileLog(); ++ } catch (Exception ex) { ++ //we do not wont to block whole logging just because initialization error in "new FileLog()" ++ OutputController.getLogger().log(ex); ++ s = new SingleStreamLogger() { ++ ++ @Override ++ public void log(String s) { ++ //dummy ++ } ++ ++ @Override ++ public void close() { ++ //dummy ++ } ++ }; ++ } ++ return s; ++ } ++ ++ private FileLog() { + this(false); + } + +- public FileLog(boolean append) { ++ private FileLog(boolean append) { + this(defaultloggerName, LogConfig.getLogConfig().getIcedteaLogDir() + "itw-javantx-" + getStamp() + ".log", append); + } + + +- +- public FileLog(String fileName, boolean append) { ++ // testing constructor ++ FileLog(String fileName, boolean append) { + this(fileName, fileName, append); + } + +- public FileLog(String loggerName, String fileName, boolean append) { ++ ++ private FileLog(String loggerName, String fileName, boolean append) { + try { + File futureFile = new File(fileName); + if (!futureFile.exists()) { +@@ -106,6 +131,7 @@ + impl.log(Level.FINE, s); + } + ++ @Override + public void close() { + fh.close(); + } +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/OutputController.java +--- a/netx/net/sourceforge/jnlp/util/logging/OutputController.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/OutputController.java Wed Oct 14 10:37:54 2015 +0200 +@@ -333,9 +333,9 @@ + + //https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java + //https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom +- private static volatile FileLog INSTANCE = new FileLog(); ++ private static volatile SingleStreamLogger INSTANCE = FileLog.createFileLog(); + } +- private FileLog getFileLog() { ++ private SingleStreamLogger getFileLog() { + return FileLogHolder.INSTANCE; + } + +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/PrintStreamLogger.java +--- a/netx/net/sourceforge/jnlp/util/logging/PrintStreamLogger.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/PrintStreamLogger.java Wed Oct 14 10:37:54 2015 +0200 +@@ -58,6 +58,11 @@ + public void setStream(PrintStream stream) { + this.stream = stream; + } ++ ++ @Override ++ public void close() { ++ stream.flush(); ++ } + + + +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/SingleStreamLogger.java +--- a/netx/net/sourceforge/jnlp/util/logging/SingleStreamLogger.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/SingleStreamLogger.java Wed Oct 14 10:37:54 2015 +0200 +@@ -41,6 +41,7 @@ + + + public void log(String s); ++ public void close(); + + + } +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java +--- a/netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java Wed Oct 14 10:37:54 2015 +0200 +@@ -63,6 +63,11 @@ + OutputController.getLogger().log(ex); + } + } ++ ++ @Override ++ public void close() { ++ //nope ++ } + + + } +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/WinSystemLog.java +--- a/netx/net/sourceforge/jnlp/util/logging/WinSystemLog.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/WinSystemLog.java Wed Oct 14 10:37:54 2015 +0200 +@@ -49,9 +49,10 @@ + public void log(String s) { + //not yet implemented + } +- +- + +- ++ @Override ++ public void close() { ++ //nope ++ } + + } +diff -r 2b1af623e3a8 netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java +--- a/netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java Thu Oct 08 12:11:49 2015 +0200 ++++ b/netx/net/sourceforge/jnlp/util/logging/headers/PluginMessage.java Wed Oct 14 10:37:54 2015 +0200 +@@ -38,7 +38,6 @@ + package net.sourceforge.jnlp.util.logging.headers; + + import java.util.Date; +-import net.sourceforge.jnlp.util.logging.FileLog; + import net.sourceforge.jnlp.util.logging.OutputController; + + public class PluginMessage implements MessageWithHeader{ diff --git a/SOURCES/icedtea-web-javaws.appdata.xml b/SOURCES/icedtea-web-javaws.appdata.xml new file mode 100644 index 0000000..fe0971b --- /dev/null +++ b/SOURCES/icedtea-web-javaws.appdata.xml @@ -0,0 +1,48 @@ + + + + + javaws.desktop + icedtea-web + Java + Javaws implementation from OpenJDK + + +

+Free java implementation of jnlp launching protocol. +

+Originally based on NetX,but now bringing many improvements compared to proprietary implementations. +

+Powerful debug console, internal appletviewer, safe run-in-sandbox option, extendable "remember me" options and custom policy editor. +

+It have also possibility to turn all security off and just enjoy legacy web (on your own risk). All via simple itweb-settings gui. +

+
+ http://icedtea.classpath.org/wiki/IcedTea-Web + CC0-1.0 + jvanek_at_redhat.com + +​ text/jnlp + + + + http://icedtea.classpath.org/wiki/images/Javaws_splash.png + Itw self describing splash screen + + + http://icedtea.classpath.org/wiki/images/Fullysigned.png + Run in sandbox dialof + + + http://icedtea.classpath.org/wiki/images/Policyeditor-in-use.png + Simplified view of policy editor + + +
diff --git a/SOURCES/icedtea-web.metainfo.xml b/SOURCES/icedtea-web.metainfo.xml new file mode 100644 index 0000000..43ca8fb --- /dev/null +++ b/SOURCES/icedtea-web.metainfo.xml @@ -0,0 +1,13 @@ + + + + icedtea-web + epiphany.desktop + firefox.desktop + midori.desktop + Java + Browser plug-in implementation from OpenJDK. This plugin is running java applets + http://icedtea.classpath.org/wiki/IcedTea-Web + CC0-1.0 + jvanek_at_redhat.com + diff --git a/SOURCES/javadocFixes.patch b/SOURCES/javadocFixes.patch new file mode 100644 index 0000000..81f8486 --- /dev/null +++ b/SOURCES/javadocFixes.patch @@ -0,0 +1,32 @@ +--- netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditorPermissions.java ++++ netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditorPermissions.java +@@ -193,6 +193,10 @@ + return false; + } + ++/** ++Return title for policy. ++@return title ++*/ + public String getTitle() { + return title + " ˇ"; + } +--- netx/net/sourceforge/jnlp/security/package-info.java ++++ netx/net/sourceforge/jnlp/security/package-info.java +@@ -32,6 +32,7 @@ + statement from your version.*/ + /** + *
++{@code
+         ITW-thread(s)               | dialogs-thread                                                                                                                                  X
+                                     |                                                                                                                                                 X
+    presteps in SecurtyDialogs       |                                                                                                                                                 X
+@@ -75,7 +76,7 @@
+             |                       |                                                                                                                                                 X
+    continue accordingly             |                                                                                                                                                 X
+                                                                                                                                                                                       X
+-
++}
+  *
+ */ + package net.sourceforge.jnlp.security; diff --git a/SPECS/icedtea-web.spec b/SPECS/icedtea-web.spec index d0a1039..f8b667d 100644 --- a/SPECS/icedtea-web.spec +++ b/SPECS/icedtea-web.spec @@ -1,25 +1,29 @@ # Version of java -%define javaver 1.7.0 +%define javaver 1.8.0 # Alternatives priority -%define priority 17000 +%define priority 18000 - -%define javadir %{_jvmdir}/java-openjdk -%define jredir %{_jvmdir}/jre-openjdk +%define javadir %{_jvmdir}/java-%{javaver}-openjdk +%define jredir %{_jvmdir}/jre-%{javaver}-openjdk %define javaplugin libjavaplugin.so.%{_arch} %define binsuffix .itweb Name: icedtea-web -Version: 1.5.2 -Release: 0%{?dist} +Version: 1.6.1 +Release: 4%{?dist} Summary: Additional Java components for OpenJDK - Java browser plug-in and Web Start implementation Group: Applications/Internet License: LGPLv2+ and GPLv2 with exceptions URL: http://icedtea.classpath.org/wiki/IcedTea-Web Source0: http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz +Source1: icedtea-web.metainfo.xml +Source2: icedtea-web-javaws.appdata.xml +Patch0: javadocFixes.patch +Patch1: donLogToFileBeforeFileLogsInitiate.patch +Patch2: fileLogInitializationError-1.6.patch BuildRequires: java-%{javaver}-openjdk-devel BuildRequires: desktop-file-utils @@ -29,6 +33,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: xulrunner-devel BuildRequires: junit4 +BuildRequires: libappstream-glib # new in 1.5 to have clean up for malformed XMLs BuildRequires: tagsoup # rhino is used as JS evaluator in testtime @@ -79,6 +84,9 @@ This package contains Javadocs for the IcedTea-Web project. %prep %setup -q +%patch0 +%patch1 -p1 +%patch2 -p1 %build autoreconf -vfi @@ -97,22 +105,28 @@ make %{?_smp_mflags} rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT +# icedteaweb-completion is currently not handled by make nor make install +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/ +cp icedteaweb-completion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/ + # Move javaws man page to a more specific name mv $RPM_BUILD_ROOT/%{_mandir}/man1/javaws.1 $RPM_BUILD_ROOT/%{_mandir}/man1/javaws-itweb.1 # Install desktop files. install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps} -cp javaws.png $RPM_BUILD_ROOT%{_datadir}/pixmaps desktop-file-install --vendor ''\ --dir $RPM_BUILD_ROOT%{_datadir}/applications javaws.desktop desktop-file-install --vendor ''\ --dir $RPM_BUILD_ROOT%{_datadir}/applications itweb-settings.desktop desktop-file-install --vendor ''\ --dir $RPM_BUILD_ROOT%{_datadir}/applications policyeditor.desktop -ln -s %{_mandir}/man1/javaws-itweb.1 $RPM_BUILD_ROOT/%{_mandir}/man1/icedtea-web.1 + +# install MetaInfo file for firefox +DESTDIR=%{buildroot} appstream-util install %{SOURCE1} %check make check +appstream-util validate $RPM_BUILD_ROOT/%{_datadir}/appdata/*.xml %post alternatives \ @@ -139,12 +153,17 @@ exit 0 %files %defattr(-,root,root,-) +%{_sysconfdir}/bash_completion.d/ %{_prefix}/bin/* %{_libdir}/IcedTeaPlugin.so %{_datadir}/applications/* %{_datadir}/icedtea-web %{_datadir}/man/man1/* +%{_datadir}/man/cs/man1/* +%{_datadir}/man/de/man1/* +%{_datadir}/man/pl/man1/* %{_datadir}/pixmaps/* +%{_datadir}/appdata/*.xml %doc NEWS README COPYING %files javadoc @@ -153,6 +172,35 @@ exit 0 %doc COPYING %changelog +* Wed Oct 14 2015 Jiri Vanek 1.6.1-4 +- added and and applied patch2 fileLogInitializationError-1.6.patch to prevent +consequences 1268909 +- Resolves: rhbz#1217153 + +* Tue Sep 29 2015 Jiri Vanek 1.6.1-3 +- added and applied patch1 donLogToFileBeforeFileLogsInitiate.patch +- Resolves: rhbz#1217153 + +* Mon Sep 21 2015 Jiri Vanek 1.6.1-2 +- added and applied patch0 javadocFixes.patch +- Resolves: rhbz#1217153 + +* Fri Sep 11 2015 Jiri Vanek 1.6.1-1 +- updated to upstream release 1.6.1 +- metadata xml files enhanced for javaws +- forced to use jdk8 by default +- Resolves: rhbz#1217153 + +* Thu Aug 27 2015 Jiri Vanek 1.6.0-2 +- added gnome-software support +- Resolves: rhbz#1217153 + +* Thu Nov 27 2014 Jiri Vanek 1.6.0-1 +- update to upstream 1.6 +- made to use jdk8 (rh1184970) +- it will be necessary for 1.6.1 anyway (rh1233687) +- Resolves: rhbz#1217153 + * Thu Nov 27 2014 Jiri Vanek 1.5.2-0 - update to upstream 1.5.2 - enabled tagsoup