This page is an introduction to bisect, which is a nice feature of “git”, which allows us to know exactly when something is working and when not…. At this point all you need is a 64-bit Linux and, of course, some time, because the download is huge. It’s easy – 4 small steps is all that it takes.
1
At first you need some additional software. You have to perform this step only once: [With Ubuntu you can open a terminal with: Ctrl + Alt + T]
sudo apt-get install zsync git
2
If you already have the binary-bisect file (binary because you have a working program in git and not it’s source), please move it to your personal folder and copy the following source-code into the clipboard.
#!/bin/bash # by Florian Reisinger 2013 echo "Updating binrepo" zsync http://people.canonical.com/~j-lallement/libreoffice/binrepo/bibisect-4.0.tar.lzma.zsync echo "Deleting existing binrepo" echo "This might take some time...." rm -rf ~/binrepo/* echo "Extracting repo" tar --lzma --extract --keep-newer-files --checkpoint=20000 --file bibisect-4.0.tar.lzma echo "Creting latest and oldest tag" cd binrepo LCOMMIT=$(git rev-parse HEAD) git tag --force latest $LCOMMIT git tag --force oldest 3e7462b echo "Finished updating. Happy bisecting!" exit
In this tutorial I called the new file “update.sh”. Please open the file with a text editor of your choice (I used gedit) and paste the code. Save and close the file. After closing right-click on the file and from the context-menu choose properties. In the Permissions tab, please tick “Execute as program”.
3
The script will download and configure the binrepo for you. If you didn’t call the file update.sh, please change the name!
./update.sh
Please be patience. This might take some time.
After the skript has finished it’s work, you will see a line like:
Finished updating. Happy bisecting!
That means everything is ready to go 🙂
4
To get into the folder, where the binrepo is use the following command:
cd binrepo
To start the bisect use:
git bisect start latest oldest
To start LibreOffice, you need this command:
./opt/program/soffice
If a bug occurs in this version, please use this command:
git bisect bad
If everything is fine, please use
git bisect good
If you can’t tell (e.g. the build won’t start) use
git bisect skip
When you are finished you will see something like this:
9625329ea5a7e3e8475cd21c07726beec20573bd is the first bad commit
commit 9625329ea5a7e3e8475cd21c07726beec20573bd
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date: Thu Dec 8 12:29:59 2011 +0100
source-hash-2d19e9bb07ccff3134f855812dddfda5c07b1fe4
commit 2d19e9bb07ccff3134f855812dddfda5c07b1fe4
Author: Jan Holesovsky <kendy@suse.cz>
AuthorDate: Wed Nov 16 14:17:03 2011 +0100
Commit: Jan Holesovsky <kendy@suse.cz>
CommitDate: Wed Nov 16 14:21:33 2011 +0100
Kill one usage of chrel.sed to fix build.
The line
source-hash-2d19e9bb07ccff3134f855812dddfda5c07b1fe4
is the most important one from the output above. After you finished your bisect run
git log
Please include the line identified from above and the output of the last command in your Bugzilla comment.
Also change the whiteboard status from bibisectrequest to bibisected.
So, finally how to find bugs, that need a bisect: You can find such bugs and more information about bisecting here!
Happy bisecting!
PS: Quite a long time ago I made a video tutorial. The actual bisect starts at 3:19
If you need help or something is not clear, please comment. I will try to improve this tutorial by time.
One thought on “Bisecting LibreOffice with a 64-Bit Linux”