summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-10-29 16:10:52 +0000
committerGitHub <noreply@github.com>2024-10-29 16:10:52 +0000
commitd6a45cf9db073fff6f5aa3603f21748f7d8e6f3f (patch)
tree00484cdff0dd4f778c618006c63439a680ae8057
parent09ccfe7a7036018e9b3ac374eefdadb465bf49a6 (diff)
parent051bda1f2be92ea814d10c787f76276d8ec7d998 (diff)
downloadvyos-build-d6a45cf9db073fff6f5aa3603f21748f7d8e6f3f.tar.gz
vyos-build-d6a45cf9db073fff6f5aa3603f21748f7d8e6f3f.zip
Merge pull request #826 from sever-sever/T6813-netfilter
T6813: Add tarballs for the 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', ''))