Commit 12a362be authored by Kay Sievers's avatar Kay Sievers
Browse files

use libexecdir, bindir, sbindir, switch to /usr/lib/udev in documentation

parent c096407c
Usual options for udev installed in the root filesystem are:
./configure \
The options used used usually look like:
%configure \
--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/sbin \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libdir=/usr/lib64 \
--with-rootlibdir=/lib64 \
--libexecdir=/lib/udev \
--libexecdir=/usr/lib/udev \
--with-systemdsystemunitdir=/usr/lib/systemd/system \
--with-selinux
The options used in a RPM spec file usually look like:
The options used in a RPM spec file look like:
%configure \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--sbindir=/sbin \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--libdir=%{_libdir} \
--with-rootlibdir=/%{_lib} \
--libexecdir=/lib/udev \
--libexecdir=%{_prefix}/lib/udev \
--with-systemdsystemunitdir=%{_prefix}/lib/systemd/system \
--with-selinux
The options to install udev in the rootfs instead of /usr,
and udevadm in /sbin:
--bindir=/sbin
--sbindir=/sbin
--libexecdir=/lib/udev
--with-systemdsystemunitdir=/lib/systemd/system
--with-rootlibdir=/lib64
Some tools expect udevadm in 'sbin'. A symlink to udevadm in 'bin'
needs to be manually created if needed.
The defined location for scripts and binaries which are called
from rules is /lib/udev/ on all systems and architectures. Any
from rules is /usr/lib/udev/ on all systems and architectures. Any
other location will break other packages, who rightfully expect
the /lib/udev/ directory, to install their rule helper and udev
the /usr/lib/udev/ directory, to install their rule helper and udev
rule files.
It is possible to use the /lib/udev/devices/ directory to place
It is possible to use the /usr/lib/udev/devices/ directory to place
device nodes, directories and symlinks, which are copied to /dev/
at every bootup. That way, nodes for devices which can not be
detected automatically, or are activated on-demand by opening the
......
......@@ -114,14 +114,16 @@ EXTRA_DIST += \
udevrulesdir = $(libexecdir)/rules.d
dist_udevrules_DATA = \
rules/rules.d/50-udev-default.rules \
rules/rules.d/60-persistent-storage.rules \
rules/rules.d/60-persistent-storage-tape.rules \
rules/rules.d/60-persistent-serial.rules \
rules/rules.d/60-persistent-input.rules \
rules/rules.d/60-persistent-alsa.rules \
rules/rules.d/80-drivers.rules \
rules/rules.d/95-udev-late.rules
udevrules_DATA = \
rules/rules.d/60-persistent-storage.rules \
rules/rules.d/80-drivers.rules
udevconfdir = $(sysconfdir)/udev
dist_udevconf_DATA = udev.conf
......@@ -151,7 +153,7 @@ systemd-install-hook:
INSTALL_DATA_HOOKS += systemd-install-hook
endif
sbin_PROGRAMS = \
bin_PROGRAMS = \
udev/udevadm
libexec_PROGRAMS = \
......
udev 176
========
The udevadm tool moved from 'sbin' to 'bin'. Some tools expect
udevadm in 'sbin'. A symlink to udevadm in 'bin' needs to be
manually created if needed.
The systemd socket files use PassCred=yes, which requires systemd
version 38.
......
......@@ -10,10 +10,10 @@ The upstream udev project's set of default rules may require a most recent
kernel release to work properly. This is currently version 2.6.32.
Tools and rules shipped by udev are not public API and may change at any time.
Never call any private tool in /lib/udev from any external application; it might
just go away in the next release. Access to udev information is only offered
by udevadm and libudev. Tools and rules in /lib/udev and the entire contents of
the /run/udev directory are private to udev and do change whenever needed.
Never call any private tool in /usr/lib/udev from any external application; it
might just go away in the next release. Access to udev information is only offered
by udevadm and libudev. Tools and rules in /usr/lib/udev and the entire contents
of the /run/udev directory are private to udev and do change whenever needed.
Requirements:
- Version 2.6.34 of the Linux kernel with sysfs, procfs, signalfd, inotify,
......@@ -72,8 +72,8 @@ Setup:
- The udev daemon should be started to handle device events sent by the kernel.
During bootup, the events for already existing devices can be replayed, so
that they are configured by udev. This is usually done by:
/sbin/udevadm trigger --action=add --type=subsystems
/sbin/udevadm trigger --action=add --type=devices
udevadm trigger --action=add --type=subsystems
udevadm trigger --action=add --type=devices
- Restarting the daemon never applies any rules to existing devices.
......
- move cc opts from autogen to configure.ac
- move /lib/udev/devices/ to tmpfiles
- trigger --subsystem-match=usb/usb_device
- test (now fixed) /dev/tape/ links
......
......@@ -24,10 +24,11 @@ libdir() {
args="--prefix=/usr \
--sysconfdir=/etc \
--sbindir=/sbin \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libdir=$(libdir /usr/lib) \
--with-rootlibdir=$(libdir /lib) \
--libexecdir=/lib/udev \
--libexecdir=/usr/lib/udev \
--with-systemdsystemunitdir=/usr/lib/systemd/system
--with-selinux \
--enable-gtk-doc"
......
......@@ -200,6 +200,9 @@ AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([
Makefile
extras/mtd_probe/75-probe_mtd.rules
rules/rules.d/80-drivers.rules
rules/rules.d/60-persistent-storage.rules
udev/udev.pc
systemd/udev.service
systemd/udev-trigger.service
......@@ -210,6 +213,7 @@ AC_CONFIG_FILES([
extras/gudev/gudev-1.0.pc
extras/gudev/docs/Makefile
extras/gudev/docs/version.xml
extras/keymap/keyboard-force-release.sh
])
AC_OUTPUT
......@@ -219,7 +223,8 @@ AC_MSG_RESULT([
prefix: ${prefix}
sysconfdir: ${sysconfdir}
sbindir: ${sbindir}
bindir: ${bindir}
sbindir: ${bindir}
libdir: ${libdir}
rootlibdir: ${rootlib_execdir}
libexecdir: ${libexecdir}
......
keyboard-force-release.sh
keymap
keys-from-name.gperf
keys-from-name.h
keys-to-name.h
keys.txt
......@@ -5,10 +5,10 @@
# The atkbd driver has a quirk handler for generating synthetic
# release events, which can be configured via sysfs since 2.6.32.
# Simply add a file with a list of scancodes for your laptop model
# in /lib/udev/keymaps, and add a rule here.
# in /usr/lib/udev/keymaps, and add a rule here.
# If the hotkeys also need a keymap assignment you can copy the
# scancodes from the keymap file, otherwise you can run
# /lib/udev/keymap -i /dev/input/eventX
# /usr/lib/udev/keymap -i /dev/input/eventX
# on a Linux vt to find out.
ACTION=="remove", GOTO="force_release_end"
......
......@@ -2,7 +2,7 @@
#
# Key map overrides can be specified by either giving scancode/keyname pairs
# directly as keymap arguments (if there are just one or two to change), or as
# a file name (in /lib/udev/keymaps), which has to contain scancode/keyname
# a file name (in /usr/lib/udev/keymaps), which has to contain scancode/keyname
# pairs.
ACTION=="remove", GOTO="keyboard_end"
......
......@@ -44,7 +44,7 @@ for inclusion you need to do the following steps:
1. Find the keyboard device.
Run /lib/udev/findkeyboards. This should always give you an "AT
Run /usr/lib/udev/findkeyboards. This should always give you an "AT
keyboard" and possibly a "module". Some laptops (notably Thinkpads, Sonys, and
Acers) have multimedia/function keys on a separate input device instead of the
primary keyboard. The keyboard device should have a name like "input/event3".
......@@ -53,7 +53,7 @@ for inclusion you need to do the following steps:
2. Find broken scan codes:
sudo /lib/udev/keymap -i input/eventX
sudo /usr/lib/udev/keymap -i input/eventX
Press all multimedia/function keys and check if the key name that gets printed
out is plausible. If it is unknown or wrong, write down the scan code (looks
......@@ -67,14 +67,14 @@ for inclusion you need to do the following steps:
0x1E www # Fn+F2 web browser
Repeat that for all other keys. Write the resulting list into a file. Look at
/lib/udev/keymaps/ for existing key map files and make sure that you use the
/usr/lib/udev/keymaps/ for existing key map files and make sure that you use the
same structure.
If the key only ever works once and then your keyboard (or the entire desktop)
gets stuck for a long time, then it is likely that the BIOS fails to send a
corresponding "key release" event after the key press event. Please note down
this case as well, as it can be worked around in
/lib/udev/keymaps/95-keyboard-force-release.rules .
/usr/lib/udev/keymaps/95-keyboard-force-release.rules .
3. Find out your system vendor and product:
......@@ -87,8 +87,8 @@ for inclusion you need to do the following steps:
and /tmp/udev-db.txt from step 4 to the linux-hotplug@vger.kernel.org mailing
list, so that they can be included in the next release.
For local testing, copy your map file to /lib/udev/keymaps/ with an appropriate
name, and add an appropriate udev rule to /lib/udev/rules.d/95-keymap.rules:
For local testing, copy your map file to /usr/lib/udev/keymaps/ with an appropriate
name, and add an appropriate udev rule to /usr/lib/udev/rules.d/95-keymap.rules:
* If you selected an "AT keyboard", add the rule to the section after
'LABEL="keyboard_vendorcheck"'.
......
......@@ -6,7 +6,7 @@
case "$2" in
/*) scf="$2" ;;
*) scf="/lib/udev/keymaps/force-release/$2" ;;
*) scf="@libexecdir@/keymaps/force-release/$2" ;;
esac
read attr <"/sys/$1/force_release"
......
......@@ -3,6 +3,6 @@
ACTION!="add", GOTO="mtd_probe_end"
KERNEL=="mtd*ro", IMPORT{program}="mtd_probe $tempnode"
KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN+="/sbin/modprobe -bv sm_ftl"
KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN+="@sbindir@/modprobe -bv sm_ftl"
LABEL="mtd_probe_end"
......@@ -15,10 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PATH='/sbin:/bin'
#
PATH='/sbin:/bin'
PATH='/usr/bin:/bin:/usr/sbin:/sbin'
# Read a single line from file $1 in the $DEVPATH directory.
# The function must not return an error even if the file does not exist.
......
scsi_id
scsi_id.8
scsi_id_version.h
......@@ -33,7 +33,7 @@ by page 0x80. For example:
.sp
.nf
# /lib/udev/scsi_id \-\-page=0x80 \-\-whitelisted \-\-device=/dev/sda
# /usr/lib/udev/scsi_id \-\-page=0x80 \-\-whitelisted \-\-device=/dev/sda
SIBM 3542 1T05078453
.fi
.P
......@@ -45,7 +45,7 @@ identifier starts with the NAA value of 6):
.sp
.nf
# /lib/udev/scsi_id \-\-page=0x83 \-\-whitelisted \-\-device=/dev/sda
# /usr/lib/udev/scsi_id \-\-page=0x83 \-\-whitelisted \-\-device=/dev/sda
3600a0b80000b174b000000d63efc5c8c
.fi
.P
......
rules.d/60-persistent-storage.rules
rules.d/80-drivers.rules
......@@ -66,12 +66,12 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="@sbindir@/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="@sbindir@/blkid -o udev -p -u noraid $tempnode"
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
KERNEL!="sr*", IMPORT{program}="@sbindir@/blkid -o udev -p $tempnode"
# watch metadata changes by tools closing the device after writing
KERNEL!="sr*", OPTIONS+="watch"
......
# do not edit this file, it will be overwritten on update
ACTION=="remove", GOTO="drivers_end"
DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -bv tifm_sd"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe -bv tifm_ms"
SUBSYSTEM=="memstick", RUN+="/sbin/modprobe -bv --all ms_block mspro_block"
SUBSYSTEM=="i2o", RUN+="/sbin/modprobe -bv i2o_block"
SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe -bv ppdev"
LABEL="drivers_end"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment