chiark / gitweb /
check for ignore_device in loop looks redundant
[elogind.git] / RELEASE-NOTES
1 udev 082
2 ========
3 The udev man page has moced to udev(7) as it doesnot describe a command
4 anymore. The programs udev, udevstart and udevsend are no longer installed
5 by default and must be copied manually, if they should be installed or
6 included in a package.
7
8 Fix a bug where "ignore_device" could run earlier collected RUN keys before
9 the ignore rule was applied.
10
11 More preparation for future sysfs changes. usb_id and scsi_id no longer
12 depend on a magic order of devices in the /devices chain. Specific devices
13 should be requested by their subsytem.
14
15 This will always find the scsi parent device without depending on a specific
16 path position:
17   dev = sysfs_device_get(devpath);
18   dev_usb = sysfs_device_get_parent_with_subsystem(dev, "scsi");
19
20 The "device" link in the current sysfs layout will be automatically
21 _resolved_ as a parent and in the new sysfs layout it will just _be_ the
22 parent in the devpath. If a device is requested by it's symlink, like all
23 class devices in the new sysfs layout will look like, it gets automatically
24 resolved and substituted with the real devpath and not the symlink path.
25
26 Note:
27 A similar logic must be applied to _all_ sysfs users, including
28 scripts, that search along parent devices in sysfs. The explicit use of
29 the "device" link must be avoided. With the future sysfs layout all
30 DEVPATH's will start with /devices/ and have a "subsystem" symlink poiting
31 back to the "class" or the "bus". The layout of the parent devices in
32 /devices is not necessarily expected to be stable across kernel releases and
33 searching for parents by their subsystem should make sysfs users tolerant
34 for changed parent chains.
35
36 udev 081
37 ========
38 Prepare udev to work with the experimental kernel patch, that moves
39 /sys/class devices to /sys/devices and /sys/block to /sys/class/block.
40
41 Clarify BUS, ID, $id usage and fix $id behavior. This prepares for
42 moving the class devices to /sys/devices.
43
44 Thanks again to Marco for help finding a hopefully nice compromise
45 to make %b simpler and working again.
46
47 udev 080
48 ========
49 Complete removal of libsysfs, replaced by simple helper functions
50 which are much simpler and a bit faster. The udev daemon operatesentirely
51 on event parameters and does not use sysfs for simple rules anymore.
52 Please report any new bugs/problems, that may be caused by this big
53 change. They will be fixed immediately.
54
55 The enumeration format character '%e' is deprecated and will be
56 removed sometimes from a future udev version. It never worked correctly
57 outside of udevstart, so we can't use it with the new parallel
58 coldplug. A simple enumeration is as useless as the devfs naming
59 scheme, just get rid of both if you still use it.
60
61 MODALIAS and $modalias is not needed and will be removed from one of
62 the next udev versions, replace it in all rules with ENV{MODALIAS} or
63 the sysfs "modalias" value.
64
65 Thanks a lot to Marco for all his help on finding and fixing bugs.
66
67 udev 079
68 ========
69 Let scsi_id request libata drive serial numbers from page 0x80.
70
71 Renamed etc/udev/persistent.rules to persistent-disk.rules and
72 added /dev/disk/by-name/* for device mapper device names.
73
74 Removed %e from the man page. It never worked reliably outside
75 of udevstart and udevstart is no longer recommended to use.
76
77 udev 078
78 ========
79 Symlinks are now exported to the event environment. Hopefully it's no
80 longer needed to run udevinfo from an event process, like it was
81 mentioned on the hotplug list:
82   UDEV  [1134776873.702967] add@/block/sdb
83   ...
84   DEVNAME=/dev/sdb
85   DEVLINKS=/dev/disk/by-id/usb-IBM_Memory_Key_0218B301030027E8 /dev/disk/by-path/usb-0218B301030027E8:0:0:0
86
87 udev 077
88 ========
89 Fix a problem if udevsend is used as the hotplug handler and tries to use
90 syslog, which causes a "vc" event loop. 2.6.15 will make udevsend obsolete
91 and this kind of problems will hopefully go away soon.
92
93 udev 076
94 ========
95 All built-in logic to work around bad sysfs timing is removed with this
96 version. The need to wait for sysfs files is almost fixed with a kernel
97 version that doesn't work with this udev version anyway. Until we fix
98 the timing of the "bus" link creation, the former integrated logic should
99 be emulated by a rule placed before all other rules:
100   ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
101
102 The option "udev_db" does no longer exist. All udev state will be in
103 /$udev_root/.udev/ now, there is no longer an option to set this
104 to anything else.
105 If the init script or something else used this value, just depend on
106 this hardcoded path. But remember _all_content_ of this directory is
107 still private to udev and can change at any time.
108
109 Default location for rule sripts and helper programs is now: /lib/udev/.
110 Everything that is not useful on the commandline should go into this
111 directory. Some of the helpers in the extras folder are installed there
112 now. The rules need to be changed, to find the helpers there.
113
114 Also /lib/udev/devices is recommended as a directory where packages or
115 the user can place real device nodes, which get copied over to /dev at
116 every boot. This should replace the various solutions with custom config
117 files.
118
119 Udevsend does no longer start the udev daemon. This must be done with
120 the init script that prepares /dev on tmpfs and creates the initial nodes,
121 before starting the daemon.
122
123 udev 075
124 ========
125 Silent a too verbose error logging for the old hotplug.d/ dev.d/
126 emulation.
127
128 The copy of klibc is removed. A systemwide installed version of klibc
129 should be used to build a klibc udev now.
130
131 udev 074
132 ========
133 NAME="" will not create any nodes, but execute RUN keys. To completely
134 ignore an event the OPTION "ignore_device" should be used.
135
136 After removal of the reorder queue, events with a TIMEOUT can be executed
137 without any queuing now.
138
139 udev 073
140 ========
141 Fixed bug in udevd, if inotify is not available. We depend on netlink
142 uevents now, kernels without that event source will not work with that
143 version of udev anymore.
144
145 udev 072
146 ========
147 The rule parsing happens now in the daemon once at startup, all udev
148 event processes inherit the already parsed rules from the daemon.
149 It is shipped with SUSE10.0 and reduces heavily the system load at
150 startup. The option to save precompiled rules and let the udev process
151 pick the them up is removed, as it's no longer needed.
152
153 Kernel 2.6.15 will have symlinks at /class/input pointing to the real
154 device. Libsysfs is changed to "translate" the requested link into the
155 real device path, as it would happen with the hotplug event. Otherwise
156 device removal and the udev database will not work.
157
158 Using 'make STRIPCMD=' will leave the binaries unstripped for debugging
159 and packaging.
160
161 A few improvements for vol_id, the filesytem probing code.
162
163 udev 071
164 ========
165 Fix a stupid typo in extras/run_directory for "make install".
166
167 scsi_id creates the temporary devnode now in /dev for usage with a
168 non-writable /tmp directory.
169
170 The uevent kernel socket buffer can carry app. 50.000 events now,
171 let's see who can break this again. :)
172
173 The upcoming kernel will have a new input driver core integration.
174 Some class devices are now symlinks to the real device. libsysfs
175 needs a fix for this to work correctly. Udevstart of older udev
176 versions will _not_ create these devices!
177
178 udev 070
179 ========
180 Fix a 'install' target in the Makefile, that prevents EXTRAS from
181 beeing installed.
182
183 udev 069
184 ========
185 A bunch of mostly trivial bugfixes. From now on no node name or
186 symlink name can contain any character than plain whitelisted ascii
187 characters or validated utf8 byte-streams. This is needed for the
188 /dev/disk/by-label/* links, cause we import untrusted data and
189 export it to the filesystem.
190
191 udev 068
192 ========
193 More bugfixes. If udevd was started from the kernel, we don't
194 have stdin/stdout/stderr, which broke the forked tools in some
195 situations.
196
197 udev 067
198 ========
199 Bugfix. udevstart event ordering was broken for a long time.
200 The new run_program() uncovered it, cause /dev/null was not
201 available while we try to run external programs.
202 Now udevstart should create it before we run anything.
203
204 udev 066
205 ========
206 Minor bugfixes and some distro rules updates. If you don't have the
207 persistent disk rules in /dev/disk/by-*/* on your distro, just
208 grab it from here. :)
209
210 udev 065
211 ========
212 We can use socket communication now to pass events from udev to
213 other programs:
214   RUN+="socket:/org/freedesktop/hal/udev_event"
215 will pass the whole udev event to the HAL daemon without the need
216 for a forked helper. (See ChangeLog for udevmonitor, as an example)
217
218 udev 064
219 ========
220 Mostly bugfixes and see ChangeLog.
221
222 The test for the existence of an environment value should be
223 switched from:
224   ENV{KEY}=="*" to ENV{KEY}=="?*"
225 cause "*" will not fail anymore, if the key does not exist or
226 is empty.
227
228 udev 063
229 ========
230 Bugfixes and a few tweaks described in the ChangeLog.
231
232 udev 062
233 ========
234 Mostly a Bugfix release.
235
236 Added WAIT_FOR_SYSFS="<attribute>" to be able to fight against the sysfs
237 timing with custom rules.
238
239 udev 061
240 ========
241 We changed the  internal rule storage format. Our large rule files took
242 2 MB of RAM, with the change we are down to 99kB.
243
244 If the device-node has been created with default name and no symlink or
245 options are to remenber, it is not longer stored in the udevdb. HAL will
246 need to be updated to work correctly with that change.
247
248 To overrride optimization flags, OPTFLAGS may be used now.
249
250 udev 060
251 ========
252 Bugfix release.
253
254 udev 059
255 ========
256 Major changes happened with this release. The goal is to take over the
257 complete kernel-event handling and provide a more efficient way to dispatch
258 kernel events. Replacing most of the current shell script logic and the
259 kernel forked helper with a netlink-daemon and a rule-based event handling.
260
261 o udevd listens to netlink events now. The first valid netlink event
262   will make udevd ignore any message from udevsend that contains a
263   SEQNUM, to avoid duplicate events. The forked events can be disabled
264   with:
265     echo "" > /proc/sys/kernel/hotplug
266   For full support, the broken input-subsytem needs to be fixed, not to
267   bypass the driver core.
268
269 o /etc/dev.d/ + /etc/hotplug.d/ directory multiplexing is completely
270   removed from udev itself and must be emulated by calling small
271   helper binaries provided in the extras folder:
272     make EXTRAS=extras/run_directory/
273   will build udev_run_devd and udev_run_hotplugd, which can be called
274   from a rule if needed:
275     RUN+="/sbin/udev_run_hotplugd"
276   The recommended way to handle this is to convert all the calls from
277   the directories to explicit udev rules and get completely rid of the
278   multiplexing. (To catch a ttyUSB event, you now no longer need to
279   fork and exit 300 tty script instances you are not interested in, it
280   is just one rule that matches exactly the device.)
281
282 o udev handles now _all_ events not just events for class and block
283   devices, this way it is possible to control the complete event
284   behavior with udev rules. Especially useful for rules like:
285     ACTION="add", DEVPATH="/devices/*", MODALIAS=="?*", RUN+="/sbin/modprobe $modalias"
286
287 o As used in the modalias rule, udev supports now textual
288   substitution placeholder along with the usual format chars. This
289   needs to be documented, for now it's only visible in udev_rules_parse.c.
290
291 o The rule keys support now more operations. This is documented in the
292   man page. It is possible to add values to list-keys like the SYMLINK
293   and RUN list with KEY+="value" and to clear the list by assigning KEY="".
294   Also "final"-assignments are supported by using KEY:="value", which will
295   prevent changing the key by any later rule.
296
297 o kernel 2.6.12 has the "detached_state" attribute removed from
298   sysfs, which was used to recognize sysfs population. We switched that
299   to wait for the "bus" link, which is only available in kernels after 2.6.11.
300   Running this udev version on older kernels may cause a short delay for
301   some events.
302
303 o To provide infrastructure for persistent device naming, the id programs:
304   scsi_id, vol_id (former udev_volume_id), and ata_id (new) are able now
305   to export the probed data in environment key format:
306     pim:~ # /sbin/ata_id --export /dev/hda
307     ID_MODEL=HTS726060M9AT00
308     ID_SERIAL=MRH401M4G6UM9B
309     ID_REVISION=MH4OA6BA
310
311   The following rules:
312     KERNEL="hd*[!0-9]", IMPORT="/sbin/ata_id --export $tempnode"
313     KERNEL="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_MODEL}_$env{ID_SERIAL}"
314
315   Will create:
316     kay@pim:~> tree /dev/disk
317     /dev/disk
318     |-- by-id
319     |   |-- HTS726060M9AT00_MRH401M4G6UM9B -> ../../hda
320     |   `-- IBM-Memory_Key -> ../../sda
321     |-- by-label
322     |   |-- swap -> ../../hda1
323     |   |-- date -> ../../sda1
324     |   `-- home -> ../../hda3
325     `-- by-uuid
326         |-- 2E08712B0870F2E7 -> ../../hda3
327         |-- 9352cfef-7687-47bc-a2a3-34cf136f72e1 -> ../../hda1
328         |-- E845-7A89 -> ../../sda1
329         `-- b2a61681-3812-4f13-a4ff-920d70604299 -> ../../hda2
330
331   The IMPORT= operation will import these keys in the environment and make
332   it available for later PROGRAM= and RUN= executed programs. The keys are
333   also stored in the udevdb and can be queried from there with one of the
334   next udev versions.
335
336 o A few binaries are silently added to the repository, which can be used
337   to replay kernel events from initramfs instead of using coldplug. udevd
338   can be instructed now to queue-up events while the stored events from
339   initramfs are filled into the udevd-queue. This code is still under
340   development and there is no documentation now besides the code itself.
341   The additional binaries get compiled, but are not installed by default.
342
343 o There is also a temporary fix for a performance problem where too many
344   events happen in parallel and every event needs to parse the rules.
345   udev can now read precompiled rules stored on disk. This is likely to be
346   replaced by a more elegant solution in a future udev version.
347
348 udev 058
349 ========
350 With kernel version 2.6.12, the sysfs file "detached_state" was removed.
351 Fix for libsysfs not to expect this file was added.
352
353 udev 057
354 ========
355 All rules are applied now, but only the first matching rule with a NAME-key
356 will be applied. All later rules with NAME-key are completely ignored. This
357 way system supplied symlinks or permissions gets applied to user-defined
358 naming rules.
359
360 Note:
361 Please check your rules setup, if you may need to add OPTIONS="last_rule"
362 to some rules, to keep the old behavior.
363
364 The rules are read on "remove"-events too. That makes is possible to match
365 with keys that are available on remove (KERNEL, SUBSYSTEM, ID, ENV, ...) to
366 instruct udev to ignore an event (OPTIONS="ignore_device").
367 The new ACTION-key may be used to let a rule act only at a "remove"-event.
368
369 The new RUN-key supports rule-based execution of programs after device-node
370 handling. This is meant as a general replacement for the dev.d/-directories
371 to give fine grained control over the execution of programs.
372
373 The %s{}-sysfs format char replacement values are searched at any of the
374 devices in the device chain now, not only at the class-device.
375
376 We support log priority levels now. The value udev_log in udev.conf is used
377 to determine what is printed to syslog. This makes it possible to
378 run a version with compiled-in debug messages in a production environment
379 which is sometimes needed to find a bug.
380 It is still possible to supress the inclusion of _any_ syslog usage with
381 USE_LOG=false to create the smallest possible binaries if needed.
382 The configured udev_log value can be overridden with the environment variable
383 UDEV_LOG.
384
385 udev 056
386 ========
387 Possible use of a system-wide klibc:
388   make USE_KLIBC=true KLCC=/usr/bin/klcc all
389 will link against an external klibc and our own version will be ignored.
390
391 udev 055
392 ========
393 We support an unlimited count of symlinks now.
394
395 If USE_STATIC=true is passed to a glibc build, we link statically and use
396 a built-in userdb parser to resolve user and group names.
397
398 The PLACE= key is gone. It can be replaced by an ID= for a long time, cause
399 we walk up the chain of physical devices to find a match.
400
401 The KEY="<value>" format supports '=', '==', '!=,' , '+=' now. This makes it
402 easy to skip certain attribute matches without composing rules with weird
403 character class negations like:
404   KERNEL="[!s][!c][!d]*"
405 this can now be replaced with:
406   KERNEL!="scd*"
407 The current simple '=' is still supported, and should work as it does today,
408 but existing rules should be converted if possible, to be better readable.
409
410 We have new ENV{}== key now, to match against a maximum of 5 environment
411 variables.
412
413 udevstart is its own binary again, cause we don't need co carry this araound
414 with every forked event.