logger: removed post code to configure grub [release 1.20-2mamba;Tue Dec 22 2020]

This commit is contained in:
Silvan Calarco 2024-01-05 20:53:57 +01:00
parent 53cad0810a
commit 043eed1aac
2 changed files with 86 additions and 105 deletions

View File

@ -1,10 +1,4 @@
# bootchart # bootchart
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. 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.

View File

@ -1,11 +1,11 @@
Name: bootchart Name: bootchart
Version: 1.20 Version: 1.20
Release: 1mamba Release: 2mamba
Summary: Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process Summary: Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process
Group: System/Benchmarks Group: System/Benchmarks
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Stefano Cotta Ramusino <stefano.cotta@qilinux.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.bootchart.org/ URL: http://www.bootchart.org/
Source: http://foo-projects.org/~sofar/bootchart/bootchart-%{version}.tar.gz Source: http://foo-projects.org/~sofar/bootchart/bootchart-%{version}.tar.gz
#Source: http://downloads.sourceforge.net/sourceforge/bootchart/bootchart-%{version}.tar.bz2 #Source: http://downloads.sourceforge.net/sourceforge/bootchart/bootchart-%{version}.tar.bz2
@ -17,27 +17,20 @@ Source5: bootchart-grub2
Patch0: %{name}-0.9-nojavafunctions.patch Patch0: %{name}-0.9-nojavafunctions.patch
Patch1: %{name}-0.9-svg_path.patch Patch1: %{name}-0.9-svg_path.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: ldconfig
## AUTOBUILDREQ-END
Requires: curl Requires: curl
Requires: %{name}-logger Obsoletes: %{name}-logger <= 1.20-1mamba
BuildRequires: apache-ant BuildRequires: apache-ant
BuildRequires: jdk %ifnarch arm
BuildRequires: java-environment
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. 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 %prep
%setup -q %setup -q
@ -55,6 +48,9 @@ cp %{S:1} %{name}.pl
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall
# install grub.d file
install -D -m 0755 %{S:5} %{buildroot}%{_sysconfdir}/grub.d/15_bootchart
## install scripts ## install scripts
#install -D -m 755 script/%{name} \ #install -D -m 755 script/%{name} \
# %{buildroot}%{_bindir}/%{name} # %{buildroot}%{_bindir}/%{name}
@ -81,103 +77,94 @@ cp %{S:1} %{name}.pl
##install -D -m 644 script/bootchartd.conf \ ##install -D -m 644 script/bootchartd.conf \
# %{buildroot}%{_sysconfdir}/bootchartd.conf # %{buildroot}%{_sysconfdir}/bootchartd.conf
# #
# install kde frontend ## install kde frontend
install -D -m 755 %{S:3} \ #install -D -m 755 %{S:3} \
%{buildroot}%{_bindir}/k%{name} # %{buildroot}%{_bindir}/k%{name}
install -D -m 644 %{S:4} \ #install -D -m 644 %{S:4} \
%{buildroot}%{_datadir}/icons/crystalsvg/32x32/apps/k%{name}.png # %{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
# create KDE menu link #cat > %{buildroot}/%{_datadir}/applications/k%{name}.desktop <<EOF
install -d %{buildroot}/%{_datadir}/applications #[Desktop Entry]
cat > %{buildroot}/%{_datadir}/applications/k%{name}.desktop <<EOF #Name=KBootchart
[Desktop Entry] #GenericName=Bootchart image generator
Name=KBootchart #GenericName[it]=Generatore del grafico d'avvio
GenericName=Bootchart image generator #Exec=kbootchart
GenericName[it]=Generatore del grafico d'avvio #Type=Application
Exec=kbootchart #Icon=kbootchart
Type=Application #Terminal=false
Icon=kbootchart #Categories=Qt;KDE;System
Terminal=false #EOF
Categories=Qt;KDE;System
EOF
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post logger #%post logger
if [ $1 -ge 1 ]; then #if [ $1 -ge 1 ]; then
# new install or upgrade ## new install or upgrade
%if "%{_target_cpu}" == "i586" # %if "%{_target_cpu}" == "i586"
for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do # for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do
if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -ne 0 ]; then # 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 # sed -i "s|^kernel\(.*\)|kernel \1 init=/sbin/%{name}d|" $i 2> /dev/null
fi # fi
done # done
%endif # %endif
%if "%{_target_cpu}" == "ppc" # %if "%{_target_cpu}" == "ppc"
for i in $(ls %{_sysconfdir}/yaboot/conf.d/%{distribution}-* 2>/dev/null); do # 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 # 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 # sed -i "s|^append=\"\(.*\)\"|append=\"\1 init=/sbin/%{name}d\"|" $i 2> /dev/null
fi # fi
done # done
%endif # %endif
fi #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
if [ $1 -eq 1 ]; then #%postun logger
# new install #if [ $1 -eq 0 ]; then
%if "%{_target_cpu}" == "i586" ## uninstall
[ -x /usr/sbin/update-grub ] && /usr/sbin/update-grub #%if "%{_target_cpu}" == "i586"
%endif #for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do
%if "%{_target_cpu}" == "ppc" # if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then
[ -x /usr/sbin/yaboot-update ] && /usr/sbin/yaboot-update # sed -i "s|^kernel\(.*\) init=/sbin/%{name}d\(.*\)|kernel \1\2|" $i 2> /dev/null
%endif # fi
fi #done
exit 0 #
#%endif
%postun logger #%if "%{_target_cpu}" == "ppc"
if [ $1 -eq 0 ]; then #for i in $(ls %{_sysconfdir}/yaboot/conf.d/%{distribution}-* 2>/dev/null); do
# uninstall # if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then
%if "%{_target_cpu}" == "i586" # sed -i "s|^append=\"\(.*\) init=/sbin/%{name}d\(.*\)\"|append=\"\1\2\"|" $i 2> /dev/null
for i in $(ls %{_sysconfdir}/grub/conf.d/%{distribution}-* 2>/dev/null); do # fi
if [ $(grep init=/sbin/%{name}d $i >> /dev/null; echo $?) -eq 0 ]; then #done
sed -i "s|^kernel\(.*\) init=/sbin/%{name}d\(.*\)|kernel \1\2|" $i 2> /dev/null #%endif
fi #fi
done #exit 0
%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 %files
%defattr(-,root,root) %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 %{_sysconfdir}/grub.d/15_bootchart
%{_sbindir}/bootchartd %{_sbindir}/bootchartd
%{_datadir}/doc/bootchart/bootchartd.conf.example %{_datadir}/doc/bootchart/bootchartd.conf.example
#%config(noreplace) %{_sysconfdir}/%{name}d.conf #%config(noreplace) %{_sysconfdir}/%{name}d.conf
#%doc README.logger #%doc README.logger
%doc COPYING
%changelog %changelog
* Tue Dec 22 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.20-2mamba
- logger: removed post code to configure grub
* Sat Dec 01 2012 Automatic Build System <autodist@mambasoft.it> 1.20-1mamba * Sat Dec 01 2012 Automatic Build System <autodist@mambasoft.it> 1.20-1mamba
- update to 1.20 - update to 1.20