The Debian patches that apply cleanly are kept when KEEP_DEBIAN_PATCHES
is set to give a better picture of how the tested upstream version
would work packaged.
Create a commit with any debian/ changes, commit with all upstream code
changes, and a final commit with the updated changelog entry.
For normal operation, where this script is being called from upstream
autopkgtest tests, there is no need for creating git commits with the
changes made by this script; however, creating the commits won't (shouldn't)
break anything in the normal upstream test process.
Where creating git commits with this script's changes is useful is for a
local git repository used for development - specifically, to maintain
a git repo that includes the upstream systemd source code, but also the
debian/ code (including tests) so that the package can be built in a ppa
and tested using autopkgtest, without needing to use github to perform the
testing.
It can be useful to skip creating the new changelog entry, if
the caller only wants to pull the latest upstream code into a
git repo; this adds a env var that allows doing that.
By default, without the var set, the changelog entry is created,
so existing behavior is unchanged.
With this, what we test will be much closer to what we will actually
merge. It also avoids older PRs to now suddenly fail because they are
based against an older HEAD without the meson patches.
This is a script to replace the current source with a checkout of an upstream
pull request, branch, or commit, and remove debian/patches/. This also disables
autopkgtests which are not appropriate for testing upstream. Called from
debian/rules if $TEST_UPSTREAM is set.
This will be used for upstream CI.