[nspluginwrapper/f17] Sync with rawhide:
Martin Stransky
stransky at fedoraproject.org
Mon Aug 13 14:46:06 UTC 2012
commit 790ed8db6e3918245223fa542617c27d14939281
Author: Martin Stransky <stransky at redhat.com>
Date: Mon Aug 13 16:45:42 2012 +0200
Sync with rawhide:
* Mon Aug 13 2012 Martin Stransky <stransky at redhat.com> 1.4.4-11
- Fixed bug #841798 - don't wrap plugins with the same arch
* Wed Jul 18 2012 Martin Stransky <stransky at redhat.com> 1.4.4-10
- Restart workaround for Adobe Reader plugin (rhbz#645599)
nspluginwrapper-1.4.4-restart.patch | 77 +++++++++++++++++++++++++++++++++++
nspluginwrapper.spec | 14 +++++-
plugin-config-native.patch | 11 -----
plugin-config-non-native.patch | 16 +++++++
4 files changed, 104 insertions(+), 14 deletions(-)
---
diff --git a/nspluginwrapper-1.4.4-restart.patch b/nspluginwrapper-1.4.4-restart.patch
new file mode 100644
index 0000000..e8fba47
--- /dev/null
+++ b/nspluginwrapper-1.4.4-restart.patch
@@ -0,0 +1,77 @@
+diff -up nspluginwrapper-1.4.4/src/npw-wrapper.c.restart nspluginwrapper-1.4.4/src/npw-wrapper.c
+--- nspluginwrapper-1.4.4/src/npw-wrapper.c.restart 2011-07-01 05:18:57.000000000 +0200
++++ nspluginwrapper-1.4.4/src/npw-wrapper.c 2012-07-18 15:49:11.329877655 +0200
+@@ -115,6 +115,7 @@ static void plugin_exit(void);
+ static void plugin_kill_cb(rpc_connection_t *connection, void *user_data);
+ static NPError plugin_start(void);
+ static NPError plugin_start_if_needed(void);
++static void plugin_kill(void);
+ static int plugin_killed = 0;
+
+ /*
+@@ -2104,31 +2105,44 @@ g_NPP_New(NPMIMEType mime_type, NPP inst
+ uint16_t mode, int16_t argc, char *argn[], char *argv[],
+ NPSavedData *saved)
+ {
++ NPError ret;
++ int attempt = 1;
++
+ if (instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+-
+- // Check if we need to restart the plug-in
+- NPError ret = plugin_start_if_needed();
+- if (ret != NPERR_NO_ERROR)
+- return ret;
+
+- PluginInstance *plugin = npw_plugin_instance_new(&PluginInstanceClass);
+- if (plugin == NULL)
+- return NPERR_OUT_OF_MEMORY_ERROR;
+- plugin->instance = instance;
+- plugin->instance_id = id_create(plugin);
+- plugin->connection = rpc_connection_ref(g_rpc_connection);
+- instance->pdata = plugin;
++ do {
++ // Check if we need to restart the plug-in
++ NPError ret = plugin_start_if_needed();
++ if (ret != NPERR_NO_ERROR)
++ return ret;
++
++ PluginInstance *plugin = npw_plugin_instance_new(&PluginInstanceClass);
++ if (plugin == NULL)
++ return NPERR_OUT_OF_MEMORY_ERROR;
++ plugin->instance = instance;
++ plugin->instance_id = id_create(plugin);
++ plugin->connection = rpc_connection_ref(g_rpc_connection);
++ instance->pdata = plugin;
++
++ if (PLUGIN_DIRECT_EXEC) {
++ if ((plugin->native_instance = NPW_MemNew0(NPP_t, 1)) == NULL)
++ return NPERR_OUT_OF_MEMORY_ERROR;
++ plugin->native_instance->ndata = instance->ndata;
++ }
++
++ D(bugiI("NPP_New instance=%p\n", instance));
++ ret = invoke_NPP_New(plugin, mime_type, mode, argc, argn, argv, saved);
++ D(bugiD("NPP_New return: %d [%s]\n", ret, string_of_NPError(ret)));
++
++ // NPP_New was succesfull or we exhausted all our restart attempts
++ if(!ret || attempt == 0)
++ break;
+
+- if (PLUGIN_DIRECT_EXEC) {
+- if ((plugin->native_instance = NPW_MemNew0(NPP_t, 1)) == NULL)
+- return NPERR_OUT_OF_MEMORY_ERROR;
+- plugin->native_instance->ndata = instance->ndata;
+- }
+-
+- D(bugiI("NPP_New instance=%p\n", instance));
+- ret = invoke_NPP_New(plugin, mime_type, mode, argc, argn, argv, saved);
+- D(bugiD("NPP_New return: %d [%s]\n", ret, string_of_NPError(ret)));
++ // kill the plugin
++ plugin_kill();
++ attempt--;
++ } while(1);
+
+ if (saved) {
+ if (saved->buf)
diff --git a/nspluginwrapper.spec b/nspluginwrapper.spec
index f5b9ab2..30b1022 100644
--- a/nspluginwrapper.spec
+++ b/nspluginwrapper.spec
@@ -83,7 +83,7 @@
Summary: A compatibility layer for Netscape 4 plugins
Name: nspluginwrapper
Version: 1.4.4
-Release: 9%{?dist}
+Release: 11%{?dist}
License: GPLv2+
Group: Applications/Internet
Url: http://gwenole.beauchesne.info/projects/nspluginwrapper/
@@ -100,10 +100,11 @@ Patch7: nspluginwrapper-1.3.0-comp.patch
Patch9: nspluginwrapper-1.3.0-timeout.patch
Patch10: nspluginwrapper-pthread.patch
Patch11: nspluginwrapper-arm.patch
+Patch12: nspluginwrapper-1.4.4-restart.patch
Patch100: plugin-config-setuid.patch
Patch101: plugin-config-umask.patch
Patch102: plugin-config-print.patch
-Patch103: plugin-config-native.patch
+Patch103: plugin-config-non-native.patch
Patch104: plugin-config-time-check.patch
Provides: %{name} = %{version}-%{release}
@@ -136,13 +137,14 @@ THREAD_LIBS=`pkg-config --libs gthread-2.0`
sed -e "s/__PTHREAD_LIBS__/$THREAD_LIBS/" %{P:%%PATCH10} > pthread.patch
%{__patch} -p1 -b --suffix .version --fuzz=0 < pthread.patch
%patch11 -p1 -b .arm
+%patch12 -p1 -b .restart
# Plugin-config patches
pushd %plugin_config_name
%patch100 -p2
%patch101 -p2 -b .umask
%patch102 -p2 -b .print
-%patch103 -p2 -b .native
+%patch103 -p2 -b .non-native
%patch104 -p2 -b .time
popd
@@ -261,6 +263,12 @@ fi;
%changelog
+* Mon Aug 13 2012 Martin Stransky <stransky at redhat.com> 1.4.4-11
+- Fixed bug #841798 - don't wrap plugins with the same arch
+
+* Wed Jul 18 2012 Martin Stransky <stransky at redhat.com> 1.4.4-10
+- Restart workaround for Adobe Reader plugin (rhbz#645599)
+
* Tue May 15 2012 Peter Robinson <pbrobinson at fedoraproject.org> 1.4.4-9
- Enable building on ARM, add patch to detect CPU
diff --git a/plugin-config-non-native.patch b/plugin-config-non-native.patch
new file mode 100644
index 0000000..24b9ea5
--- /dev/null
+++ b/plugin-config-non-native.patch
@@ -0,0 +1,16 @@
+diff -up nspluginwrapper-1.4.4/plugin-config-1.9/src/plugin-config.c.non-native nspluginwrapper-1.4.4/plugin-config-1.9/src/plugin-config.c
+--- nspluginwrapper-1.4.4/plugin-config-1.9/src/plugin-config.c.non-native 2012-08-13 15:33:19.000000000 +0200
++++ nspluginwrapper-1.4.4/plugin-config-1.9/src/plugin-config.c 2012-08-13 15:37:02.660811240 +0200
+@@ -373,12 +373,6 @@ int get_wrap_config(WRAP_PLUGIN *p_plugi
+ {
+ int wrap = FALSE;
+
+- if(p_plugin->t_bits == BITS_32 && p_plugin->s_bits == p_plugin->t_bits) {
+- wrap = cfg.wrapper_32b;
+- }
+- if(p_plugin->t_bits == BITS_64 && p_plugin->s_bits == p_plugin->t_bits) {
+- wrap = cfg.wrapper_64b;
+- }
+ if(p_plugin->t_bits == BITS_64 && p_plugin->s_bits == BITS_32) {
+ wrap = cfg.wrapper_64b && cfg.wrapper_32b;
+ }
More information about the scm-commits
mailing list