Opened 15 years ago
Closed 13 years ago
#6137 closed defect (Fixed)
udevinfo has been replaced by 'udevadm info'
Reported by: | stuartm | Owned by: | beirdo |
---|---|---|---|
Priority: | minor | Milestone: | 0.25 |
Component: | MythTV - MythSystem | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
It appears that in newer versions of udev, udevinfo no longer exists breaking MediaMonitorUnix::GetDeviceFile?().
I'm told that it has been replaced by "udevadm info" but at least on Mandriva that is restricted to root.
Attachments (3)
Change History (21)
comment:1 Changed 15 years ago by
comment:3 Changed 15 years ago by
Priority: | critical → minor |
---|---|
Severity: | high → medium |
On machines that have a root-only udevadm, it isn't really possible to use that tool to check the device. On others, commands like 'udevadm info -q name -rp /block/sdb/sdb1' do the right thing, but I don't really want to try udevinfo, then udevadm, then whatever tool the next 2 versions of the hotplug tools uses?
It is probably possible to parse one of the files under /sys/block/* to get the name, but I haven't found the file/field yet.
For now I'm hoping that the current hack is good enough. That may fail for people with tricky hotplug setups, but if that happens, I can get the config and a tar of their /sys/block/* ?
comment:4 Changed 15 years ago by
Is there not a proper udev lib and api we can use instead of calling on those applications or digging around /sys? What about HAL and DBus now that QT4 has a dbus module? http://doc.trolltech.com/4.4/intro-to-dbus.html?
comment:5 Changed 15 years ago by
Milestone: | 0.22 → unknown |
---|
comment:6 Changed 15 years ago by
Component: | mythtv → MythTV - General |
---|
comment:7 Changed 14 years ago by
What config are you asking for?
I can tar up my /sys/block/*
I'm seeing the issue at http://svn.mythtv.org/trac/ticket/7135 and I've hacked it to not present these defunct processes by symlinking /sbin/udevinfo --> /sbin/udevadm - which as I understand doesn't actually allow udevadm to return the correct data, it should be a wrapper script to call 'udevadm info $1' or something like that.
I think it's interesting that the zombie pids disappear just because there's something present at udevinfo, even if it's not possibly returning the correct information when called.
I'm happy to help test / debug - let me know.
Mythbuntu 9.10
comment:8 Changed 14 years ago by
create as udevinfo, chmod it +x when done
#!/bin/bash udevadm info $1 $2 $3 $4 $5 $6 $7 $8 $9 $10
comment:9 Changed 14 years ago by
You can actually just make that udevinfo script do:
/sbin/udevadm info $@
Changed 14 years ago by
Attachment: | mythtv-libudev.patch added |
---|
Patch to use libudev instead of udevinfo
comment:10 Changed 14 years ago by
I've just attached a patch that uses libudev to get the information instead of calling udevinfo.
Changed 14 years ago by
Attachment: | mythtv-libudev-1.patch added |
---|
New patch with correct conditional in configure
Changed 14 years ago by
Attachment: | 40_libudev.patch added |
---|
comment:12 Changed 14 years ago by
Status: | new → accepted |
---|
Well, my newest installed OS still doesn't have a usable libudev:
% cat config.ep ... BEGIN /tmp/mythtv_conf.JCLnO0SL.c 1 2 #include <libudev.h> 3 int main(int argc, char **argv){ 4 return (long) udev_new; 5 } END /tmp/mythtv_conf.JCLnO0SL.c gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -f omit-frame-pointer -c -o /tmp/mythtv_conf.IrN6GgEI.o /tmp/mythtv_conf.JCLnO0SL.c In file included from /tmp/mythtv_conf.JCLnO0SL.c:2: /usr/include/libudev.h:28:2: error: #error "#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE is n eeded to use this experimental library version"
so this is still untested, but apart from the linux guard in configure that I don't think is needed, it all looks very good.
comment:13 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:14 Changed 13 years ago by
I'm still seeing msg in my output I found a reference in libmyth/mediamontior-unix.cpp
MMUnix::GetDeviceFile?(/sys/block/sr0) - udevinfo error... the program '/usr/bin/mythfrontend' called 'udevinfo', it should use 'udevadm info <options>', this will stop working in a future release
comment:15 Changed 13 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
comment:16 Changed 13 years ago by
Owner: | changed from Nigel to beirdo |
---|---|
Status: | new → assigned |
Will rework this as part of the myth_system rewrite since we are modifying that section of code anyways.
comment:17 Changed 13 years ago by
Component: | MythTV - General → MythTV - MythSystem |
---|
comment:18 Changed 13 years ago by
Milestone: | unknown → 0.25 |
---|---|
Resolution: | → Fixed |
Status: | assigned → closed |
This has been fixed by the merge of mythsystem-rewrite branch.
on openSUSE 11.1, udevadm is located in /sbin, but can be run by everyone:
hal9004:~ # dir /sbin/udev* -rwxr-xr-x 1 root root 113824 Dec 3 02:29 /sbin/udevadm -rwxr-xr-x 1 root root 101544 Dec 3 02:29 /sbin/udevd lrwxrwxrwx 1 root root 7 Jan 2 02:31 /sbin/udevsettle -> udevadm