Commit 46f3d3d6 authored by philm's avatar philm

udev: fix bugs

util-linux: bump to 2.19.1
mkinitcpio: bump to 0.6.15
parent b4232151
......@@ -5,14 +5,14 @@
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=mkinitcpio
pkgver=0.6.12
pkgver=0.6.15
pkgrel=1
pkgdesc="Modular initramfs image creation utility"
arch=(any)
url="http://www.archlinux.org/"
license=('GPL')
depends=('mkinitcpio-busybox>=1.18.4' 'module-init-tools' 'util-linux-ng>=2.19' 'gen-init-cpio' 'coreutils'
'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.04' 'udev>=170' 'file' 'gzip'
depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'gen-init-cpio' 'coreutils'
'bash' 'findutils' 'sed' 'grep' 'filesystem>=2009.01-2' 'udev>=171' 'file' 'gzip'
'which')
optdepends=('xz: Use lzma or xz compression for the initramfs image'
'bzip2: Use bzip2 compression for the initramfs image'
......@@ -21,7 +21,7 @@ replaces=('mkinitrd' 'mkinitramfs' 'klibc' 'klibc-extras' 'klibc-kbd'
'klibc-module-init-tools' 'klibc-udev')
source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.gz)
backup=(etc/mkinitcpio.conf)
sha256sums=('1415259edb96e2f7fef517366ce0beb0e85ec4bf666aef2636a4d4d70b67ecd6')
sha256sums=('b7218ae51018954b0f0ad7d327204759e0934d72ee6d8c8bd1ef4ecf742bacae')
package() {
cd $srcdir/${pkgname}-${pkgver}
......
# 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"
......@@ -7,7 +7,7 @@
pkgbase="udev"
pkgname=('udev' 'udev-compat')
pkgver=171
pkgrel=1
pkgrel=2
arch=(i686 x86_64)
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
license=('GPL')
......@@ -16,17 +16,20 @@ groups=('base')
options=(!makeflags !libtool)
makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection')
source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2
80-drivers.rules
81-chakra.rules
load-modules.sh)
81-chakra.rules
static-audio-nodes-group.patch
static-nodes-permissions.patch)
md5sums=('bdf4617284be2ecac11767437417e209'
'4427855146513a4703ab5c7eb8a0156e'
'e7e70ee2953e78001553d0f9c4c3038e'
'f91fddc67609b45b244a624977c4247b')
'4f625aea95a5597afd8cdf189421f193'
'f9e50b8dfcd2215f5423ff9bc04ecf68')
build() {
cd $srcdir/$pkgbase-$pkgver
# fix https://bugs.archlinux.org/task/24362 (will be in udev-172)
patch -Np1 -i ../static-audio-nodes-group.patch
patch -Np1 -i ../static-nodes-permissions.patch
./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\
--sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system\
--disable-rule-generator
......@@ -45,12 +48,8 @@ package_udev() {
cd $srcdir/$pkgbase-$pkgver
make DESTDIR=${pkgdir} install
# 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-chakra.rules $pkgdir/lib/udev/rules.d/81-chakra.rules
# install our module loading subsystem
install -D -m755 $srcdir/load-modules.sh $pkgdir/lib/udev/load-modules.sh
# create framebuffer blacklist
mkdir -p $pkgdir/etc/modprobe.d/
......
#! /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
blacklist aty128fb
blacklist atyfb
blacklist cirrusfb
blacklist cyber2000fb
blacklist i810fb
blacklist kyrofb
blacklist neofb
blacklist nvidiafb
blacklist pm2fb
blacklist radeonfb
blacklist rivafb
blacklist s3fb
blacklist savagefb
blacklist sisfb
blacklist sstfb
blacklist tdfxfb
blacklist tridentfb
blacklist udlfb
blacklist uvesafb
blacklist viafb
blacklist vmlfb
blacklist vt8623fb
#!/bin/bash
# Implement blacklisting for udev-loaded modules
[ $# -ne 1 ] && exit 1
. /etc/rc.conf
# grab modules from rc.conf
BLACKLIST="${MOD_BLACKLIST[@]}"
MODPROBE="/sbin/modprobe"
LOGGER="/usr/bin/logger"
RESOLVEALIAS="${MODPROBE} --resolve-alias"
USEBLACKLIST="--use-blacklist"
if [ -f /proc/cmdline ]; then
for cmd in $(cat /proc/cmdline); do
case $cmd in
disablemodules=*) eval $cmd ;;
load_modules=off) exit ;;
esac
done
#parse cmdline entries of the form "disablemodules=x,y,z"
if [ -n "$disablemodules" ]; then
BLACKLIST="$BLACKLIST $(echo $disablemodules | sed 's|,| |g')"
fi
fi
#MODULES entries in rc.conf that begin with ! are blacklisted
for mod in ${MODULES[@]}; do
if [ "${mod}" != "${mod#!}" ]; then
BLACKLIST="$BLACKLIST ${mod#!}"
fi
done
if [ "$MOD_AUTOLOAD" = "yes" -o "$MOD_AUTOLOAD" = "YES" ]; then
if [ -n "${BLACKLIST}" ]; then
# If an alias name is on the blacklist, load no modules for this device
if echo "${BLACKLIST}" | /bin/grep -q -e " $1 " -e "^$1 " -e " $1\$"; then
$LOGGER -p info -t "$(basename $0)" "Not loading module alias '$1' because it is blacklisted"
exit
fi
#sanitize the blacklist
BLACKLIST="$(echo "$BLACKLIST" | sed -e 's|-|_|g')"
# Try to find all modules for the alias
mods=$($RESOLVEALIAS $1)
# If no modules could be found, try if the alias name is a module name
# In that case, omit the --use-blacklist parameter to imitate normal modprobe behaviour
[ -z "${mods}" ] && $MODPROBE -qni $1 && mods="$1" && USEBLACKLIST=""
[ -z "${mods}" ] && $LOGGER -p local0.debug -t "$(basename $0)" "'$1' is not a valid module or alias name"
for mod in ${mods}; do
# Find the module and all its dependencies
deps="$($MODPROBE -i --show-depends ${mod})"
[ $? -ne 0 ] && continue
#sanitize the module names
deps="$(echo "$deps" | sed \
-e "s#^insmod /lib.*/\(.*\)\.ko.*#\1#g" \
-e 's|-|_|g')"
# If the module or any of its dependencies is blacklisted, don't load it
for dep in $deps; do
if echo "${BLACKLIST}" | /bin/grep -q -e " ${dep} " -e "^${dep} " -e " ${dep}\$"; then
if [ "${dep}" = "${mod}" ]; then
$LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because it is blacklisted"
else
$LOGGER -p local0.info -t "$(basename $0)" "Not loading module '${mod}' for alias '$1' because its dependency '${dep}' is blacklisted"
fi
continue 2
fi
done
# modprobe usually uses the "blacklist" statements from modprobe.conf only to blacklist all aliases
# of a module, but not the module itself. We use --use-blacklist here so that modprobe also blacklists
# module names if we resolved alias names manually above
$MODPROBE $USEBLACKLIST ${mod}
done
else
$MODPROBE $USEBLACKLIST $1
fi
fi
# vim: set et ts=4:
......@@ -4,43 +4,38 @@
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=util-linux-ng
pkgver=2.19
pkgname=util-linux
pkgver=2.19.1
pkgrel=1
pkgdesc="Miscellaneous system utilities for Linux"
url="http://userweb.kernel.org/~kzak/util-linux-ng/"
arch=('i686' 'x86_64')
groups=('base')
depends=('bash' 'ncurses>=5.7' 'zlib' 'filesystem')
replaces=('linux32' 'util-linux')
conflicts=('linux32' 'util-linux' 'e2fsprogs<1.41.8-2')
provides=('linux32' 'util-linux')
replaces=('linux32' 'util-linux-ng')
conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
provides=('linux32' "util-linux-ng=${pkgver}")
license=('GPL2')
options=('!libtool')
source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/util-linux-${pkgver}.tar.bz2)
source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v2.19/${pkgname}-${pkgver}.tar.bz2
mount-segfault-2.19.1.patch)
optdepends=('perl: for chkdupexe support')
install=util-linux-ng.install
md5sums=('590ca71aad0b254e2631d84401f28255')
md5sums=('3eab06f05163dfa65479c44e5231932c'
'3247b52f0e4b8044f23f2f7218e2fdea')
build() {
cd "${srcdir}/util-linux-${pkgver}"
cd "${srcdir}/${pkgname}-${pkgver}"
# fix https://bugs.archlinux.org/task/24261
patch -Np1 -i ../mount-segfault-2.19.1.patch
# hardware clock
sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i hwclock/hwclock.c
autoreconf
automake
./configure --enable-arch --enable-write --enable-raw --disable-wall --enable-rdev --enable-partx
make HAVE_SLN=yes ADD_RAW=yes
./configure --enable-arch --enable-write --enable-raw --disable-wall --enable-partx
make
}
package() {
cd "${srcdir}/util-linux-${pkgver}"
mkdir -p "${pkgdir}/var/lib/hwclock"
make HAVE_SLN=yes ADD_RAW=yes DESTDIR="${pkgdir}" install
# remove files
rm -f "${pkgdir}/bin/kill"
rm -f "${pkgdir}/usr/share/man/man1/kill.1"
rm -f "${pkgdir}/usr/share/man/man5/nfs.5"
rm -f "${pkgdir}/usr/share/info/dir"
cd "${srcdir}/${pkgname}-${pkgver}"
install -dm755 "${pkgdir}/var/lib/hwclock"
make DESTDIR="${pkgdir}" install
}
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