Package: git-buildpackage
Version: 0.9.1
Severity: normal
Hi,
I'm in the process of converting my last packages still maintained in
svn to git :-) (nvidia-cuda-toolkit and nvidia-graphics-drivers, both in
non-free)
The upstream tarballs contain binary blobs, and cannot be maintained in git
(or with pristine-tar) due to their incredible size, so I'm going to use
overlays and keep only debian/* in git.
There is one tarball per architecture, so we have to deal with multiple
.orig-*.tar.gz components as well.
For some parts of the packaging work (e.g. working with patches) I need
to create a temporary tree including unpacked upstream tarballs
overlayed with the debian directory and copy back the modifications to
debian/, this was previously done with svn-do.
(I always build the packages in pbuilder environments, never on the host,
so there is always exporting used for building and I usually don't need
(or want) a (non-temporary) full source tree on the host)
The following command works as a start:
gbp buildpackage --git-export=WC --git-builder='env debian_chroot="gbp-do"
${SHELL}' --git-postbuild='cp -vuapf "${GBP_BUILD_DIR}/debian/"* "debian/"'
--git-notify=off
the other relevant options come from debian/gbp.conf:
[buildpackage]
overlay = True
export-dir = ../build-area
create-orig = False
pristine-tar = False
compression = gz
tarball-dir = ../tarballs-nvidia-cuda-toolkit
component = [ 'ppc64el', ]
It would be great if such functionality could be added as a new
subcommand. Or do you have a better suggestion how to implement such a
workflow?
Here are the issues I've encountered so far:
* only the main .orig.tar.gz is unpacked, but the sub-components .orig-*.tar.gz
are not
* since exporting does not preserve timestamps, always the full debian/
tree will be copied back (unlike svn-do)
* in case of failure, the --git-builder command is used as a python
format string:
...$ gbp buildpackage --git-export=WC --git-builder='env debian_chroot="gbp-do"
${SHELL}' --git-postbuild='cp -vuapf "${GBP_BUILD_DIR}/debian/"* "debian/"'
--git-notify=off
gbp:info: Exporting 'WC' to '/path/to/package/build-area/package-tmp'
gbp:info: Moving '/path/to/package/build-area/package-tmp' to
'/path/to/package/build-area/package-1.0'
(gbp-do)...$ exit 1
exit
Traceback (most recent call last):
File "/usr/bin/gbp", line 151, in <module>
sys.exit(supercommand())
File "/usr/bin/gbp", line 147, in supercommand
return module.main(args)
File "/usr/lib/python3/dist-packages/gbp/scripts/buildpackage.py", line 550,
in main
)(dir=build_dir)
File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 248, in
__call__
Command.__call__(self, list(*args))
File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 192, in
__call__
self._log_err()
File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 145, in
_log_err
log.err(self._format_err())
File "/usr/lib/python3/dist-packages/gbp/command_wrappers.py", line 159, in
_format_err
err_reason=self.err_reason)
KeyError: 'SHELL'
* Is it possible to use an upstream-version subdirectory for the
tarball-dir? E.g.
tarball-dir = ../tarballs-nvidia-cuda-toolkit/%{upstream-version}
Andreas