logger: removed post code to configure grub [release 1.20-2mamba;Tue Dec 22 2020]
This commit is contained in:
parent
53cad0810a
commit
043eed1aac
@ -1,10 +1,4 @@
|
||||
# bootchart
|
||||
|
||||
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.
|
||||
|
||||
|
185
bootchart.spec
185
bootchart.spec
@ -1,11 +1,11 @@
|
||||
Name: bootchart
|
||||
Version: 1.20
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
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 <stefano.cotta@qilinux.it>
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
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
|
||||
@ -17,27 +17,20 @@ Source5: bootchart-grub2
|
||||
Patch0: %{name}-0.9-nojavafunctions.patch
|
||||
Patch1: %{name}-0.9-svg_path.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: ldconfig
|
||||
## AUTOBUILDREQ-END
|
||||
Requires: curl
|
||||
Requires: %{name}-logger
|
||||
Obsoletes: %{name}-logger <= 1.20-1mamba
|
||||
BuildRequires: apache-ant
|
||||
BuildRequires: jdk
|
||||
%ifnarch arm
|
||||
BuildRequires: java-environment
|
||||
%endif
|
||||
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
|
||||
@ -55,6 +48,9 @@ cp %{S:1} %{name}.pl
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
|
||||
# install grub.d file
|
||||
install -D -m 0755 %{S:5} %{buildroot}%{_sysconfdir}/grub.d/15_bootchart
|
||||
|
||||
## install scripts
|
||||
#install -D -m 755 script/%{name} \
|
||||
# %{buildroot}%{_bindir}/%{name}
|
||||
@ -81,103 +77,94 @@ cp %{S:1} %{name}.pl
|
||||
##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 <<EOF
|
||||
[Desktop Entry]
|
||||
Name=KBootchart
|
||||
GenericName=Bootchart image generator
|
||||
GenericName[it]=Generatore del grafico d'avvio
|
||||
Exec=kbootchart
|
||||
Type=Application
|
||||
Icon=kbootchart
|
||||
Terminal=false
|
||||
Categories=Qt;KDE;System
|
||||
EOF
|
||||
## 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
|
||||
#
|
||||
#
|
||||
## create KDE menu link
|
||||
#install -d %{buildroot}/%{_datadir}/applications
|
||||
#cat > %{buildroot}/%{_datadir}/applications/k%{name}.desktop <<EOF
|
||||
#[Desktop Entry]
|
||||
#Name=KBootchart
|
||||
#GenericName=Bootchart image generator
|
||||
#GenericName[it]=Generatore del grafico d'avvio
|
||||
#Exec=kbootchart
|
||||
#Type=Application
|
||||
#Icon=kbootchart
|
||||
#Terminal=false
|
||||
#Categories=Qt;KDE;System
|
||||
#EOF
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%post logger
|
||||
if [ $1 -ge 1 ]; then
|
||||
# new install or upgrade
|
||||
%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 $?) -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
|
||||
#%post logger
|
||||
#if [ $1 -ge 1 ]; then
|
||||
## new install or upgrade
|
||||
# %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 $?) -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
|
||||
|
||||
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
|
||||
#%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
|
||||
%doc COPYING
|
||||
|
||||
%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
|
||||
- update to 1.20
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user