From patchwork Wed Jun 15 20:36:57 2022 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: 1883 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 16 Jun 2022 06:37:11 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-vs1-f64.google.com (mail-vs1-f64.google.com [209.85.217.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 25G4bAxo007796 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Jun 2022 06:37:11 +0200 Received: by mail-vs1-f64.google.com with SMTP id v11-20020a67af0b000000b00349e2f41f34sf12332vsl.22 for ; Wed, 15 Jun 2022 21:37:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655354225; cv=pass; d=google.com; s=arc-20160816; b=XCNM/MD1zt5+hBZWcMFBRYNJWo2L3yx8RTxYgp3RLTB2AZTsP2yPvfC209zUXr8ZQy AeHdAiC69Mkh4NzhHxY1gzL6UeYtmxjAA96/K57p6zVy7pT2HYoVcaTGz3VgslEBo2Vr CBEtkyvRhQgGZCb14qYIxfJO5ncHT5IA+GVkg/UmijV4OkBQDmyHDnB8eKDnQvNeWRtb +EXP+hd8upyBBoQ1gx2GCLgiXD2MlrXYZYmu5TQdq88yMAlQypDLOIh3GG8di88htfQV VnYL0ivTriO0g5SSUjY+NsDGBwQU+C/Qo0hvTda2mvG/EVh2MIrVM5h16GmlAxexZzj3 1BuA== 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=BbUxvcIieURSgeYbrmB0ezJCIlVnKpd+F1XxkSOthvU=; b=xVAE4xFX6b+G6G2BfOnqSenhoaQHA2Tsb77G64zV+Cve529v3qIPlOK1zGjIMK/ZZf +O0uByjdKtflaV/APqPNUE6+RhZwKzgoTNLq822gUK9rz3aBGb/BXCAuingnTNllzfOF NeOfyhpFfohQ8sX9Ql1m2n1ai085E6/VqDAj/wlJDKgA2Y8G3PnfdbAj3JfdAzVzg5hk b1XeJvr5sBz8x90AnOqj0zBbwtkZfHPC9ZQclpn1lLaD0SxcJ4UX2cjyo12CXil8YtBP mipACuWeDrg0GO/4P9G8h7NRiu/9WrrFGxs9bn+cSoiWe5TB+/9ryd3Kh1fkwRuGWF+F a6gQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.154 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=BbUxvcIieURSgeYbrmB0ezJCIlVnKpd+F1XxkSOthvU=; b=IDHXW9GPDO847lfaNLj4pr87g2/cOzLwQTzENw7Y2JzPY6RUDgyiwIrLjZVQ3nmYUs y8bvqdudC845de+gESfSOzPNk8m4hDNFzMSnnzIphoaE/BoXJ2T0MPg3+GNuJjpysyUY fOD6dL2dLyUZjc+ojMndBZuyFEwavFAjcNv+u/qoff5wH1e2P2zxqbmv3xIkliR75AYA fuFSFrzpia1yESPP/EMi3i/ekkwqCGlWHTZTU3UlmIQNRvKHYLJfltXdzfJ1P+RRDEeQ LizzUGuqxN1z22AQmM6MAkh93mB5XSkGaRMAl4qVHotGpU+rJrW8HVo3AQVG5hdD4pqU 1YMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=BbUxvcIieURSgeYbrmB0ezJCIlVnKpd+F1XxkSOthvU=; b=dyMmxKQFsAeVfQ7ExjmAEIh9YXWADP5OfXZ1AFA/5Pfrgtccp3gaScMLdj4tGdslw/ 2PIUoPp3qhRq/eOx7LMiwPkXBlAUxk6301yzDqdFvJwryZtcrU7L4wjD3qSSAqgucUAp gz3k2P+a7kofb+O8zwyiORMFQWbIq1j3ZBIYCruDDqGGGwdRp1BjVnOor6Zoa6Q4pP2n fENtaBbup0zs8mmE5kALfFwUEiHjcrSZfSRLDhwn/CjEg9+8G2MgC/S6cKxOo5D17koQ HXBgUtq1fVcuhyW7Urq3PvRwHzLaTrx6UC2pFIvZSQUTfMnHg92cI7vYZz8kKtYyylOi 8+SQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AJIora9ZPebY9pdjgO//MDyfNOx4jYAN823qAiHg/tEh6jHHeYcFmIst eq4mikudtsq41lN7IzleGJM= X-Google-Smtp-Source: AGRyM1uAjeo1MoUZL9AVExUT5CDGBqNo6JbeB0q8UUagzNTxfgztNiHbqTEoQ1fQTJ8w+nPpxD05uw== X-Received: by 2002:a67:c11b:0:b0:349:cd63:997c with SMTP id d27-20020a67c11b000000b00349cd63997cmr1671303vsj.45.1655354225059; Wed, 15 Jun 2022 21:37:05 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:6f47:0:b0:34b:8d63:fc68 with SMTP id k68-20020a676f47000000b0034b8d63fc68ls120358vsc.5.gmail; Wed, 15 Jun 2022 21:37:04 -0700 (PDT) X-Received: by 2002:a05:6102:f11:b0:34c:1dc0:2c63 with SMTP id v17-20020a0561020f1100b0034c1dc02c63mr1698903vss.32.1655354224502; Wed, 15 Jun 2022 21:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655354224; cv=none; d=google.com; s=arc-20160816; b=taX9+OXva89ktj2X+y1EWxxr+Ca6o6ozEIE3MUN5CaskQYV4GAx8+KnNauRrloQfbO q2DQVfd+g3nH5t9VjwOmScsqn2NCR0nOEKub0kg2/CHuOfxnetQ8gSggZkYlVirWbZ1/ 3CCM89A15sgIdvCroBg/y3mciAp1N9mAAn35VwNh2F2gLWoLPdTgVJ1E/8+XYzUfyq5u FHoJ3BXG3U/ycRDpFpgvv5kfKs2HTHeJsULOheL6HspJSYCMsmvTXfylZQzbaDpqQ7Fv v8PAQYfA5sf9xA2gAJ/r6l4nJJxC/TQWvrswZKTV7Ad6XmszrMLCXT6ChJ+4aoqRz1S1 s1Bg== 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=wQmUovZZubw/y+BZBoO9IzZZHaYeM6fDydSAw4eAVUU=; b=G7/zd7u9ago6Bd2YbpXmLMUp5VY2lPnYIsuV5/3GcTECHm6SDdCG1sYQ6A2riO+yOo ciXBWcx+nKVqu+7qWWEHTOYGGF6Q22MKDBoEJLjkT/jm8uAYFBBqOPODvyazsZY0mlni GdtPF2OcAIIDoUYGHmHZSSNb2GVb4mlLO5kGVYtHeBPgqzIXAafQUalJZvUxmBleVKqp Hc9rs5dZvzpZYhsXc4oRZQ2aIox6JlSouQxO4VHqCOW/keOCQNodL3lmyw16QuhI0EuW jrCgefKtj8DNIWweURHIZVbF112TAEX3Sp9hcTOA8azCRLWOGJvItFFjSKvvnmnjtBM1 WKBw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.154 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1515.securemx.jp. [210.130.202.154]) by gmr-mx.google.com with ESMTPS id b5-20020a05612202e500b00357324ba38csi31608vko.5.2022.06.15.21.37.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jun 2022 21:37:04 -0700 (PDT) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.154 as permitted sender) client-ip=210.130.202.154; Received: by mo-csw.securemx.jp (mx-mo-csw1515) id 25G4b1ae001611; Thu, 16 Jun 2022 13:37:01 +0900 X-Iguazu-Qid: 34trWQQchQSm7zhQbB X-Iguazu-QSIG: v=2; s=0; t=1655354221; q=34trWQQchQSm7zhQbB; m=5+eB6bi8ctX5Aq8nKI5XM5EjmJww03/yRpl9Aylzr1s= Received: from imx12-a.toshiba.co.jp (imx12-a.toshiba.co.jp [61.202.160.135]) by relay.securemx.jp (mx-mr1512) id 25G4b0en036536 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 16 Jun 2022 13:37:00 +0900 From: venkata.pyla@toshiba-tsip.com To: isar-users@googlegroups.com Cc: venkata pyla , henning.schild@siemens.com, jan.kiszka@siemens.com, dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [PATCH] rootfs: clean debconf cache files Date: Thu, 16 Jun 2022 10:06:57 +0530 X-TSB-HOP2: ON Message-Id: <20220616043657.3750-1-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <86ba121e-b936-d57c-5fe1-c192730f4b6d@ilbers.de> References: <86ba121e-b936-d57c-5fe1-c192730f4b6d@ilbers.de> MIME-Version: 1.0 X-OriginalArrivalTime: 16 Jun 2022 04:36:57.0725 (UTC) FILETIME=[B67E5AD0:01D8813A] 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.154 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, 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: INBOX From: venkata pyla Cleaning the debconf cache files for the purpose of generating reproducible system image. The debconf cache database sometime generates with non-reproducible contents because of some packages behaviour (e.g: localepurge), reported this to package bug tracking system[1], but because this problem is not with one particular package and can happen with other packages also, this should be solved in common place to address reproducibility problem, discussing with Reproducible-builds community[2] to find some common solution for this problem. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009639 [2] https://lists.reproducible-builds.org/pipermail/rb-general/2022-April/002546.html Signed-off-by: venkata pyla Suggested-by: Henning Schild --- meta/classes/image.bbclass | 2 +- meta/classes/rootfs.bbclass | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0da56b7..dc8330a 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -69,7 +69,7 @@ image_do_mounts() { } ROOTFSDIR = "${IMAGE_ROOTFS}" -ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status clean-log-files" +ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status clean-log-files clean-debconf-cache" ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}" diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index 7e9fb0f..3b0abc2 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -244,6 +244,12 @@ rootfs_postprocess_clean_log_files() { -exec rm -f {} ';' } +ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'clean-debconf-cache', 'rootfs_postprocess_clean_debconf_cache', '', d)}" +rootfs_postprocess_clean_debconf_cache() { + # Delete debconf cache files + sudo rm -rf "${ROOTFSDIR}/var/cache/debconf/"* +} + ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'generate-manifest', 'rootfs_generate_manifest', '', d)}" rootfs_generate_manifest () { mkdir -p ${ROOTFS_MANIFEST_DEPLOY_DIR}