rpms/nspluginwrapper/F-13 plugin-config-time-check.patch, NONE, 1.1 nspluginwrapper.spec, 1.85, 1.86
Martin Stransky
stransky at fedoraproject.org
Mon Jun 28 13:00:11 UTC 2010
Author: stransky
Update of /cvs/pkgs/rpms/nspluginwrapper/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv12838
Modified Files:
nspluginwrapper.spec
Added Files:
plugin-config-time-check.patch
Log Message:
Fixed rhbz#523273 - wrapped plugins not getting updated
plugin-config-time-check.patch:
plugin-config.c | 35 +++++++++++++++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
--- NEW FILE plugin-config-time-check.patch ---
diff -up nspluginwrapper-1.3.0/plugin-config-1.9/src/plugin-config.c.time nspluginwrapper-1.3.0/plugin-config-1.9/src/plugin-config.c
--- nspluginwrapper-1.3.0/plugin-config-1.9/src/plugin-config.c.time 2010-06-28 14:44:39.000000000 +0200
+++ nspluginwrapper-1.3.0/plugin-config-1.9/src/plugin-config.c 2010-06-28 14:52:57.000000000 +0200
@@ -400,6 +400,32 @@ int get_link_config(WRAP_PLUGIN *p_plugi
return(link);
}
+time_t get_plugin_time(char * filename)
+{
+ struct stat filestat;
+
+ int fd = open (filename, O_RDONLY);
+ if (fd < 0)
+ return 0;
+ if(fstat(fd, &filestat))
+ return 0;
+ close (fd);
+ return filestat.st_mtime;
+}
+
+int check_wrapped_time(WRAP_PLUGIN *p_plugin)
+{
+ info("Checking wrapped plugin %s timestamp...", p_plugin->file.name);
+
+ time_t file = get_plugin_time(p_plugin->file.name);
+ time_t wrap = get_plugin_time(p_plugin->file.name_wrapped);
+
+ info(" file = %d, wrap = %d", file, wrap);
+
+ return(!file && !wrap && file <= wrap);
+}
+
+
/**********************************************************************************
Directory processing callback - plugins removing
*********************************************************************************
@@ -581,7 +607,7 @@ int check_installed_plugin(WRAP_PLUGIN *
// should be wrapped
if(plug) {
if(wrap_ok && !link_ok) { // is wrapped?
- return(wrap);
+ ret = wrap;
} else {
ret = (wrap_ok && link_ok);
}
@@ -595,7 +621,12 @@ int check_installed_plugin(WRAP_PLUGIN *
ret = link_ok;
}
}
-
+
+ // Check timestamp of original and wrapped plugin
+ if(ret && wrap && wrap_current) {
+ ret = check_wrapped_time(p_plugin);
+ }
+
if(!ret) {
info("FAIL: %s",p_plugin->file.name);
}
Index: nspluginwrapper.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/F-13/nspluginwrapper.spec,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -p -r1.85 -r1.86
--- nspluginwrapper.spec 6 Jan 2010 14:03:00 -0000 1.85
+++ nspluginwrapper.spec 28 Jun 2010 13:00:11 -0000 1.86
@@ -73,7 +73,7 @@
Summary: A compatibility layer for Netscape 4 plugins
Name: nspluginwrapper
Version: 1.3.0
-Release: 11%{?dist}
+Release: 12%{?dist}
Source0: http://gwenole.beauchesne.info/projects/nspluginwrapper/files/%{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2
Source1: %{plugin_config_name}.tar.gz
Source2: plugin-config.sh.in
@@ -88,6 +88,7 @@ Patch100: plugin-config-setuid.patch
Patch101: plugin-config-umask.patch
Patch102: plugin-config-print.patch
Patch103: plugin-config-native.patch
+Patch104: plugin-config-time-check.patch
License: GPLv2+
Group: Applications/Internet
Url: http://gwenole.beauchesne.info/projects/nspluginwrapper/
@@ -126,6 +127,7 @@ pushd %plugin_config_name
%patch101 -p2 -b .umask
%patch102 -p2 -b .print
%patch103 -p2 -b .native
+%patch104 -p2 -b .time
popd
%build
@@ -250,6 +252,9 @@ fi;
%changelog
+* Mon Jun 28 2010 Martin Stransky <stransky at redhat.com> 1.3.0-12
+- Fixed rhbz#523273 - wrapped plugins not getting updated
+
* Wed Jan 6 2010 Martin Stransky <stransky at redhat.com> 1.3.0-11
- Fixed rpmlint complains
More information about the scm-commits
mailing list