Hello community, here is the log from the commit of package beagle checked in at Tue Jul 11 20:24:47 CEST 2006. -------- --- GNOME/beagle/beagle.changes 2006-07-10 19:47:17.000000000 +0200 +++ beagle/beagle.changes 2006-07-11 09:38:37.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Jul 11 09:37:55 CEST 2006 - stbinner@suse.de + +- Add upstream patch to fix libbeagle socket path for NFS + +------------------------------------------------------------------- New: ---- libbeagle-socket-path.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ beagle.spec ++++++ --- /var/tmp/diff_new_pack.WVkLPH/_old 2006-07-11 20:24:36.000000000 +0200 +++ /var/tmp/diff_new_pack.WVkLPH/_new 2006-07-11 20:24:36.000000000 +0200 @@ -18,7 +18,7 @@ Group: Productivity/Other Autoreqprov: on Version: 0.2.7 -Release: 2 +Release: 3 Summary: Desktop Search Application URL: http://www.gnome.org/projects/beagle/ Source: %{name}-%{version}.tar.bz2 @@ -29,6 +29,7 @@ Patch2: beagle-python-no-strict-aliasing.patch Patch3: beagle-log-level-warn.patch Patch4: beagle-terminal-lockdown.patch +Patch5: libbeagle-socket-path.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Prereq: /usr/sbin/groupadd /usr/sbin/useradd Requires: mono-core >= 1.1.13.5 @@ -271,6 +272,7 @@ %patch2 %patch3 %patch4 +%patch5 %build libtoolize -f @@ -429,6 +431,8 @@ %{prefix}/%_lib/pkgconfig/*.pc %changelog -n beagle +* Tue Jul 11 2006 - stbinner@suse.de +- Add upstream patch to fix libbeagle socket path for NFS * Mon Jul 10 2006 - joeshaw@suse.de - Add back in one of the patches which is still relevant. * Thu Jul 06 2006 - joeshaw@suse.de ++++++ libbeagle-socket-path.patch ++++++ Index: beagle-util.h =================================================================== RCS file: /cvs/gnome/beagle/libbeagle/beagle/beagle-util.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -p -b -r1.5 -r1.6 --- libbeagle/beagle/beagle-util.h 3 Apr 2006 19:49:43 -0000 1.5 +++ libbeagle/beagle/beagle-util.h 10 Jul 2006 20:25:38 -0000 1.6 @@ -40,6 +40,8 @@ GQuark beagle_error_quark (void); gboolean beagle_util_is_path_on_block_device (const char *path); +gchar *beagle_util_get_socket_path (const char *client_name); + gboolean beagle_util_daemon_is_running (void); #endif /* __BEAGLE_UTIL_H */ Index: beagle-util.c =================================================================== RCS file: /cvs/gnome/beagle/libbeagle/beagle/beagle-util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -p -b -r1.5 -r1.6 --- libbeagle/beagle/beagle-util.c 3 Apr 2006 19:49:43 -0000 1.5 +++ libbeagle/beagle/beagle-util.c 10 Jul 2006 20:25:38 -0000 1.6 @@ -57,28 +57,79 @@ beagle_util_is_path_on_block_device (con return (st.st_dev >> 8 != 0); } -gboolean -beagle_util_daemon_is_running (void) +char * +beagle_util_get_socket_path (const char *client_name) { const gchar *beagle_home; gchar *socket_dir; gchar *socket_path; - int sockfd; - struct sockaddr_un sun; + struct stat buf; + + if (!client_name) + client_name = "socket"; beagle_home = g_getenv ("BEAGLE_HOME"); if (beagle_home == NULL) beagle_home = g_get_home_dir (); + if (! beagle_util_is_path_on_block_device (beagle_home) || + getenv ("BEAGLE_SYNCHRONIZE_LOCALLY") != NULL) { + gchar *remote_storage_dir = g_build_filename (beagle_home, ".beagle", "remote_storage_dir", NULL); + gchar *tmp; + + if (! g_file_test (remote_storage_dir, G_FILE_TEST_EXISTS)) { + g_free (remote_storage_dir); + return NULL; + } + + if (! g_file_get_contents (remote_storage_dir, &socket_dir, NULL, NULL)) { + g_free (remote_storage_dir); + return NULL; + } + + g_free (remote_storage_dir); + + /* There's a newline at the end that we want to strip off */ + tmp = strrchr (socket_dir, '\n'); + if (tmp != NULL) + *tmp = '\0'; + + if (! g_file_test (socket_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { + g_free (socket_dir); + return NULL; + } + } else { socket_dir = g_build_filename (beagle_home, ".beagle", NULL); - socket_path = g_build_filename (socket_dir, "socket", NULL); + } + + socket_path = g_build_filename (socket_dir, client_name, NULL); + g_free (socket_dir); + if (stat (socket_path, &buf) == -1 || !S_ISSOCK (buf.st_mode)) { + g_free (socket_path); + return NULL; + } + + return socket_path; + +} + +gboolean +beagle_util_daemon_is_running (void) +{ + gchar *socket_path; + int sockfd; + struct sockaddr_un sun; + + socket_path = beagle_util_get_socket_path (NULL); + + if (socket_path == NULL) + return FALSE; bzero (&sun, sizeof (sun)); sun.sun_family = AF_UNIX; snprintf (sun.sun_path, sizeof (sun.sun_path), socket_path); g_free (socket_path); - g_free (socket_dir); sockfd = socket (AF_UNIX, SOCK_STREAM, 0); if (sockfd < 0) { Index: beagle-client.c =================================================================== RCS file: /cvs/gnome/beagle/libbeagle/beagle/beagle-client.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -p -b -r1.7 -r1.8 --- libbeagle/beagle/beagle-client.c 2 Dec 2005 17:01:51 -0000 1.7 +++ libbeagle/beagle/beagle-client.c 10 Jul 2006 20:25:38 -0000 1.8 @@ -86,54 +86,12 @@ beagle_client_new (const char *client_na { BeagleClient *client; BeagleClientPrivate *priv; - const gchar *beagle_home; - gchar *socket_dir; gchar *socket_path; - struct stat buf; - if (!client_name) - client_name = "socket"; + socket_path = beagle_util_get_socket_path (client_name); - beagle_home = g_getenv ("BEAGLE_HOME"); - if (beagle_home == NULL) - beagle_home = g_get_home_dir (); - - if (! beagle_util_is_path_on_block_device (beagle_home) || - getenv ("BEAGLE_SYNCHRONIZE_LOCALLY") != NULL) { - gchar *remote_storage_dir = g_build_filename (beagle_home, ".beagle", "remote_storage_dir", NULL); - gchar *tmp; - - if (! g_file_test (remote_storage_dir, G_FILE_TEST_EXISTS)) { - g_free (remote_storage_dir); - return NULL; - } - - if (! g_file_get_contents (remote_storage_dir, &socket_dir, NULL, NULL)) { - g_free (remote_storage_dir); - return NULL; - } - - g_free (remote_storage_dir); - - /* There's a newline at the end that we want to strip off */ - tmp = strrchr (socket_dir, '\n'); - if (tmp != NULL) - *tmp = '\0'; - - if (! g_file_test (socket_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { - g_free (socket_dir); - return NULL; - } - } else { - socket_dir = g_build_filename (beagle_home, ".beagle", NULL); - } - - socket_path = g_build_filename (socket_dir, client_name, NULL); - g_free (socket_dir); - if (stat (socket_path, &buf) == -1 || !S_ISSOCK (buf.st_mode)) { - g_free (socket_path); + if (socket_path == NULL) return NULL; - } client = g_object_new (BEAGLE_TYPE_CLIENT, 0); priv = BEAGLE_CLIENT_GET_PRIVATE (client); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org