summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-12-14 20:11:33 +0000
committerWilliam Hubbs <williamh@gentoo.org>2011-12-14 20:11:33 +0000
commite7f1cf38f90e26c6fc66b9f42f5f3a8d4cd02dfd (patch)
treeab10e3c5d3af8878715a1cd14e1d03741214e88e /sys-fs
parentAdd pkgconfig build dep (bug #394713). (diff)
downloadhistorical-e7f1cf38f90e26c6fc66b9f42f5f3a8d4cd02dfd.tar.gz
historical-e7f1cf38f90e26c6fc66b9f42f5f3a8d4cd02dfd.tar.bz2
historical-e7f1cf38f90e26c6fc66b9f42f5f3a8d4cd02dfd.zip
remove old versions
Package-Manager: portage-2.2.0_alpha80/cvs/Linux x86_64
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/udev/ChangeLog6
-rw-r--r--sys-fs/udev/Manifest14
-rw-r--r--sys-fs/udev/udev-171-r1.ebuild570
-rw-r--r--sys-fs/udev/udev-171-r2.ebuild601
-rw-r--r--sys-fs/udev/udev-171-r3.ebuild597
-rw-r--r--sys-fs/udev/udev-175.ebuild461
6 files changed, 9 insertions, 2240 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index d9353a8cc09b..a1dcb557d966 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/udev
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.620 2011/12/11 04:48:14 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.621 2011/12/14 20:11:33 williamh Exp $
+
+ 14 Dec 2011; William Hubbs <williamh@gentoo.org> -udev-171-r1.ebuild,
+ -udev-171-r2.ebuild, -udev-171-r3.ebuild, -udev-175.ebuild:
+ remove old versions
*udev-171-r4 (11 Dec 2011)
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
index 9b17d914be75..ff9175076637 100644
--- a/sys-fs/udev/Manifest
+++ b/sys-fs/udev/Manifest
@@ -116,9 +116,7 @@ DIST udev-171-testsys.tar.bz2 155001 RMD160 c73d2e52bcca8cd84f9467f8e26ef6efaf57
DIST udev-171.tar.bz2 597937 RMD160 5b8f9f1e7ba353c58fef851f6f4e1f4c468540b4 SHA1 8b851f0e8681020b89a76a1e7a0273814fa2b24b SHA256 fed1e46074c1a16c828193ebd73b3940b7905cc7dcaeb0b3c720d4615210695e
DIST udev-175.tar.bz2 616780 RMD160 3e568f3137e4f768be2122382b57bf1ceac2385c SHA1 2ef42ca4b11e6b9d0d5c7f47da39eb2e64695e44 SHA256 4c7937fe5a1521316ea571188745b9a00a9fdf314228cffc53a7ba9e5968b7ab
DIST udev-gentoo-scripts-164-v2.tar.bz2 9504 RMD160 826fe14de7cd4d60688dbc2a35daa38377b2e706 SHA1 d27d615d48133dc4411cdc47e3edfed04a78b385 SHA256 5fff00a00da6f6bfc47e375d2a8da6679a4e1de152d9f30f16b4bc8c6d79a5ef
-DIST udev-gentoo-scripts-5.tar.bz2 16254 RMD160 e2192a8c8e5aa8e073c3db97174d7232c9497e87 SHA1 fec2b8242033e601f13d26557470d136d2aca33a SHA256 0b40e0a066c734d74d032d19475a0450790bdcecde892a9978c5987c4d0aec77
DIST udev-gentoo-scripts-6.tar.bz2 16242 RMD160 f6ba565ca36cd12a5ed07fdffda0f5dc864c271a SHA1 5891ac0550db26112cc180904ce46f3be43f950a SHA256 d319dd8a5496361561344c1c190dde1b9ffc0023a29875647a407ed577f2727f
-DIST udev-gentoo-scripts-v4.tar.bz2 9927 RMD160 f409d6615f55068292f2f958e0515a66dfb2532a SHA1 ca84c3a7cd51b472b63ecdd12b9f25b4d4e38dba SHA256 2724814aa07c357b7191969877b418f84d9d6c6e87315357fbddbb97b1d3b4c4
EBUILD udev-114.ebuild 9021 RMD160 64b07c73985d287107db391785c626aa10ff5414 SHA1 a5754bfee36dd35e2abade6abedf0f31b7fd08d4 SHA256 0ae31d95d25a9553c2313c9e23eaf5542b309955b949fc8379ab50f20a3790d1
EBUILD udev-115-r1.ebuild 10098 RMD160 dbe906361bd6fb6eea0e6b9efec1727ba5c0fa5c SHA1 3f021a8b10e7e82ca82a0feb24f2ee3e276c0c2f SHA256 5eb4847f2ddff4db3065eacdc2c4c2fbae73024f52165caad1bb25f719f4f515
EBUILD udev-119.ebuild 10136 RMD160 1b40a739bc73d093e036c050aa3b388379820197 SHA1 c08a8084a5de801fd2fa38e8a9200c7a772281b0 SHA256 b7a893347f7379f8a032df17daf4bc033e56fc0c07f64252d16643dab1174673
@@ -130,19 +128,15 @@ EBUILD udev-146-r1.ebuild 15455 RMD160 35fec6e1eb5112d852c3e6a0e57b576d13620acc
EBUILD udev-149.ebuild 16613 RMD160 65d46a5b3188f7bcfcdb9d8a8ff3b6d34829e314 SHA1 5c88835ffd735ea90db62713daba5f08a4551b64 SHA256 a04300cfafd64abd0f67c1d628f4b5d8ebfdf4dca90102f5764b3b739ed41453
EBUILD udev-151-r4.ebuild 16852 RMD160 e0d2c7041c102e0e5979a1ed5c99d9f4d5820842 SHA1 907db35a89e1ad163c631941e76a5e8105ffd196 SHA256 c2657e3c93dbb8bd3e6dda1c779150aa6127f7a525ed2f04342e33afb4306cfb
EBUILD udev-164-r2.ebuild 15294 RMD160 2d7299b463cb765a58ec0840c4c86607fbf37e64 SHA1 cb4060adb3235d261f027be37e56272ac8f4755b SHA256 3f1b289c9c9c2d6ee6cd63b8db530240dcc9532dbc3ff273c052679b3062724b
-EBUILD udev-171-r1.ebuild 15984 RMD160 2f687585ae93014dbeaaa61e440e0f708ecd2b04 SHA1 92b4eee4956b24677d9e8251b29c40c300cf059c SHA256 9cf4a54cc9e34bf48c5299142a625d056869fbabcd683a233053e6fd04305218
-EBUILD udev-171-r2.ebuild 16440 RMD160 6ec304fc5af203a47341ea50edbc43d4c2c71ec4 SHA1 f10745cdcb690db11e8de47c59c2011a7afcc9e8 SHA256 dec83333d70e1c0a2a22e13dc259dc4c0366f04beed6dc3b9a0ab84889c75224
-EBUILD udev-171-r3.ebuild 16150 RMD160 7f45679842c2f1930aeb36efcc3dbe6cc5eefd32 SHA1 eeb3b063eb5e459bb8487a50126f3b993bb75f4a SHA256 0ccd9d05633c7287e49b4c971aa3d581c59a3196dd0250f4ac952824146a5e17
EBUILD udev-171-r4.ebuild 16191 RMD160 b2effd1be10ab44f4a188777749d84495901eba8 SHA1 f5c0f2a0e8f28bfeae383e5e1cc459937da71782 SHA256 d39b9e9545b0c4ba7993fb5e786d1dff7d912e01a486716d17970806c4715747
EBUILD udev-175-r1.ebuild 12554 RMD160 6b2042c42100cc226bbd52e4bacb384ddd9ab8b4 SHA1 3ce7f532c80ac5e1d6cc3cd66835fcfe7097e0fe SHA256 58e3bdc7a16d314ab0315029dab844729f2d3521bb017efcd05c2e032b42d8c1
-EBUILD udev-175.ebuild 12551 RMD160 1319b4043c1697b4dcc99e527e51de6b4a258323 SHA1 b4b6e4da36e49d54b48f20b4dac3114315acf09d SHA256 b8ee6e5f84e19854eea866d21b6a03765cc4c7e08fa99992a38c68985582554d
EBUILD udev-9999.ebuild 12557 RMD160 193f5e9ba3158953a8021c7546ca5674d33e69e1 SHA1 31009ec00f8200d0b3b3397702ca8fad970df3f0 SHA256 b9bfc01f09d5f9afad739ad62ce260b7375b2548a68565ca471c8781505c0ffa
-MISC ChangeLog 126625 RMD160 8c0aabbfc18b484cce61994c4c7ce29d3d91cd09 SHA1 13348ec032fb3660248bf0eadcba8fdb23e6e57d SHA256 5c5d57b598f93de95d0ec47a8a5036093e9e0e73ed76f8136dc8c5fa410b5207
+MISC ChangeLog 126782 RMD160 5ddd5bd0e8e749d1363dafa1cbe266c86de15db7 SHA1 de52554239354995ed08756052ac4186bd992f6b SHA256 7bdc51be7512f16cefef32f227c6c6eb237f2a6f8d7d4783adffb3f798086da1
MISC metadata.xml 1235 RMD160 36ff4665ed99aa392ff8003e9351bd620cc79424 SHA1 3fd0e915598c248b5c7d609b6a98a4cde8431b05 SHA256 dbbbd093a910a5cb541d7be160f749dc87fc699d72165c184965fa056d60f24b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk7kNXQACgkQblQW9DDEZTi1XQCePmzxF4bER+671AfMCFHbMK4H
-huYAoIlXxPcOJNJ34VT/JtWABWNQEkJ+
-=55Nu
+iEYEARECAAYFAk7pAwwACgkQblQW9DDEZThGoQCdGpwU35Wj+9y1Qkq2GzMvRn0c
+rQoAn2+cq7xxZSWjJmYQZpg0fU5Xifi2
+=B1My
-----END PGP SIGNATURE-----
diff --git a/sys-fs/udev/udev-171-r1.ebuild b/sys-fs/udev/udev-171-r1.ebuild
deleted file mode 100644
index 95f8ffb65c34..000000000000
--- a/sys-fs/udev/udev-171-r1.ebuild
+++ /dev/null
@@ -1,570 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-171-r1.ebuild,v 1.10 2011/07/07 19:30:44 zzam Exp $
-
-EAPI="1"
-
-inherit eutils flag-o-matic multilib toolchain-funcs linux-info systemd
-
-PATCHSET=${P}-gentoo-patchset-v1
-scriptversion=v4
-scriptname=udev-gentoo-scripts-${scriptversion}
-
-if [[ ${PV} == "9999" ]]; then
- SRC_URI="mirror://gentoo/${scriptname}.tar.bz2"
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- inherit git autotools
-else
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-171-testsys.tar.bz2 )
- mirror://gentoo/${scriptname}.tar.bz2"
- [[ -n "${PATCHSET}" ]] && SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
-fi
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="build selinux test debug +rule_generator hwdb acl gudev introspection
- keymap floppy edd action_modeswitch extras"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? ( sys-apps/acl
- dev-libs/glib:2
- dev-libs/gobject-introspection
- virtual/libusb:0 )
- acl? ( sys-apps/acl dev-libs/glib:2 )
- gudev? ( dev-libs/glib:2 )
- introspection? ( dev-libs/gobject-introspection )
- action_modeswitch? ( virtual/libusb:0 )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.10"
-
-DEPEND="${COMMON_DEPEND}
- keymap? ( dev-util/gperf )
- extras? ( dev-util/gperf )
- dev-util/pkgconfig
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.34
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- hwdb?
- (
- >=sys-apps/usbutils-0.82
- sys-apps/pciutils
- )
- extras?
- (
- >=sys-apps/usbutils-0.82
- sys-apps/pciutils
- )
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-if [[ ${PV} == "9999" ]]; then
- # for documentation processing with xsltproc
- DEPEND="${DEPEND}
- app-text/docbook-xsl-stylesheets
- app-text/docbook-xml-dtd
- dev-util/gtk-doc"
-fi
-
-# required kernel options
-CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
- ~!IDE ~BLK_DEV_BSG"
-
-# Return values:
-# 2 - reliable
-# 1 - unreliable
-# 0 - too old
-udev_check_KV() {
- local ok=0
- if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]] || [[ ${KV_MAJOR} == 3 ]]
- then
- if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then
- ok=2
- elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then
- ok=1
- fi
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- # udev requires signalfd introduced in kernel 2.6.25,
- # but a glibc compiled against >=linux-headers-2.6.27 uses the
- # new signalfd syscall introduced in kernel 2.6.27 without falling back
- # to the old one. So we just depend on 2.6.27 here, see Bug #281312.
- KV_PATCH_min=32
- KV_PATCH_reliable=32
- KV_min=2.6.${KV_PATCH_min}
- KV_reliable=2.6.${KV_PATCH_reliable}
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- echo
- # We don't care about the secondary revision of the kernel.
- # 2.6.30.4 -> 2.6.30 is all we check
- udev_check_KV
- case "$?" in
- 2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;;
- 1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P},"
- ewarn "but it may be unreliable in some cases."
- ebeep ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ebeep ;;
- esac
- echo
-
- KV_FULL_SRC=${KV_FULL}
- get_running_version
- udev_check_KV
- if [[ "$?" = "0" ]]; then
- eerror
- eerror "udev cannot be restarted after emerging,"
- eerror "as your running kernel version (${KV_FULL}) is too old."
- eerror "You really need to use a newer kernel after a reboot!"
- NO_RESTART=1
- ebeep
- fi
-}
-
-src_unpack() {
- unpack ${A}
- if [[ ${PV} == "9999" ]] ; then
- git_src_unpack
- else
- if use test; then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
- fi
-
- #cd "${WORKDIR}/${scriptname}"
-
- cd "${S}"
-
- # patches go here...
-
- # backport some patches
- if [[ -n "${PATCHSET}" ]]; then
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,arch}/*.rules \
- || die "failed to change group dialout to uucp"
-
- if [[ ${PV} != 9999 ]]; then
- # Make sure there is no sudden changes to upstream rules file
- # (more for my own needs than anything else ...)
- MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
- MD5=${MD5/ -/}
- if [[ ${MD5} != a9954d57e97aa0ad2e0ed53899d9559a ]]
- then
- echo
- eerror "50-udev-default.rules has been updated, please validate!"
- eerror "md5sum: ${MD5}"
- die "50-udev-default.rules has been updated, please validate!"
- fi
- fi
-
- if [[ ${PV} == 9999 ]]; then
- gtkdocize --copy || die "gtkdocize failed"
- eautoreconf
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- if ! use extras; then
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir=/lib/udev \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- $(use_enable rule_generator) \
- $(use_enable hwdb) \
- --with-pci-ids-path=/usr/share/misc/pci.ids \
- --with-usb-ids-path=/usr/share/misc/usb.ids \
- $(use_enable acl udev_acl) \
- $(use_enable gudev) \
- $(use_enable introspection) \
- $(use_enable keymap) \
- $(use_enable floppy) \
- $(use_enable edd) \
- $(use_enable action_modeswitch) \
- $(systemd_with_unitdir)
- else
- econf \
- --prefix=/usr \
- --sysconfdir=/etc \
- --sbindir=/sbin \
- --libdir=/usr/$(get_libdir) \
- --with-rootlibdir=/$(get_libdir) \
- --libexecdir=/lib/udev \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- --enable-rule_generator \
- --enable-hwdb \
- --with-pci-ids-path=/usr/share/misc/pci.ids \
- --with-usb-ids-path=/usr/share/misc/usb.ids \
- --enable-udev_acl \
- --enable-gudev \
- --enable-introspection \
- --enable-keymap \
- --enable-floppy \
- --enable-edd \
- --enable-action_modeswitch \
- $(systemd_with_unitdir)
- fi
-
- emake || die "compiling udev failed"
-}
-
-src_install() {
- emake -C "${WORKDIR}/${scriptname}" \
- DESTDIR="${D}" LIBDIR="$(get_libdir)" \
- KV_min="${KV_min}" KV_reliable="${KV_reliable}" \
- install || die "make install failed"
-
- into /
- emake DESTDIR="${D}" install || die "make install failed"
-
- exeinto /lib/udev
- keepdir /lib/udev/state
- keepdir /lib/udev/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "../lib/udev/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${D}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto /lib/udev/rules.d/
-
- # support older kernels
- doins misc/30-kernel-compat.rules
-
- # Adding arch specific rules
- if [[ -f arch/40-${ARCH}.rules ]]
- then
- doins "arch/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # documentation
- dodoc ChangeLog README TODO || die "failed installing docs"
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${D}/usr/share/doc/${PN}"
- if use keymap; then
- dodoc extras/keymap/README.keymap.txt || die "failed installing docs"
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${ROOT}/etc/modprobe.d/
- for f in pnp-aliases blacklist; do
- if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
- then
- elog "Moving $dir/$f to $f.conf"
- mv -f "$dir/$f" "$dir/$f.conf"
- fi
- done
-
- if [[ -d ${ROOT}/lib/udev-state ]]
- then
- mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/
- rm -r "${ROOT}"/lib/udev-state
- fi
-
- if [[ -f ${ROOT}/etc/udev/udev.config &&
- ! -f ${ROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- has_version "=${CATEGORY}/${PN}-103-r3"
- previous_equal_to_103_r3=$?
-
- has_version "<${CATEGORY}/${PN}-104-r5"
- previous_less_than_104_r5=$?
-
- has_version "<${CATEGORY}/${PN}-106-r5"
- previous_less_than_106_r5=$?
-
- has_version "<${CATEGORY}/${PN}-113"
- previous_less_than_113=$?
-}
-
-# 19 Nov 2008
-fix_old_persistent_net_rules() {
- local rules=${ROOT}/etc/udev/rules.d/70-persistent-net.rules
- [[ -f ${rules} ]] || return
-
- elog
- elog "Updating persistent-net rules file"
-
- # Change ATTRS to ATTR matches, Bug #246927
- sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
-
- # Add KERNEL matches if missing, Bug #246849
- sed -ri \
- -e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
- "${rules}"
-}
-
-# See Bug #129204 for a discussion about restarting udevd
-restart_udevd() {
- if [[ ${NO_RESTART} = "1" ]]; then
- ewarn "Not restarting udevd, as your kernel is too old!"
- return
- fi
-
- # need to merge to our system
- [[ ${ROOT} = / ]] || return
-
- # check if root of init-process is identical to ours (not in chroot)
- [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
-
- # abort if there is no udevd running
- [[ -n $(pidof udevd) ]] || return
-
- # abort if no /dev/.udev exists
- [[ -e /dev/.udev ]] || return
-
- elog
- elog "restarting udevd now."
-
- killall -15 udevd &>/dev/null
- sleep 1
- killall -9 udevd &>/dev/null
-
- /sbin/udevd --daemon
- sleep 3
- if [[ ! -n $(pidof udevd) ]]; then
- eerror "FATAL: udev died, please check your kernel is"
- eerror "new enough and configured correctly for ${P}."
- eerror
- eerror "Please have a look at this before rebooting."
- eerror "If in doubt, please downgrade udev back to your old version"
- ebeep
- fi
-}
-
-postinst_init_scripts() {
- local enable_postmount=false
-
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # If we are building stages, add udev to the sysinit runlevel automatically.
- if use build
- then
- if [[ -x "${ROOT}"/etc/init.d/udev \
- && -d "${ROOT}"/etc/runlevels/sysinit ]]
- then
- ln -s /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev
- fi
- enable_postmount=true
- fi
-
- # migration to >=openrc-0.4
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
-
- if $enable_postmount
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/default/${initd}
- elog "Auto-adding '${initd}' service to your default runlevel"
- fi
- else
- elog "You should add the udev-postmount service to default runlevel."
- elog "Run this to add it:"
- elog "\trc-update add udev-postmount default"
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
- # So try to remove it here (will only work if empty).
- rmdir "${ROOT}"/dev/loop 2>/dev/null
- if [[ -d "${ROOT}"/dev/loop ]]; then
- ewarn "Please make sure your remove /dev/loop,"
- ewarn "else losetup may be confused when looking for unused devices."
- fi
-
- restart_udevd
-
- postinst_init_scripts
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- # delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
- then
- ewarn "Deleting stray 40-scsi-hotplug.rules"
- ewarn "installed by sys-fs/udev-103-r3"
- rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago, 25 Jan 2007
- if [[ -d ${ROOT}/lib/udev/devices ]]
- then
- rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file, 29 Jan 2007
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${ROOT}/etc/dev.d ]]
- then
- ewarn "You still have the directory /etc/dev.d on your system."
- ewarn "This is no longer used by udev and can be removed."
- fi
- fi
-
- # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
- # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in Bug #225033:
- elog
- elog "persistent-net does assigning fixed names to network devices."
- elog "If you have problems with the persistent-net rules,"
- elog "just delete the rules file"
- elog "\trm ${ROOT}etc/udev/rules.d/70-persistent-net.rules"
- elog "and then reboot."
- elog
- elog "This may however number your devices in a different way than they are now."
-
- ewarn
- ewarn "If you build an initramfs including udev, then please"
- ewarn "make sure that the /sbin/udevadm binary gets included,"
- ewarn "and your scripts changed to use it,as it replaces the"
- ewarn "old helper apps udevinfo, udevtrigger, ..."
-
- ewarn
- ewarn "mount options for directory /dev are no longer"
- ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
- ewarn "as for other directories."
-
- ewarn
- ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
- ewarn "then please migrate over to using the device names"
- ewarn "/dev/md*, /dev/loop* and /dev/ram*."
- ewarn "The devfs-compat rules have been removed."
- ewarn "For reference see Bug #269359."
-
- ewarn
- ewarn "Rules for /dev/hd* devices have been removed"
- ewarn "Please migrate to libata."
-
- elog
- elog "For more information on udev on Gentoo, writing udev rules, and"
- elog " fixing known issues visit:"
- elog " http://www.gentoo.org/doc/en/udev-guide.xml"
-}
diff --git a/sys-fs/udev/udev-171-r2.ebuild b/sys-fs/udev/udev-171-r2.ebuild
deleted file mode 100644
index 4139430eaf9e..000000000000
--- a/sys-fs/udev/udev-171-r2.ebuild
+++ /dev/null
@@ -1,601 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-171-r2.ebuild,v 1.3 2011/11/11 19:34:18 vapier Exp $
-
-EAPI=4
-
-KV_min=2.6.32
-KV_reliable=2.6.32
-PATCHSET=${P}-gentoo-patchset-v1
-scriptversion=v4
-scriptname=udev-gentoo-scripts-${scriptversion}
-
-if [[ ${PV} == "9999" ]]
-then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- vcs="git-2 autotools"
-fi
-
-inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool
-
-if [[ ${PV} != "9999" ]]
-then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-171-testsys.tar.bz2 )"
- if [[ -n "${PATCHSET}" ]]
- then
- SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
- fi
-fi
-SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2"
-
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build selinux test debug +rule_generator hwdb acl gudev introspection
- keymap floppy edd action_modeswitch extras"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? ( sys-apps/acl
- dev-libs/glib:2
- dev-libs/gobject-introspection
- virtual/libusb:0 )
- acl? ( sys-apps/acl dev-libs/glib:2 )
- gudev? ( dev-libs/glib:2 )
- introspection? ( dev-libs/gobject-introspection )
- action_modeswitch? ( virtual/libusb:0 )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.10"
-
-DEPEND="${COMMON_DEPEND}
- keymap? ( dev-util/gperf )
- extras? ( dev-util/gperf )
- dev-util/pkgconfig
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.34
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- hwdb?
- (
- >=sys-apps/usbutils-0.82
- sys-apps/pciutils
- )
- extras?
- (
- >=sys-apps/usbutils-0.82
- sys-apps/pciutils
- )
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-if [[ ${PV} == "9999" ]]
-then
- # for documentation processing with xsltproc
- DEPEND="${DEPEND}
- app-text/docbook-xsl-stylesheets
- app-text/docbook-xml-dtd
- dev-util/gtk-doc"
-fi
-
-# required kernel options
-CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
- ~!IDE ~BLK_DEV_BSG"
-
-# Return values:
-# 2 - reliable
-# 1 - unreliable
-# 0 - too old
-udev_check_KV() {
- local ok=0
- if kernel_is -ge ${KV_reliable//./ }
- then
- ok=2
- elif kernel_is -ge ${KV_min//./ }
- then
- ok=1
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_min} != ${KV_reliable} ]]
- then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- udev_check_KV
- case "$?" in
- 2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;;
- 1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P},"
- ewarn "but it may be unreliable in some cases."
- ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ;;
- esac
-
- KV_FULL_SRC=${KV_FULL}
- get_running_version
- udev_check_KV
- if [[ "$?" = "0" ]]
- then
- eerror
- eerror "udev cannot be restarted after emerging,"
- eerror "as your running kernel version (${KV_FULL}) is too old."
- eerror "You really need to use a newer kernel after a reboot!"
- NO_RESTART=1
- fi
-}
-
-src_unpack() {
- unpack ${A}
- if [[ ${PV} == "9999" ]]
- then
- git-2_src_unpack
- fi
-}
-
-src_prepare() {
- if use test && [[ -d "${WORKDIR}"/test/sys ]]
- then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
-
- # patches go here...
-
- # backport some patches
- if [[ -n "${PATCHSET}" ]]
- then
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,arch}/*.rules \
- || die "failed to change group dialout to uucp"
-
- if [[ ${PV} != 9999 ]]
- then
- # Make sure there is no sudden changes to upstream rules file
- # (more for my own needs than anything else ...)
- MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
- MD5=${MD5/ -/}
- if [[ ${MD5} != a9954d57e97aa0ad2e0ed53899d9559a ]]
- then
- eerror "50-udev-default.rules has been updated, please validate!"
- eerror "md5sum: ${MD5}"
- die "50-udev-default.rules has been updated, please validate!"
- fi
- fi
-
- if [[ ${PV} == 9999 ]]
- then
- gtkdocize --copy || die "gtkdocize failed"
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-src_configure() {
- if ! use extras
- then
- econf \
- --prefix="${EPREFIX}/usr" \
- --sysconfdir="${EPREFIX}/etc" \
- --sbindir="${EPREFIX}/sbin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --with-rootlibdir="${EPREFIX}/$(get_libdir)" \
- --libexecdir="${EPREFIX}/lib/udev" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- $(use_enable rule_generator) \
- $(use_enable hwdb) \
- --with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
- --with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
- $(use_enable acl udev_acl) \
- $(use_enable gudev) \
- $(use_enable introspection) \
- $(use_enable keymap) \
- $(use_enable floppy) \
- $(use_enable edd) \
- $(use_enable action_modeswitch) \
- $(systemd_with_unitdir)
- else
- econf \
- --prefix="${EPREFIX}/usr" \
- --sysconfdir="${EPREFIX}/etc" \
- --sbindir="${EPREFIX}/sbin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --with-rootlibdir="${EPREFIX}/$(get_libdir)" \
- --libexecdir="${EPREFIX}/lib/udev" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- --enable-rule_generator \
- --enable-hwdb \
- --with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
- --with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
- --enable-udev_acl \
- --enable-gudev \
- --enable-introspection \
- --enable-keymap \
- --enable-floppy \
- --enable-edd \
- --enable-action_modeswitch \
- $(systemd_with_unitdir)
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- emake
-}
-
-src_install() {
- emake -C "${WORKDIR}/${scriptname}" \
- DESTDIR="${D}" LIBDIR="${EPREFIX}$(get_libdir)" \
- LIBUDEV="${EPREFIX}/lib/udev" \
- MODPROBE_DIR="${EPREFIX}/etc/modprobe.d" \
- INITD="${EPREFIX}/etc/init.d" \
- CONFD="${EPREFIX}/etc/conf.d" \
- KV_min="${KV_min}" KV_reliable="${KV_reliable}" \
- install
-
- into /
- emake DESTDIR="${D}" install
-
- exeinto /lib/udev
- keepdir /lib/udev/state
- keepdir /lib/udev/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "../lib/udev/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${ED}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto /lib/udev/rules.d/
-
- # support older kernels
- doins misc/30-kernel-compat.rules
-
- # Adding arch specific rules
- if [[ -f arch/40-${ARCH}.rules ]]
- then
- doins "arch/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # documentation
- dodoc ChangeLog README TODO
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${ED}/usr/share/doc/${PN}"
- if use keymap
- then
- dodoc extras/keymap/README.keymap.txt
- fi
-}
-
-src_test() {
- local emake_cmd="${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE}"
- cd "${WORKDIR}/${scriptname}"
- vecho ">>> Test phase [scripts:test]: ${CATEGORY}/${PF}"
- if ! $emake_cmd -j1 test
- then
- has test $FEATURES && die "scripts: Make test failed. See above for details."
- has test $FEATURES || eerror "scripts: Make test failed. See above for details."
- fi
-
- cd "${S}"
- vecho ">>> Test phase [udev:check]: ${CATEGORY}/${PF}"
- has userpriv $FEATURES && einfo "Disable FEATURES userpriv to run the udev tests"
- if ! $emake_cmd -j1 check
- then
- has test $FEATURES && die "udev: Make test failed. See above for details."
- has test $FEATURES || eerror "udev: Make test failed. See above for details."
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${EROOT}/etc/modprobe.d/
- for f in pnp-aliases blacklist; do
- if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
- then
- elog "Moving $dir/$f to $f.conf"
- mv -f "$dir/$f" "$dir/$f.conf"
- fi
- done
-
- if [[ -d ${EROOT}/lib/udev-state ]]
- then
- mv -f "${EROOT}"/lib/udev-state/* "${ED}"/lib/udev/state/
- rm -r "${EROOT}"/lib/udev-state
- fi
-
- if [[ -f ${EROOT}/etc/udev/udev.config &&
- ! -f ${EROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${EROOT}"/etc/udev/udev.config "${EROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${EROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${EROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${EROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${EROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${EROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${EROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- has_version "=${CATEGORY}/${PN}-103-r3"
- previous_equal_to_103_r3=$?
-
- has_version "<${CATEGORY}/${PN}-104-r5"
- previous_less_than_104_r5=$?
-
- has_version "<${CATEGORY}/${PN}-106-r5"
- previous_less_than_106_r5=$?
-
- has_version "<${CATEGORY}/${PN}-113"
- previous_less_than_113=$?
-}
-
-# 19 Nov 2008
-fix_old_persistent_net_rules() {
- local rules=${EROOT}/etc/udev/rules.d/70-persistent-net.rules
- [[ -f ${rules} ]] || return
-
- elog
- elog "Updating persistent-net rules file"
-
- # Change ATTRS to ATTR matches, Bug #246927
- sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
-
- # Add KERNEL matches if missing, Bug #246849
- sed -ri \
- -e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
- "${rules}"
-}
-
-# See Bug #129204 for a discussion about restarting udevd
-restart_udevd() {
- if [[ ${NO_RESTART} = "1" ]]
- then
- ewarn "Not restarting udevd, as your kernel is too old!"
- return
- fi
-
- # need to merge to our system
- [[ ${EROOT} = / ]] || return
-
- # check if root of init-process is identical to ours (not in chroot)
- [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
-
- # abort if there is no udevd running
- [[ -n $(pidof udevd) ]] || return
-
- # abort if no /dev/.udev exists
- [[ -e /dev/.udev ]] || return
-
- elog
- elog "restarting udevd now."
-
- killall -15 udevd &>/dev/null
- sleep 1
- killall -9 udevd &>/dev/null
-
- /sbin/udevd --daemon
- sleep 3
- if [[ ! -n $(pidof udevd) ]]
- then
- eerror "FATAL: udev died, please check your kernel is"
- eerror "new enough and configured correctly for ${P}."
- eerror
- eerror "Please have a look at this before rebooting."
- eerror "If in doubt, please downgrade udev back to your old version"
- fi
-}
-
-postinst_init_scripts() {
- local enable_postmount=false
-
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # If we are building stages, add udev to the sysinit runlevel automatically.
- if use build
- then
- if [[ -x "${EROOT}"/etc/init.d/udev \
- && -d "${EROOT}"/etc/runlevels/sysinit ]]
- then
- ln -s "${EPREFIX}"/etc/init.d/udev "${EROOT}"/etc/runlevels/sysinit/udev
- fi
- enable_postmount=true
- fi
-
- # migration to >=openrc-0.4
- if [[ -e "${EROOT}"/etc/runlevels/sysinit && ! -e "${EROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${EROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- [[ -e "${EROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
- [[ "${EROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
-
- if $enable_postmount
- then
- local initd=udev-postmount
-
- if [[ -e ${EROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${EROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf "${EPREFIX}"/etc/init.d/${initd} "${EROOT}"/etc/runlevels/default/${initd}
- elog "Auto-adding '${initd}' service to your default runlevel"
- fi
- else
- elog "You should add the udev-postmount service to default runlevel."
- elog "Run this to add it:"
- elog "\trc-update add udev-postmount default"
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
- # So try to remove it here (will only work if empty).
- rmdir "${EROOT}"/dev/loop 2>/dev/null
- if [[ -d "${EROOT}"/dev/loop ]]
- then
- ewarn "Please make sure your remove /dev/loop,"
- ewarn "else losetup may be confused when looking for unused devices."
- fi
-
- restart_udevd
-
- postinst_init_scripts
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- # delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${EROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
- then
- ewarn "Deleting stray 40-scsi-hotplug.rules"
- ewarn "installed by sys-fs/udev-103-r3"
- rm -f "${EROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago, 25 Jan 2007
- if [[ -d ${EROOT}/lib/udev/devices ]]
- then
- rm -f "${EROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file, 29 Jan 2007
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${EROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${EROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${EROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${EROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/default "${EROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${EROOT}/etc/dev.d ]]
- then
- ewarn "You still have the directory /etc/dev.d on your system."
- ewarn "This is no longer used by udev and can be removed."
- fi
- fi
-
- # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
- # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in Bug #225033:
- elog
- elog "persistent-net does assigning fixed names to network devices."
- elog "If you have problems with the persistent-net rules,"
- elog "just delete the rules file"
- elog "\trm ${EROOT}etc/udev/rules.d/70-persistent-net.rules"
- elog "and then reboot."
- elog
- elog "This may however number your devices in a different way than they are now."
-
- ewarn
- ewarn "If you build an initramfs including udev, then please"
- ewarn "make sure that the /sbin/udevadm binary gets included,"
- ewarn "and your scripts changed to use it,as it replaces the"
- ewarn "old helper apps udevinfo, udevtrigger, ..."
-
- ewarn
- ewarn "mount options for directory /dev are no longer"
- ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
- ewarn "as for other directories."
-
- ewarn
- ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
- ewarn "then please migrate over to using the device names"
- ewarn "/dev/md*, /dev/loop* and /dev/ram*."
- ewarn "The devfs-compat rules have been removed."
- ewarn "For reference see Bug #269359."
-
- ewarn
- ewarn "Rules for /dev/hd* devices have been removed"
- ewarn "Please migrate to libata."
-
- elog
- elog "For more information on udev on Gentoo, writing udev rules, and"
- elog " fixing known issues visit:"
- elog " http://www.gentoo.org/doc/en/udev-guide.xml"
-}
diff --git a/sys-fs/udev/udev-171-r3.ebuild b/sys-fs/udev/udev-171-r3.ebuild
deleted file mode 100644
index ec41ff49d771..000000000000
--- a/sys-fs/udev/udev-171-r3.ebuild
+++ /dev/null
@@ -1,597 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-171-r3.ebuild,v 1.2 2011/12/09 20:43:22 vapier Exp $
-
-EAPI=4
-
-KV_min=2.6.32
-KV_reliable=2.6.32
-PATCHSET=${P}-gentoo-patchset-v1
-scriptversion=6
-scriptname=udev-gentoo-scripts
-[[ -n "${scriptversion}" ]] && scriptname="${scriptname}-${scriptversion}"
-
-if [[ ${PV} == "9999" ]]
-then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
- EGIT_BRANCH="master"
- vcs="git-2 autotools"
-fi
-
-inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool
-
-if [[ ${PV} != "9999" ]]
-then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
- # please update testsys-tarball whenever udev-xxx/test/sys/ is changed
- SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2
- test? ( mirror://gentoo/${PN}-171-testsys.tar.bz2 )"
- if [[ -n "${PATCHSET}" ]]
- then
- SRC_URI="${SRC_URI} mirror://gentoo/${PATCHSET}.tar.bz2"
- fi
-fi
-SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2"
-
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build selinux test debug +rule_generator hwdb acl gudev introspection
- keymap floppy edd action_modeswitch extras"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- extras? ( sys-apps/acl
- dev-libs/glib:2
- dev-libs/gobject-introspection
- virtual/libusb:0 )
- acl? ( sys-apps/acl dev-libs/glib:2 )
- gudev? ( dev-libs/glib:2 )
- introspection? ( dev-libs/gobject-introspection )
- action_modeswitch? ( virtual/libusb:0 )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.10"
-
-DEPEND="${COMMON_DEPEND}
- keymap? ( dev-util/gperf )
- extras? ( dev-util/gperf )
- dev-util/pkgconfig
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.34
- test? ( app-text/tree )"
-
-RDEPEND="${COMMON_DEPEND}
- hwdb?
- (
- >=sys-apps/usbutils-0.82
- sys-apps/pciutils[-zlib]
- )
- extras?
- (
- >=sys-apps/usbutils-0.82
- sys-apps/pciutils
- )
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-if [[ ${PV} == "9999" ]]
-then
- # for documentation processing with xsltproc
- DEPEND="${DEPEND}
- app-text/docbook-xsl-stylesheets
- app-text/docbook-xml-dtd
- dev-util/gtk-doc"
-fi
-
-# required kernel options
-CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
- ~!IDE ~BLK_DEV_BSG"
-
-# Return values:
-# 2 - reliable
-# 1 - unreliable
-# 0 - too old
-udev_check_KV() {
- local ok=0
- if kernel_is -ge ${KV_reliable//./ }
- then
- ok=2
- elif kernel_is -ge ${KV_min//./ }
- then
- ok=1
- fi
- return $ok
-}
-
-pkg_setup() {
- linux-info_pkg_setup
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
- if [[ ${KV_min} != ${KV_reliable} ]]
- then
- ewarn "For a reliable udev, use at least kernel ${KV_reliable}"
- fi
-
- udev_check_KV
- case "$?" in
- 2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;;
- 1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P},"
- ewarn "but it may be unreliable in some cases."
- ;;
- 0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- ;;
- esac
-
- KV_FULL_SRC=${KV_FULL}
- get_running_version
- udev_check_KV
- if [[ "$?" = "0" ]]
- then
- eerror
- eerror "udev cannot be restarted after emerging,"
- eerror "as your running kernel version (${KV_FULL}) is too old."
- eerror "You really need to use a newer kernel after a reboot!"
- NO_RESTART=1
- fi
-}
-
-src_unpack() {
- unpack ${A}
- if [[ ${PV} == "9999" ]]
- then
- git-2_src_unpack
- fi
-}
-
-src_prepare() {
- if use test && [[ -d "${WORKDIR}"/test/sys ]]
- then
- mv "${WORKDIR}"/test/sys "${S}"/test/
- fi
-
- # patches go here...
-
- # backport some patches
- if [[ -n "${PATCHSET}" ]]
- then
- EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,arch}/*.rules \
- || die "failed to change group dialout to uucp"
-
- if [[ ${PV} != 9999 ]]
- then
- # Make sure there is no sudden changes to upstream rules file
- # (more for my own needs than anything else ...)
- MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
- MD5=${MD5/ -/}
- if [[ ${MD5} != a9954d57e97aa0ad2e0ed53899d9559a ]]
- then
- eerror "50-udev-default.rules has been updated, please validate!"
- eerror "md5sum: ${MD5}"
- die "50-udev-default.rules has been updated, please validate!"
- fi
- fi
-
- if [[ ${PV} == 9999 ]]
- then
- gtkdocize --copy || die "gtkdocize failed"
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-src_configure() {
- if ! use extras
- then
- econf \
- --prefix="${EPREFIX}/usr" \
- --sysconfdir="${EPREFIX}/etc" \
- --sbindir="${EPREFIX}/sbin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --with-rootlibdir="${EPREFIX}/$(get_libdir)" \
- --libexecdir="${EPREFIX}/lib/udev" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- $(use_enable rule_generator) \
- $(use_enable hwdb) \
- --with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
- --with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
- $(use_enable acl udev_acl) \
- $(use_enable gudev) \
- $(use_enable introspection) \
- $(use_enable keymap) \
- $(use_enable floppy) \
- $(use_enable edd) \
- $(use_enable action_modeswitch) \
- $(systemd_with_unitdir)
- else
- econf \
- --prefix="${EPREFIX}/usr" \
- --sysconfdir="${EPREFIX}/etc" \
- --sbindir="${EPREFIX}/sbin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --with-rootlibdir="${EPREFIX}/$(get_libdir)" \
- --libexecdir="${EPREFIX}/lib/udev" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- --enable-rule_generator \
- --enable-hwdb \
- --with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
- --with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
- --enable-udev_acl \
- --enable-gudev \
- --enable-introspection \
- --enable-keymap \
- --enable-floppy \
- --enable-edd \
- --enable-action_modeswitch \
- $(systemd_with_unitdir)
- fi
-}
-
-src_compile() {
- filter-flags -fprefetch-loop-arrays
-
- emake
-}
-
-src_install() {
- into /
- emake DESTDIR="${D}" install
-
- exeinto /lib/udev
- keepdir /lib/udev/state
- keepdir /lib/udev/devices
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "../lib/udev/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${ED}"/etc/udev/udev.conf
-
- # let the dir exist at least
- keepdir /etc/udev/rules.d
-
- # Now installing rules
- cd "${S}"/rules
- insinto /lib/udev/rules.d/
-
- # support older kernels
- doins misc/30-kernel-compat.rules
-
- # Adding arch specific rules
- if [[ -f arch/40-${ARCH}.rules ]]
- then
- doins "arch/40-${ARCH}.rules"
- fi
- cd "${S}"
-
- insinto /etc/modprobe.d
- newins "${FILESDIR}"/blacklist-146 blacklist.conf
- newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf
-
- # documentation
- dodoc ChangeLog README TODO
-
- # keep doc in just one directory, Bug #281137
- rm -rf "${ED}/usr/share/doc/${PN}"
- if use keymap
- then
- dodoc extras/keymap/README.keymap.txt
- fi
-
- cd "${WORKDIR}/${scriptname}"
- sed -i -e 's/2.6.34/2.6.32/' init.d/udev
- doconfd conf.d/*
- exeinto /lib/udev
- doexe helpers/*
- doinitd init.d/*
- insinto /etc/modprobe.d
- doins modprobe.d/*
- insinto /lib/udev/rules.d
- doins rules.d/*
-}
-
-src_test() {
- local emake_cmd="${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE}"
-
- cd "${S}"
- vecho ">>> Test phase [udev:check]: ${CATEGORY}/${PF}"
- has userpriv $FEATURES && einfo "Disable FEATURES userpriv to run the udev tests"
- if ! $emake_cmd -j1 check
- then
- has test $FEATURES && die "udev: Make test failed. See above for details."
- has test $FEATURES || eerror "udev: Make test failed. See above for details."
- fi
-}
-
-pkg_preinst() {
- # moving old files to support newer modprobe, 12 May 2009
- local f dir=${EROOT}/etc/modprobe.d/
- for f in pnp-aliases blacklist; do
- if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
- then
- elog "Moving $dir/$f to $f.conf"
- mv -f "$dir/$f" "$dir/$f.conf"
- fi
- done
-
- if [[ -d ${EROOT}/lib/udev-state ]]
- then
- mv -f "${EROOT}"/lib/udev-state/* "${ED}"/lib/udev/state/
- rm -r "${EROOT}"/lib/udev-state
- fi
-
- if [[ -f ${EROOT}/etc/udev/udev.config &&
- ! -f ${EROOT}/etc/udev/udev.rules ]]
- then
- mv -f "${EROOT}"/etc/udev/udev.config "${EROOT}"/etc/udev/udev.rules
- fi
-
- # delete the old udev.hotplug symlink if it is present
- if [[ -h ${EROOT}/etc/hotplug.d/default/udev.hotplug ]]
- then
- rm -f "${EROOT}"/etc/hotplug.d/default/udev.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${EROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]]
- then
- rm -f "${EROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug
- fi
-
- # delete the old wait_for_sysfs.hotplug symlink if it is present
- if [[ -h ${EROOT}/etc/hotplug.d/default/10-udev.hotplug ]]
- then
- rm -f "${EROOT}"/etc/hotplug.d/default/10-udev.hotplug
- fi
-
- has_version "=${CATEGORY}/${PN}-103-r3"
- previous_equal_to_103_r3=$?
-
- has_version "<${CATEGORY}/${PN}-104-r5"
- previous_less_than_104_r5=$?
-
- has_version "<${CATEGORY}/${PN}-106-r5"
- previous_less_than_106_r5=$?
-
- has_version "<${CATEGORY}/${PN}-113"
- previous_less_than_113=$?
-}
-
-# 19 Nov 2008
-fix_old_persistent_net_rules() {
- local rules=${EROOT}/etc/udev/rules.d/70-persistent-net.rules
- [[ -f ${rules} ]] || return
-
- elog
- elog "Updating persistent-net rules file"
-
- # Change ATTRS to ATTR matches, Bug #246927
- sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
-
- # Add KERNEL matches if missing, Bug #246849
- sed -ri \
- -e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
- "${rules}"
-}
-
-# See Bug #129204 for a discussion about restarting udevd
-restart_udevd() {
- if [[ ${NO_RESTART} = "1" ]]
- then
- ewarn "Not restarting udevd, as your kernel is too old!"
- return
- fi
-
- # need to merge to our system
- [[ ${EROOT} = / ]] || return
-
- # check if root of init-process is identical to ours (not in chroot)
- [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
-
- # abort if there is no udevd running
- [[ -n $(pidof udevd) ]] || return
-
- # abort if no /dev/.udev exists
- [[ -e /dev/.udev ]] || return
-
- elog
- elog "restarting udevd now."
-
- killall -15 udevd &>/dev/null
- sleep 1
- killall -9 udevd &>/dev/null
-
- /sbin/udevd --daemon
- sleep 3
- if [[ ! -n $(pidof udevd) ]]
- then
- eerror "FATAL: udev died, please check your kernel is"
- eerror "new enough and configured correctly for ${P}."
- eerror
- eerror "Please have a look at this before rebooting."
- eerror "If in doubt, please downgrade udev back to your old version"
- fi
-}
-
-postinst_init_scripts() {
- local enable_postmount=false
-
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # If we are building stages, add udev to the sysinit runlevel automatically.
- if use build
- then
- if [[ -x "${EROOT}"/etc/init.d/udev \
- && -d "${EROOT}"/etc/runlevels/sysinit ]]
- then
- ln -s "${EPREFIX}"/etc/init.d/udev "${EROOT}"/etc/runlevels/sysinit/udev
- fi
- enable_postmount=true
- fi
-
- # migration to >=openrc-0.4
- if [[ -e "${EROOT}"/etc/runlevels/sysinit && ! -e "${EROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${EROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- [[ -e "${EROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
- [[ "${EROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
-
- if $enable_postmount
- then
- local initd=udev-postmount
-
- if [[ -e ${EROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${EROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf "${EPREFIX}"/etc/init.d/${initd} "${EROOT}"/etc/runlevels/default/${initd}
- elog "Auto-adding '${initd}' service to your default runlevel"
- fi
- else
- elog "You should add the udev-postmount service to default runlevel."
- elog "Run this to add it:"
- elog "\trc-update add udev-postmount default"
- fi
-}
-
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
- # So try to remove it here (will only work if empty).
- rmdir "${EROOT}"/dev/loop 2>/dev/null
- if [[ -d "${EROOT}"/dev/loop ]]
- then
- ewarn "Please make sure your remove /dev/loop,"
- ewarn "else losetup may be confused when looking for unused devices."
- fi
-
- restart_udevd
-
- postinst_init_scripts
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- # delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
- if [[ $previous_equal_to_103_r3 = 0 ]] &&
- [[ -e ${EROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
- then
- ewarn "Deleting stray 40-scsi-hotplug.rules"
- ewarn "installed by sys-fs/udev-103-r3"
- rm -f "${EROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
- fi
-
- # Removing some device-nodes we thought we need some time ago, 25 Jan 2007
- if [[ -d ${EROOT}/lib/udev/devices ]]
- then
- rm -f "${EROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Removing some old file, 29 Jan 2007
- if [[ $previous_less_than_104_r5 = 0 ]]
- then
- rm -f "${EROOT}"/etc/dev.d/net/hotplug.dev
- rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/net 2>/dev/null
- fi
-
- # 19 Mar 2007
- if [[ $previous_less_than_106_r5 = 0 ]] &&
- [[ -e ${EROOT}/etc/udev/rules.d/95-net.rules ]]
- then
- rm -f "${EROOT}"/etc/udev/rules.d/95-net.rules
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${EROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/default "${EROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${EROOT}/etc/dev.d ]]
- then
- ewarn "You still have the directory /etc/dev.d on your system."
- ewarn "This is no longer used by udev and can be removed."
- fi
- fi
-
- # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
- # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
- if [[ $previous_less_than_113 = 0 ]] &&
- [[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in Bug #225033:
- elog
- elog "persistent-net does assigning fixed names to network devices."
- elog "If you have problems with the persistent-net rules,"
- elog "just delete the rules file"
- elog "\trm ${EROOT}etc/udev/rules.d/70-persistent-net.rules"
- elog "and then reboot."
- elog
- elog "This may however number your devices in a different way than they are now."
-
- ewarn
- ewarn "If you build an initramfs including udev, then please"
- ewarn "make sure that the /sbin/udevadm binary gets included,"
- ewarn "and your scripts changed to use it,as it replaces the"
- ewarn "old helper apps udevinfo, udevtrigger, ..."
-
- ewarn
- ewarn "mount options for directory /dev are no longer"
- ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
- ewarn "as for other directories."
-
- ewarn
- ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
- ewarn "then please migrate over to using the device names"
- ewarn "/dev/md*, /dev/loop* and /dev/ram*."
- ewarn "The devfs-compat rules have been removed."
- ewarn "For reference see Bug #269359."
-
- ewarn
- ewarn "Rules for /dev/hd* devices have been removed"
- ewarn "Please migrate to libata."
-
- elog
- elog "For more information on udev on Gentoo, writing udev rules, and"
- elog " fixing known issues visit:"
- elog " http://www.gentoo.org/doc/en/udev-guide.xml"
-}
diff --git a/sys-fs/udev/udev-175.ebuild b/sys-fs/udev/udev-175.ebuild
deleted file mode 100644
index a9dce6564e1d..000000000000
--- a/sys-fs/udev/udev-175.ebuild
+++ /dev/null
@@ -1,461 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-175.ebuild,v 1.7 2011/12/09 20:43:22 vapier Exp $
-
-EAPI=4
-
-KV_min=2.6.34
-# patchversion=1
-scriptversion=5
-udev_rules_md5=7a7180a394e5bdea9011f68582b94fe8
-
-EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git"
-
-[[ ${PV} == "9999" ]] && vcs="git-2 autotools"
-inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool
-
-scriptname=${PN}-gentoo-scripts
-if [[ ${PV} != "9999" ]]
-then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
- SRC_URI="http://people.freedesktop.org/~kay/${PN}/${P}.tar.bz2"
- if [[ -n "${patchversion}" ]]
- then
- patchset=${P}-patchset-${patchversion}
- SRC_URI="${SRC_URI} mirror://gentoo/${patchset}.tar.bz2"
- fi
- scriptname="${scriptname}-${scriptversion}"
- SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2"
-fi
-
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
-HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="build selinux debug +rule_generator hwdb acl gudev introspection
- keymap floppy edd doc"
-
-COMMON_DEPEND="selinux? ( sys-libs/libselinux )
- acl? ( sys-apps/acl dev-libs/glib:2 )
- gudev? ( dev-libs/glib:2 )
- introspection? ( dev-libs/gobject-introspection )
- >=sys-apps/util-linux-2.16
- >=sys-libs/glibc-2.10"
-
-DEPEND="${COMMON_DEPEND}
- keymap? ( dev-util/gperf )
- dev-util/pkgconfig
- virtual/os-headers
- !<sys-kernel/linux-headers-2.6.34"
-
-if [[ $PV == "9999" ]]
-then
- RESTRICT="test? ( userpriv )"
- IUSE="${IUSE} test"
- DEPEND="${DEPEND}
- dev-util/gtk-doc
- test? ( app-text/tree )"
-else
- DEPEND="${DEPEND}
- doc? ( dev-util/gtk-doc )"
-fi
-
-RDEPEND="${COMMON_DEPEND}
- hwdb? ( >=sys-apps/usbutils-0.82 sys-apps/pciutils[-zlib] )
- acl? ( sys-apps/coreutils[acl] )
- !sys-apps/coldplug
- !<sys-fs/lvm2-2.02.45
- !sys-fs/device-mapper
- >=sys-apps/baselayout-1.12.5"
-
-# required kernel options
-CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
- ~!IDE ~BLK_DEV_BSG ~TMPFS_POSIX_ACL"
-
-udev_check_KV()
-{
- if kernel_is lt ${KV_min//./ }
- then
- return 1
- fi
- return 0
-}
-
-pkg_setup()
-{
- linux-info_pkg_setup
-
- # always print kernel version requirements
- ewarn
- ewarn "${P} does not support Linux kernel before version ${KV_min}!"
-
- if ! udev_check_KV
- then
- eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
- fi
-
- KV_FULL_SRC=${KV_FULL}
- get_running_version
- if ! udev_check_KV
- then
- eerror
- eerror "udev cannot be restarted after emerging,"
- eerror "as your running kernel version (${KV_FULL}) is too old."
- eerror "You really need to use a newer kernel after a reboot!"
- NO_RESTART=1
- fi
-}
-
-if [[ $PV == 9999 ]]
-then
- src_unpack()
- {
- git-2_src_unpack
- unset EGIT_BRANCH
- unset EGIT_COMMIT
- unset EGIT_DIR
- unset EGIT_MASTER
- EGIT_PROJECT="${scriptname}"
- EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${scriptname}.git"
- EGIT_SOURCEDIR="${WORKDIR}/${scriptname}"
- git-2_src_unpack
- }
-fi
-
-src_prepare()
-{
- # backport some patches
- if [[ -n "${patchset}" ]]
- then
- EPATCH_SOURCE="${WORKDIR}/${patchset}" EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" epatch
- fi
-
- # change rules back to group uucp instead of dialout for now
- sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
- -i rules/{rules.d,arch}/*.rules \
- || die "failed to change group dialout to uucp"
-
- if [[ ${PV} != 9999 ]]
- then
- # Make sure there is no sudden changes to upstream rules file
- # (more for my own needs than anything else ...)
- MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules")
- MD5=${MD5/ -/}
- if [[ ${MD5} != ${udev_rules_md5} ]]
- then
- eerror "50-udev-default.rules has been updated, please validate!"
- eerror "md5sum: ${MD5}"
- die "50-udev-default.rules has been updated, please validate!"
- fi
- fi
-
- if [[ ${PV} == 9999 ]]
- then
- gtkdocize --copy || die "gtkdocize failed"
- eautoreconf
- else
- elibtoolize
- fi
-}
-
-src_configure()
-{
- filter-flags -fprefetch-loop-arrays
- econf \
- --prefix="${EPREFIX}/usr" \
- --sysconfdir="${EPREFIX}/etc" \
- --sbindir="${EPREFIX}/sbin" \
- --libdir="${EPREFIX}/usr/$(get_libdir)" \
- --with-rootlibdir="${EPREFIX}/$(get_libdir)" \
- --libexecdir="${EPREFIX}/lib/udev" \
- --enable-logging \
- --enable-static \
- $(use_with selinux) \
- $(use_enable debug) \
- $(use_enable rule_generator) \
- $(use_enable hwdb) \
- --with-pci-ids-path="${EPREFIX}/usr/share/misc/pci.ids" \
- --with-usb-ids-path="${EPREFIX}/usr/share/misc/usb.ids" \
- $(use_enable acl udev_acl) \
- $(use_enable gudev) \
- $(use_enable introspection) \
- $(use_enable keymap) \
- $(use_enable floppy) \
- $(use_enable edd) \
- $(use_enable doc gtk-doc) \
- $(systemd_with_unitdir)
-}
-
-src_install()
-{
- emake DESTDIR="${D}" docdir="/usr/share/doc/${P}" install
-
- # documentation
- dodoc ChangeLog README TODO
-
- if use keymap
- then
- dodoc extras/keymap/README.keymap.txt
- fi
-
- # Upstream moved udevd to /lib/udev,, so symlnking it is the easiest option
- dosym "../lib/udev/udevd" /sbin/udevd
-
- # create symlinks for these utilities to /sbin
- # where multipath-tools expect them to be (Bug #168588)
- dosym "../lib/udev/scsi_id" /sbin/scsi_id
-
- # Add gentoo stuff to udev.conf
- echo "# If you need to change mount-options, do it in /etc/fstab" \
- >> "${ED}"/etc/udev/udev.conf
-
- # Now install rules
- insinto /lib/udev/rules.d/
-
- # support older kernels
- doins rules/misc/30-kernel-compat.rules
-
- # add arch specific rules
- if [[ -f rules/arch/40-${ARCH}.rules ]]
- then
- doins "rules/arch/40-${ARCH}.rules"
- fi
-
- cd "${WORKDIR}/${scriptname}"
- doconfd conf.d/*
- exeinto /lib/udev
- doexe helpers/*
- doinitd init.d/*
- insinto /etc/modprobe.d
- doins modprobe.d/*
- insinto /lib/udev/rules.d
- doins rules.d/*
-}
-
-# 19 Nov 2008
-fix_old_persistent_net_rules()
-{
- local rules=${EROOT}/etc/udev/rules.d/70-persistent-net.rules
- [[ -f ${rules} ]] || return
-
- elog
- elog "Updating persistent-net rules file"
-
- # Change ATTRS to ATTR matches, Bug #246927
- sed -i -e 's/ATTRS{/ATTR{/g' "${rules}"
-
- # Add KERNEL matches if missing, Bug #246849
- sed -ri \
- -e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \
- "${rules}"
-}
-
-# See Bug #129204 for a discussion about restarting udevd
-restart_udevd()
-{
- if [[ ${NO_RESTART} = "1" ]]
- then
- ewarn "Not restarting udevd, as your kernel is too old!"
- return
- fi
-
- # need to merge to our system
- [[ ${EROOT} = / ]] || return
-
- # check if root of init-process is identical to ours (not in chroot)
- [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return
-
- # abort if there is no udevd running
- [[ -n $(pidof udevd) ]] || return
-
- # abort if no /dev/.udev exists
- [[ -e /dev/.udev ]] || return
-
- elog
- elog "restarting udevd now."
-
- killall -15 udevd &>/dev/null
- sleep 1
- killall -9 udevd &>/dev/null
-
- /sbin/udevd --daemon
- sleep 3
- if [[ ! -n $(pidof udevd) ]]
- then
- eerror "FATAL: udev died, please check your kernel is"
- eerror "new enough and configured correctly for ${P}."
- eerror
- eerror "Please have a look at this before rebooting."
- eerror "If in doubt, please downgrade udev back to your old version"
- fi
-}
-
-postinst_init_scripts()
-{
- local enable_postmount=false
-
- # FIXME: inconsistent handling of init-scripts here
- # * udev is added to sysinit in openrc-ebuild
- # * we add udev-postmount to default in here
- #
-
- # If we are building stages, add udev to the sysinit runlevel automatically.
- if use build
- then
- if [[ -x "${EROOT}"/etc/init.d/udev \
- && -d "${EROOT}"/etc/runlevels/sysinit ]]
- then
- ln -s "${EPREFIX}"/etc/init.d/udev "${EROOT}"/etc/runlevels/sysinit/udev
- fi
- enable_postmount=true
- fi
-
- # migration to >=openrc-0.4
- if [[ -e "${EROOT}"/etc/runlevels/sysinit && ! -e "${EROOT}"/etc/runlevels/sysinit/udev ]]
- then
- ewarn
- ewarn "You need to add the udev init script to the runlevel sysinit,"
- ewarn "else your system will not be able to boot"
- ewarn "after updating to >=openrc-0.4.0"
- ewarn "Run this to enable udev for >=openrc-0.4.0:"
- ewarn "\trc-update add udev sysinit"
- ewarn
- fi
-
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, 2009/10/15
-
- # already enabled?
- [[ -e "${EROOT}"/etc/runlevels/default/udev-postmount ]] && return
-
- [[ -e "${EROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
- [[ "${EROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
-
- if $enable_postmount
- then
- local initd=udev-postmount
-
- if [[ -e ${EROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${EROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf "${EPREFIX}"/etc/init.d/${initd} "${EROOT}"/etc/runlevels/default/${initd}
- elog "Auto-adding '${initd}' service to your default runlevel"
- fi
- else
- elog "You should add the udev-postmount service to default runlevel."
- elog "Run this to add it:"
- elog "\trc-update add udev-postmount default"
- fi
-}
-
-# This function determines if a directory is a mount point.
-# It was lifted from dracut.
-ismounted()
-{
- while read a m a; do
- [ "$m" = "$1" ] && return 0
- done < "${EROOT}"/proc/mounts
- return 1
-}
-
-pkg_postinst()
-{
- fix_old_persistent_net_rules
-
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
- # So try to remove it here (will only work if empty).
- rmdir "${EROOT}"/dev/loop 2>/dev/null
- if [[ -d "${EROOT}"/dev/loop ]]
- then
- ewarn "Please make sure your remove /dev/loop,"
- ewarn "else losetup may be confused when looking for unused devices."
- fi
-
- restart_udevd
-
- postinst_init_scripts
-
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- # Removing some device-nodes we thought we need some time ago, 25 Jan 2007
- if [[ -d ${EROOT}/lib/udev/devices ]]
- then
- rm -f "${EROOT}"/lib/udev/devices/{null,zero,console,urandom}
- fi
-
- # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
- if [[ -d ${EROOT}/etc/dev.d ]]
- then
- rmdir --ignore-fail-on-non-empty "${EROOT}"/etc/dev.d/default "${EROOT}"/etc/dev.d 2>/dev/null
- if [[ -d ${EROOT}/etc/dev.d ]]
- then
- ewarn "You still have the directory /etc/dev.d on your system."
- ewarn "This is no longer used by udev and can be removed."
- fi
- fi
-
- # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
- # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
- if [[ -f ${EROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
- ! has_version sys-fs/device-mapper
- then
- rm -f "${EROOT}"/etc/udev/rules.d/64-device-mapper.rules
- einfo "Removed unneeded file 64-device-mapper.rules"
- fi
-
- # requested in Bug #225033:
- elog
- elog "persistent-net assigns fixed names to network devices."
- elog "If you have problems with the persistent-net rules,"
- elog "just delete the rules file"
- elog "\trm ${EROOT}etc/udev/rules.d/70-persistent-net.rules"
- elog "then reboot."
- elog
- elog "This may however number your devices in a different way than they are now."
-
- ewarn
- ewarn "If you build an initramfs including udev, then please"
- ewarn "make sure that the /sbin/udevadm binary gets included,"
- ewarn "and your scripts changed to use it,as it replaces the"
- ewarn "old helper apps udevinfo, udevtrigger, ..."
-
- ewarn
- ewarn "mount options for directory /dev are no longer"
- ewarn "set in /etc/udev/udev.conf, but in /etc/fstab"
- ewarn "as for other directories."
-
- ewarn
- ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*,"
- ewarn "then please migrate over to using the device names"
- ewarn "/dev/md*, /dev/loop* and /dev/ram*."
- ewarn "The devfs-compat rules have been removed."
- ewarn "For reference see Bug #269359."
-
- ewarn
- ewarn "Rules for /dev/hd* devices have been removed"
- ewarn "Please migrate to libata."
-
- ewarn
- ewarn "action_modeswitch has been removed by upstream."
- ewarn "Please use sys-apps/usb_modeswitch."
-
- if ismounted /usr
- then
- ewarn
- ewarn "Your system has /usr on a separate partition. This means"
- ewarn "you will need to use an initramfs to pre-mount /usr before"
- ewarn "udev runs."
- ewarn "This must be set up before your next reboot, or you may"
- ewarn "experience failures which are very difficult to troubleshoot."
- ewarn "For a more detailed explanation, see the following URL:"
- ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken"
- fi
-
- elog
- elog "For more information on udev on Gentoo, writing udev rules, and"
- elog " fixing known issues visit:"
- elog " http://www.gentoo.org/doc/en/udev-guide.xml"
-}