platform/upstream/udisks2.git
11 years agoAdd publish-docs-master target
David Zeuthen [Thu, 4 Oct 2012 19:56:23 +0000 (15:56 -0400)]
Add publish-docs-master target

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate gtk-doc types file
David Zeuthen [Wed, 3 Oct 2012 15:45:07 +0000 (11:45 -0400)]
Update gtk-doc types file

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoInclude docs for MD-RAID implementation details
David Zeuthen [Wed, 3 Oct 2012 15:44:51 +0000 (11:44 -0400)]
Include docs for MD-RAID implementation details

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate gtk-doc sections
David Zeuthen [Wed, 3 Oct 2012 15:32:33 +0000 (11:32 -0400)]
Update gtk-doc sections

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd indexes of deprecated and new-in-2.1 symbols
David Zeuthen [Wed, 3 Oct 2012 14:34:10 +0000 (10:34 -0400)]
Add indexes of deprecated and new-in-2.1 symbols

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRe-include udisks_client_get_drive_info() in API docs
David Zeuthen [Wed, 3 Oct 2012 14:33:36 +0000 (10:33 -0400)]
Re-include udisks_client_get_drive_info() in API docs

Otherwise we can't tell people that it's deprecated.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse Deprecated and Since annotations to mark deprecated and new API for 2.1
David Zeuthen [Wed, 3 Oct 2012 14:32:48 +0000 (10:32 -0400)]
Use Deprecated and Since annotations to mark deprecated and new API for 2.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse @since annotations to mark new D-Bus API available 2.1
David Zeuthen [Wed, 3 Oct 2012 14:32:15 +0000 (10:32 -0400)]
Use @since annotations to mark new D-Bus API available 2.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMerge branch 'master' into wip/mdraid
David Zeuthen [Wed, 3 Oct 2012 14:12:14 +0000 (10:12 -0400)]
Merge branch 'master' into wip/mdraid

