You are not logged in.
Hi, three features I like with Bootchart2:
→ A clear Disk, I/O (and memory) usage vizualisation that I don't get with its systemd-bootchart cousin;
→ Easier comparison with distros shipping Bootchart, and with older startup-graphs (eg my netbook has Arch running since well before the shift to systemd;comparing has its interest);
→ Nothing to add to the kernel parameters, as the systemd services included do their job.
I updated this 2013 old PKGBUILD of Bootchart2-git from mmeek. It'd be nice if someone can review it.
Since it's retrieving the sources from Git, I just replace '/lib' and 'sbin' with 'usr/lib' and '/usr/bin' in the Makefile to comply with https://wiki.archlinux.org/index.php/Ar … _standards . Inspiration from Steef435 & ugjka in https://bbs.archlinux.org/viewtopic.php?id=201876 I wasn't able to find an example in the wiki or in my whole pacman/makepkg/ cache.
# Contributor: JohnTheKipper <roteocktober@hotmail.com>
# Contributor: TukozAki <kozaki@lliseil.fr>
pkgname=bootchart2-git
pkgrel=1
pkgver=20150916
pkgdesc="Tool for profiling the Linux boot sequence visually"
arch=('i686' 'x86_64')
url="http://github.com/mmeeks/bootchart"
license=('GPL')
provides=('bootchart2')
conflicts=('bootchart2' 'bootchart')
depends=('busybox' 'pygtk')
makedepends=('git' 'python3')
_gitname="bootchart"
_gitroot="git://github.com/mmeeks/$_gitname.git"
_gitbranch="python3"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d "$_gitname" ] ; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone -b $_gitbranch "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone -b $_gitbranch "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
sed -i -e 's|python2.6|python2.7|' \
-e 's|python\b|python2|g' Makefile
sed -i 's|#!/usr/bin/python$|#!/usr/bin/python2|' pybootchartgui.py
# Arch Linux has moved to /usr in 2014
sed -i -e 's|\/lib|\/usr\/lib|' \
-e 's|\/sbin|\/usr\/bin|g' Makefile
make
}
package() {
cd "$srcdir/$_gitname-build"
make DESTDIR="$pkgdir" install
}If you're curious why using bootchart2-git when we have systemd-analyze (and ~-bootchart)? Using it allow for a better comparison between Arch Linux and OSes still using Bootchart. Note: I'm making a little real-world comparison between a few systems on the same hardware.
Last edited by kozaki (2015-09-20 19:56:50)
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery
) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
Please, read the VCS package guidelines.
You should not checkout the sources in the build() function, you should use the source array instead. Also the sed invocations should be placed in the prepare() function, and you need also to add a pkgver() function. Finally, in the Makefile you need only to replace sbin , to set the python version and library directory just use
make BINDIR="/usr/bin" LIBDIR="/usr/lib" PYTHON="python2"For a simple example see https://aur.archlinux.org/cgit/aur.git/ … =cower-git
Last edited by mauritiusdadd (2015-09-16 18:00:54)
Offline
Thank to mauritiusddad I went on updating Bootchart2-git PKGBUILD.
Examples help, a bit more than pacman's PKGBUILD-git.PROTO which is slightly outdated.
I now get a working pkgver(), and fail on replacing /sbin with /usr/bin
Further guidance would be appreciated.
# Contributor: JohnTheKipper <roteocktober@hotmail.com>
# Contributor: TukozAki <kozaki@lliseil.fr>
pkgname=bootchart2-git
pkgver=r546.3ab8113
pkgrel=1
pkgdesc="A tool for visually profiling the Linux boot sequence"
arch=('i686' 'x86_64')
url="http://github.com/mmeeks/bootchart"
license=('GPL')
provides=('bootchart2')
conflicts=('bootchart2' 'bootchart')
depends=('busybox' 'pygtk')
makedepends=('git' 'python3')
source=("git://github.com/mmeeks/bootchart")
md5sums=('SKIP')
_gitname="bootchart"
_gitbranch="python3"
pkgver() {
cd "$srcdir/$_gitname"
# Git, get the most recent tags available (un-annotated)
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$srcdir/$_gitname"
sed -i -e 's|python2.6|python2|' \
-e 's|python\b|python2|g' Makefile
sed -i 's|#!/usr/bin/python$|#!/usr/bin/python2|' pybootchartgui.py
# TODO: Arch Linux has moved to /usr in 2014
sed -i -e 's|\/sbin|\/usr\/bin|g' Makefile
}
build() {
cd "$srcdir/$_gitname"
make
}
package() {
cd "$srcdir/$_gitname-build"
# TODO
make BINDIR="/usr/bin" LIBDIR="/usr/lib" PYTHON="python2" DESTDIR="$pkgdir" install
}Bootchart2-git Makefile: https://github.com/mmeeks/bootchart/blo … r/Makefile
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery
) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
I now get a working pkgver(), and fail on replacing /sbin with /usr/bin
That's because you should use the same options when compiling and when installing, and also because it seems you need to set the variable EARLY_PREFIX (otherwise some files will be put in /bin instead of /usr/bin). Something like the following should work
prepare() {
cd "$srcdir/$_gitname"
sed -i 's|#!/usr/bin/python$|#!/usr/bin/python2|' pybootchartgui.py
# TODO: Arch Linux has moved to /usr in 2014
sed -i -e 's|/sbin|/bin|g' Makefile
}
build() {
cd "$srcdir/$_gitname"
make EARLY_PREFIX="/usr" \
BINDIR="/usr/bin" \
LIBDIR="/usr/lib" \
PKGLIBDIR="/usr/lib" \
PYTHON="python2"
}
package() {
cd "$srcdir/$_gitname"
make EARLY_PREFIX="/usr" \
BINDIR="/usr/bin" \
LIBDIR="/usr/lib" \
PKGLIBDIR="/usr/lib" \
PYTHON="python2" \
DESTDIR="$pkgdir" \
install
}Offline
Hmm, cleaner! the previous make , well, makes me feel a bit dumb. But it's good if the job goes on
thanks Mauritiusdadd.
Pacman still complains on 'sbin allready existing in the filesystem", though. That wasn't the case with the first clumsy PKGBUILD, and i don't find out where this sbin comes from: grep finds no occurence in the source files.
Last edited by kozaki (2015-09-17 23:43:54)
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery
) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
You're welcome. I tried to build and install the package and it installs fine here... Have you tried to do a clean rebuild?
makepkg -CfAlso, are you sure the package you are trying to install is the latest built with makepkg?
Offline
Yes it builds! You're right again mauritiusdadd.
And yes (removed sources && makepkg -rsif) I'd say, thout with this tooth ache, errr
Do you know how to `sed -i |sbin/usr/bin|g` also in the man pages, ie bootchar{d,2}.1?
Now writting the bootchart2.install to bring some light on the systemd services shipped with meek's bootchart2 (and correct the wiki
PS What is the forum login auto time out? have been logged out after submitting a previous post, it seems only minutes after i logged in. What a pain in the ass §#-|
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery
) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
Do you know how to `sed -i |sbin/usr/bin|g` also in the man pages, ie bootchar{d,2}.1?
Using the sed command, as you suggested, in the prepare function should work:
sed -i -e 's|/sbin|/usr/bin|g' bootchart2.1
sed -i -e 's|/sbin|/usr/bin|g' bootchartd.1 PS What is the forum login auto time out? have been logged out after submitting a previous post, it seems only minutes after i logged in. What a pain in the ass §#-|
I think it's about five minutes, I think... but I'm not sure ![]()
Offline
That worked, sed in the prepare() function
Thanks again mauritius ![]()
Three features I like with Bootchart2:
- A clear Disk, I/O (and memory) usage vizualisation that I don't get with its systemd-bootchart cousin;
- Easier comparison with other distro that ship Bootchart (and with older startup-graphs);
- It does no even need to be added to the kernel parameters as the systemd services do their job as soon as the kernel & initrd are loaded.
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery
) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline