platform/upstream/udisks2.git
11 years agoFix docs for udisks_daemon_launch_spawned_job()
David Zeuthen [Tue, 2 Oct 2012 17:44:09 +0000 (13:44 -0400)]
Fix docs for udisks_daemon_launch_spawned_job()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_launch_simple_job()
David Zeuthen [Tue, 2 Oct 2012 17:43:44 +0000 (13:43 -0400)]
Fix docs for udisks_daemon_launch_simple_job()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd docs for udisks_base_job_set_auto_estimate()
David Zeuthen [Tue, 2 Oct 2012 17:40:32 +0000 (13:40 -0400)]
Add docs for udisks_base_job_set_auto_estimate()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd docs for udisks_base_job_get_auto_estimate()
David Zeuthen [Tue, 2 Oct 2012 17:40:12 +0000 (13:40 -0400)]
Add docs for udisks_base_job_get_auto_estimate()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix up docs for udisks_daemon_util_file_set_contents()
David Zeuthen [Tue, 2 Oct 2012 17:37:54 +0000 (13:37 -0400)]
Fix up docs for udisks_daemon_util_file_set_contents()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_util_on_same_seat()
David Zeuthen [Tue, 2 Oct 2012 17:35:47 +0000 (13:35 -0400)]
Fix docs for udisks_daemon_util_on_same_seat()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: use CDATA for email addresses to avoid them being mangled
David Zeuthen [Tue, 2 Oct 2012 17:29:01 +0000 (13:29 -0400)]
docs: use CDATA for email addresses to avoid them being mangled

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: add some more meta information to the man pages (version, source, manual)
David Zeuthen [Tue, 2 Oct 2012 17:16:46 +0000 (13:16 -0400)]
docs: add some more meta information to the man pages (version, source, manual)

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Document udisksctl(1)'s status command
David Zeuthen [Tue, 2 Oct 2012 17:01:06 +0000 (13:01 -0400)]
docs: Document udisksctl(1)'s status command

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Document udisksctl(1)'s info command
David Zeuthen [Tue, 2 Oct 2012 16:58:15 +0000 (12:58 -0400)]
docs: Document udisksctl(1)'s info command

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: update man page dates to "October 2012"
David Zeuthen [Tue, 2 Oct 2012 16:53:47 +0000 (12:53 -0400)]
docs: update man page dates to "October 2012"

In the future we shall update it only in minor releases .0,
e.g. 2.0.0, 2.2.0, 2.4.0 and so on.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Link to http://www.freedesktop.org/wiki/Software/dbus in udisks(8)
David Zeuthen [Tue, 2 Oct 2012 16:40:23 +0000 (12:40 -0400)]
docs: Link to freedesktop.org/wiki/Software/dbus in udisks(8)

... so it's 100% clear what "system message bus" means.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Remove "(available online here)" comment in udisks(8) man page
David Zeuthen [Tue, 2 Oct 2012 16:36:44 +0000 (12:36 -0400)]
docs: Remove "(available online here)" comment in udisks(8) man page

We don't do that for other chapters.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: only reference hdparm(8) at the end of the paragraph
David Zeuthen [Tue, 2 Oct 2012 15:38:10 +0000 (11:38 -0400)]
docs: only reference hdparm(8) at the end of the paragraph

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoBump version number to 2.0.0
David Zeuthen [Fri, 28 Sep 2012 19:05:53 +0000 (15:05 -0400)]
Bump version number to 2.0.0

This is not the release (at least NEWS needs to be updated) but pretty
close. Basically only need to e.g. check that nothing breaks by going
from 1.99.0 to 2.0.0

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't require that users define UDISKS_API_IS_SUBJECT_TO_CHANGE
David Zeuthen [Fri, 28 Sep 2012 19:03:04 +0000 (15:03 -0400)]
Don't require that users define UDISKS_API_IS_SUBJECT_TO_CHANGE

We're very close to the 2.0 release (two-point-oh!) so nuke this.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMove bash completion script into /usr/share/bash-completion/completions
David Zeuthen [Fri, 28 Sep 2012 17:58:04 +0000 (13:58 -0400)]
Move bash completion script into /usr/share/bash-completion/completions

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix glaringly wrong documentation for Filesystem.Mount()
David Zeuthen [Fri, 28 Sep 2012 14:53:25 +0000 (10:53 -0400)]
Fix glaringly wrong documentation for Filesystem.Mount()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention the right file when complaing about /proc/swaps
David Zeuthen [Thu, 27 Sep 2012 17:16:31 +0000 (13:16 -0400)]
Mention the right file when complaing about /proc/swaps

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake it work without requiring the kernel to be CONFIG_SWAP=y
David Zeuthen [Thu, 27 Sep 2012 17:14:15 +0000 (13:14 -0400)]
Make it work without requiring the kernel to be CONFIG_SWAP=y

