mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
udev rules updated, udev version bumped (issue 28)
This commit is contained in:
parent
c19659dd23
commit
e1e5b5e143
8 changed files with 68 additions and 116 deletions
|
@ -1,4 +1,5 @@
|
|||
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
|
||||
PROGRAM="/bin/grep -q ' %M:%m /[^ ]* /' /proc/self/mountinfo", PROGRAM!="/bin/grep -q ' %M:%m / /media/' /proc/self/mountinfo", GOTO="media_by_label_auto_mount_end"
|
||||
|
||||
# Import FS infos
|
||||
IMPORT{program}="/sbin/blkid -o udev -p %N"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
KERNEL!="mmcblk[0-9]p[0-9]", GOTO="sd_cards_auto_mount_end"
|
||||
PROGRAM="/bin/grep -q ' %M:%m /[^ ]* /' /proc/self/mountinfo", PROGRAM!="/bin/grep -q ' %M:%m / /media/' /proc/self/mountinfo", GOTO="sd_cards_auto_mount_end"
|
||||
|
||||
# Global mount options
|
||||
ACTION=="add", ENV{mount_options}="relatime"
|
||||
|
|
14
core/udev/80-drivers.rules
Normal file
14
core/udev/80-drivers.rules
Normal file
|
@ -0,0 +1,14 @@
|
|||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
ACTION=="remove", GOTO="drivers_end"
|
||||
|
||||
DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/lib/udev/load-modules.sh $env{MODALIAS}"
|
||||
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/lib/udev/load-modules.sh tifm_sd"
|
||||
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/lib/udev/load-modules.sh tifm_ms"
|
||||
SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh ms_block"
|
||||
SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh mspro_block"
|
||||
SUBSYSTEM=="i2o", RUN+="/lib/udev/load-modules.sh i2o_block"
|
||||
SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/lib/udev/load-modules.sh sg"
|
||||
SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/lib/udev/load-modules.sh ppdev"
|
||||
|
||||
LABEL="drivers_end"
|
|
@ -73,8 +73,6 @@ ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="cdsymlinks.sh"
|
|||
# Additional Archlinux
|
||||
# Permissions and Symlinks - begin
|
||||
#####################################
|
||||
# fix /dev/root symlink
|
||||
SUBSYSTEM=="block", RUN+="root-link.sh"
|
||||
|
||||
# permission for sg devices
|
||||
KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0660"
|
||||
|
@ -130,9 +128,6 @@ KERNEL=="sonypi", MODE="0666"
|
|||
# USB devices
|
||||
KERNEL=="legousbtower*", MODE="0666"
|
||||
|
||||
# IEEE1394 (firewire) devices
|
||||
KERNEL=="raw1394", GROUP="video"
|
||||
|
||||
# kbd devices
|
||||
KERNEL=="kbd", MODE="0664"
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# Maintainer: Mike Staszel <mikestaszel@plugboxlinux.org
|
||||
# Maintainer: Mike Staszel <mikestaszel@plugapps.com>
|
||||
# Maintainer: Aaron Griffin <aaron@archlinux.org>
|
||||
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
|
||||
# Maintainer: Thomas Bächler <thomas@archlinux.org>
|
||||
|
||||
# Plugbox changes: Just added the SD and USB automount rules
|
||||
|
||||
pkgbase="udev"
|
||||
pkgname=('udev' 'udev-compat')
|
||||
pkgver=157
|
||||
pkgrel=2
|
||||
arch=('arm')
|
||||
pkgver=162
|
||||
pkgrel=1
|
||||
arch=(arm)
|
||||
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
|
||||
license=('GPL')
|
||||
groups=('base')
|
||||
|
@ -15,18 +17,19 @@ groups=('base')
|
|||
options=(!makeflags !libtool)
|
||||
makedepends=('glibc' 'coreutils' 'util-linux' 'libusb' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection')
|
||||
source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2
|
||||
81-arch.rules load-modules.sh cdsymlinks.sh root-link.sh
|
||||
arch-udev-rules.patch
|
||||
11-media-by-label-auto-mount.rules
|
||||
11-sd-cards-auto-mount.rules)
|
||||
md5sums=('0ea39cc875116982abf200eb16c1b53e'
|
||||
'6393ee81993f8b9beb776ca904005864'
|
||||
80-drivers.rules
|
||||
81-arch.rules
|
||||
load-modules.sh
|
||||
cdsymlinks.sh
|
||||
11-media-by-label-auto-mount.rules
|
||||
11-sd-cards-auto-mount.rules)
|
||||
md5sums=('dd7099242e92084605e07db0c7299a02'
|
||||
'4427855146513a4703ab5c7eb8a0156e'
|
||||
'f17c99779173ddc79f866cf3a5de5e68'
|
||||
'f91fddc67609b45b244a624977c4247b'
|
||||
'2e808ee78d237c478b57af2a68d43769'
|
||||
'2d6dc6842464f107bccc68cd505a6c31'
|
||||
'70198227b7bbe3852e1cd2299693af66'
|
||||
'b71221f5d3588b5f1522906bb7cd7c6b'
|
||||
'689cf10b97269e68db29451809e28419')
|
||||
'bb32aa00e42508b8e88e7662852a4bf2'
|
||||
'173b71ab6466677c12c99ef37c56a3db')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgname-$pkgver
|
||||
|
@ -34,7 +37,7 @@ build() {
|
|||
--includedir=/usr/include\
|
||||
--libexecdir=/lib/udev\
|
||||
--datarootdir=/usr/share
|
||||
make || return 1
|
||||
make
|
||||
}
|
||||
|
||||
package_udev() {
|
||||
|
@ -54,37 +57,22 @@ package_udev() {
|
|||
mv $pkgdir/lib/pkgconfig $pkgdir/usr/lib
|
||||
# Fix ConsoleKit path
|
||||
mv $pkgdir/lib/ConsoleKit $pkgdir/usr/lib
|
||||
# Replace original 80-drivers.rules with custom one.
|
||||
install -D -m644 $srcdir/80-drivers.rules $pkgdir/lib/udev/rules.d/80-drivers.rules
|
||||
# Install our rule for permissions and symlinks
|
||||
install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules
|
||||
# install our module loading subsystem
|
||||
install -D -m755 $srcdir/load-modules.sh $pkgdir/lib/udev/load-modules.sh
|
||||
# install cdsymlinks.sh
|
||||
install -D -m755 $srcdir/cdsymlinks.sh $pkgdir/lib/udev/cdsymlinks.sh
|
||||
# install root-link.sh
|
||||
install -D -m755 $srcdir/root-link.sh $pkgdir/lib/udev/root-link.sh
|
||||
# disable error logging to prevent startup failures printed to vc on boot
|
||||
sed -i -e 's|udev_log="err"|udev_log="0"|g' $pkgdir/etc/udev/udev.conf
|
||||
# install additional standard rules files
|
||||
for rule in $srcdir/$pkgname-$pkgver/rules/packages/*.rules; do
|
||||
install -D -m 644 $rule $pkgdir/lib/udev/rules.d/
|
||||
done
|
||||
# fix standard udev rules to fit to arch
|
||||
cd $pkgdir/lib/udev/rules.d/
|
||||
patch -Np1 -i $srcdir/arch-udev-rules.patch || return 1
|
||||
# remove .orig files
|
||||
rm -f $pkgdir/lib/udev/rules.d/*.orig
|
||||
# disable persistent cdromsymlinks and network by default
|
||||
# and move it to /etc/udev/rules.d
|
||||
mv $pkgdir/lib/udev/rules.d/75-persistent-net-generator.rules \
|
||||
$pkgdir/etc/udev/rules.d/75-persistent-net-generator.rules.optional
|
||||
mv $pkgdir/lib/udev/rules.d/75-cd-aliases-generator.rules \
|
||||
$pkgdir/etc/udev/rules.d/75-cd-aliases-generator.rules.optional
|
||||
# remove not needed rules
|
||||
rm $pkgdir/lib/udev/rules.d/40-ia64.rules
|
||||
rm $pkgdir/lib/udev/rules.d/40-ppc.rules
|
||||
rm $pkgdir/lib/udev/rules.d/40-s390.rules
|
||||
rm $pkgdir/lib/udev/rules.d/64-device-mapper.rules
|
||||
rm $pkgdir/lib/udev/rules.d/64-md-raid.rules
|
||||
|
||||
# create framebuffer blacklist
|
||||
mkdir -p $pkgdir/etc/modprobe.d/
|
||||
|
@ -93,39 +81,40 @@ package_udev() {
|
|||
done
|
||||
|
||||
# create static devices in /lib/udev/devices/
|
||||
mkdir ${pkgdir}/lib/udev/devices
|
||||
mkdir ${pkgdir}/lib/udev/devices/pts
|
||||
mkdir ${pkgdir}/lib/udev/devices/shm
|
||||
|
||||
mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1 || return 1
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3 || return 1
|
||||
mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5 || return 1
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11 || return 1
|
||||
mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3
|
||||
mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11
|
||||
|
||||
ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd || return 1
|
||||
ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin || return 1
|
||||
ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout || return 1
|
||||
ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr || return 1
|
||||
ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core || return 1
|
||||
ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd
|
||||
ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin
|
||||
ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout
|
||||
ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr
|
||||
ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core
|
||||
|
||||
# these static devices are created for convenience, to autoload the modules if necessary
|
||||
# /dev/loop0
|
||||
mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0 || return 1
|
||||
chgrp disk ${pkgdir}/lib/udev/devices/loop0 || return 1
|
||||
mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0
|
||||
chgrp disk ${pkgdir}/lib/udev/devices/loop0
|
||||
# /dev/net/tun
|
||||
mkdir ${pkgdir}/lib/udev/devices/net
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200 || return 1
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200
|
||||
# /dev/fuse
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229 || return 1
|
||||
mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229
|
||||
# /dev/ppp
|
||||
mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0 || return 1
|
||||
mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0
|
||||
|
||||
# Replace dialout group in rules with uucp group
|
||||
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
|
||||
for i in $pkgdir/lib/udev/rules.d/*.rules; do
|
||||
sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g' $i
|
||||
sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
|
||||
s#GROUP="tape"#GROUP="storage"#g;
|
||||
s#GROUP="cdrom"#GROUP="optical"#g' $i
|
||||
done
|
||||
|
||||
mv "${pkgdir}/lib/girepository-1.0" "${pkgdir}/usr/lib/" || return 1
|
||||
mv "${pkgdir}/lib/girepository-1.0" "${pkgdir}/usr/lib/"
|
||||
|
||||
# Plugbox Linux USB drive and SD card automount rules
|
||||
rm -rf $pkgdir/etc/udev/rules.d/*
|
||||
|
@ -139,5 +128,5 @@ package_udev-compat() {
|
|||
groups=('')
|
||||
cd $srcdir/$pkgname-$pkgver
|
||||
install -d -m755 ${pkgdir}/lib/${pkgname}/rules.d
|
||||
install -D -m644 ${srcdir}/${pkgname}-${pkgver}/rules/gentoo/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
|
||||
install -D -m644 ${srcdir}/${pkgname}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
|
||||
}
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
diff -Nur rules.d/50-udev-default.rules rules.d.arch/50-udev-default.rules
|
||||
--- rules.d/50-udev-default.rules 2009-03-07 22:22:48.200242883 +0100
|
||||
+++ rules.d.arch/50-udev-default.rules 2009-03-07 22:23:26.134434516 +0100
|
||||
@@ -59,15 +59,15 @@
|
||||
KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"
|
||||
|
||||
# cdrom
|
||||
-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
|
||||
-SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
|
||||
-KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
||||
-KERNEL=="pktcdvd", GROUP="cdrom"
|
||||
+SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="optical", MODE="0660"
|
||||
+SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical", MODE="0660"
|
||||
+KERNEL=="pktcdvd[0-9]*", GROUP="optical", MODE="0660"
|
||||
+KERNEL=="pktcdvd", GROUP="optical", MODE="0660"
|
||||
|
||||
# tape
|
||||
-KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
|
||||
-KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="tape"
|
||||
-SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
|
||||
+KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="storage", MODE="0660"
|
||||
+KERNEL=="pt[0-9]*|npt[0-9]*|pht[0-9]*", GROUP="storage", MODE="0660"
|
||||
+SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage", MODE="0660"
|
||||
|
||||
# block-related
|
||||
KERNEL=="sch[0-9]*", GROUP="disk"
|
||||
diff -Nur rules.d/80-drivers.rules rules.d.arch/80-drivers.rules
|
||||
--- rules.d/80-drivers.rules 2010-06-03 11:55:08.978720002 +0200
|
||||
+++ rules.d.arch/80-drivers.rules 2010-06-03 11:58:41.207865142 +0200
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
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=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -bv sg"
|
||||
-SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe -bv ppdev"
|
||||
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/lib/udev/load-modules.sh $env{MODALIAS}"
|
||||
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/lib/udev/load-modules.sh tifm_sd"
|
||||
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/lib/udev/load-modules.sh tifm_ms"
|
||||
+SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh ms_block"
|
||||
+SUBSYSTEM=="memstick", RUN+="/lib/udev/load-modules.sh mspro_block"
|
||||
+SUBSYSTEM=="i2o", RUN+="/lib/udev/load-modules.sh i2o_block"
|
||||
+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/lib/udev/load-modules.sh sg"
|
||||
+SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/lib/udev/load-modules.sh ppdev"
|
||||
|
||||
LABEL="drivers_end"
|
|
@ -1,7 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Creates root symlink in /dev
|
||||
# for Arch Linux by Roman Kyrylych <Roman.Kyrylych@gmail.com>
|
||||
|
||||
if ! [ -L /dev/root ]; then
|
||||
ln -s $(cat /proc/cmdline | sed "s: :\n:g" | grep root= | sed "s:root=::") /dev/root
|
||||
fi
|
|
@ -19,9 +19,18 @@ post_install() {
|
|||
ROOTDIR=""
|
||||
[ "$(stat -c %D /)" != "$(stat -c %D /dev)" ] && ROOTDIR=$(mktemp -d /tmp/udevinstall.XXXXXX)
|
||||
[ -n "${ROOTDIR}" ] && mount --bind / ${ROOTDIR}
|
||||
[ -c ${ROOTDIR}/dev/console ] || mknod -m600 ${ROOTDIR}/dev/console c 5 1
|
||||
[ -c ${ROOTDIR}/dev/null ] || mknod -m644 ${ROOTDIR}/dev/null c 1 3
|
||||
[ -c ${ROOTDIR}/dev/zero ] || mknod -m644 ${ROOTDIR}/dev/zero c 1 5
|
||||
if [ ! -c ${ROOTDIR}/dev/console ]; then
|
||||
rm -f ${ROOTDIR}/dev/console
|
||||
mknod -m600 ${ROOTDIR}/dev/console c 5 1
|
||||
fi
|
||||
if [ ! -c ${ROOTDIR}/dev/null ]; then
|
||||
rm -f ${ROOTDIR}/dev/null
|
||||
mknod -m644 ${ROOTDIR}/dev/null c 1 3
|
||||
fi
|
||||
if [ ! -c ${ROOTDIR}/dev/zero ]; then
|
||||
rm ${ROOTDIR}/dev/zero
|
||||
mknod -m644 ${ROOTDIR}/dev/zero c 1 5
|
||||
fi
|
||||
if [ -n "${ROOTDIR}" ]; then
|
||||
umount ${ROOTDIR}
|
||||
rmdir ${ROOTDIR}
|
||||
|
|
Loading…
Reference in a new issue