mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
core/udev to 171-1
This commit is contained in:
parent
5ff4f41dab
commit
5ef68c3b76
7 changed files with 54 additions and 198 deletions
|
@ -1,68 +0,0 @@
|
|||
From 2738ec2cf721db0c0deac2ba0abdc73cf7739e9f Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay.sievers@vrfy.org>
|
||||
Date: Mon, 16 May 2011 13:17:48 +0200
|
||||
Subject: [PATCH 1/7] udevd: create queue file before daemonizing to reliably
|
||||
block 'settle'
|
||||
|
||||
---
|
||||
udev/udevd.c | 22 ++++++++++++----------
|
||||
1 files changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/udev/udevd.c b/udev/udevd.c
|
||||
index be4b071..258d787 100644
|
||||
--- a/udev/udevd.c
|
||||
+++ b/udev/udevd.c
|
||||
@@ -1408,6 +1408,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
udev_monitor_set_receive_buffer_size(monitor, 128*1024*1024);
|
||||
|
||||
+ /* create queue file before signalling 'ready', to make sure we block 'settle' */
|
||||
+ udev_queue_export = udev_queue_export_new(udev);
|
||||
+ if (udev_queue_export == NULL) {
|
||||
+ err(udev, "error creating queue file\n");
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
if (daemonize) {
|
||||
pid_t pid;
|
||||
int fd;
|
||||
@@ -1421,8 +1428,8 @@ int main(int argc, char *argv[])
|
||||
rc = 4;
|
||||
goto exit;
|
||||
default:
|
||||
- rc = 0;
|
||||
- goto exit;
|
||||
+ rc = EXIT_SUCCESS;
|
||||
+ goto exit_keep_queue;
|
||||
}
|
||||
|
||||
setsid();
|
||||
@@ -1521,12 +1528,6 @@ int main(int argc, char *argv[])
|
||||
goto exit;
|
||||
}
|
||||
|
||||
- udev_queue_export = udev_queue_export_new(udev);
|
||||
- if (udev_queue_export == NULL) {
|
||||
- err(udev, "error creating queue file\n");
|
||||
- goto exit;
|
||||
- }
|
||||
-
|
||||
memset(&ep_ctrl, 0, sizeof(struct epoll_event));
|
||||
ep_ctrl.events = EPOLLIN;
|
||||
ep_ctrl.data.fd = fd_ctrl;
|
||||
@@ -1708,9 +1709,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
- udev_queue_export_cleanup(udev_queue_export);
|
||||
- rc = 0;
|
||||
+ rc = EXIT_SUCCESS;
|
||||
exit:
|
||||
+ udev_queue_export_cleanup(udev_queue_export);
|
||||
+exit_keep_queue:
|
||||
if (fd_ep >= 0)
|
||||
close(fd_ep);
|
||||
worker_list_cleanup(udev);
|
||||
--
|
||||
1.7.5.1
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
From 12f79fb0b9c919787d8a7d4307895d3d6b4b029b Mon Sep 17 00:00:00 2001
|
||||
From: Nix <nix@esperi.org.uk>
|
||||
Date: Mon, 16 May 2011 22:51:38 +0200
|
||||
Subject: [PATCH 7/7] libudev: queue - accept NULL passed into
|
||||
udev_queue_export_cleanup()
|
||||
|
||||
---
|
||||
libudev/libudev-queue-private.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c
|
||||
index 0dcf9b0..6e13d8a 100644
|
||||
--- a/libudev/libudev-queue-private.c
|
||||
+++ b/libudev/libudev-queue-private.c
|
||||
@@ -104,9 +104,10 @@ void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export)
|
||||
{
|
||||
char filename[UTIL_PATH_SIZE];
|
||||
|
||||
+ if (udev_queue_export == NULL)
|
||||
+ return;
|
||||
util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.tmp", NULL);
|
||||
unlink(filename);
|
||||
-
|
||||
util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.bin", NULL);
|
||||
unlink(filename);
|
||||
}
|
||||
--
|
||||
1.7.5.1
|
||||
|
|
@ -28,10 +28,6 @@
|
|||
# check if the device has already been claimed by a driver
|
||||
ACTION!="add", GOTO="drivers_end"
|
||||
|
||||
# SOUND addon modules
|
||||
SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-pcm-oss"
|
||||
SUBSYSTEM=="sound", RUN+="/lib/udev/load-modules.sh snd-seq-oss"
|
||||
|
||||
#PNP addon modules
|
||||
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="PNP0800", RUN+="/lib/udev/load-modules.sh pcspkr"
|
||||
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", ATTRS{id}=="*PNP051[01]*", RUN+="/lib/udev/load-modules.sh irtty-sir"
|
||||
|
@ -49,26 +45,6 @@ LABEL="drivers_end"
|
|||
##### Hotplug rules - end
|
||||
#####################################
|
||||
|
||||
#####################################
|
||||
###### CD/DVD symlinks - begin
|
||||
#####################################
|
||||
ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", IMPORT="cdrom_id --export $tempnode"
|
||||
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", IMPORT="cdrom_id --export $tempnode"
|
||||
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="scd[a-z]", IMPORT="cdrom_id --export $tempnode"
|
||||
ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b"
|
||||
ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b"
|
||||
ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b"
|
||||
ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvdrw-%b"
|
||||
ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", RUN+="cdsymlinks.sh"
|
||||
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh"
|
||||
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="cdsymlinks.sh"
|
||||
ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="hd[a-z]", RUN+="cdsymlinks.sh"
|
||||
ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sr[0-9]*", RUN+="cdsymlinks.sh"
|
||||
ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="cdsymlinks.sh"
|
||||
#####################################
|
||||
###### CD/DVD symlinks - end
|
||||
#####################################
|
||||
|
||||
#####################################
|
||||
# Additional Archlinux
|
||||
# Permissions and Symlinks - begin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: PKGBUILD 124183 2011-05-17 13:17:56Z tomegun $
|
||||
# $Id: PKGBUILD 125635 2011-05-27 11:47:52Z tomegun $
|
||||
# Maintainer: Aaron Griffin <aaron@archlinux.org>
|
||||
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
|
||||
# Maintainer: Thomas Bächler <thomas@archlinux.org>
|
||||
|
@ -11,8 +11,8 @@ plugrel=1
|
|||
|
||||
pkgbase="udev"
|
||||
pkgname=('udev' 'udev-compat')
|
||||
pkgver=168
|
||||
pkgrel=2
|
||||
pkgver=171
|
||||
pkgrel=1
|
||||
arch=(i686 x86_64)
|
||||
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
|
||||
license=('GPL')
|
||||
|
@ -23,20 +23,18 @@ makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2'
|
|||
source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2
|
||||
80-drivers.rules
|
||||
81-arch.rules
|
||||
load-modules.sh
|
||||
cdsymlinks.sh
|
||||
01-settle.patch
|
||||
02-settle.patch
|
||||
load-modules.sh
|
||||
static-audio-nodes-permissions.patch
|
||||
11-media-by-label-auto-mount.rules
|
||||
11-sd-cards-auto-mount.rules)
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgbase-$pkgver
|
||||
# fix https://bugs.archlinux.org/task/24288
|
||||
patch -Np1 -i ../01-settle.patch
|
||||
patch -Np1 -i ../02-settle.patch
|
||||
# fix https://bugs.archlinux.org/task/24362 (will be in udev-172)
|
||||
patch -Np1 -i ../static-audio-nodes-permissions.patch
|
||||
./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\
|
||||
--sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system
|
||||
--sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system\
|
||||
--disable-rule-generator
|
||||
make
|
||||
}
|
||||
|
||||
|
@ -58,16 +56,6 @@ package_udev() {
|
|||
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
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# create framebuffer blacklist
|
||||
mkdir -p $pkgdir/etc/modprobe.d/
|
||||
|
@ -109,9 +97,6 @@ package_udev() {
|
|||
s#GROUP="cdrom"#GROUP="optical"#g' $i
|
||||
done
|
||||
|
||||
# Provided by the bluez package, remove this line when updating to udev>=169
|
||||
rm ${pkgdir}/lib/udev/hid2hci
|
||||
|
||||
# Arch Linux ARM USB drive and SD card automount rules
|
||||
rm -rf $pkgdir/etc/udev/rules.d/*
|
||||
cp $srcdir/11-media-by-label-auto-mount.rules $pkgdir/etc/udev/rules.d/
|
||||
|
@ -126,12 +111,10 @@ package_udev-compat() {
|
|||
install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d
|
||||
install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
|
||||
}
|
||||
sha256sums=('9ddc43173cf7b397c8cc01d26d644932ff2c2259b3a5eea7be90db96a28080e2'
|
||||
'0cb99cc7cea92238dd6b19a4c104c3b9e9f744c6b9d6b4382c7cd22be18c98f9'
|
||||
'377c13f20de32776107dddc8324f599f31320e8dd1185e3282856aee5cb08499'
|
||||
'c6b41afb24e8f496064d8baad844697a6515cea1b7e0389054cd8a2053477377'
|
||||
'cc0d281926bf2f1ac816c0060a2afc59444ddf0f8dab6e2d9924a2a7c8de4a13'
|
||||
'70d2fd079901bf9940c4811ec91634da0d8b3425ebcdbffeba5a73cb616be650'
|
||||
'fe9d1aafb1a620108790d82960577de4eb757450c35a146475aed3f5e9356f1a'
|
||||
'6d386aba57f6bbd94d82244c8fa5bd330a78b13c1ff53543f695e59f654bd9a8'
|
||||
'946faf8e338af058a69415b804b3ca801668531d9e60098f4b44c63c486a235a')
|
||||
md5sums=('bdf4617284be2ecac11767437417e209'
|
||||
'4427855146513a4703ab5c7eb8a0156e'
|
||||
'd8725e64fd0ce6e784ae795fae424c0a'
|
||||
'f91fddc67609b45b244a624977c4247b'
|
||||
'4f625aea95a5597afd8cdf189421f193'
|
||||
'155554f488388e3f994ace619ad1e8d4'
|
||||
'173b71ab6466677c12c99ef37c56a3db')
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Creates cdsymlinks in /dev
|
||||
# for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
|
||||
|
||||
# check on cd/dvd drives and if persistant rules file is used
|
||||
if [ -d /dev/cd -a ! -e /etc/udev/rules.d/75-persistent-cd.rules ]; then
|
||||
# remove existing device files
|
||||
rm /dev/cdrom*
|
||||
rm /dev/cdrw*
|
||||
rm /dev/dvd*
|
||||
rm /dev/dvdrw*
|
||||
# start creating symlinks
|
||||
for i in /dev/cd/cdrom-*; do
|
||||
if [ -h $i ]; then
|
||||
[ "$CD_NUMBER" = "" ] && ln -s $i /dev/cdrom
|
||||
[ "$CD_NUMBER" = "" ] && CD_NUMBER="-1"
|
||||
! [ "$CD_NUMBER" = "" ] && CD_NUMBER="$((CD_NUMBER+1))" && ln -s $i /dev/cdrom$CD_NUMBER
|
||||
fi
|
||||
done
|
||||
|
||||
for i in /dev/cd/cdrw-*; do
|
||||
if [ -h $i ]; then
|
||||
[ "$CDRW_NUMBER" = "" ] && ln -s $i /dev/cdrw
|
||||
[ "$CDRW_NUMBER" = "" ] && CDRW_NUMBER="-1"
|
||||
! [ "$CDRW_NUMBER" = "" ] && CDRW_NUMBER="$((CDRW_NUMBER+1))" && ln -s $i /dev/cdrw$CDRW_NUMBER
|
||||
fi
|
||||
done
|
||||
|
||||
for i in /dev/cd/dvd-*; do
|
||||
if [ -h $i ]; then
|
||||
[ "$DVD_NUMBER" = "" ] && ln -s $i /dev/dvd
|
||||
[ "$DVD_NUMBER" = "" ] && DVD_NUMBER="-1"
|
||||
! [ "$DVD_NUMBER" = "" ] && DVD_NUMBER="$((DVD_NUMBER+1))" && ln -s $i /dev/dvd$DVD_NUMBER
|
||||
fi
|
||||
done
|
||||
|
||||
for i in /dev/cd/dvdrw-*; do
|
||||
if [ -h $i ]; then
|
||||
[ "$DVDRW_NUMBER" = "" ] && ln -s $i /dev/dvdrw
|
||||
[ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="-1"
|
||||
! [ "$DVDRW_NUMBER" = "" ] && DVDRW_NUMBER="$((DVDRW_NUMBER+1))" && ln -s $i /dev/dvdrw$DVDRW_NUMBER
|
||||
fi
|
||||
done
|
||||
fi
|
27
core/udev/static-audio-nodes-permissions.patch
Normal file
27
core/udev/static-audio-nodes-permissions.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
From 3e227830ad6494700e18ae03297e8fb833ff26bf Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay.sievers@vrfy.org>
|
||||
Date: Fri, 27 May 2011 02:50:29 +0200
|
||||
Subject: [PATCH] rules: apply 'audio' group of the static snd/{seq,timer}
|
||||
nodes
|
||||
|
||||
---
|
||||
rules/rules.d/50-udev-default.rules | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
|
||||
index cd745ef..cacb533 100644
|
||||
--- a/rules/rules.d/50-udev-default.rules
|
||||
+++ b/rules/rules.d/50-udev-default.rules
|
||||
@@ -38,7 +38,8 @@ SUBSYSTEM=="graphics", GROUP="video"
|
||||
SUBSYSTEM=="drm", GROUP="video"
|
||||
|
||||
# sound
|
||||
-SUBSYSTEM=="sound", GROUP="audio"
|
||||
+SUBSYSTEM=="sound", GROUP="audio", \
|
||||
+ OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer"
|
||||
|
||||
# DVB (video)
|
||||
SUBSYSTEM=="dvb", GROUP="video"
|
||||
--
|
||||
1.7.5.3
|
||||
|
|
@ -11,6 +11,17 @@ post_upgrade() {
|
|||
echo "They are located in /etc/udev/readme-udev-arch.txt"
|
||||
echo "----------"
|
||||
fi
|
||||
if [ "$(vercmp $2 169)" -lt 0 ]; then
|
||||
echo "ATTENTION UDEV:"
|
||||
echo "---------------"
|
||||
echo "Kernel 2.6.32 or newer is now required."
|
||||
echo "OSS emulation modules are not loaded by default, add to rc.conf if needed."
|
||||
echo "Arch specific cd symlinks are now no longer created."
|
||||
echo "cd and net persistent rules will no longer be autogenerated,"
|
||||
echo "see <https://wiki.archlinux.org/index.php/Udev> for details."
|
||||
echo "Errors are now logged (possibly to the console) by default."
|
||||
echo "---------------"
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
|
Loading…
Reference in a new issue