https://bugs.freedesktop.org/show_bug.cgi?id=50142

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't complain about missing /etc/fstab file
David Zeuthen [Thu, 27 Sep 2012 17:05:08 +0000 (13:05 -0400)]
Don't complain about missing /etc/fstab file

It's not inconceivable that this file is missing so don't loudly
complain about it.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't complain about missing /etc/crypttab file
David Zeuthen [Thu, 27 Sep 2012 17:00:57 +0000 (13:00 -0400)]
Don't complain about missing /etc/crypttab file

Some systems don't have it at all - notably F18 doesn't have if unless
you use encrypted root. Also make the file monitor pick up when the
file is deleted. This was reported in bug 53147:

 https://bugs.freedesktop.org/show_bug.cgi?id=53147

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoOnly do the isohybrid hack for the first partition
David Zeuthen [Wed, 26 Sep 2012 16:04:59 +0000 (12:04 -0400)]
Only do the isohybrid hack for the first partition

Otherwise we end up showing two partitions and that is unwanted. See

https://bugzilla.redhat.com/show_bug.cgi?id=860243

for details.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix same seat detection if built with systemd, but not booted with it
Vincent Untz [Tue, 25 Sep 2012 08:55:31 +0000 (10:55 +0200)]
Fix same seat detection if built with systemd, but not booted with it

If we haven't booted with systemd, then we can only assume it's always
the same seat.

Based on patch by Takashi Iwai <tiwai@suse.com>.

https://bugzilla.novell.com/show_bug.cgi?id=769570
https://bugs.freedesktop.org/show_bug.cgi?id=55309

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoconfigure.ac: raise gudev dependency
Claudio Saavedra [Wed, 19 Sep 2012 12:51:47 +0000 (15:51 +0300)]
configure.ac: raise gudev dependency

udisks is using g_udev_device_get_usec_since_initialized(), which
was added in gudev 165.

https://bugs.freedesktop.org/show_bug.cgi?id=55092

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agointegration-test: Skip r/o mount checks for XFS and reiserfs
Martin Pitt [Mon, 10 Sep 2012 13:50:10 +0000 (15:50 +0200)]
integration-test: Skip r/o mount checks for XFS and reiserfs

These are known-broken right now, and there is no workaround. See

  https://github.com/karelzak/util-linux/issues/17
  https://github.com/karelzak/util-linux/issues/18

11 years agoEnable large file support
Martin Pitt [Fri, 7 Sep 2012 15:06:51 +0000 (17:06 +0200)]
Enable large file support

Without this, on 32 bit platforms you get a warning and syslog entry like

[WARNING]: Error statting /swapfile: Value too large for defined data type [udisksmountmonitor.c:554, udisks_mount_monitor_get_swaps()]

when you have a /swapfile which is bigger than 2 GB.

https://launchpad.net/bugs/1039022

11 years agointegration-test: Fix start_daemon() for restarts
Martin Pitt [Fri, 7 Sep 2012 06:47:08 +0000 (08:47 +0200)]
integration-test: Fix start_daemon() for restarts

klass.manager is already initialized when we are restarting; ensure we properly
wait for the daemon to start up.

11 years agointegration-tests: Check handling of existing mount points
Martin Pitt [Fri, 7 Sep 2012 05:52:51 +0000 (07:52 +0200)]
integration-tests: Check handling of existing mount points

udisks tracks its mounts in /run/udisks2/mounted-fs, so udisks generated mount
points should be reused across daemon restarts, but manually created mount
points should not be.

See https://bugs.freedesktop.org/show_bug.cgi?id=54487

11 years agointegration-test: Split out and fix daemon startup
Martin Pitt [Fri, 7 Sep 2012 05:50:26 +0000 (07:50 +0200)]
integration-test: Split out and fix daemon startup

Split out start_daemon() and stop_daemon() into separate class methods, so that
tests can check properties that should persist across daemon restarts.

Also fix the startup to add --replace, to ensure that we are really talking to
the udisksd launched by the test suite, not to an already existing one running
in the system.

11 years agointegration-test: Check mounting of read-only devices
Martin Pitt [Fri, 7 Sep 2012 04:23:52 +0000 (06:23 +0200)]
integration-test: Check mounting of read-only devices

This exposes a bug in ntfs-3g, see
https://bugs.freedesktop.org/show_bug.cgi?id=53237 .

