Skip to content

Commit 1b64822

Browse files
prakashsuryaclaude
andcommitted
TOOL-30021 Enable upstream tracking for sdb against sdimitro/sdb develop
Wire packages/sdb/config.sh up to the upstream-tracking automation introduced by the prior commit, completing Phase 2 of delphix/cd-aidlc spec 0003 (Adopt sdimitro/sdb as upstream; repackage via dh-virtualenv). The build() override derives PACKAGE_VERSION from setuptools_scm so the .deb's metadata version follows upstream sdb tags automatically; pyproject.toml's local_scheme="no-local-version" keeps the value debian-version-safe (no embedded "-"), letting linux-pkg's set_changelog append the standard "-1delphix.<ts>" revision suffix without further massaging. Phase 1 (delphix/sdb#360, merged 2026-05-06) landed the bootstrap merge from sdimitro/develop plus the dh-virtualenv overlay, including python3-setuptools-scm in Build-Depends so the build() override here works with no companion delphix/sdb change. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e4b9523 commit 1b64822

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

packages/sdb/config.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,27 @@
1818
# shellcheck disable=SC2034
1919
DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/sdb.git"
2020

21+
UPSTREAM_GIT_URL="https://github.com/sdimitro/sdb.git"
22+
UPSTREAM_GIT_BRANCH="develop"
23+
2124
function prepare() {
2225
logmust install_build_deps_from_control_file
2326
}
2427

2528
function build() {
29+
local scm_version
30+
scm_version=$(cd "$WORKDIR/repo" && python3 -m setuptools_scm 2>/dev/null) \
31+
|| die "setuptools_scm version derivation failed"
32+
#
33+
# pyproject.toml sets local_scheme="no-local-version", so the value
34+
# is debian-version-safe. Pass it through as-is; linux-pkg's
35+
# set_changelog appends "-1delphix.<ts>" since PACKAGE_VERSION has
36+
# no "-", producing e.g. "0.6.0-1delphix.<ts>".
37+
#
38+
export PACKAGE_VERSION="${scm_version}"
2639
logmust dpkg_buildpackage_default
2740
}
41+
42+
function update_upstream() {
43+
logmust update_upstream_from_git
44+
}

0 commit comments

Comments
 (0)