diff options
-rw-r--r-- | testing/mdev-like-a-boss/00-update-to-git-a5682fe.patch | 38 | ||||
-rw-r--r-- | testing/mdev-like-a-boss/0001-adjust-sample-conf-for-alpine-packaging.patch | 55 | ||||
-rw-r--r-- | testing/mdev-like-a-boss/APKBUILD | 75 | ||||
-rw-r--r-- | testing/mdev-like-a-boss/README.alpine | 12 |
4 files changed, 180 insertions, 0 deletions
diff --git a/testing/mdev-like-a-boss/00-update-to-git-a5682fe.patch b/testing/mdev-like-a-boss/00-update-to-git-a5682fe.patch new file mode 100644 index 0000000000..0662e75684 --- /dev/null +++ b/testing/mdev-like-a-boss/00-update-to-git-a5682fe.patch @@ -0,0 +1,38 @@ +diff --git a/LICENSE b/LICENSE +new file mode 100644 +index 0000000..10206e3 +--- /dev/null ++++ b/LICENSE +@@ -0,0 +1,10 @@ ++Copyright (c) 2012-2015, Piotr Karbowski <piotr.karbowski@gmail.com> ++All rights reserved. ++ ++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ++ ++ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ++ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. ++ * Neither the name of the Piotr Karbowski nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. ++ ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +diff --git a/README.rst b/README.rst +index 56f420b..1a055b6 100644 +--- a/README.rst ++++ b/README.rst +@@ -62,3 +62,4 @@ Random notes + - Keycodes under Xorg may be different than with evdev, for example mute keycode is no longer 121 but 160. Install 'xev' and check your keycodes if you remap or bind them with xmodmap. + - Mdev does not support udev's udisks and so on, Full blown desktop environments may not really like the change, you will lost your DE's automount stuff etc. But there is ``pmount`` and you can always config automount script in ``/etc/mdev.conf`` + - Unmerging udev may not be good idea, as for example chromium need libudev to compile. Better append ``sys-fs/udev -*`` to package.use and put ``sys-fs/udev-init-scripts-10`` into ``/etc/portage/profile/package.provided``. Then you can rebuild udev with all USE flags disabled and remove udev-init-scripts. ++- `lsusb` seems to run `/etc/udev/hwids.bin` to identify devices. One may need to add `udev` USE flag to the hwids package if wishes to see the device names. +diff --git a/helpers/storage-device b/helpers/storage-device +index 8c0d0ac..ecedff3 100755 +--- a/helpers/storage-device ++++ b/helpers/storage-device +@@ -94,7 +94,7 @@ drop_symlinks() { + [ -f "${storage_dir}/storage_symlink_${type}_${MDEV}" ] || continue + local target_symlink="$(cat "${storage_dir}/storage_symlink_${type}_${MDEV}" 2>/dev/null)" + [ "${target_symlink}" ] || continue +- ++ + local target_symlink_device="$(readlink "${target_symlink}")" + if [ "${target_symlink_device}" = "/dev/${MDEV}" ]; then + rm "${target_symlink}" diff --git a/testing/mdev-like-a-boss/0001-adjust-sample-conf-for-alpine-packaging.patch b/testing/mdev-like-a-boss/0001-adjust-sample-conf-for-alpine-packaging.patch new file mode 100644 index 0000000000..1e50f7cc54 --- /dev/null +++ b/testing/mdev-like-a-boss/0001-adjust-sample-conf-for-alpine-packaging.patch @@ -0,0 +1,55 @@ +From 3d1e9fa5fad1746cf9058f4ef709e0e69d9f4cf2 Mon Sep 17 00:00:00 2001 +From: Isaac Dunham <ibid.ag@gmail.com> +Date: Sun, 31 Jan 2016 20:27:13 -0800 +Subject: [PATCH] adjust sample conf for alpine packaging + +--- + mdev.conf | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/mdev.conf b/mdev.conf +index d23b083..161e5bf 100644 +--- a/mdev.conf ++++ b/mdev.conf +@@ -45,19 +45,19 @@ ttyS[0-9]* root:uucp 660 + # block devices + ram([0-9]*) root:disk 660 >rd/%1 + loop([0-9]+) root:disk 660 >loop/%1 +-sd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device +-vd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device +-hd[a-z].* root:disk 660 */opt/mdev/helpers/storage-device +-md[0-9]* root:disk 660 */opt/mdev/helpers/storage-device +-dm-[0-9]* root:disk 660 */opt/mdev/helpers/storage-device +-bcache[0-9]* root:disk 660 */opt/mdev/helpers/storage-device +-mmcblk[0-9].* root:disk 660 */opt/mdev/helpers/storage-device ++sd[a-z].* root:disk 660 */lib/mdev-like-a-boss/storage-device ++vd[a-z].* root:disk 660 */lib/mdev-like-a-boss/storage-device ++hd[a-z].* root:disk 660 */lib/mdev-like-a-boss/storage-device ++md[0-9]* root:disk 660 */lib/mdev-like-a-boss/storage-device ++dm-[0-9]* root:disk 660 */lib/mdev-like-a-boss/storage-device ++bcache[0-9]* root:disk 660 */lib/mdev-like-a-boss/storage-device ++mmcblk[0-9].* root:disk 660 */lib/mdev-like-a-boss/storage-device + sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom + fd[0-9]* root:floppy 660 + + # Run settle-nics every time new NIC appear. +-# If you don't want to auto-populate /etc/mactab with NICs, run 'settle-nis' without '--write-mactab' param. +--SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 600 @/opt/mdev/helpers/settle-nics --write-mactab ++# If you don't want to auto-populate /etc/mactab with NICs, run 'settle-nics' without '--write-mactab' param. ++-SUBSYSTEM=net;DEVPATH=.*/net/.*;.* root:root 600 @/lib/mdev-like-a-boss/settle-nics --write-mactab + + net/tun[0-9]* root:kvm 660 + net/tap[0-9]* root:root 600 +@@ -111,7 +111,7 @@ cpu([0-9]+) root:root 600 =cpu/%1/cpuid + msr([0-9]+) root:root 600 =cpu/%1/msr + + # Populate /dev/bus/usb. +-SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660 */opt/mdev/helpers/proc-bus-usb ++SUBSYSTEM=usb;DEVTYPE=usb_device;.* root:root 660 */lib/mdev-like-a-boss/proc-bus-usb + + # Catch-all other devices, Right now useful only for debuging. +-#.* root:root 660 */opt/mdev/helpers/catch-all ++#.* root:root 660 */lib/mdev-like-a-boss/catch-all +-- +2.7.0 + diff --git a/testing/mdev-like-a-boss/APKBUILD b/testing/mdev-like-a-boss/APKBUILD new file mode 100644 index 0000000000..bd4cb7b8f9 --- /dev/null +++ b/testing/mdev-like-a-boss/APKBUILD @@ -0,0 +1,75 @@ +# Contributor: Isaac Dunham <ibid.ag@gmail.com> +# Maintainer: Isaac Dunham <ibid.ag@gmail.com> +pkgname=mdev-like-a-boss +pkgver=20140928 +pkgrel=0 +pkgdesc="Extras for using mdev instead of udev" +url="https://github.com/slashbeast/mdev-like-a-boss" +arch="all" +license="custom:BSD" +depends="busybox-initscripts" +makedepends="" +install="" +subpackages="$pkgname-xorg $pkgname-doc" +provides="udev" +source="mdev-like-a-boss-$pkgver.tar.gz::https://github.com/slashbeast/mdev-like-a-boss/archive/$pkgver.tar.gz + 00-update-to-git-a5682fe.patch + 0001-adjust-sample-conf-for-alpine-packaging.patch + README.alpine + " + +_builddir="$srcdir"/mdev-like-a-boss-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" +} + +package() { + cd "$_builddir" || return 1 + mkdir -p -m 0755 \ + "$pkgdir/lib/mdev-like-a-boss" \ + "$pkgdir/usr/share/doc/mdev-like-a-boss" \ + "$pkgdir/usr/share/licenses/mdev-like-a-boss" || return 1 + cp helpers/* "$pkgdir"/lib/mdev-like-a-boss/ || return 1 + cp LICENSE "$pkgdir"/usr/share/licenses/mdev-like-a-boss/ || return 1 + cp -R keymaps/ "$pkgdir"/lib/mdev-like-a-boss/ || return 1 + cp README.rst TODO mdev.conf "$pkgdir"/usr/share/doc/mdev-like-a-boss \ + || return 1 + cp "$srcdir"/README.alpine "$pkgdir"/usr/share/doc/mdev-like-a-boss \ + || return 1 +} + +xorg() { + # try to suppress a package that setup-xorg-base adds; + # the evdev driver needs udev + provides="xf86-input-evdev" + # Should this drag in synaptics as well? + depends="xf86-input-mouse xf86-input-keyboard" + pkgdesc="$pkgdesc (extras for udev-less xorg)" + install_if="$pkgname=$pkgver-r$pkgrel xorg-server" + cd "$_builddir" || return 1 + mkdir -p -m 0755 "$subpkgdir/usr/share/X11/" && \ + cp -R xorg.conf.d/ "$subpkgdir/usr/share/X11/" || return 1 +} + +md5sums="4ad1e0bfc42345fc98eef7608235ca19 mdev-like-a-boss-20140928.tar.gz +1fbc8687351b24031e220ca1049ff058 00-update-to-git-a5682fe.patch +5fc798745e270dced84585abdc3d147f 0001-adjust-sample-conf-for-alpine-packaging.patch +10ae564fb545d267da1df672f96871b4 README.alpine" +sha256sums="b5b1d9f4ea60c788883e9eff6889cb3d330bc0c2cfdeeb583b2fed7642339a25 mdev-like-a-boss-20140928.tar.gz +1860b7da927b5f03cde68225adfa06e6c24804c70595a06b903e1c78fce44fb2 00-update-to-git-a5682fe.patch +f35d2df28e37f2618c3310197bc9649108fed15c04057e3e9cd4be26228030e7 0001-adjust-sample-conf-for-alpine-packaging.patch +1d2a2b2b00946466aef3acd5f180e3685ca56575a4be0ba4154cae6d8e14acbb README.alpine" +sha512sums="c8405c03bab4d80fd5a7495e6bb09113cda1eab687ef0dddf758472ef30f72252275623966d107cf2e00b15c6a3313fb1a8bba1e46b8b6e28a06c9fe75236efb mdev-like-a-boss-20140928.tar.gz +782c0795ee60050d03a0c92ceff94b48bd07f2ce73f1629151842f4462978688c0358fed314cf8b145d572c6572de0ce43aff6f0ee7b77026b4c14d3ef739280 00-update-to-git-a5682fe.patch +9ad565ea1a1bb77fb6f66fc3609770bc467f9e13a35fb8ae68915a9735d2ee9c769653fcaedae57f45be3245d32c078061ef4f1310a03c48458c2ff739f84d38 0001-adjust-sample-conf-for-alpine-packaging.patch +de8be8ee2330f3e89250021cbd4329119ba2445df506cecac3908f64d3b9dba4cffbc6a202ebe5f4902db45fa58cb0bed7a12c1fc43be6fa002611a047c109da README.alpine" diff --git a/testing/mdev-like-a-boss/README.alpine b/testing/mdev-like-a-boss/README.alpine new file mode 100644 index 0000000000..c18e1bfacb --- /dev/null +++ b/testing/mdev-like-a-boss/README.alpine @@ -0,0 +1,12 @@ +This package was originally written for Gentoo; under Alpine, the documentation +is of limited usefulness: +- the helpers are installed in /lib/mdev-like-a-boss instead of /opt/mdev/helpers +- mdev.conf is not installed in /etc, so the helpers aren't used. + (Refer to /usr/share/doc/mdev-like-a-boss/mdev.conf if you want to use them) + +The 'keymaps' in /lib/mdev-like-a-boss/keymaps are short scripts that can +be run from a custom boot-time script; select the right one for your computer. + +Probably the most useful part is the mdev-like-a-boss-xorg package; it will +help get X running without udev. + |