After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745349 - gparted wrapper script needs updated for udisks2
gparted wrapper script needs updated for udisks2
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2015-03-01 02:49 UTC by Phillip Susi
Modified: 2015-04-02 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
udisks2-inhibit automount patch v1 (2.89 KB, patch)
2015-03-10 19:22 UTC, Curtis Gedak
none Details | Review

Description Phillip Susi 2015-03-01 02:49:37 UTC
The gparted wrapper script needs updated to work with udisks2: the command that needs to be run is now udisks2-inhibit.

Forwarded from https://launchpad.net/bugs/1078445.
Comment 1 Curtis Gedak 2015-03-01 15:13:15 UTC
Thanks Phillip for creating this upstream report.

I plan to look into this issue soon.

Curtis
Comment 2 Curtis Gedak 2015-03-10 19:22:17 UTC
Created attachment 299047 [details] [review]
udisks2-inhibit automount patch v1

Hi Mike and Phillip,

Attached is patch v1 to prevent automounting of newly created file
systems on distributions that use the udisks2 "udisksd" daemon and
have /usr/lib/udisks2/udisks2-inhibit.

The steps to test are:

  sudo gparted    # Not "sudo gpartedbin" - we need to invoke wrapper
  Device --> Create Partition Table
  Partition --> New, create 20MB ext4
  Apply

Without this patch set, on Xubuntu 14.04 the XFCE file manager
(Thunar) mounts the newly created partition, even though gparted is
running.

With this patch set, the newly created partition is not mounted.

I tested this patch on the several distributions.  Success in this
test means that the newly created file system is not automounted.

To test for daemon I used "ps -ef | grep udisksd"
To test for file I used "ls /usr/lib/udisks2/udisks2-inhibit"

                  Daemon?   File?              Test
Distro            udisksd   udisks2-inihibit   Result
---------------   -------   ----------------   -----------------
Fedora   21       Yes       No                 Success
Debian    7       No        No                 Success
Debian    8*      No        No                 Success
openSUSE 13.2     Yes       No                 Success
Kubuntu  14.04    Yes       Yes                Success
Ubuntu   14.04    Yes       Yes                Success
Xubuntu  14.04    Yes       Yes                Success
Ubuntu   14.10    Yes       Yes                Success [1]

* Not yet officially released

[1] Error messages shown on command line:

      Failed to get D-Bus connection: No connection to service manager.
      Too few arguments.

    These error message did not impact gparted execution, and did not
    affect gparted operations.

    The closest report of the error messages I could find indicated a
    problem with systemd on Ubuntu 14.10.

    https://github.com/ansible/ansible-modules-core/issues/161

    Reading this report lead me to another report.

    https://wiki.ubuntu.com/systemd#Warning.21_Experimental_code

    It would seem that systemd is experimental on Ubuntu 14.10 and
    does not play well with Ubuntu's upstart.

    A quick search of my Ubuntu 14.10 VM does indeed show evidence of
    systemd.  I do not recall installing systemd on this VM.

    To test this does-not-play-well theory I removed systemd from
    Ubuntu 14.10 with the following command:

    sudo apt-get remove systemd systemd-shim

    After rebooting, all my testing went well and no error messages
    were displayed.

    Because Ubuntu's plan is to switch fully to systemd for 15.04, and
    since support for 14.10 is expiring on 2015-07, I am not overly
    concerned about these error messages on 14.10 with experimental
    systemd.

In conclusion I believe patch v1 addresses the automount problem on Xubuntu 14.04 and is ready for review.

Curtis
Comment 3 Mike Fleetwood 2015-03-11 20:31:20 UTC
Hi Curtis,

Just to let you know that I am working on reviewing and testing this.
Setting up a couple of extra VMs so that I can test properly.

Mike
Comment 4 Mike Fleetwood 2015-03-12 11:51:48 UTC
Hi Curtis,

I've tested this by running sh -x gparted script wrapper and creating
a partition.  Test is that the newly created file system isn't
automounted.

Passed on these distro:
CentOS 5, 6, 7
Fedora 21
Kubuntu 14.04 LTS
Ubuntu 14.10

I've pushed the patch from comment #2 above to the GParted GIT repo.

If available use udisks2-inhibit to prevent automounting (#745349)
https://git.gnome.org/browse/gparted/commit/?id=4acb8e4fbb9e01d33cc1e9fd89686a3818050690

Thanks,
Mike
Comment 5 Curtis Gedak 2015-03-23 17:49:04 UTC
This enhancement was included in the GParted 0.22.0 release on March 23, 2015.
Comment 6 Chris Bainbridge 2015-04-02 00:43:33 UTC
>                   Daemon?   File?              Test
> Distro            udisksd   udisks2-inihibit   Result
> ---------------   -------   ----------------   -----------------
> Debian    8*      No        No

Not sure why this is listed as "No"? Debian 8 here has both:

$ ps -ef | grep udisksd
root      1839     1  0 Mar31 ?        00:00:07 /usr/lib/udisks2/udisksd --no-debug
$ ls /usr/lib/udisks2/udisks2-inhibit
/usr/lib/udisks2/udisks2-inhibit*

udisks2 is a dependency of gvfs, which a lot of packages depend on, so it will be present on many desktop systems.
Comment 7 Curtis Gedak 2015-04-02 15:27:51 UTC
(In reply to Chris Bainbridge from comment #6)
> 
> Not sure why this is listed as "No"? Debian 8 here has both:

Hi Chris,

With Debian 8 not yet officially being released, the difference is likely due to  how and when it was created.  Mine is an older copy that has been upgraded.  Either way it is not relevant as the testing covered both with and without udisksd.

Curtis