Skip to content
Snippets Groups Projects

Random tweaks to sync-from-debian

Merged Evangelos Ribeiro Tzaras requested to merge sfd-tweaks into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 30
5
@@ -192,10 +192,10 @@ function push()
local pt_opt
git checkout "rel-${PHOSH_UNDERSCORE_VERSION}"
gbp buildpackage --git-ignore-new --git-dist="${PUREOS_DIST}"
gbp buildpackage --git-ignore-new --git-pbuilder --git-dist="${PUREOS_DIST}" -nc
pt_opt="--no-pristine-tar"
if [ "$(gbp config push.pristine-tar)" == "True" ]; then
if [[ "$(gbp config push.pristine-tar)" =~ ^[Tt]rue$ ]]; then
if git log --pretty='%P' -n 1 pristine-tar | grep -qsE '^[0-9a-f]{40} [0-9a-f]{40}'; then
log info "Head of Pristine-tar branch is merge commit, pushing with git"
pt_opt="--no-pristine-tar"
@@ -216,7 +216,7 @@ function release()
local DIST
local VERSION
gbp dch --local=pureos --distribution="${PUREOS_DIST}" -R -a --dch-opt=--force-distribution -- debian/
gbp dch --debian-branch="rel-${PHOSH_UNDERSCORE_VERSION}" --git-author --local=pureos --distribution="${PUREOS_DIST}" -R -a --dch-opt=--force-distribution -- debian/
dch -a "Upload to ${PUREOS_DIST}"
DIST="$(dpkg-parsechangelog | awk "/^Distribution:/{ print \$2; }")"
@@ -290,7 +290,7 @@ function build()
gbp pull
# TODO: we'd better use the --profile=pureos but that is severely outdated in Debian
# shellcheck disable=SC2016
gbp buildpackage --git-pbuilder --git-dist="${PUREOS_DIST}" --git-postbuild='lintian --suppress-tags bad-distribution-in-changes-file $GBP_CHANGES_FILE'
gbp buildpackage --git-pbuilder --git-dist="${PUREOS_DIST}" --git-postbuild='lintian --suppress-tags bad-distribution-in-changes-file $GBP_CHANGES_FILE' -nc
log info "Finished build step"
find_stagenum "${FUNCNAME[0]}" > "${STAGE_FILE}"
@@ -429,6 +429,10 @@ Push to git remote I<remote> instead of I<purism+rw>.
Start at the given stage instead of the beginning or the last failed
one.
=item I<version>
The upstream version (i.e. without Debian revision) to import the packaging for.
=back
=head1 Repository setup
@@ -443,7 +447,28 @@ The script assumes the following repository setup:
tracks the packaging branch as well as the I<upstream> and I<pristine-tar>
branch.
=item * The remote tracking packaging in Debian is called I<salsa>
=back
=head1 Additional setup
=over
=item * Setting up chroot for pbuilder:
The script does a final build in a clean chroot using git-pbuilder
during the I<build> stage. You can create the chroot with
DIST=byzantium git-pbuilder create --mirror=https://repo.pureos.net/pureos
=item * Automatically resolve merge conflicts in the changelogs:
Whenever we backport from Debian git-merge(1) will alert us to
a conflict in I<debian/changelog> because both Debian and us have
changed this file. To avoid tedious manual (and potentially error-prone)
work it is recommended to register dpkg-mergechangelog(8) as a merge driver.
See the I<INTEGRATION WITH GIT> section of its manual to learn how.
The resulting changelog will preserve both downstream and Debian changes.
=back
Loading