Hello community, here is the log from the commit of package beagle checked in at Tue Apr 18 01:47:57 CEST 2006. -------- --- GNOME/beagle/beagle.changes 2006-04-11 21:31:58.000000000 +0200 +++ STABLE/beagle/beagle.changes 2006-04-14 19:13:30.000000000 +0200 @@ -1,0 +2,18 @@ +Fri Apr 14 19:07:30 CEST 2006 - joeshaw@suse.de + +- Add a patch for shutting down cleanly when the X connection is + broken. (bnc #159219, bgo #334792) +- Add a patch to only print a warning about increasing your + inotify limit once, so we don't fill up .xsession-errors. +- Add a patch to safely execute external programs from filters + and the beagle-search UI. (bnc #165668) +- Add a patch to use standard IO rather than mmap() for our + OLE-based filters (ie, MS Word), when OpenOffice writes to it + quickly. (bnc #165304) + +------------------------------------------------------------------- +Thu Apr 13 19:01:17 CEST 2006 - sbrabec@suse.cz + +- Use new control-center Categories instead of old ones. + +------------------------------------------------------------------- New: ---- beagle-desktop-categories.patch beagle-inotify-spew.patch beagle-ole-filter-no-mmap.patch beagle-safe-process-launch.patch beagle-x-connection-clean-shutdown.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ beagle.spec ++++++ --- /var/tmp/diff_new_pack.TzD9vi/_old 2006-04-18 01:47:32.000000000 +0200 +++ /var/tmp/diff_new_pack.TzD9vi/_new 2006-04-18 01:47:32.000000000 +0200 @@ -18,7 +18,7 @@ Group: Productivity/Other Autoreqprov: on Version: 0.2.3 -Release: 14 +Release: 16 Summary: Desktop Search Application URL: http://www.gnome.org/projects/beagle/ Source: %{name}-%{version}.tar.gz @@ -34,6 +34,11 @@ Patch7: beagle-use-native-open-locking.patch Patch8: beagle-index-sqlite-database.patch Patch9: beagle-cron-daily.patch +Patch10: beagle-desktop-categories.patch +Patch11: beagle-x-connection-clean-shutdown.patch +Patch12: beagle-inotify-spew.patch +Patch13: beagle-safe-process-launch.patch +Patch14: beagle-ole-filter-no-mmap.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Prereq: /usr/sbin/groupadd /usr/sbin/useradd Requires: mono-core >= 1.1.13 @@ -281,10 +286,15 @@ %patch7 %patch8 %patch9 +%patch10 +%patch11 +%patch12 +%patch13 +%patch14 %build -rename no nb po/no.* -sed "s/\(ALL_LINGUAS.*\) no /\1 nb /" configure.in > configure.in.tmp && mv configure.in.tmp configure.in +rm po/no.* +sed -i "s/\(ALL_LINGUAS.*\) no /\1 /" configure.in libtoolize -f aclocal -I . autoconf @@ -328,7 +338,7 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/%{_lib}/browser-extensions/firefox/{fda00e13-8c62-4f63-9d19-d168115b11ca} unzip -o $RPM_BUILD_ROOT%{prefix}/%{_lib}/browser-extensions/firefox/beagle.xpi -d $RPM_BUILD_ROOT%{prefix}/%{_lib}/browser-extensions/firefox/{fda00e13-8c62-4f63-9d19-d168115b11ca} rm $RPM_BUILD_ROOT%{prefix}/%{_lib}/browser-extensions/firefox/beagle.xpi -%suse_update_desktop_file -C "Configure how searching works" -G "Search Settings" -N "Beagle Settings" beagle-settings +%suse_update_desktop_file -C "Configure how searching works" -G "Search Settings" -N "Beagle Settings" beagle-settings X-SuSE-ControlCenter-System %post -n libbeagle %run_ldconfig @@ -437,6 +447,18 @@ %{prefix}/%_lib/pkgconfig/*.pc %changelog -n beagle +* Fri Apr 14 2006 - joeshaw@suse.de +- Add a patch for shutting down cleanly when the X connection is + broken. (bnc #159219, bgo #334792) +- Add a patch to only print a warning about increasing your + inotify limit once, so we don't fill up .xsession-errors. +- Add a patch to safely execute external programs from filters + and the beagle-search UI. (bnc #165668) +- Add a patch to use standard IO rather than mmap() for our + OLE-based filters (ie, MS Word), when OpenOffice writes to it + quickly. (bnc #165304) +* Thu Apr 13 2006 - sbrabec@suse.cz +- Use new control-center Categories instead of old ones. * Tue Apr 11 2006 - gekker@suse.de - Don't launch beagle-search on SLED10 and later (#165287) * Fri Apr 07 2006 - joeshaw@suse.de ++++++ beagle-desktop-categories.patch ++++++ --- tools/beagle-settings.desktop.in +++ tools/beagle-settings.desktop.in @@ -7,4 +7,4 @@ Exec=beagle-settings Icon=gnome-searchtool Type=Application -Categories=Application;Settings;AdvancedSettings;Utility;Filesystem;X-Ximian-Settings; +Categories=Application;Settings;Utility;Filesystem; ++++++ beagle-inotify-spew.patch ++++++ Index: glue/inotify-glue.c =================================================================== RCS file: /cvs/gnome/beagle/glue/inotify-glue.c,v retrieving revision 1.26 diff -u -p -u -r1.26 inotify-glue.c --- glue/inotify-glue.c 8 Sep 2005 18:07:36 -0000 1.26 +++ glue/inotify-glue.c 12 Apr 2006 18:47:26 -0000 @@ -85,7 +85,7 @@ inotify_glue_init (void) if (fd < 0) { int err = errno; perror ("inotify_init"); - if (err == ENOSYS) + if (err == ENOSYS) fprintf(stderr, "Inotify not supported! You need a " "2.6.13 kernel or later with CONFIG_INOTIFY " "enabled."); @@ -109,11 +109,18 @@ inotify_glue_watch (int fd, const char * wd = inotify_add_watch (fd, filename, mask); if (wd < 0) { + static int watch_limit_hit = 0; + int err = errno; - perror ("inotify_add_watch"); - if (err == ENOSPC) + + if (! watch_limit_hit || err != ENOSPC) + perror ("inotify_add_watch"); + + if (! watch_limit_hit && err == ENOSPC) { fprintf(stderr, "Maximum watch limit hit. " "Try adjusting " PROCFS_MAX_USER_WATCHES ".\n"); + watch_limit_hit = 1; + } } return wd; ++++++ beagle-ole-filter-no-mmap.patch ++++++ Index: Filters/FilterOle.cs =================================================================== RCS file: /cvs/gnome/beagle/Filters/FilterOle.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- Filters/FilterOle.cs 3 Nov 2005 21:48:28 -0000 1.4 +++ Filters/FilterOle.cs 14 Apr 2006 15:39:57 -0000 1.5 @@ -1,4 +1,3 @@ -/* -*- Mode: csharp; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ // // FilterOle.cs // @@ -59,7 +58,7 @@ namespace Beagle.Filters { { try { Gsf.Global.Init (); - Input input = Input.MmapNew (info.FullName); + Input input = new InputStdio (info.FullName); if (input != null) { input = input.Uncompress(); file = new InfileMSOle (input); @@ -90,13 +89,13 @@ namespace Beagle.Filters { if (sum_stream != null) Msole.MetadataRead (sum_stream, sumMeta); else - Logger.Log.Error ("SummaryInformationStream not found in {0}", FileName); + Logger.Log.Warn ("SummaryInformationStream not found in {0}", FileName); docSumMeta = new DocMetaData (); if (doc_stream != null) Msole.MetadataRead (doc_stream, docSumMeta); else - Logger.Log.Error ("DocumentSummaryInformationStream not found in {0}", FileName); + Logger.Log.Warn ("DocumentSummaryInformationStream not found in {0}", FileName); if (sumMeta != null) { prop = sumMeta.Lookup ("dc:title"); ++++++ beagle-safe-process-launch.patch ++++++ ++++ 815 lines (skipped) ++++++ beagle-x-connection-clean-shutdown.patch ++++++ Index: beagled/BeagleDaemon.cs =================================================================== RCS file: /cvs/gnome/beagle/beagled/BeagleDaemon.cs,v retrieving revision 1.112 diff -u -p -u -r1.112 BeagleDaemon.cs --- beagled/BeagleDaemon.cs 11 Apr 2006 17:50:06 -0000 1.112 +++ beagled/BeagleDaemon.cs 11 Apr 2006 22:31:07 -0000 @@ -28,6 +28,7 @@ using System; using System.Collections; using System.IO; using System.Reflection; +using System.Runtime.InteropServices; using System.Threading; using Gtk; @@ -411,7 +412,12 @@ namespace Beagle.Daemon { // Do BEAGLE_EXERCISE_THE_DOG_HARDER-related processing. ExerciseTheDogHarder (); - Application.InitCheck ("beagled", ref args); + if (Application.InitCheck ("beagled", ref args)) + Logger.Log.Debug ("Established a connection to the X server"); + else + Logger.Log.Debug ("Unable to establish a connection to the X server"); + + XSetIOErrorHandler (BeagleXIOErrorHandler); // Defer all actual startup until the main loop is // running. That way shutdowns during the startup @@ -438,7 +444,28 @@ namespace Beagle.Daemon { ExceptionHandlingThread.SpewLiveThreads (); } } - + + ///////////////////////////////////////////////////////////////////////////// + + private delegate int XIOErrorHandler (IntPtr display); + + [DllImport ("libX11.so.6")] + extern static private int XSetIOErrorHandler (XIOErrorHandler handler); + + private static int BeagleXIOErrorHandler (IntPtr display) + { + Logger.Log.Debug ("Lost our connection to the X server! Trying to shut down gracefully"); + + if (! Shutdown.ShutdownRequested) + Shutdown.BeginShutdown (); + + Logger.Log.Debug ("Xlib is forcing us to exit!"); + + ExceptionHandlingThread.SpewLiveThreads (); + + // Returning will cause xlib to exit immediately. + return 0; + } ///////////////////////////////////////////////////////////////////////////// @@ -452,6 +479,9 @@ namespace Beagle.Daemon { Mono.Unix.Native.Stdlib.signal (Mono.Unix.Native.Signum.SIGTERM, OurSignalHandler); if (Environment.GetEnvironmentVariable("BEAGLE_THERE_BE_NO_QUITTIN") == null) Mono.Unix.Native.Stdlib.signal (Mono.Unix.Native.Signum.SIGQUIT, OurSignalHandler); + + // Ignore SIGPIPE + Mono.Unix.Native.Stdlib.signal (Mono.Unix.Native.Signum.SIGPIPE, Mono.Unix.Native.Stdlib.SIG_IGN); } // Our handler triggers an orderly shutdown when it receives a signal. @@ -467,7 +497,7 @@ namespace Beagle.Daemon { if (signal < 0) return; - Logger.Log.Debug ("Handling signal {0}", signal); + Logger.Log.Debug ("Handling signal {0} ({1})", signal, (Mono.Unix.Native.Signum) signal); bool first_signal = false; if (signal_time == DateTime.MinValue) { Index: beagled/IndexHelper/IndexHelper.cs =================================================================== RCS file: /cvs/gnome/beagle/beagled/IndexHelper/IndexHelper.cs,v retrieving revision 1.24 diff -u -p -u -r1.24 IndexHelper.cs --- beagled/IndexHelper/IndexHelper.cs 8 Feb 2006 18:19:49 -0000 1.24 +++ beagled/IndexHelper/IndexHelper.cs 11 Apr 2006 22:31:07 -0000 @@ -29,6 +29,7 @@ using System; using System.Collections; using System.IO; using SNS = System.Net.Sockets; +using System.Runtime.InteropServices; using System.Threading; using Gtk; @@ -43,6 +44,9 @@ namespace Beagle.IndexHelper { static DateTime last_activity; static Server server; + [DllImport ("libc")] + extern static private int unsetenv (string name); + static void Main (string [] args) { try { @@ -73,6 +77,13 @@ namespace Beagle.IndexHelper { LogLevel.Debug, run_by_hand || log_in_fg); + // Intentionally unset DISPLAY so that we can't connect + // to the X server and aren't influenced by it if it + // goes away. It's important to do this before + // Application.InitCheck(), since that's what makes the + // connection. + unsetenv ("DISPLAY"); + Application.InitCheck ("IndexHelper", ref args); SetupSignalHandlers (); @@ -214,6 +225,9 @@ namespace Beagle.IndexHelper { Mono.Unix.Native.Stdlib.signal (Mono.Unix.Native.Signum.SIGTERM, OurSignalHandler); if (Environment.GetEnvironmentVariable("BEAGLE_THERE_BE_NO_QUITTIN") == null) Mono.Unix.Native.Stdlib.signal (Mono.Unix.Native.Signum.SIGQUIT, OurSignalHandler); + + // Ignore SIGPIPE + Mono.Unix.Native.Stdlib.signal (Mono.Unix.Native.Signum.SIGPIPE, Mono.Unix.Native.Stdlib.SIG_IGN); } // Our handler triggers an orderly shutdown when it receives a signal. @@ -228,7 +242,7 @@ namespace Beagle.IndexHelper { // We want to call it once to ensure that it is pre-JITed. if (signal < 0) return; - Logger.Log.Debug ("Handling signal {0}", signal); + Logger.Log.Debug ("Handling signal {0} ({1})", signal, (Mono.Unix.Native.Signum) signal); bool first_signal = false; if (signal_time == DateTime.MinValue) { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...