diff -urN /home/pclouds/cvs/gentoo-x86/sys-apps/baselayout/baselayout-1.12.1.ebuild baselayout/baselayout-1.12.1.ebuild --- /home/pclouds/cvs/gentoo-x86/sys-apps/baselayout/baselayout-1.12.1.ebuild 2006-06-11 00:02:37.000000000 +0700 +++ baselayout/baselayout-1.12.1.ebuild 2006-07-20 09:21:04.000000000 +0700 @@ -14,7 +14,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="bootstrap build static unicode" +IUSE="bootchart bootstrap build static unicode" # This version of baselayout needs gawk in /bin, but as we do not have # a c++ compiler during bootstrap, we cannot depend on it if "bootstrap" @@ -24,7 +24,8 @@ >=sys-libs/readline-5.0-r1 >=app-shells/bash-3.1_p7 >=sys-apps/coreutils-5.2.1 - ) )" + ) ) + bootchart ( sys-apps/bootchart )" DEPEND="virtual/os-headers >=sys-apps/portage-2.0.51" PROVIDE="virtual/baselayout" @@ -33,6 +34,8 @@ unpack ${A} cd "${S}" + use bootchart && epatch ${FILESDIR}/${P}-bootchart.patch + # Setup unicode defaults for silly unicode users if use unicode ; then sed -i -e '/^UNICODE=/s:no:yes:' etc/rc.conf diff -urN /home/pclouds/cvs/gentoo-x86/sys-apps/baselayout/files/baselayout-1.12.1-bootchart.patch baselayout/files/baselayout-1.12.1-bootchart.patch --- /home/pclouds/cvs/gentoo-x86/sys-apps/baselayout/files/baselayout-1.12.1-bootchart.patch 1970-01-01 07:00:00.000000000 +0700 +++ baselayout/files/baselayout-1.12.1-bootchart.patch 2006-07-20 09:54:34.000000000 +0700 @@ -0,0 +1,71 @@ +diff -ur baselayout-1.12.1/etc/conf.d/rc baselayout-1.12.1.new/etc/conf.d/rc +--- baselayout-1.12.1/etc/conf.d/rc 2006-06-05 21:20:55.000000000 +0700 ++++ baselayout-1.12.1.new/etc/conf.d/rc 2006-07-20 09:19:09.000000000 +0700 +@@ -194,6 +194,10 @@ + # Pass ulimit parameters + #RC_ULIMIT="-u 30" + ++ ++# Set to "yes" if you want to benchmark system boot with bootchart ++#RC_USE_BOOTCHART="yes" ++ + ############################################################################## + + +diff -ur baselayout-1.12.1/sbin/rc baselayout-1.12.1.new/sbin/rc +--- baselayout-1.12.1/sbin/rc 2006-06-05 21:20:55.000000000 +0700 ++++ baselayout-1.12.1.new/sbin/rc 2006-07-20 09:09:50.000000000 +0700 +@@ -218,6 +218,9 @@ + try mount -n ${mntcmd:--t proc proc /proc} + eend $? + ++ # start profilint init since we have /proc ++ profiling start ++ + # Read off the kernel commandline to see if there's any special settings + # especially check to see if we need to set the CDBOOT environment variable + # Note: /proc MUST be mounted +@@ -389,6 +392,8 @@ + # Needed for some addons like dm-crypt that starts in critical services + local myservice="$1" + ++ profiling name "/etc/init.d/${service} start" ++ + source "/etc/init.d/${service}" + retval=$? + if [[ ${retval} -ne 0 ]] ; then +@@ -514,6 +519,8 @@ + # Now that the dependency cache are up to date, make sure these + # are marked as started ... + ( ++ profiling name "mark started" ++ + # Needed for mark_service_started() + source "${svclib}/sh/rc-services.sh" + +Only in baselayout-1.12.1.new/sbin: rc.orig +diff -ur baselayout-1.12.1/sbin/rc-services.sh baselayout-1.12.1.new/sbin/rc-services.sh +--- baselayout-1.12.1/sbin/rc-services.sh 2006-06-05 21:20:55.000000000 +0700 ++++ baselayout-1.12.1.new/sbin/rc-services.sh 2006-07-20 09:13:07.000000000 +0700 +@@ -407,7 +407,11 @@ + ${START_CRITICAL} == "yes" ]] ; then + # if we can not start the services in parallel + # then just start it and return the exit status +- ( "/etc/init.d/${service}" start ) ++ ( ++ profiling name "/etc/init.d/${service} start" ++ ++ "/etc/init.d/${service}" start ++ ) + service_started "${service}" || service_inactive "${service}" + retval=$? + end_service "${service}" "${retval}" +@@ -416,6 +420,8 @@ + else + # if parallel startup is allowed, start it in background + ( ++ profiling name "/etc/init.d/${service} start" ++ + "/etc/init.d/${service}" start + service_started "${service}" || service_inactive "${service}" + retval=$?