Package: gitpkg
Version: 0.11
Severity: wishlist

As discussed on IRC, I got pristine-tar support working using a
hook. The hook uses the variables DEB_DIR, DEB_SOURCE, and
DEB_VERSION.  It also duplicates the calculation of the orig.tgz file
using "${DEB_SOURCE}_${DEB_VERSION%-*}.orig.tar.gz".

The not so nice part is I need to know the git directory gitpkg was
invoked in. So have a line like the following

REPO_ROOT=$PWD/`git rev-parse --show-cdup`

in my gitpkg.conf.  I don't really like depending on the config file
quite so strongly. It would be great if you could make variable for
hooks to use that either does what I wrote above, or at least stores
the $PWD when gitpkg is invoked. I just noticed that gitpkg only works
when invoked from the repo root directory, so you might consider using
the "git rev-parse --show-cdup" trick to change there invoked from
e.g., ./debian

Hook and config attached; distributed either or both as you please.
My hook hasn't been tested on native packages; but I guess one
wouldn't bother installing it then.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (900, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gitpkg depends on:
ii  dpkg-dev                     1.15.3.1    Debian package development tools
ii  git-core                     1:1.6.3.3-2 fast, scalable, distributed revisi

gitpkg recommends no packages.

Versions of packages gitpkg suggests:
ii  devscripts                    2.10.53    scripts to make the life of a Debi

-- no debconf information
REPO_ROOT=$PWD/`git rev-parse --show-cdup`
HOOK_FILE=debian/gitpkg-hook.sh
# This file is used by gitpkg to extract a byte identical .orig.tar.gz
# file using pristine-tar.  To use it you need pristine-tar, and to
# configure HOOK_FILE=debian/gitpkg-hook.sh in one of the places that
# gitpkg looks (currently _not_ the environment).

ORIGTGZ="${DEB_DIR}/${DEB_SOURCE}/${DEB_SOURCE}_${DEB_VERSION%-*}.orig.tar.gz"
echo "(cd $REPO_ROOT &&  pristine-tar checkout ${ORIGTGZ})"
(cd $REPO_ROOT &&  pristine-tar checkout ${ORIGTGZ})

Reply via email to