Date: Saturday, January 7, 2012 @ 11:44:08 Author: tomegun Revision: 146263
Prepare the PKGBUILD for -176, tested with udev from git Main points: * devtmpfs is now required, drop legacy stuff that is no longer needed * add some more compat device nodes to udev-compat Modified: udev/trunk/PKGBUILD udev/trunk/udev.install --------------+ PKGBUILD | 78 ++++++++++++++++++++++++++++++--------------------------- udev.install | 31 ++++++++++++---------- 2 files changed, 59 insertions(+), 50 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2012-01-07 11:52:48 UTC (rev 146262) +++ PKGBUILD 2012-01-07 16:44:08 UTC (rev 146263) @@ -6,7 +6,7 @@ pkgbase="udev" pkgname=('udev' 'udev-compat') -pkgver=175 +pkgver=176 pkgrel=1 arch=(i686 x86_64) url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" @@ -14,18 +14,19 @@ groups=('base') options=(!makeflags !libtool) makedepends=('gobject-introspection' 'gperf') -#source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2 -source=(http://people.freedesktop.org/~kay/udev/$pkgbase-$pkgver.tar.bz2) +source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.xz) build() { cd $srcdir/$pkgbase-$pkgver - ./configure --sysconfdir=/etc\ - --with-rootlibdir=/lib\ - --libexecdir=/lib/udev\ - --sbindir=/sbin\ - --with-systemdsystemunitdir=/lib/systemd/system\ - --disable-rule-generator\ + ./configure --prefix=/usr \ + --with-rootprefix= \ + --sysconfdir=/etc \ + --bindir=/sbin \ + --libdir=/usr/lib \ + --with-rootlibdir=/lib \ + --libexecdir=/lib \ + --with-systemdsystemunitdir=/lib/systemd/system \ --enable-udev_acl make @@ -33,7 +34,7 @@ package_udev() { pkgdesc="The userspace dev tools (udev)" - depends=('util-linux' 'libusb-compat' 'glib2' 'module-init-tools' 'pciutils') + depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils') install=udev.install backup=(etc/udev/udev.conf) conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07') @@ -43,16 +44,18 @@ make DESTDIR=${pkgdir} install # create framebuffer blacklist - mkdir -p $pkgdir/lib/modprobe.d/ + install -d -m755 ${pkgdir}/lib/modprobe.d/ for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko.gz' -exec basename {} .ko.gz \;); do echo "blacklist $mod" done | sort -u > $pkgdir/lib/modprobe.d/framebuffer_blacklist.conf # /dev/loop0 is created for convenience, to autoload the module if necessary - # may be obsoleted by https://lkml.org/lkml/2011/7/30/111 - mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0 + # this is no longer needed when util-linux-2.21 is released as /dev/loop-control + # will be used instead. In that case move this to udev-compat + install -d -m755 ${pkgdir}/lib/udev/devices/ + mknod ${pkgdir}/lib/udev/devices/loop0 b 7 0 chgrp disk ${pkgdir}/lib/udev/devices/loop0 - + # udevd moved, symlink to make life easy for restarting udevd manually ln -s /lib/udev/udevd ${pkgdir}/sbin/udevd @@ -68,30 +71,33 @@ pkgdesc="The userspace dev tools (udev) - additional rules for older kernels" depends=('udev') groups=('') - cd $srcdir/$pkgbase-$pkgver - install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d + install -d -m755 ${pkgdir}/lib/udev/rules.d install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules - # create static devices in /lib/udev/devices/ - mkdir -p ${pkgdir}/lib/udev/devices/{pts,shm} - 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 + # create static nodes to be compatible with on-demand module + # loading in the most recent kernel + # + # the list of nodes is generated from /lib/modules/`most recent kernel`/modprobe.devname + # excluding any devices not included in the LTS kernel and any entries in the + # modprobe.devname file of the LTS kernel (if it exists). - 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 + install -d -m755 ${pkgdir}/lib/udev/devices + cd ${pkgdir}/lib/udev/devices - # these static devices are created for convenience, to autoload the modules if necessary - # /dev/net/tun - mkdir ${pkgdir}/lib/udev/devices/net - 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 - # /dev/ppp - mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0 + install -d -m755 net + mknod net/tun c 10 200 + mknod ppp c 108 0 +# mknod loop-control c 10 237 -- does not exist in old kernels + mknod uinput c 10 223 + install -d -m755 mapper + mknod mapper/control c 10 236 + install -d -m755 snd + mknod snd/timer c 116 33 + mknod snd/seq c 116 1 + mknod btrfs-control c 10 234 + mknod autofs c 10 235 + mknod fuse c 10 229 + install -d -m755 cpu + mknod cpu/microcode c 10 184 + } -md5sums=('2fc9c1efcbde98e3d73ffee7a77aea47') Modified: udev.install =================================================================== --- udev.install 2012-01-07 11:52:48 UTC (rev 146262) +++ udev.install 2012-01-07 16:44:08 UTC (rev 146263) @@ -2,7 +2,7 @@ # arg 2: the old package version post_upgrade() { - if [ "$(vercmp $2 174)" -lt 0 ]; then + if [ "$(vercmp $2 175)" -lt 0 ]; then echo "ATTENTION UDEV:" echo "----------" if [ "$(vercmp $2 168)" -lt 0 ]; then @@ -33,8 +33,6 @@ echo " --" fi if [ "$(vercmp $2 172)" -lt 0 ]; then - echo "Support for non-devtmpfs self-compiled kernels have been moved to udev-compat." - echo " --" echo "Blacklisting of framebuffer devices has moved from /etc/modprobe.d to" echo "/lib/modprobe.d. Any customizations shoud be done to the file in /etc, as it" echo "takes precedence." @@ -46,17 +44,22 @@ echo "by X." echo " --" fi - echo "We now use upstream rules for assigning devices to the 'disk', 'optical'," - echo "'scanner' and 'video' groups. Beware of any changes." - echo " --" - echo "We no longer create symlinks from /dev/<dev> to /dev/<dev>0." - echo " --" - echo "For security reasons, we no longer add devices to the 'storage' group. Use" - echo "udisks and friends, or add custom rules to /etc/udev.d/rules/, if you want" - echo "this functionality back." - echo " --" - echo "We no longer create the static nodes on install needed for an initrd-less and" - echo "devtmpfs-less boot, this only affects fresh installs." + if [ "$(vercmp $2 174)" -lt 0 ]; then + echo "We now use upstream rules for assigning devices to the 'disk', 'optical'," + echo "'scanner' and 'video' groups. Beware of any changes." + echo " --" + echo "We no longer create symlinks from /dev/<dev> to /dev/<dev>0." + echo " --" + echo "For security reasons, we no longer add devices to the 'storage' group. Use" + echo "udisks and friends, or add custom rules to /etc/udev.d/rules/, if you want" + echo "this functionality back." + echo " --" + echo "We no longer create the static nodes on install needed for an initrd-less boot" + echo "where devtmpfs is not mounted by the kernel, this only affects fresh installs." + echo " --" + fi + echo "devtmpfs support is now a hard requirement. Users of the official Arch kernels" + echo "have this enabled." echo "---------------" fi }