Gentoo Archives: gentoo-dev

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] About udev-145: new features / extras and kernel requirements
Date: Sun, 30 Aug 2009 09:37:50
Message-Id: 8b4c83ad0908300746s345728ekdff7fd710bda566a@mail.gmail.com
In Reply to: [gentoo-dev] About udev-145: new features / extras and kernel requirements by Matthias Schwarzott
1 On Sun, Aug 30, 2009 at 7:41 PM, Matthias Schwarzott<zzam@g.o> wrote:
2 > Hi there!
3 >
4 > The new udev-145 and newer have some new kernel requirements. How should the
5 > ebuild verify they are met?
6 > Some possible ways:
7 > 1. Check config under /usr/src/linux
8 > 2. Check /proc/config.gz
9 > 3. Print message for user in pkg_postinst
10 >
11
12 ebuilds usually use linux-info.eclass for this, but that only checks
13 /usr/src/linux -- although checking /proc/config.gz *as well* would be
14 better. That change should be made in the eclass.
15
16 Personally, I would also add an ewarn into pkg_postinst to prevent
17 users from blundering into a broken system.
18
19 > Second point: udev-145 bundles a lot of new extras, but they can only be
20 > enabled/disabled all or nothing.
21 >
22
23 Eww. I suppose upstream is not open to making it a bit more granular?
24
25 > These extras are:
26 > * udev-acl: Apply consolekit permissions to devices for users (audio, video,
27 > joysticks, scanner, cameras, ...)
28
29 This looks very useful for desktop users. As long as it doesn't pull
30 in ConsoleKit itself, enabling this by default should not be a
31 problem.
32
33 > * usb-db: Provide udev-rules with device names of pci and usb devices
34
35 What are the consumers of this?
36
37 > * hid2hci: Special utility to fix resume of some hid devices
38
39 If the consumer of this is pm-suspend, pm-hibernate etc, I say enable
40 by default.
41
42 > * keymap: Auto-configure model specific keys found on many laptops
43 > ("brightness up", "next song", "www browser", or "suspend")
44
45 This should be enabled by default, especially since HAL is getting
46 deprecated, and everything using HAL for this stuff will have to turn
47 to udev (X, gnome, kde)
48
49 > * gudev: glib/gobject support for libudev
50 >
51
52 This is the interface almost everything is going to turn to with GNOME
53 2.28 (via DeviceKit-power and DeviceKit-disks in most cases). By the
54 time GNOME 2.30 and 3.0 are released, (theoretically) nothing will use
55 HAL.
56
57 I believe there are ongoing efforts to port X to use udev/gudev
58 instead of HAL, as well as KDE[1]
59
60 > This makes udev depend on these libs:
61 > libacl, libglib2, libusb, usbutils, pciutils, gperf
62 >
63 > Up to now I have just added use-flag "extras" to control these. But I suppose
64 > that udev-acl and maybe gudev is a hard requirement for newer hal or
65 > devicekit versions. And upstream thinks these should be enabled by default.
66
67 There are no "new" versions of HAL anymore (it's gone into maintenance
68 mode), but all current DeviceKit-{power,disks} versions *need* gudev.
69
70 In summation, I say hard-enable these:
71
72 acl, keymap, hid2hci
73
74 Put "gudev" under a USE-flag, enabled by +use, and put the rest under
75 "extras", not enabled by default.
76
77
78 1. http://fedoraproject.org/wiki/KDE_Programming_Wishlist
79 --
80 ~Nirbheek Chauhan
81
82 GNOME+Mozilla Team, Gentoo

Replies