From aba564914f790ba8b4a84be141205703d61e588e Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 27 Jul 2026 02:19:23 +0200 Subject: [PATCH] Limit imgutil manifest hashes to the profile source capture and pack hash the whole profile directory, which by that point holds rootimg.sfs, the kernel and the distribution initramfs. rebase only ever looks up entries that came from the profile source directory, so the image blobs cost gigabytes of hashing for nothing. Pass the source directory as the filter, as generate_stock_profiles already does. Older manifests keep working, since rebase reads their entries with a default. --- imgutil/imgutil | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index ff8d68b7..1fb62b96 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -267,7 +267,7 @@ async def capture_remote(args): indir = '{}/profiles/default'.format(confdir) if os.path.exists(indir): copy_tree(indir, outdir) - hmap = await osimage.get_hashes(outdir) + hmap = await osimage.get_hashes(outdir, indir) with open('{0}/manifest.yaml'.format(outdir), 'w') as yout: yout.write('# This manifest enables rebase to know original source of profile data and if any customizations have been done\n') manifestdata = {'distdir': indir, 'disthashes': hmap} @@ -1663,7 +1663,7 @@ async def pack_image(args): indir = '{}/profiles/default'.format(confdir) if os.path.exists(indir): copy_tree(indir, outdir) - hmap = await osimage.get_hashes(outdir) + hmap = await osimage.get_hashes(outdir, indir) with open('{0}/manifest.yaml'.format(outdir), 'w') as yout: yout.write('# This manifest enables rebase to know original source of profile data and if any customizations have been done\n') manifestdata = {'distdir': indir, 'disthashes': hmap}