tvheadend: add dependency on udev
PATCH v2 1/1 tvheadend: add dependency on udev
udev is needed in order to detect usb based DVB cards.
reference for none SystemD systems can be found at https://github.com/tvheadend/tvheadend/blob/master/debian/tvheadend.init
---
v1 -> v2:
- use BR2_PACKAGE_HAS_UDEV instead of ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV (Thomas)
- add BR2_PACKAGE_HAS_UDEV dependecy to comment
package/tvheadend/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
package/tvheadend/Config.in +4 -2
@@ -1,6 +1,7 @@ -comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library" +comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library, udev /dev management" depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ - !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS || \ + !BR2_PACKAGE_HAS_UDEV depends on BR2_TOOLCHAIN_HAS_SYNC_4 config BR2_PACKAGE_TVHEADEND
@@ -9,6 +10,7 @@ config BR2_PACKAGE_TVHEADEND depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DTV_SCAN_TABLES select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_OPENSSL
Signature · 1 line
2.15.1
PATCH v2 1/1 tvheadend: add dependency on udev
Dagg, All,
On 2018-01-05 11:35 +0200, Dagg Stompler spake thusly:
Quoted 2 lines
udev is needed in order to detect usb based DVB cards.
reference for none SystemD systems can be found at https://github.com/tvheadend/tvheadend/blob/master/debian/tvheadend.init
We do not use this startup script in Buildroot, since we have our own:
https://git.buildroot.org/buildroot/tree/package/tvheadend/S99tvheadend
So I fail to see why their init script calling udevadm is a reason to force a dependency on udev.
Besides, our own udev startup does an udevadm settle, and it is called before the tvheadend startup script (S10 vs. S99):
https://git.buildroot.org/buildroot/tree/package/eudev/S10udev
Furthermore, last time udev was mentioned in the tvheadend repository was in 2014, commit 517af478ab20, where Adam said:
"... I've given up on using udev (for various reasons)."
The previous mention of udev was the commit that added the call to udevadm in 2010, commit 5e20573581f0.
And personal experience has shown that my setup was working OK without udev as well, at a time _after_ those two commits.
So I still believe we should not add a dependency on udev at all, because as far as I understand, you claim it is only needed for USB devices. Other devices seem to be working fine without udev, and it is perfectly valid to have a setup with a non-USB device and no udev.
So, still no from me...
We may however add a blurb in the help text that states that using certain devices may require use of udev or another manager of /dev.
Regards,
Yann E. MORIN.
Quoted 38 lines
Signed-off-by Dagg Stompler <[email protected]>---
v1 -> v2:
- useBR2_PACKAGE_HAS_UDEVinstead ofROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV(Thomas)
- addBR2_PACKAGE_HAS_UDEVdependecy to commentpackage/tvheadend/Config.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)package/tvheadend/Config.in +4
-2@@ -1,6 +1,7 @@ -comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library" +comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library, udev /dev management" depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ - !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS || \ + !BR2_PACKAGE_HAS_UDEV depends on BR2_TOOLCHAIN_HAS_SYNC_4 config BR2_PACKAGE_TVHEADEND@@ -9,6 +10,7 @@ config BR2_PACKAGE_TVHEADEND depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_HAS_UDEV select BR2_PACKAGE_DTV_SCAN_TABLES select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE select BR2_PACKAGE_OPENSSLSignature · 6 lines
2.15.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 tvheadend: add dependency on udev
Greetings Yan,
Quoted 9 lines
Dagg, All,
On 2018-01-05 11:35 +0200, Dagg Stompler spake thusly:
Quoted 2 lines
udev is needed in order to detect usb based DVB cards.
reference for none SystemD systems can be found at https://github.com/tvheadend/tvheadend/blob/master/debian/tvheadend.initWe do not use this startup script in Buildroot, since we have our own:
https://git.buildroot.org/buildroot/tree/package/tvheadend/S99tvheadend
Quoted 6 lines
So I fail to see why their init script calling udevadm is a reason to force a dependency on udev.
Besides, our own udev startup does an udevadm settle, and it is called before the tvheadend startup script (S10 vs. S99):
https://git.buildroot.org/buildroot/tree/package/eudev/S10udev
I know buildroot has its own init script implementation, I just added it as reference to why I think it is needed.
Quoted 7 lines
Furthermore, last time udev was mentioned in the tvheadend repository was in 2014, commit
517af478ab20, where Adam said:
"... I've given up on using udev (for various reasons)."The previous mention of udev was the commit that added the call to udevadm in 2010, commit
5e20573581f0.
the repo still has it in it, if it isn't needed, it should be removed but it isn't my job as I'm not part of the tvheadend dev team. more over, after my experience, is indeed there is no need for udev, tvheadend has a bug.
Quoted 8 lines
And personal experience has shown that my setup was working OK without udev as well, at a time _after_ those two commits.
So I still believe we should not add a dependency on udev at all, because as far as I understand, you claim it is only needed for USB devices. Other devices seem to be working fine without udev, and it is perfectly valid to have a setup with a non-USB device and no udev.
I'm happy that it worked out of the box for you but fact to the matter, it didn't for me.
it took me three weekends to figure it out. imho, the fact that it works on one scenario doesn't means there isn't a bug.
Quoted 5 lines
So, still no from me...
We may however add a blurb in the help text that states that using certain devices may require use of udev or another manager of /dev.
as said, imho there is still a bug here but this suggestion might be good enough for a possible commit, I didn't liked that I've wasted a lot of my spare time on this, I'm sure that anyone else that will encounter it won't want to waste his time.
Thanks,
Dagg.
PATCH v2 1/1 tvheadend: add dependency on udev
Hello,
Quoted 10 lines · daggs
Quoted 7 lines
And personal experience has shown that my setup was working OK without udev as well, at a time _after_ those two commits.
So I still believe we should not add a dependency on udev at all, because as far as I understand, you claim it is only needed for USB devices. Other devices seem to be working fine without udev, and it is perfectly valid to have a setup with a non-USB device and no udev.
I'm happy that it worked out of the box for you but fact to the matter, it didn't for me.
it took me three weekends to figure it out. imho, the fact that it works on one scenario doesn't means there isn't a bug.
Yes, but we can't force a dependency on all users without understanding if this dependency is really needed.
Could you try to understand *why* udev makes it work for you?
One guess is that udev has some rules that makes your USB capture device accessible to non-root users. And since tvheadend runs as its own user, this might explain it.
Could you have a look into this ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v2 1/1 tvheadend: add dependency on udev
In reply to Yann E. MORINHi Yann, hi Dagg,
Am Fri, 05 Jan 2018 23:54:59 +0100 schrieb Yann E. MORIN:
Quoted 6 lines
So I still believe we should not add a dependency on udev at all, because as far as I understand, you claim it is only needed for USB devices. Other devices seem to be working fine without udev, and it is perfectly valid to have a setup with a non-USB device and no udev.
So, still no from me...
my tvheadend server also works fine without udev, so NACK from me as well.
Regards, Bernd
PATCH v2 1/1 tvheadend: add dependency on udev
Greetings Bernd,
Quoted 14 lines
Sent: Thursday, January 11, 2018 at 9:14 AM
From: "Bernd Kuhls" <[email protected]>
To: buildroot at uclibc.org
Subject: Re: [Buildroot] [PATCH v2] tvheadend: add dependency on udevHi Yann, hi Dagg,
Am Fri, 05 Jan 2018 23:54:59 +0100 schrieb Yann E. MORIN:
Quoted 5 lines
So I still believe we should not add a dependency on udev at all, because as far as I understand, you claim it is only needed for USB devices. Other devices seem to be working fine without udev, and it is perfectly valid to have a setup with a non-USB device and no udev.
Quoted 6 lines
Quoted 1 line
So, still no from me...
my tvheadend server also works fine without udev, so NACK from me as well.
Regards, Bernd
I've posted a question in the tvheadend forums, lets see what they have to say. btw, just want to know, do you use a usb adapter?
Thanks,
Dagg.
PATCH v2 1/1 tvheadend: add dependency on udev
Am Sat, 13 Jan 2018 17:02:58 +0100 schrieb daggs:
Quoted 1 line
btw, just want to know, do you use a usb adapter?
Hi daggs,
yes, here are some snippets from lsusb -vv:
Bus 001 Device 006: ID 0b48:3017 TechnoTrend AG
iManufacturer 1 CityCom GmbH
iProduct 2 TechnoTrend USB2.0
https://cateee.net/lkddb/web-lkddb/DVB_USB_DVBSKY.html
I am using tvheadend on a buildroot-built linux distro (fli4l) which does not contain udev but uses BR2_ROOTFS_DEVICE_CREATION_STATIC=y, for this distro I created personal packages adding the function I need. Therefore I do not use buildroot-provided init scripts but instead coded my own init script for tvheadend which suits my needs and works fine without an udev daemon. For Kodi I need libudev[1] support for detecting my CEC-USB adapter but again, no udev daemon needed.
My init scripts only contain one hardware-specific command relating to tvheadend:
modprobe dvb_usb_dvbsky
Everything else worked out-of-the box after configuring all the kernel modules needed for my USB device.
Regards, Bernd
PATCH v2 1/1 tvheadend: add dependency on udev
Greetings Bernd,
Quoted 11 lines
Sent: Sunday, January 14, 2018 at 12:22 AM
From: "Bernd Kuhls" <[email protected]>
To: buildroot at uclibc.org
Subject: Re: [Buildroot] [PATCH v2] tvheadend: add dependency on udevAm Sat, 13 Jan 2018 17:02:58 +0100 schrieb daggs:
Quoted 1 line
btw, just want to know, do you use a usb adapter?
Hi daggs,
Quoted 7 lines
yes, here are some snippets from lsusb -vv:
Bus 001 Device 006: ID 0b48:3017 TechnoTrend AG
iManufacturer 1 CityCom GmbH
iProduct 2 TechnoTrend USB2.0
this device is similar to what I have.
Quoted 12 lines
I am using tvheadend on a buildroot-built linux distro (fli4l) which does not contain udev but uses BR2_ROOTFS_DEVICE_CREATION_STATIC=y, for this distro I created personal packages adding the function I need. Therefore I do not use buildroot-provided init scripts but instead coded my own init script for tvheadend which suits my needs and works fine without an udev daemon. For Kodi I need libudev[1] support for detecting my CEC-USB adapter but again, no udev daemon needed.
My init scripts only contain one hardware-specific command relating to tvheadend:
Quoted 8 lines
modprobe
dvb_usb_dvbskyEverything else worked out-of-the box after configuring all the kernel modules needed for my USB device.
Regards, Bernd
maybe this is what I need too. BR2_ROOTFS_DEVICE_CREATION_STATIC=y and modprobe the modules right before tvheadend boots.
I'll look into it.
Dagg.