Name: bootchart Version: 1.20 Release: 1mamba Summary: Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process Group: System/Benchmarks Vendor: openmamba Distribution: openmamba Packager: Stefano Cotta Ramusino URL: http://www.bootchart.org/ Source: http://foo-projects.org/~sofar/bootchart/bootchart-%{version}.tar.gz #Source: http://downloads.sourceforge.net/sourceforge/bootchart/bootchart-%{version}.tar.bz2 Source1: http://zerodeux.net/misc/bootchart/bootchart_pl Source2: bootchart.sh Source3: kbootchart Source4: kbootchart.png Source5: bootchart-grub2 Patch0: %{name}-0.9-nojavafunctions.patch Patch1: %{name}-0.9-svg_path.patch License: GPL Requires: curl Requires: %{name}-logger BuildRequires: apache-ant BuildRequires: jdk BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart. Bootchart provides a shell script to be run by the kernel in the init phase. The script will run in background and collect process information, CPU statistics and disk usage statistics from the /proc file system. The performance data are stored in memory and are written to disk once the boot process completes. The boot log file is later processed using a Java application (or the web form) which builds the process tree and renders a performance chart in different formats: SVG e EPS. The chart can then be analyzed to examine process dependency and overall resource utilization. %package logger Summary: Boot logging script for %{name} Group: System/Kernel and Hardware %description logger Boot logging script for %{name}. %prep %setup -q #%patch0 -p1 cp %{S:1} %{name}.pl %patch1 -p1 %build #JAVA_HOME=%{_jvmdir}/jdk ANT_HOME=/opt/java/ant ant %configure %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall ## install scripts #install -D -m 755 script/%{name} \ # %{buildroot}%{_bindir}/%{name} #install -D -m 755 %{name}.pl \ # %{buildroot}%{_bindir}/%{name}.pl #install -D -m 755 %{S:2} \ # %{buildroot}%{_bindir}/%{name}.sh #install -d %{buildroot}%{_datadir}/%{name}/svg #install -m 644 svg/* \ # %{buildroot}%{_datadir}/%{name}/svg # ## install java files #install -D -m 644 %{name}.jar \ # %{buildroot}%{_javadir}/%{name}-%{version}.jar #ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar #install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version} #cp -pr javadoc/* \ # %{buildroot}%{_javadocdir}/%{name}-%{version} #ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} ## install logger #install -D -m 755 script/bootchartd \ # %{buildroot}/sbin/bootchartd ##install -D -m 644 script/bootchartd.conf \ # %{buildroot}%{_sysconfdir}/bootchartd.conf # # install kde frontend install -D -m 755 %{S:3} \ %{buildroot}%{_bindir}/k%{name} install -D -m 644 %{S:4} \ %{buildroot}%{_datadir}/icons/crystalsvg/32x32/apps/k%{name}.png # install grub.d file install -D -m 0755 %{S:5} %{buildroot}%{_sysconfdir}/grub.d/15_bootchart # create KDE menu link install -d %{buildroot}/%{_datadir}/applications cat > %{buildroot}/%{_datadir}/applications/k%{name}.desktop </dev/null); do if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -ne 0 ]; then sed -i "s|^kernel\(.*\)|kernel \1 init=/sbin/%{name}d|" $i 2> /dev/null fi done %endif %if "%{_target_cpu}" == "ppc" for i in $(ls %{_sysconfdir}/yaboot/conf.d/%{distribution}-* 2>/dev/null); do if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -ne 0 ]; then sed -i "s|^append=\"\(.*\)\"|append=\"\1 init=/sbin/%{name}d\"|" $i 2> /dev/null fi done %endif fi if [ $1 -eq 1 ]; then # new install %if "%{_target_cpu}" == "i586" [ -x /usr/sbin/update-grub ] && /usr/sbin/update-grub %endif %if "%{_target_cpu}" == "ppc" [ -x /usr/sbin/yaboot-update ] && /usr/sbin/yaboot-update %endif fi exit 0 %postun logger if [ $1 -eq 0 ]; then # uninstall %if "%{_target_cpu}" == "i586" for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then sed -i "s|^kernel\(.*\) init=/sbin/%{name}d\(.*\)|kernel \1\2|" $i 2> /dev/null fi done %endif %if "%{_target_cpu}" == "ppc" for i in $(ls %{_sysconfdir}/yaboot/conf.d/%{distribution}-* 2>/dev/null); do if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then sed -i "s|^append=\"\(.*\) init=/sbin/%{name}d\(.*\)\"|append=\"\1\2\"|" $i 2> /dev/null fi done %endif fi exit 0 %files %defattr(-,root,root) %{_bindir}/kbootchart #%{_datadir}/%{name}/svg #%{_javadir}/* %{_datadir}/applications/k%{name}.desktop %{_datadir}/icons/crystalsvg/32x32/apps/k%{name}.png #%{_javadocdir}/* %doc COPYING README #%doc TODO %files logger %defattr(-,root,root) %{_sysconfdir}/grub.d/15_bootchart %{_sbindir}/bootchartd %{_datadir}/doc/bootchart/bootchartd.conf.example #%config(noreplace) %{_sysconfdir}/%{name}d.conf #%doc README.logger %changelog * Sat Dec 01 2012 Automatic Build System 1.20-1mamba - update to 1.20 * Mon May 09 2011 Silvan Calarco 0.9-7mamba - updated grub2 configuration file to use grub-mkconfig_lib instead of deprecated update-grub_lib * Fri Feb 05 2010 Silvan Calarco 0.9-6mamba - rebuilt to remove executable requirements * Tue Oct 14 2008 Silvan Calarco 0.9-5mamba - updated for grub2 * Tue Oct 14 2008 Silvan Calarco 0.9-4mamba - rebuilt * Mon Feb 19 2007 Silvan Calarco 0.9-3qilnx - add an exit 0 to scripts * Wed Nov 15 2006 Stefano Cotta Ramusino 0.9-2qilnx - added %%post and %%postun scriplets * Mon Jun 26 2006 Stefano Cotta Ramusino 0.9-1qilnx - package created by autospec