summaryrefslogtreecommitdiff
path: root/scripts/package-build/netfilter
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-10-28 19:07:35 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-10-28 19:07:35 +0000
commit051bda1f2be92ea814d10c787f76276d8ec7d998 (patch)
tree00484cdff0dd4f778c618006c63439a680ae8057 /scripts/package-build/netfilter
parent09ccfe7a7036018e9b3ac374eefdadb465bf49a6 (diff)
downloadvyos-build-051bda1f2be92ea814d10c787f76276d8ec7d998.tar.gz
vyos-build-051bda1f2be92ea814d10c787f76276d8ec7d998.zip
T6813: Add tarballs for the netfilter
Diffstat (limited to 'scripts/package-build/netfilter')
-rw-r--r--scripts/package-build/netfilter/.gitignore2
-rwxr-xr-xscripts/package-build/netfilter/build.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/scripts/package-build/netfilter/.gitignore b/scripts/package-build/netfilter/.gitignore
index 9bf39f82..c6444404 100644
--- a/scripts/package-build/netfilter/.gitignore
+++ b/scripts/package-build/netfilter/.gitignore
@@ -5,4 +5,4 @@
*.changes
*.deb
*.dsc
-
+*.tar.gz
diff --git a/scripts/package-build/netfilter/build.py b/scripts/package-build/netfilter/build.py
index 9737b7d3..d15b5770 100755
--- a/scripts/package-build/netfilter/build.py
+++ b/scripts/package-build/netfilter/build.py
@@ -112,6 +112,12 @@ def build_package(package: dict, dependencies: list, patch_dir: Path) -> None:
# Apply patches if any
apply_patches(repo_dir, patch_dir, repo_name)
+ # Sanitize the commit ID and build a tarball for the package
+ commit_id_sanitized = package['commit_id'].replace('/', '_')
+ tarball_name = f"{repo_name}_{commit_id_sanitized}.tar.gz"
+ run(['tar', '-czf', tarball_name, '-C', str(repo_dir.parent), repo_name], check=True)
+ print(f"I: Tarball created: {tarball_name}")
+
# Prepare the package if required
if package.get('prepare_package', False):
prepare_package(repo_dir, package.get('install_data', ''))