Table of Contents
Early June work: Setting up the bug tracker
2026-06-05
This week I copied the bugtracker and its companion tool called "buggy" from the Dillo browser. I forked both to use as a bug tracker on https://pushbx.org/ecm/bug/
Buggy (bug tracker format tool)
- Import git repo history from Dillo
- An empty changeset that contains the scriptlet used to import the git repo history
- Change the accepted and emitted date formats, to allow using ISO 8601 formats throughout.
- Do not depend on the bugtracker's out directory being addressed as the root directory of a server, greatly easing the setup of the bugtracker.
- Call closedir immediately after opendir. The directory handle wasn't used anywhere, so the only purpose this opendir serves is to check for the existence of the directory.
- Create symlinks for extra attachment files. I reported the lack of this feature to the original Dillo mailing list earlier.
- Use the print_htmlenc encoding function to write the title to the bug page's <title> tag.
- In print_htmlenc allow a ::html:: prefix which causes the function to strip this prefix and write the remaining text without encoding, passing it through as raw HTML. This choice is based on my emulation principle: A given decision should allow to emulate other possible choices, so that the user is free to choose how their use case is handled.
- Replace hardcoded Dillo footer hyperlinks by ecm ones.
- Replace hardcoded Dillo header title by ecm one.
Bugtracker
The Dillo bugtracker repo didn't actually track only the bug report contents, it also carried some scripting, the stylesheet, and the favicon. Therefore to prepare a complete installation, I forked the bugtracker repo as well.
- Import git history from Dillo.
- Empty changeset providing the scriptlet used.
- Delete existing Dillo bugs (large changeset).
- Delete the Makefile's use of the favicon file and the USR1 signal sent to Dillo processes.
- Use --get for git config command, the form without dashes doesn't appear to work on our server's version of git.
- Port mknew.sh to work with bash. (Replacing the
letcommand might be unneeded.) - Change the date format emitted by mknew.sh
- Add comment.sh to add a comment header to an existing ticket.
- Allow specifying a ticket number for mknew.sh
- In comment.sh open the editor at the last line of the ticket file to speed up adding a comment.
- Ignore nano swap files in .hgignore
- Add test report files to a test branch of the repo.
ETA:
Scriptlets used to import (linear) git history
The same scriptlet was used for the buggy repo and the bugtracker repo, except for the "Imported from" line in the changeset message. This is that scriptlet:
git -C ../git log --format=%H |
tac |
xargs -rn1 bash -c '
echo "$1"
if [ -z "$(git -C ../git log --format=%p "$1")" ]
then
git -C ../git diff "$(git -C ../git hash-object -t tree /dev/null)" "$1"
else
git -C ../git diff "$1^" "$1"
fi | patch -p1
body="$(git -C ../git log -n1 -r "$1" --format="%B")"
author="$(git -C ../git log -n1 -r "$1" --format="%aN <%aE>")"
dt="$(git -C ../git log -n1 -r "$1" --format="%aD")"
hg addremove
hg ci -u "$author" -d "$dt" -m "$body
Imported from https://git.dillo-browser.org/buggy/commit/?id=$1"
' scriptlet
All the rest
I also had to clone the md4c (git) repo, which I didn't import into a hg repo as I expect little need for modifying this library. Aside everything mentioned yet, I have a mak.sh script located in ~/proj/buggy next to the historical git and current hg repos, as well as the historical bugtracker/git and current bugtracker/hg repos. This script runs the commands needed to build the md4c library and the buggy utility, passing the library, include, and rpath pathes needed for the utility to find the library. The contents of this script are:
~/proj/buggy$ cat mak.sh #! /bin/bash (cd md4c; cmake . -DBUILD_SHARED_LIBS=ON && make) MAKDIR="$PWD" (cd hg; make CFLAGS="-L$MAKDIR/md4c/src/ -I$MAKDIR/md4c/src/ -Wl,-rpath,$MAKDIR/md4c/src/")
Other than that I symlinked ~/wwwecm/bug to point to ~/proj/buggy/bugtracker/hg/out which is sufficient to install the bug tracker.
