From c596d7eea261c79822b0730d2056ea64c8e7281f Mon Sep 17 00:00:00 2001 From: Kyrylo Yatsenko Date: Fri, 19 Jun 2026 11:30:19 +0300 Subject: T8599: Use .orig suffix for 3.0 source format only 1.0 source format version needs tarball without '.orig' suffix as described in https://www.man7.org/linux/man-pages/man1/dpkg-source.1.html. Only if debian/source/format exists and contains 3.0, use '.orig' --- scripts/package-build/build.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/package-build/build.py b/scripts/package-build/build.py index deac13a3..d637703e 100755 --- a/scripts/package-build/build.py +++ b/scripts/package-build/build.py @@ -153,8 +153,17 @@ def build_package(package: list, patch_dir: Path) -> None: # On failure fallback to repo name package_name = repo_name + # 1.0 version needs 'native' format - without '.orig' + # 3.0 needs '.orig' + source_format_suffix = '' + if (repo_dir / 'debian/source/format').exists(): + with open(repo_dir / 'debian/source/format') as f: + source_format_version = f.read() + if '3.0' in source_format_version: + source_format_suffix = '.orig' + # Build a tarball for the package - tarball_name = f'{package_name}_{package_version}.orig.tar.gz' + tarball_name = f'{package_name}_{package_version}{source_format_suffix}.tar.gz' run(['tar', '--exclude=.git', '--exclude=.github', '-czf', tarball_name, '-C', str(repo_dir.parent), repo_name], check=True) print(f"I: Tarball created: {tarball_name}") -- cgit v1.2.3