1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
Upstream's use of submodules complicates orig handling somewhat. The
need to strip out some nonfree content (primarily IETF RFCs) from the
upstream tarball adds additional complexity.
The general approach is to construct a temporary tarball from upstream
git that contains the complete unfiltered upstream source including
submodules and non-dfsg artifacts and then import this to the
upstream_dfsg branch using `gbp import-orig`.
Important branches:
upstream: upstream source is tracked on the 'upstream' branch. This
branch should track the 'main' branch of
https://github.com/awslabs/aws-crt-python.git exactly, with
all git commit IDs matching.
upstream_dfsg: this is the 'upstream' branch minus any non-DFSG
compliant content (e.g. IETF RFCs). When preparing to
import a new upstream version, the upstream tag
corresponding with the new release should be merged
into this branch.
# The workflow is approximately as follows:
# What is the upstream tag?
$ read upstream_tag
$ version=$(echo $upstream_tag| sed 's,^v,,')
$ archive_name="aws-crt-python-${version}.tar"
$ prefix="aws-crt-python-${version}/"
$ git checkout "${upstream_tag}"
$ git submodule update --init
$ git archive --format tar -o "$archive_name" --prefix="$prefix" "$upstream_tag"
# descend recursively and archive each submodule
$ PREFIX="$prefix" git submodule --quiet foreach --recursive 'git archive --format tar --prefix="${PREFIX}${displaypath}/" -o submodule.tar HEAD'
# concatenate with main archive
$ TOPDIR=$(pwd) ARCHIVE_NAME="$archive_name" git submodule --quiet foreach --recursive 'cd $TOPDIR; tar --concatenate --file="$ARCHIVE_NAME" $displaypath/submodule.tar; rm -fv $displaypath/submodule.tar'
$ gzip -9 "$archive_name"
$ git submodule deinit --all
$ git checkout debian/sid
-- Noah Meyerhans <noahm@debian.org>, Sat, 14 Jan 2023 10:02:55 -0800
|