diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-09-21 02:03:32 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-09-21 02:03:32 +0000 |
commit | 3be1f8b305e6de1d2c85bf10a493cd99bd0f577a (patch) | |
tree | 7df7a7b7019dba67184a4ab9a61db9630400772d /sys-apps/readahead-list | |
parent | Removed old, closing #284558 (diff) | |
download | gentoo-2-3be1f8b305e6de1d2c85bf10a493cd99bd0f577a.tar.gz gentoo-2-3be1f8b305e6de1d2c85bf10a493cd99bd0f577a.tar.bz2 gentoo-2-3be1f8b305e6de1d2c85bf10a493cd99bd0f577a.zip |
Make this baseline happy with OpenRC.
(Portage version: 2.2_rc40/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/readahead-list')
-rw-r--r-- | sys-apps/readahead-list/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/readahead-list/files/conf.d-readahead-list | 16 | ||||
-rw-r--r-- | sys-apps/readahead-list/files/init.d-readahead-list | 23 | ||||
-rw-r--r-- | sys-apps/readahead-list/files/init.d-readahead-list-early | 23 | ||||
-rw-r--r-- | sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild | 61 |
5 files changed, 132 insertions, 2 deletions
diff --git a/sys-apps/readahead-list/ChangeLog b/sys-apps/readahead-list/ChangeLog index e136186e331a..e9617fbb691e 100644 --- a/sys-apps/readahead-list/ChangeLog +++ b/sys-apps/readahead-list/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/readahead-list -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/readahead-list/ChangeLog,v 1.16 2008/09/26 14:56:40 loki_val Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/readahead-list/ChangeLog,v 1.17 2009/09/21 02:03:32 robbat2 Exp $ + +*readahead-list-1.20060421.1016-r1 (21 Sep 2009) + + 21 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> + +readahead-list-1.20060421.1016-r1.ebuild, +files/conf.d-readahead-list, + +files/init.d-readahead-list, +files/init.d-readahead-list-early: + Make this baseline happy with OpenRC. 26 Sep 2008; Peter Alfredsen <loki_val@gentoo.org> +files/readahead-list-1.20060421.1016-gcc-4.3.patch, diff --git a/sys-apps/readahead-list/files/conf.d-readahead-list b/sys-apps/readahead-list/files/conf.d-readahead-list new file mode 100644 index 000000000000..15e8ce023585 --- /dev/null +++ b/sys-apps/readahead-list/files/conf.d-readahead-list @@ -0,0 +1,16 @@ +#!/sbin/runscript +# Copyright 2005 Robin H. Johnson <robbat2@orbis-terrarum.net> +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/readahead-list/files/conf.d-readahead-list,v 1.1 2009/09/21 02:03:32 robbat2 Exp $ + +# this list is intended for usage very early +READAHEAD_LIST_exec_sbin_rc="/etc/readahead-list/exec_sbin_rc" + +# per-runlevel +READAHEAD_LIST_runlevel_boot="/etc/readahead-list/runlevel-boot" +READAHEAD_LIST_runlevel_default="/etc/readahead-list/runlevel-default" + +READAHEAD_LIST_call_early="${!READAHEAD_LIST_exec_sbin_rc} ${!READAHEAD_LIST_runlevel_boot}" +READAHEAD_LIST_call_main="${!READAHEAD_LIST_runlevel_default}" + +# vim: ts=4 sw=4 diff --git a/sys-apps/readahead-list/files/init.d-readahead-list b/sys-apps/readahead-list/files/init.d-readahead-list new file mode 100644 index 000000000000..77a70959d104 --- /dev/null +++ b/sys-apps/readahead-list/files/init.d-readahead-list @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 2005 Robin H. Johnson <robbat2@orbis-terrarum.net> +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/readahead-list/files/init.d-readahead-list,v 1.1 2009/09/21 02:03:32 robbat2 Exp $ + +depend() { + after localmount + # this should start as early as possible + # we can't do 'before *' as that breaks it + before clock bootmisc consolefont keymaps rmnologin serial urandom +} + +start() { + # force reading + source /etc/conf.d/readahead-list + + f="${READAHEAD_LIST_call_main}" + ebegin "readahead(2): ${f}" + /sbin/readahead-list ${f} + eend $? +} + +# vim: ts=4 sw=4 diff --git a/sys-apps/readahead-list/files/init.d-readahead-list-early b/sys-apps/readahead-list/files/init.d-readahead-list-early new file mode 100644 index 000000000000..2aeaa1f745f2 --- /dev/null +++ b/sys-apps/readahead-list/files/init.d-readahead-list-early @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 2005 Robin H. Johnson <robbat2@orbis-terrarum.net> +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/readahead-list/files/init.d-readahead-list-early,v 1.1 2009/09/21 02:03:32 robbat2 Exp $ + + +depend() { + after checkroot + # this should start as early as possible + # we can't do 'before *' as that breaks it + before hostname modules domainname crypto-loop checkfs localmount +} + +start() { + # force reading + source /etc/conf.d/readahead-list + f="${READAHEAD_LIST_call_early}" + ebegin "readahead(2): ${f}" + /sbin/readahead-list ${f} + eend $? +} + +# vim: ts=4 sw=4 diff --git a/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild new file mode 100644 index 000000000000..d5c393414de6 --- /dev/null +++ b/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/readahead-list/readahead-list-1.20060421.1016-r1.ebuild,v 1.1 2009/09/21 02:03:32 robbat2 Exp $ + +inherit base + +DESCRIPTION="Preloads files into the page cache to accelerate program loading." +HOMEPAGE="http://www.orbis-terrarum.net" +SRC_URI="mirror://gentoo/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="doc" + +# I'm not entirely certain about this +# need to check if other libc variants provide readahead(2) +RDEPEND="virtual/libc" +DEPEND="${RDEPEND} + virtual/os-headers" + +PATCHES=( "${FILESDIR}/${P}-gcc-4.3.patch" ) + +src_compile() { + econf --sbindir=/sbin || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + # init scripts + #cd "${S}/contrib/init/gentoo/" + newinitd "${FILESDIR}"/init.d-readahead-list readahead-list + newinitd "${FILESDIR}"/init.d-readahead-list-early readahead-list-early + newconfd "${FILESDIR}"/conf.d-readahead-list readahead-list + + # default config + insinto /etc/readahead-list + cd "${S}/contrib/data" + newins readahead.runlevel-default.list runlevel-default + newins readahead.runlevel-boot.list runlevel-boot + newins readahead._sbin_rc.list exec_sbin_rc + + # docs + cd "${S}" + dodoc README + if use doc; then + docinto scripts + dodoc contrib/scripts/* + fi + # clean up a bit + find "${D}/usr/share/doc/${PF}/" -type f -name 'Makefile*' -exec rm -f \{\} \; +} + +pkg_postinst() { + einfo "You should add readahead-list to your runlevels:" + einfo " rc-update add readahead-list-early boot" + einfo " rc-update add readahead-list boot" + einfo "Also consider customizing the lists in /etc/readahead-list" + einfo "for maximum performance gain." +} |