This bash script is intended to be run from inside a git repository to:

  • Make a checksum of all the tracked files (sha1sum and md5sum by default)
  • Sign the checksum with gpg (using git's user.signingkey or user.email)
  • Create a .tar.xz (very good compression) and .zip (for non-techie) archives with all the files (see below for other formats)
  • Output the HTML code to publish the file on the web

By default the script takes the directory name and latest git revision to build the package, though this behaviour can be modified via options.

Download

Version Format Download Size
0.2 zip gitpack-0.2.zip 20.46k
tar.xz gitpack-0.2.tar.xz 18.17k
0.1.3 zip gitpack-0.1.3.zip 16.54k
tar.xz gitpack-0.1.3.tar.xz 14.66k
0.1.2 zip gitpack-0.1.2.zip 15.92k
tar.xz gitpack-0.1.2.tar.xz 13.94k

This program is released under the terms of the GPLv3 or any later version. See the details.

Features

The program is a basic wrapper around the common git-archive, to insert into the archives one or more signed checksums of all the files.

The supported archive formats are zip, tar.bz2, tar.gz and tar.xz (the last is very good and to be preferred over tar.lzma, also supported).
The supported digest algorithms are md5, sha1, sha224, sha256, sha384, sha512, to create digest files of all the archive files.
These compatibilities are achieved via the programs that should already be present on your system (installed by default on a Ubuntu installation).

Along with the package(s), you can choose to generate an html file with a table of the generated files (i.e. the one you can see in the above "Download" section).

Usage

Put the "gitpack" executable in a directory included in $PATH, reload the shell and cd into a git directory.

To view the complete usage, type gitpack -? at the prompt, which shows the output below:

Verify a package

The package itself contains almost all the information you need to verify its consistency, with the "*ALG*SUMS" and "*ALG*SUMS.gpg" files.
Let's check the consistency for example using the "SHA1SUMS" and "SHA1SUMS.gpg" files.

  • Prerequisite: obtaining the package author's public key (here's mine, for example), preferably via another channel (i.e. a public key repository).
  • Open a terminal and move to the unpacked archive directory, where the SHA1SUMS and SHA1SUMS.gpg files are:
    cd /home/foo/unpacked/
  • As the file is "SHA1"(SUMS), you should check with the sha1sum program:
    sha1sum --check SHA1SUMS
  • You should see a list of files confirming that their hash matches the one in the file. Now to check the authenticy of the sum file:
    gpg --verify SHA1SUMS.gpg
    If you have already imported the package author's public key, just check that the signing key match the author's.