summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey D2015-07-05 08:55:49 +0300
committerAlexey D2015-07-05 08:55:49 +0300
commitdb3143e8c2f07a9bdc21a26ed41333cb45c4b6f4 (patch)
treeae6c3fa35018672cdd22d0519bf1df6b40512b04
downloadaur-db3143e8c2f07a9bdc21a26ed41333cb45c4b6f4.tar.gz
initial version
-rw-r--r--.SRCINFO51
-rw-r--r--80-net-name-slot.rules12
-rw-r--r--PKGBUILD92
-rwxr-xr-xeudev-git.install74
-rwxr-xr-xinitcpio_hooks20
-rwxr-xr-xinitcpio_install27
6 files changed, 276 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6bb5a2670b7f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,51 @@
+pkgbase = eudev-git
+ pkgdesc = The userspace dev tools (udev) forked by Gentoo
+ pkgver = 20150211
+ pkgrel = 1
+ url = https://github.com/gentoo/eudev
+ install = eudev-git.install
+ arch = i686
+ arch = x86_64
+ groups = base
+ license = GPL
+ makedepends = git
+ makedepends = gobject-introspection
+ makedepends = gperf
+ makedepends = libxslt
+ makedepends = docbook-xsl
+ depends = util-linux
+ depends = glib2
+ depends = kmod
+ depends = hwids
+ depends = bash
+ provides = eudev
+ conflicts = eudev
+ conflicts = udev
+ conflicts = systemd
+ conflicts = libsystemd
+ conflicts = systemd-tools
+ replaces = eudev
+ replaces = udev
+ replaces = systemd
+ replaces = libsystemd
+ replaces = systemd-tools
+ options = !makeflags
+ options = !libtool
+ backup = etc/udev/udev.conf
+ backup = etc/udev/rules.d/80-net-name-slot.rules
+ source = git://github.com/gentoo/eudev.git
+ source = initcpio_hooks
+ source = initcpio_install
+ source = 80-net-name-slot.rules
+ md5sums = SKIP
+ md5sums = e99e9189aa2f6084ac28b8ddf605aeb8
+ md5sums = d3a7b1d77e53d401ed37827ad297846a
+ md5sums = d83a59d647b511b815ee0e8c85dcd54a
+
+pkgname = eudev-git
+ provides = eudev
+ provides = udev=
+ provides = systemd=
+ provides = libsystemd=
+ provides = systemd-tools=
+
diff --git a/80-net-name-slot.rules b/80-net-name-slot.rules
new file mode 100644
index 000000000000..fdb87a82dee1
--- /dev/null
+++ b/80-net-name-slot.rules
@@ -0,0 +1,12 @@
+ACTION!="add", GOTO="net_name_slot_end"
+SUBSYSTEM!="net", GOTO="net_name_slot_end"
+NAME!="", GOTO="net_name_slot_end"
+
+IMPORT{cmdline}="net.ifnames"
+ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
+
+#NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
+#NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
+#NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
+
+LABEL="net_name_slot_end"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6ec7515ccb47
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# Maintainer: Alexey D. <lq07829icatm@rambler.ru>
+# Contributor: Ivailo Monev <xakepa10@gmail.com>
+pkgname='eudev-git'
+pkgdesc="The userspace dev tools (udev) forked by Gentoo"
+pkgver=20150211
+pkgrel=1
+provides=('eudev')
+replaces=('eudev' 'udev' 'systemd' 'libsystemd' 'systemd-tools')
+conflicts=('eudev' 'udev' 'systemd' 'libsystemd' 'systemd-tools')
+groups=('base')
+arch=('i686' 'x86_64')
+url="https://github.com/gentoo/eudev"
+license=('GPL')
+depends=('util-linux' 'glib2' 'kmod' 'hwids' 'bash')
+makedepends=('git' 'gobject-introspection' 'gperf' 'libxslt' 'docbook-xsl')
+options=(!makeflags !libtool)
+install="${pkgname}.install"
+backup=('etc/udev/udev.conf' 'etc/udev/rules.d/80-net-name-slot.rules')
+source=('git://github.com/gentoo/eudev.git'
+ 'initcpio_hooks'
+ 'initcpio_install'
+ '80-net-name-slot.rules')
+md5sums=('SKIP'
+ 'e99e9189aa2f6084ac28b8ddf605aeb8'
+ 'd3a7b1d77e53d401ed37827ad297846a'
+ 'd83a59d647b511b815ee0e8c85dcd54a')
+_gitname="eudev"
+
+pkgver()
+{
+ cd "${srcdir}/${_gitname}"
+
+ # Date of last commit
+ git log -1 --format="%ci" HEAD | cut -d\ -f1 | tr -d '-'
+}
+
+build() {
+ cd "${srcdir}/${_gitname}"
+
+ if [ -f "Makefile" ];then
+ msg2 "Cleaning up..."
+ make clean
+ fi
+
+ # Temporary workaround for bug #87
+ #sed /"#include <linux\/fcntl.h>"/d -i src/*/*.c
+
+ msg2 "Configuring sources..."
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --with-rootprefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --sbindir=/usr/bin \
+ --enable-gudev \
+ --enable-introspection
+
+ msg2 "Compiling..."
+ make
+}
+
+
+package() {
+ cd "${srcdir}/${_gitname}"
+ make DESTDIR="${pkgdir}" install
+
+ # Install the mkinitpcio hook
+ install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev"
+ install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev"
+
+ # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
+ for i in "${pkgdir}/usr/lib/udev/rules.d/"*.rules; do
+ sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
+ s#GROUP="tape"#GROUP="storage"#g;
+ s#GROUP="cdrom"#GROUP="optical"#g' "${i}"
+ done
+
+ # input group is not used in Arch Linux at this moment
+ sed '/GROUP="input"/d' -i "${pkgdir}/usr/lib/udev/rules.d/50-udev-default.rules"
+
+ # Make new interface naming policy disabled by default
+ rm -f "${pkgdir}/usr/lib/udev/rules.d/80-net-name-slot.rules"
+ install -Dm644 "${srcdir}/80-net-name-slot.rules" "${pkgdir}/etc/udev/rules.d/80-net-name-slot.rules"
+
+ # Getting udev version
+ udevver=$(grep UDEV_VERSION configure.ac | egrep -o "[0-9]{3}")
+ provides+=("udev=$udevver")
+ provides+=("systemd=$udevver")
+ provides+=("libsystemd=$udevver")
+ provides+=("systemd-tools=$udevver")
+}
+
diff --git a/eudev-git.install b/eudev-git.install
new file mode 100755
index 000000000000..d54362973835
--- /dev/null
+++ b/eudev-git.install
@@ -0,0 +1,74 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+netdev_warn() {
+ echo " * Now eudev supports predictable network interface names."
+ echo " * You can enable it by uncommenting lines into"
+ echo " * /etc/udev/rules.d/80-net-name-slot.rules"
+ echo
+ echo " * See http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
+}
+
+post_upgrade() {
+ if [ "$(vercmp $2 181-3)" -lt 0 ]; then
+ echo "udev changes:"
+ if [ "$(vercmp $2 168)" -lt 0 ]; then
+ 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."
+ fi
+ if [ "$(vercmp $2 171)" -lt 0 ]; then
+ echo " * Arch's custom blacklisting logic has been removed. MOD_AUTOLOAD and"
+ echo " blacklisting in MODULES no longer works."
+ echo " See 'man modprobe.conf' for a replacement to blacklisting."
+ echo " To disable a module mod1 on the kernel command line, use"
+ echo " mod1.disable=1"
+ echo " or"
+ echo " modprobe.blacklist=mod1"
+ echo " * The following modules are no longer unconditionally loaded:"
+ echo " pcspkr irtty-sir analog lp ppdev ide-generic"
+ echo " Add them to MODULES in rc.conf if you need them."
+ fi
+ if [ "$(vercmp $2 172)" -lt 0 ]; then
+ 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."
+ echo " * kbd and rtc devices are no longer world readable."
+ echo " * rtc is no longer in the audio group and fb devices are no longer in"
+ echo " the video group, as permissions and ownership of fb devices are controlled"
+ echo " by X."
+ fi
+ 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 " * We no longer create symlinks from /dev/<dev> to /dev/<dev>0."
+ 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 " * We no longer create the static nodes on install needed for an initrd-less"
+ echo " boot where devtmpfs is not mounted by the kernel, this only affects fresh"
+ echo " installs."
+ fi
+ if [ "$(vercmp $2 175)" -lt 0 ]; then
+ echo " * devtmpfs support is now a hard requirement. Users of the official Arch"
+ echo " kernels have this enabled."
+ fi
+ if [ "$(vercmp $2 181)" -lt 0 ]; then
+ echo " * udev-compat has been removed, and should be uninstalled."
+ echo " * Framebuffers are no longer blacklisted by default."
+ echo " * binaries moved from /sbin to /usr/bin"
+ fi
+ if [ "$(vercmp $2 20130128)" -lt 0 ]; then
+ netdev_warn
+ fi
+ echo " * if your kernel does not provide /dev/loop-control, you need to manually"
+ echo " load the 'loop' module before using losetup"
+ fi
+}
+
+post_install() {
+ netdev_warn
+}
diff --git a/initcpio_hooks b/initcpio_hooks
new file mode 100755
index 000000000000..75da7e4a84ce
--- /dev/null
+++ b/initcpio_hooks
@@ -0,0 +1,20 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+ udevd --daemon --resolve-names=never
+ udevd_running=1
+}
+
+run_hook() {
+ msg ":: Triggering uevents..."
+ udevadm trigger --action=add --type=subsystems
+ udevadm trigger --action=add --type=devices
+ udevadm settle
+}
+
+run_cleanuphook() {
+ udevadm control --exit
+ udevadm info --cleanup-db
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/initcpio_install b/initcpio_install
new file mode 100755
index 000000000000..033e9ea6e22a
--- /dev/null
+++ b/initcpio_install
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+build() {
+ add_file "/etc/udev/udev.conf"
+ add_binary /usr/bin/udevd
+ add_binary /usr/bin/udevadm
+
+ for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
+ add_file "/usr/lib/udev/rules.d/$rule"
+ done
+
+ for tool in ata_id scsi_id; do
+ add_file "/usr/lib/udev/$tool"
+ done
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook will use udev to create your root device node and detect the needed
+modules for your root device. It is also required for firmware loading in
+initramfs. It is recommended to use this hook.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: