Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 257933

Summary: new ebuilds for halevt and boolstuff -> supersedes ivman
Product: Gentoo Linux Reporter: Mike Gualtieri <mike.gualtieri>
Component: New packagesAssignee: Markos Chandras (RETIRED) <hwoarang>
Status: RESOLVED FIXED    
Severity: enhancement CC: alexey.kv, filipe, genstef, gentoo, konstantin.sobolev, Lyall, mg, mmw, openhs, rebarned
Priority: High Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://forums.gentoo.org/viewtopic-t-731555-highlight-.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: new ebuild for dev-libs/boolstuff
new ebuild for sys-apps/halevt
init script for halevt
New ebuild for boolstuff

Description Mike Gualtieri 2009-02-06 19:49:00 UTC
With the latest hal and dbus ivman apparently no longer is working properly.  It also seems according to the ivman website that the software is no longer maintained.

There is a replacement based on ivman called halevt, that is actively being developed.  So far in my early tests it seems to work great, autoplugging my devices without any configuration modifications.

Boolstuff is a library that halevt depends on.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-libs/boolstuff
2. emerge sys-apps/halevt
3.
Comment 1 Mike Gualtieri 2009-02-06 19:50:09 UTC
Created attachment 181190 [details]
new ebuild for dev-libs/boolstuff

depandancy for halevt
Comment 2 Mike Gualtieri 2009-02-06 19:50:58 UTC
Created attachment 181192 [details]
new ebuild for sys-apps/halevt

halevt is a newer replacement for ivman
Comment 3 Mike Gualtieri 2009-02-07 17:08:32 UTC
~amd64 can be added to the keywords...
Comment 4 Marcin Gryszkalis 2009-02-15 14:19:22 UTC
Works great for me, replaced pretty advanced ivman/pmount config
Comment 5 Jan Seeger 2009-03-24 21:11:28 UTC
Great! I was thinking that ivman neared the end of it's shelf life, even though it worked pretty decently.

Aaanyway: Works great on amd64, should be keyworded. Needs an initscript, attached one. Either create the halevt user and groups or use halevt user and plugdev group (probably better). I run it as root user and plugdev group, so I don't need to use sudo everywhere.
Comment 6 Jan Seeger 2009-03-24 21:12:00 UTC
Created attachment 186147 [details]
init script for halevt
Comment 7 Lyall Pearce 2009-04-14 00:31:50 UTC
Doesn't work for me, I think, because my fstab uses usbdev devices, rather than /dev/sdfx devices.

/dev/disk/by-id/usb-USB_Flash_Disk_90740C0025A6-0:0-part1		     /mnt/usb/LyallsKey		vfat		defaults,noauto,user,gid=usbd,umask=0,umask=007,quiet		0 0

As such, whilst it successfully executes  

halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_6E48_CF86 -o sync -m 002

The result is nothing, for me.
However, if I use

mount /mnt/usb/LyallsKey

things work fine.

Suggestions?
Comment 8 Lyall Pearce 2009-04-15 14:42:20 UTC
Ok, I have had a closer look.

I am trying to use halevt 0.1.4 on my Gentoo x86 system with udev installed

I am having difficulty configuring auto mounting.

I do not use /dev/sdxx identifiers in my /etc/fstab, for example.

Code:
/dev/sdc1         /mnt/win_os     ntfs-3g         defaults,gid=ntfs,umask=0,umask=007,nls=utf8,silent             0 0

This is painful, particularly if you have USB disks, which are assigned different letters, depending upon when they are plugged in/powered up or if I change the order of disks in my BIOS.

I have tried using disk ids, which has worked for quite a while, for me

Code:
/dev/disk/by-id/ata-WDC_WD10EAVS-00D7B1_WD-WCAU48133357-part1          /mnt/win_os     ntfs-3g         defaults,gid=ntfs,umask=0,umask=007,nls=utf8,silent             0 0

But, disk-id's don't work with halevt (at least not that I can fathom) as HAL has no attribute which matches this.

