summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2010-03-15 00:21:50 +0000
committerNed Ludd <solar@gentoo.org>2010-03-15 00:21:50 +0000
commit90594537eb9683a2ff9d1f7d49ddec52e13a6156 (patch)
tree0aace3edaccd8bbecab6ad1911bb572cabe94c40 /sys-apps/busybox
parentVersion bump for ferringb. (diff)
downloadhistorical-90594537eb9683a2ff9d1f7d49ddec52e13a6156.tar.gz
historical-90594537eb9683a2ff9d1f7d49ddec52e13a6156.tar.bz2
historical-90594537eb9683a2ff9d1f7d49ddec52e13a6156.zip
import mdev.conf support scripts from Aline Linux 1.10.0
Package-Manager: portage-2.1.8.2/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/busybox')
-rw-r--r--sys-apps/busybox/ChangeLog7
-rw-r--r--sys-apps/busybox/Manifest20
-rw-r--r--sys-apps/busybox/busybox-1.16.0.ebuild13
-rw-r--r--sys-apps/busybox/files/mdev/dvbdev18
-rw-r--r--sys-apps/busybox/files/mdev/ide_links23
-rw-r--r--sys-apps/busybox/files/mdev/usbdev62
-rw-r--r--sys-apps/busybox/files/mdev/usbdisk_link34
-rw-r--r--sys-apps/busybox/metadata.xml2
8 files changed, 160 insertions, 19 deletions
diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog
index f39e4cb87d53..8969acc2791e 100644
--- a/sys-apps/busybox/ChangeLog
+++ b/sys-apps/busybox/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/busybox
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.244 2010/03/14 22:29:12 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.245 2010/03/15 00:21:50 solar Exp $
+
+ 15 Mar 2010; <solar@gentoo.org> busybox-1.16.0.ebuild, +files/mdev/dvbdev,
+ +files/mdev/ide_links, +files/mdev/usbdev, +files/mdev/usbdisk_link,
+ metadata.xml:
+ import mdev.conf support scripts from Aline Linux 1.10.0
14 Mar 2010; Markus Meier <maekke@gentoo.org> busybox-1.15.3.ebuild:
amd64 stable, bug #305619
diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest
index 033287dc20f0..431e445e8c59 100644
--- a/sys-apps/busybox/Manifest
+++ b/sys-apps/busybox/Manifest
@@ -1,10 +1,11 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX busybox-1.11.1-bb.patch 1059 RMD160 819a97b81f51314d400c86748d933e3cb1f1fcd3 SHA1 31a51bb6b7a5d1bfe32e54945eb71aac857e10ce SHA256 50d2f574093e52793dd5a08f35b275c2dddca8a76ff35e13e214dd6cd3654098
AUX busybox-1.15.2-bb.patch 956 RMD160 13d7f8e8fdb35245de4072ff1e55470b2c58f6db SHA1 ab66f70245a399a1a21af0e5598fd2fae809d935 SHA256 482de22b18764e8e0b264bb00d03accf9b821666b64f1a423068b10b30b4893c
AUX busybox-1.16.0-bb.patch 1124 RMD160 c59e37bd32f9a05d78fca4599dcfdbc88d373c95 SHA1 8028db3af9fcbfa57d3af022e80074836766b7d9 SHA256 c938fd454dcafcf6a9d725104d78dd52fd1f5b9a98507ff8023e9b7419b103ce
AUX mdev-start.sh 2758 RMD160 c177aac4940b177bd857bc98ff2ac031e0489bbc SHA1 5a5b95da36c489cd12820513434a7a17ac3bffd1 SHA256 9904263c8dfe2b8c3e968a9b4245fa0c162a2413110c037cdd797ac3773587d7
+AUX mdev/dvbdev 356 RMD160 db7f546ae6e47b59cca9712f1e218cdbc3985c78 SHA1 993c0ab79fa41912f84db95e7dd09aa0965aa8c7 SHA256 ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de
+AUX mdev/ide_links 440 RMD160 5d133f27d1ab4db5f6f1b5063837b033f47b71ae SHA1 725deaf4c35e46dec89fc35f221c4c52b2542129 SHA256 3fccc9ee437e3dcc8ac73bfe3713334a7156a112fe442e052fff4f26ff0f6a88
+AUX mdev/usbdev 1624 RMD160 a448558f058566223072c993cb4ae52f9aa43da3 SHA1 4d1a7a19e58549416dd3bde4fcf2f584adc4feb7 SHA256 113ecaa722fa1f4e1c76489e2a7b24099778615a5bccd443aa9cbab28c6d05d0
+AUX mdev/usbdisk_link 984 RMD160 9b86d85f5f27f03f894a062c9f00d3583c4db3ae SHA1 690290b25fa1b90f6d9d7b8947a55746920991a4 SHA256 4957f6991e0cb988b263b5276b582f1757deecad19cddebe3c615b381df9f858
DIST busybox-1.14.2.tar.bz2 2199685 RMD160 be138b5aa50f2c60fea75fc44ab3375c95d8f10d SHA1 b673e79ea0927e1ec14017b1e12b159c799f6feb SHA256 3565a52329e179d525127c4f80c45e76de3dbe45303151bd7f4b7d4d9ab6e4d2
DIST busybox-1.15.2.tar.bz2 1987590 RMD160 8f1b2e5ed64d440681042d44f7bb629e33b6df10 SHA1 2f396a4cb35db438a9b4af43df6224f343b8a7ae SHA256 2dab1d6eb34e52f10fb2c4b468bfbc55dab6b73c982b58567371005c9a0dd9e1
DIST busybox-1.15.3.tar.bz2 1987727 RMD160 1f1bd7c25e1afe2465404203897f5b25cf499dfb SHA1 a05a692840ba1cd2bbe21af196f28809694c47e4 SHA256 d74020ad2cc5a4dcc5109c44dbd0e22582d6ce42954b0f1ff29763c8c0ff03cb
@@ -12,13 +13,6 @@ DIST busybox-1.16.0.tar.bz2 2007183 RMD160 48944e58be18e5da46b7856b46717bc891dbb
EBUILD busybox-1.14.2.ebuild 7239 RMD160 eb404dce401fcc8fea6258332b1606f6a52af48e SHA1 4c920560864b47be9e874ba67e4da415ac2e2e24 SHA256 db98e97b2fd1ebb96cb86ce96f5bd7e1bcece395513adde6bfe77a976adfcd95
EBUILD busybox-1.15.2.ebuild 7333 RMD160 84a878941ca550e0aac9192720496ef62077bbeb SHA1 2cb36b66b2d2e17db05b2e51ad6264037a5c72b9 SHA256 0ab90bbe51652e165d8e871c7b4157f960fa88fa3d6c40ed630484f63aab1a58
EBUILD busybox-1.15.3.ebuild 7348 RMD160 86bb85c061388f3088432a5ff0388d14d6d62b16 SHA1 b98a6c5967accbb79a22f98ce0ae28b76dd73868 SHA256 8b807e7549f2de352670f60d043f9c1d89e3f7d76c1a51ee50e8d2108125834b
-EBUILD busybox-1.16.0.ebuild 7654 RMD160 2984a9d9eb6bf126c7fc6cbc3e02f6fb9f4d19b7 SHA1 f25c8af368e46c8a3c232611b0a95141e9c35a3a SHA256 6fa7756ef2fe71d6034090d3308e0efbf508364537d18a05221b1acda0da7415
-MISC ChangeLog 35791 RMD160 a302e7a606348ec8cb9afe82b93aac85e3e1005a SHA1 628df340ee54d925f815f1c8d84c6b0d5f5a0197 SHA256 84a139cad8f57bf931896a5dc9304039f7ac93979417ea2f7d8ee706599e241a
-MISC metadata.xml 350 RMD160 ba59d910a93e9b94964e6ca1dd30cfb465f73f1b SHA1 6a228b24eab02f1dac14b6d3d5452ea3360694b7 SHA256 944199b1d950e1af56eadcf3c5adcb70f7386144a4fd846652ab7071202fed56
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.14 (GNU/Linux)
-
-iEYEARECAAYFAkudYwEACgkQkKaRLQcq0GIE0ACgkPtviNezpoUlu/a4gKHTaSTL
-B4gAnjPJ9f/E3zL0H67WV4p/hgW6sR8A
-=4Esa
------END PGP SIGNATURE-----
+EBUILD busybox-1.16.0.ebuild 7740 RMD160 adae460b58c42ae024086eab149bff04b3e264a2 SHA1 ab5284ada29aa217d8aa39bc6f97b19677c4c4d8 SHA256 8bb1423c8d0a026876bc4e11428ba36aa78297cb52d0135c238d9648acc07b3c
+MISC ChangeLog 36014 RMD160 9c640a7a55c072f3db4b9714a95a567bb4733c1c SHA1 169aae66043bb5f79e71b2348a8007827186ed39 SHA256 e2125197eb56f47eb7418a7d37141f6274fbb22418f82949c0c6724131f95580
+MISC metadata.xml 368 RMD160 2facee7f44b7469c85383961c2dd4338ea6fffcb SHA1 eae78f6b5eb3a21aeae692f9a7420ab536be3739 SHA256 033b1cb2abe759f73b184ce43b5c791454716638090767c2bc70cc52b4ef187f
diff --git a/sys-apps/busybox/busybox-1.16.0.ebuild b/sys-apps/busybox/busybox-1.16.0.ebuild
index 7b2a03185011..cd3139bf1f31 100644
--- a/sys-apps/busybox/busybox-1.16.0.ebuild
+++ b/sys-apps/busybox/busybox-1.16.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.16.0.ebuild,v 1.2 2010/03/14 21:49:33 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.16.0.ebuild,v 1.3 2010/03/15 00:21:50 solar Exp $
EAPI=2
inherit eutils flag-o-matic savedconfig toolchain-funcs
@@ -200,11 +200,16 @@ src_install() {
dobin bb || die
fi
if use mdev; then
+ dodir /$(get_libdir)/mdev/
use make-symlinks || dosym /bin/bb /sbin/mdev
cp "${S}"/examples/mdev_fat.conf "${D}"/etc/mdev.conf
+
+ exeinto /$(get_libdir)/mdev/
+ doexe "${FILESDIR}"/mdev/*
+
+ insinto /$(get_libdir)/rcscripts/addons
+ doins "${FILESDIR}"/mdev-start.sh || die
fi
- insinto /$(get_libdir)/rcscripts/addons
- doins "${FILESDIR}"/mdev-start.sh || die
# bundle up the symlink files for use later
emake install || die
@@ -221,7 +226,7 @@ src_install() {
dodoc *.txt
docinto pod
dodoc *.pod
- dohtml *.html *.sgml
+ dohtml *.html
cd ../examples || die
docinto examples
diff --git a/sys-apps/busybox/files/mdev/dvbdev b/sys-apps/busybox/files/mdev/dvbdev
new file mode 100644
index 000000000000..f0186c176cd8
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/dvbdev
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# MDEV=dvb0.demux1 -> ADAPTER=dvb0 -> N=0
+ADAPTER=${MDEV%.*}
+N=${ADAPTER#dvb}
+# MDEV=dvb0.demux1 -> DEVB_DEV=demux1
+DVB_DEV=${MDEV#*.}
+
+case "$ACTION" in
+ add|"")
+ mkdir -p dvb/adapter${N}
+ mv ${MDEV} dvb/adapter${N}/${DVB_DEV}
+ ;;
+ remove)
+ rm -f dvb/adapter${N}/${DVB_DEV}
+ rmdir dvb/adapter${N} 2>/dev/null
+ rmdir dvb/ 2>/dev/null
+esac
diff --git a/sys-apps/busybox/files/mdev/ide_links b/sys-apps/busybox/files/mdev/ide_links
new file mode 100644
index 000000000000..be0c95aa9c0e
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/ide_links
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+[ -f /proc/ide/$MDEV/media ] || exit
+
+media=`cat /proc/ide/$MDEV/media`
+for i in $media $media[0-9]* ; do
+ if [ "`readlink $i 2>/dev/null`" = $MDEV ] ; then
+ LINK=$i
+ break
+ fi
+done
+
+# link exist, remove if necessary and exit
+if [ "$LINK" ] ; then
+ [ "$ACTION" = remove ] && rm $LINK
+ exit
+fi
+
+# create a link
+num=`ls $media[0-9]* 2>/dev/null | wc -l`
+ln -sf $MDEV "$media`echo $num`"
+[ -e "$media" ] || ln -sf $MDEV "$media"
+
diff --git a/sys-apps/busybox/files/mdev/usbdev b/sys-apps/busybox/files/mdev/usbdev
new file mode 100644
index 000000000000..ea5b9155736c
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usbdev
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# script is buggy; until patched just do exit 0
+#exit 0
+
+# add zeros to device or bus
+add_zeros () {
+ case "$(echo $1 | wc -L)" in
+ 1) echo "00$1" ;;
+ 2) echo "0$1" ;;
+ *) echo "$1"
+ esac
+ exit 0
+}
+
+
+# bus and device dirs in /sys
+USB_PATH=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).[0-9]/usb\1/')
+USB_PATH=$(find /sys/devices -type d -name "$USB_PATH")
+USB_DEV_DIR=$(echo $MDEV | sed -e 's/usbdev\([0-9]\).\([0-9]\)/\1-\2/')
+
+# dir names in /dev
+BUS=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev\([0-9]\).[0-9]/\1/'))
+USB_DEV=$(add_zeros $(echo $MDEV | sed -e 's/^usbdev[0-9].\([0-9]\)/\1/'))
+
+
+# try to load the proper driver for usb devices
+case "$ACTION" in
+ add|"")
+ # load usb bus driver
+ for i in $USB_PATH/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ # load usb device driver if existent
+ if [ -d $USB_PATH/$USB_DEV_DIR ]; then
+ for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
+ modprobe `cat $i` 2>/dev/null
+ done
+ fi
+ # move usb device file
+ mkdir -p bus/usb/$BUS
+ mv $MDEV bus/usb/$BUS/$USB_DEV
+ ;;
+ remove)
+ # unload device driver, if device dir is existent
+ if [ -d $USB_PATH/$USB_DEV_DIR ]; then
+ for i in $USB_PATH/$USB_DEV_DIR/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+ fi
+ # unload usb bus driver. Does this make sense?
+ # what happens, if two usb devices are plugged in
+ # and one is removed?
+ for i in $USB_PATH/*/modalias ; do
+ modprobe -r `cat $i` 2>/dev/null
+ done
+ # remove device file and possible empty dirs
+ rm -f bus/usb/$BUS/$USB_DEV
+ rmdir bus/usb/$BUS/ 2>/dev/null
+ rmdir bus/usb/ 2>/dev/null
+ rmdir bus/ 2>/dev/null
+esac
diff --git a/sys-apps/busybox/files/mdev/usbdisk_link b/sys-apps/busybox/files/mdev/usbdisk_link
new file mode 100644
index 000000000000..750242bb5cfc
--- /dev/null
+++ b/sys-apps/busybox/files/mdev/usbdisk_link
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars.
+
+current=$(readlink usbdisk)
+
+if [ "$current" = "$MDEV" ] && [ "$ACTION" = "remove" ]; then
+ rm -f usbdisk usba1
+fi
+[ -n "$current" ] && exit
+
+if [ -e /sys/block/$MDEV ]; then
+ SYSDEV=$(readlink -f /sys/block/$MDEV/device)
+ # if /sys device path contains '/usb[0-9]' then we assume its usb
+ # also, if its an usb without partitions we require FAT
+ if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ # do not create link if there is not FAT
+ dd if=/dev/$MDEV bs=512 count=1 2>/dev/null | strings | grep FAT >/dev/null || exit 0
+
+ ln -sf $MDEV usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf $MDEV usba1
+ fi
+
+elif [ -e /sys/block/*/$MDEV ] ; then
+ PARENT=$(dirname /sys/block/*/$MDEV)
+ SYSDEV=$(readlink -f $PARENT/device)
+ if [ "${SYSDEV##*/usb[0-9]}" != "$SYSDEV" ]; then
+ ln -sf $MDEV usbdisk
+ # keep this for compat. people have it in fstab
+ ln -sf $MDEV usba1
+ fi
+fi
+
diff --git a/sys-apps/busybox/metadata.xml b/sys-apps/busybox/metadata.xml
index 53c8e5b1cd10..38a4c15a0b94 100644
--- a/sys-apps/busybox/metadata.xml
+++ b/sys-apps/busybox/metadata.xml
@@ -4,6 +4,6 @@
<herd>embedded</herd>
<use>
<flag name="make-symlinks">Create all the appropriate symlinks in /bin and /sbin.</flag>
-<flag name="mdev">Create the appropriate symlink in /sbin and install mdev.conf</flag>
+<flag name="mdev">Create the appropriate symlink in /sbin and install mdev.conf and support files</flag>
</use>
</pkgmetadata>