diff options
author | Henry Gebhardt <hsggebhardt@googlemail.com> | 2011-05-28 20:48:32 +0200 |
---|---|---|
committer | Henry Gebhardt <hsggebhardt@googlemail.com> | 2011-05-28 20:51:58 +0200 |
commit | 54924260baef2614a8ebd3570f1737f2e1bda374 (patch) | |
tree | a52a220e4a6d3b4bd34d4a59de05d4e5a7674680 | |
parent | app-benchmarks/bootchart2-0.14.0: Version bump with systemd files (diff) | |
download | systemd-54924260baef2614a8ebd3570f1737f2e1bda374.tar.gz systemd-54924260baef2614a8ebd3570f1737f2e1bda374.tar.bz2 systemd-54924260baef2614a8ebd3570f1737f2e1bda374.zip |
app-benchmark/bootchart2-0.14.0: Include changes from bug report
Include changes from the bootchart2 bug report[1]:
- OpenRC init script
- svg use-flag
- live ebuild
But don't include the systemd use-flag.
[1] http://bugs.gentoo.org/show_bug.cgi?id=345695
-rw-r--r-- | app-benchmarks/bootchart2/Manifest | 4 | ||||
-rw-r--r-- | app-benchmarks/bootchart2/bootchart2-0.14.0.ebuild | 66 | ||||
-rw-r--r-- | app-benchmarks/bootchart2/bootchart2-9999.ebuild | 87 | ||||
-rw-r--r-- | app-benchmarks/bootchart2/files/bootchart2 | 37 |
4 files changed, 181 insertions, 13 deletions
diff --git a/app-benchmarks/bootchart2/Manifest b/app-benchmarks/bootchart2/Manifest index 31e2176..dd63b78 100644 --- a/app-benchmarks/bootchart2/Manifest +++ b/app-benchmarks/bootchart2/Manifest @@ -1,2 +1,4 @@ +AUX bootchart2 928 RMD160 ddfb9486638f882997492aeb493349f15bfd3e77 SHA1 997e2efd184c134c140142a114190f95fecaa391 SHA256 8a57bb9a2827478467f5b7d183405af5c2b21ed6438551602dcb907e52e19370 DIST bootchart2-0.14.0.tar.bz2 775453 RMD160 5647845f8fd386e5de240c4219d33e3465b39820 SHA1 fb8bede9c4dbc39c8540f1a683fd9ea2f37a104f SHA256 30366efd679568d6d2b12715b01cba6964b55d294da9e1399995d3e15f6e6828 -EBUILD bootchart2-0.14.0.ebuild 1124 RMD160 47d38bc248c45ef1bdc18ef30818cb56c6033034 SHA1 1f7e2efe989ae5f2baca1a8d5c3807403e70858e SHA256 fe85bba1cd875d768e484764c394f96c7c9dc881640de9c1a55d6b0c305d50a6 +EBUILD bootchart2-0.14.0.ebuild 2051 RMD160 ae16a266b60ad9becfa987bb87e01dd4724ab394 SHA1 6a60ed2036619f1425f85e074d0fbdd9a47dabcc SHA256 b18d21769bfcdb877daaa0b9df4a3c94a296566aac7400c3a2cec04bc62e4164 +EBUILD bootchart2-9999.ebuild 2051 RMD160 ae16a266b60ad9becfa987bb87e01dd4724ab394 SHA1 6a60ed2036619f1425f85e074d0fbdd9a47dabcc SHA256 b18d21769bfcdb877daaa0b9df4a3c94a296566aac7400c3a2cec04bc62e4164 diff --git a/app-benchmarks/bootchart2/bootchart2-0.14.0.ebuild b/app-benchmarks/bootchart2/bootchart2-0.14.0.ebuild index 72c94b9..0563c63 100644 --- a/app-benchmarks/bootchart2/bootchart2-0.14.0.ebuild +++ b/app-benchmarks/bootchart2/bootchart2-0.14.0.ebuild @@ -2,43 +2,85 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="2" +EAPI="3" -inherit eutils linux-info +inherit eutils multilib python linux-info systemd DESCRIPTION="Performance analysis and visualization of the system boot process" HOMEPAGE="https://github.com/mmeeks/bootchart" -SRC_URI="https://github.com/downloads/mmeeks/bootchart/bootchart2-${PV}.tar.bz2" -LICENSE="GPL-3" +if [[ "${PV}" = "9999" ]]; then + SRC_URI="" + KEYWORDS="" + EGIT_REPO_URI="git://github.com/mmeeks/bootchart.git" + inherit git +else + SRC_URI="https://github.com/downloads/mmeeks/bootchart/bootchart2-${PV}.tar.bz2" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="svg" CONFIG_CHECK="~PROC_EVENTS ~TASKSTATS ~TASK_DELAY_ACCT" -RDEPEND="!app-benchmarks/bootchart - dev-lang/python" +RDEPEND="dev-lang/python + !app-benchmarks/bootchart + dev-python/pycairo[svg=]" DEPEND="${RDEPEND}" pkg_setup() { linux-info_pkg_setup } +src_unpack() { + if [[ "${PV}" = "9999" ]]; then + git_src_unpack + else + unpack ${A} + fi +} + +src_prepare() { + # correct the version + if [[ "${PV}" = "9999" ]]; then + sed -i Makefile -e "s:VER=$(cat Makefile | grep VER= | cut -d"=" -f2):VER=git-$(date +%Y%m%d):" + fi + + # make systemd unit dir configurable + sed -i Makefile -e 's:^SYSTEMD_UNIT_DIR = :SYSTEMD_UNIT_DIR ?= :' +} + src_compile() { - emake || die + emake \ + LIBDIR="$(get_libdir)" || die "died running make, $FUNCNAME" } src_install() { - dodoc AUTHORS README README.pybootchart COPYING NEWS TODO || die + emake \ + DESTDIR="${D}" \ + LIBDIR="$(get_libdir)" \ + PY_LIBDIR="$(python_get_libdir)" \ + SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" \ + DOCDIR="/usr/share/doc/${PN}-${PVR}" \ + install || die "died running make install, $FUNCNAME" + + keepdir /$(get_libdir)/bootchart/tmpfs + + doinitd "${FILESDIR}/${PN}" - emake DESTDIR="${D}" install || die "died running make install, $FUNCNAME" + prepalldocs + + dodoc README README.pybootchart AUTHORS MAINTAINERS NEWS TODO || die } pkg_postinst() { - elog "To generate the chart, append this to your kernel commandline" + elog "To generate the chart, generate a ramdisk with bootchart support," + elog "append this to your kernel commandline" elog " initcall_debug printk.time=y quiet init=/sbin/bootchartd" elog "and reboot" + elog elog "Note: genkernel users should replace init= with real_init= in the above" elog "see https://bugs.gentoo.org/show_bug.cgi?id=275251 for more info" elog diff --git a/app-benchmarks/bootchart2/bootchart2-9999.ebuild b/app-benchmarks/bootchart2/bootchart2-9999.ebuild new file mode 100644 index 0000000..0563c63 --- /dev/null +++ b/app-benchmarks/bootchart2/bootchart2-9999.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +inherit eutils multilib python linux-info systemd + +DESCRIPTION="Performance analysis and visualization of the system boot process" +HOMEPAGE="https://github.com/mmeeks/bootchart" + +if [[ "${PV}" = "9999" ]]; then + SRC_URI="" + KEYWORDS="" + EGIT_REPO_URI="git://github.com/mmeeks/bootchart.git" + inherit git +else + SRC_URI="https://github.com/downloads/mmeeks/bootchart/bootchart2-${PV}.tar.bz2" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="svg" + +CONFIG_CHECK="~PROC_EVENTS ~TASKSTATS ~TASK_DELAY_ACCT" + +RDEPEND="dev-lang/python + !app-benchmarks/bootchart + dev-python/pycairo[svg=]" +DEPEND="${RDEPEND}" + +pkg_setup() { + linux-info_pkg_setup +} + +src_unpack() { + if [[ "${PV}" = "9999" ]]; then + git_src_unpack + else + unpack ${A} + fi +} + +src_prepare() { + # correct the version + if [[ "${PV}" = "9999" ]]; then + sed -i Makefile -e "s:VER=$(cat Makefile | grep VER= | cut -d"=" -f2):VER=git-$(date +%Y%m%d):" + fi + + # make systemd unit dir configurable + sed -i Makefile -e 's:^SYSTEMD_UNIT_DIR = :SYSTEMD_UNIT_DIR ?= :' +} + +src_compile() { + emake \ + LIBDIR="$(get_libdir)" || die "died running make, $FUNCNAME" +} + +src_install() { + emake \ + DESTDIR="${D}" \ + LIBDIR="$(get_libdir)" \ + PY_LIBDIR="$(python_get_libdir)" \ + SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" \ + DOCDIR="/usr/share/doc/${PN}-${PVR}" \ + install || die "died running make install, $FUNCNAME" + + keepdir /$(get_libdir)/bootchart/tmpfs + + doinitd "${FILESDIR}/${PN}" + + prepalldocs + + dodoc README README.pybootchart AUTHORS MAINTAINERS NEWS TODO || die +} + +pkg_postinst() { + elog "To generate the chart, generate a ramdisk with bootchart support," + elog "append this to your kernel commandline" + elog " initcall_debug printk.time=y quiet init=/sbin/bootchartd" + elog "and reboot" + elog + elog "Note: genkernel users should replace init= with real_init= in the above" + elog "see https://bugs.gentoo.org/show_bug.cgi?id=275251 for more info" + elog +} diff --git a/app-benchmarks/bootchart2/files/bootchart2 b/app-benchmarks/bootchart2/files/bootchart2 new file mode 100644 index 0000000..a08dcff --- /dev/null +++ b/app-benchmarks/bootchart2/files/bootchart2 @@ -0,0 +1,37 @@ +#!/sbin/runscript + +depend() +{ + # Mostly to get a somewhat sane env and not break dependecy chains + after localmount +} + +start() +{ + # Only do anything if bootchart was started in ramdisk + if /bin/grep -q "rdinit=/sbin/bootchartd" /proc/cmdline + then + ebegin "Scheduling termination of Bootchart" + if /bin/pidof bootchart-collector > /dev/null 2>&1 + then + # We want the script to keep running in background + # while the init script ends to not block baselayout + ( + /sbin/bootchartd wait + /sbin/bootchartd stop + ) & + eend 0 + else + eerror "No bootchart process found, no bootchart in ramdisk?" + eend 1 + fi + else + ewarn "No bootchart process found!" + eindent + ewarn "This script does not start bootchart, but only schedules its termination." + ewarn "Bootchart should be started from the kernel command line out of the ramdisk." + ewarn "Please check the README on how to do that." + eoutdent + eend 0 + fi +} |