11 years agoBug 51063 — Mount vfat with "flush" option
Martin Pitt [Thu, 6 Sep 2012 09:39:57 +0000 (11:39 +0200)]
Bug 51063 — Mount vfat with "flush" option

For VFAT mounts we want the "flush" option, to avoid minute-long sync times
after ejecting/shutting down removable/hotpluggable devices in the UI.

Note that we keep the "flush" option as allowed option for now to avoid
breaking software like kdelibs (https://bugs.kde.org/show_bug.cgi?id=273792)
which applies this by default.

https://bugs.freedesktop.org/show_bug.cgi?id=51063

11 years agointegration-test: Fix occasional failure of test_luks_forced_removal
Martin Pitt [Thu, 6 Sep 2012 08:17:47 +0000 (10:17 +0200)]
integration-test: Fix occasional failure of test_luks_forced_removal

Sometimes the client's GDBusObjectManager does not refresh properly and keeps
around objects which have long gone, which leads to a timeout in waiting for
the device object to disappear. Presumably this is because the test suite does
not run a main loop, and we cannot currently access
g_main_context_get_default() from introspection. So instead, just generate a
fresh client.

11 years agoAdd --disable-man configure option
Colin Walters [Wed, 5 Sep 2012 19:39:28 +0000 (15:39 -0400)]
Add --disable-man configure option

This matches what is available in glib.  Allowing documentation
to be disabled is good for 3 reasons:

1) Embedded system developers don't want it - while it's not too
   hard for them to just rm -rf /usr/share/man, it makes sense
   to just skip building it entirely.
2) Documentation is the source of build dependency loops; having
   a method to disable it allows those loops to be cut manually
3) My gnome-ostree build system doesn't include Docbook because
   the schemas are only distributed as Zip files, and the build
   system only accepts git repositories.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd workaround annotation for udisks_client_get_block_for_dev()
Martin Pitt [Wed, 5 Sep 2012 16:29:21 +0000 (18:29 +0200)]
Add workaround annotation for udisks_client_get_block_for_dev()

