From patchwork Thu Dec 7 15:41:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkata.pyla@toshiba-tsip.com X-Patchwork-Id: 3229 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 07 Dec 2023 16:41:32 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f183.google.com (mail-il1-f183.google.com [209.85.166.183]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 3B7FfVWe030714 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 7 Dec 2023 16:41:32 +0100 Received: by mail-il1-f183.google.com with SMTP id e9e14a558f8ab-35da762b700sf3728075ab.3 for ; Thu, 07 Dec 2023 07:41:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701963686; cv=pass; d=google.com; s=arc-20160816; b=v9MVn5KSLOOebS0WMwlBd1S6udoH4D4IHP6lzaKVXo41pHw8fhtL2Cy/cIXDGneyQC uFD3Nnsne5hJl8cEG3U3g1057JpifP/eR4+wkIsjdHqVRpsvTIX2t99UxY3pbzCqbK4y qSPGIjVwmqr4dmlXgXyHk4u3K7lnDfxAtdEnQ4e5hrvAcZ/hwURWXU2/2KcCE/mzg//+ QzRmSRgDm4LICrDmq3O4s7DZtNx/feDe9+4CNyPqG5chSXXTC/OhbLUzwIjxqrB5i7Gm mTxodxALIrh/01reRRuaY5oKbCJPMQRvr+oVUrgkTAD1YKl9BdW8SRYec5LyAkgELNSW JgaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=g8j2429XEOR82lpcPQODnqDvsRnvGJA7B/V16AaLuiE=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=tUbgBWDVZxd51JajMf3vss1e7vhu2oYfHo746zgpG4rB0N06R3sf6weeE71WjAzinR J9vAUm/7h9dbdJpQNYp/jFTEBd4f4Y1Yy7O5T3Orob/UguNQOi0oukAWF5hf6Ag15e6D 3/DEhBSLCuwpIzPsDsbMo29zVgGY8ZGpNhjlFDEIPtOrf2Bupa8yVgyWAn9bdC1c8TBE 9bFQv3DCGAteLMSkSNrKtZlzIwqJ/bMQj1XfESDl768y5oiiLzx+w2/IEqLLIJu8VkSr uSYGjA5BQvT+xawZXLUZiLg9Z1G7BlORFDm4WW2pbWpk5mMQRHOvTZZMOQI+G/3FuVeA nkcw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1701963686; x=1702568486; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=g8j2429XEOR82lpcPQODnqDvsRnvGJA7B/V16AaLuiE=; b=TjMPSDgQ2PraM99KT19Dz+8GR98mmuPNKiVXR2snUrXbYqwcLfTtiEPpsLobxUpfsx yruGx41J8hhPXiLNyDC9w+4PjaGz8JJgCKEYXThukzgsWtK+r8EXrcNxzRGrUChUMjW6 MY074AhRcWAqSWctrN1MJIjCx8LdOEOq9dgctEOVQgK4tx3vzRd2qMA5oW1j4WPZtWi6 K6nPLMnKX11lkxf8rmfiEKBuT3s7w48O9yJHNXLjtZJQjtec2krbN3I5v2EXeAQdgIni rmLQqxiNdENVaj9eC8MZGMQ/SAfrtSoFJGCqGruafiBeIkeyhUo6yV+rugrhVb7PRsDj aXEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963686; x=1702568486; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=g8j2429XEOR82lpcPQODnqDvsRnvGJA7B/V16AaLuiE=; b=Iy3UPbudf7howzKVMI1Ijt0Yvtz8ZpL7VDoxb5QoLRiY/siXoNWXhuqZ5lek9/Cx70 ZeOJN24VNoZBqQ9J5vv5U/U8jxGlaaUIB5OAASrk7u2PX84hvDj2LdQuBRREiheuOyLx 97vLg/fZ1x35EMA/MUvZCDrFU/K4pCIIr7h2nsCGHFeAdLg+MZb8ErQunwwBecQxomLz bivaba/+vskBqRxDgEHIo9S1BJY47I7a58eDRq5hE2MpUSca7WtubO1U0VNDvyljKyoJ +vHErboYy66s5baRnBG3JxERqRB18O85+VMpwlay2mVOkO5/10TySDtxEZ4p52sE0qNL NYxg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOJu0YylZ7OUxhkXum9HuJ+Qd7t0iCc81tfzt22yoQ2O0vs2WWY1Hf0Q BeMCHwTlIX1GiR9NfIJPt1s= X-Google-Smtp-Source: AGHT+IGYF2uVq76DCztkK07p3IORm5GyCqq8WUFt8PHTkyVCkg5ABlT+Ix4ka/b22Ff1XOl4bE9TjA== X-Received: by 2002:a05:6e02:963:b0:35c:b5b2:1b33 with SMTP id q3-20020a056e02096300b0035cb5b21b33mr2851013ilt.16.1701963685208; Thu, 07 Dec 2023 07:41:25 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:2812:0:b0:35c:bf23:c627 with SMTP id l18-20020a922812000000b0035cbf23c627ls255263ilf.0.-pod-prod-01-us; Thu, 07 Dec 2023 07:41:24 -0800 (PST) X-Received: by 2002:a92:520c:0:b0:35d:70c7:4c6f with SMTP id g12-20020a92520c000000b0035d70c74c6fmr3355407ilb.49.1701963684314; Thu, 07 Dec 2023 07:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701963684; cv=none; d=google.com; s=arc-20160816; b=na2h1jGwcu3kkiESWEpBZNz7+7Julif9b4JnpDM5PAO+PDm8YEy+MqrXM8JglegSY3 nbVLlbo9Ewo1KKsLAD5g18O4/lOUbmiwx4s5S/3c/L4bxzzj8c5YM/K+8bezSebO1wVm LFhARV8VJoRdO4w1FASUZBY0u0WM06NCupp3N4OPxMxstkgmOJvg2Zyw+iUVsmq0jTSU purXO578EEJqWnKasTfYS8W8g19z65VAKpaMW9LsDdOHi6DZwueTGwlGpSx9pZ68QmcR 9nVemTQumh5fp8kzMOg5OT5WfVg4siZVmNro01EckBiohzM+vRIPdUBZjkjkS5OelZKX FM4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=cV3lPxYfznBf6hMRjjUrlJTFT8OF+M06ph4h+QxyT3Y=; fh=0lUGB2344BCNlOMKgxbVcIhrk5SvZVfMXmxQVZJT4o8=; b=emqAV6MJIM5qSHb0JIqmDtjERPVVpbEJ3ZdpNePhwaLCSTKXiOB2YshWfbTIx9tGUR re9KrDBKv453qfy1n0ypiyQpZiAG/fZn+xdETHO0hXejzs5wAGCatWNCsfNOd3u2VUyc EH/dT7kH0FXTVJPZyZahY8NnTKkX6SmnPqn7d+mrCHw7Qg85ys9dxDV2N8oM6Wtrk4ah sf9ClU0oTNb/r8vEo74QJIfngctYt1oMVT0p4ACcVvfG2kDPcYHBsECdoaymeeCsr7Io U6grTMbZeabYcOV5wU7tG2FBPwAr2WUX03xV8zpuRlb38Job9dfDnYXso2o1RYw+rKI8 ik7Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1120.securemx.jp. [210.130.202.131]) by gmr-mx.google.com with ESMTPS id a8-20020a92a308000000b0035c823a9411si162002ili.3.2023.12.07.07.41.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:41:24 -0800 (PST) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 as permitted sender) client-ip=210.130.202.131; Received: by mo-csw.securemx.jp (mx-mo-csw1120) id 3B7FfLwv214962; Fri, 8 Dec 2023 00:41:21 +0900 X-Iguazu-Qid: 2rWhxbaRURrxdJrF7g X-Iguazu-QSIG: v=2; s=0; t=1701963681; q=2rWhxbaRURrxdJrF7g; m=Ji2sjW5NzqGYXHo3dhSmTxUpHARKe6H6z+ObT9klbRM= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1121) id 3B7FfKHB2748869 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Dec 2023 00:41:21 +0900 From: venkata.pyla@toshiba-tsip.com To: isar-users@googlegroups.com Cc: venkata pyla , jan.kiszka@siemens.com, kazuhiro3.hayashi@toshiba.co.jp, dinesh.kumar@toshiba-tsip.com, felix.moessbauer@siemens.com Subject: [PATCH 3/5] wic: use E2FSPROGS_FAKE_TIME and hash_seed to generate reproducible ext4 images Date: Thu, 7 Dec 2023 21:11:12 +0530 X-TSB-HOP2: ON Message-Id: <20231207154114.20400-4-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> References: <20231207154114.20400-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 07 Dec 2023 15:41:14.0652 (UTC) FILETIME=[CFBA05C0:01DA2923] X-Original-Sender: venkata.pyla@toshiba-tsip.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.131 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: venkata pyla E2FSPROGS_FAKE_TIME: sets fixed times for the inodes in the file system. hash_seed: creates reproducible directory indexes in the file system. Reference commit in e2fsprogs: e1f7100643a46456be107b33098f6034b0835e6d Signed-off-by: venkata pyla --- scripts/lib/wic/partition.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index e50871b8..90b2c037 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -280,6 +280,17 @@ class Partition(): extraopts = self.mkfs_extraopts or "-F -i 8192" + if os.getenv('SOURCE_DATE_EPOCH'): + sde_time = int(os.getenv('SOURCE_DATE_EPOCH')) + pseudo = "export E2FSPROGS_FAKE_TIME=%s;%s" % (sde_time, pseudo) + + # Set hash_seed to generate deterministic directory indexes + namespace = uuid.UUID("e7429877-e7b3-4a68-a5c9-2f2fdf33d460") + if self.fsuuid: + namespace = uuid.UUID(self.fsuuid) + hash_seed = str(uuid.uuid5(namespace, str(sde_time))) + extraopts += " -E hash_seed=%s" % hash_seed + label_str = "" if self.label: label_str = "-L %s" % self.label