So, since HAL has UUID available as a property, I figured I would simply setup my /etc/fstab as follows

Code:
/dev/disk/by-uuid/4C489837489821AE                                        /mnt/win_os     ntfs-3g         defaults,gid=ntfs,umask=0,umask=007,nls=utf8,silent             0 0

where I obtain the UUID of each partition using the 'vol_id' command.

Then, make my /etc/halevt/haletv.xml as follows...

Code:
...
   <halevt:OnInit exec="halevt-mount -u $hal.udi$ -d /dev/disk/by-uuid/$hal.volume.uuid$"/>
...
   <halevt:Insertion exec="halevt-mount -u $hal.udi$ -d /dev/disk/by-uuid/$hal.volume.uuid$ -m 002"/>
...
   <halevt:Removal exec="halevt-umount -u $hal.udi$ -d /dev/disk/by-uuid/$hal.volume.uuid$; halevt-umount -s"/>


The Problem.

After brief inspection of the source code, I don't think this is working with halevt-mount, as it seems to search and match the device against the device listed in HAL, which will be /dev/sdc1. What I think we should do is take the supplied device and dereference it, if it is a symbolic link, until we end up at a real device file, then we do our search through HAL.

I am investigating whether this is actually the case and whether the author of halevt accepts patches or has some form of source code repository.
Comment 9 samLT 2009-05-28 15:08:11 UTC
(In reply to comment #6)
> Created an attachment (id=186147) [edit]
> init script for halevt
> 

We probably don't need to specify a configuration file with -c, since *.xml files in /etc/halevt would be used anyway?

Comment 10 Markos Chandras (RETIRED) gentoo-dev 2009-05-28 16:45:44 UTC
I will add this package on sunrise overlay at first and later on portage tree

Thank you
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2009-05-28 17:12:30 UTC
Forget about sunrise, I will add this directly to portage when I am done testing it :)
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2009-05-28 17:14:59 UTC
Created attachment 192729 [details]
New ebuild for boolstuff

Improved ebuild :)
Comment 13 Markos Chandras (RETIRED) gentoo-dev 2009-05-30 18:23:56 UTC
+*boolstuff-0.1.12 (30 May 2009)
+
+  30 May 2009; Markos Chandras <hwoarang@gentoo.org>
+  +boolstuff-0.1.12.ebuild, +metadata.xml:
+  Initial commit of boolstuff library. Partially fixes bug 257933. Thanks to
+  Mike Gualtieri <mike.gualtieri@gmail.com> for the initial ebuild. Giorgos
+  Kargiotakis <kargig@void.gr> will be proxy maintainer.
+


+
+*halevt-0.1.4 (30 May 2009)
+
+  30 May 2009; Markos Chandras <hwoarang@gentoo.org> +halevt-0.1.4.ebuild,
+  +files/halevt, +metadata.xml:
+  Initial commit of halevt application. Fixes bug 257933. Thanks to
+  Mike Gualtieri <mike.gualtieri@gmail.com> for the initial ebuild. Giorgos
+  Kargiotakis <kargig@void.gr> will be proxy maintainer.
+


On tree now. Thank you all for your contribution :)
Comment 14 DMoL 2009-05-31 21:22:04 UTC
I had some trouble with mounting my devices (usb flash - vfat - and usb hdd - ntfs) with utf8-support. So, I rewrited halevt configs with pmount.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE halevt:Configuration [
	<!ENTITY MOUNTABLE ... >
	<!ENTITY MOUNT_COMMAND "pmount -t $hal.volume.fstype$ $hal.block.device$ '$hal.info.product$'">
]>
<halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">

<halevt:Device match="&MOUNTABLE;">
   <halevt:Insertion exec="&MOUNT_COMMAND;"/>
</halevt:Device>

...
<halevt:Device match="&MOUNTABLE;">
   <halevt:OnInit exec="&MOUNT_COMMAND;"/>
</halevt:Device>