diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2009-03-10 11:55:40 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2009-03-10 11:55:40 +0000 |
commit | 70f73a62bac091314fd4d50d6223fec43dc70690 (patch) | |
tree | 5d2cacf75bd7e56395480fe01269f67f59020e62 /app-benchmarks | |
parent | Default to xfce-4.6.0 (diff) | |
download | gentoo-2-70f73a62bac091314fd4d50d6223fec43dc70690.tar.gz gentoo-2-70f73a62bac091314fd4d50d6223fec43dc70690.tar.bz2 gentoo-2-70f73a62bac091314fd4d50d6223fec43dc70690.zip |
Use a private copy of /dev/null to not interfere with udev startup, Bug #261759.
(Portage version: 2.1.6.7/cvs/Linux i686)
Diffstat (limited to 'app-benchmarks')
-rw-r--r-- | app-benchmarks/bootchart/ChangeLog | 9 | ||||
-rw-r--r-- | app-benchmarks/bootchart/bootchart-0.9-r3.ebuild | 124 | ||||
-rw-r--r-- | app-benchmarks/bootchart/files/bootchart-0.9-dev-null.patch | 37 |
3 files changed, 169 insertions, 1 deletions
diff --git a/app-benchmarks/bootchart/ChangeLog b/app-benchmarks/bootchart/ChangeLog index d70a4b89f980..90affbdb3f2d 100644 --- a/app-benchmarks/bootchart/ChangeLog +++ b/app-benchmarks/bootchart/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-benchmarks/bootchart # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart/ChangeLog,v 1.11 2009/01/08 20:20:11 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart/ChangeLog,v 1.12 2009/03/10 11:55:40 zzam Exp $ + +*bootchart-0.9-r3 (10 Mar 2009) + + 10 Mar 2009; Matthias Schwarzott <zzam@gentoo.org> + +files/bootchart-0.9-dev-null.patch, +bootchart-0.9-r3.ebuild: + Use a private copy of /dev/null to not interfere with udev startup, Bug + #261759. 08 Jan 2009; Patrick Lauer <patrick@gentoo.org> -bootchart-0.9-r1.ebuild: Removing old diff --git a/app-benchmarks/bootchart/bootchart-0.9-r3.ebuild b/app-benchmarks/bootchart/bootchart-0.9-r3.ebuild new file mode 100644 index 000000000000..5186d21a82f6 --- /dev/null +++ b/app-benchmarks/bootchart/bootchart-0.9-r3.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart/bootchart-0.9-r3.ebuild,v 1.1 2009/03/10 11:55:40 zzam Exp $ + +inherit multilib eutils java-pkg-opt-2 java-ant-2 + +DESCRIPTION="Performance analysis and visualization of the system boot process" +HOMEPAGE="http://www.bootchart.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="acct debug doc java source" + +DEPEND=" + java? ( + >=virtual/jdk-1.4 + >=dev-java/ant-core-1.4 + dev-java/commons-cli + source? ( app-arch/zip ) + ) +" +RDEPEND=" + java? ( + >=virtual/jdk-1.4 + dev-java/commons-cli + ) + acct? ( sys-process/acct ) +" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}"-gentoo.patch + epatch "${FILESDIR}/${P}"-sh.patch + epatch "${FILESDIR}/${P}"-dev-null.patch + + # delete the included commons-cli and use gentoo's instead + # The rest of lib is also bundled but a bit problematic to + # package https://bugs.gentoo.org/show_bug.cgi?id=162788 + rm -rf lib/org/apache/commons/cli lib/org/apache/commons/lang + + if use java ; then + java-ant_rewrite-classpath + sed -i -e 's,AUTO_RENDER="no",AUTO_RENDER="yes",g' \ + script/bootchartd.conf + fi + + if use acct ; then + sed -i -e 's,PROCESS_ACCOUNTING="no",PROCESS_ACCOUNTING="yes",g' \ + script/bootchartd.conf + fi +} + +src_compile() { + if use java ; then + local antflags="jar -Dcompiler.nowarn=true $(use_doc)" + use debug || antflags="${antflags} -Dbuild.debug=false" + eant ${antflags} \ + -Dgentoo.classpath="$(java-pkg_getjars commons-cli-1):./build" + fi +} + +src_install() { + dodoc README README.logger ChangeLog TODO + + # No need for this with baselayout-2 + if has_version "<sys-apps/baselayout-2"; then + insinto /$(get_libdir)/rcscripts/addons + doins "${FILESDIR}"/profiling-functions.sh + fi + + into / + newsbin script/bootchartd bootchartd + into /usr + + # This dir is normally empty, but is used to bind to the + # temporary dir bootchart normally makes. We do this so + # that our profiling script can write to a fixed location. + keepdir /lib/bootchart + + insinto /etc + doins script/bootchartd.conf + + if use java ; then + java-pkg_dojar "${PN}.jar" + use doc && java-pkg_dojavadoc javadoc/api + use source && java-pkg_dosrc src/org + java-pkg_dolauncher ${PN} \ + --main org.bootchart.Main \ + --java_args "-Djava.awt.headless=true" + fi +} + +pkg_postinst() { + if has_version "<sys-apps/baselayout-2"; then + elog "To generate the chart, set RC_USE_BOOTCHART=\"yes\"" + elog "in /etc/conf.d/rc and reboot" + else + elog "To generate the chart, append this to your kernel commandline" + elog " init=/sbin/bootchartd" + elog "and reboot" + fi + elog + + if use java; then + elog "The chart will be saved as /var/log/bootchart.png" + else + elog "Post the file /var/log/bootchart.tgz here:" + elog " http://www.bootchart.org/download.html" + elog "to render the chart" + fi + + elog + elog "For best results: " + elog " Enable BSD process accounting v3 in the kernel" + elog " This will produce more accurate process trees" + elog " Set AUTO_RENDER_FORMAT to svg in /etc/bootchartd.conf" + elog " and view /var/log/bootchart.svgz with batik or" + elog " Adobe SVG viewer. This will give you additional" + elog " information about the processes in tooltips" +} diff --git a/app-benchmarks/bootchart/files/bootchart-0.9-dev-null.patch b/app-benchmarks/bootchart/files/bootchart-0.9-dev-null.patch new file mode 100644 index 000000000000..a0f0b1a81b85 --- /dev/null +++ b/app-benchmarks/bootchart/files/bootchart-0.9-dev-null.patch @@ -0,0 +1,37 @@ +Do not interfere with udev startup. +Running udev looks like this: +1. mounting empty tmpfs on /dev +2. mknod /dev/null and some others +3. Running udevd --daemonize + +A running bootchartd writes to /dev/null all the time and so +creates a file /dev/null between 1 and 2. mknod refuses to overwrite files +and so udevd's stdin/out/err are connected to a file that gets deleted once +udevd creates all devices. So we buffer a useless file in memory as long as the +system runs. + +Solution: Let bootchartd use its private copy of /dev/null + +--- script/bootchartd.orig 2009-03-08 20:44:36.000000000 +0100 ++++ script/bootchartd 2009-03-08 20:54:03.000000000 +0100 +@@ -57,6 +57,9 @@ + + [ -n "$LAZY_UMOUNT" ] && umount -nfl "$LOG_DIR" + ++ # do not interfere with udev startup ++ mknod -m 666 null c 1 3 ++ + # Enable process accounting if configured + if [ "$PROCESS_ACCOUNTING" = "yes" ]; then + > kernel_pacct +@@ -108,8 +111,8 @@ + uptime=${uptime%%.*}${uptime##*.} + echo $uptime + +- # Log the command output +- eval $cmd 2>/dev/null ++ # Log the command output, errors go to our private /dev/null ++ eval $cmd 2>null + echo + sleep $SAMPLE_PERIOD + done >> "$logfile" || stop |