Bug 235129

Summary: gparted needs to use new hal-lock(1) tool
Product: [Fedora] Fedora Reporter: David Zeuthen <davidz>
Component: gpartedAssignee: Deji Akingunola <dakingun>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mclasen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gparted-0.3.3-10.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-19 18:06:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150226, 234082, 236601    

Description David Zeuthen 2007-04-03 20:59:09 UTC
GParted currently uses an inappropriate way of locking out automounters by
leaving a HAL fdi file telling HAL to ignore all volumes resulting in all Mount
actions being denied. This is bad because the file sometimes is not deleted. 

There's new API/tools in HAL 0.5.9 specifically written with gparted and
anaconda in mind. Just use a wrapper that does

  hal-lock  --interface  org.freedesktop.Hal.Device.Storage --exclusive --run
/path/to/real-gparted-program

Make sure you run this as root; e.g. after consolehelper bits. Please fix this
for Fedora 7; one of my coworkers just ran into this issue... Thanks!

Comment 1 Deji Akingunola 2007-04-03 21:13:48 UTC
Hi David,

You're so reading my mind, I just did this last night (see the commit mail @
https://www.redhat.com/archives/fedora-extras-commits/2007-April/msg00297.html,
and a follow up
https://www.redhat.com/archives/fedora-extras-commits/2007-April/msg00303.html).
I was waiting for the build to be pushed out before commenting on it on the
FC6's USB-mount bug. Thanks for the new tool, it works like a charm.

Comment 2 David Zeuthen 2007-04-03 21:29:35 UTC
Awesome, thank you so much for fixing this!

Comment 3 David Zeuthen 2007-04-16 18:37:10 UTC
Seems like this doesn't work:

[davidz@zelda ~]$ cat /etc/security/console.apps/gparted
USER=root
PROGRAM=%{_bindir}/run_gparted
SESSION=true

[davidz@zelda ~]$ cat /usr/bin/run-gparted 
#!/bin/bash
%{_bindir}/hal-lock --interface org.freedesktop.Hal.Device.Storage  --exclusive
--run %{_sbindir}/gparted

[davidz@zelda ~]$ cat /usr/share/applications/fedora-gparted.desktop  |grep Exec
Exec=gparted

[davidz@zelda ~]$ rpm -q gparted
gparted-0.3.3-8.fc7


Comment 4 Deji Akingunola 2007-04-16 18:57:15 UTC
(In reply to comment #3)
> Seems like this doesn't work:

I don't understand, how do you mean doesn't work? /usr/bin/gparted is a link to
consolehelpher, which runs %{_bindir}/run_gparted when its called. It sure does
WORKSFORME ;), unless I'm missing something simply obvious. 

Comment 5 David Zeuthen 2007-04-16 19:14:09 UTC
What I pasted in comment 3 was the content of the _files_ shipped in the RPM's.

1. You can't use ${_bindir}; it needs to be expanded in the final files. 

2. The console helper file says run_gparted while the binary is actually called
run-gparted...

3. Also, g-v-m happily automounts when launching gparted.



Comment 6 Deji Akingunola 2007-04-16 19:27:36 UTC
Wow thanks, its so stupid of e to make all those mistakes and typos. I have
fixed them in cvs.

Comment 7 David Zeuthen 2007-04-18 20:02:53 UTC
still happening with gparted-0.3.3-9.fc7

cat/usr/bin/run-gparted
#!/bin/bash
%{_bindir}/hal-lock --interface org.freedesktop.Hal.Device.Storage  --exclusive 
--run /usr/sbin/gparted



Comment 8 Deji Akingunola 2007-04-18 20:06:15 UTC
Yeah, sorry about that, have already fixed it in gparted-0.3.3-10.fc7

Comment 9 Deji Akingunola 2007-04-19 18:06:35 UTC
This is now finally fixed with gparted-0.3.3-10.fc7. i get a pop-up which says
the enlcosed interface is locked if I connect an external drive while gparted is
running

Comment 10 David Zeuthen 2007-04-19 18:17:02 UTC
Thanks for doing this - I just confirmed that it's working.

I've filed bug 237152 against gnome-mount for the issue mention in comment 9.
Will work on a fix for Fedora 7.