11 years agoStart writing NEWS for 2.0.90
David Zeuthen [Wed, 3 Oct 2012 14:06:13 +0000 (10:06 -0400)]
Start writing NEWS for 2.0.90

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoBump version to 2.0.90
David Zeuthen [Wed, 3 Oct 2012 14:05:59 +0000 (10:05 -0400)]
Bump version to 2.0.90

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoExplain post-release actions in HACKING
David Zeuthen [Wed, 3 Oct 2012 14:03:15 +0000 (10:03 -0400)]
Explain post-release actions in HACKING

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDocument the release process
David Zeuthen [Wed, 3 Oct 2012 13:52:30 +0000 (09:52 -0400)]
Document the release process

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate my email address
David Zeuthen [Wed, 3 Oct 2012 13:33:10 +0000 (09:33 -0400)]
Update my email address

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 2.0.1
David Zeuthen [Tue, 2 Oct 2012 19:32:54 +0000 (15:32 -0400)]
Post-release version bump to 2.0.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release
David Zeuthen [Tue, 2 Oct 2012 19:29:52 +0000 (15:29 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate translations from Transifex
David Zeuthen [Tue, 2 Oct 2012 18:03:37 +0000 (14:03 -0400)]
Update translations from Transifex

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

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRemove udisks_daemon_util_on_other_seat() from sections.txt
David Zeuthen [Tue, 2 Oct 2012 17:46:25 +0000 (13:46 -0400)]
Remove udisks_daemon_util_on_other_seat() from sections.txt

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

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

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
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 agoConsistently refer to MD-RAID as "Linux RAID" in user-visible strings
David Zeuthen [Fri, 21 Sep 2012 15:53:16 +0000 (11:53 -0400)]
Consistently refer to MD-RAID as "Linux RAID" in user-visible strings

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSet MDRaid:ChunkSize for raid0 but not for raid1
David Zeuthen [Thu, 20 Sep 2012 21:03:37 +0000 (17:03 -0400)]
Set MDRaid:ChunkSize for raid0 but not for raid1

It so happens that redundancy != striped - for example raid0 has the
former, but not the latter and raid1 is the other way around. And
raid4, raid5, raid6 and raid10 has both properties.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke debug spew
David Zeuthen [Thu, 20 Sep 2012 17:23:28 +0000 (13:23 -0400)]
Nuke debug spew

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoHandle nested arrays
David Zeuthen [Thu, 20 Sep 2012 17:13:23 +0000 (13:13 -0400)]
Handle nested arrays

We actually need mdadm(8) changes for this to work properly otherwise
the MD_* properties end up overwriting each other.

We also have to be careful since a single GUdevDevice instance can be
in two distinct UDisksLinuxMDRaidObject.

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120920-1.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention that MDRaid:SyncAction is the empty string for arrays w/o redundancy
David Zeuthen [Thu, 20 Sep 2012 17:12:43 +0000 (13:12 -0400)]
Mention that MDRaid:SyncAction is the empty string for arrays w/o redundancy

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksClient: include RAID level in description of RAID Array
David Zeuthen [Thu, 20 Sep 2012 17:11:13 +0000 (13:11 -0400)]
UDisksClient: include RAID level in description of RAID Array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSlightly rework UDisksObjectInfo docs
David Zeuthen [Thu, 20 Sep 2012 14:37:05 +0000 (10:37 -0400)]
Slightly rework UDisksObjectInfo docs

Also include the UDisksObject instance in the struct.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSkip homehost when calcuating @name member in UDisksObjectInfo for MD-RAID
David Zeuthen [Wed, 19 Sep 2012 21:46:05 +0000 (17:46 -0400)]
Skip homehost when calcuating @name member in UDisksObjectInfo for MD-RAID

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoInitialize reference count to 1
David Zeuthen [Wed, 19 Sep 2012 21:44:15 +0000 (17:44 -0400)]
Initialize reference count to 1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDeprecate udisks_client_get_drive_info() with udisks_client_get_object_info()
David Zeuthen [Wed, 19 Sep 2012 21:37:18 +0000 (17:37 -0400)]
Deprecate udisks_client_get_drive_info() with udisks_client_get_object_info()

The new function is a bit more abstract, works on more types and
returns a UDisksObjectInfo object. This allows us to add information
in the future.

Also introduce symbolic icons as requested in bug

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRevert "Simplify codepath when removing a RAID disk"
David Zeuthen [Wed, 19 Sep 2012 17:59:00 +0000 (13:59 -0400)]
Revert "Simplify codepath when removing a RAID disk"

Doesn't seem to reliably work - probably an mdadm(8) bug. Revert for
now, make a note to investigate later.

This reverts commit fb3df672113a380f2d7555bf5dcac0814b4a0c80.

11 years agoExport MDRaid:ChunkSize property
David Zeuthen [Wed, 19 Sep 2012 17:58:25 +0000 (13:58 -0400)]
Export MDRaid:ChunkSize property

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:BitmapLocation property
David Zeuthen [Wed, 19 Sep 2012 17:37:09 +0000 (13:37 -0400)]
Add MDRaid:BitmapLocation property

This is useful for the GUI to convey to the user when a bitmap is in
use.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSimplify codepath when removing a RAID disk
David Zeuthen [Wed, 19 Sep 2012 16:26:59 +0000 (12:26 -0400)]
Simplify codepath when removing a RAID disk

No need for two mdadm(8) invocations, can use --set-faulty and
--remove in the same invocation.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoExpress RAID member state as an array of strings, instead of just a string
David Zeuthen [Wed, 19 Sep 2012 16:21:55 +0000 (12:21 -0400)]
Express RAID member state as an array of strings, instead of just a string

The sysfs file /sys/block/md0/md/dev-sda/state is a comma-separated
list of states, not just one state.

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 agoAdd @start-degraded option to MDRaid.Start()
David Zeuthen [Sat, 15 Sep 2012 17:56:04 +0000 (13:56 -0400)]
Add @start-degraded option to MDRaid.Start()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid.RemoveDevice() method
David Zeuthen [Fri, 14 Sep 2012 20:40:30 +0000 (16:40 -0400)]
Add MDRaid.RemoveDevice() method

This is used in the "-" button in Disks, see

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120914-2.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoTweak MDRaid:ActiveDevices some more
David Zeuthen [Fri, 14 Sep 2012 17:04:51 +0000 (13:04 -0400)]
Tweak MDRaid:ActiveDevices some more

We need to iterate over md/dev-*, not just md/rd%d, otherwise we miss
spares and failed devices. With this change, Disks can show the user
what really is going on

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120914-1.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSlightly change how the MDRaid:ActiveDevice property works
David Zeuthen [Fri, 14 Sep 2012 15:03:19 +0000 (11:03 -0400)]
Slightly change how the MDRaid:ActiveDevice property works

It's easier to use from applications if it's an array with a fixed
size.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake Block:PreferredDevice work for partitions of RAID arrays
David Zeuthen [Thu, 13 Sep 2012 22:58:40 +0000 (18:58 -0400)]
Make Block:PreferredDevice work for partitions of RAID arrays

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksClient: ignore partitions when finding block device for RAID Array
David Zeuthen [Thu, 13 Sep 2012 22:55:42 +0000 (18:55 -0400)]
UDisksClient: ignore partitions when finding block device for RAID Array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:ActiveDevices property
David Zeuthen [Thu, 13 Sep 2012 22:00:24 +0000 (18:00 -0400)]
Add MDRaid:ActiveDevices property

This property contains a list of the active devices in the array. It
can be used to implement a dialog like the following:

 http://people.freedesktop.org/~david/palimpsest-md-raid-components-on-mp.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake udisks_daemon_util_resolve_link() work when @name contains slashes
David Zeuthen [Thu, 13 Sep 2012 21:39:55 +0000 (17:39 -0400)]
Make udisks_daemon_util_resolve_link() work when @name contains slashes

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSkip partitions of MD-RAID devices
David Zeuthen [Thu, 13 Sep 2012 19:57:52 +0000 (15:57 -0400)]
Skip partitions of MD-RAID devices

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:SyncCompleted property
David Zeuthen [Thu, 13 Sep 2012 19:26:51 +0000 (15:26 -0400)]
Add MDRaid:SyncCompleted property

We update this by polling every second (on the second) for a subset of
states that are not 'idle'.

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120913-2.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix corner-cases for detecting RAID arrays
David Zeuthen [Thu, 13 Sep 2012 18:24:11 +0000 (14:24 -0400)]
Fix corner-cases for detecting RAID arrays

If the array device was detected before any of the components we would
fail to detect the array. Fix that.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoStrip trailing white-space from md/sync_action sysfs attr
David Zeuthen [Thu, 13 Sep 2012 15:52:05 +0000 (11:52 -0400)]
Strip trailing white-space from md/sync_action sysfs attr

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAvoid leaking memory when parsing sysfs attributes with integers
David Zeuthen [Wed, 12 Sep 2012 20:42:41 +0000 (16:42 -0400)]
Avoid leaking memory when parsing sysfs attributes with integers

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoWatch for changes on the md/sync_action and md/degraded sysfs files
David Zeuthen [Wed, 12 Sep 2012 20:33:12 +0000 (16:33 -0400)]
Watch for changes on the md/sync_action and md/degraded sysfs files

The md(4) driver does not use the usual uevent 'change' mechanism for
notification - instead it excepts user-space to select(2)-ish on a fd
for the sysfs attribute. Annoying. See

 http://www.kernel.org/doc/Documentation/md.txt

for more details.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke debug spew
David Zeuthen [Wed, 12 Sep 2012 16:40:01 +0000 (12:40 -0400)]
Nuke debug spew

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSet Block:PreferredDevice to /dev/md/$MD_NAME, if available
David Zeuthen [Wed, 12 Sep 2012 16:37:23 +0000 (12:37 -0400)]
Set Block:PreferredDevice to /dev/md/$MD_NAME, if available

It's much better to present /dev/md/my-raid than /dev/md127.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't error out with "error stopping" if failing to start a RAID array
David Zeuthen [Wed, 12 Sep 2012 16:27:31 +0000 (12:27 -0400)]
Don't error out with "error stopping" if failing to start a RAID array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd Start()/Stop() methods to MDRaid D-Bus interface
David Zeuthen [Tue, 11 Sep 2012 16:56:42 +0000 (12:56 -0400)]
Add Start()/Stop() methods to MDRaid D-Bus interface

This makes it possible to start/stop RAID arrays

 http://people.freedesktop.org/~david/gnome-disks-mdraid-20120911-1.png

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 agoProperly initialize variables
David Zeuthen [Sat, 8 Sep 2012 21:01:13 +0000 (17:01 -0400)]
Properly initialize variables

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:SyncAction and MDRaid:Degraded properties
David Zeuthen [Fri, 7 Sep 2012 20:51:18 +0000 (16:51 -0400)]
Add MDRaid:SyncAction and MDRaid:Degraded properties

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:Size property and utility to get member, raid block devices
David Zeuthen [Fri, 7 Sep 2012 17:59:34 +0000 (13:59 -0400)]
Add MDRaid:Size property and utility to get member, raid block devices

Also remove the MDRaid:Runnning property as this can be inferred from
the array state property that we are going to add shortly.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
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 Block:MDRaid and Block:MDRaidMember properties pointing to MDRaid objects
David Zeuthen [Wed, 5 Sep 2012 18:51:04 +0000 (14:51 -0400)]
Add Block:MDRaid and Block:MDRaidMember properties pointing to MDRaid objects

This allows the UI to easily associate block devices with raid
objects. Convenience API on UDisksClient to follow shortly.

Also fix up some of the documentation.

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 agoInitial MD-RAID support
David Zeuthen [Wed, 29 Aug 2012 18:50:06 +0000 (14:50 -0400)]
Initial MD-RAID support

Signed-off-by: David Zeuthen <zeuthen@gmail.com>