Computers Geekery

How to create a git repo with the SQLite amalgamation source

Suppose you use GIT for your source control and would like to include SQLite as a third-party component via `git submodule` or `git subtree`. How does one go about getting access to the SQLite amalgamation as a GIT repo? When I tried this I found one on, but it wasn’t being maintained any longer. It occurred to me that I didn’t need to depend on anyone else — I could do this myself. These steps use the bash command line shell. I’ve tried it on Mac OS, but should also work on Linux or using a bash shell on Windows. SQLite source is kept in a source control management tool called Fossil ( (It’s written by the authors of SQLite and uses SQLite internally, naturally.) The authors courteously tag each major of release in Fossil. So it’s simply a matter of cloning the SQLite source, checking out each tag, running the makefile to produce the amalgamation and checking in the amalgamated code into a new git repo.


  1. Install Fossil from
  2. Install dev tools necessary for building fossil’s amalgamation (make, etc..)
  3. Install git
  4. Clone the SQLite source repo using fossil:

    mkdir sqlite-fossil
    cd sqlite-fossil
    fossil clone sqlite.fossil
    fossil open sqlite.fossil
    cd ..
  5. Create a new git repo to hold the amalgamation:

    mkdir sqlite-amalgamation
    cd sqlite-amalgamation
    git init
  6. Optional: Create a file with a copy of these instructions or a link to this page and commit it.

In the future you won’t need to clone from fossil fresh, nor create a new repo — you’ll still have them. To add new SQLite releases to your repo you will use `fossil update` and `git pull` to update the two repos.

Adding one release:

  1. Perform these steps, replacing $1 with the release name — OR just copy this into a file called next to your two repos, make it executable using `chmod +x` and invoke it with the name of the release.
    cd sqlite-fossil
    fossil update $1
    rm -rf ../sqlite_build
    mkdir ../sqlite-build
    cd ../sqlite-build/
    make sqlite3.c
    cd ../sqlite-amalgamation/
    mv ../sqlite-build/sqlite3.c .
    mv ../sqlite-fossil/src/shell.c .
    mv ../sqlite-build/sqlite3.h .
    mv ../sqlite-fossil/src/sqlite3ext.h .
    git commit -a -m $1
    cd ..
  2. For example:

    ./ version-

    Not sure what all the tags are? Use `fossil tags` to display all the tags. Search for the ones that start with 3. as the major releases. Warning: The releases do not sort in alphabetical order (e.g. 3.8.11 sorts before 3.8.9 but is a later release) so use care when picking which tags to build, otherwise your git repo could end up with the commits not in the correct order.

Geekery photo

Happy Halloween from beyond the looking glass



Computers Geekery

Monitor Progress of dd Command

If you ever use the “dd” command do duplicate a drive, you’re probably familiar with the unnerving wait that accompanies its use. The command generally takes on the order of *minutes* to complete, and gives no feedback.

If you read the MAN page, you’ll see you can monitor the progress by sending a SIGINFO signal.

Open another terminal window, and do

kill -SIGINFO <dd pid>

Where <dd pid> is the process id of your dd command. For example, when I was formatting the SD card for use in my Raspberry Pi via dd on the command line, I was able to monitor progress this way:

sudo dd if=~/Downloads/2013-02-09-wheezy-raspbian.img of=/dev/disk2 bs=2048k
193+0 records in
192+0 records out
402653184 bytes transferred in 314.132226 secs (1281795 bytes/sec)

UPDATE: OMG! I just realized that the moment in time when I sampled my software installation on my Raspberry Pi was 100π to 4 digits of precision. What a wonderful omen!


Server All Furbished Up with Ubuntu 12 LTS

This weekend I installed the latest “long term support” (LTS) version of the Linux operating system “Ubuntu” on my server in the cloud. With any luck, this won’t affect the sites hosted here (Becka’s and my blogs, the band, my pa-in-law’s architecture website, my family mailing list…) But if you notice something awry, please let me know.

Geekery photo

I dream of Halloweenie

I Dream of Halloweenie

Happy Halloween!


I *heart* Naomi Novik

I just finished reading a fun novel, “His Majesty’s Dragon”. Sort of like Napoleonic historical fiction, but with Dragons acting like the RAF.
Ok the real cool part for a geek like me is the fact that the author is a former Computer Scientist. Kind of like I’m a former Molecular Biologist.
And she worked on Neverwinter Nights : Shadows of Undrendtide. Ok, maybe I’ll finish playing that game now.
Scott, can you believe it? Someone who worked for BioWare! And she finished writing a cool book! Maybe you can stop being immersed in Dungeons and Dragons computer games and finish your dissertation! If she can do it, so can you! lol



For D&D yesterday, I created a puzzle using the Substitution Cipher.
Also, Cipher Index has lots of other fun pen and paper ciphers.


The full version

This is the link to the full fledged one:
Javascript D&D 3.5 Character Generator
This little program is my gift to my fellow-gamers, and my way of saying “thank you” to the hobby’s developers. Over a quarter-century, I have enjoyed a cordial relationship with people at TSR/WOTC. In return, I’m glad to help make the process of character creation easier for everyone. Happy adventuring!


My D&D Figurine

Isn’t he cute?