The gobject-introspection parser does not know how to properly handle dev_t
arguments (https://bugzilla.gnome.org/show_bug.cgi?id=584517) and treats them
as gint. But as the native API expects a 64 bit integer, you'll get garbage in
the upper word on 32 bit platforms, which cause
UDisks.Block.get_block_for_dev() to never find a match when using through
introspection.

https://bugs.freedesktop.org/show_bug.cgi?id=54566

11 years agointegration-test: Robustify test_luks_forced_removal()
Martin Pitt [Wed, 5 Sep 2012 13:15:25 +0000 (15:15 +0200)]
integration-test: Robustify test_luks_forced_removal()

Wait a bit for the object path to disappear after yanking the device away.
Also, ensure that the device is always re-added after this, even if there are
test failures or exceptions in between, otherwise all subsequent tests will
fail as well.

11 years agointegration-test: Add test case for mounting removable device
Martin Pitt [Tue, 4 Sep 2012 15:15:11 +0000 (17:15 +0200)]
integration-test: Add test case for mounting removable device

This should only require the org.freedesktop.udisks2.filesystem-mount
privilege, not -system.

11 years agointegration-test: Create a read-only fake CD-ROM device
Martin Pitt [Tue, 4 Sep 2012 14:05:59 +0000 (16:05 +0200)]
integration-test: Create a read-only fake CD-ROM device

We will need this for further tests, e. g. to reproduce
https://bugs.freedesktop.org/show_bug.cgi?id=53237 or to check required
privileges for a removable device.

scsi_debug is not capable enough to emulate the whole SCSI CD-ROM command set,
thus we need a temporary udev rule (in /run/udev/rules.d/) to ensure that
blkid runs on scsi_debug CD devices.

11 years agotest_polkitd.py: Add --replace option
Martin Pitt [Thu, 30 Aug 2012 06:58:51 +0000 (08:58 +0200)]
test_polkitd.py: Add --replace option

We do not need this for udisks' test case (as we run that on a private bus),
but it's useful for system integration tests which use this mock polkitd.

11 years agoUse all-caps for RAID
David Zeuthen [Fri, 24 Aug 2012 19:10:55 +0000 (15:10 -0400)]
Use all-caps for RAID

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd textual descriptions for IMSM Raid members
David Zeuthen [Fri, 24 Aug 2012 18:54:09 +0000 (14:54 -0400)]
Add textual descriptions for IMSM Raid members

http://people.freedesktop.org/~david/imsm_before.png
http://people.freedesktop.org/~david/imsm_after.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd support for creating exFAT filesystems and changing exFAT labels
David Zeuthen [Thu, 23 Aug 2012 20:27:33 +0000 (16:27 -0400)]
Add support for creating exFAT filesystems and changing exFAT labels

Tested with the exFAT userspace utilities available from

 http://code.google.com/p/exfat/

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agointegration-test: Consistent mount path validation
Martin Pitt [Wed, 22 Aug 2012 10:28:56 +0000 (12:28 +0200)]
integration-test: Consistent mount path validation

Do not require mount paths to be in /run/media/, leave that as an
implementation detail (the code supports both cases). The other mount point
tests already do this.

12 years agoUpdate list of recovery/system partitions
David Zeuthen [Fri, 27 Jul 2012 21:53:40 +0000 (17:53 -0400)]
Update list of recovery/system partitions

In particular add "System Reserved" (Windows 7). Also, since
ID_FS_LABEL nowadays always has underscores, replace spaces with
underscores in some of the existing patterns.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoPost-release version bump to 1.100.0
David Zeuthen [Fri, 27 Jul 2012 16:54:39 +0000 (12:54 -0400)]
Post-release version bump to 1.100.0

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate NEWS for release
David Zeuthen [Fri, 27 Jul 2012 16:51:44 +0000 (12:51 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate docs
David Zeuthen [Fri, 27 Jul 2012 16:46:11 +0000 (12:46 -0400)]
Update docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate translations from Transifex
David Zeuthen [Fri, 27 Jul 2012 16:35:00 +0000 (12:35 -0400)]
Update translations from Transifex

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate /run/udisks2/loop file before setting up the loop device
David Zeuthen [Thu, 26 Jul 2012 21:03:43 +0000 (17:03 -0400)]
Update /run/udisks2/loop file before setting up the loop device

Otherwise we'll race to read back from it (to set the SetupByUID
property) when we get an uevent on the loop device.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoIgnore non-Linux software on SanDisk Cruzer
David Zeuthen [Thu, 26 Jul 2012 18:36:46 +0000 (14:36 -0400)]
Ignore non-Linux software on SanDisk Cruzer

We've been happily ignoring this because of firmware-bugs in its
CD-ROM emulation but this may soon change, see

 https://bugs.freedesktop.org/show_bug.cgi?id=52474

In fact, newer revisions of the Cruzer (including the one Kay has) has
fixes for this (making the fake CD-ROM appear on the desktop).

The CD-ROM will still appear in GNOME Disks and it can be mounted that
way if you really want to access these files. It just won't appear in
the desktop, e.g. the file manager or file chooser until it's manually
mounted.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoCreate cleanup object before coldplugging
David Zeuthen [Thu, 26 Jul 2012 15:38:45 +0000 (11:38 -0400)]
Create cleanup object before coldplugging

Otherwise things like Loop.SetupByUID will not be set correctly.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUse ATA PASS-THROUGH (16) command instead ATA PASS-THROUGH (12) command
David Zeuthen [Tue, 24 Jul 2012 15:08:36 +0000 (11:08 -0400)]
Use ATA PASS-THROUGH (16) command instead ATA PASS-THROUGH (12) command

When needed (ie. when someone files a bug), we'll add support for
trying 12-byte commands (I don't know how it'd work right now).

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd "Linux Filesystem" GPT partition type
David Zeuthen [Mon, 23 Jul 2012 20:05:31 +0000 (16:05 -0400)]
Add "Linux Filesystem" GPT partition type

According to http://en.wikipedia.org/wiki/GUID_Partition_Table there
is now a new dedicated Linux partition type so Microsoft's Basic Data
no longer has to be overloaded.

 Previously Linux used the same GUID for the data partitions as
 Windows. Linux never had a separate unique partition type GUID
 defined for its data partitions. This created problems when
 dual-booting Linux and Windows in UEFI-GPT setup. This new GUID was
 defined jointly by GPT fdisk and GNU Parted developers. It is
 identified as type code 8300 in GPT fdisk.

So add this new type and remove "Basic Data" from the Linux section
(it was listed in both the Linux and Microsoft section until now).

For now (and the foreseeable future) we will use "Basic Data" instead
of "Microsoft Basic Data" since a lot of systems in the wild is using
this type already and it would cause confusion to display the string
"Microsoft Basic Data" on Linux systems

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd a Block.Rescan() method
David Zeuthen [Sat, 14 Jul 2012 18:59:28 +0000 (14:59 -0400)]
Add a Block.Rescan() method

This is needed when restoring a disk image - the kernel won't reread
the partition table on its own and BLKRRPART is unfortunately not
permitted if not uid 0.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoIgnore "Apple Boot" GPT partitions
David Zeuthen [Sat, 14 Jul 2012 18:06:22 +0000 (14:06 -0400)]
Ignore "Apple Boot" GPT partitions

My USB disk set up for FileVault on Lion, has one of these. It's not
useful to display in the user interface.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoclient: Add Apple Core Storage GPT partition type
David Zeuthen [Sat, 14 Jul 2012 18:03:08 +0000 (14:03 -0400)]
client: Add Apple Core Storage GPT partition type

This is used for FileVault partitions and probably other things as
well.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoBlack-list seemingly invalid WWN for SAMSUNG SP1604N hard disks
David Zeuthen [Tue, 10 Jul 2012 21:09:16 +0000 (17:09 -0400)]
Black-list seemingly invalid WWN for SAMSUNG SP1604N hard disks

In this case, use the serial number as the VPD (the serial number does
vary) otherwise we'll end up only creating a single Drive object.

This was reported in https://bugzilla.redhat.com/show_bug.cgi?id=838691

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate compiler warning flags
David Zeuthen [Mon, 9 Jul 2012 15:49:19 +0000 (11:49 -0400)]
Update compiler warning flags

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoFix typo
David Zeuthen [Sat, 7 Jul 2012 21:46:44 +0000 (17:46 -0400)]
Fix typo

... now 'make distcheck' works again.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDisable -Wformat-nonliteral for a tiny block of code
David Zeuthen [Sat, 7 Jul 2012 21:34:20 +0000 (17:34 -0400)]
Disable -Wformat-nonliteral for a tiny block of code

... in this case, we happen to know better than the compiler what we
are doing.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd more compiler warnings
David Zeuthen [Fri, 6 Jul 2012 17:33:48 +0000 (13:33 -0400)]
Add more compiler warnings

You'd think GNOME_COMPILE_WARNINGS([maximum]) would be good enough but
apparently not. I hate build systems.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoFix some uninitialized variable warnings
David Zeuthen [Thu, 5 Jul 2012 21:07:58 +0000 (17:07 -0400)]
Fix some uninitialized variable warnings

These only occur when building with -O2, not -O0, ofcourse, thanks gcc.

Pointed out by Colin Walters <walters@verbum.org>.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDon't return uninitialized variable on inhibitor error path
David Zeuthen [Thu, 5 Jul 2012 20:55:50 +0000 (16:55 -0400)]
Don't return uninitialized variable on inhibitor error path

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoInhibit system shutdown, sleep and idle when formatting and erasing devices
David Zeuthen [Thu, 5 Jul 2012 20:38:00 +0000 (16:38 -0400)]
Inhibit system shutdown, sleep and idle when formatting and erasing devices

Formatting and ATA secure erase are both potentially long-running
tasks that can easily take hours to complete. Especially for ATA
secure erase, losing power while the command is pending can be very
very bad.

Here's udisks taking an inhibitor lock:

 # gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.ListInhibitors
 ([('shutdown:sleep:idle', 'Disk Manager', 'Formatting Device', 'block', uint32 0, uint32 14172)],)

On non-systemd systems, this does nothing.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoWhen setting up LUKS, erase the cleartext device rather than the cryptotext one
David Zeuthen [Thu, 5 Jul 2012 18:20:27 +0000 (14:20 -0400)]
When setting up LUKS, erase the cleartext device rather than the cryptotext one

That way the cryptotext device will be full of noise instead of
zeroes, that way not conveying that there isn't a lot of data on the
device.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDon't report progress for ATA Secure Erase when expected time is >508 minutes
David Zeuthen [Wed, 4 Jul 2012 16:11:48 +0000 (12:11 -0400)]
Don't report progress for ATA Secure Erase when expected time is >508 minutes

I have a Samsung drive, see [1], that reports 510 in its IDENTIFY data
but the secure erase only takes around 214 minutes:

 Jul  3 00:18:18 mars udisksd[9480]: Commencing ATA enhanced secure erase of /dev/sdd (SAMSUNG-HD103UJ-S13PJ90S703014). This operation is expected to take at least 510 minutes to complete
 [...]
 Jul  3 03:52:01 mars udisksd[9480]: Finished securely erasing /dev/sdd (SAMSUNG-HD103UJ-S13PJ90S703014)

See

 http://people.freedesktop.org/~david/gnome-disks-secure-erase-with-greater-than-508-min.png

for an example of how GNOME Disks interprets this and compare it with

 http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-progress.png

for when progress is available.

[1] :

/org/freedesktop/UDisks2/drives/SAMSUNG_HD103UJ_S13PJ90S703015:
  org.freedesktop.UDisks2.Drive:
    Configuration:              {}
    ConnectionBus:
    Ejectable:                  false
    Id:                         SAMSUNG-HD103UJ-S13PJ90S703015
    Media:
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:
    MediaRemovable:             false
    Model:                      SAMSUNG HD103UJ
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  false
    Revision:                   1AA01181
    RotationRate:               -1
    Seat:                       seat0
    Serial:                     S13PJ90S703015
    Size:                       1000204886016
    SortKey:                    01hotplug/1341418168551507
    TimeDetected:               1341418168551507
    TimeMediaDetected:          1341418168551507
    Vendor:
    WWN:                        0x50024e9200c0c694
  org.freedesktop.UDisks2.Drive.Ata:
    AamEnabled:                                 false
    AamSupported:                               true
    AamVendorRecommendedValue:                  254
    ApmEnabled:                                 false
    ApmSupported:                               true
    PmEnabled:                                  true
    PmSupported:                                true
    SecurityEnhancedEraseUnitMinutes:           510
    SecurityEraseUnitMinutes:                   510
    SecurityFrozen:                             false
    SmartEnabled:                               true
    SmartFailing:                               false
    SmartNumAttributesFailedInThePast:          0
    SmartNumAttributesFailing:                  0
    SmartNumBadSectors:                         0
    SmartPowerOnSeconds:                        31629600
    SmartSelftestPercentRemaining:              0
    SmartSelftestStatus:                        success
    SmartSupported:                             true
    SmartTemperature:                           295.14999999999998
    SmartUpdated:                               1341418168

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agointegration-test: More robust syncing
Martin Pitt [Tue, 3 Jul 2012 15:24:41 +0000 (17:24 +0200)]
integration-test: More robust syncing

Repeatedly settle the client until all main loop events have been processed,
instead of just calling it once. This avoids a lot of spurious, but obstinate
test failures due to properties not being updated yet.

Also add an extra sleep after the manual mount and dd call to allow some more
time for the changes to get picked up. This is a hack, but not easily fixed in
a cleaner way.

12 years agoDon't use g_propagate_error() with a NULL GError
David Zeuthen [Tue, 3 Jul 2012 13:06:32 +0000 (09:06 -0400)]
Don't use g_propagate_error() with a NULL GError

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd support for VMWare filesystem types and GPT partition types
David Zeuthen [Tue, 3 Jul 2012 10:49:23 +0000 (06:49 -0400)]
Add support for VMWare filesystem types and GPT partition types

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agointegration-test: Use Gio.TestDBus() again
Martin Pitt [Mon, 18 Jun 2012 12:34:27 +0000 (14:34 +0200)]
integration-test: Use Gio.TestDBus() again

Now that we do not need to call tests under a different UID any more, we can
drop the custom D-BUS config and dbus-launch, and go back to the much simpler
Gio.TestDBus().

12 years agointegration-test: Use mock polkitd
Martin Pitt [Mon, 18 Jun 2012 12:26:36 +0000 (14:26 +0200)]
integration-test: Use mock polkitd

Add src/tests/test_polkitd.py which provides a simple mock polkitd on a given
bus, as well as some convenience API. This allows test cases to precisely
control which actions get permitted and forbidden without having to assume
anything about the system polkit configuration, users, active/inactive consoles
etc. This is meant to go into polkit itself at some point.

Simplify integration-test to use test_polkitd and get rid of the uid changing
and calling of udisksctl.

12 years agoAdd ATA Secure Erase functionality
David Zeuthen [Mon, 2 Jul 2012 21:41:20 +0000 (17:41 -0400)]
Add ATA Secure Erase functionality

This is available via a new Drive.Ata.SecurityEraseUnit() method but
also via the Block.Format() method by setting the @erase parameter to
'ata-secure-erase' or 'ata-secure-erase-enhanced'. The latter is the
preferred way of using the new functionality.

Secure erase requires the calling user to be authorized for the (newly
added) org.freedesktop.udisks2.ata-secure-erase polkit action. By
default this requires administrator authentication no matter what kind
of drive is being used.

Since a secure erase cannot be canceled, a new Job:Cancelable property
has been added so the UI can avoid displaying a cancel button.

Considerable care have been taken in the implementation so things are
properly logged to the system log in case something goes wrong - for
example, if a device is yanked it may remain locked and needs to be
unlocked using the temporary 'xxxx' password that is used.

http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase.png
http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-warning.png
http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-confirmation.png
http://people.freedesktop.org/~david/gnome-disks-ata-secure-erase-progress.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoInit interface proxies on hotplug too
David Zeuthen [Sat, 30 Jun 2012 16:28:46 +0000 (12:28 -0400)]
Init interface proxies on hotplug too

GDBusObjectManagerClient only emits object-added for an object with N
interface (not N separate interface-added signals).

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoIssue BLKRRPART if wiping a device with an existing partition table
David Zeuthen [Wed, 27 Jun 2012 16:46:32 +0000 (12:46 -0400)]
Issue BLKRRPART if wiping a device with an existing partition table

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoSet Job:ExpectedEndTime when erasing a device
David Zeuthen [Tue, 26 Jun 2012 23:32:48 +0000 (19:32 -0400)]
Set Job:ExpectedEndTime when erasing a device

Do this by introducing some plumbing in UDisksBaseJob to estimate the
end time based on the UDisksJob:progress property. We do this by using
a 100-period moving average (actually, up to 100 periods). Works out
great in practice.

Also switch the format of the time used on the org.fd.UDisks.Job
interface to be micro-seconds instead of seconds. This is not really a
break as these properties were always zero in any released udisks2
version.

http://people.freedesktop.org/~david/gnome-disks-estimated-time-remaining.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoBug 51439 – udisks should hide lvm PVs
David Zeuthen [Tue, 26 Jun 2012 17:56:20 +0000 (13:56 -0400)]
Bug 51439 – udisks should hide lvm PVs

Hide partitions marked as containing LVM and RAID. This is only useful
for encrypted partitions.

https://bugs.freedesktop.org/show_bug.cgi?id=51439

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd erase parameter to Block.Format() to zero out device before formatting it
David Zeuthen [Mon, 25 Jun 2012 15:38:29 +0000 (11:38 -0400)]
Add erase parameter to Block.Format() to zero out device before formatting it

... and also provide new job properties so it's possible to build a
meaningful UI around it. This makes things like this possible

 http://people.freedesktop.org/~david/gnome-disks-erase-overwrite-option.png
 http://people.freedesktop.org/~david/gnome-disks-long-running-operations.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoMove Drive:Configuration property up a bit
David Zeuthen [Sun, 24 Jun 2012 15:34:05 +0000 (11:34 -0400)]
Move Drive:Configuration property up a bit

Makes the docs look better.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDrop the 'drive-' prefix for drive configuration files
David Zeuthen [Sun, 24 Jun 2012 15:31:37 +0000 (11:31 -0400)]
Drop the 'drive-' prefix for drive configuration files

In the future we may want to use the same configuration file format
for block devices.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDefault to mode 0600 for drive config files
David Zeuthen [Sun, 24 Jun 2012 15:24:35 +0000 (11:24 -0400)]
Default to mode 0600 for drive config files

This is important because we *may* want to store passwords in them at
some point (such as the ATA security stuff).

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd DriveAta.PmWakeup() method
David Zeuthen [Sun, 24 Jun 2012 14:03:44 +0000 (10:03 -0400)]
Add DriveAta.PmWakeup() method

The UI already has a "Standby" so for symmetri it's desirable to also
have a "Wakeup" menu item.

http://people.freedesktop.org/~david/gnome-disks-resume-from-standby.png

For now it seems to be good enough to just read some sectors from the
disk. We can always change this to something more sophisticated later
if needed.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDon't require auth for Standby'ing non-system drives on own seat
David Zeuthen [Sat, 23 Jun 2012 22:36:10 +0000 (18:36 -0400)]
Don't require auth for Standby'ing non-system drives on own seat

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd drive configuration interfaces and configuration files
David Zeuthen [Sat, 23 Jun 2012 14:18:53 +0000 (10:18 -0400)]
Add drive configuration interfaces and configuration files

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agointegration-test: Fix parsing of daemon path in system mode
Martin Pitt [Wed, 13 Jun 2012 14:44:54 +0000 (16:44 +0200)]
integration-test: Fix parsing of daemon path in system mode

Only take the first word of the Exec= line in the udisks D-BUS service file, so
that extra arguments like --no-debug get ignored.

With that, integration-test runs fine against the system installed binaries
again.

12 years agoShip integration-test in the tarball
Martin Pitt [Wed, 13 Jun 2012 14:27:55 +0000 (16:27 +0200)]
Ship integration-test in the tarball

12 years agointegration-test: Fix Polkit.test_internal_fs_nobody test case
Martin Pitt [Wed, 13 Jun 2012 13:33:36 +0000 (15:33 +0200)]
integration-test: Fix Polkit.test_internal_fs_nobody test case

Do not call tools/udisksctl libtool wrapper as nobody, call the actual ELF
binary in tools/.libs. Otherwise libtool cannot write its temporary file as
user nobody.

12 years agoAdd Block.OpenForBenchmark() method
David Zeuthen [Wed, 13 Jun 2012 13:00:44 +0000 (09:00 -0400)]
Add Block.OpenForBenchmark() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoMark Realtek rts5229 based card readers as flash drives.
Ayan George [Thu, 24 May 2012 19:24:11 +0000 (19:24 +0000)]
Mark Realtek rts5229 based card readers as flash drives.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
12 years agointegration-test: Check polkit denial
Martin Pitt [Tue, 12 Jun 2012 14:41:41 +0000 (16:41 +0200)]
integration-test: Check polkit denial

Add a test case for a polkit-denied operation: we try to mount an internal disk
as user "nobody". Technically the system polkit configuration could allow this,
but let's hope that this is not the case (this is an integration test, after
all).

We need to supply our own D-BUS configuration for this to allow nobody to
access our temporary fake system bus. Thus drop the usage of Gio.TestDBus and
replace it with calling dbus-launch.

12 years agointegration-test: Explicit polkit tests
Martin Pitt [Tue, 12 Jun 2012 13:37:44 +0000 (15:37 +0200)]
integration-test: Explicit polkit tests

Since commit 203533a0 udisks can run without polkit, so run most of the
testsuite without polkitd. Introduce a new "Polkit" test that checks operation
with polkitd running. This only has a very shallow test for now, as further
tests require some reorganization.

12 years agointegration-test: Fix existance test of local state dirs
Martin Pitt [Mon, 11 Jun 2012 14:58:52 +0000 (16:58 +0200)]
integration-test: Fix existance test of local state dirs

12 years agoAdd Documentation key to systemd unit file
David Zeuthen [Sat, 9 Jun 2012 14:15:04 +0000 (10:15 -0400)]
Add Documentation key to systemd unit file

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoCatch up with latest polkit guidance
David Zeuthen [Fri, 8 Jun 2012 17:43:35 +0000 (13:43 -0400)]
Catch up with latest polkit guidance

See

 http://cgit.freedesktop.org/polkit/commit/?id=acf3a06e55f9ca8a7f7bfa012c24e8794d27c85f
 https://bugzilla.gnome.org/show_bug.cgi?id=677718

for details.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoPost-release version bump to 1.99.0
David Zeuthen [Thu, 7 Jun 2012 18:43:23 +0000 (14:43 -0400)]
Post-release version bump to 1.99.0

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate NEWS for release
David Zeuthen [Thu, 7 Jun 2012 18:36:42 +0000 (14:36 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoudisksd: work if polkitd is not available
David Zeuthen [Thu, 7 Jun 2012 15:45:02 +0000 (11:45 -0400)]
udisksd: work if polkitd is not available

Upstream polkit now recommends this, see

http://cgit.freedesktop.org/polkit/commit/?id=84e42887d413cba0039f92f0c56a25c70c20fe6e

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agointegration-test: Run on temporary local DBus
Martin Pitt [Thu, 7 Jun 2012 09:26:45 +0000 (11:26 +0200)]
integration-test: Run on temporary local DBus

Run a temporary local session DBus, using the new Gio.TestDBus API from glib
2.34. Pretend that it is the system DBus, and run our udisksd as well as a
polkitd instance on that. This avoids interacting with the real system
DBus/udisksd and any currently running session, and obsoletes the need for
suspending gvfs-udisks2-volume-monitor (which has always been a GNOME specific
hack).

The polkitd debug output will now appear in the dameon log as well, if you use
the --log-file/-l option.

12 years agointegration-test: Quiesce wipefs output
Martin Pitt [Thu, 7 Jun 2012 08:48:52 +0000 (10:48 +0200)]
integration-test: Quiesce wipefs output

It previously cluttered the test output with the erased bytes, like:

test_ext3 (__main__.FS)
fs: ext3 ... [cli] 2 bytes were erased at offset 0x438 (ext3)
they were: 53 ef
[ud] ok

12 years agointegration-test: Update expected Luks mount points
Martin Pitt [Thu, 7 Jun 2012 08:43:23 +0000 (10:43 +0200)]
integration-test: Update expected Luks mount points

Mounts are now done in /run/media when there is a known user name. Update the
Luks tests to get along with both /media and /run/media/user.

12 years agoWait for the correct device after formatting
Martin Pitt [Thu, 7 Jun 2012 08:25:08 +0000 (10:25 +0200)]
Wait for the correct device after formatting

When creating a LUKS device, the object to wait on after mkfs (cleartext
device-mapper) is not the same as we originally started with (crypto_LUKS
device). Always wait on the object we called mkfs on.