From 37838792db4449643c25cd13a1f8483454ed9cd7 Mon Sep 17 00:00:00 2001 From: Luis Sampaio Date: Wed, 29 Mar 2023 10:00:54 -0700 Subject: [PATCH] Ignore ownership during ostree patch build After the secure boot update the $DEPLOY_DIR and ostree_repo ownership are not root anymore. As the updated repo is owned by root whenever we run rsync to create the delta-dir it will treat all files as different files due to the ownership and that will generate huge patches. This adds the --no-owner to ignore the ownership when comparing the files. Test plan: Pass: build-pkgs --reuse and ostree sync Pass: make_patch.py prepare Pass: make_patch.py create Pass: verified patch size Story: 2009969 Task: 47658 Change-Id: Ia7e026999c051324a4ba2efa7b83262cba1015e5 Signed-off-by: Luis Sampaio --- sw-patch/cgcs-patch/cgcs_make_patch/make_patch.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sw-patch/cgcs-patch/cgcs_make_patch/make_patch.py b/sw-patch/cgcs-patch/cgcs_make_patch/make_patch.py index f812165e..ac5222f9 100755 --- a/sw-patch/cgcs-patch/cgcs_make_patch/make_patch.py +++ b/sw-patch/cgcs-patch/cgcs_make_patch/make_patch.py @@ -541,8 +541,14 @@ class PatchBuilder(object): log.error("Clone dir not found") exit(1) - subprocess.call(["rsync", "-rcpgo", "--exclude=/.lock", "--exclude=/config", - "--compare-dest", clone_dir, patch_repo_dir + "/", self.delta_dir + "/"]) + subprocess.call(["rsync", "-rcpgo", + "--exclude=/.lock", + "--exclude=/config", + "--no-owner", + "--compare-dest", + clone_dir, + patch_repo_dir + "/", + self.delta_dir + "/"]) log.info("Delta dir created") def __get_commit_checksum(self, commit_id, repo="ostree_repo"):