--- devicekit-disks-007.orig/debian/control +++ devicekit-disks-007/debian/control @@ -0,0 +1,54 @@ +Source: devicekit-disks +Section: admin +Priority: optional +Maintainer: Utopia Maintenance Team +Uploaders: Michael Biebl , Martin Pitt +Build-Depends: debhelper (>= 7), + cdbs, + autotools-dev, + pkg-config, + quilt, + lsb-release, + xsltproc, + gtk-doc-tools, + intltool (>= 0.40.0), + libdbus-glib-1-dev (>= 0.74-4), + libdbus-1-dev (>= 1.0), + libglib2.0-dev (>= 2.15), + libgudev-1.0-dev, + libpolkit-gobject-1-dev (>= 0.92), + libpolkit-backend-1-dev (>= 0.92), + libparted1.8-dev (>= 1.8.8), + libdevmapper-dev (>= 2:1.02), + libatasmart-dev (>= 0.14), + libsgutils2-dev, + zlib1g-dev, + libudev-dev (>= 0.142), + uuid-dev, + libselinux-dev +Standards-Version: 3.8.3 +Vcs-Git: git://git.debian.org/git/pkg-utopia/devicekit-disks.git +Vcs-Browser: http://git.debian.org/?p=pkg-utopia/devicekit-disks.git;a=summary +Homepage: http://hal.freedesktop.org/docs/DeviceKit-disks + +Package: devicekit-disks +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: libgdu0 (<< 2.28), libgdu-gtk0 (<< 2.28) +Description: abstraction for enumerating block devices + DeviceKit-disks is an abstraction for enumerating block devices and performing + operations on them. Any application can access the + org.freedesktop.DeviceKit.Disks service on the system message bus. + Some operations (such as formatting disks etc.) are restricted using PolicyKit. + +Package: devicekit-disks-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Suggests: devhelp +Description: abstraction for enumerating block devices - documentation + DeviceKit-disks is an abstraction for enumerating block devices and performing + operations on them. Any application can access the + org.freedesktop.DeviceKit.Disks service on the system message bus. + Some operations (such as formatting disks etc.) are restricted using PolicyKit. + --- devicekit-disks-007.orig/debian/rules +++ devicekit-disks-007/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/utils.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_DH_MAKESHLIBS_ARGS_ALL := -Xusr/lib/polkit-1/ +DEB_CONFIGURE_EXTRA_FLAGS := --enable-gtk-doc + +binary-install/devicekit-disks:: + # when building for Ubuntu, install Apport hook + if [ "`lsb_release -is 2>/dev/null`" = "Ubuntu" ]; then \ + install -m 644 -D debian/local/apport-hook.py debian/devicekit-disks/usr/share/apport/package-hooks/devicekit-disks.py; \ + fi + --- devicekit-disks-007.orig/debian/watch +++ devicekit-disks-007/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://hal.freedesktop.org/releases/DeviceKit-disks-(\d+)\.tar\.gz --- devicekit-disks-007.orig/debian/devicekit-disks.dirs +++ devicekit-disks-007/debian/devicekit-disks.dirs @@ -0,0 +1 @@ +/var/lib/DeviceKit-disks --- devicekit-disks-007.orig/debian/changelog +++ devicekit-disks-007/debian/changelog @@ -0,0 +1,114 @@ +devicekit-disks (007-3deepin1) karmic; urgency=low + + * org.freedesktop.devicekit.disks.policy: s/auth_admin_keep/yes/ + + -- Jiahua Huang Mon, 28 Dec 2009 23:34:36 +0800 + +devicekit-disks (007-2ubuntu3) karmic; urgency=low + + * Add 08-hide-lvm-mirror-volumes.patch: Hide pseudo LVs which should not be + displayed. This is an unintrusive workaround for Karmic, real fix involves + reshuffling our udev rules quite a bit (which is done upstream, and will + trickle into Lucid). (LP: #458529) + + -- Martin Pitt Fri, 23 Oct 2009 00:18:20 +0200 + +devicekit-disks (007-2ubuntu2) karmic; urgency=low + + * 07-media-player-icon.patch: Fix stupid typo which caused _all_ devices to + get marked as a media player. + + -- Martin Pitt Tue, 13 Oct 2009 21:42:58 +0200 + +devicekit-disks (007-2ubuntu1) karmic; urgency=low + + * Upload Debian git head to collect fixes below. Package can be synced next + time. + * Add debian/local/apport-hook.py: Apport package hook for collecting + hardware information, devkit-disks --dump, mounts, and fstab. Install it + in debian/rules when building on Ubuntu. Add "lsb-release" build + dependency for this. + * Add 07-media-player-icon.patch: Use "media-player" icon for storage + devices tagged with ID_MEDIA_PLAYER. (LP: #440290) + + -- Martin Pitt Tue, 13 Oct 2009 15:38:25 +0200 + +devicekit-disks (007-2) experimental; urgency=low + + * debian/rules: Enable quilt patch system. Add quilt build dependency. + * Add 01-mkfs-tempdir.patch: Daemon does not create /var/run/DeviceKit-disks/, + so mkfs jobs fail. Just create the directory in /tmp, this is what /tmp is + for, after all. (See https://bugs.freedesktop.org/show_bug.cgi?id=24265) + * Add 00git-fix-inhibit.patch: Actually make Inhibit() work again. Taken + from upstream git head. (LP: #428133) + * Add 02-unlock-CD-trays-after-mounting.patch: Unlike in the hal world, we + do not have a daemon polling CD drives for eject button presses. In order + to make hardware tray eject buttons work, unlock the tray after + mounting a CD. This is pretty much equivalent to yanking out USB sticks, + which we already handle reasonably (detecting disappeared device, + force-unmounting). (https://bugs.freedesktop.org/show_bug.cgi?id=24052, + LP: #397734) + * Add 03-fix-subsystem-check-for-firewire.patch: Firewire subsystem is + called "ieee1394" in current Linux. Now check for both "ieee1394" and + "firewire". This fixes firewire drives to not be considered system + internal any more. (https://bugs.freedesktop.org/show_bug.cgi?id=24351, + LP: #442604) + * Add 04-mount-vfat-with-shortname-mixed-by-default.patch: The previous + default, shortname=lower, breaks all-uppercase file names ("touch + FOO" creates "foo"), thus breaks rsync, and Windows compatibility. The + default was changed in the Linux kernel for 2.6.32 as well. + (https://bugs.freedesktop.org/show_bug.cgi?id=24129, LP: #428174) + * Add 00git-crash-on-removing-NULL-value-from-hash.patch: Properly handle + the situtation where we're processing a 'change' event but the 'remove' + event has happened but is still queued up in our own process. Also handle + device file renames and 'move' uevents. + (http://bugs.freedesktop.org/show_bug.cgi?id=24264, LP: #414407) + * Add 06-show-MMC-MemStick-cards-by-default.patch: Show MMC/MemStick cards + by default; the previous whitelist in the udev rules ignored them. + (https://bugs.freedesktop.org/show_bug.cgi?id=24053, LP: #429752) + * Add 05-german-translations.patch: Add German translations. + (https://bugs.freedesktop.org/show_bug.cgi?id=2024420) + + -- Martin Pitt Fri, 09 Oct 2009 17:52:20 +0200 + +devicekit-disks (007-1) unstable; urgency=low + + * New upstream release: + - Drop usage of DeviceKit, talk directly to udev now. + - Port to PolicyKit 1 API. + - Lots of bug fixes. + * debian/control: + - libpolkit-dbus-dev → libpolkit-gobject-1-dev, libpolkit-backend-1-dev + build dependency. (PolicyKit 1 API) + - libdevkit-gobject-dev → libgudev-1.0-dev build dependency, drop + devicekit dependency (death to DeviceKit). + - Bump libatasmart-dev build dependency to >= 0.14 as required by + upstream. + - Bump libudev-dev build dependency to >= 0.142 as required by upstream. + - Drop libsqlite3-dev build-dependency, not necessary any more. + - Add libsgutils2-dev build dependency as required by upstream. + * debian/devicekit-disks.install: + - Update path for new policykit-1 files. + - Add new pkgconfig file. + - Install usr/share/locale and usr/share/man. + * debian/rules: Ignore usr/lib/polkit-1/ for dh_makeshlibs, they are backends + for PolicyKit. + * debian/rules: Explicitly enable gtk-doc, not done by default any more. + * debian/control: Bump Standards-Version to 3.8.3 (no changes necessary). + * Add debian/devicekit-disks.postinst: Kill the old devkit-disks-daemon on + upgrade, to ensure that the new version will be used at the next occasion. + (LP: #403192) + * debian/control: Add Breaks to GDU libraries << 2.28, since the D-Bus API + changed. + * debian/*.install: Drop debian/tmp/ prefix, since we use dh compat 7. + Also, simplify and sort the file lists. + * Drop reduntant debian/devicekit-disks.manpages, already done in *.install. + * debian/control: Add myself to Uploaders: with Michael's consent. + + -- Martin Pitt Mon, 28 Sep 2009 16:58:46 +0200 + +devicekit-disks (004-1) experimental; urgency=low + + * Initial release. (Closes: #521364) + + -- Michael Biebl Tue, 19 May 2009 04:08:00 +0200 --- devicekit-disks-007.orig/debian/compat +++ devicekit-disks-007/debian/compat @@ -0,0 +1 @@ +7 --- devicekit-disks-007.orig/debian/devicekit-disks-doc.install +++ devicekit-disks-007/debian/devicekit-disks-doc.install @@ -0,0 +1 @@ +usr/share/gtk-doc/ --- devicekit-disks-007.orig/debian/devicekit-disks.postinst +++ devicekit-disks-007/debian/devicekit-disks.postinst @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + kill `pidof /usr/lib/devicekit-disks/devkit-disks-daemon` 2>/dev/null || true +fi + +#DEBHELPER# --- devicekit-disks-007.orig/debian/copyright +++ devicekit-disks-007/debian/copyright @@ -0,0 +1,26 @@ +Name: DeviceKit-disks +Maintainer: David Zeuthen +Source: http://hal.freedesktop.org/releases/ + +Files: * +Copyright: 2008 David Zeuthen +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + The full text of the GPL is distributed as in + /usr/share/common-licenses/GPL-2 on Debian systems. + +Files: doc/* +Copyright: 2008 David Zeuthen +License: GFDL-1.1+ + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), Version 1.1 or any later version published + by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. + . + The full text of the GFDL is distributed as in + /usr/share/common-licenses/GFDL on Debian systems. --- devicekit-disks-007.orig/debian/devicekit-disks.install +++ devicekit-disks-007/debian/devicekit-disks.install @@ -0,0 +1,11 @@ +etc/dbus-1/ +lib/udev/ +sbin +usr/bin +usr/lib/devicekit-disks/ +usr/lib/polkit-1/extensions/*.so +usr/share/dbus-1/ +usr/share/polkit-1/ +usr/share/locale +usr/share/man +usr/share/pkgconfig --- devicekit-disks-007.orig/debian/local/apport-hook.py +++ devicekit-disks-007/debian/local/apport-hook.py @@ -0,0 +1,23 @@ +'''apport package hook for devicekit-disks + +(c) 2009 Canonical Ltd. +Author: Martin Pitt +''' + +import os +import apport.hookutils + +def add_info(report): + apport.hookutils.attach_hardware(report) + + user_rules = [] + for f in os.listdir('/etc/udev/rules.d'): + if not f.startswith('70-persistent-') and f != 'README': + user_rules.append(f) + + if user_rules: + report['CustomUdevRuleFiles'] = ' '.join(user_rules) + + report['DevkitDisksDump'] = apport.hookutils.command_output(['devkit-disks', '--dump']) + report['Mounts'] = apport.hookutils.command_output(['mount']) + apport.hookutils.attach_file(report, '/etc/fstab') --- devicekit-disks-007.orig/debian/patches/00git-fix-inhibit.patch +++ devicekit-disks-007/debian/patches/00git-fix-inhibit.patch @@ -0,0 +1,50 @@ +From e672ccb6917772f2e7f0f4294eb2828193eaa89f Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Mon, 05 Oct 2009 18:31:22 +0000 +Subject: Actually inhibit the daemon when Inhibit() is called + +Guess this was forgotten with the polkit-1 porting effort. +--- +diff --git a/src/devkit-disks-daemon.c b/src/devkit-disks-daemon.c +index b8c933b..e3f5bc6 100644 +--- a/src/devkit-disks-daemon.c ++++ b/src/devkit-disks-daemon.c +@@ -1288,7 +1288,13 @@ devkit_disks_daemon_local_check_auth (DevkitDisksDaemon *daemon, + } + va_end (va_args); + +- if (action_id != NULL) { ++ if (devkit_disks_daemon_local_is_inhibited (daemon)) { ++ throw_error (data->context, ++ DEVKIT_DISKS_ERROR_INHIBITED, ++ "Daemon is inhibited"); ++ check_auth_data_free (data); ++ ++ } else if (action_id != NULL) { + PolkitSubject *subject; + PolkitDetails *details; + PolkitCheckAuthorizationFlags flags; +@@ -1783,7 +1789,7 @@ daemon_inhibitor_disconnected_cb (DevkitDisksInhibitor *inhibitor, + } + + gboolean +-devkit_disks_daemon_local_has_inhibitors (DevkitDisksDaemon *daemon) ++devkit_disks_daemon_local_is_inhibited (DevkitDisksDaemon *daemon) + { + return daemon->priv->inhibitors != NULL; + } +diff --git a/src/devkit-disks-daemon.h b/src/devkit-disks-daemon.h +index dd0a4f0..3164734 100644 +--- a/src/devkit-disks-daemon.h ++++ b/src/devkit-disks-daemon.h +@@ -123,7 +123,7 @@ void devkit_disks_daemon_local_update_spindown (DevkitDisksDae + + gboolean devkit_disks_daemon_local_has_polling_inhibitors (DevkitDisksDaemon *daemon); + +-gboolean devkit_disks_daemon_local_has_inhibitors (DevkitDisksDaemon *daemon); ++gboolean devkit_disks_daemon_local_is_inhibited (DevkitDisksDaemon *daemon); + + DevkitDisksMountMonitor *devkit_disks_daemon_local_get_mount_monitor (DevkitDisksDaemon *daemon); + +-- +cgit v0.8.2 --- devicekit-disks-007.orig/debian/patches/06-show-MMC-MemStick-cards-by-default.patch +++ devicekit-disks-007/debian/patches/06-show-MMC-MemStick-cards-by-default.patch @@ -0,0 +1,28 @@ +From 6b4098ecf6bde0e74f3c011a28dd57c86ef235ef Mon Sep 17 00:00:00 2001 +From: Maxim Levitsky +Date: Fri, 9 Oct 2009 14:57:38 +0200 +Subject: [PATCH 5/5] show MMC/MemStick cards by default + +The previous whitelist in the udev rules ignored them. + +https://bugs.freedesktop.org/show_bug.cgi?id=24053 +--- + data/95-devkit-disks.rules | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/data/95-devkit-disks.rules b/data/95-devkit-disks.rules +index 2703e10..fbb85a0 100644 +--- a/data/95-devkit-disks.rules ++++ b/data/95-devkit-disks.rules +@@ -143,7 +143,7 @@ ENV{ID_FS_TYPE}=="ntfs|vfat", \ + # + + ENV{DKD_PRESENTATION_NOPOLICY}="1" +-KERNEL=="sd*|hd*|sr*", ENV{DKD_PRESENTATION_NOPOLICY}="0" ++KERNEL=="sd*|hd*|sr*|mmcblk*|mspblk*", ENV{DKD_PRESENTATION_NOPOLICY}="0" + + ############################################################################################################## + +-- +1.6.3.3 + --- devicekit-disks-007.orig/debian/patches/04-mount-vfat-with-shortname-mixed-by-default.patch +++ devicekit-disks-007/debian/patches/04-mount-vfat-with-shortname-mixed-by-default.patch @@ -0,0 +1,32 @@ +From 366964f92e1f199b915f52b2f7d7bbacd67405f4 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 8 Oct 2009 20:32:51 +0200 +Subject: [PATCH 3/3] mount vfat with shortname=mixed by default + +The previous default, shortname=lower, breaks all-uppercase file names ("touch +FOO" creates "foo"), thus breaks rsync, and Windows compatibility. + +The default was changed in the Linux kernel as well, see +http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=955234755ce4a2c33cfc558912aa8f2148cc1fc6 + +https://bugs.freedesktop.org/show_bug.cgi?id=24129 +--- + src/devkit-disks-device.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c +index 4a621c6..5af03ce 100644 +--- a/src/devkit-disks-device.c ++++ b/src/devkit-disks-device.c +@@ -4109,7 +4109,7 @@ typedef struct { + + static const char *vfat_defaults[] = {"uid=", + "gid=", +- "shortname=lower", ++ "shortname=mixed", + "dmask=0077", + "utf8=1", + NULL}; +-- +1.6.3.3 + --- devicekit-disks-007.orig/debian/patches/00git-crash-on-removing-NULL-value-from-hash.patch +++ devicekit-disks-007/debian/patches/00git-crash-on-removing-NULL-value-from-hash.patch @@ -0,0 +1,104 @@ +From 7d9be0143e8d5b34364c5b7dc27cf735da84b558 Mon Sep 17 00:00:00 2001 +From: David Zeuthen +Date: Fri, 9 Oct 2009 11:12:10 -0400 +Subject: [PATCH 1/2] =?utf-8?q?Bug=2024264=20=E2=80=93=20Crash=20on=20removing=20NULL=20value=20from=20hash=20in=20device=5Fremove()?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +Properly handle the situtation where we're processing a 'change' event +but the 'remove' event has happened but is still queued up in our own +process. Also handle device file renames and 'move' uevents. + +https://bugs.freedesktop.org/show_bug.cgi?id=24264 +--- + src/devkit-disks-daemon.c | 47 ++++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 42 insertions(+), 5 deletions(-) + +diff --git a/src/devkit-disks-daemon.c b/src/devkit-disks-daemon.c +index e3f5bc6..fd9de2c 100644 +--- a/src/devkit-disks-daemon.c ++++ b/src/devkit-disks-daemon.c +@@ -637,11 +637,34 @@ device_changed (DevkitDisksDaemon *daemon, GUdevDevice *d, gboolean synthesized) + device = g_hash_table_lookup (daemon->priv->map_native_path_to_device, native_path); + if (device != NULL) { + g_print ("**** CHANGING %s\n", native_path); ++ ++ /* The device file (udev rules) and/or sysfs path ('move' uevent) may actually change so ++ * remove it and add it back after processing. The kernel name will never change so ++ * the object path will fortunately remain constant. ++ */ ++ g_warn_if_fail (g_hash_table_remove (daemon->priv->map_native_path_to_device, ++ device->priv->native_path)); ++ g_warn_if_fail (g_hash_table_remove (daemon->priv->map_device_file_to_device, ++ device->priv->device_file)); ++ + if (!devkit_disks_device_changed (device, d, synthesized)) { + g_print ("**** CHANGE TRIGGERED REMOVE %s\n", native_path); + device_remove (daemon, d); + } else { + g_print ("**** CHANGED %s\n", native_path); ++ ++ g_assert (devkit_disks_device_local_get_device_file (device) != NULL); ++ g_assert (devkit_disks_device_local_get_native_path (device) != NULL); ++ g_assert (g_strcmp0 (native_path, devkit_disks_device_local_get_native_path (device)) == 0); ++ ++ /* now add the things back to the global hashtables */ ++ g_hash_table_insert (daemon->priv->map_device_file_to_device, ++ g_strdup (devkit_disks_device_local_get_device_file (device)), ++ g_object_ref (device)); ++ g_hash_table_insert (daemon->priv->map_native_path_to_device, ++ g_strdup (devkit_disks_device_local_get_native_path (device)), ++ g_object_ref (device)); ++ + devkit_disks_daemon_local_update_poller (daemon); + devkit_disks_daemon_local_update_spindown (daemon); + } +@@ -689,6 +712,12 @@ device_add (DevkitDisksDaemon *daemon, GUdevDevice *d, gboolean emit_event) + device = devkit_disks_device_new (daemon, d); + + if (device != NULL) { ++ /* assert that the device is fully loaded with info */ ++ g_assert (devkit_disks_device_local_get_device_file (device) != NULL); ++ g_assert (devkit_disks_device_local_get_native_path (device) != NULL); ++ g_assert (devkit_disks_device_local_get_object_path (device) != NULL); ++ g_assert (g_strcmp0 (native_path, devkit_disks_device_local_get_native_path (device)) == 0); ++ + g_hash_table_insert (daemon->priv->map_dev_t_to_device, + GINT_TO_POINTER (devkit_disks_device_local_get_dev (device)), + g_object_ref (device)); +@@ -696,7 +725,7 @@ device_add (DevkitDisksDaemon *daemon, GUdevDevice *d, gboolean emit_event) + g_strdup (devkit_disks_device_local_get_device_file (device)), + g_object_ref (device)); + g_hash_table_insert (daemon->priv->map_native_path_to_device, +- g_strdup (native_path), ++ g_strdup (devkit_disks_device_local_get_native_path (device)), + g_object_ref (device)); + g_hash_table_insert (daemon->priv->map_object_path_to_device, + g_strdup (devkit_disks_device_local_get_object_path (device)), +@@ -731,10 +760,18 @@ device_remove (DevkitDisksDaemon *daemon, GUdevDevice *d) + + g_warn_if_fail (g_strcmp0 (native_path, device->priv->native_path) == 0); + +- g_warn_if_fail (g_hash_table_remove (daemon->priv->map_native_path_to_device, +- device->priv->native_path)); +- g_warn_if_fail (g_hash_table_remove (daemon->priv->map_device_file_to_device, +- device->priv->device_file)); ++ g_hash_table_remove (daemon->priv->map_native_path_to_device, ++ device->priv->native_path); ++ /* Note that the created device file may actually disappear under certain ++ * circumstances such as a 'change' event. In this case we discard the device ++ * in update_info() and then we end up here. ++ * ++ * See https://bugs.freedesktop.org/show_bug.cgi?id=24264 for details. ++ */ ++ if (device->priv->device_file != NULL) { ++ g_hash_table_remove (daemon->priv->map_device_file_to_device, ++ device->priv->device_file); ++ } + g_warn_if_fail (g_hash_table_remove (daemon->priv->map_object_path_to_device, + device->priv->object_path)); + g_warn_if_fail (g_hash_table_remove (daemon->priv->map_dev_t_to_device, +-- +1.6.3.3 + --- devicekit-disks-007.orig/debian/patches/08-hide-lvm-mirror-volumes.patch +++ devicekit-disks-007/debian/patches/08-hide-lvm-mirror-volumes.patch @@ -0,0 +1,15 @@ +# Description: Hide pseudo LVs which should not be displayed. This is an unintrusive workaround for Karmic, real fix involves reshuffling our udev rules quite a bit (which is done upstream, and will trickle into Lucid). +# Ubuntu: https://launchpad.net/bugs/458529 +# Debian: http://bugs.debian.org/545032 +# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=24599 +--- old/data/95-devkit-disks.rules 2009-10-13 22:45:01.000000000 +0200 ++++ new/data/95-devkit-disks.rules 2009-10-22 22:29:13.000000000 +0200 +@@ -138,6 +138,8 @@ + ENV{ID_FS_LABEL}=="RECOVERY|HP_RECOVERY|Recovery Partition|DellUtility|DellRestore|IBM_SERVICE|SERVICEV001|SERVICEV002", \ + ENV{DKD_PRESENTATION_HIDE}="1" + ++ENV{DKD_DM_NAME}=="*_mimage_0|*_mimage_1|*_mlog", ENV{DKD_PRESENTATION_HIDE}="1" ++ + ############################################################################################################## + + # Mark devices that shouldn't be automounted / autoassembled etc. --- devicekit-disks-007.orig/debian/patches/02-unlock-CD-trays-after-mounting.patch +++ devicekit-disks-007/debian/patches/02-unlock-CD-trays-after-mounting.patch @@ -0,0 +1,64 @@ +From 92034c784d9ab37bbbfe84882c983cc8c92d295c Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 6 Oct 2009 10:51:09 +0200 +Subject: [PATCH 1/3] unlock CD trays after mounting + +Unlike in the hal world, we do not have a daemon polling CD drives for eject +button presses. In order to make hardware tray eject buttons work, unlock the +tray after mounting a CD. + +This is pretty much equivalent to yanking out USB sticks, which we already +handle reasonably (detecting disappeared device, force-unmounting). + +https://bugs.freedesktop.org/show_bug.cgi?id=24052 +--- + src/devkit-disks-device.c | 19 +++++++++++++++++++ + 1 files changed, 19 insertions(+), 0 deletions(-) + +diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c +index 60153d9..6460afd 100644 +--- a/src/devkit-disks-device.c ++++ b/src/devkit-disks-device.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -4395,6 +4396,23 @@ prepend_default_mount_options (const FSMountOptions *fsmo, uid_t caller_uid, cha + } + + static void ++unlock_cd_tray (DevkitDisksDevice *device) ++{ ++ /* Unlock CD tray to keep the hardware eject button working */ ++ if (g_udev_device_has_property (device->priv->d, "ID_CDROM")) { ++ g_print ("**** Unlocking CD-ROM door for %s\n", device->priv->device_file); ++ int fd = open(device->priv->device_file, O_RDONLY); ++ if (fd > 0) { ++ if (ioctl (fd, CDROM_LOCKDOOR, 0) != 0) ++ g_warning ("Could not unlock CD-ROM door: %s", strerror (errno)); ++ close (fd); ++ } else { ++ g_warning ("Could not open CD-ROM device: %s", strerror (errno)); ++ } ++ } ++} ++ ++static void + filesystem_mount_completed_cb (DBusGMethodInvocation *context, + DevkitDisksDevice *device, + gboolean job_was_cancelled, +@@ -4412,6 +4430,7 @@ filesystem_mount_completed_cb (DBusGMethodInvocation *context, + + update_info (device); + drain_pending_changes (device, FALSE); ++ unlock_cd_tray (device); + + dbus_g_method_return (context, data->mount_point); + } else { +-- +1.6.3.3 + --- devicekit-disks-007.orig/debian/patches/07-media-player-icon.patch +++ devicekit-disks-007/debian/patches/07-media-player-icon.patch @@ -0,0 +1,32 @@ +From 425dc0aaf6c34992e45165434e56ad72a9308937 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 13 Oct 2009 15:13:57 +0200 +Subject: [PATCH 4/4] =?utf-8?q?Bug=2024499=20=E2=80=93=20media=20players=20have=20USB=20drive=20icon?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +Set "media-player" icon for devices which have ID_MEDIA_PLAYER (as set by +media-player-info). +--- + data/95-devkit-disks.rules | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/data/95-devkit-disks.rules b/data/95-devkit-disks.rules +index fbb85a0..b5113aa 100644 +--- a/data/95-devkit-disks.rules ++++ b/data/95-devkit-disks.rules +@@ -91,6 +91,10 @@ ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="070e", ENV{ID_INSTANCE}=="0:1", ENV{ + ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="070e", ENV{ID_INSTANCE}=="0:2", ENV{ID_DRIVE_FLASH_SD}="1" + ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="070e", ENV{ID_INSTANCE}=="0:3", ENV{ID_DRIVE_FLASH_MS}="1" + ++# Generic music player ++# ++ENV{ID_MEDIA_PLAYER}=="?*", ENV{DKD_PRESENTATION_ICON_NAME}="multimedia-player" ++ + # Apple iPod Video + # + ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1209", ENV{DKD_PRESENTATION_ICON_NAME}="multimedia-player-ipod-white" +-- +1.6.3.3 + --- devicekit-disks-007.orig/debian/patches/03-fix-subsystem-check-for-firewire.patch +++ devicekit-disks-007/debian/patches/03-fix-subsystem-check-for-firewire.patch @@ -0,0 +1,30 @@ +From d830373c5120c891983ed31dbf8031e87e209eca Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Tue, 6 Oct 2009 20:54:27 +0200 +Subject: [PATCH 2/3] Fix subsystem check for firewire + +Firewire subsystem is called "ieee1394" in current Linux. Now check for both +"ieee1394" and "firewire". This fixes firewire drives to not be considered +system internal any more. + +https://bugs.freedesktop.org/show_bug.cgi?id=24351 +--- + src/devkit-disks-device.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/devkit-disks-device.c b/src/devkit-disks-device.c +index 6460afd..4a621c6 100644 +--- a/src/devkit-disks-device.c ++++ b/src/devkit-disks-device.c +@@ -1810,7 +1810,7 @@ update_drive_properties_from_sysfs (DevkitDisksDevice *device) + break; + + } +- } else if (strcmp (subsystem, "firewire") == 0) { ++ } else if (strcmp (subsystem, "firewire") == 0 || strcmp (subsystem, "ieee1394") == 0) { + + /* TODO: krh has promised a speed file in sysfs; theoretically, the speed can + * be anything from 100, 200, 400, 800 and 3200. Till then we just hardcode +-- +1.6.3.3 + --- devicekit-disks-007.orig/debian/patches/01-mkfs-tempdir.patch +++ devicekit-disks-007/debian/patches/01-mkfs-tempdir.patch @@ -0,0 +1,16 @@ +# Description: Daemon does not create /var/run/DeviceKit-disks/, so mkfs jobs fail. Just create the directory in /tmp, this is what /tmp is for, after all. +# Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=24265 + +Index: devicekit-disks/src/job-mkfs.c +=================================================================== +--- devicekit-disks.orig/src/job-mkfs.c 2009-10-05 10:12:00.000000000 +0200 ++++ devicekit-disks/src/job-mkfs.c 2009-10-05 10:13:45.000000000 +0200 +@@ -304,7 +304,7 @@ + + /* take ownership of the device if requested */ + if (take_ownership_uid != 0 || take_ownership_gid != 0) { +- char dir[256] = PACKAGE_LOCALSTATE_DIR "/run/DeviceKit-disks/job-mkfs-XXXXXX"; ++ char dir[256] = "/tmp/job-mkfs-XXXXXX"; + + if (mkdtemp (dir) == NULL) { + g_printerr ("cannot create directory %s: %m\n", dir); --- devicekit-disks-007.orig/debian/patches/series +++ devicekit-disks-007/debian/patches/series @@ -0,0 +1,10 @@ +00git-fix-inhibit.patch +00git-crash-on-removing-NULL-value-from-hash.patch +01-mkfs-tempdir.patch +02-unlock-CD-trays-after-mounting.patch +03-fix-subsystem-check-for-firewire.patch +04-mount-vfat-with-shortname-mixed-by-default.patch +05-german-translations.patch +06-show-MMC-MemStick-cards-by-default.patch +07-media-player-icon.patch +08-hide-lvm-mirror-volumes.patch --- devicekit-disks-007.orig/debian/patches/05-german-translations.patch +++ devicekit-disks-007/debian/patches/05-german-translations.patch @@ -0,0 +1,291 @@ +From 0a2174821ddab77d2a2ddaf15e008a68074e0e75 Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Fri, 9 Oct 2009 17:11:21 +0200 +Subject: [PATCH 2/2] =?utf-8?q?Bug=2024420=20=E2=80=93=20German=20translations?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +--- + po/LINGUAS | 1 + + po/de.po | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 260 insertions(+), 0 deletions(-) + create mode 100644 po/de.po + +diff --git a/po/LINGUAS b/po/LINGUAS +index b6d2833..3c3a1fd 100644 +--- a/po/LINGUAS ++++ b/po/LINGUAS +@@ -1,3 +1,4 @@ + # please keep this list sorted alphabetically + # + da ++de +diff --git a/po/de.po b/po/de.po +new file mode 100644 +index 0000000..9bcf0b7 +--- /dev/null ++++ b/po/de.po +@@ -0,0 +1,259 @@ ++# German translations for DeviceKit-disks ++# Copyright (C) 2009 Martin Pitt ++# This file is distributed under the same license as the DeviceKit-disks package. ++# Martin Pitt , 2009. ++# ++#, fuzzy ++msgid "" ++msgstr "" ++"Project-Id-Version: DeviceKit-disks\n" ++"Report-Msgid-Bugs-To: \n" ++"POT-Creation-Date: 2009-10-09 16:56+0200\n" ++"PO-Revision-Date: 2009-10-09 16:38+0200\n" ++"Last-Translator: Martin Pitt \n" ++"Language-Team: German \n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=UTF-8\n" ++"Content-Transfer-Encoding: 8bit\n" ++"Plural-Forms: nplurals=2; plural=(n != 1);\n" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:1 ++msgid "Authentication is required to cancel a job initiated by another user" ++msgstr "" ++"Zugriffsrechte werden benötigt um einen Auftrag eines anderen Benutzers " ++"abzubrechen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:2 ++msgid "Authentication is required to check the file system on the device" ++msgstr "" ++"Zugriffsrechte werden benötigt um das Dateisystem auf dem Gerät zu prüfen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:3 ++msgid "Authentication is required to configure Linux Software RAID devices" ++msgstr "" ++"Zugriffsrechte werden benötigt um Linux Software-RAID-Geräte zu konfigurieren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:4 ++msgid "Authentication is required to configure drive spindown timeout" ++msgstr "" ++"Zugriffsrechte werden benötigt um die Laufwerks-Zeitabschaltung zu " ++"konfigurieren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:5 ++msgid "Authentication is required to detach the drive" ++msgstr "Zugriffsrechte werden benötigt um das Laufwerk zu trennen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:6 ++msgid "Authentication is required to eject media from the device" ++msgstr "Zugriffsrechte werden benötigt um das Medium aus dem Gerät auszuwerfen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:7 ++msgid "Authentication is required to inhibit media detection" ++msgstr "Zugriffsrechte werden benötigt um Mediumerkennung zu unterdrücken" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:8 ++msgid "Authentication is required to list open files on a mounted file system" ++msgstr "" ++"Zugriffsrechte werden benötigt um offene Dateien auf einem eingehängen " ++"Dateisystem anzuzeigen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:9 ++msgid "" ++"Authentication is required to lock an encrypted device unlocked by another " ++"user" ++msgstr "" ++"Zugriffsrechte werden benötigt um ein verschlüsseltes Gerät zu sperren, das " ++"ein anderer Benutzer entsperrt hat" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:10 ++msgid "Authentication is required to modify the device" ++msgstr "Zugriffsrechte werden benötigt um das Gerät zu ändern" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:11 ++msgid "Authentication is required to mount the device" ++msgstr "Zugriffsrechte werden benötigt um das Gerät einzuhängen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:12 ++msgid "Authentication is required to refresh ATA SMART data" ++msgstr "Zugriffsrechte werden benötigt um ATA-SMART-Daten zu aktualisieren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:13 ++msgid "Authentication is required to retrieve historical ATA SMART data" ++msgstr "Zugriffsrechte werden benötigt um historische ATA-SMART-Daten zu holen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:14 ++msgid "Authentication is required to run ATA SMART self tests" ++msgstr "Zugriffsrechte werden benötigt um ATA-SMART-Selbsttests zu starten" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:15 ++msgid "Authentication is required to unlock an encrypted device" ++msgstr "" ++"Zugriffsrechte werden benötigt um ein verschlüsseltes Gerät zu entsperren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:16 ++msgid "Authentication is required to unmount devices mounted by another user" ++msgstr "" ++"Zugriffsrechte werden benötigt um ein Gerät auszuhängen, das ein anderer " ++"Benutzer eingehängt hat" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:17 ++msgid "Cancel a job initiated by another user" ++msgstr "Auftrag eines anderen Benutzers abbrechen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:18 ++msgid "Check file system of a system-internal device" ++msgstr "Dateisystem auf einem eingebauten Gerät prüfen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:19 ++msgid "Check file system on a device" ++msgstr "Dateisystem auf einem Gerät prüfen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:20 ++msgid "Configure Linux Software RAID" ++msgstr "Linux Software-RAID konfigurieren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:21 ++msgid "Detach a drive" ++msgstr "Laufwerk trennen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:22 ++msgid "Eject media from a device" ++msgstr "Medium aus Gerät auswerfen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:23 ++msgid "Inhibit media detection" ++msgstr "Medium-Erkennung unterdrücken" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:24 ++msgid "List open files" ++msgstr "Offene Dateien anzeigen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:25 ++msgid "List open files on a system-internal device" ++msgstr "Offene Dateien auf einem eingebauten Gerät anzeigen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:26 ++msgid "Lock an encrypted device unlocked by another user" ++msgstr "Verschlüsseltes Gerät eines anderen Benutzers sperren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:27 ++msgid "Modify a device" ++msgstr "Gerät ändern" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:28 ++msgid "Modify a system-internal device" ++msgstr "Eingebautes Gerät ändern" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:29 ++msgid "Mount a device" ++msgstr "Gerät einhängen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:30 ++msgid "Mount a system-internal device" ++msgstr "Eingebautes Gerät einhängen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:31 ++msgid "Refresh ATA SMART data" ++msgstr "ATA-SMART-Daten aktualisieren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:32 ++msgid "Retrieve historical ATA SMART data" ++msgstr "Historische ATA-SMART-Daten holen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:33 ++msgid "Run ATA SMART Self Tests" ++msgstr "ATA-SMART-Selbsttest starten" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:34 ++msgid "Set drive spindown timeout" ++msgstr "Laufwerks-Zeitabschaltung setzen" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:35 ++msgid "Unlock an encrypted device" ++msgstr "Verschlüsseltes Gerät entsperren" ++ ++#: ../policy/org.freedesktop.devicekit.disks.policy.in.h:36 ++msgid "Unmount a device mounted by another user" ++msgstr "Gerät eines anderen Benutzers aushängen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:94 ++msgid "Authentication is required to delete a partition" ++msgstr "Zugriffsrechte werden benötigt um eine Partition zu löschen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:98 ++msgid "Authentication is required to create a filesystem" ++msgstr "Zugriffsrechte werden benötigt um ein Dateisystem zu erstellen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:102 ++msgid "Authentication is required to create a partition" ++msgstr "Zugriffsrechte werden benötigt um eine Partition zu erstellen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:106 ++msgid "Authentication is required to modify a partition" ++msgstr "Zugriffsrechte werden benötigt um eine Partition zu ändern" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:110 ++msgid "Authentication is required to create a partition table" ++msgstr "Zugriffsrechte werden benötigt um eine Partitionstabelle zu erstellen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:114 ++msgid "Authentication is required to set the file system label" ++msgstr "Zugriffsrechte werden benötigt um den Dateisystem-Namen zu setzen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:118 ++msgid "Authentication is required to stop a Software RAID device" ++msgstr "Zugriffsrechte werden benötigt um das Software-RAID-Gerät anzuhalten" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:122 ++msgid "Authentication is required to check a Software RAID device" ++msgstr "Zugriffsrechte werden benötigt um das Software-RAID-Gerät zu prüfen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:126 ++msgid "Authentication is required to repair a Software RAID device" ++msgstr "" ++"Zugriffsrechte werden benötigt um das Software-RAID-Gerät zu reparieren" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:130 ++msgid "" ++"Authentication is required to add a new component to a Software RAID device" ++msgstr "" ++"Zugriffsrechte werden benötigt um eine neue Komponente zum Software-RAID-" ++"Gerät hinzuzufügen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:134 ++msgid "" ++"Authentication is required to remove a component from a Software RAID device" ++msgstr "" ++"Zugriffsrechte werden benötigt um eine Komponente aus dem Software-RAID-" ++"Gerät zu entfernen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:138 ++msgid "Authentication is required to start a Software RAID device" ++msgstr "Zugriffsrechte werden benötigt um ein Software-RAID-Gerät zu starten" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:142 ++msgid "Authentication is required to create a Software RAID device" ++msgstr "Zugriffsrechte werden benötigt um ein Software-RAID-Gerät zu erstellen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:146 ++msgid "Authentication is required to inhibit polling on a drive" ++msgstr "" ++"Zugriffsrechte werden benötigt um das Überwachen eines Gerätes zu " ++"unterdrücken" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:150 ++msgid "Authentication is required to poll for media" ++msgstr "Zugriffsrechte werden benötigt um ein Gerät zu überwachen" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:154 ++msgid "Authentication is required to inhibit all drive polling" ++msgstr "" ++"Zugriffsrechte werden benötigt um das Überwachen aller Geräte zu unterdrücken" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:236 ++msgid "Device" ++msgstr "Gerät" ++ ++#: ../src/devkit-disks-polkit-action-lookup.c:257 ++msgid "Drive" ++msgstr "Laufwerk" +-- +1.6.3.3 + --- devicekit-disks-007.orig/policy/org.freedesktop.devicekit.disks.policy.in +++ devicekit-disks-007/policy/org.freedesktop.devicekit.disks.policy.in @@ -25,7 +25,7 @@ no no - auth_admin_keep + yes @@ -45,7 +45,7 @@ no no - auth_admin_keep + yes @@ -75,7 +75,7 @@ no no - auth_admin_keep + yes @@ -115,7 +115,7 @@ no no - auth_admin_keep + yes @@ -175,7 +175,7 @@ no no - auth_admin_keep + yes --- devicekit-disks-007.orig/policy/org.freedesktop.devicekit.disks.policy +++ devicekit-disks-007/policy/org.freedesktop.devicekit.disks.policy @@ -27,7 +27,7 @@ no no - auth_admin_keep + yes @@ -51,7 +51,7 @@ no no - auth_admin_keep + yes @@ -87,7 +87,7 @@ no no - auth_admin_keep + yes @@ -132,7 +132,7 @@ no no - auth_admin_keep + yes @@ -204,7 +204,7 @@ no no - auth_admin_keep + yes