diff options
author | 2013-08-16 14:06:08 +0000 | |
---|---|---|
committer | 2013-08-16 14:06:08 +0000 | |
commit | 39b80c3dbf889916851eee660d14e1ecc85df2ae (patch) | |
tree | 61b4ba4584de841d9ed875c9ddb9df2f0d408702 /sys-apps | |
parent | Version bump (diff) | |
download | gentoo-2-39b80c3dbf889916851eee660d14e1ecc85df2ae.tar.gz gentoo-2-39b80c3dbf889916851eee660d14e1ecc85df2ae.tar.bz2 gentoo-2-39b80c3dbf889916851eee660d14e1ecc85df2ae.zip |
Revision bump for OpenRC >= 0.12 to make the "static-nodes" -> "kmod-static-nodes" switch for everyone.
(Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/kmod/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/kmod/kmod-14-r2.ebuild | 138 | ||||
-rw-r--r-- | sys-apps/kmod/kmod-9999.ebuild | 62 |
3 files changed, 165 insertions, 44 deletions
diff --git a/sys-apps/kmod/ChangeLog b/sys-apps/kmod/ChangeLog index 3a7b3c5680a0..d02474d92901 100644 --- a/sys-apps/kmod/ChangeLog +++ b/sys-apps/kmod/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/kmod # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v 1.105 2013/08/09 19:08:18 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v 1.106 2013/08/16 14:06:08 ssuominen Exp $ + +*kmod-14-r2 (16 Aug 2013) + + 16 Aug 2013; Samuli Suominen <ssuominen@gentoo.org> +kmod-14-r2.ebuild, + kmod-9999.ebuild: + Revision bump for OpenRC >= 0.12 to make the "static-nodes" -> "kmod-static- + nodes" switch for everyone. 09 Aug 2013; Samuli Suominen <ssuominen@gentoo.org> kmod-14-r1.ebuild, kmod-9999.ebuild, +files/kmod-static-nodes: diff --git a/sys-apps/kmod/kmod-14-r2.ebuild b/sys-apps/kmod/kmod-14-r2.ebuild new file mode 100644 index 000000000000..67879575d842 --- /dev/null +++ b/sys-apps/kmod/kmod-14-r2.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-14-r2.ebuild,v 1.1 2013/08/16 14:06:08 ssuominen Exp $ + +EAPI=5 + +VIRTUAL_MODUTILS=1 + +inherit autotools eutils libtool multilib linux-mod + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git" + inherit git-2 +else + SRC_URI="mirror://kernel/linux/utils/kernel/kmod/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +fi + +DESCRIPTION="library and tools for managing linux kernel modules" +HOMEPAGE="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git" + +LICENSE="LGPL-2" +SLOT="0" +IUSE="debug doc lzma +openrc static-libs +tools zlib" + +# Upstream does not support running the test suite with custom configure flags. +# I was also told that the test suite is intended for kmod developers. +# So we have to restrict it. +# See bug #408915. +RESTRICT="test" + +RDEPEND="!sys-apps/module-init-tools + !sys-apps/modutils + lzma? ( >=app-arch/xz-utils-5.0.4-r1 ) + openrc? ( >=sys-apps/openrc-0.12 ) + zlib? ( >=sys-libs/zlib-1.2.6 )" #427130 +DEPEND="${RDEPEND} + dev-libs/libxslt + doc? ( dev-util/gtk-doc ) + lzma? ( virtual/pkgconfig ) + zlib? ( virtual/pkgconfig )" + +pkg_setup() { + CONFIG_CHECK="~MODULES ~MODULE_UNLOAD" + linux-info_pkg_setup +} + +src_prepare() { + if [ ! -e configure ]; then + if use doc; then + gtkdocize --copy --docdir libkmod/docs || die + else + touch libkmod/docs/gtk-doc.make + fi + eautoreconf + else + elibtoolize + fi + + # Restore possibility of running --enable-static wrt #472608 + sed -i \ + -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \ + configure || die +} + +src_configure() { + econf \ + --bindir=/bin \ + --with-rootlibdir=/$(get_libdir) \ + --enable-shared \ + $(use_enable static-libs static) \ + $(use_enable tools) \ + $(use_enable debug) \ + $(use_enable doc gtk-doc) \ + $(use_with lzma xz) \ + $(use_with zlib) +} + +src_install() { + default + prune_libtool_files + + if use tools; then + local bincmd sbincmd + for sbincmd in depmod insmod lsmod modinfo modprobe rmmod; do + dosym /bin/kmod /sbin/${sbincmd} + done + + # These are also usable as normal user + for bincmd in lsmod modinfo; do + dosym kmod /bin/${bincmd} + done + fi + + cat <<-EOF > "${T}"/usb-load-ehci-first.conf + softdep uhci_hcd pre: ehci_hcd + softdep ohci_hcd pre: ehci_hcd + EOF + + insinto /lib/modprobe.d + doins "${T}"/usb-load-ehci-first.conf #260139 + + use openrc && doinitd "${FILESDIR}"/kmod-static-nodes +} + +pkg_postinst() { + # Upgrade path from sys-apps/module-init-tools + if [[ -d ${ROOT}/lib/modules/${KV_FULL} ]]; then + if [[ -z ${REPLACING_VERSIONS} ]]; then + update_depmod + fi + fi + + if use openrc; then + # Add kmod to the runlevel automatically if this is the first install of this package. + if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then + ewarn "Removing deprecated static-nodes init script from the boot runlevel" + rm -f "${ROOT}"etc/runlevels/boot/static-nodes + fi + + if [[ -z ${REPLACING_VERSIONS} ]]; then + if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d ${ROOT}etc/runlevels/sysinit ]]; then + ln -s /etc/init.d/kmod-static-nodes "${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes + fi + fi + + if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then + if [[ ! -e ${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then + ewarn + ewarn "You need to add kmod-static-nodes to the sysinit runlevel." + ewarn "If you do not do this," + ewarn "your system will not necessarily have the required static nodes!" + ewarn "Run this command:" + ewarn "\trc-update add kmod-static-nodes sysinit" + fi + fi + fi +} diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild index 94746d70db9b..aa4bda65aca3 100644 --- a/sys-apps/kmod/kmod-9999.ebuild +++ b/sys-apps/kmod/kmod-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v 1.61 2013/08/09 20:29:53 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v 1.62 2013/08/16 14:06:08 ssuominen Exp $ EAPI=5 @@ -32,6 +32,7 @@ RESTRICT="test" RDEPEND="!sys-apps/module-init-tools !sys-apps/modutils lzma? ( >=app-arch/xz-utils-5.0.4-r1 ) + openrc? ( >=sys-apps/openrc-0.12 ) zlib? ( >=sys-libs/zlib-1.2.6 )" #427130 DEPEND="${RDEPEND} dev-libs/libxslt @@ -99,13 +100,7 @@ src_install() { insinto /lib/modprobe.d doins "${T}"/usb-load-ehci-first.conf #260139 - if use openrc; then - if has_version '>=sys-apps/openrc-0.12'; then - doinitd "${FILESDIR}"/kmod-static-nodes - else - doinitd "${FILESDIR}"/static-nodes - fi - fi + use openrc && doinitd "${FILESDIR}"/kmod-static-nodes } pkg_postinst() { @@ -118,44 +113,25 @@ pkg_postinst() { if use openrc; then # Add kmod to the runlevel automatically if this is the first install of this package. - if has_version '>=sys-apps/openrc-0.12'; then - if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then - ewarn "Removing deprecated static-nodes init script from the boot runlevel" - rm -f "${ROOT}"etc/runlevels/boot/static-nodes - fi - - if [[ -z ${REPLACING_VERSIONS} ]]; then - if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d ${ROOT}etc/runlevels/sysinit ]]; then - ln -s /etc/init.d/kmod-static-nodes "${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes - fi - fi + if [[ -L ${ROOT}etc/runlevels/boot/static-nodes ]]; then + ewarn "Removing deprecated static-nodes init script from the boot runlevel" + rm -f "${ROOT}"etc/runlevels/boot/static-nodes + fi - if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then - if [[ ! -e ${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then - ewarn - ewarn "You need to add kmod-static-nodes to the boot runlevel." - ewarn "If you do not do this," - ewarn "your system will not necessarily have the required static nodes!" - ewarn "Run this command:" - ewarn "\trc-update add kmod-static-nodes sysinit" - fi - fi - else - if [[ -z ${REPLACING_VERSIONS} ]]; then - if [[ -x ${ROOT}etc/init.d/static-nodes && -d ${ROOT}etc/runlevels/boot ]]; then - ln -s /etc/init.d/static-nodes "${ROOT}"/etc/runlevels/boot/static-nodes - fi + if [[ -z ${REPLACING_VERSIONS} ]]; then + if [[ -x ${ROOT}etc/init.d/kmod-static-nodes && -d ${ROOT}etc/runlevels/sysinit ]]; then + ln -s /etc/init.d/kmod-static-nodes "${ROOT}"/etc/runlevels/sysinit/kmod-static-nodes fi + fi - if [[ -e ${ROOT}etc/runlevels/boot ]]; then - if [[ ! -e ${ROOT}etc/runlevels/boot/static-nodes ]]; then - ewarn - ewarn "You need to add static-nodes to the boot runlevel." - ewarn "If you do not do this," - ewarn "your system will not necessarily have the required static nodes!" - ewarn "Run this command:" - ewarn "\trc-update add static-nodes boot" - fi + if [[ -e ${ROOT}etc/runlevels/sysinit ]]; then + if [[ ! -e ${ROOT}etc/runlevels/sysinit/kmod-static-nodes ]]; then + ewarn + ewarn "You need to add kmod-static-nodes to the sysinit runlevel." + ewarn "If you do not do this," + ewarn "your system will not necessarily have the required static nodes!" + ewarn "Run this command:" + ewarn "\trc-update add kmod-static-nodes sysinit" fi fi fi |