[weasel-commit] Source: gnome-mount=0.8-1

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Fri, 29 Jan 2010 11:40:43 -0500

================================
gnome-mount:source=0.8-1
cvc rdiff gnome-mount -1 /weasel.rpath.org@wgl:3-devel/0.8-1
================================
0.8-1 Filip Brcic (brcha@xxxxxxx) Fri Jan 29 11:40:34 2010
    gnome-mount 0.8

gnome-mount.recipe: new
--- /dev/null
+++ gnome-mount.recipe
@@ -0,0 +38 @@
+#
+# Copyright (c) 2010 Filip Brcic <brcha@xxxxxxxxxxxx>
+# Distributed under the terms of the GNU General Public License v3
+#
+
+loadSuperClass('gnomepackage')
+class GnomeMount(GnomePackageRecipe):
+    name = 'gnome-mount'
+    version = '0.8'
+
+    buildRequires = [
+        'GConf:devel', 'GConf:runtime', 'gnome-keyring:devel',
+        'hal:devel', 'libnotify:devel',
+        ]
+
+    shortDesc  = 'Wrapper for (un)mounting and ejecting disks'
+    url        = 'http://hal.freedesktop.org/'
+    licenses   = [ 'GPL-2' ]
+    categories = [ 'Gnome' ]
+
+    externalArchive = 'http://hal.freedesktop.org/releases/'
+
+    patches = [
+        'gnome-mount-0.6-include-locale-h.patch',
+        'gnome-mount-0.8-fstablock.patch',
+        'gnome-mount-0.8-libnotify-automagic.patch',
+        ]
+
+    def unpack(r):
+        GnomePackageRecipe.unpack(r)
+
+        r.Autoreconf()
+
+    extraConfig = (
+        ' --disable-static'
+        ' --enable-libnotify'
+        ' --disable-nautilus-extension'
+        )

gnome-mount-0.6-include-locale-h.patch: new
--- /dev/null
+++ gnome-mount-0.6-include-locale-h.patch
@@ -0,0 +10 @@
+--- src/gnome-mount.c  2007-05-29 22:28:51.000000000 +0200
++++ src/gnome-mount.c  2007-05-29 21:15:55.000000000 +0200
+@@ -25,6 +25,7 @@
+ #endif
+ 
+ #include <unistd.h>
++#include <locale.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>

