From 32b32c397ac4a6bb529637cbf8fe60639d96f118 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Fri, 5 Apr 2024 14:06:11 -0400 Subject: [PATCH] casync: larger chunk sizes and include file mode (#32110) add mode old-commit-hash: 910e32270bc0e216a3443803bb177e0f4963e00b --- system/updated/casync/common.py | 2 +- system/updated/casync/tar.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/updated/casync/common.py b/system/updated/casync/common.py index b30494b2bb..db9b4b1e10 100644 --- a/system/updated/casync/common.py +++ b/system/updated/casync/common.py @@ -7,7 +7,7 @@ from openpilot.system.version import BUILD_METADATA_FILENAME, BuildMetadata from openpilot.system.updated.casync import tar -CASYNC_ARGS = ["--with=symlinks", "--with=permissions", "--compression=xz"] +CASYNC_ARGS = ["--with=symlinks", "--with=permissions", "--compression=xz", "--chunk-size=16M"] CASYNC_FILES = [BUILD_METADATA_FILENAME] diff --git a/system/updated/casync/tar.py b/system/updated/casync/tar.py index 725ab4251d..5c547e73a2 100644 --- a/system/updated/casync/tar.py +++ b/system/updated/casync/tar.py @@ -25,11 +25,11 @@ def create_tar_archive(filename: pathlib.Path, directory: pathlib.Path, include: info = tarfile.TarInfo(relative_path) info.size = file.stat().st_size info.type = tarfile.REGTYPE + info.mode = file.stat().st_mode with file.open('rb') as f: tar.addfile(info, f) - def extract_tar_archive(fh: IO[bytes], directory: pathlib.Path): """Extracts a tar archive to a directory"""