gnome-mount-0.8-fstablock.patch: new
--- /dev/null
+++ gnome-mount-0.8-fstablock.patch
@@ -0,0 +61 @@
+# Patch for fixing hal locking when device is in fstab
+# https://bugs.gentoo.org/show_bug.cgi?id=257746
+diff -p -up a/src/gnome-mount.c b/src/gnome-mount.c
+--- a/src/gnome-mount.c        2008-09-15 14:39:28.000000000 +0200
++++ b/src/gnome-mount.c        2008-09-15 14:42:54.000000000 +0200
+@@ -1166,6 +1166,18 @@ volume_mount (const char *udi, LibHalVol
+                       char *args[3] = {MOUNT, NULL, NULL};
+                       char **envp = {NULL};
+ 
++                      /* don't mount if device is locked
++                         */
++                        if (libhal_device_is_locked_by_others (hal_ctx,
++                                                               udi,
++                                                               
"org.freedesktop.Hal.Device.Storage",
++                                                               NULL)) {
++                                if (opt_verbose)
++                                        g_message (_("Device %s is locked, 
aborting"),
++                                                   udi);
++                                goto out;
++                        }
++
+                         if (opt_verbose)
+                                 g_print (_("Device %s is in /etc/fstab with 
mount point \"%s\"\n"), 
+                                          device_file, mount_point_fstab);
+@@ -1738,6 +1750,17 @@ volume_unmount (const char *udi, LibHalV
+                       char *args[3] = {UMOUNT, NULL, NULL};
+                       char **envp = {NULL};
+ 
++                      /* don't unmount if device is locked
++                         */
++                        if (libhal_device_is_locked_by_others (hal_ctx,
++                                                               udi,
++                                                               
"org.freedesktop.Hal.Device.Storage",
++                                                               NULL)) {
++                                if (opt_verbose)
++                                        g_message (_("Device %s is locked, 
aborting"),
++                                                   udi);
++                                goto out;
++                        }
+                         if (opt_verbose)
+                                 g_print (_("Device %s is in /etc/fstab with 
mount point \"%s\"\n"),
+                                          device_file, mount_point);
+@@ -1958,6 +1981,18 @@ volume_eject (const char *udi, LibHalVol
+                       char *args[3] = {"eject", NULL, NULL};
+                       char **envp = {NULL};
+ 
++                      /* don't mount if device is locked
++                         */
++                        if (libhal_device_is_locked_by_others (hal_ctx,
++                                                               udi,
++                                                               
"org.freedesktop.Hal.Device.Storage",
++                                                               NULL)) {
++                                if (opt_verbose)
++                                        g_message (_("Device %s is locked, 
aborting"),
++                                                   udi);
++                                goto out;
++                        }
++
+                         if (opt_verbose)
+                                 g_print (_("Device %s is in /etc/fstab with 
mount point \"%s\"\n"), 
+                                          device_file, mount_point);

gnome-mount-0.8.tar.gz: new
gnome-mount-0.8-libnotify-automagic.patch: new
--- /dev/null
+++ gnome-mount-0.8-libnotify-automagic.patch
@@ -0,0 +80 @@
+# fix libnotify automagic dep
+# https://bugs.gentoo.org/show_bug.cgi?id=257753
+diff -ur gnome-mount@181/ChangeLog gnome-mount@182/ChangeLog
+--- gnome-mount@181/src/gnome-mount.c  2009-02-05 10:04:54.000000000 +0100
++++ gnome-mount@182/src/gnome-mount.c  2009-02-05 10:08:36.000000000 +0100
+@@ -41,7 +41,11 @@
+ #include <gdk/gdkx.h>
+ #include "copy-paste/gnome-password-dialog.h"
+ #include <gnome-keyring.h>
++#include <gtk/gtk.h>
++
++#ifdef ENABLE_NOTIFY
+ #include <libnotify/notify.h>
++#endif
+ 
+ #if !defined(NOTIFY_EXPIRES_NEVER)
+ #define NOTIFY_EXPIRES_NEVER 0
+@@ -1549,17 +1553,21 @@
+ 
+ static guint unmount_cache_timeout_id = -1;
+ 
++#ifdef ENABLE_NOTIFY
+ static NotifyNotification *unmount_note = NULL;
++#endif
+ 
+ static gboolean unmount_note_is_eject = FALSE;
+ static char *unmount_note_drive_name = NULL;
+ 
++#ifdef ENABLE_NOTIFY
+ static void
+ unmount_note_close_func (NotifyNotification *note, gpointer user_data)
+ {
+        g_debug ("in unmount_note_close_func()");
+        unmount_note = NULL;
+ }
++#endif
+ 
+ static gboolean
+ unmount_cache_timeout_func (gpointer data)
+@@ -1602,13 +1610,16 @@
+       g_strchug (unmount_note_drive_name);
+       g_debug ("Setting up 750ms timer for Flushing Cache dialog");
+       unmount_cache_timeout_id = g_timeout_add (750, 
unmount_cache_timeout_func, NULL);
++#ifdef ENABLE_NOTIFY
+       unmount_note = NULL;
++#endif
+ }
+ 
+ static void
+ unmount_cache_timeout_cancel (gboolean was_success)
+ {
+       g_source_remove (unmount_cache_timeout_id);
++#ifdef ENABLE_NOTIFY
+       if (unmount_note != NULL) {
+               if (was_success) {
+                       char *summary;
+@@ -1628,6 +1639,7 @@
+                       notify_notification_show (unmount_note, NULL);
+               }
+       }
++#endif
+ }
+ 
+ static gboolean unmount_still_in_progress = FALSE;
+--- gnome-mount@181/configure.in       2008-02-25 22:54:20.000000000 +0100
++++ gnome-mount@182/configure.in       2009-02-05 10:25:25.000000000 +0100
+@@ -100,8 +100,11 @@
+    AC_SUBST(NAUTILUS_LIBS)
+ fi
+ 
+-PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0], [enable_notify=yes], 
[enable_notify=yes])
+-if test "x$enable_notify" != "xno"; then
++AC_ARG_ENABLE(libnotify,
++      AS_HELP_STRING([--enable-libnotify],[Use libnotify]),
++      ,[enable_libnotify=yes])
++if test "x$enable_libnotify" != "xno"; then
++   PKG_CHECK_MODULES([NOTIFY], [libnotify >= 0.3.0])
+    AC_DEFINE_UNQUOTED([ENABLE_NOTIFY], 1, [Enable notifications with 
libnotify])
+    AC_SUBST(NOTIFY_CFLAGS)
+    AC_SUBST(NOTIFY_LIBS)


Committed by: brcha

Other related posts: